diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 98b99d0a1d3..2c9eac69a0f 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -114,6 +114,11 @@ #define ui_borg_health "16:28,6:13" //borgs have the health display where humans have the pressure damage indicator. #define ui_alien_health "16:28,6:13" //aliens have the health display where humans have the pressure damage indicator. +#define ui_construct_health "15:00,7:15" //same height as humans, hugging the right border +#define ui_construct_purge "15:00,6:15" +#define ui_construct_fire "14:16,8:13" //above health, slightly to the left +#define ui_construct_pull "14:28,2:10" //above the zone_sel icon + //Pop-up inventory #define ui_shoes "2:8,1:5" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 20e50d9472c..9e64de0697b 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -190,6 +190,8 @@ datum/hud/New(mob/owner) ai_hud() else if(isrobot(mymob)) robot_hud() + else if(iscorgi(mymob)) + corgi_hud() else if(isobserver(mymob)) ghost_hud() else if(isovermind(mymob)) diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index 2cb7cd15b41..f84cfd6c232 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -5,6 +5,41 @@ /datum/hud/proc/ghost_hud() return +/datum/hud/proc/corgi_hud(u) + mymob.fire = new /obj/screen() + mymob.fire.icon = 'icons/mob/screen1_corgi.dmi' + mymob.fire.icon_state = "fire0" + mymob.fire.name = "fire" + mymob.fire.screen_loc = ui_fire + + mymob.healths = new /obj/screen() + mymob.healths.icon = 'icons/mob/screen1_corgi.dmi' + mymob.healths.icon_state = "health0" + mymob.healths.name = "health" + mymob.healths.screen_loc = ui_health + + mymob.pullin = new /obj/screen() + mymob.pullin.icon = 'icons/mob/screen1_corgi.dmi' + mymob.pullin.icon_state = "pull0" + mymob.pullin.name = "pull" + mymob.pullin.screen_loc = ui_construct_pull + + mymob.oxygen = new /obj/screen() + mymob.oxygen.icon = 'icons/mob/screen1_corgi.dmi' + mymob.oxygen.icon_state = "oxy0" + mymob.oxygen.name = "oxygen" + mymob.oxygen.screen_loc = ui_oxygen + + mymob.toxin = new /obj/screen() + mymob.toxin.icon = 'icons/mob/screen1_corgi.dmi' + mymob.toxin.icon_state = "tox0" + mymob.toxin.name = "toxin" + mymob.toxin.screen_loc = ui_toxin + + mymob.client.screen = null + + mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.oxygen, mymob.toxin) + /datum/hud/proc/brain_hud(ui_style = 'icons/mob/screen1_Midnight.dmi') mymob.blind = new /obj/screen() mymob.blind.icon = 'icons/mob/screen1_full.dmi' diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index d0d432ce102..7837713dd17 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -7,6 +7,8 @@ icon_state = "corgi" icon_living = "corgi" icon_dead = "corgi_dead" + health = 30 + maxHealth = 30 speak = list("YAP", "Woof!", "Bark!", "AUUUUUU") speak_emote = list("barks", "woofs") emote_hear = list("barks", "woofs", "yaps","pants") @@ -29,6 +31,33 @@ ..() regenerate_icons() +/mob/living/simple_animal/corgi/Life() + . = ..() + if(.) + if(fire) + if(fire_alert) fire.icon_state = "fire[fire_alert]" //fire_alert is either 0 if no alert, 1 for heat and 2 for cold. + else fire.icon_state = "fire0" + if(pullin) + if(pulling) pullin.icon_state = "pull1" + else pullin.icon_state = "pull0" + if(oxygen) + if(oxygen_alert) oxygen.icon_state = "oxy1" + else oxygen.icon_state = "oxy0" + if(toxin) + if(toxins_alert) toxin.icon_state = "tox1" + else toxin.icon_state = "tox0" + + switch(health) + if(30 to INFINITY) healths.icon_state = "health0" + if(26 to 29) healths.icon_state = "health1" + if(21 to 25) healths.icon_state = "health2" + if(16 to 20) healths.icon_state = "health3" + if(11 to 15) healths.icon_state = "health4" + if(6 to 10) healths.icon_state = "health5" + if(1 to 5) healths.icon_state = "health6" + else healths.icon_state = "health7" + regenerate_icons() + /mob/living/simple_animal/corgi/Die() ..() regenerate_icons() @@ -292,7 +321,7 @@ ..() //Feeding, chasing food, FOOOOODDDD - if(!stat && !resting && !buckled) + if(!stat && !resting && !buckled && (ckey == null)) turns_since_scan++ if(turns_since_scan > 5) turns_since_scan = 0 @@ -336,9 +365,10 @@ if(prob(1)) emote(pick("dances around","chases its tail")) spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) - dir = i - sleep(1) + if (ckey == null) + for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) + dir = i + sleep(1) /obj/item/weapon/reagent_containers/food/snacks/meat/corgi name = "Corgi meat" @@ -387,9 +417,10 @@ if ((M.client && !( M.blinded ))) M.show_message("\blue [user] baps [name] on the nose with the rolled up [O]") spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2)) - dir = i - sleep(1) + if (ckey == null) + for(var/i in list(1,2,4,8,4,2,1,2)) + dir = i + sleep(1) else ..() @@ -467,11 +498,12 @@ if(!stat && !resting && !buckled) if(prob(1)) - emote(pick("dances around","chases her tail")) - spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) - dir = i - sleep(1) + if (ckey == null) + emote(pick("dances around","chases her tail")) + spawn(0) + for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) + dir = i + sleep(1) /mob/living/simple_animal/corgi/Ian/borgi diff --git a/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm b/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm new file mode 100644 index 00000000000..ad945390cd1 --- /dev/null +++ b/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm @@ -0,0 +1,11 @@ +/mob/living/simple_animal/corgi/verb/chasetail() + set name = "Chase your tail" + set desc = "d'awwww." + set category = "Corgi" + src << text("[pick("You dance around","You chase your tail")].") + for(var/mob/O in oviewers(src, null)) + if ((O.client && !( O.blinded ))) + O << text("[] [pick("dances around","chases its tail")].", src) + for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) + dir = i + sleep(1) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 9702d9b1abb..d8beb5aaca9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -10,6 +10,10 @@ var/icon_dead = "" var/icon_gib = null //We only try to show a gibbing animation if this exists. + var/oxygen_alert = 0 + var/toxins_alert = 0 + var/fire_alert = 0 + var/list/speak = list() var/speak_chance = 0 var/list/emote_hear = list() //Hearable emotes @@ -105,7 +109,7 @@ handle_paralysed() //Movement - if(!client && !stop_automated_movement && wander) + if(!client && !stop_automated_movement && wander && (ckey == null)) if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc. turns_since_move++ if(turns_since_move >= turns_per_move) @@ -114,7 +118,7 @@ turns_since_move = 0 //Speaking - if(!client && speak_chance) + if(!client && speak_chance && (ckey == null)) if(rand(0,200) < speak_chance) if(speak && speak.len) if((emote_hear && emote_hear.len) || (emote_see && emote_see.len)) @@ -166,6 +170,9 @@ if(min_oxy) if(Environment.oxygen < min_oxy) atmos_suitable = 0 + oxygen_alert = 1 + else + oxygen_alert = 0 if(max_oxy) if(Environment.oxygen > max_oxy) atmos_suitable = 0 @@ -175,6 +182,9 @@ if(max_tox) if(Environment.toxins > max_tox) atmos_suitable = 0 + toxins_alert = 1 + else + toxins_alert = 0 if(min_n2) if(Environment.nitrogen < min_n2) atmos_suitable = 0 @@ -192,9 +202,13 @@ //Atmos effect if(bodytemperature < minbodytemp) + fire_alert = 2 adjustBruteLoss(cold_damage_per_tick) else if(bodytemperature > maxbodytemp) + fire_alert = 1 adjustBruteLoss(heat_damage_per_tick) + else + fire_alert = 0 if(!atmos_suitable) adjustBruteLoss(unsuitable_atoms_damage) @@ -559,7 +573,7 @@ if (S.occupant || S.occupant2) return 0 return 1 - + /mob/living/simple_animal/say(var/message) if(stat) return diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 6405b6ec3b6..18e9ee854db 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -237,18 +237,23 @@ something.loc = get_turf(src) ..() -/obj/item/weapon/reagent_containers/food/snacks/attack_animal(var/mob/M) +/obj/item/weapon/reagent_containers/food/snacks/attack_animal(mob/M) if(isanimal(M)) if(iscorgi(M)) - if(bitecount == 0 || prob(50)) - M.emote("nibbles away at the [src]") - bitecount++ - if(bitecount >= 5) - var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was") - if(sattisfaction_text) - M.emote("[sattisfaction_text]") + if(bitecount >= 4) + M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","You swallow up the last part of \the [src].") + playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + var/mob/living/simple_animal/corgi/C = M + if (C.health <= C.maxHealth + 5) + C.health += 5 + else + C.health = C.maxHealth del(src) - if(ismouse(M)) + else + M.visible_message("[M] takes a bite of \the [src].","You take a bite of \the [src].") + playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + bitecount++ + else if(ismouse(M)) var/mob/living/simple_animal/mouse/N = M N << text("\blue You nibble away at [src].") if(prob(50)) diff --git a/icons/mob/screen1_corgi.dmi b/icons/mob/screen1_corgi.dmi new file mode 100644 index 00000000000..e601d684e5b Binary files /dev/null and b/icons/mob/screen1_corgi.dmi differ diff --git a/paradise.dme b/paradise.dme index a59937230f9..440516b4cbf 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1369,6 +1369,7 @@ #include "code\modules\mob\living\simple_animal\friendly\butterfly.dm" #include "code\modules\mob\living\simple_animal\friendly\cat.dm" #include "code\modules\mob\living\simple_animal\friendly\corgi.dm" +#include "code\modules\mob\living\simple_animal\friendly\corgi_powers.dm" #include "code\modules\mob\living\simple_animal\friendly\crab.dm" #include "code\modules\mob\living\simple_animal\friendly\farm_animals.dm" #include "code\modules\mob\living\simple_animal\friendly\fox.dm"