mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Gondolas are now basic mobs (#83451)
## About The Pull Request This PR turns gondolas into basic mobs and does some fiddling with gondola pods Their verbs are now action buttons which they lose upon delivering. If set to stay, they won't have their abilities afterwards (or wont get them in the first place if the delivery is already done). Lets them survive without a pod requirement in case admins want to spawn one for their own stuff, so I also removed it from the snowflake checks to exclude them from stuff. Also replaced the hardcoded "cant speak" with simply giving the mute trait, so admins can make gondolas speak if they want to for any reason. ## Why It's Good For The Game The pet level of simple animals can finally be killed off, also gives admins more control over gondola-related stuff if they so wish. ## Changelog 🆑 refactor: Gondolas (including gondola pods) are now basic mobs. /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -472,7 +472,7 @@
|
||||
unique_pet = TRUE
|
||||
held_state = "narsian"
|
||||
/// Mobs we will consume in the name of Nar'Sie
|
||||
var/static/list/edible_types = list(/mob/living/simple_animal/pet, /mob/living/basic/pet)
|
||||
var/static/list/edible_types = list(/mob/living/basic/pet)
|
||||
|
||||
/mob/living/basic/pet/dog/corgi/narsie/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
#define GONDOLA_HEIGHT pick(list("gondola_body_long", "gondola_body_medium", "gondola_body_short"))
|
||||
#define GONDOLA_COLOR pick(list("A87855", "915E48", "683E2C"))
|
||||
#define GONDOLA_MOUSTACHE pick(list("gondola_moustache_large", "gondola_moustache_small"))
|
||||
#define GONDOLA_EYES pick(list("gondola_eyes_close", "gondola_eyes_far"))
|
||||
|
||||
/mob/living/basic/pet/gondola
|
||||
name = "gondola"
|
||||
real_name = "gondola"
|
||||
desc = "Gondola is the silent walker. \
|
||||
Having no hands he embodies the Taoist principle of wu-wei (non-action) while his smiling \
|
||||
facial expression shows his utter and complete acceptance of the world as it is. \
|
||||
Its hide is extremely valuable."
|
||||
icon = 'icons/mob/simple/gondolas.dmi'
|
||||
icon_state = "gondola"
|
||||
icon_living = "gondola"
|
||||
|
||||
maxHealth = 200
|
||||
health = 200
|
||||
faction = list(FACTION_GONDOLA)
|
||||
response_help_continuous = "pets"
|
||||
response_help_simple = "pet"
|
||||
response_disarm_continuous = "bops"
|
||||
response_disarm_simple = "bop"
|
||||
response_harm_continuous = "kicks"
|
||||
response_harm_simple = "kick"
|
||||
ai_controller = /datum/ai_controller/basic_controller/gondola
|
||||
|
||||
//Gondolas aren't affected by cold.
|
||||
unsuitable_atmos_damage = 0
|
||||
basic_mob_flags = DEL_ON_DEATH
|
||||
|
||||
///List of loot drops on death, since it deletes itself on death (like trooper).
|
||||
var/list/loot = list(
|
||||
/obj/effect/decal/cleanable/blood/gibs = 1,
|
||||
/obj/item/stack/sheet/animalhide/gondola = 1,
|
||||
/obj/item/food/meat/slab/gondola = 1,
|
||||
)
|
||||
|
||||
/mob/living/basic/pet/gondola/Initialize(mapload)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_MUTE, INNATE_TRAIT)
|
||||
AddElement(/datum/element/pet_bonus, "smiles!")
|
||||
if(LAZYLEN(loot))
|
||||
loot = string_list(loot)
|
||||
AddElement(/datum/element/death_drops, loot)
|
||||
create_gondola()
|
||||
|
||||
/mob/living/basic/pet/gondola/proc/create_gondola()
|
||||
icon_state = null
|
||||
icon_living = null
|
||||
var/height = GONDOLA_HEIGHT
|
||||
var/mutable_appearance/body_overlay = mutable_appearance(icon, height)
|
||||
var/mutable_appearance/eyes_overlay = mutable_appearance(icon, GONDOLA_EYES)
|
||||
var/mutable_appearance/moustache_overlay = mutable_appearance(icon, GONDOLA_MOUSTACHE)
|
||||
body_overlay.color = ("#[GONDOLA_COLOR]")
|
||||
|
||||
//Offset the face to match the Gondola's height.
|
||||
switch(height)
|
||||
if("gondola_body_medium")
|
||||
eyes_overlay.pixel_y = -4
|
||||
moustache_overlay.pixel_y = -4
|
||||
if("gondola_body_short")
|
||||
eyes_overlay.pixel_y = -8
|
||||
moustache_overlay.pixel_y = -8
|
||||
|
||||
cut_overlays(TRUE)
|
||||
add_overlay(body_overlay)
|
||||
add_overlay(eyes_overlay)
|
||||
add_overlay(moustache_overlay)
|
||||
|
||||
/datum/ai_controller/basic_controller/gondola
|
||||
blackboard = list(
|
||||
BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
|
||||
)
|
||||
|
||||
ai_traits = STOP_MOVING_WHEN_PULLED
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk/less_walking
|
||||
|
||||
#undef GONDOLA_HEIGHT
|
||||
#undef GONDOLA_COLOR
|
||||
#undef GONDOLA_MOUSTACHE
|
||||
#undef GONDOLA_EYES
|
||||
@@ -0,0 +1,104 @@
|
||||
/mob/living/basic/pet/gondola/gondolapod
|
||||
name = "gondola"
|
||||
real_name = "gondola"
|
||||
desc = "The silent walker. This one seems to be part of a delivery agency."
|
||||
icon = 'icons/obj/supplypods.dmi'
|
||||
icon_state = "gondola"
|
||||
icon_living = "gondola"
|
||||
SET_BASE_PIXEL(-16, -5) //2x2 sprite
|
||||
layer = TABLE_LAYER //so that deliveries dont appear underneath it
|
||||
|
||||
loot = list(
|
||||
/obj/effect/decal/cleanable/blood/gibs = 1,
|
||||
/obj/item/stack/sheet/animalhide/gondola = 2,
|
||||
/obj/item/food/meat/slab/gondola = 2,
|
||||
)
|
||||
|
||||
///Boolean on whether the pod is currently open, and should appear such.
|
||||
var/opened = FALSE
|
||||
///The supply pod attached to the gondola, that actually holds the contents of our delivery.
|
||||
var/obj/structure/closet/supplypod/centcompod/linked_pod
|
||||
///Static list of actions the gondola is given on creation, and taken away when it successfully delivers.
|
||||
var/static/list/gondola_delivering_actions = list(
|
||||
/datum/action/innate/deliver_gondola_package,
|
||||
/datum/action/innate/check_gondola_contents,
|
||||
)
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/Initialize(mapload, pod)
|
||||
linked_pod = pod || new(src)
|
||||
name = linked_pod.name
|
||||
desc = linked_pod.desc
|
||||
if(!linked_pod.stay_after_drop || !linked_pod.opened)
|
||||
grant_actions_by_list(gondola_delivering_actions)
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/death()
|
||||
QDEL_NULL(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/create_gondola()
|
||||
return
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/update_overlays()
|
||||
. = ..()
|
||||
if(opened)
|
||||
. += "[icon_state]_open"
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/examine(mob/user)
|
||||
. = ..()
|
||||
if (contents.len)
|
||||
. += span_notice("It looks like it hasn't made its delivery yet.")
|
||||
else
|
||||
. += span_notice("It looks like it has already made its delivery.")
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/setOpened()
|
||||
opened = TRUE
|
||||
layer = initial(layer)
|
||||
update_appearance()
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, setClosed)), 5 SECONDS)
|
||||
|
||||
/mob/living/basic/pet/gondola/gondolapod/setClosed()
|
||||
opened = FALSE
|
||||
layer = LOW_MOB_LAYER
|
||||
update_appearance()
|
||||
|
||||
///Opens the gondola pod and delivers its package, one-time use as it removes all delivery-related actions.
|
||||
/datum/action/innate/deliver_gondola_package
|
||||
name = "Deliver"
|
||||
desc = "Open your pod and release any contents stored within."
|
||||
button_icon = 'icons/hud/screen_gen.dmi'
|
||||
button_icon_state = "arrow"
|
||||
check_flags = AB_CHECK_PHASED
|
||||
|
||||
/datum/action/innate/deliver_gondola_package/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
var/mob/living/basic/pet/gondola/gondolapod/gondola_owner = owner
|
||||
gondola_owner.linked_pod.open_pod(gondola_owner, forced = TRUE)
|
||||
for(var/datum/action/actions as anything in gondola_owner.actions)
|
||||
if(actions.type in gondola_owner.gondola_delivering_actions)
|
||||
actions.Remove(gondola_owner)
|
||||
return TRUE
|
||||
|
||||
///Checks the contents of the gondola and lets them know what they're holding.
|
||||
/datum/action/innate/check_gondola_contents
|
||||
name = "Check contents"
|
||||
desc = "See how many items you are currently holding in your pod."
|
||||
button_icon = 'icons/hud/implants.dmi'
|
||||
button_icon_state = "storage"
|
||||
check_flags = AB_CHECK_PHASED
|
||||
|
||||
/datum/action/innate/check_gondola_contents/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
var/mob/living/basic/pet/gondola/gondolapod/gondola_owner = owner
|
||||
var/total = gondola_owner.contents.len
|
||||
if (total)
|
||||
to_chat(gondola_owner, span_notice("You detect [total] object\s within your incredibly vast belly."))
|
||||
else
|
||||
to_chat(gondola_owner, span_notice("A closer look inside yourself reveals... nothing."))
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user