mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
cl Qustinnus / Floyd / Ethereal sprites by Space, is that it? / Alerts and food sprites by MrDroppodBringer
add: Adds Ethereal; a race which lives off of electricity and shines bright. If they are healthy they shine a bright green light, and the more damaged they are, the less they shine and the greyer they become. Their punches do burn damage and they are weak to blunt attacks!
They dont need to eat normal food and dont have nutrition, Instead they gain charge by going into borg rechargers, eating ethereal food or doign specific interactions.
refactor: all nutrition changes now go through a proc so we can override behavior
/cl
Adds Ethereal. A race which is essentialy inspired by Zoltan but then with different mechanics to make it fit with SS13 more. I'm trying to stay away from making them actually provide power but the change from nutrition to electricity seemed kind of fun.
They have the following specifications:
They are walking lights; and shine bright and green if healthy, and get greyer and darker the more damaged they are. When dead they are just a grey unlit corpse.
They do burn punch damage instead of blunt.
They are weaker to blunt; especially when low on charge
They have charge instead of nutrition. Charge is gained by some interactions or by going into a borg charger. or eating new ethereal food.
They are slightly stronger to shock damage, and gain charge from it a bit; however, it is still deadly to them and thus they aren't free insulated gloves.
210 lines
6.4 KiB
Plaintext
210 lines
6.4 KiB
Plaintext
/obj/item/organ/cyberimp/chest
|
|
name = "cybernetic torso implant"
|
|
desc = "Implants for the organs in your torso."
|
|
icon_state = "chest_implant"
|
|
implant_overlay = "chest_implant_overlay"
|
|
zone = BODY_ZONE_CHEST
|
|
|
|
/obj/item/organ/cyberimp/chest/nutriment
|
|
name = "Nutriment pump implant"
|
|
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are starving."
|
|
icon_state = "chest_implant"
|
|
implant_color = "#00AA00"
|
|
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
|
var/synthesizing = 0
|
|
var/poison_amount = 5
|
|
slot = ORGAN_SLOT_STOMACH_AID
|
|
|
|
/obj/item/organ/cyberimp/chest/nutriment/on_life()
|
|
if(synthesizing)
|
|
return
|
|
|
|
if(owner.nutrition <= hunger_threshold)
|
|
synthesizing = TRUE
|
|
to_chat(owner, "<span class='notice'>You feel less hungry...</span>")
|
|
owner.adjust_nutrition(50)
|
|
addtimer(CALLBACK(src, .proc/synth_cool), 50)
|
|
|
|
/obj/item/organ/cyberimp/chest/nutriment/proc/synth_cool()
|
|
synthesizing = FALSE
|
|
|
|
/obj/item/organ/cyberimp/chest/nutriment/emp_act(severity)
|
|
. = ..()
|
|
if(!owner || . & EMP_PROTECT_SELF)
|
|
return
|
|
owner.reagents.add_reagent("bad_food", poison_amount / severity)
|
|
to_chat(owner, "<span class='warning'>You feel like your insides are burning.</span>")
|
|
|
|
|
|
/obj/item/organ/cyberimp/chest/nutriment/plus
|
|
name = "Nutriment pump implant PLUS"
|
|
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are hungry."
|
|
icon_state = "chest_implant"
|
|
implant_color = "#006607"
|
|
hunger_threshold = NUTRITION_LEVEL_HUNGRY
|
|
poison_amount = 10
|
|
|
|
/obj/item/organ/cyberimp/chest/reviver
|
|
name = "Reviver implant"
|
|
desc = "This implant will attempt to revive and heal you if you lose consciousness. For the faint of heart!"
|
|
icon_state = "chest_implant"
|
|
implant_color = "#AD0000"
|
|
slot = ORGAN_SLOT_HEART_AID
|
|
var/revive_cost = 0
|
|
var/reviving = 0
|
|
var/cooldown = 0
|
|
|
|
/obj/item/organ/cyberimp/chest/reviver/on_life()
|
|
if(reviving)
|
|
if(owner.stat == UNCONSCIOUS)
|
|
addtimer(CALLBACK(src, .proc/heal), 30)
|
|
else
|
|
cooldown = revive_cost + world.time
|
|
reviving = FALSE
|
|
to_chat(owner, "<span class='notice'>Your reviver implant shuts down and starts recharging. It will be ready again in [DisplayTimeText(revive_cost)].</span>")
|
|
return
|
|
|
|
if(cooldown > world.time)
|
|
return
|
|
if(owner.stat != UNCONSCIOUS)
|
|
return
|
|
if(owner.suiciding)
|
|
return
|
|
|
|
revive_cost = 0
|
|
reviving = TRUE
|
|
to_chat(owner, "<span class='notice'>You feel a faint buzzing as your reviver implant starts patching your wounds...</span>")
|
|
|
|
/obj/item/organ/cyberimp/chest/reviver/proc/heal()
|
|
if(owner.getOxyLoss())
|
|
owner.adjustOxyLoss(-5)
|
|
revive_cost += 5
|
|
if(owner.getBruteLoss())
|
|
owner.adjustBruteLoss(-2)
|
|
revive_cost += 40
|
|
if(owner.getFireLoss())
|
|
owner.adjustFireLoss(-2)
|
|
revive_cost += 40
|
|
if(owner.getToxLoss())
|
|
owner.adjustToxLoss(-1)
|
|
revive_cost += 40
|
|
|
|
/obj/item/organ/cyberimp/chest/reviver/emp_act(severity)
|
|
. = ..()
|
|
if(!owner || . & EMP_PROTECT_SELF)
|
|
return
|
|
|
|
if(reviving)
|
|
revive_cost += 200
|
|
else
|
|
cooldown += 200
|
|
|
|
if(ishuman(owner))
|
|
var/mob/living/carbon/human/H = owner
|
|
if(H.stat != DEAD && prob(50 / severity) && H.can_heartattack())
|
|
H.set_heartattack(TRUE)
|
|
to_chat(H, "<span class='userdanger'>You feel a horrible agony in your chest!</span>")
|
|
addtimer(CALLBACK(src, .proc/undo_heart_attack), 600 / severity)
|
|
|
|
/obj/item/organ/cyberimp/chest/reviver/proc/undo_heart_attack()
|
|
var/mob/living/carbon/human/H = owner
|
|
if(!istype(H))
|
|
return
|
|
H.set_heartattack(FALSE)
|
|
if(H.stat == CONSCIOUS)
|
|
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
|
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters
|
|
name = "implantable thrusters set"
|
|
desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \
|
|
Unlike regular jetpacks, this device has no stabilization system."
|
|
slot = ORGAN_SLOT_THRUSTERS
|
|
icon_state = "imp_jetpack"
|
|
implant_overlay = null
|
|
implant_color = null
|
|
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
var/on = FALSE
|
|
var/datum/effect_system/trail_follow/ion/ion_trail
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/Insert(mob/living/carbon/M, special = 0)
|
|
. = ..()
|
|
if(!ion_trail)
|
|
ion_trail = new
|
|
ion_trail.set_up(M)
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/Remove(mob/living/carbon/M, special = 0)
|
|
if(on)
|
|
toggle(silent = TRUE)
|
|
..()
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/ui_action_click()
|
|
toggle()
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/proc/toggle(silent = FALSE)
|
|
if(!on)
|
|
if(crit_fail)
|
|
if(!silent)
|
|
to_chat(owner, "<span class='warning'>Your thrusters set seems to be broken!</span>")
|
|
return 0
|
|
on = TRUE
|
|
if(allow_thrust(0.01))
|
|
ion_trail.start()
|
|
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
|
owner.add_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER, priority=100, multiplicative_slowdown=-2, movetypes=FLOATING, conflict=MOVE_CONFLICT_JETPACK)
|
|
if(!silent)
|
|
to_chat(owner, "<span class='notice'>You turn your thrusters set on.</span>")
|
|
else
|
|
ion_trail.stop()
|
|
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
|
owner.remove_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER)
|
|
if(!silent)
|
|
to_chat(owner, "<span class='notice'>You turn your thrusters set off.</span>")
|
|
on = FALSE
|
|
update_icon()
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/update_icon()
|
|
if(on)
|
|
icon_state = "imp_jetpack-on"
|
|
else
|
|
icon_state = "imp_jetpack"
|
|
for(var/X in actions)
|
|
var/datum/action/A = X
|
|
A.UpdateButtonIcon()
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/proc/move_react()
|
|
allow_thrust(0.01)
|
|
|
|
/obj/item/organ/cyberimp/chest/thrusters/proc/allow_thrust(num)
|
|
if(!on || !owner)
|
|
return 0
|
|
|
|
var/turf/T = get_turf(owner)
|
|
if(!T) // No more runtimes from being stuck in nullspace.
|
|
return 0
|
|
|
|
// Priority 1: use air from environment.
|
|
var/datum/gas_mixture/environment = T.return_air()
|
|
if(environment && environment.return_pressure() > 30)
|
|
return 1
|
|
|
|
// Priority 2: use plasma from internal plasma storage.
|
|
// (just in case someone would ever use this implant system to make cyber-alien ops with jetpacks and taser arms)
|
|
if(owner.getPlasma() >= num*100)
|
|
owner.adjustPlasma(-num*100)
|
|
return 1
|
|
|
|
// Priority 3: use internals tank.
|
|
var/obj/item/tank/I = owner.internal
|
|
if(I && I.air_contents && I.air_contents.total_moles() > num)
|
|
var/datum/gas_mixture/removed = I.air_contents.remove(num)
|
|
if(removed.total_moles() > 0.005)
|
|
T.assume_air(removed)
|
|
return 1
|
|
else
|
|
T.assume_air(removed)
|
|
|
|
toggle(silent = TRUE)
|
|
return 0
|