mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #2903 from Aurorablade/OrganRefactor
[HOLY SHIT!]Charlie, lets go to candy mountain, charlie
This commit is contained in:
@@ -366,7 +366,7 @@
|
||||
var/mob/living/carbon/M = other
|
||||
if(!istype(M))
|
||||
return 1
|
||||
if(locate(/obj/item/organ/wryn/hivenode) in M.internal_organs)
|
||||
if(locate(/obj/item/organ/internal/wryn/hivenode) in M.internal_organs)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
gender = NEUTER
|
||||
dna = null
|
||||
|
||||
var/storedPlasma = 250
|
||||
var/max_plasma = 500
|
||||
|
||||
alien_talk_understand = 1
|
||||
|
||||
@@ -24,7 +22,6 @@
|
||||
|
||||
status_flags = CANPARALYSE|CANPUSH
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 5
|
||||
|
||||
var/large = 0
|
||||
var/heat_protection = 0.5
|
||||
@@ -34,7 +31,10 @@
|
||||
/mob/living/carbon/alien/New()
|
||||
verbs += /mob/living/carbon/verb/mob_sleep
|
||||
verbs += /mob/living/verb/lay_down
|
||||
internal_organs += new /obj/item/organ/brain/xeno
|
||||
internal_organs += new /obj/item/organ/internal/brain/xeno
|
||||
internal_organs += new /obj/item/organ/internal/xenos/hivenode
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
I.insert(src)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/get_default_language()
|
||||
@@ -57,8 +57,6 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
||||
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
|
||||
updatePlasmaDisplay()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
|
||||
@@ -68,8 +66,6 @@
|
||||
..(amount)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/proc/getPlasma()
|
||||
return storedPlasma
|
||||
|
||||
/mob/living/carbon/alien/eyecheck()
|
||||
return 2
|
||||
@@ -83,15 +79,6 @@
|
||||
|
||||
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/structure/alien/weeds) in loc)
|
||||
if(health >= maxHealth - getCloneLoss())
|
||||
adjustToxLoss(plasma_rate)
|
||||
else
|
||||
adjustBruteLoss(-heal_rate)
|
||||
adjustFireLoss(-heal_rate)
|
||||
adjustOxyLoss(-heal_rate)
|
||||
|
||||
if(!environment)
|
||||
return
|
||||
|
||||
@@ -178,8 +165,6 @@
|
||||
|
||||
..()
|
||||
|
||||
if (client.statpanel == "Status")
|
||||
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
|
||||
|
||||
show_stat_emergency_shuttle_eta()
|
||||
|
||||
@@ -253,9 +238,10 @@ Des: Gives the client of the alien an image on each infected mob.
|
||||
if (client)
|
||||
for (var/mob/living/C in mob_list)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/obj/item/alien_embryo/A = locate() in C
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
|
||||
client.images += I
|
||||
var/obj/item/organ/internal/body_egg/alien_embryo/A = C.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
|
||||
if(A)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
|
||||
client.images += I
|
||||
return
|
||||
|
||||
|
||||
@@ -275,7 +261,7 @@ Des: Removes all infected images from the alien.
|
||||
|
||||
/mob/living/carbon/alien/proc/updatePlasmaDisplay()
|
||||
if(hud_used) //clientless aliens
|
||||
hud_used.alien_plasma_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='magenta'>[storedPlasma]</font></div>"
|
||||
hud_used.alien_plasma_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='magenta'>[getPlasma()]</font></div>"
|
||||
|
||||
/mob/living/carbon/alien/larva/updatePlasmaDisplay()
|
||||
return
|
||||
@@ -312,4 +298,4 @@ Des: Removes all infected images from the alien.
|
||||
|
||||
playsound(T, S, volume, 1, range)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -6,7 +6,7 @@ These are general powers. Specific powers are stored under the appropriate alien
|
||||
Doesn't work on other aliens/AI.*/
|
||||
|
||||
|
||||
/mob/living/carbon/alien/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
|
||||
/mob/living/carbon/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
|
||||
if(stat)
|
||||
src << "<span class='noticealien'>You must be conscious to do this.</span>"
|
||||
return 0
|
||||
@@ -28,7 +28,7 @@ Doesn't work on other aliens/AI.*/
|
||||
return
|
||||
|
||||
if(powerc(50,1))
|
||||
adjustToxLoss(-50)
|
||||
adjustPlasma(-50)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has planted some alien weeds!</span>"), 1)
|
||||
new /obj/structure/alien/weeds/node(loc)
|
||||
@@ -40,7 +40,7 @@ Doesn't work on other aliens/AI.*/
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(10))
|
||||
adjustToxLoss(-10)
|
||||
adjustPlasma(-10)
|
||||
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
|
||||
if(msg)
|
||||
log_say("Alien Whisper: [key_name(src)]->[key_name(M)]: [msg]")
|
||||
@@ -61,8 +61,8 @@ Doesn't work on other aliens/AI.*/
|
||||
amount = abs(round(amount))
|
||||
if(powerc(amount))
|
||||
if (get_dist(src,M) <= 1)
|
||||
M.adjustToxLoss(amount)
|
||||
adjustToxLoss(-amount)
|
||||
M.adjustPlasma(amount)
|
||||
adjustPlasma(-amount)
|
||||
M << "<span class='noticealien'>[src] has transfered [amount] plasma to you.</span>"
|
||||
src << {"<span class='noticealien'>You have trasferred [amount] plasma to [M]</span>"}
|
||||
else
|
||||
@@ -97,7 +97,7 @@ Doesn't work on other aliens/AI.*/
|
||||
else// Not a type we can acid.
|
||||
return
|
||||
|
||||
adjustToxLoss(-200)
|
||||
adjustPlasma(-200)
|
||||
new /obj/effect/acid(get_turf(O), O)
|
||||
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
|
||||
else
|
||||
@@ -110,7 +110,7 @@ Doesn't work on other aliens/AI.*/
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
adjustPlasma(-50)
|
||||
src.visible_message("<span class='danger'>[src] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
|
||||
var/turf/T = loc
|
||||
@@ -136,7 +136,7 @@ Doesn't work on other aliens/AI.*/
|
||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
||||
|
||||
if(!choice || !powerc(55)) return
|
||||
adjustToxLoss(-55)
|
||||
adjustPlasma(-55)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] vomits up a thick purple substance and shapes it!</span>"), 1)
|
||||
switch(choice)
|
||||
@@ -162,3 +162,27 @@ Doesn't work on other aliens/AI.*/
|
||||
//Paralyse(10)
|
||||
src.visible_message("<span class='alertalien'><B>[src] hurls out the contents of their stomach!</span>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/getPlasma()
|
||||
var/obj/item/organ/internal/xenos/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/xenos/plasmavessel)
|
||||
if(!vessel) return 0
|
||||
return vessel.stored_plasma
|
||||
|
||||
|
||||
/mob/living/carbon/proc/adjustPlasma(amount)
|
||||
var/obj/item/organ/internal/xenos/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/xenos/plasmavessel)
|
||||
if(!vessel) return
|
||||
vessel.stored_plasma = max(vessel.stored_plasma + amount,0)
|
||||
vessel.stored_plasma = min(vessel.stored_plasma, vessel.max_plasma) //upper limit of max_plasma, lower limit of 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/adjustPlasma(amount)
|
||||
. = ..()
|
||||
updatePlasmaDisplay()
|
||||
|
||||
/mob/living/carbon/proc/usePlasma(amount)
|
||||
if(getPlasma() >= amount)
|
||||
adjustPlasma(-amount)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -4,7 +4,6 @@
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
icon_state = "aliend_s"
|
||||
plasma_rate = 15
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
@@ -13,8 +12,11 @@
|
||||
if(src.name == "alien drone")
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/drone
|
||||
internal_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
|
||||
..()
|
||||
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
@@ -27,7 +29,7 @@
|
||||
// Queen check
|
||||
var/no_queen = 1
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
|
||||
if(!Q.key && Q.brain_op_stage != 4)
|
||||
if(!Q.key && Q.get_int_organ(/obj/item/organ/internal/brain/))
|
||||
continue
|
||||
no_queen = 0
|
||||
|
||||
@@ -35,7 +37,7 @@
|
||||
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
|
||||
return
|
||||
if(no_queen)
|
||||
adjustToxLoss(-500)
|
||||
adjustPlasma(-500)
|
||||
src << "<span class='noticealien'>You begin to evolve!</span>"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
caste = "h"
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
storedPlasma = 100
|
||||
max_plasma = 150
|
||||
icon_state = "alienh_s"
|
||||
plasma_rate = 5
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
@@ -15,6 +12,7 @@
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/hunter
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
|
||||
@@ -43,7 +41,7 @@
|
||||
if(m_intent == "run" || resting)
|
||||
..()
|
||||
else
|
||||
adjustToxLoss(-heal_rate)
|
||||
adjustPlasma(-heal_rate)
|
||||
|
||||
|
||||
//Hunter verbs
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
caste = "s"
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
storedPlasma = 100
|
||||
max_plasma = 250
|
||||
icon_state = "aliens_s"
|
||||
plasma_rate = 10
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/large
|
||||
name = "alien praetorian"
|
||||
@@ -45,7 +42,9 @@
|
||||
if(name == "alien sentinel")
|
||||
name = text("alien sentinel ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel
|
||||
internal_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
health = 700
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
heal_rate = 5
|
||||
plasma_rate = 20
|
||||
move_delay_add = 3
|
||||
max_plasma = 1000
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
|
||||
@@ -48,7 +45,11 @@
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
|
||||
internal_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
internal_organs += new /obj/item/organ/internal/xenos/eggsac
|
||||
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
|
||||
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress
|
||||
@@ -84,8 +85,8 @@
|
||||
src << "<span class='noticealien'>There's already an egg here.</span>"
|
||||
return
|
||||
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-75)
|
||||
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustPlasma(-250)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/structure/alien/egg(loc)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
heal_rate = 5
|
||||
plasma_rate = 20
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
|
||||
@@ -24,7 +23,11 @@
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
|
||||
internal_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
internal_organs += new /obj/item/organ/internal/xenos/eggsac
|
||||
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
|
||||
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
|
||||
@@ -64,7 +67,7 @@
|
||||
return
|
||||
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-75)
|
||||
adjustPlasma(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
|
||||
new /obj/structure/alien/egg(loc)
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
maxHealth = 30
|
||||
health = 30
|
||||
storedPlasma = 50
|
||||
max_plasma = 50
|
||||
density = 0
|
||||
|
||||
var/amount_grown = 0
|
||||
@@ -25,6 +23,8 @@
|
||||
regenerate_icons()
|
||||
add_language("Xenomorph")
|
||||
add_language("Hivemind")
|
||||
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/larva
|
||||
|
||||
..()
|
||||
|
||||
//This is fine, works the same as a human
|
||||
@@ -64,8 +64,9 @@
|
||||
..()
|
||||
stat(null, "Progress: [amount_grown]/[max_grown]")
|
||||
|
||||
/mob/living/carbon/alien/larva/adjustToxLoss(amount)
|
||||
if(stat != DEAD)
|
||||
|
||||
/mob/living/carbon/alien/larva/adjustPlasma(amount)
|
||||
if(stat != DEAD && amount > 0)
|
||||
amount_grown = min(amount_grown + 1, max_grown)
|
||||
..(amount)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
|
||||
var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
|
||||
/obj/item/alien_embryo
|
||||
/obj/item/organ/internal/body_egg/alien_embryo
|
||||
name = "alien embryo"
|
||||
desc = "All slimy and yuck."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
@@ -10,30 +10,49 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
var/mob/living/affected_mob
|
||||
var/stage = 0
|
||||
|
||||
/obj/item/alien_embryo/New()
|
||||
if(istype(loc, /mob/living))
|
||||
affected_mob = loc
|
||||
affected_mob.status_flags |= XENO_HOST
|
||||
if(istype(affected_mob,/mob/living/carbon))
|
||||
var/mob/living/carbon/H = affected_mob
|
||||
H.med_hud_set_status()
|
||||
processing_objects.Add(src)
|
||||
spawn(0)
|
||||
AddInfectionImages(affected_mob)
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/on_find(mob/living/finder)
|
||||
..()
|
||||
if(stage < 4)
|
||||
finder << "It's small and weak, barely the size of a fetus."
|
||||
else
|
||||
qdel(src)
|
||||
finder << "It's grown quite large, and writhes slightly as you look at it."
|
||||
if(prob(10))
|
||||
AttemptGrow(0)
|
||||
|
||||
/obj/item/alien_embryo/Destroy()
|
||||
if(affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
if(istype(affected_mob,/mob/living/carbon))
|
||||
var/mob/living/carbon/H = affected_mob
|
||||
H.med_hud_set_status()
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
return ..()
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent("sacid", 10)
|
||||
return S
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/on_life()
|
||||
switch(stage)
|
||||
if(2, 3)
|
||||
if(prob(2))
|
||||
owner.emote("sneeze")
|
||||
if(prob(2))
|
||||
owner.emote("cough")
|
||||
if(prob(2))
|
||||
owner << "<span class='danger'>Your throat feels sore.</span>"
|
||||
if(prob(2))
|
||||
owner << "<span class='danger'>Mucous runs down the back of your throat.</span>"
|
||||
if(4)
|
||||
if(prob(2))
|
||||
owner.emote("sneeze")
|
||||
if(prob(2))
|
||||
owner.emote("cough")
|
||||
if(prob(4))
|
||||
owner << "<span class='danger'>Your muscles ache.</span>"
|
||||
if(prob(20))
|
||||
owner.take_organ_damage(1)
|
||||
if(prob(4))
|
||||
owner << "<span class='danger'>Your stomach hurts.</span>"
|
||||
if(prob(20))
|
||||
owner.adjustToxLoss(1)
|
||||
if(5)
|
||||
owner << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
|
||||
owner.adjustToxLoss(10)
|
||||
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/egg_process()
|
||||
if(!affected_mob) return
|
||||
if(loc != affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
@@ -51,38 +70,11 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
spawn(0)
|
||||
RefreshInfectionImage()
|
||||
|
||||
switch(stage)
|
||||
if(2, 3)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(1))
|
||||
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
|
||||
if(prob(1))
|
||||
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
|
||||
if(4)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(2))
|
||||
affected_mob << "<span class='danger'>Your muscles ache.</span>"
|
||||
if(prob(20))
|
||||
affected_mob.take_organ_damage(1)
|
||||
if(prob(2))
|
||||
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
|
||||
if(prob(20))
|
||||
affected_mob.adjustToxLoss(1)
|
||||
affected_mob.updatehealth()
|
||||
if(5)
|
||||
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
|
||||
affected_mob.adjustToxLoss(10)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(50))
|
||||
AttemptGrow()
|
||||
|
||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
if(stage == 5 && prob(50))
|
||||
AttemptGrow()
|
||||
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
var/list/candidates = get_candidates(ROLE_ALIEN,ALIEN_AFK_BRACKET,1)
|
||||
var/client/C = null
|
||||
|
||||
@@ -123,7 +115,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
Proc: RefreshInfectionImage()
|
||||
Des: Removes the current icons located in the infected mob adds the current stage
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/RefreshInfectionImage()
|
||||
RemoveInfectionImages()
|
||||
AddInfectionImages()
|
||||
|
||||
@@ -131,7 +123,7 @@ Des: Removes the current icons located in the infected mob adds the current stag
|
||||
Proc: AddInfectionImages(C)
|
||||
Des: Adds the infection image to all aliens for this embryo
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/AddInfectionImages()
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/AddInfectionImages()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
var/I = image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "infected[stage]")
|
||||
@@ -141,7 +133,7 @@ Des: Adds the infection image to all aliens for this embryo
|
||||
Proc: RemoveInfectionImage(C)
|
||||
Des: Removes all images from the mob infected by this embryo
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/RemoveInfectionImages()
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/RemoveInfectionImages()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
|
||||
@@ -102,7 +102,9 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
icon_state = "[initial(icon_state)]"
|
||||
Attach(hit_atom)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(mob/living/M as mob)
|
||||
if(!isliving(M))
|
||||
return 0
|
||||
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
|
||||
return 0
|
||||
if(attached)
|
||||
@@ -112,24 +114,26 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
spawn(MAX_IMPREGNATION_TIME)
|
||||
attached = 0
|
||||
|
||||
var/mob/living/L = M //just so I don't need to use :
|
||||
if(M.get_int_organ(/obj/item/organ/internal/xenos/hivenode))
|
||||
return 0
|
||||
if(M.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo))
|
||||
return 0
|
||||
|
||||
if(loc == L) return 0
|
||||
if(stat != CONSCIOUS) return 0
|
||||
if(locate(/obj/item/alien_embryo) in L) return 0
|
||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
if(loc == M) return 0
|
||||
|
||||
L.visible_message("<span class='userdanger'>[src] leaps at [L]'s face!</span>")
|
||||
if(!sterile) M.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
M.visible_message("<span class='userdanger'>[src] leaps at [M]'s face!</span>")
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
H.visible_message("<span class='userdanger'>[src] smashes against [H]'s [H.head]!</span>")
|
||||
death()
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/target = L
|
||||
var/mob/living/carbon/target = M
|
||||
if(target.wear_mask)
|
||||
if(prob(20))
|
||||
return 0
|
||||
@@ -144,7 +148,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
src.loc = target
|
||||
target.equip_to_slot(src, slot_wear_mask,,0)
|
||||
|
||||
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
if(!sterile) M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
else if (iscorgi(M))
|
||||
var/mob/living/simple_animal/pet/corgi/C = M
|
||||
loc = C
|
||||
@@ -154,7 +158,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(L)
|
||||
Impregnate(M)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -181,7 +185,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
if(!(target.status_flags & XENO_HOST))
|
||||
new /obj/item/alien_embryo(target)
|
||||
new /obj/item/organ/internal/body_egg/alien_embryo(target)
|
||||
|
||||
|
||||
if(iscorgi(target))
|
||||
@@ -234,7 +238,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
return
|
||||
|
||||
/proc/CanHug(var/mob/M)
|
||||
/proc/CanHug(var/mob/living/M)
|
||||
if(!M || !ismob(M))
|
||||
return 0
|
||||
|
||||
@@ -244,6 +248,9 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
if(iscorgi(M))
|
||||
return 1
|
||||
|
||||
if(M.get_int_organ(/obj/item/organ/internal/xenos/hivenode))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/C = M
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
var/alien = 0
|
||||
var/syndiemmi = 0 //Whether or not this is a Syndicate MMI
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/obj/item/organ/brain/held_brain = null // This is so MMI's aren't brainscrubber 9000's
|
||||
var/obj/item/organ/internal/brain/held_brain = null // This is so MMI's aren't brainscrubber 9000's
|
||||
var/mob/living/silicon/robot/robot = null//Appears unused.
|
||||
var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
// I'm using this for mechs giving MMIs HUDs now
|
||||
|
||||
/obj/item/device/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/organ/brain/crystal ))
|
||||
if(istype(O, /obj/item/organ/internal/brain/crystal ))
|
||||
user << "<span class='warning'> This brain is too malformed to be able to use with the [src].</span>"
|
||||
return
|
||||
if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO
|
||||
var/obj/item/organ/brain/B = O
|
||||
if(istype(O,/obj/item/organ/internal/brain) && !brainmob) //Time to stick a brain in it --NEO
|
||||
var/obj/item/organ/internal/brain/B = O
|
||||
if(!B.brainmob)
|
||||
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain.</span>"
|
||||
return
|
||||
@@ -47,7 +47,7 @@
|
||||
user.drop_item()
|
||||
B.forceMove(src)
|
||||
held_brain = B
|
||||
if(istype(O,/obj/item/organ/brain/xeno)) // I'm not sure how well this will work now, since I don't think you can actually get xeno brains
|
||||
if(istype(O,/obj/item/organ/internal/brain/xeno)) // I'm not sure how well this will work now, since I don't think you can actually get xeno brains
|
||||
name = "Man-Machine Interface: Alien - [brainmob.real_name]"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "AlienMMI"
|
||||
@@ -89,8 +89,8 @@
|
||||
held_brain = new(src)
|
||||
else // We have a species, and it has a brain
|
||||
var/brain_path = H.species.return_organ("brain")
|
||||
if(!ispath(brain_path, /obj/item/organ/brain))
|
||||
brain_path = /obj/item/organ/brain
|
||||
if(!ispath(brain_path, /obj/item/organ/internal/brain))
|
||||
brain_path = /obj/item/organ/internal/brain
|
||||
held_brain = new brain_path(src) // Slime people will keep their slimy brains this way
|
||||
held_brain.dna = brainmob.dna.Clone()
|
||||
held_brain.name = "\the [brainmob.name]'s [initial(held_brain.name)]"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/organ/brain
|
||||
/obj/item/organ/internal/brain
|
||||
name = "brain"
|
||||
health = 400 //They need to live awhile longer than other organs.
|
||||
max_damage = 200
|
||||
@@ -13,33 +13,30 @@
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
organ_tag = "brain"
|
||||
parent_organ = "head"
|
||||
slot = "brain"
|
||||
vital = 1
|
||||
|
||||
/obj/item/organ/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/brain/surgeryize()
|
||||
/obj/item/organ/internal/brain/surgeryize()
|
||||
if(!owner)
|
||||
return
|
||||
owner.ear_damage = 0 //Yeah, didn't you...hear? The ears are totally inside the brain.
|
||||
owner.ear_deaf = 0
|
||||
|
||||
/obj/item/organ/brain/xeno
|
||||
/obj/item/organ/internal/brain/xeno
|
||||
name = "thinkpan"
|
||||
desc = "It looks kind of like an enormous wad of purple bubblegum."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
icon_state = "brain-x-d"
|
||||
|
||||
/obj/item/organ/brain/New()
|
||||
/obj/item/organ/internal/brain/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(var/mob/living/carbon/H)
|
||||
/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H)
|
||||
brainmob = new(src)
|
||||
if(isnull(dna)) // someone didn't set this right...
|
||||
log_to_dd("[src] at [loc] did not contain a dna datum at time of removed.")
|
||||
log_to_dd("[src] at [loc] did not contain a dna datum at time of removal.")
|
||||
dna = H.dna.Clone()
|
||||
name = "\the [dna.real_name]'s [initial(src.name)]"
|
||||
brainmob.dna = dna.Clone() // Silly baycode, what you do
|
||||
@@ -53,63 +50,68 @@
|
||||
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a [initial(src.name)].</span>"
|
||||
callHook("debrain", list(brainmob))
|
||||
|
||||
/obj/item/organ/brain/examine(mob/user) // -- TLE
|
||||
/obj/item/organ/internal/brain/examine(mob/user) // -- TLE
|
||||
..(user)
|
||||
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
|
||||
user << "You can feel the small spark of life still left in this one."
|
||||
else
|
||||
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
|
||||
|
||||
/obj/item/organ/brain/removed(var/mob/living/user)
|
||||
/obj/item/organ/internal/brain/remove(var/mob/living/user,special = 0)
|
||||
|
||||
if(!owner) return ..() // Probably a redundant removal; just bail
|
||||
|
||||
var/obj/item/organ/brain/B = src
|
||||
if(istype(B) && istype(owner) && is_primary_organ())
|
||||
var/obj/item/organ/internal/brain/B = src
|
||||
if(!special)
|
||||
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
|
||||
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
owner.brain_op_stage = 4.0
|
||||
B.transfer_identity(owner)
|
||||
B.transfer_identity(user)
|
||||
|
||||
if(istype(owner,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.update_hair(1)
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/replaced(var/mob/living/target)
|
||||
/obj/item/organ/internal/brain/insert(var/mob/living/target,special = 0)
|
||||
|
||||
name = "brain"
|
||||
var/brain_already_exists = 0
|
||||
if(istype(target,/mob/living/carbon/human)) // No more IPC multibrain shenanigans
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(organ_tag in H.internal_organs_by_name)
|
||||
if(target.get_int_organ(/obj/item/organ/internal/brain))
|
||||
brain_already_exists = 1
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.update_hair(1)
|
||||
|
||||
if(!brain_already_exists)
|
||||
if(target.key)
|
||||
target.ghostize()
|
||||
var/mob/living/carbon/C = target
|
||||
if(istype(C))
|
||||
C.brain_op_stage = 1.0
|
||||
if(brainmob)
|
||||
if(target.key)
|
||||
target.ghostize()
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(target)
|
||||
else
|
||||
target.key = brainmob.key
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/slime
|
||||
/obj/item/organ/internal/brain/prepare_eat()
|
||||
return // Too important to eat.
|
||||
|
||||
/obj/item/organ/internal/brain/slime
|
||||
name = "slime core"
|
||||
desc = "A complex, organic knot of jelly and crystalline particles."
|
||||
icon = 'icons/mob/slimes.dmi'
|
||||
icon_state = "green slime extract"
|
||||
|
||||
/obj/item/organ/brain/golem
|
||||
/obj/item/organ/internal/brain/golem
|
||||
name = "Runic mind"
|
||||
desc = "A tightly furled roll of paper, covered with indecipherable runes."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
|
||||
/obj/item/organ/brain/Destroy() //copypasted from MMIs.
|
||||
/obj/item/organ/internal/brain/Destroy() //copypasted from MMIs.
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if(container && istype(container, /obj/item/device/mmi))
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/brain))
|
||||
if(istype(loc,/obj/item/organ/internal/brain))
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
spawn(15)
|
||||
if(animation) qdel(animation)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mob/living
|
||||
/mob/living
|
||||
var/canEnterVentWith = "/obj/item/weapon/implant=0&/obj/item/clothing/mask/facehugger=0&/obj/item/device/radio/borg=0&/obj/machinery/camera=0"
|
||||
var/datum/middleClickOverride/middleClickOverride = null
|
||||
|
||||
@@ -668,6 +668,18 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
else
|
||||
return initial(pixel_y)
|
||||
|
||||
/mob/living/carbon/emp_act(severity)
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Stat()
|
||||
if(statpanel("Status"))
|
||||
var/obj/item/organ/internal/xenos/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/xenos/plasmavessel)
|
||||
if(vessel)
|
||||
stat(null, "Plasma Stored: [vessel.stored_plasma]/[vessel.max_plasma]")
|
||||
..()
|
||||
|
||||
/mob/living/carbon/get_all_slots()
|
||||
return list(l_hand,
|
||||
r_hand,
|
||||
|
||||
@@ -19,4 +19,14 @@
|
||||
/mob/living/carbon/water_act(volume, temperature, source)
|
||||
if(volume > 10) //anything over 10 volume will make the mob wetter.
|
||||
wetlevel = min(wetlevel + 1,5)
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
|
||||
if(lying)
|
||||
if(surgeries.len)
|
||||
if(user != src && user.a_intent == "help")
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
..()
|
||||
@@ -2,6 +2,7 @@
|
||||
gender = MALE
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
|
||||
var/list/stomach_contents = list()
|
||||
var/list/internal_organs = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/antibodies = 0
|
||||
@@ -18,8 +19,6 @@
|
||||
var/obj/item/head = null
|
||||
var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
|
||||
|
||||
//Surgery info
|
||||
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
|
||||
playsound(src.loc, 'sound/effects/gib.ogg', 100, 1, 10)
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
if(istype(loc,/turf))
|
||||
I.removed()
|
||||
I.remove(src)
|
||||
I.forceMove(get_turf(src))
|
||||
spawn()
|
||||
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
|
||||
|
||||
|
||||
@@ -253,12 +253,15 @@
|
||||
if(getBrainLoss() >= 60)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if(species.show_ssd && (!species.has_organ["brain"] || brain_op_stage != 4) && stat != DEAD)
|
||||
if(species.show_ssd && (!species.has_organ["brain"] || get_int_organ(/obj/item/organ/internal/brain)) && stat != DEAD)
|
||||
if(!key)
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n"
|
||||
else if(!client)
|
||||
msg += "[t_He] [t_has] suddenly fallen asleep.\n"
|
||||
|
||||
if(!get_int_organ(/obj/item/organ/internal/brain))
|
||||
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
|
||||
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
var/list/is_bleeding = list()
|
||||
@@ -487,11 +490,12 @@
|
||||
/proc/hasHUD(mob/M as mob, hudtype)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/internal/cyberimp/eyes/hud/CIH = H.get_int_organ(/obj/item/organ/internal/cyberimp/eyes/hud)
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses)
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses) || istype(CIH,/obj/item/organ/internal/cyberimp/eyes/hud/security)
|
||||
if("medical")
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health/health_advanced)
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health/health_advanced) || istype(CIH,/obj/item/organ/internal/cyberimp/eyes/hud/medical)
|
||||
else
|
||||
return 0
|
||||
else if(istype(M, /mob/living/silicon))
|
||||
|
||||
@@ -1116,7 +1116,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
|
||||
@@ -1126,6 +1126,9 @@
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask)) //mask
|
||||
var/obj/item/clothing/mask/MFP = src.wear_mask
|
||||
number += MFP.flash_protect
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in src.internal_organs)
|
||||
number += EFP.flash_protect
|
||||
|
||||
return number
|
||||
|
||||
///tintcheck()
|
||||
@@ -1310,7 +1313,7 @@
|
||||
species.create_organs(src)
|
||||
|
||||
if(!client || !key) //Don't boot out anyone already in the mob.
|
||||
for (var/obj/item/organ/brain/H in world)
|
||||
for (var/obj/item/organ/internal/brain/H in world)
|
||||
if(H.brainmob)
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
@@ -1326,14 +1329,14 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/is_lung_ruptured()
|
||||
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
|
||||
var/obj/item/organ/internal/lungs/L = get_int_organ(/obj/item/organ/internal/lungs)
|
||||
if(!L)
|
||||
return 0
|
||||
|
||||
return L.is_bruised()
|
||||
|
||||
/mob/living/carbon/human/proc/rupture_lung()
|
||||
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
|
||||
var/obj/item/organ/internal/lungs/L = get_int_organ(/obj/item/organ/internal/lungs)
|
||||
if(!L)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -59,6 +59,16 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
if(can_operate(src))
|
||||
if(health >= config.health_threshold_crit)
|
||||
if(src.surgeries.len)
|
||||
for(var/datum/surgery/S in src.surgeries)
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
else
|
||||
help_shake_act(M)
|
||||
add_logs(src, M, "shaked")
|
||||
return 1
|
||||
if(health >= config.health_threshold_crit)
|
||||
help_shake_act(M)
|
||||
add_logs(src, M, "shaked")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD)
|
||||
ChangeToHusk()
|
||||
if(species.can_revive_by_healing)
|
||||
var/obj/item/organ/brain/B = internal_organs_by_name["brain"]
|
||||
var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(B)
|
||||
if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && stat == DEAD)
|
||||
update_revive()
|
||||
@@ -32,7 +32,7 @@
|
||||
return 0 //godmode
|
||||
|
||||
if(species && species.has_organ["brain"])
|
||||
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(sponge)
|
||||
sponge.take_damage(amount, 1)
|
||||
brainloss = sponge.damage
|
||||
@@ -46,7 +46,7 @@
|
||||
return 0 //godmode
|
||||
|
||||
if(species && species.has_organ["brain"])
|
||||
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(sponge)
|
||||
sponge.damage = min(max(amount, 0),(maxHealth*2))
|
||||
brainloss = sponge.damage
|
||||
@@ -60,7 +60,7 @@
|
||||
return 0 //godmode
|
||||
|
||||
if(species && species.has_organ["brain"])
|
||||
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
|
||||
var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(sponge)
|
||||
brainloss = min(sponge.damage,maxHealth*2)
|
||||
else
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/mob/living/carbon/human/proc/update_eyes()
|
||||
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(eyes)
|
||||
eyes.update_colour()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/carbon/var/list/internal_organs = list()
|
||||
/mob/living/carbon/human/var/list/organs = list()
|
||||
/mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs
|
||||
/mob/living/carbon/human/var/list/internal_organs_by_name = list() // so internal organs have less ickiness too
|
||||
|
||||
// Takes care of organ related updates, such as broken and missing limbs
|
||||
/mob/living/carbon/human/proc/handle_organs()
|
||||
@@ -24,7 +22,7 @@
|
||||
bad_external_organs |= Ex
|
||||
|
||||
//processing internal organs is pretty cheap, do that first.
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
I.process()
|
||||
|
||||
//handle_stance()
|
||||
@@ -47,7 +45,7 @@
|
||||
if (!lying && world.time - l_move_time < 15)
|
||||
//Moving around with fractured ribs won't do you any good
|
||||
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
|
||||
var/obj/item/organ/I = pick(E.internal_organs)
|
||||
var/obj/item/organ/internal/I = pick(E.internal_organs)
|
||||
custom_pain("You feel broken bones moving in your [E.name]!", 1)
|
||||
I.take_damage(rand(3,5))
|
||||
|
||||
@@ -143,7 +141,7 @@
|
||||
/mob/living/carbon/human/proc/handle_trace_chems()
|
||||
//New are added for reagents to random organs.
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
var/obj/item/organ/O = pick(organs)
|
||||
var/obj/item/organ/internal/O = pick(organs)
|
||||
O.trace_chemicals[A.name] = 100
|
||||
|
||||
/*
|
||||
@@ -162,7 +160,7 @@ I use this to standardize shadowling dethrall code
|
||||
-- Crazylemon
|
||||
*/
|
||||
/mob/living/carbon/human/proc/named_organ_parent(var/organ_name)
|
||||
if (!(organ_name in internal_organs_by_name))
|
||||
if (!get_int_organ(organ_name))
|
||||
return null
|
||||
var/obj/item/organ/O = internal_organs_by_name[organ_name]
|
||||
var/obj/item/organ/internal/O = get_int_organ(organ_name)
|
||||
return O.parent_organ
|
||||
@@ -111,7 +111,7 @@
|
||||
if(!. || !I)
|
||||
return
|
||||
|
||||
var/obj/item/organ/O = I //Organs shouldn't be removed unless you call droplimb.
|
||||
var/obj/item/organ/internal/O = I //Organs shouldn't be removed unless you call droplimb.
|
||||
if(istype(O) && O.owner == src)
|
||||
return
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(!(species.flags & RADIMMUNE))
|
||||
if (radiation)
|
||||
|
||||
if((locate(src.internal_organs_by_name["resonant crystal"]) in src.internal_organs))
|
||||
if(get_int_organ(/obj/item/organ/internal/nucleation/resonant_crystal))
|
||||
var/rads = radiation/25
|
||||
radiation -= rads
|
||||
radiation -= 0.1
|
||||
@@ -886,7 +886,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
//Vision //god knows why this is here
|
||||
var/obj/item/organ/vision
|
||||
if(species.vision_organ)
|
||||
vision = internal_organs_by_name[species.vision_organ]
|
||||
vision = get_int_organ(species.vision_organ)
|
||||
|
||||
if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
|
||||
eye_blind = 0
|
||||
@@ -1206,7 +1206,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
/mob/living/carbon/human/proc/handle_heartbeat()
|
||||
var/client/C = src.client
|
||||
if(C && C.prefs.sound & SOUND_HEARTBEAT) //disable heartbeat by pref
|
||||
var/obj/item/organ/heart/H = internal_organs_by_name["heart"]
|
||||
var/obj/item/organ/internal/heart/H = get_int_organ(/obj/item/organ/internal/heart)
|
||||
|
||||
if(!H) //H.status will runtime if there is no H (obviously)
|
||||
return
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
body_temperature = 286
|
||||
|
||||
has_organ = list(
|
||||
"heart" = /obj/item/organ/heart,
|
||||
"brain" = /obj/item/organ/brain,
|
||||
"eyes" = /obj/item/organ/eyes,
|
||||
"appendix" = /obj/item/organ/appendix,
|
||||
"antennae" = /obj/item/organ/wryn/hivenode
|
||||
"heart" = /obj/item/organ/internal/heart,
|
||||
"brain" = /obj/item/organ/internal/brain,
|
||||
"eyes" = /obj/item/organ/internal/eyes,
|
||||
"appendix" = /obj/item/organ/internal/appendix,
|
||||
"antennae" = /obj/item/organ/internal/wryn/hivenode
|
||||
)
|
||||
|
||||
flags = IS_WHITELISTED | HAS_LIPS | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
|
||||
@@ -49,14 +49,14 @@
|
||||
|
||||
/datum/species/wryn/handle_death(var/mob/living/carbon/human/H)
|
||||
for(var/mob/living/carbon/C in living_mob_list)
|
||||
if(locate(/obj/item/organ/wryn/hivenode) in C.internal_organs)
|
||||
if(C.get_int_organ(/obj/item/organ/internal/wryn/hivenode))
|
||||
C << "<span class='danger'><B>Your antennae tingle as you are overcome with pain...</B></span>"
|
||||
C << "<span class='danger'>It feels like part of you has died.</span>"
|
||||
|
||||
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
|
||||
if(M.a_intent == I_HARM)
|
||||
if(H.handcuffed)
|
||||
if(!(locate(H.internal_organs_by_name["antennae"]) in H.internal_organs)) return
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return
|
||||
var/turf/p_loc = M.loc
|
||||
var/turf/p_loc_m = H.loc
|
||||
|
||||
@@ -64,9 +64,10 @@
|
||||
H << "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>"
|
||||
do_after(H, 250, target = src)
|
||||
if(p_loc == M.loc && p_loc_m == H.loc)
|
||||
qdel(H.internal_organs_by_name["antennae"])
|
||||
var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode
|
||||
H.remove_language("Wryn Hivemind")
|
||||
new /obj/item/organ/wryn/hivenode(M.loc)
|
||||
node.remove(H)
|
||||
node.loc = M.loc
|
||||
M << "<span class='notice'>You hear a loud crunch as you mercilessly pull off [H]'s antennae.</span>"
|
||||
H << "<span class='danger'><B>You hear a loud crunch as your antennae is ripped off your head by [M].</span></B>"
|
||||
H << "<span class='danger'><span class='danger'><B>It's so quiet...</B></span>"
|
||||
@@ -98,12 +99,13 @@
|
||||
|
||||
reagent_tag = PROCESS_ORG
|
||||
has_organ = list(
|
||||
"heart" = /obj/item/organ/heart,
|
||||
"crystalized brain" = /obj/item/organ/brain/crystal,
|
||||
"eyes" = /obj/item/organ/eyes/luminescent_crystal,
|
||||
"strange crystal" = /obj/item/organ/nucleation/strange_crystal,
|
||||
"resonant crystal" = /obj/item/organ/nucleation/resonant_crystal
|
||||
"heart" = /obj/item/organ/internal/heart,
|
||||
"crystalized brain" = /obj/item/organ/internal/brain/crystal,
|
||||
"eyes" = /obj/item/organ/internal/eyes/luminescent_crystal,
|
||||
"strange crystal" = /obj/item/organ/internal/nucleation/strange_crystal,
|
||||
"resonant crystal" = /obj/item/organ/internal/nucleation/resonant_crystal
|
||||
)
|
||||
vision_organ = /obj/item/organ/internal/eyes/luminescent_crystal
|
||||
|
||||
/datum/species/nucleation/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.light_color = "#1C1C00"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
siemens_coeff = 0
|
||||
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/brain/golem
|
||||
"brain" = /obj/item/organ/internal/brain/golem
|
||||
)
|
||||
suicide_messages = list(
|
||||
"is crumbling into dust!",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
blood_color = "#CCCCCC"
|
||||
flesh_color = "#AAAAAA"
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/brain
|
||||
"brain" = /obj/item/organ/internal/brain
|
||||
)
|
||||
|
||||
flags = NO_BLOOD | NO_BREATHE | NO_SCAN
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"is collapsing into a pile!",
|
||||
"is twisting their skull off!")
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/brain/golem,
|
||||
"brain" = /obj/item/organ/internal/brain/golem,
|
||||
)
|
||||
|
||||
/datum/species/skeleton/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R)
|
||||
|
||||
@@ -105,13 +105,13 @@
|
||||
|
||||
// Determines the organs that the species spawns with and
|
||||
var/list/has_organ = list( // which required-organ checks are conducted.
|
||||
"heart" = /obj/item/organ/heart,
|
||||
"lungs" = /obj/item/organ/lungs,
|
||||
"liver" = /obj/item/organ/liver,
|
||||
"kidneys" = /obj/item/organ/kidneys,
|
||||
"brain" = /obj/item/organ/brain,
|
||||
"appendix" = /obj/item/organ/appendix,
|
||||
"eyes" = /obj/item/organ/eyes
|
||||
"heart" = /obj/item/organ/internal/heart,
|
||||
"lungs" = /obj/item/organ/internal/lungs,
|
||||
"liver" = /obj/item/organ/internal/liver,
|
||||
"kidneys" = /obj/item/organ/internal/kidneys,
|
||||
"brain" = /obj/item/organ/internal/brain,
|
||||
"appendix" = /obj/item/organ/internal/appendix,
|
||||
"eyes" = /obj/item/organ/internal/eyes
|
||||
)
|
||||
var/vision_organ // If set, this organ is required for vision. Defaults to "eyes" if the species has them.
|
||||
var/list/has_limbs = list(
|
||||
@@ -132,7 +132,7 @@
|
||||
/datum/species/New()
|
||||
//If the species has eyes, they are the default vision organ
|
||||
if(!vision_organ && has_organ["eyes"])
|
||||
vision_organ = "eyes"
|
||||
vision_organ = /obj/item/organ/internal/eyes
|
||||
|
||||
unarmed = new unarmed_type()
|
||||
|
||||
@@ -142,19 +142,21 @@
|
||||
|
||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||
|
||||
|
||||
for(var/obj/item/organ/internal/iorgan in H.internal_organs)
|
||||
if(iorgan in H.internal_organs)
|
||||
qdel(iorgan)
|
||||
|
||||
for(var/obj/item/organ/organ in H.contents)
|
||||
if((organ in H.organs) || (organ in H.internal_organs))
|
||||
if(organ in H.organs)
|
||||
qdel(organ)
|
||||
|
||||
if(H.organs) H.organs.Cut()
|
||||
if(H.internal_organs) H.internal_organs.Cut()
|
||||
if(H.organs_by_name) H.organs_by_name.Cut()
|
||||
if(H.internal_organs_by_name) H.internal_organs_by_name.Cut()
|
||||
|
||||
H.organs = list()
|
||||
H.internal_organs = list()
|
||||
H.organs_by_name = list()
|
||||
H.internal_organs_by_name = list()
|
||||
|
||||
for(var/limb_type in has_limbs)
|
||||
var/list/organ_data = has_limbs[limb_type]
|
||||
@@ -162,9 +164,12 @@
|
||||
var/obj/item/organ/O = new limb_path(H)
|
||||
organ_data["descriptor"] = O.name
|
||||
|
||||
for(var/organ in has_organ)
|
||||
var/organ_type = has_organ[organ]
|
||||
H.internal_organs_by_name[organ] = new organ_type(H,1)
|
||||
for(var/index in has_organ)
|
||||
var/organ = has_organ[index]
|
||||
H.internal_organs |= new organ(H)
|
||||
|
||||
for(var/obj/item/organ/internal/I in H.internal_organs)
|
||||
I.insert(H)
|
||||
|
||||
for(var/name in H.organs_by_name)
|
||||
H.organs |= H.organs_by_name[name]
|
||||
@@ -603,6 +608,7 @@
|
||||
Returns the path corresponding to the corresponding organ
|
||||
It'll return null if the organ doesn't correspond, so include null checks when using this!
|
||||
*/
|
||||
//Fethas Todo:Do i need to redo this?
|
||||
/datum/species/proc/return_organ(var/organ_slot)
|
||||
if(!(organ_slot in has_organ))
|
||||
return null
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
flesh_color = "#34AF10"
|
||||
reagent_tag = PROCESS_ORG
|
||||
base_color = "#066000"
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -106,7 +106,7 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -147,7 +147,7 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
flesh_color = "#966464"
|
||||
base_color = "#B43214"
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -231,7 +231,7 @@
|
||||
flesh_color = "#808D11"
|
||||
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -316,15 +316,15 @@
|
||||
icon_template = 'icons/mob/human_races/r_armalis.dmi'
|
||||
|
||||
has_organ = list(
|
||||
"heart" = /obj/item/organ/heart,
|
||||
"lungs" = /obj/item/organ/lungs,
|
||||
"liver" = /obj/item/organ/liver,
|
||||
"kidneys" = /obj/item/organ/kidneys,
|
||||
"brain" = /obj/item/organ/brain,
|
||||
"eyes" = /obj/item/organ/eyes,
|
||||
"stack" = /obj/item/organ/stack/vox
|
||||
"heart" = /obj/item/organ/internal/heart,
|
||||
"lungs" = /obj/item/organ/internal/lungs,
|
||||
"liver" = /obj/item/organ/internal/liver,
|
||||
"kidneys" = /obj/item/organ/internal/kidneys,
|
||||
"brain" = /obj/item/organ/internal/brain,
|
||||
"eyes" = /obj/item/organ/internal/eyes,
|
||||
"stack" = /obj/item/organ/internal/stack/vox
|
||||
)
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -350,7 +350,7 @@
|
||||
dietflags = DIET_HERB
|
||||
blood_color = "#FB9800"
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their antenna off!",
|
||||
"is jamming their claws into their eye sockets!",
|
||||
@@ -376,9 +376,9 @@
|
||||
//ventcrawler = 1 //ventcrawling commented out
|
||||
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/brain/slime
|
||||
"brain" = /obj/item/organ/internal/brain/slime
|
||||
)
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is melting into a puddle!",
|
||||
"is turning a dull, brown color and melting into a puddle!",
|
||||
@@ -462,12 +462,12 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
has_organ = list(
|
||||
"nutrient channel" = /obj/item/organ/diona/nutrients,
|
||||
"neural strata" = /obj/item/organ/diona/strata,
|
||||
"response node" = /obj/item/organ/diona/node,
|
||||
"gas bladder" = /obj/item/organ/diona/bladder,
|
||||
"polyp segment" = /obj/item/organ/diona/polyp,
|
||||
"anchoring ligament" = /obj/item/organ/diona/ligament
|
||||
"nutrient channel" = /obj/item/organ/internal/liver/diona,
|
||||
"neural strata" = /obj/item/organ/internal/heart/diona,
|
||||
"receptor node" = /obj/item/organ/internal/eyes/diona,
|
||||
"gas bladder" = /obj/item/organ/internal/brain/diona,
|
||||
"polyp segment" = /obj/item/organ/internal/kidneys/diona,
|
||||
"anchoring ligament" = /obj/item/organ/internal/appendix/diona
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
@@ -483,7 +483,7 @@
|
||||
"l_foot" = list("path" = /obj/item/organ/external/diona/foot),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/diona/foot/right)
|
||||
)
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is losing branches!",
|
||||
"is pulling themselves apart!",
|
||||
@@ -562,12 +562,12 @@
|
||||
reagent_tag = PROCESS_SYN
|
||||
|
||||
has_organ = list(
|
||||
"brain" = /obj/item/organ/mmi_holder/posibrain,
|
||||
"cell" = /obj/item/organ/cell,
|
||||
"optics" = /obj/item/organ/optical_sensor
|
||||
"brain" = /obj/item/organ/internal/brain/mmi_holder/posibrain,
|
||||
"cell" = /obj/item/organ/internal/cell,
|
||||
"optics" = /obj/item/organ/internal/optical_sensor
|
||||
)
|
||||
|
||||
vision_organ = "optics"
|
||||
vision_organ = /obj/item/organ/internal/optical_sensor
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/ipc),
|
||||
@@ -581,7 +581,7 @@
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/ipc),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
|
||||
)
|
||||
|
||||
|
||||
suicide_messages = list(
|
||||
"is powering down!",
|
||||
"is smashing their own monitor!",
|
||||
|
||||
@@ -250,7 +250,7 @@ var/global/list/damage_icon_parts = list()
|
||||
qdel(stand_icon)
|
||||
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
|
||||
var/icon_key = ""
|
||||
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
|
||||
if(eyes)
|
||||
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
|
||||
@@ -455,9 +455,12 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
//base icons
|
||||
var/icon/hair_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
|
||||
//var/icon/debrained_s = new /icon("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s")
|
||||
|
||||
if(h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
//if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN
|
||||
// hair_standing.Blend(debrained_s, ICON_OVERLAY)
|
||||
if(hair_style && hair_style.species_allowed)
|
||||
if(src.species.name in hair_style.species_allowed)
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
@@ -469,6 +472,7 @@ var/global/list/damage_icon_parts = list()
|
||||
hair_standing.Blend(hair_s, ICON_OVERLAY)
|
||||
else
|
||||
//warning("Invalid h_style for [species.name]: [h_style]")
|
||||
//hair_standing.Blend(debrained_s, ICON_OVERLAY)//how does i overlay for fish?
|
||||
|
||||
overlays_standing[HAIR_LAYER] = image(hair_standing)
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
if(..())
|
||||
. = 1
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
O.on_life()
|
||||
handle_changeling()
|
||||
|
||||
handle_wetness()
|
||||
@@ -470,6 +472,13 @@
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
|
||||
/mob/living/carbon/handle_actions()
|
||||
..()
|
||||
for(var/obj/item/I in internal_organs)
|
||||
give_action_button(I, 1)
|
||||
|
||||
|
||||
/mob/living/carbon/handle_hud_icons()
|
||||
return
|
||||
|
||||
|
||||
@@ -348,6 +348,12 @@
|
||||
step_away(src,M)
|
||||
|
||||
return
|
||||
else
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(M.a_intent == I_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(M, src))
|
||||
return 1
|
||||
|
||||
/*
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
@@ -481,6 +487,11 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
|
||||
if(stat == DEAD && surgeries.len)
|
||||
if(user.a_intent == I_HELP)
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
|
||||
if (user in Friends)
|
||||
++Friends[user]
|
||||
|
||||
@@ -231,32 +231,26 @@
|
||||
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)
|
||||
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/item_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
|
||||
if(!client) return
|
||||
|
||||
@@ -51,4 +51,6 @@
|
||||
var/last_played_vent
|
||||
|
||||
var/list/datum/action/actions = list()
|
||||
var/step_count = 0
|
||||
var/step_count = 0
|
||||
|
||||
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
|
||||
@@ -245,7 +245,7 @@
|
||||
user << "<span class='notice'>Internal prosthetics:</span>"
|
||||
organ_found = null
|
||||
if(H.internal_organs.len)
|
||||
for(var/obj/item/organ/O in H.internal_organs)
|
||||
for(var/obj/item/organ/internal/O in H.internal_organs)
|
||||
if(!(O.status & ORGAN_ROBOT))
|
||||
continue
|
||||
organ_found = 1
|
||||
|
||||
@@ -268,24 +268,38 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/death()
|
||||
if(stat != DEAD)
|
||||
new /obj/item/asteroid/hivelord_core(src.loc)
|
||||
new /obj/item/organ/internal/hivelord_core(src.loc)
|
||||
..()
|
||||
|
||||
/obj/item/asteroid/hivelord_core
|
||||
/obj/item/organ/internal/hivelord_core
|
||||
name = "hivelord remains"
|
||||
desc = "All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating."
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = "boiledrorocore"
|
||||
slot = "hivecore"
|
||||
var/inert = 0
|
||||
var/preserved = 0
|
||||
|
||||
/obj/item/asteroid/hivelord_core/New()
|
||||
/obj/item/organ/internal/hivelord_core/New()
|
||||
spawn(2400)
|
||||
if(!preserved)
|
||||
inert = 1
|
||||
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
|
||||
|
||||
/obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
/obj/item/organ/internal/hivelord_core/on_life()
|
||||
..()
|
||||
if(owner)
|
||||
owner.adjustBruteLoss(-1)
|
||||
owner.adjustFireLoss(-1)
|
||||
owner.adjustOxyLoss(-2)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/datum/reagent/blood/B = locate() in H.vessel.reagent_list //Grab some blood
|
||||
var/blood_volume = round(H.vessel.get_reagent_amount("blood"))
|
||||
if(B && blood_volume < H.max_blood && blood_volume)
|
||||
B.volume += 2 // Fast blood regen
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(inert)
|
||||
@@ -304,6 +318,9 @@
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/prepare_eat()
|
||||
return null
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood
|
||||
name = "hivelord brood"
|
||||
desc = "A fragment of the original Hivelord, rallying behind its original. One isn't much of a threat, but..."
|
||||
|
||||
@@ -239,3 +239,5 @@
|
||||
var/resize = 1 //Badminnery resize
|
||||
|
||||
var/datum/vision_override/vision_type = null //Vision override datum.
|
||||
|
||||
var/list/permanent_huds = list()
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Pressed fingers into the eyes of [affecting.name] ([affecting.ckey])</font>")
|
||||
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had fingers pressed into their eyes by [assailant.name] ([assailant.ckey])</font>")
|
||||
msg_admin_attack("[key_name(assailant)] has pressed his fingers into [key_name(affecting)]'s eyes.")
|
||||
var/obj/item/organ/eyes/eyes = affected.internal_organs_by_name["eyes"]
|
||||
var/obj/item/organ/internal/eyes/eyes = affected.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
eyes.damage += rand(3,4)
|
||||
if (eyes.damage >= eyes.min_broken_damage)
|
||||
if(M.stat != 2)
|
||||
|
||||
@@ -38,7 +38,7 @@ proc/isfacehugger(A)
|
||||
return 0
|
||||
|
||||
proc/isembryo(A)
|
||||
if(istype(A, /obj/item/alien_embryo))
|
||||
if(istype(A, /obj/item/organ/internal/body_egg/alien_embryo))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -167,7 +167,7 @@ proc/isovermind(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isorgan(A)
|
||||
/proc/isorgan(A)
|
||||
if(istype(A, /obj/item/organ/external))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user