mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Fixes being able to ride dead space carp (#66530)
Removes the ridable element on death, and unbuckles all the mobs
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
var/static/list/carp_colors_rare = list(
|
||||
"silver" = "#fdfbf3"
|
||||
)
|
||||
/// Is the carp tamed?
|
||||
var/tamed = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/Initialize(mapload, mob/tamer)
|
||||
AddElement(/datum/element/simple_flying)
|
||||
@@ -83,10 +85,24 @@
|
||||
else
|
||||
make_tameable()
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/revive(full_heal, admin_revive)
|
||||
if (tamed)
|
||||
var/datum/weakref/friendref = ai_controller.blackboard[BB_HOSTILE_FRIEND]
|
||||
var/mob/living/friend = friendref?.resolve()
|
||||
if(friend)
|
||||
tamed(friend)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/death(gibbed)
|
||||
if (tamed)
|
||||
can_buckle = FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/proc/make_tameable()
|
||||
AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/meat), tame_chance = 10, bonus_tame_chance = 5, after_tame = CALLBACK(src, .proc/tamed))
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/proc/tamed(mob/living/tamer)
|
||||
tamed = TRUE
|
||||
can_buckle = TRUE
|
||||
buckle_lying = 0
|
||||
AddElement(/datum/element/ridable, /datum/component/riding/creature/carp)
|
||||
|
||||
Reference in New Issue
Block a user