This commit is contained in:
Ghommie
2019-12-20 23:40:21 +01:00
773 changed files with 13656 additions and 4558 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"
+18 -14
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"
@@ -31,18 +30,21 @@
var/damaged = FALSE //damaged indicates that our eyes are undergoing some level of negative effect
/obj/item/organ/eyes/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = FALSE)
..()
. = ..()
if(!.)
return
if(damage == initial(damage))
clear_eye_trauma()
if(ishuman(owner))
var/mob/living/carbon/human/HMN = owner
old_eye_color = HMN.eye_color
var/mob/living/carbon/human/H = owner
old_eye_color = H.eye_color
if(eye_color)
HMN.eye_color = eye_color
HMN.regenerate_icons()
H.eye_color = eye_color
else
eye_color = HMN.eye_color
if(HAS_TRAIT(HMN, TRAIT_NIGHT_VISION) && !lighting_alpha)
eye_color = H.eye_color
if(!special)
H.dna?.species?.handle_body() //regenerate eyeballs overlays.
if(HAS_TRAIT(H, TRAIT_NIGHT_VISION) && !lighting_alpha)
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
see_in_dark = 8
M.update_tint()
@@ -51,13 +53,15 @@
/obj/item/organ/eyes/Remove(mob/living/carbon/M, special = 0)
clear_eye_trauma()
..()
. = ..()
if(ishuman(M) && eye_color)
var/mob/living/carbon/human/HMN = M
HMN.eye_color = old_eye_color
HMN.regenerate_icons()
M.update_tint()
M.update_sight()
var/mob/living/carbon/human/H = M
H.eye_color = old_eye_color
if(!special)
H.dna.species.handle_body()
if(!special)
M.update_tint()
M.update_sight()
/obj/item/organ/eyes/on_life()
..()
+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"
@@ -25,6 +25,7 @@
var/now_fixed
var/high_threshold_cleared
var/low_threshold_cleared
rad_flags = RAD_NO_CONTAMINATE
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
if(!iscarbon(M) || owner == M)
+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