diff --git a/baystation12.dme b/baystation12.dme index 6b5a935141..2b31f2fb17 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -949,7 +949,9 @@ #include "code\modules\mob\living\carbon\alien\diona\life.dm" #include "code\modules\mob\living\carbon\alien\diona\progression.dm" #include "code\modules\mob\living\carbon\alien\diona\say_understands.dm" +#include "code\modules\mob\living\carbon\alien\diona\update_icons.dm" #include "code\modules\mob\living\carbon\alien\larva\larva.dm" +#include "code\modules\mob\living\carbon\alien\larva\life.dm" #include "code\modules\mob\living\carbon\alien\larva\progression.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" #include "code\modules\mob\living\carbon\brain\brain_item.dm" diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index b2a85e2076..5037353ff1 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -35,6 +35,12 @@ mymob.flash.screen_loc = "1,1 to 15,15" mymob.flash.layer = 17 + mymob.fire = new /obj/screen() + mymob.fire.icon = 'icons/mob/screen1_alien.dmi' + mymob.fire.icon_state = "fire0" + mymob.fire.name = "fire" + mymob.fire.screen_loc = ui_fire + mymob.client.screen = null - mymob.client.screen += list( mymob.healths, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach ) + mymob.client.screen += list( mymob.healths, mymob.blind, mymob.flash, mymob.fire) //, mymob.rest, mymob.sleep, mymob.mach ) mymob.client.screen += src.adding + src.other \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/update_icons.dm b/code/modules/mob/living/carbon/alien/diona/update_icons.dm new file mode 100644 index 0000000000..b39972cdad --- /dev/null +++ b/code/modules/mob/living/carbon/alien/diona/update_icons.dm @@ -0,0 +1,8 @@ +/mob/living/carbon/alien/diona/update_icons() + + if(stat == DEAD) + icon_state = "[initial(icon_state)]_dead" + else if(lying || resting || stunned) + icon_state = "[initial(icon_state)]_sleep" + else + icon_state = "[initial(icon_state)]" diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index c5dddfd7ac..8d40ef9d5a 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -1,12 +1,10 @@ //Larvae regenerate health and nutrition from plasma and alien weeds. -/mob/living/carbon/alien/larva/handle_environment() +/mob/living/carbon/alien/larva/handle_environment(var/datum/gas_mixture/environment) - var/turf/T = loc - if(!T) return - var/datum/gas_mixture/environment = T.return_air() if(!environment) return - if(environment.gas["phoron"] > 0 || locate(/obj/effect/alien/weeds) in T.contents) + var/turf/T = get_turf(src) + if(environment.gas["phoron"] > 0 || (T && locate(/obj/effect/alien/weeds) in T.contents)) update_progression() adjustBruteLoss(-1) adjustFireLoss(-1) diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 9ddce0c549..7a51069fe8 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -22,7 +22,8 @@ blinded = null - handle_environment() + if(loc) + handle_environment(loc.return_air()) //Status updates, death etc. handle_regular_status_updates() @@ -36,6 +37,7 @@ return // Nothing yet. Maybe check it out at a later date. /mob/living/carbon/alien/proc/handle_mutations_and_radiation() + // Currently both Dionaea and larvae like to eat radiation, so I'm defining the // rad absorbtion here. This will need to be changed if other baby aliens are added. @@ -85,7 +87,6 @@ if(halloss > 0) adjustHalLoss(-3) - //CONSCIOUS else stat = CONSCIOUS if(halloss > 0) @@ -109,6 +110,8 @@ ear_deaf = max(ear_deaf-1, 0) ear_damage = max(ear_damage-0.05, 0) + update_icons() + return 1 /mob/living/carbon/alien/proc/handle_regular_hud_updates() @@ -174,7 +177,15 @@ return 1 -/mob/living/carbon/alien/proc/handle_environment(datum/gas_mixture/environment) - // At the moment, neither of the alien species breathe or suffer from pressure. - // TODO: Implement heat and phoron exposure checks. - return \ No newline at end of file +/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment) + // Both alien subtypes survive in vaccum and suffer in high temperatures, + // so I'll just define this once, for both (see radiation comment above) + if(!environment) return + + if(environment.temperature > (T0C+66)) + adjustFireLoss((environment.temperature - (T0C+66))/5) // Might be too high, check in testing. + if (fire) fire.icon_state = "fire2" + if(prob(20)) + src << "\red You feel a searing heat!" + else + if (fire) fire.icon_state = "fire0" diff --git a/code/modules/mob/living/carbon/alien/update_icons.dm b/code/modules/mob/living/carbon/alien/update_icons.dm index 794078a3b3..7bb90a4d9e 100644 --- a/code/modules/mob/living/carbon/alien/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/update_icons.dm @@ -12,8 +12,6 @@ if(stat == DEAD) icon_state = "[initial(icon_state)][state]_dead" - else if (handcuffed || legcuffed) - icon_state = "[initial(icon_state)][state]_cuff" else if (stunned) icon_state = "[initial(icon_state)][state]_stun" else if(lying || resting) diff --git a/icons/mob/alien.dmi b/icons/mob/alien.dmi index 24b09492de..2f31429878 100644 Binary files a/icons/mob/alien.dmi and b/icons/mob/alien.dmi differ