Skip to content

Commit

Permalink
Various mecha bugfixes (#21982)
Browse files Browse the repository at this point in the history
* mech luxury bugfix

* clamp bugfix

* fulton bugfix

* ()
  • Loading branch information
Runian authored May 2, 2024
1 parent efb4caf commit 383c94d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/game/mecha/equipment/tools/work_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
energy_drain = 10
toolspeed = 0.5
usesound = 'sound/mecha/hydraulic.ogg'
tool_behaviour = TOOL_CROWBAR
equip_actions = list(/datum/action/innate/mecha/equipment/clamp_mode)
/// How much damage does it apply when used
var/dam_force = 20
var/obj/mecha/working/ripley/cargo_holder
var/previous_tool_behavior = TOOL_CROWBAR
harmful = FALSE

/datum/action/innate/mecha/equipment/clamp_mode
Expand All @@ -41,11 +41,14 @@
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M as obj)
..()
cargo_holder = M
tool_behaviour = previous_tool_behavior
return

/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/detach(atom/moveto = null)
..()
cargo_holder = null
previous_tool_behavior = tool_behaviour
tool_behaviour = 0

/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target, mob/living/user, params)
if(!action_checks(target))
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mining/fulton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
chosen_mecha.forceMove(pod)
stored_mecha -= chosen_mecha
new /obj/effect/DPtarget(get_teleport_turf(get_turf(user), 1), pod)
finalize_mech(chosen_mecha)

/obj/item/extraction_pack/mech_drop/proc/finalize_mech(obj/mecha/mecha)
// Reverts the anchor & density given by the extraction pack which would of been done through uses_beacon (but didn't because it was set to FALSE).
mecha.anchored = FALSE
mecha.density = initial(mecha.density)
return FALSE

/obj/item/extraction_pack/mech_drop/examine()
. = ..()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/shuttle/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@
set_scanline("scanning", 10)
return TRUE

if(ismecha(mover))
var/obj/mecha/mech = mover
if(mech.occupant != null && (mech.occupant in approved_passengers))
set_scanline("scanning", 10)
return TRUE

if(!isliving(mover)) //No stowaways
return FALSE
return FALSE
Expand Down

0 comments on commit 383c94d

Please sign in to comment.