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.
142 lines
4.1 KiB
Plaintext
142 lines
4.1 KiB
Plaintext
/obj/item/implant/weapons_auth
|
|
name = "firearms authentication implant"
|
|
desc = "Lets you shoot your guns."
|
|
icon_state = "auth"
|
|
activated = 0
|
|
|
|
/obj/item/implant/weapons_auth/get_data()
|
|
var/dat = {"<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Firearms Authentication Implant<BR>
|
|
<b>Life:</b> 4 hours after death of host<BR>
|
|
<b>Implant Details:</b> <BR>
|
|
<b>Function:</b> Allows operation of implant-locked weaponry, preventing equipment from falling into enemy hands."}
|
|
return dat
|
|
|
|
|
|
/obj/item/implant/adrenalin
|
|
name = "adrenal implant"
|
|
desc = "Removes all stuns."
|
|
icon_state = "adrenal"
|
|
uses = 3
|
|
|
|
/obj/item/implant/adrenalin/get_data()
|
|
var/dat = {"<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Cybersun Industries Adrenaline Implant<BR>
|
|
<b>Life:</b> Five days.<BR>
|
|
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
|
<HR>
|
|
<b>Implant Details:</b> Subjects injected with implant can activate an injection of medical cocktails.<BR>
|
|
<b>Function:</b> Removes stuns, increases speed, and has a mild healing effect.<BR>
|
|
<b>Integrity:</b> Implant can only be used three times before reserves are depleted."}
|
|
return dat
|
|
|
|
/obj/item/implant/adrenalin/activate()
|
|
. = ..()
|
|
uses--
|
|
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
|
imp_in.SetStun(0)
|
|
imp_in.SetKnockdown(0)
|
|
imp_in.SetUnconscious(0)
|
|
imp_in.SetParalyzed(0)
|
|
imp_in.SetImmobilized(0)
|
|
imp_in.adjustStaminaLoss(-75)
|
|
imp_in.set_resting(FALSE)
|
|
imp_in.update_mobility()
|
|
|
|
imp_in.reagents.add_reagent("synaptizine", 10)
|
|
imp_in.reagents.add_reagent("omnizine", 10)
|
|
imp_in.reagents.add_reagent("stimulants", 10)
|
|
if(!uses)
|
|
qdel(src)
|
|
|
|
|
|
/obj/item/implant/emp
|
|
name = "emp implant"
|
|
desc = "Triggers an EMP."
|
|
icon_state = "emp"
|
|
uses = 3
|
|
|
|
/obj/item/implant/emp/activate()
|
|
. = ..()
|
|
uses--
|
|
empulse(imp_in, 3, 5)
|
|
if(!uses)
|
|
qdel(src)
|
|
|
|
|
|
//Health Tracker Implant
|
|
|
|
/obj/item/implant/health
|
|
name = "health implant"
|
|
activated = 0
|
|
var/healthstring = ""
|
|
|
|
/obj/item/implant/health/proc/sensehealth()
|
|
if (!imp_in)
|
|
return "ERROR"
|
|
else
|
|
if(isliving(imp_in))
|
|
var/mob/living/L = imp_in
|
|
healthstring = "<small>Oxygen Deprivation Damage => [round(L.getOxyLoss())]<br />Fire Damage => [round(L.getFireLoss())]<br />Toxin Damage => [round(L.getToxLoss())]<br />Brute Force Damage => [round(L.getBruteLoss())]</small>"
|
|
if (!healthstring)
|
|
healthstring = "ERROR"
|
|
return healthstring
|
|
|
|
/obj/item/implant/radio
|
|
name = "internal radio implant"
|
|
activated = TRUE
|
|
var/obj/item/radio/radio
|
|
var/radio_key
|
|
var/subspace_transmission = FALSE
|
|
icon = 'icons/obj/radio.dmi'
|
|
icon_state = "walkietalkie"
|
|
|
|
/obj/item/implant/radio/activate()
|
|
. = ..()
|
|
// needs to be GLOB.deep_inventory_state otherwise it won't open
|
|
radio.ui_interact(usr, "main", null, FALSE, null, GLOB.deep_inventory_state)
|
|
|
|
/obj/item/implant/radio/Initialize(mapload)
|
|
. = ..()
|
|
|
|
radio = new(src)
|
|
// almost like an internal headset, but without the
|
|
// "must be in ears to hear" restriction.
|
|
radio.name = "internal radio"
|
|
radio.subspace_transmission = subspace_transmission
|
|
radio.canhear_range = 0
|
|
if(radio_key)
|
|
radio.keyslot = new radio_key
|
|
radio.recalculateChannels()
|
|
|
|
/obj/item/implant/radio/mining
|
|
radio_key = /obj/item/encryptionkey/headset_cargo
|
|
|
|
/obj/item/implant/radio/syndicate
|
|
desc = "Are you there God? It's me, Syndicate Comms Agent."
|
|
radio_key = /obj/item/encryptionkey/syndicate
|
|
subspace_transmission = TRUE
|
|
|
|
/obj/item/implant/radio/slime
|
|
name = "slime radio"
|
|
icon = 'icons/obj/surgery.dmi'
|
|
icon_state = "adamantine_resonator"
|
|
radio_key = /obj/item/encryptionkey/headset_sci
|
|
subspace_transmission = TRUE
|
|
|
|
/obj/item/implant/radio/get_data()
|
|
var/dat = {"<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Internal Radio Implant<BR>
|
|
<b>Life:</b> 24 hours<BR>
|
|
<b>Implant Details:</b> Allows user to use an internal radio, useful if user expects equipment loss, or cannot equip conventional radios."}
|
|
return dat
|
|
|
|
/obj/item/implanter/radio
|
|
name = "implanter (internal radio)"
|
|
imp_type = /obj/item/implant/radio
|
|
|
|
/obj/item/implanter/radio/syndicate
|
|
name = "implanter (internal syndicate radio)"
|
|
imp_type = /obj/item/implant/radio/syndicate
|
|
|