[MIRROR] Climbable Element (#11096)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-21 13:38:18 -07:00
committed by GitHub
parent 573e286496
commit eaca591b85
75 changed files with 486 additions and 493 deletions

View File

@@ -141,6 +141,10 @@
/turf/simulated/floor/outdoors,
)
/obj/machinery/shieldgen/Initialize(mapload)
. = ..()
AddElement(/datum/element/climbable)
/obj/machinery/shieldgen/Destroy()
collapse_shields()
. = ..()

View File

@@ -25,6 +25,10 @@
var/max_stored_power = 50000 //50 kW
use_power = USE_POWER_OFF //Draws directly from power net. Does not use APC power.
/obj/machinery/shieldwallgen/Initialize(mapload)
. = ..()
AddElement(/datum/element/climbable)
/obj/machinery/shieldwallgen/attack_hand(mob/user as mob)
if(state != 1)
to_chat(user, span_red("The shield generator needs to be firmly secured to the floor first."))

View File

@@ -20,6 +20,10 @@
var/obj/machinery/shield_gen/owned_gen
interact_offline = TRUE
/obj/machinery/shield_capacitor/Initialize(mapload)
. = ..()
AddElement(/datum/element/climbable)
/obj/machinery/shield_capacitor/advanced
name = "advanced shield capacitor"
desc = "A machine that charges a shield generator. This version can store, input, and output more electricity."

View File

@@ -25,7 +25,7 @@
use_power = USE_POWER_OFF //doesn't use APC power
interact_offline = TRUE // don't check stat & NOPOWER|BROKEN for our UI. We check BROKEN ourselves.
var/id //for button usage
var/datum/looping_sound/shield_generator/shield_hum
var/datum/looping_sound/shield_generator/shield_hum // CHOMPAdd
/obj/machinery/shield_gen/advanced
name = "advanced bubble shield generator"
@@ -42,12 +42,13 @@
if(get_dir(cap, src) == cap.dir)
capacitors |= cap
cap.owned_gen = src
shield_hum = new(list(src), FALSE)
return ..()
shield_hum = new(list(src), FALSE) // CHOMPAdd
. = ..()
AddElement(/datum/element/climbable)
/obj/machinery/shield_gen/Destroy()
QDEL_LIST_NULL(field)
QDEL_NULL(shield_hum)
QDEL_NULL(shield_hum) // CHOMPAdd
return ..()
/obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user)
@@ -248,7 +249,7 @@
to_chat(M, "[icon2html(src, M.client)] You hear heavy droning start up.")
for(var/obj/effect/energy_field/E in field) // Update the icons here to ensure all the shields have been made already.
E.update_icon()
shield_hum.start()
shield_hum.start() // CHOMPAdd
else
for(var/obj/effect/energy_field/D in field)
field.Remove(D)
@@ -257,7 +258,7 @@
for(var/mob/M in view(5,src))
to_chat(M, "[icon2html(src, M.client)] You hear heavy droning fade out.")
shield_hum.stop()
shield_hum.stop() // CHOMPAdd
// CHOMPAdd Start - Fills gaps when meteors happen
/obj/machinery/shield_gen/proc/fill_diffused()
if(active)
@@ -277,7 +278,7 @@
if(stat & BROKEN)
icon_state = "broke"
set_light(0)
shield_hum.stop()
shield_hum.stop() // CHOMPAdd
else
if (src.active)
icon_state = "generator1"