This commit is contained in:
Linzolle
2019-12-17 20:21:49 -06:00
681 changed files with 11917 additions and 3314 deletions
+2 -1
View File
@@ -22,6 +22,7 @@
"[user] begins to perform surgery on [target]'s eyes.")
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES)
display_results(user, target, "<span class='notice'>You succeed in fixing [target]'s eyes.</span>",
"[user] successfully fixes [target]'s eyes!",
"[user] completes the surgery on [target]'s eyes.")
@@ -29,7 +30,7 @@
target.set_blindness(0)
target.cure_nearsighted(list(EYE_DAMAGE))
target.blur_eyes(35) //this will fix itself slowly.
target.set_eye_damage(0)
E.setOrganDamage(0)
return TRUE
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+28 -17
View File
@@ -44,6 +44,9 @@
hunger_threshold = NUTRITION_LEVEL_HUNGRY
poison_amount = 10
#define MAX_HEAL_COOLDOWN 15 MINUTES
#define DEF_CONVALESCENCE_TIME 15 SECONDS
/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!"
@@ -51,43 +54,49 @@
implant_color = "#AD0000"
slot = ORGAN_SLOT_HEART_AID
var/revive_cost = 0
var/reviving = 0
var/reviving = FALSE
var/cooldown = 0
var/convalescence_time = 0
/obj/item/organ/cyberimp/chest/reviver/on_life()
if(reviving)
if(owner.stat == UNCONSCIOUS)
addtimer(CALLBACK(src, .proc/heal), 30)
var/do_heal = world.time < convalescence_time
if(revive_cost >= MAX_HEAL_COOLDOWN)
do_heal = FALSE
else if(owner.stat && owner.stat != DEAD)
do_heal = TRUE
else if(!do_heal)
convalescence_time = world.time + DEF_CONVALESCENCE_TIME
if(do_heal)
addtimer(CALLBACK(src, .proc/heal), 3 SECONDS)
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)
if(cooldown > world.time || owner.stat == CONSCIOUS || owner.stat == DEAD || owner.suiciding)
return
revive_cost = 0
convalescence_time = 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
revive_cost += 0.5 SECONDS
if(owner.getBruteLoss())
owner.adjustBruteLoss(-2)
revive_cost += 40
revive_cost += 4 SECONDS
if(owner.getFireLoss())
owner.adjustFireLoss(-2)
revive_cost += 40
revive_cost += 4 SECONDS
if(owner.getToxLoss())
owner.adjustToxLoss(-1)
revive_cost += 40
revive_cost += 4 SECONDS
/obj/item/organ/cyberimp/chest/reviver/emp_act(severity)
. = ..()
@@ -95,25 +104,27 @@
return
if(reviving)
revive_cost += 200
revive_cost += 20 SECONDS
else
cooldown += 200
cooldown += 20 SECONDS
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)
addtimer(CALLBACK(src, .proc/undo_heart_attack), 60 SECONDS / severity)
/obj/item/organ/cyberimp/chest/reviver/proc/undo_heart_attack()
var/mob/living/carbon/human/H = owner
if(!istype(H))
if(!H || !istype(H))
return
H.set_heartattack(FALSE)
if(H.stat == CONSCIOUS)
if(H.stat == CONSCIOUS || H.stat == SOFT_CRIT)
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
#undef MAX_HEAL_COOLDOWN
#undef DEF_CONVALESCENCE_TIME
/obj/item/organ/cyberimp/chest/thrusters
name = "implantable thrusters set"
-1
View File
@@ -21,7 +21,6 @@
var/sight_flags = 0
var/see_in_dark = 2
var/eye_damage = 0
var/tint = 0
var/eye_color = "" //set to a hex code to override a mob's eye color
var/old_eye_color = "fff"
+5
View File
@@ -55,6 +55,11 @@
update_icon()
return 1
/obj/item/organ/heart/proc/HeartStrengthMessage()
if(beating)
return "a healthy"
return "<span class='danger'>an unstable</span>"
/obj/item/organ/heart/prepare_eat()
var/obj/S = ..()
S.icon_state = "[icon_base]-off"
+1
View File
@@ -22,6 +22,7 @@
/datum/language/ratvar,
/datum/language/aphasia,
/datum/language/slime,
/datum/language/vampiric,
))
healing_factor = STANDARD_ORGAN_HEALING*5 //Fast!!
decay_factor = STANDARD_ORGAN_DECAY/2