mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #5544 from Fox-McCloud/simple-animal-fix
Simple Animals Resting Refactor
This commit is contained in:
@@ -132,7 +132,6 @@
|
||||
..()
|
||||
icon_living = icon_state
|
||||
icon_dead = icon_state
|
||||
icon_resting = icon_state
|
||||
access_card = new /obj/item/weapon/card/id(src)
|
||||
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
|
||||
access_card.access += access_robotics
|
||||
@@ -852,8 +851,6 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
ejectpai(usr)
|
||||
update_controls()
|
||||
|
||||
/mob/living/simple_animal/bot/handle_state_icons()
|
||||
|
||||
/mob/living/simple_animal/bot/proc/update_icon()
|
||||
icon_state = "[initial(icon_state)][on]"
|
||||
|
||||
|
||||
@@ -122,20 +122,21 @@
|
||||
if(1 to 5) healths.icon_state = "health6"
|
||||
if(0) healths.icon_state = "health7"
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
. = ..()
|
||||
handle_state_icons()
|
||||
|
||||
/mob/living/simple_animal/proc/process_ai()
|
||||
handle_automated_movement()
|
||||
handle_automated_action()
|
||||
handle_automated_speech()
|
||||
|
||||
/mob/living/simple_animal/proc/handle_state_icons()
|
||||
if(resting && icon_resting && stat != DEAD)
|
||||
icon_state = icon_resting
|
||||
else if(stat != DEAD)
|
||||
icon_state = icon_living
|
||||
/mob/living/simple_animal/lay_down()
|
||||
..()
|
||||
handle_resting_state_icons()
|
||||
|
||||
/mob/living/simple_animal/proc/handle_resting_state_icons()
|
||||
if(icon_resting)
|
||||
if(resting && stat != DEAD)
|
||||
icon_state = icon_resting
|
||||
else if(stat != DEAD)
|
||||
icon_state = icon_living
|
||||
|
||||
/mob/living/simple_animal/handle_regular_status_updates()
|
||||
if(..()) //alive
|
||||
|
||||
Reference in New Issue
Block a user