Files
Paradise/code/game/objects/items/weapons/caution.dm
warriorstar-orion 79bad427c8 Movement cross/uncross implementation. (#26762)
* refactor: Movement cross/uncross implementation.

* wrong var name

* fix unit tests dropping PDAs into nowhere

* Add documentation.

* remove unused constants

* say which procs are off limits

* fix simpleanimal z change runtime

* helps not to leave merge conflicts

* kill me

* fix typecast

* fix projectile/table collision

* treadmills don't cause MC to crash anymore

* connect_loc is appropriate here

* fix windoors and teleporters

* fix bonfires and clarify docs

* fix proximity sensors

Tested with sensors in crates, sensors in modsuits
Tested new proximity component with firing projectiles at singularity
Tested new proximity component with portable flashes
Tested new proximity component with facehuggers

* lint

* fix: polarized access helper false positives

* Revert "fix: polarized access helper false positives"

This reverts commit 9814f98cf6.

* hopefully the right change for mindflayer steam

* Changes following cameras

* fix glass table collision

* appears to fix doorspam

* fix ore bags not picking up ore

* fix signatures of /Exited

* remove debug log

* remove duplicate signal registrar

* fix emptying bags into locations

* I don't trust these nested Move calls

* use connect_loc for upgraded resonator fields

* use moveToNullspace

* fix spiderweb crossing

* fix pass checking for windows from a tile off

* fix bluespace closet/transparency issues

* fix mechs not interacting with doors and probably other things

* fix debug

* fix telepete

* add some docs

* stop trying to shoehorn prox monitor into cards

* I should make sure things build

* kill override signal warning

* undef signal

* not many prox monitors survive going off like this

* small fixes to storage

* make moving wormholes respect signals

* use correct signals for pulse demon

* fix pulse heart too

* fix smoke signals

* may have fucked singulo projectile swerve

* fix singulo projectile arcing

* remove duplicate define

* just look at it

* hopefully last cleanups of incorrect signal usage

* fix squeaking

* may god have mercy on my soul

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

* lewc review

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

* burza review

* fix bad args for grenade assemblies

* Update code/__DEFINES/is_helpers.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

---------

Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <daan.lyklema@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2024-12-21 08:07:44 +00:00

98 lines
3.2 KiB
Plaintext

/obj/item/caution
desc = "Caution! Wet Floor!"
name = "wet floor sign"
icon = 'icons/obj/janitor.dmi'
icon_state = "caution"
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
force = 1.0
throwforce = 3.0
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("warned", "cautioned", "smashed")
/obj/item/caution/proximity_sign
var/timing = FALSE
var/armed = FALSE
var/timepassed = 0
var/datum/proximity_monitor/proximity_monitor
/obj/item/caution/proximity_sign/Initialize(mapload)
. = ..()
proximity_monitor = new(src, 1)
/obj/item/caution/proximity_sign/attack_self__legacy__attackchain(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.mind.has_antag_datum(/datum/antagonist/traitor) && !IS_MINDSLAVE(H))
return
if(armed)
armed = FALSE
to_chat(user, "<span class='notice'>You disarm \the [src].</span>")
return
timing = !timing
if(timing)
START_PROCESSING(SSobj, src)
else
armed = FALSE
timepassed = 0
to_chat(H, "<span class='notice'>You [timing ? "activate \the [src]'s timer, you have 15 seconds." : "de-activate \the [src]'s timer."]</span>")
/obj/item/caution/proximity_sign/process()
if(!timing)
STOP_PROCESSING(SSobj, src)
timepassed++
if(timepassed >= 15 && !armed)
armed = TRUE
timing = FALSE
/obj/item/caution/proximity_sign/HasProximity(atom/movable/AM)
if(armed)
if(iscarbon(AM) && !isbrain(AM))
var/mob/living/carbon/C = AM
if(C.m_intent != MOVE_INTENT_WALK)
visible_message("[src] beeps, \"Sign says walk, asshole.\"")
playsound(src, 'sound/misc/sign_says_walk.ogg', 40)
explosion(src.loc,-1,0,2)
if(ishuman(C))
dead_legs(C)
if(src)
qdel(src)
/obj/item/caution/proximity_sign/proc/dead_legs(mob/living/carbon/human/H as mob)
var/obj/item/organ/external/l = H.get_organ("l_leg")
var/obj/item/organ/external/r = H.get_organ("r_leg")
if(l)
l.droplimb(0, DROPLIMB_SHARP)
if(r)
r.droplimb(0, DROPLIMB_SHARP)
/obj/item/stack/caution/proximity_sign/malf //Malf module
name = "proximity mine dispenser"
icon = 'icons/obj/janitor.dmi'
icon_state = "caution"
energy_type = /datum/robot_storage/energy/jani_landmine
is_cyborg = TRUE
/obj/item/stack/caution/proximity_sign/malf/afterattack__legacy__attackchain(atom/target, mob/user, proximity)
if(!check_allowed_items(target, 1))
return
if(!proximity)
return
var/turf/T = get_turf(target)
if(is_blocked_turf(T, TRUE)) //can't put mines on a tile that has dense stuff
to_chat(user, "<span class='notice'>The space is occupied! You cannot place a mine there!</span>")
return
if(!use(1)) //Can't place a landmine if you don't have a landmine
to_chat(user, "<span class='notice'>[src] is out of landmines! It can be refilled at a cyborg charger.</span>")
return
playsound(src.loc, 'sound/machines/click.ogg', 20, TRUE)
var/obj/item/caution/proximity_sign/M = new /obj/item/caution/proximity_sign(get_turf(target), src)
M.timing = TRUE
START_PROCESSING(SSobj, M)
to_chat(user, "<span class='notice'>You place a landmine with [src]. You have 15 seconds until it is armed.</span>")
return M