Files
Paradise/code/game/objects/effects/mines.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

186 lines
5.1 KiB
Plaintext

/obj/effect/mine
name = "dummy mine"
desc = "I better stay away from that thing."
density = FALSE
icon = 'icons/obj/items.dmi'
icon_state = "uglyminearmed"
var/triggered = FALSE
var/faction = "syndicate"
/obj/effect/mine/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/mine/proc/mineEffect(mob/living/victim)
to_chat(victim, "<span class='danger'>*click*</span>")
/obj/effect/mine/proc/on_atom_entered(datum/source, atom/movable/entered)
SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
if(!isliving(entered))
return
var/mob/living/M = entered
if(faction && (faction in M.faction))
return
if(HAS_TRAIT(M, TRAIT_FLYING))
return
triggermine(M)
/obj/effect/mine/proc/triggermine(mob/living/victim)
if(triggered)
return
visible_message("<span class='danger'>[victim] sets off [bicon(src)] [src]!</span>")
do_sparks(3, 1, src)
mineEffect(victim)
triggered = TRUE
qdel(src)
/obj/effect/mine/ex_act(severity)
// Necessary because, as effects, they have infinite health, and wouldn't be destroyed otherwise.
// Also, they're pressure-sensitive mines, it makes sense that an explosion (wave of pressure) triggers/destroys them.
qdel(src)
/obj/effect/mine/explosive
name = "explosive mine"
var/range_devastation = 0
var/range_heavy = 1
var/range_light = 2
var/range_flash = 3
/obj/effect/mine/explosive/mineEffect(mob/living/victim)
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
/obj/effect/mine/stun
name = "stun mine"
var/stun_time = 16 SECONDS
/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
victim.Weaken(stun_time)
/obj/effect/mine/depot
name = "sentry mine"
/obj/effect/mine/depot/mineEffect(mob/living/victim)
var/area/syndicate_depot/core/depotarea = get_area(src)
if(istype(depotarea))
if(depotarea.mine_triggered(victim))
explosion(loc, 1, 0, 0, 1) // devastate the tile you are on, but leave everything else untouched
/obj/effect/mine/dnascramble
name = "Radiation Mine"
var/radiation_amount
/obj/effect/mine/dnascramble/mineEffect(mob/living/victim)
victim.rad_act(radiation_amount)
if(!victim.dna || HAS_TRAIT(victim, TRAIT_GENELESS))
return
randmutb(victim)
domutcheck(victim)
/obj/effect/mine/gas
name = "oxygen mine"
var/gas_amount = 360
var/gas_type = LINDA_SPAWN_OXYGEN
/obj/effect/mine/gas/mineEffect(mob/living/victim)
atmos_spawn_air(gas_type, gas_amount)
/obj/effect/mine/gas/plasma
name = "plasma mine"
gas_type = LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS
/obj/effect/mine/gas/n2o
name = "\improper N2O mine"
gas_type = LINDA_SPAWN_N2O
/obj/effect/mine/sound
name = "honkblaster 1000"
var/sound = 'sound/items/bikehorn.ogg'
/obj/effect/mine/sound/mineEffect(mob/living/victim)
playsound(loc, sound, 100, 1)
/obj/effect/mine/sound/bwoink
name = "bwoink mine"
sound = 'sound/effects/adminhelp.ogg'
/obj/effect/mine/pickup
name = "pickup"
desc = "pick me up."
icon = 'icons/effects/effects.dmi'
icon_state = "electricity2"
density = FALSE
var/duration = 0
/obj/effect/mine/pickup/New()
..()
animate(src, pixel_y = 4, time = 20, loop = -1)
/obj/effect/mine/pickup/triggermine(mob/living/victim)
if(triggered)
return
triggered = TRUE
invisibility = 101
mineEffect(victim)
qdel(src)
/obj/effect/mine/pickup/bloodbath
name = "Red Orb"
desc = "You feel angry just looking at it."
duration = 1200 //2min
color = "red"
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
if(!istype(victim) || !victim.client)
return
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
SEND_SOUND(victim, sound('sound/misc/e1m1.ogg'))
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
new /obj/effect/hallucination/delusion(get_turf(victim), victim, 'icons/mob/mob.dmi', "daemon")
var/obj/item/chainsaw/doomslayer/chainsaw = new(victim.loc)
chainsaw.flags |= NODROP | DROPDEL
victim.drop_l_hand()
victim.drop_r_hand()
victim.put_in_hands(chainsaw)
chainsaw.attack_self__legacy__attackchain(victim)
victim.reagents.add_reagent("adminordrazine", 25)
victim.flash_screen_color(red_splash, 10)
spawn(duration)
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
qdel(chainsaw)
qdel(src)
/obj/effect/mine/pickup/healing
name = "Blue Orb"
desc = "You feel better just looking at it."
color = "blue"
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel great!</span>")
victim.revive()
/obj/effect/mine/pickup/speed
name = "Yellow Orb"
desc = "You feel faster just looking at it."
color = "yellow"
duration = 300
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel fast!</span>")
ADD_TRAIT(victim, TRAIT_GOTTAGOFAST, "mine")
spawn(duration)
REMOVE_TRAIT(victim, TRAIT_GOTTAGOFAST, "mine")
to_chat(victim, "<span class='notice'>You slow down.</span>")