mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Corgi UI and player-controlled behaviours
-Corgi now have their very own HUD -Corgi health upped from 20hp (simple_animal default) to 30hp (still half of a MoMMi's health) -player-controlled corgis can now eat food by clicking on it. They can swallow a food\snack item after 5 bites. Doing so gives them back 1/6 of their full health (5 HP of 30HP) -when player-controlled, simple_animals won't randomly move or speak anymore (this behaviour now only happens when ckey == "null") -player-controlled corgis now have a verb that allows them to perform Ian's high speed tail chase/dance. Can be performed while moving for extra kek. I plan on giving players a way to play as corgis, something based on the combined use of a soulstone and a lazarus injector. In the meantime, it's still useful during adminbus.
This commit is contained in:
@@ -177,6 +177,8 @@ datum/hud/New(mob/owner)
|
||||
human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences
|
||||
else if(ismonkey(mymob))
|
||||
monkey_hud(ui_style)
|
||||
else if(iscorgi(mymob))
|
||||
corgi_hud()
|
||||
else if(isbrain(mymob))
|
||||
brain_hud(ui_style)
|
||||
else if(islarva(mymob))
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
icon_state = "corgi"
|
||||
icon_living = "corgi"
|
||||
icon_dead = "corgi_dead"
|
||||
health = 30
|
||||
maxHealth = 30
|
||||
gender = MALE
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
@@ -26,7 +28,30 @@
|
||||
var/facehugger
|
||||
|
||||
/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/show_inv(mob/user as mob)
|
||||
@@ -144,9 +169,10 @@
|
||||
item_to_add.loc = loc
|
||||
if(prob(25))
|
||||
step_rand(item_to_add)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
dir = i
|
||||
sleep(1)
|
||||
if (ckey == null)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
dir = i
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
@@ -322,9 +348,10 @@
|
||||
item_to_add.loc = loc
|
||||
if(prob(25))
|
||||
step_rand(item_to_add)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
dir = i
|
||||
sleep(1)
|
||||
if (ckey == null)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
dir = i
|
||||
sleep(1)
|
||||
|
||||
return valid
|
||||
|
||||
@@ -345,7 +372,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
|
||||
@@ -385,7 +412,6 @@
|
||||
else if(ishuman(movement_target.loc) )
|
||||
if(prob(20))
|
||||
emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
|
||||
|
||||
if(prob(1))
|
||||
emote(pick("dances around","chases its tail"))
|
||||
spawn(0)
|
||||
@@ -434,9 +460,10 @@
|
||||
if(!stat)
|
||||
user.visible_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
|
||||
..()
|
||||
|
||||
@@ -516,11 +543,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/attack_hand(mob/living/carbon/human/M)
|
||||
. = ..()
|
||||
|
||||
@@ -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)
|
||||
@@ -35,6 +35,8 @@
|
||||
var/heat_damage_per_tick = 3 //amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
var/cold_damage_per_tick = 2 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
var/fire_alert = 0
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
|
||||
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
|
||||
var/min_oxy = 5
|
||||
@@ -105,7 +107,7 @@
|
||||
AdjustParalysis(-1)
|
||||
|
||||
//Movement
|
||||
if((!client||deny_client_move) && !stop_automated_movement && wander && !anchored)
|
||||
if((!client||deny_client_move) && !stop_automated_movement && wander && !anchored && (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 +116,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))
|
||||
@@ -164,6 +166,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)
|
||||
@@ -176,6 +181,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)
|
||||
@@ -195,6 +203,7 @@
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
fire_alert = 2
|
||||
adjustBruteLoss(cold_damage_per_tick)
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
fire_alert = 1
|
||||
|
||||
@@ -214,15 +214,21 @@
|
||||
/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 << text("\blue You swallow up the last part of [src].")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if (O.client && !( O.blinded ))
|
||||
O << text("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was")].")
|
||||
playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
del(src)
|
||||
if(ismouse(M))
|
||||
else
|
||||
M << text("\blue You take a bite of [src].")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if (O.client && !( O.blinded ) && (O.ckey != M.ckey))
|
||||
O << text("[M] takes a bite of [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))
|
||||
|
||||
2
data/investigate/singulo.html
Normal file
2
data/investigate/singulo.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<small>06:37 [/area/engineering/engine] (,,)</small> || Engineering has a power alarm!<br>
|
||||
<small>06:38 [/area/engineering/engine] (,,)</small> || Engineering has a power alarm!<br>
|
||||
BIN
icons/mob/screen1_corgi.dmi
Normal file
BIN
icons/mob/screen1_corgi.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user