mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102 Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move. Adds Immobilize()d status effect that freezes movement but does not prevent anything else. Adds Paralyze()d which is oldstun "You can't do anything at all and knock down). Stun() will now prevent any item/UI usage and movement (which is similar to before). Knockdown() will now only knockdown without preventing item usage/movement. People knocked down will be able to crawl at softcrit-speeds Refactors some /mob variables and procs to /mob/living. update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove cl rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower. /cl Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
178 lines
5.0 KiB
Plaintext
178 lines
5.0 KiB
Plaintext
/obj/effect/mine
|
|
name = "dummy mine"
|
|
desc = "Better stay away from that thing."
|
|
density = FALSE
|
|
anchored = TRUE
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "uglymine"
|
|
var/triggered = 0
|
|
|
|
/obj/effect/mine/proc/mineEffect(mob/victim)
|
|
to_chat(victim, "<span class='danger'>*click*</span>")
|
|
|
|
/obj/effect/mine/Crossed(AM as mob|obj)
|
|
if(isturf(loc))
|
|
if(ismob(AM))
|
|
var/mob/MM = AM
|
|
if(!(MM.movement_type & FLYING))
|
|
triggermine(AM)
|
|
else
|
|
triggermine(AM)
|
|
|
|
/obj/effect/mine/proc/triggermine(mob/victim)
|
|
if(triggered)
|
|
return
|
|
visible_message("<span class='danger'>[victim] sets off [icon2html(src, viewers(src))] [src]!</span>")
|
|
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
|
s.set_up(3, 1, src)
|
|
s.start()
|
|
mineEffect(victim)
|
|
triggered = 1
|
|
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/victim)
|
|
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
|
|
|
|
|
|
/obj/effect/mine/stun
|
|
name = "stun mine"
|
|
var/stun_time = 80
|
|
|
|
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
|
if(isliving(victim))
|
|
victim.Paralyze(stun_time)
|
|
|
|
/obj/effect/mine/kickmine
|
|
name = "kick mine"
|
|
|
|
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
|
if(isliving(victim) && victim.client)
|
|
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
|
|
qdel(victim.client)
|
|
|
|
|
|
/obj/effect/mine/gas
|
|
name = "oxygen mine"
|
|
var/gas_amount = 360
|
|
var/gas_type = "o2"
|
|
|
|
/obj/effect/mine/gas/mineEffect(mob/victim)
|
|
atmos_spawn_air("[gas_type]=[gas_amount]")
|
|
|
|
|
|
/obj/effect/mine/gas/plasma
|
|
name = "plasma mine"
|
|
gas_type = "plasma"
|
|
|
|
|
|
/obj/effect/mine/gas/n2o
|
|
name = "\improper N2O mine"
|
|
gas_type = "n2o"
|
|
|
|
|
|
/obj/effect/mine/sound
|
|
name = "honkblaster 1000"
|
|
var/sound = 'sound/items/bikehorn.ogg'
|
|
|
|
/obj/effect/mine/sound/mineEffect(mob/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/Initialize()
|
|
. = ..()
|
|
animate(src, pixel_y = 4, time = 20, loop = -1)
|
|
|
|
/obj/effect/mine/pickup/triggermine(mob/victim)
|
|
if(triggered)
|
|
return
|
|
triggered = 1
|
|
invisibility = INVISIBILITY_ABSTRACT
|
|
mineEffect(victim)
|
|
qdel(src)
|
|
|
|
|
|
/obj/effect/mine/pickup/bloodbath
|
|
name = "Red Orb"
|
|
desc = "You feel angry just looking at it."
|
|
duration = 1200 //2min
|
|
color = "#FF0000"
|
|
|
|
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
|
if(!victim.client || !istype(victim))
|
|
return
|
|
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
|
SEND_SOUND(victim, sound('sound/misc/e1m1.ogg'))
|
|
var/old_color = victim.client.color
|
|
var/static/list/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
|
var/static/list/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
|
|
|
spawn(0)
|
|
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
|
|
|
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
|
victim.log_message("entered a blood frenzy", LOG_ATTACK)
|
|
|
|
chainsaw.item_flags |= NODROP
|
|
victim.drop_all_held_items()
|
|
victim.put_in_hands(chainsaw, forced = TRUE)
|
|
chainsaw.attack_self(victim)
|
|
chainsaw.wield(victim)
|
|
victim.reagents.add_reagent("adminordrazine",25)
|
|
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")
|
|
|
|
victim.client.color = pure_red
|
|
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
|
sleep(10)
|
|
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
|
sleep(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)
|
|
victim.log_message("exited a blood frenzy", LOG_ATTACK)
|
|
qdel(src)
|
|
|
|
/obj/effect/mine/pickup/healing
|
|
name = "Blue Orb"
|
|
desc = "You feel better just looking at it."
|
|
color = "#0000FF"
|
|
|
|
/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(full_heal = 1, admin_revive = 1)
|
|
|
|
/obj/effect/mine/pickup/speed
|
|
name = "Yellow Orb"
|
|
desc = "You feel faster just looking at it."
|
|
color = "#FFFF00"
|
|
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>")
|
|
victim.add_trait(TRAIT_GOTTAGOREALLYFAST, "yellow_orb")
|
|
sleep(duration)
|
|
victim.remove_trait(TRAIT_GOTTAGOREALLYFAST, "yellow_orb")
|
|
to_chat(victim, "<span class='notice'>You slow down.</span>")
|