commit so i can swap branches...

please note, anything further on changling may invovle updates to game
mode, so another pr. and yes with the brains its jut blocked from
prepare_eat() proc
This commit is contained in:
Aurorablade
2015-12-21 23:19:27 -05:00
parent 80eb828563
commit 4b7253befc
14 changed files with 521 additions and 53 deletions
@@ -13,11 +13,9 @@
var/mob/living/carbon/brain/brainmob = null
organ_tag = "brain"
parent_organ = "head"
slot = "brain"
vital = 1
/obj/item/organ/internal/brain/attack_self(mob/user as mob)
return //let's not have players taken out of the round as easily as a click, once you have their brain.
/obj/item/organ/internal/brain/surgeryize()
if(!owner)
return
+13 -1
View File
@@ -738,4 +738,16 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
handcuffed,
legcuffed,
back,
wear_mask)
wear_mask)
/mob/living/carbon/emp_act(severity)
for(var/obj/item/organ/internal/O in internal_organs)
O.emp_act(severity)
..()
/mob/living/carbon/check_eye_prot()
var/number = ..()
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in internal_organs)
number += EFP.flash_protect
return number
@@ -1100,7 +1100,7 @@
///eyecheck()
///Returns a number between -1 to 2
/mob/living/carbon/human/eyecheck()
var/number = 0
var/number = ..()
if(istype(src.head, /obj/item/clothing/head)) //are they wearing something on their head
var/obj/item/clothing/head/HFP = src.head //if yes gets the flash protection value from that item
number += HFP.flash_protect
@@ -159,7 +159,10 @@
for(var/organ in has_organ)
var/organ_type = has_organ[organ]
H.internal_organs_by_name[organ] = new organ_type(H,1)
internal_organs += new organ
internal_organs += new has_organ[organ]
for(var/obj/item/organ/internal/I in internal_organs)
I.Insert(src)
for(var/name in H.organs_by_name)
H.organs |= H.organs_by_name[name]
+19 -25
View File
@@ -225,31 +225,25 @@
if(A.CheckRemoval(src))
A.Remove(src)
for(var/obj/item/I in src)
if(istype(I,/obj/item/clothing/under))
var/obj/item/clothing/under/U = I
for(var/obj/item/IU in U)
if(istype(IU, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = IU
if(A.action_button_name)
if(!A.action)
if(A.action_button_is_hands_free)
A.action = new/datum/action/item_action/hands_free
else
A.action = new/datum/action/item_action
A.action.name = A.action_button_name
A.action.target = A
A.action.check_flags &= ~AB_CHECK_INSIDE
A.action.Grant(src)
if(I.action_button_name)
if(!I.action)
if(I.action_button_is_hands_free)
I.action = new/datum/action/item_action/hands_free
else
I.action = new/datum/action/item_action
I.action.name = I.action_button_name
I.action.target = I
I.action.Grant(src)
return
give_action_button(I, 1)
return
/mob/living/proc/give_action_button(var/obj/item/I, recursive = 0)
if(I.action_button_name)
if(!I.action)
if(istype(I, /obj/item/organ/internal))
I.action = new/datum/action/organ_action
else if(I.action_button_is_hands_free)
I.action = new/datum/action/item_action/hands_free
else
I.action = new/datum/action/item_action
I.action.name = I.action_button_name
I.action.target = I
I.action.Grant(src)
if(recursive)
for(var/obj/item/T in I)
give_action_button(I, recursive - 1)
/mob/living/update_action_buttons()
if(!hud_used) return
@@ -0,0 +1,125 @@
/obj/item/organ/internal/cyberimp/eyes
name = "cybernetic eyes"
desc = "artificial photoreceptors with specialized functionality"
icon_state = "eye_implant"
implant_overlay = "eye_implant_overlay"
slot = "eye_sight"
parent_organ = "eyes"
w_class = 1
var/sight_flags = 0
var/eye_color = "fff"
var/old_eye_color = "fff"
var/flash_protect = 0
var/aug_message = "Your vision is augmented!"
/obj/item/organ/internal/cyberimp/eyes/Insert(var/mob/living/carbon/M, var/special = 0)
..()
if(istype(owner, /mob/living/carbon/human) && eye_color)
var/mob/living/carbon/human/HMN = owner
old_eye_color = HMN.eye_color
HMN.eye_color = eye_color
HMN.regenerate_icons()
if(aug_message && !special)
owner << "<span class='notice'>[aug_message]</span>"
M.sight |= sight_flags
/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)
var/mob/living/carbon/human/HMN = owner
HMN.eye_color = old_eye_color
HMN.regenerate_icons()
/obj/item/organ/internal/cyberimp/eyes/on_life()
..()
owner.sight |= sight_flags
/obj/item/organ/internal/cyberimp/eyes/emp_act(severity)
if(!owner)
return
if(severity > 1)
if(prob(10 * severity))
return
var/save_sight = owner.sight
owner.sight &= 0
owner.disabilities |= BLIND
owner << "<span class='warning'>Static obfuscates your vision!</span>"
spawn(60 / severity)
if(owner)
owner.sight |= save_sight
owner.disabilities ^= BLIND
/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"
implant_color = "#000000"
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
/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"
implant_color = "#FFCC00"
sight_flags = SEE_MOBS
flash_protect = -1
origin_tech = "materials=6;programming=4;biotech=5;magnets=5;syndicate=4"
aug_message = "You see prey everywhere you look..."
// HUD implants
/obj/item/organ/internal/cyberimp/eyes/hud
name = "HUD implant"
desc = "These cybernetic eyes will display a HUD over everything you see. Maybe."
slot = "eye_hud"
var/HUD_type = 0
/obj/item/organ/internal/cyberimp/eyes/hud/Insert(var/mob/living/carbon/M, var/special = 0)
..()
if(HUD_type)
var/datum/atom_hud/H = huds[HUD_type]
H.add_hud_to(M)
M.permanent_huds |= H
/obj/item/organ/internal/cyberimp/eyes/hud/Remove(var/mob/living/carbon/M, var/special = 0)
..()
if(HUD_type)
var/datum/atom_hud/H = huds[HUD_type]
M.permanent_huds ^= H
H.remove_hud_from(M)
/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"
implant_color = "#00FFFF"
origin_tech = "materials=4;programming=3;biotech=4"
aug_message = "You suddenly see health bars floating above people's heads..."
HUD_type = DATA_HUD_MEDICAL_ADVANCED
/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"
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..."
HUD_type = DATA_HUD_SECURITY_ADVANCED
// Welding shield implant
/obj/item/organ/internal/cyberimp/eyes/shield
name = "welding shield implant"
desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision."
slot = "eye_shield"
origin_tech = "materials=4;biotech=3"
implant_color = "#101010"
flash_protect = 2
// Welding with thermals will still hurt your eyes a bit.
/obj/item/organ/internal/cyberimp/eyes/shield/emp_act(severity)
return
@@ -0,0 +1,264 @@
//note i am putting External in robolimbs.
#define STUN_SET_AMOUNT 2
/obj/item/organ/internal/cyberimp
name = "cybernetic implant"
desc = "a state-of-the-art implant that improves a baseline's functionality"
status = ORGAN_ROBOT
var/implant_color = "#FFFFFF"
var/implant_overlay
/obj/item/organ/internal/cyberimp/New(var/mob/M = null)
if(iscarbon(M))
src.Insert(M)
if(implant_overlay)
var/image/overlay = new /image(icon, implant_overlay)
overlay.color = implant_color
overlays |= overlay
return ..()
//[[[[BRAIN]]]]
/obj/item/organ/internal/cyberimp/brain
name = "cybernetic brain implant"
desc = "injectors of extra sub-routines for the brain"
icon_state = "brain_implant"
implant_overlay = "brain_implant_overlay"
parent_organ = "head"
/obj/item/organ/internal/cyberimp/brain/emp_act(severity)
if(!owner)
return
var/stun_amount = 5 + (severity-1 ? 0 : 5)
owner.Stun(stun_amount)
owner << "<span class='warning'>Your body seizes up!</span>"
return stun_amount
/obj/item/organ/internal/cyberimp/brain/anti_drop
name = "Anti-drop implant"
desc = "This cybernetic brain implant will allow you to force your hand muscles to contract, preventing item dropping. Twitch ear to toggle."
var/active = 0
var/l_hand_ignore = 0
var/r_hand_ignore = 0
var/obj/item/l_hand_obj = null
var/obj/item/r_hand_obj = null
implant_color = "#DE7E00"
slot = "brain_antidrop"
origin_tech = "materials=5;programming=4;biotech=4"
organ_action_name = "Toggle Anti-Drop"
/obj/item/organ/internal/cyberimp/brain/anti_drop/ui_action_click()
active = !active
if(active)
l_hand_obj = owner.l_hand
r_hand_obj = owner.r_hand
if(l_hand_obj)
if(owner.l_hand.flags & NODROP)
l_hand_ignore = 1
else
owner.l_hand.flags |= NODROP
l_hand_ignore = 0
if(r_hand_obj)
if(owner.r_hand.flags & NODROP)
r_hand_ignore = 1
else
owner.r_hand.flags |= NODROP
r_hand_ignore = 0
if(!l_hand_obj && !r_hand_obj)
owner << "<span class='notice'>You are not holding any items, your hands relax...</span>"
active = 0
else
var/msg = 0
msg += !l_hand_ignore && l_hand_obj ? 1 : 0
msg += !r_hand_ignore && r_hand_obj ? 2 : 0
switch(msg)
if(1)
owner << "<span class='notice'>Your left hand's grip tightens.</span>"
if(2)
owner << "<span class='notice'>Your right hand's grip tightens.</span>"
if(3)
owner << "<span class='notice'>Both of your hand's grips tighten.</span>"
else
release_items()
owner << "<span class='notice'>Your hands relax...</span>"
l_hand_obj = null
r_hand_obj = null
/obj/item/organ/internal/cyberimp/brain/anti_drop/emp_act(severity)
if(!owner)
return
var/range = severity ? 10 : 5
var/atom/A
var/obj/item/L_item = owner.l_hand
var/obj/item/R_item = owner.r_hand
release_items()
..()
if(L_item)
A = pick(oview(range))
L_item.throw_at(A, range, 2)
owner << "<span class='notice'>Your left arm spasms and throws the [L_item.name]!</span>"
if(R_item)
A = pick(oview(range))
R_item.throw_at(A, range, 2)
owner << "<span class='notice'>Your right arm spasms and throws the [R_item.name]!</span>"
/obj/item/organ/internal/cyberimp/brain/anti_drop/proc/release_items()
if(!l_hand_ignore && l_hand_obj in owner.contents)
l_hand_obj.flags ^= NODROP
if(!r_hand_ignore && r_hand_obj in owner.contents)
r_hand_obj.flags ^= NODROP
/obj/item/organ/internal/cyberimp/brain/anti_drop/Remove(var/mob/living/carbon/M, special = 0)
..()
if(active)
ui_action_click()
/obj/item/organ/internal/cyberimp/brain/anti_stun
name = "CNS Rebooter implant"
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned."
implant_color = "#FFFF00"
slot = "brain_antistun"
origin_tech = "materials=6;programming=4;biotech=5"
/obj/item/organ/internal/cyberimp/brain/anti_stun/on_life()
..()
if(crit_fail)
return
if(owner.stunned > STUN_SET_AMOUNT)
owner.stunned = STUN_SET_AMOUNT
if(owner.weakened > STUN_SET_AMOUNT)
owner.weakened = STUN_SET_AMOUNT
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
if(crit_fail)
return
crit_fail = 1
spawn(90 / severity)
crit_fail = 0
//[[[[CHEST]]]]
/obj/item/organ/internal/cyberimp/chest
name = "cybernetic torso implant"
desc = "implants for the organs in your torso"
icon_state = "chest_implant"
implant_overlay = "chest_implant_overlay"
parent_organ = "chest"
/obj/item/organ/internal/cyberimp/chest/nutriment
name = "Nutriment pump implant"
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/synthesizing = 0
var/poison_amount = 5
slot = "stomach"
origin_tech = "materials=5;programming=3;biotech=4"
/obj/item/organ/internal/cyberimp/chest/nutriment/on_life()
if(synthesizing)
return
if(owner.stat == DEAD)
return
if(owner.nutrition <= hunger_threshold)
synthesizing = 1
owner << "<span class='notice'>You feel less hungry...</span>"
owner.nutrition += 50
spawn(50)
synthesizing = 0
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
if(!owner)
return
owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning
owner << "<span class='warning'>You feel like your insides are burning.</span>"
/obj/item/organ/internal/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
origin_tech = "materials=5;programming=3;biotech=5"
/obj/item/organ/internal/cyberimp/chest/reviver
name = "Reviver implant"
desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!"
icon_state = "chest_implant"
implant_color = "#AD0000"
origin_tech = "materials=6;programming=3;biotech=6;syndicate=4"
slot = "heartdrive"
var/revive_cost = 0
var/reviving = 0
var/cooldown = 0
/obj/item/organ/internal/cyberimp/chest/reviver/on_life()
if(reviving)
if(owner.stat == UNCONSCIOUS)
spawn(30)
if(prob(90) && owner.getOxyLoss())
owner.adjustOxyLoss(-3)
revive_cost += 5
if(prob(75) && owner.getBruteLoss())
owner.adjustBruteLoss(-1)
revive_cost += 20
if(prob(75) && owner.getFireLoss())
owner.adjustFireLoss(-1)
revive_cost += 20
if(prob(40) && owner.getToxLoss())
owner.adjustToxLoss(-1)
revive_cost += 50
else
cooldown = revive_cost + world.time
reviving = 0
return
if(cooldown > world.time)
return
if(owner.stat != UNCONSCIOUS)
return
if(owner.suiciding)
return
revive_cost = 0
reviving = 1
/obj/item/organ/internal/cyberimp/chest/reviver/emp_act(severity)
if(!owner)
return
if(reviving)
revive_cost += 200
else
cooldown += 200
if(istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
if(H.stat != DEAD && prob(50 / severity))
H.heart_attack = 1
spawn(600 / severity)
H.heart_attack = 0
if(H.stat == CONSCIOUS)
H << "<span class='notice'>You feel your heart beating again!</span>"
//BOX O' IMPLANTS
/obj/item/weapon/storage/box/cyber_implants
name = "boxed cybernetic implants"
desc = "A sleek, sturdy box."
icon_state = "cyber_implants"
var/list/boxed = list(/obj/item/organ/internal/cyberimp/eyes/xray,/obj/item/organ/internal/cyberimp/eyes/thermals,
/obj/item/organ/internal/cyberimp/brain/anti_stun, /obj/item/organ/internal/cyberimp/chest/reviver)
var/amount = 5
/obj/item/weapon/storage/box/cyber_implants/New()
..()
var/i
var/implant
for(i = 0, i < amount, i++)
implant = pick(boxed)
new implant(src)
+1 -1
View File
@@ -33,7 +33,7 @@ var/global/list/limb_icon_cache = list()
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
..()
var/obj/item/organ/internal/eyes/eyes = owner.internal_organs_by_name["eyes"]
var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ("eyes")//owner.internal_organs_by_name["eyes"]
if(eyes) eyes.update_colour()
/obj/item/organ/external/head/removed()
@@ -78,6 +78,10 @@
icon_state = "appendix"
icon = 'icons/obj/surgery.dmi'
/obj/item/weapon/reagent_containers/food/snacks/organ/New()
..()
reagents.add_reagent("nutriment",5)
+10 -10
View File
@@ -30,7 +30,7 @@
//XENOMORPH ORGANS
/obj/item/organ/internal/xenos/plasmavessel
name = "plasma vessel"
name = "xeno plasma vessel"
icon_state = "plasma"
origin_tech = "biotech=5;plasmatech=2"
w_class = 3
@@ -50,7 +50,7 @@
return S
/obj/item/organ/internal/xenos/plasmavessel/queen
name = "bloated plasma vessel"
name = "bloated xeno plasma vessel"
icon_state = "plasma_large"
origin_tech = "biotech=6;plasma=3"
stored_plasma = 200
@@ -58,7 +58,7 @@
plasma_rate = 25
/obj/item/organ/internal/xenos/plasmavessel/drone
name = "large plasma vessel"
name = "large xeno plasma vessel"
icon_state = "plasma_large"
stored_plasma = 200
max_plasma = 500
@@ -68,14 +68,14 @@
max_plasma = 250
/obj/item/organ/internal/xenos/plasmavessel/hunter
name = "small plasma vessel"
name = "small xeno plasma vessel"
icon_state = "plasma_tiny"
stored_plasma = 100
max_plasma = 150
alien_powers = list(/mob/living/carbon/alien/humanoid/verb/plant)
/obj/item/organ/internal/xenos/plasmavessel/larva
name = "tiny plasma vessel"
name = "tiny xeno plasma vessel"
icon_state = "plasma_tiny"
max_plasma = 100
@@ -109,7 +109,7 @@
/obj/item/organ/internal/xenos/acidgland
name = "acid gland"
name = "xeno acid gland"
parent_organ = "head"
slot = "acidgland"
origin_tech = "biotech=5;materials=2;combat=2"
@@ -117,7 +117,7 @@
/obj/item/organ/internal/xenos/hivenode
name = "hive node"
name = "xeno hive node"
parent_organ = "head"
slot = "hivenode"
origin_tech = "biotech=5;magnets=4;bluespace=3"
@@ -133,7 +133,7 @@
..()
/obj/item/organ/internal/xenos/neurotoxin
name = "neurotoxin gland"
name = "xeno neurotoxin gland"
icon_state = "neurotox"
parent_organ = "head"
slot = "neurotoxingland"
@@ -141,7 +141,7 @@
alien_powers = list(/mob/living/carbon/alien/humanoid/proc/neurotoxin)
/obj/item/organ/internal/xenos/resinspinner
name = "resin spinner"
name = "xeno resin organ"//...there tiger....
parent_organ = "head"
icon_state = "stomach-x"
slot = "resinspinner"
@@ -149,7 +149,7 @@
alien_powers = list(/mob/living/carbon/alien/humanoid/proc/resin)
/obj/item/organ/internal/xenos/eggsac
name = "egg sac"
name = "xeno egg sac"
icon_state = "eggsac"
parent_organ = "groin"
slot = "eggsac"