* ports all the tg junk for icemoon, not yet changed to make it all compile * fixes * fixes * fixes * fixes * fixes * new stuff * whew * fixes * it compiles, now to fix the maps * fixes the maps * fixes solars + removes the space tiles in the toxins burn chamber * nukes the SpawnTerrain proc used for tg geysers * linter fix * fix * fixes the non matching turf atmos (hopefully) * more mapping fixes * dmm2tgm * unfucks changeturf for the more_caves * fixes the volanic subtypes of the other thing * fixes the stupid fucking tile placing list * some map fixes, fixes the station_ruin loader shitting out errors this commit took 2 hours of my fucking life * fixes a bunch of mismatch atmos in ruins * fixes wendigo cave having no air * backwards couch backwards couch * fixes the SM up * wendigos can't runtime when butchering if you can't butcher them 😎 * makes the wendigo fight have the same atmos as the surrounding icemoon * Tweaks atmos mixture from o2=22;n2=82;TEMP=180 to o2=18;n2=63;TEMP=180, making lavaland weapons actually work * makes the wendigo screech shake not completely aids * fixes snowlegion portals dropping proper legions instead of skeles * brings the engioutpost ruin over as well * whoopps * empty commit to reroll bots * Fixes pirates, ops, the mining base, and gives pirates and ops drills * fixes lone ops and ninjas * fixes the snowed plating getting fucked when tiles are placed on it * removes some OP junk from the wabbajack pool (aka removes non-antag headslugs again) * more bug fixes * empty commit to reroll bots * hopefully finally kills the active turfs on the library ruin Co-authored-by: kevinz000 <2003111+kevinz000@users.noreply.github.com>
85 lines
2.4 KiB
Plaintext
85 lines
2.4 KiB
Plaintext
|
|
/obj/item/pressure_plate
|
|
name = "pressure plate"
|
|
desc = "An electronic device that triggers when stepped on."
|
|
icon = 'icons/obj/device.dmi'
|
|
item_state = "flash"
|
|
icon_state = "pressureplate"
|
|
level = 1
|
|
var/trigger_mob = TRUE
|
|
var/trigger_item = FALSE
|
|
var/specific_item = null
|
|
var/trigger_silent = FALSE
|
|
var/sound/trigger_sound = 'sound/effects/pressureplate.ogg'
|
|
var/obj/item/assembly/signaler/sigdev = null
|
|
var/roundstart_signaller = FALSE
|
|
var/roundstart_signaller_freq = FREQ_PRESSURE_PLATE
|
|
var/roundstart_signaller_code = 30
|
|
var/roundstart_hide = FALSE
|
|
var/removable_signaller = TRUE
|
|
var/active = FALSE
|
|
var/image/tile_overlay = null
|
|
var/can_trigger = TRUE
|
|
var/trigger_delay = 10
|
|
|
|
/obj/item/pressure_plate/Initialize()
|
|
. = ..()
|
|
tile_overlay = image(icon = 'icons/turf/floors.dmi', icon_state = "pp_overlay")
|
|
if(roundstart_signaller)
|
|
sigdev = new
|
|
sigdev.code = roundstart_signaller_code
|
|
sigdev.frequency = roundstart_signaller_freq
|
|
if(isopenturf(loc))
|
|
hide(TRUE)
|
|
|
|
/obj/item/pressure_plate/Crossed(atom/movable/AM)
|
|
. = ..()
|
|
if(!can_trigger || !active)
|
|
return
|
|
if(trigger_item && !istype(AM, specific_item))
|
|
return
|
|
if(trigger_mob && isliving(AM))
|
|
var/mob/living/L = AM
|
|
to_chat(L, "<span class='warning'>You feel something click beneath you!</span>")
|
|
else if(!trigger_item)
|
|
return
|
|
can_trigger = FALSE
|
|
addtimer(CALLBACK(src, .proc/trigger), trigger_delay)
|
|
|
|
/obj/item/pressure_plate/proc/trigger()
|
|
can_trigger = TRUE
|
|
if(istype(sigdev))
|
|
sigdev.signal()
|
|
|
|
/obj/item/pressure_plate/attackby(obj/item/I, mob/living/L)
|
|
if(istype(I, /obj/item/assembly/signaler) && !istype(sigdev) && removable_signaller && L.transferItemToLoc(I, src))
|
|
sigdev = I
|
|
to_chat(L, "<span class='notice'>You attach [I] to [src]!</span>")
|
|
return ..()
|
|
|
|
/obj/item/pressure_plate/attack_self(mob/living/L)
|
|
if(removable_signaller && istype(sigdev))
|
|
to_chat(L, "<span class='notice'>You remove [sigdev] from [src]</span>")
|
|
if(!L.put_in_hands(sigdev))
|
|
sigdev.forceMove(get_turf(src))
|
|
sigdev = null
|
|
return ..()
|
|
|
|
/obj/item/pressure_plate/hide(yes)
|
|
if(yes)
|
|
invisibility = INVISIBILITY_MAXIMUM
|
|
anchored = TRUE
|
|
icon_state = null
|
|
active = TRUE
|
|
can_trigger = TRUE
|
|
if(tile_overlay)
|
|
loc.add_overlay(tile_overlay)
|
|
else
|
|
invisibility = initial(invisibility)
|
|
anchored = FALSE
|
|
icon_state = initial(icon_state)
|
|
active = FALSE
|
|
if(tile_overlay)
|
|
loc.overlays -= tile_overlay
|
|
|