almost....

This commit is contained in:
Aurorablade
2015-12-23 11:40:16 -05:00
parent 4b7253befc
commit 046b0b997d
34 changed files with 177 additions and 160 deletions
+29 -13
View File
@@ -8,20 +8,34 @@
w_class = 1
var/sight_flags = 0
var/eye_color = "fff"
var/old_eye_color = "fff"
var/list/eye_colour = list(0,0,0)
var/list/old_eye_colour = list(0,0,0)
var/flash_protect = 0
var/aug_message = "Your vision is augmented!"
/obj/item/organ/internal/cyberimp/eyes/proc/update_colour()
if(!owner)
return
eye_colour = list(
owner.r_eyes ? owner.r_eyes : 0,
owner.g_eyes ? owner.g_eyes : 0,
owner.b_eyes ? owner.b_eyes : 0
)
/obj/item/organ/internal/cyberimp/eyes/Insert(var/mob/living/carbon/M, var/special = 0)
..()
if(istype(owner, /mob/living/carbon/human) && eye_color)
if(istype(owner, /mob/living/carbon/human) && eye_colour)
var/mob/living/carbon/human/HMN = owner
old_eye_color = HMN.eye_color
HMN.eye_color = eye_color
HMN.regenerate_icons()
old_eye_colour[1] = HMN.r_eyes
old_eye_colour[2] = HMN.g_eyes
old_eye_colour[2] = HMN.b_eyes
HMN.r_eyes = eye_colour[1]
HMN.g_eyes = eye_colour[2]
HMN.b_eyes = eye_colour[3]
HMN.update_eyes()
if(aug_message && !special)
owner << "<span class='notice'>[aug_message]</span>"
M.sight |= sight_flags
@@ -29,10 +43,12 @@
/obj/item/organ/internal/cyberimp/eyes/Remove(var/mob/living/carbon/M, var/special = 0)
..()
M.sight ^= sight_flags
if(istype(owner,/mob/living/carbon/human) && eye_color)
if(istype(owner,/mob/living/carbon/human) && eye_colour)
var/mob/living/carbon/human/HMN = owner
HMN.eye_color = old_eye_color
HMN.regenerate_icons()
HMN.r_eyes = old_eye_colour[1]
HMN.g_eyes = old_eye_colour[2]
HMN.b_eyes = old_eye_colour[3]
HMN.update_eyes()
/obj/item/organ/internal/cyberimp/eyes/on_life()
..()
@@ -58,7 +74,7 @@
/obj/item/organ/internal/cyberimp/eyes/xray
name = "X-ray implant"
desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile."
eye_color = "000"
eye_colour = rgb(0, 0, 0)
implant_color = "#000000"
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
@@ -66,7 +82,7 @@
/obj/item/organ/internal/cyberimp/eyes/thermals
name = "Thermals implant"
desc = "These cybernetic eye implants will give you Thermal vision. Vertical slit pupil included."
eye_color = "FC0"
eye_colour = rgb(255, 204, 0)
implant_color = "#FFCC00"
sight_flags = SEE_MOBS
flash_protect = -1
@@ -97,7 +113,7 @@
/obj/item/organ/internal/cyberimp/eyes/hud/medical
name = "Medical HUD implant"
desc = "These cybernetic eye implants will display a medical HUD over everything you see."
eye_color = "0ff"
eye_colour = rgb(15,15,0)
implant_color = "#00FFFF"
origin_tech = "materials=4;programming=3;biotech=4"
aug_message = "You suddenly see health bars floating above people's heads..."
@@ -106,7 +122,7 @@
/obj/item/organ/internal/cyberimp/eyes/hud/security
name = "Security HUD implant"
desc = "These cybernetic eye implants will display a security HUD over everything you see."
eye_color = "d00"
eye_colour = rgb(208,0,0)
implant_color = "#CC0000"
origin_tech = "materials=4;programming=4;biotech=3;combat=1"
aug_message = "Job indicator icons pop up in your vision. That is not a certified surgeon..."
@@ -157,7 +157,7 @@
desc = "This implant with 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/hunger_threshold = 150
var/synthesizing = 0
var/poison_amount = 5
slot = "stomach"
@@ -186,7 +186,7 @@
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
hunger_threshold = 250
poison_amount = 10
origin_tech = "materials=5;programming=3;biotech=5"
+1 -1
View File
@@ -22,7 +22,7 @@
returnorg = get_organs_zone("groin")
for(var/obj/item/organ/internal/O in internal_organs)
if(parent_organ == O.parent_organ)
if(zone == O.parent_organ)
returnorg += O
return returnorg
+1 -1
View File
@@ -4,7 +4,7 @@ var/list/organ_cache = list()
name = "organ"
icon = 'icons/obj/surgery.dmi'
var/dead_icon
var/mob/living/carbon/owner = null
var/mob/living/carbon/human/owner = null
var/status = 0
var/vital //Lose a vital limb, die immediately.
var/damage = 0 // amount of damage to the organ
+27 -35
View File
@@ -24,7 +24,7 @@
owner = M
M.internal_organs |= src
M.internal_organs_by_name[organ_tag] = src
//M.internal_organs_by_name[organ_tag] = src
loc = null
if(organ_action_name)
action_button_name = organ_action_name
@@ -32,23 +32,12 @@
/obj/item/organ/internal/proc/Remove(mob/living/carbon/M, special = 0)
owner = null
if(M)
M.internal_organs_by_name[organ_tag] = null
M.internal_organs_by_name -= organ_tag
M.internal_organs_by_name -= null
// M.internal_organs_by_name[organ_tag] = null
// M.internal_organs_by_name -= organ_tag
// M.internal_organs_by_name -= null
M.internal_organs -= src
loc = get_turf(M)
processing_objects |= src
var/datum/reagent/blood/organ_blood
if(reagents) organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
M.vessel.trans_to(src, 5, 1, 1)
if(vital && !special)
//if(user)
// user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [key_name(M)] (INTENT: [uppertext(user.a_intent)])</font>"
// M.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])</font>"
// msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(M)]")
M.death()
@@ -97,14 +86,14 @@
if(M == user && ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/weapon/reagent_containers/food/snacks/S = prepare_eat()
if(S)
H.unEquip()
H.put_in_active_hand(S)
if(fingerprints) S.fingerprints = fingerprints.Copy()
if(fingerprintshidden) S.fingerprintshidden = fingerprintshidden.Copy()
if(fingerprintslast) S.fingerprintslast = fingerprintslast
S.attack(H, H)
qdel(src)
if(S)
H.unEquip()
H.put_in_active_hand(S)
if(fingerprints) S.fingerprints = fingerprints.Copy()
if(fingerprintshidden) S.fingerprintshidden = fingerprintshidden.Copy()
if(fingerprintslast) S.fingerprintslast = fingerprintslast
S.attack(H, H)
qdel(src)
else
..()
@@ -213,20 +202,23 @@
/obj/item/organ/internal/eyes/proc/update_colour()
if(!owner)
return
eye_colour = list(
owner.r_eyes ? owner.r_eyes : 0,
owner.g_eyes ? owner.g_eyes : 0,
owner.b_eyes ? owner.b_eyes : 0
)
if(istype(owner,/mob/living/carbon/human))
var/mob/living/carbon/human/eyes = owner
eye_colour = list(
eyes.r_eyes ? owner.r_eyes : 0,
eyes.g_eyes ? owner.g_eyes : 0,
eyes.b_eyes ? owner.b_eyes : 0
)
/obj/item/organ/internal/eyes/Insert(mob/living/carbon/M, special = 0)
..()
// Apply our eye colour to the target.
if(istype(M) && eye_colour)
M.r_eyes = eye_colour[1]
M.g_eyes = eye_colour[2]
M.b_eyes = eye_colour[3]
M.update_eyes()
if(istype(M,/mob/living/carbon/human) && eye_colour)
var/mob/living/carbon/human/eyes = M
eyes.r_eyes = eye_colour[1]
eyes.g_eyes = eye_colour[2]
eyes.b_eyes = eye_colour[3]
eyes.update_eyes()
/obj/item/organ/internal/eyes/surgeryize()
@@ -335,10 +327,10 @@
/obj/item/organ/internal/shadowtumor/New()
..()
processing_object.Add(src)
processing_objects.Add(src)
/obj/item/organ/internal/shadowtumor/Destroy()
processing_object.Remove(src)
processing_objects.Remove(src)
..()
/obj/item/organ/internal/shadowtumor/process()
@@ -16,7 +16,7 @@
for(var/mob/living/carbon/alien/humanoid/verb/P in alien_powers)
verbs += P
/obj/item/organ/internal/alien/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/xenos/Remove(mob/living/carbon/M, special = 0)
for(var/mob/living/carbon/alien/humanoid/verb/P in alien_powers)
verbs -= P