diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 1c00feff64c..aaca5674ed5 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -324,8 +324,11 @@ Grow() -/obj/structure/alien/egg/attack_paw(mob/user) - if(isalien(user)) +/obj/structure/alien/egg/attack_paw(mob/living/user) + return attack_hand(user) + +/obj/structure/alien/egg/attack_hand(mob/living/user) + if(user.getorgan(/obj/item/organ/internal/alien/plasmavessel)) switch(status) if(BURST) user << "You clear the hatched egg." @@ -340,18 +343,13 @@ Burst(0) return else - return attack_hand(user) - - -/obj/structure/alien/egg/attack_hand(mob/user) - user << "It feels slimy." - user.changeNext_move(CLICK_CD_MELEE) + user << "It feels slimy." + user.changeNext_move(CLICK_CD_MELEE) /obj/structure/alien/egg/proc/GetFacehugger() return locate(/obj/item/clothing/mask/facehugger) in contents - /obj/structure/alien/egg/proc/Grow() icon_state = "egg" status = GROWN diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index 6f96e87bdbb..1f83bdc4ae5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -15,9 +15,15 @@ nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2) return ..() -/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user) +/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/living/user) if(buckled_mob && buckled_mob.buckled == src) var/mob/living/M = buckled_mob + + if(user.getorgan(/obj/item/organ/internal/alien/plasmavessel)) + unbuckle_mob() + add_fingerprint(user) + return + if(M != user) M.visible_message(\ "[user.name] pulls [M.name] free from the sticky nest!",\ @@ -42,13 +48,13 @@ unbuckle_mob() add_fingerprint(user) -/obj/structure/stool/bed/nest/user_buckle_mob(mob/M, mob/user) +/obj/structure/stool/bed/nest/user_buckle_mob(mob/living/M, mob/living/user) if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) return - if(istype(M,/mob/living/carbon/alien)) + if(M.getorgan(/obj/item/organ/internal/alien/plasmavessel)) return - if(!istype(user,/mob/living/carbon/alien/humanoid)) + if(!user.getorgan(/obj/item/organ/internal/alien/plasmavessel)) return unbuckle_mob() diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 529c9c4ad60..e2adcf9323b 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -14,38 +14,31 @@ verb_say = "hisses" type_of_meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno var/nightvision = 1 - var/storedPlasma = 250 - var/max_plasma = 500 var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = 0 - var/move_delay_add = 0 // movement delay to add status_flags = CANPARALYSE|CANPUSH - var/heal_rate = 5 - var/plasma_rate = 5 var/heat_protection = 0.5 var/leaping = 0 - var/list/obj/effect/proc_holder/alien/abilities = list() gib_type = /obj/effect/decal/cleanable/xenoblood/xgibs + unique_name = 1 /mob/living/carbon/alien/New() verbs += /mob/living/proc/mob_sleep verbs += /mob/living/proc/lay_down internal_organs += new /obj/item/organ/internal/brain/alien + internal_organs += new /obj/item/organ/internal/alien/hivenode for(var/obj/item/organ/internal/I in internal_organs) I.Insert(src) - AddAbility(new/obj/effect/proc_holder/alien/nightvisiontoggle(null)) ..() /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 @@ -55,9 +48,6 @@ ..(amount) return -/mob/living/carbon/alien/proc/getPlasma() - return storedPlasma - /mob/living/carbon/alien/check_eye_prot() return ..() + 2 @@ -65,16 +55,6 @@ return 0 /mob/living/carbon/alien/handle_environment(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 @@ -149,27 +129,6 @@ if(statpanel("Status")) stat(null, "Intent: [a_intent]") stat(null, "Move Mode: [m_intent]") - stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]") - - add_abilities_to_panel() - -/mob/living/carbon/alien/proc/AddAbility(obj/effect/proc_holder/alien/A) - abilities.Add(A) - A.on_gain(src) - if(A.has_action) - if(!A.action) - A.action = new/datum/action/spell_action/alien - A.action.target = A - A.action.name = A.name - A.action.button_icon = A.action_icon - A.action.button_icon_state = A.action_icon_state - A.action.background_icon_state = A.action_background_icon_state - A.action.Grant(src) - - -/mob/living/carbon/alien/proc/add_abilities_to_panel() - for(var/obj/effect/proc_holder/alien/A in abilities) - statpanel("[A.panel]",A.plasma_cost > 0?"([A.plasma_cost])":"",A) /mob/living/carbon/alien/Stun(amount) if(status_flags & CANSTUN) @@ -190,7 +149,7 @@ 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/organ/internal/body_egg/alien_embryo/A = locate() in C + var/obj/item/organ/internal/body_egg/alien_embryo/A = getorgan(/obj/item/organ/internal/body_egg/alien_embryo) var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]") client.images += I return diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 7d255e2116b..9563f37edcd 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -24,7 +24,14 @@ Doesn't work on other aliens/AI.*/ return 1 /datum/action/spell_action/alien/CheckRemoval() - return !isalien(owner) + if(!iscarbon(owner)) + return 1 + + var/mob/living/carbon/C = owner + if(target.loc && !(target.loc in C.internal_organs)) + return 1 + + return 0 /obj/effect/proc_holder/alien @@ -40,21 +47,24 @@ Doesn't work on other aliens/AI.*/ var/action_background_icon_state = "bg_alien" /obj/effect/proc_holder/alien/Click() - if(!istype(usr,/mob/living/carbon/alien)) + if(!istype(usr,/mob/living/carbon)) return 1 - var/mob/living/carbon/alien/user = usr + var/mob/living/carbon/user = usr if(cost_check(check_turf,user)) if(fire(user) && user) // Second check to prevent runtimes when evolving - user.adjustToxLoss(-plasma_cost) + user.adjustPlasma(-plasma_cost) return 1 -/obj/effect/proc_holder/alien/proc/on_gain(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/proc/on_gain(mob/living/carbon/user) return -/obj/effect/proc_holder/alien/proc/fire(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/proc/on_lose(mob/living/carbon/user) + return + +/obj/effect/proc_holder/alien/proc/fire(mob/living/carbon/user) return 1 -/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,mob/living/carbon/alien/user,silent = 0) +/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,mob/living/carbon/user,silent = 0) if(user.stat) if(!silent) user << "You must be conscious to do this." @@ -74,10 +84,9 @@ Doesn't work on other aliens/AI.*/ desc = "Plants some alien weeds" plasma_cost = 50 check_turf = 1 - action_icon_state = "alien_plant" -/obj/effect/proc_holder/alien/plant/fire(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/plant/fire(mob/living/carbon/user) if(locate(/obj/structure/alien/weeds/node) in get_turf(user)) src << "There's already a weed node here." return 0 @@ -90,10 +99,9 @@ Doesn't work on other aliens/AI.*/ name = "Whisper" desc = "Whisper to someone" plasma_cost = 10 - action_icon_state = "alien_whisper" -/obj/effect/proc_holder/alien/whisper/fire(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/whisper/fire(mob/living/carbon/user) var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as mob in oview(user) if(!M) return 0 @@ -110,41 +118,41 @@ Doesn't work on other aliens/AI.*/ name = "Transfer Plasma" desc = "Transfer Plasma to another alien" plasma_cost = 0 - action_icon_state = "alien_transfer" -/obj/effect/proc_holder/alien/transfer/fire(mob/living/carbon/alien/user) - var/list/mob/living/carbon/alien/aliens_around = list() - for(var/mob/living/carbon/alien/A in oview(user)) - aliens_around.Add(A) - var/mob/living/carbon/alien/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around +/obj/effect/proc_holder/alien/transfer/fire(mob/living/carbon/user) + var/list/mob/living/carbon/aliens_around = list() + for(var/mob/living/carbon/A in oview(user)) + if(A.getorgan(/obj/item/organ/internal/alien/plasmavessel)) + aliens_around.Add(A) + var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around if(!M) return 0 - if(isalien(M)) - var/amount = input("Amount:", "Transfer Plasma to [M]") as num - if (amount) - amount = abs(round(amount)) - if(user.getPlasma() > amount) - if (get_dist(user,M) <= 1) - M.adjustToxLoss(amount) - user.adjustToxLoss(-amount) - M << "[user] has transfered [amount] plasma to you." - user << {"You trasfer [amount] plasma to [M]"} - else - user << "You need to be closer!" + var/amount = input("Amount:", "Transfer Plasma to [M]") as num + if (amount) + amount = min(abs(round(amount)), user.getPlasma()) + if (get_dist(user,M) <= 1) + M.adjustPlasma(amount) + user.adjustPlasma(-amount) + M << "[user] has transfered [amount] plasma to you." + user << {"You trasfer [amount] plasma to [M]"} + else + user << "You need to be closer!" return /obj/effect/proc_holder/alien/acid name = "Corrossive Acid" desc = "Drench an object in acid, destroying it over time." plasma_cost = 200 - action_icon_state = "alien_acid" -/obj/effect/proc_holder/alien/acid/on_gain(mob/living/carbon/alien/user) - user.verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid) +/obj/effect/proc_holder/alien/acid/on_gain(mob/living/carbon/user) + user.verbs.Add(/mob/living/carbon/proc/corrosive_acid) -/obj/effect/proc_holder/alien/acid/proc/corrode(target,mob/living/carbon/alien/user = usr) +/obj/effect/proc_holder/alien/acid/on_lose(mob/living/carbon/user) + user.verbs.Remove(/mob/living/carbon/proc/corrosive_acid) + +/obj/effect/proc_holder/alien/acid/proc/corrode(target,mob/living/carbon/user = usr) if(target in oview(1,user)) // OBJ CHECK if(isobj(target)) @@ -175,28 +183,25 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/acid/fire(mob/living/carbon/alien/user) var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user) - if(!O) - return 0 + if(!O) return 0 return corrode(O,user) -/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) // right click menu verb ugh +/mob/living/carbon/proc/corrosive_acid(O as obj|turf in oview(1)) // right click menu verb ugh set name = "Corrossive Acid" - if(!isalien(usr)) + if(!iscarbon(usr)) return - var/mob/living/carbon/alien/humanoid/user = usr + var/mob/living/carbon/user = usr var/obj/effect/proc_holder/alien/acid/A = locate() in user.abilities - if(!A) - return + if(!A) return if(user.getPlasma() > A.plasma_cost && A.corrode(O)) - user.adjustToxLoss(-A.plasma_cost) + user.adjustPlasma(-A.plasma_cost) /obj/effect/proc_holder/alien/neurotoxin name = "Spit Neurotoxin" desc = "Spits neurotoxin at someone, paralyzing them for a short time." plasma_cost = 50 - action_icon_state = "alien_neurotoxin" /obj/effect/proc_holder/alien/neurotoxin/fire(mob/living/carbon/alien/user) @@ -221,38 +226,34 @@ Doesn't work on other aliens/AI.*/ desc = "Secrete tough malleable resin." plasma_cost = 55 check_turf = 1 + var/list/structures = list( + "resin wall" = /obj/structure/alien/resin/wall, + "resin membrane" = /obj/structure/alien/resin/membrane, + "resin nest" = /obj/structure/stool/bed/nest) action_icon_state = "alien_resin" -/obj/effect/proc_holder/alien/resin/fire(mob/living/carbon/alien/user) - if(locate(/obj/structure/alien/resin) in user.loc.contents) +/obj/effect/proc_holder/alien/resin/fire(mob/living/carbon/user) + if(locate(/obj/structure/alien/resin) in user.loc) user << "There is already a resin structure there." return 0 - 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) - return 0 + var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures + if(!choice) return 0 user << "You shape a [choice]." user.visible_message("[user] vomits up a thick purple substance and begins to shape it.") - switch(choice) - if("resin wall") - new /obj/structure/alien/resin/wall(user.loc) - if("resin membrane") - new /obj/structure/alien/resin/membrane(user.loc) - if("resin nest") - new /obj/structure/stool/bed/nest(user.loc) + choice = structures[choice] + new choice(user.loc) return 1 /obj/effect/proc_holder/alien/regurgitate name = "Regurgitate" desc = "Empties the contents of your stomach" plasma_cost = 0 - action_icon_state = "alien_barf" -/obj/effect/proc_holder/alien/regurgitate/fire(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/regurgitate/fire(mob/living/carbon/user) if(user.stomach_contents.len) for(var/atom/movable/A in user.stomach_contents) user.stomach_contents.Remove(A) @@ -265,11 +266,9 @@ Doesn't work on other aliens/AI.*/ name = "Toggle Night Vision" desc = "Toggles Night Vision" plasma_cost = 0 - has_action = 0 // Has dedicated GUI button already /obj/effect/proc_holder/alien/nightvisiontoggle/fire(mob/living/carbon/alien/user) - if(!user.nightvision) user.see_in_dark = 8 user.see_invisible = SEE_INVISIBLE_MINIMUM @@ -283,3 +282,32 @@ Doesn't work on other aliens/AI.*/ return 1 + + +/mob/living/carbon/proc/getPlasma() + var/obj/item/organ/internal/alien/plasmavessel/vessel = getorgan(/obj/item/organ/internal/alien/plasmavessel) + if(!vessel) return 0 + return vessel.storedPlasma + + +/mob/living/carbon/proc/adjustPlasma(amount) + var/obj/item/organ/internal/alien/plasmavessel/vessel = getorgan(/obj/item/organ/internal/alien/plasmavessel) + if(!vessel) return 0 + vessel.storedPlasma = max(vessel.storedPlasma + amount,0) + vessel.storedPlasma = min(vessel.storedPlasma, 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 + + +/proc/cmp_abilities_cost(obj/effect/proc_holder/alien/a, obj/effect/proc_holder/alien/b) + return b.plasma_cost - a.plasma_cost \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm index 2e3a40ff237..a9c09a49ef2 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm @@ -4,21 +4,15 @@ maxHealth = 100 health = 100 icon_state = "aliend_s" - plasma_rate = 15 /mob/living/carbon/alien/humanoid/drone/New() - create_reagents(100) - if(src.name == "alien drone") - src.name = text("alien drone ([rand(1, 1000)])") - src.real_name = src.name + internal_organs += new /obj/item/organ/internal/alien/plasmavessel/large + internal_organs += new /obj/item/organ/internal/alien/resinspinner + internal_organs += new /obj/item/organ/internal/alien/acid - AddAbility(new/obj/effect/proc_holder/alien/resin(null)) - AddAbility(new/obj/effect/proc_holder/alien/acid(null)) AddAbility(new/obj/effect/proc_holder/alien/evolve(null)) - ..() -//Drones use the same base as generic humanoids. /mob/living/carbon/alien/humanoid/drone/movement_delay() . = ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index dd900163da0..f4e62fdaf7c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -3,16 +3,10 @@ caste = "h" maxHealth = 150 health = 150 - storedPlasma = 100 - max_plasma = 150 icon_state = "alienh_s" - plasma_rate = 5 /mob/living/carbon/alien/humanoid/hunter/New() - create_reagents(100) - if(name == "alien hunter") - name = text("alien hunter ([rand(1, 1000)])") - real_name = name + internal_organs += new /obj/item/organ/internal/alien/plasmavessel/small ..() /mob/living/carbon/alien/humanoid/hunter/handle_hud_icons_health() diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index ecd8a193a33..9194dafe2b6 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -3,21 +3,13 @@ caste = "s" maxHealth = 125 health = 125 - storedPlasma = 100 - max_plasma = 250 icon_state = "aliens_s" - plasma_rate = 10 /mob/living/carbon/alien/humanoid/sentinel/New() - create_reagents(100) - if(name == "alien sentinel") - name = text("alien sentinel ([rand(1, 1000)])") - real_name = name - - AddAbility(new/obj/effect/proc_holder/alien/acid(null)) - AddAbility(new/obj/effect/proc_holder/alien/neurotoxin(null)) - + internal_organs += new /obj/item/organ/internal/alien/plasmavessel + internal_organs += new /obj/item/organ/internal/alien/acid + internal_organs += new /obj/item/organ/internal/alien/neurotoxin ..() /mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 4c27150e481..a3e1ff31665 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -1,6 +1,7 @@ /mob/living/carbon/alien/humanoid name = "alien" icon_state = "alien_s" + pass_flags = PASSTABLE var/obj/item/r_store = null var/obj/item/l_store = null var/caste = "" @@ -14,23 +15,14 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/humanoid/New() create_reagents(1000) - if(name == "alien") - name = text("alien ([rand(1, 1000)])") - real_name = name - - AddAbility(new/obj/effect/proc_holder/alien/plant(null)) - AddAbility(new/obj/effect/proc_holder/alien/whisper(null)) - AddAbility(new/obj/effect/proc_holder/alien/transfer(null)) AddAbility(new/obj/effect/proc_holder/alien/regurgitate(null)) - ..() + /mob/living/carbon/alien/humanoid/movement_delay() . = ..() . += move_delay_add + config.alien_delay //move_delay_add is used to slow aliens with stuns -///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living - /mob/living/carbon/alien/humanoid/emp_act(severity) if(r_store) r_store.emp_act(severity) if(l_store) l_store.emp_act(severity) @@ -147,5 +139,5 @@ /mob/living/carbon/alien/humanoid/check_ear_prot() return 1 -/mob/living/carbon/alien/carbon/alien/humanoid/get_permeability_protection() +/mob/living/carbon/alien/humanoid/get_permeability_protection() return 0.8 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index ea2d5f9164b..017facc71b1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -1,9 +1,5 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -/mob/living/carbon/alien/humanoid - pass_flags = PASSTABLE - - /mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost) var/temperature = current var/difference = abs(current-loc_temp) //get difference @@ -20,5 +16,3 @@ temperature = max(loc_temp, temperature-change) temp_change = (temperature - current) return temp_change - - diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 90e2fd474c8..03745eb7306 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -5,9 +5,8 @@ health = 250 icon_state = "alienq_s" status_flags = CANPARALYSE - heal_rate = 5 - plasma_rate = 20 ventcrawler = 0 //pull over that ass too fat + unique_name = 0 /mob/living/carbon/alien/humanoid/queen/New() @@ -23,10 +22,11 @@ real_name = src.name - AddAbility(new/obj/effect/proc_holder/alien/acid(null)) - AddAbility(new/obj/effect/proc_holder/alien/neurotoxin(null)) - AddAbility(new/obj/effect/proc_holder/alien/resin(null)) - AddAbility(new/obj/effect/proc_holder/alien/lay_egg(null)) + internal_organs += new /obj/item/organ/internal/alien/plasmavessel/large/queen + internal_organs += new /obj/item/organ/internal/alien/resinspinner + internal_organs += new /obj/item/organ/internal/alien/acid + internal_organs += new /obj/item/organ/internal/alien/neurotoxin + internal_organs += new /obj/item/organ/internal/alien/eggsac ..() @@ -62,10 +62,9 @@ desc = "Lay an egg to produce huggers to impregnate prey with." plasma_cost = 75 check_turf = 1 - action_icon_state = "alien_egg" -/obj/effect/proc_holder/alien/lay_egg/fire(mob/living/carbon/alien/user) +/obj/effect/proc_holder/alien/lay_egg/fire(mob/living/carbon/user) if(locate(/obj/structure/alien/egg) in get_turf(user)) user << "There's already an egg here." return 0 diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index d1b46a70481..4d8959849c6 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -8,8 +8,6 @@ maxHealth = 25 health = 25 - storedPlasma = 50 - max_plasma = 50 var/amount_grown = 0 var/max_grown = 200 @@ -17,11 +15,9 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/larva/New() - create_reagents(100) - if(name == "alien larva") - name = "alien larva ([rand(1, 1000)])" - real_name = name regenerate_icons() + internal_organs += new /obj/item/organ/internal/alien/plasmavessel/small/tiny + AddAbility(new/obj/effect/proc_holder/alien/hide(null)) AddAbility(new/obj/effect/proc_holder/alien/larva_evolve(null)) ..() @@ -32,8 +28,8 @@ if(statpanel("Status")) 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) diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index f081e566f3a..04358675e9e 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -14,8 +14,7 @@ var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure if(Toxins_pp) // Detect toxins in air - - adjustToxLoss(breath.toxins*250) + adjustPlasma(breath.toxins*250) throw_alert("alien_tox") toxins_used = breath.toxins @@ -37,7 +36,6 @@ move_delay_add = max(0, move_delay_add - rand(1, 2)) /mob/living/carbon/alien/update_sight() - if(stat == DEAD) sight |= SEE_TURFS sight |= SEE_MOBS diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm new file mode 100644 index 00000000000..b7db238a99a --- /dev/null +++ b/code/modules/mob/living/carbon/alien/organs.dm @@ -0,0 +1,146 @@ +/obj/item/organ/internal/alien + origin_tech = "biotech=5" + icon = 'icons/effects/blood.dmi' + icon_state = "xgibmid2" + var/list/alien_powers = list() + +/obj/item/organ/internal/alien/New() + for(var/A in alien_powers) + if(ispath(A)) + alien_powers -= A + alien_powers += new A(src) + ..() + +/obj/item/organ/internal/alien/Insert(mob/living/carbon/M, special = 0) + ..() + for(var/obj/effect/proc_holder/alien/P in alien_powers) + M.AddAbility(P) + + +/obj/item/organ/internal/alien/Remove(mob/living/carbon/M, special = 0) + for(var/obj/effect/proc_holder/alien/P in alien_powers) + M.RemoveAbility(P) + ..() + +/obj/item/organ/internal/alien/prepare_eat() + var/obj/S = ..() + S.reagents.add_reagent("sacid", 10) + return S + + +/obj/item/organ/internal/alien/plasmavessel + name = "plasma vessel" + origin_tech = "biotech=5;plasma=2" + w_class = 3 + zone = "chest" + slot = "plasmavessel" + alien_powers = list(/obj/effect/proc_holder/alien/plant, /obj/effect/proc_holder/alien/transfer) + + var/storedPlasma = 100 + var/max_plasma = 250 + var/heal_rate = 5 + var/plasma_rate = 10 + +/obj/item/organ/internal/alien/plasmavessel/prepare_eat() + var/obj/S = ..() + S.reagents.add_reagent("plasma", storedPlasma/10) + return S + +/obj/item/organ/internal/alien/plasmavessel/large + name = "large plasma vessel" + w_class = 4 + storedPlasma = 200 + max_plasma = 500 + plasma_rate = 15 + +/obj/item/organ/internal/alien/plasmavessel/large/queen + origin_tech = "biotech=6;plasma=3" + plasma_rate = 20 + +/obj/item/organ/internal/alien/plasmavessel/small + name = "small plasma vessel" + w_class = 2 + storedPlasma = 100 + max_plasma = 150 + plasma_rate = 5 + +/obj/item/organ/internal/alien/plasmavessel/small/tiny + name = "tiny plasma vessel" + w_class = 1 + max_plasma = 100 + alien_powers = list(/obj/effect/proc_holder/alien/transfer) + +/obj/item/organ/internal/alien/plasmavessel/on_life() + //If there are alien weeds on the ground then heal if needed or give some plasma + if(locate(/obj/structure/alien/weeds) in owner.loc) + if(owner.health >= owner.maxHealth - owner.getCloneLoss()) + owner.adjustPlasma(plasma_rate) + else + var/mod = 1 + if(!isalien(owner)) + mod = 0.2 + owner.adjustBruteLoss(-heal_rate*mod) + owner.adjustFireLoss(-heal_rate*mod) + owner.adjustOxyLoss(-heal_rate*mod) + +/obj/item/organ/internal/alien/plasmavessel/Insert(mob/living/carbon/M, special = 0) + ..() + if(isalien(M)) + var/mob/living/carbon/alien/A = M + A.updatePlasmaDisplay() + +/obj/item/organ/internal/alien/plasmavessel/Remove(mob/living/carbon/M, special = 0) + ..() + if(isalien(M)) + var/mob/living/carbon/alien/A = M + A.updatePlasmaDisplay() + + +/obj/item/organ/internal/alien/hivenode + name = "hive node" + zone = "head" + slot = "hivenode" + origin_tech = "biotech=5;magnets=4;bluespace=3" + w_class = 1 + alien_powers = list(/obj/effect/proc_holder/alien/whisper) + +/obj/item/organ/internal/alien/hivenode/Insert(mob/living/carbon/M, special = 0) + ..() + M.faction |= "alien" + +/obj/item/organ/internal/alien/hivenode/Remove(mob/living/carbon/M, special = 0) + M.faction -= "alien" + ..() + + +/obj/item/organ/internal/alien/resinspinner + name = "resin spinner" + zone = "mouth" + slot = "resinspinner" + origin_tech = "biotech=5;materials=4" + alien_powers = list(/obj/effect/proc_holder/alien/resin) + + +/obj/item/organ/internal/alien/acid + name = "acid gland" + zone = "mouth" + slot = "acidgland" + origin_tech = "biotech=5;materials=2;combat=2" + alien_powers = list(/obj/effect/proc_holder/alien/acid) + + +/obj/item/organ/internal/alien/neurotoxin + name = "neurotoxin gland" + zone = "mouth" + slot = "neurotoxingland" + origin_tech = "biotech=5;combat=5" + alien_powers = list(/obj/effect/proc_holder/alien/neurotoxin) + + +/obj/item/organ/internal/alien/eggsac + name = "egg sac" + zone = "groin" + slot = "eggsac" + w_class = 4 + origin_tech = "biotech=8" + alien_powers = list(/obj/effect/proc_holder/alien/lay_egg) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/say.dm b/code/modules/mob/living/carbon/alien/say.dm index 03aea6db380..a674add3ff1 100644 --- a/code/modules/mob/living/carbon/alien/say.dm +++ b/code/modules/mob/living/carbon/alien/say.dm @@ -6,23 +6,13 @@ /mob/living/proc/alien_talk(message) log_say("[key_name(src)] : [message]") message = trim(message) - - if (!message) - return + if(!message) return var/message_a = say_quote(message) var/rendered = "Hivemind, [name] " for(var/mob/S in player_list) - if((!S.stat && (S.hivecheck())) || (S in dead_mob_list)) + if((!S.stat && S.hivecheck()) || (S in dead_mob_list)) S << rendered -/mob/living/carbon/alien/handle_inherent_channels(message, message_mode) - if(!..()) - if(message_mode == MODE_ALIEN) - if(hivecheck()) - alien_talk(message) - return 1 - return 0 - -/mob/living/carbon/alien/hivecheck() - return 1 +/mob/living/carbon/hivecheck() + return getorgan(/obj/item/organ/internal/alien/hivenode) diff --git a/code/modules/mob/living/carbon/alien/screen.dm b/code/modules/mob/living/carbon/alien/screen.dm index 43a98198a02..616f681538a 100644 --- a/code/modules/mob/living/carbon/alien/screen.dm +++ b/code/modules/mob/living/carbon/alien/screen.dm @@ -4,7 +4,7 @@ /mob/living/carbon/alien/proc/updatePlasmaDisplay() if(hud_used) //clientless aliens - hud_used.alien_plasma_display.maptext = "