mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Adds delayed mob regeneration (#9619)
* Adds sitting and resting icon functions * Adds mob delayed resurrection * Changes stuff as pointed out on github * Changelog, and makes Norris regenerate
This commit is contained in:
@@ -94,6 +94,10 @@
|
||||
emote_hear = list("screams")
|
||||
emote_see = list("screams")
|
||||
friendly = "bites"
|
||||
canRegenerate = 1
|
||||
minRegenTime = 30 //It's just a crab, might as well give it quick regen
|
||||
maxRegenTime = 120
|
||||
|
||||
|
||||
/mob/living/simple_animal/crab/snowy
|
||||
name = "Snowy"
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
speed = 4
|
||||
size = SIZE_BIG
|
||||
move_to_delay = 4
|
||||
canRegenerate = 1
|
||||
minRegenTime = 300
|
||||
maxRegenTime = 1200
|
||||
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
move_to_delay = 6
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
canRegenerate = 1
|
||||
minRegenTime = 300
|
||||
maxRegenTime = 1800
|
||||
|
||||
|
||||
harm_intent_damage = 15
|
||||
melee_damage_lower = 10
|
||||
|
||||
@@ -82,6 +82,12 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
||||
var/supernatural = 0
|
||||
var/purge = 0
|
||||
|
||||
//For those that we want to just pop back up a little while after they're killed
|
||||
var/canRegenerate = 0 //If 1, it qualifies for regeneration
|
||||
var/isRegenerating = 0 //To stop life calling the proc multiple times
|
||||
var/minRegenTime = 0
|
||||
var/maxRegenTime = 0
|
||||
|
||||
universal_speak = 1
|
||||
universal_understand = 1
|
||||
|
||||
@@ -142,6 +148,8 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
||||
stat = CONSCIOUS
|
||||
density = 1
|
||||
update_canmove()
|
||||
if(canRegenerate && !isRegenerating)
|
||||
src.delayedRegen()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -163,6 +171,8 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
||||
if(purge)
|
||||
purge -= 1
|
||||
|
||||
isRegenerating = 0
|
||||
|
||||
//Movement
|
||||
if((!client||deny_client_move) && !stop_automated_movement && wander && !anchored && (ckey == null) && !(flags & INVULNERABLE))
|
||||
if(isturf(src.loc) && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
@@ -702,4 +712,12 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
||||
if(!supernatural)
|
||||
adjustBruteLoss(volume * 0.5)
|
||||
|
||||
/mob/living/simple_animal/proc/delayedRegen()
|
||||
set waitfor = 0
|
||||
isRegenerating = 1
|
||||
sleep(rand(minRegenTime, maxRegenTime)) //Don't want it being predictable
|
||||
src.resurrect()
|
||||
src.revive()
|
||||
visible_message("<span class='warning'>[src] appears to wake from the dead, having healed all wounds.</span>")
|
||||
|
||||
/datum/locking_category/simple_animal
|
||||
36
html/changelogs/Skullyton.yml
Normal file
36
html/changelogs/Skullyton.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscdel (general deleting of nice things)
|
||||
# rscadd (general adding of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# tgs (TG-ported fixes?)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Skullyton
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# There needs to be a space after the - and before the prefix. Don't use tabs anywhere in this file.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# If you're using characters such as # ' : - or the like in your changelog, surround the entire change with quotes as shown in the second example. These quotes don't show up on the changelog once it's merged and prevent errors.
|
||||
# SCREW ANY OF THIS UP AND IT WON'T WORK.
|
||||
changes:
|
||||
- rscadd: Adds back-from-the-dead regeneration for simple mobs, and adds it to certain mobs. Said mobs will need to have their bodies destroyed in some way to keep them down.
|
||||
Reference in New Issue
Block a user