mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Merge pull request #11287 from Fox-McCloud/fix-goats
Fixes and Updates Goats
This commit is contained in:
@@ -31,14 +31,6 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_movement()
|
||||
..()
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/structure/spacevine) in step)
|
||||
Move(step, get_dir(src, step))
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_action()
|
||||
//chance to go crazy and start wacking stuff
|
||||
if(!enemies.len && prob(1))
|
||||
Retaliate()
|
||||
@@ -46,11 +38,16 @@
|
||||
if(enemies.len && prob(10))
|
||||
enemies = list()
|
||||
LoseTarget()
|
||||
src.visible_message("<span class='notice'>[src] calms down.</span>")
|
||||
visible_message("<span class='notice'>[src] calms down.</span>")
|
||||
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
if(stat == CONSCIOUS)
|
||||
eat_plants()
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
|
||||
Move(step, get_dir(src, step))
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life(seconds, times_fired)
|
||||
. = ..()
|
||||
@@ -60,30 +57,52 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
src.visible_message("<span class='warning'>[src] gets an evil-looking gleam in their eye.</span>")
|
||||
visible_message("<span class='danger'>[src] gets an evil-looking gleam in their eye.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Move()
|
||||
..()
|
||||
. = ..()
|
||||
if(!stat)
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
eat_plants()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass))
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/proc/eat_plants()
|
||||
var/eaten = FALSE
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
eaten = TRUE
|
||||
|
||||
var/obj/structure/glowshroom/GS = locate(/obj/structure/glowshroom) in loc
|
||||
if(GS)
|
||||
qdel(GS)
|
||||
eaten = TRUE
|
||||
|
||||
if(eaten && prob(10))
|
||||
say("Nom")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/I, mob/user, params)
|
||||
if(stat == CONSCIOUS && istype(I, /obj/item/reagent_containers/glass))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/reagent_containers/glass/G = O
|
||||
var/obj/item/reagent_containers/glass/G = I
|
||||
var/transfered = min(milk_content, rand(5,10), (G.volume - G.reagents.total_volume))
|
||||
if(transfered > 0)
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using [G].</span>")
|
||||
G.reagents.add_reagent("milk", transfered)
|
||||
milk_content -= transfered
|
||||
else if(G.reagents.total_volume >= G.volume)
|
||||
to_chat(user, "<span class='warning'>\The [O] is full.</span>")
|
||||
to_chat(user, "<span class='warning'>[G] is full.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The udder is dry. Wait a bit longer...</span>")
|
||||
return TRUE
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/AttackingTarget()
|
||||
..()
|
||||
if(isdiona(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/NB = pick(H.bodyparts)
|
||||
H.visible_message("<span class='warning'>[src] takes a big chomp out of [H]!</span>", "<span class='userdanger'>[src] takes a big chomp out of your [NB.name]!</span>")
|
||||
NB.droplimb()
|
||||
|
||||
//cow
|
||||
/mob/living/simple_animal/cow
|
||||
|
||||
Reference in New Issue
Block a user