Skip to content

Commit

Permalink
[MIRROR] Increases move resistance on NODE Drones, adds handling for …
Browse files Browse the repository at this point in the history
…when the drone is seperated from the node (#2751)

* Increases move resistance on NODE Drones, adds handling for when the drone is seperated from the node (#83309)

## About The Pull Request

NODE Drones now have higher move resistance
(MOVE_FORCE_EXTREMELY_STRONG), preventing them from being bumped off the
node, pulled away, or lifted away by a fulton extraction kit.

As an extra layer of assurance, the NODE Drone will depart from the site
if it is moved off of its vent.

## Why It's Good For The Game

Closes #83164.

I'm pretty sure these things shouldn't really be ever moving off of
their vents.
## Changelog
:cl: Rhials
fix: You can no longer force NODE Drones off of ore vents. That includes
using fulton packs!
fix: When a NODE Drone is forcibly separated from its vent, it will fly
away.
/:cl:

* Increases move resistance on NODE Drones, adds handling for when the drone is seperated from the node

---------

Co-authored-by: Rhials <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed May 30, 2024
1 parent 4ac83ea commit 16b88ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
15 changes: 13 additions & 2 deletions code/game/objects/structures/lavaland/ore_vent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
node = new /mob/living/basic/node_drone(loc)
node.arrive(src)
RegisterSignal(node, COMSIG_QDELETING, PROC_REF(handle_wave_conclusion))
RegisterSignal(node, COMSIG_MOVABLE_MOVED, PROC_REF(handle_wave_conclusion))
particles = new /particles/smoke/ash()
for(var/i in 1 to 5) // Clears the surroundings of the ore vent before starting wave defense.
for(var/turf/closed/mineral/rock in oview(i))
Expand Down Expand Up @@ -268,8 +269,18 @@
SEND_SIGNAL(src, COMSIG_VENT_WAVE_CONCLUDED)
COOLDOWN_RESET(src, wave_cooldown)
particles = null
if(!QDELETED(node)) ///The Node Drone has survived the wave defense, and the ore vent is tapped.
tapped = TRUE

if(!QDELETED(node))
if(get_turf(node) != get_turf(src))
visible_message(span_danger("The [node] detaches from the [src], and the vent closes back up!"))
icon_state = initial(icon_state)
update_appearance(UPDATE_ICON_STATE)
UnregisterSignal(node, COMSIG_MOVABLE_MOVED)
node.pre_escape(success = FALSE)
node = null
return //Start over!

tapped = TRUE //The Node Drone has survived the wave defense, and the ore vent is tapped.
SSore_generation.processed_vents += src
balloon_alert_to_viewers("vent tapped!")
icon_state = icon_state_tapped
Expand Down
1 change: 1 addition & 0 deletions code/modules/mining/fulton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
if(!isturf(thing.loc)) // no extracting stuff inside other stuff
return
if(thing.anchored || (thing.move_resist > max_force_fulton))
balloon_alert(user, "too heavy!")
return

balloon_alert_to_viewers("attaching...")
Expand Down
18 changes: 12 additions & 6 deletions code/modules/mob/living/basic/lavaland/node_drone/node_drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
faction = list(FACTION_STATION, FACTION_NEUTRAL)
light_range = 4
basic_mob_flags = DEL_ON_DEATH

move_force = MOVE_FORCE_VERY_STRONG
move_resist = MOVE_FORCE_VERY_STRONG
pull_force = MOVE_FORCE_VERY_STRONG
speak_emote = list("chirps")
response_help_continuous = "pets"
response_help_simple = "pet"
Expand Down Expand Up @@ -85,14 +87,17 @@
/**
* Called when wave defense is completed. Visually flicks the escape sprite and then deletes the mob.
*/
/mob/living/basic/node_drone/proc/escape()
/mob/living/basic/node_drone/proc/escape(success)
var/funny_ending = FALSE
flying_state = FLY_OUT_STATE
update_appearance(UPDATE_ICON_STATE)
if(prob(1))
say("I have to go now, my planet needs me.")
funny_ending = TRUE
visible_message(span_notice("The drone flies away to safety as the vent is secured."))
if(success)
visible_message(span_notice("The drone flies away to safety as the vent is secured."))
else
visible_message(span_danger("The drone flies away after failing to open the vent!"))
animate(src, pixel_z = 400, time = 2 SECONDS, easing = QUAD_EASING|EASE_IN, flags = ANIMATION_PARALLEL)
sleep(2 SECONDS)
if(funny_ending)
Expand All @@ -101,14 +106,15 @@
qdel(src)


/mob/living/basic/node_drone/proc/pre_escape()
/mob/living/basic/node_drone/proc/pre_escape(success = TRUE)
if(buckled)
buckled.unbuckle_mob(src)
if(attached_vent)
attached_vent.unbuckle_mob(src)
attached_vent = null
if(!escaping)
escaping = TRUE
flick("mining_node_escape", src)
addtimer(CALLBACK(src, PROC_REF(escape)), 1.9 SECONDS)
addtimer(CALLBACK(src, PROC_REF(escape), success), 1.9 SECONDS)
return

/// The node drone AI controller
Expand Down

0 comments on commit 16b88ea

Please sign in to comment.