mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Ported CorgiUI
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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")].","<span class=\"notice\">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].","<span class=\"notice\">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))
|
||||
|
||||
Reference in New Issue
Block a user