Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] [MODULAR] Icemoon additions: mob naming potions and other minor improvements #746

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,7 @@
/obj/item/seeds/tower{
pixel_y = -3
},
/obj/item/seeds/glowshroom,
/obj/item/seeds/poppy,
/obj/item/seeds/reishi,
/obj/item/seeds/reishi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
/mob/living/basic/mining/ice_whelp,
/mob/living/basic/mining/lobstrosity,
/mob/living/simple_animal/hostile/asteroid/polarbear,
/mob/living/simple_animal/hostile/asteroid/wolf,
/mob/living/basic/mining/wolf,
)
new mob_type(success_rune.loc)

Expand Down
66 changes: 66 additions & 0 deletions modular_skyrat/modules/icemoon_additions/code/icecat_recipes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/obj/item/anointing_oil
name = "anointing bloodresin"
desc = "And so Helgar Knife-Arm spoke to the Hearth, and decreed that all of the Kin who gave name to beasts would do so with conquest and blood."
icon = 'icons/obj/medical/chemical.dmi'
icon_state = "potred"
throwforce = 0
w_class = WEIGHT_CLASS_TINY

var/being_used = FALSE

/obj/item/anointing_oil/attack(mob/living/target_mob, mob/living/user, params)
if (!is_species(user, /datum/species/human/felinid/primitive))
to_chat(user, span_warning("You have no idea what this disgusting concoction is used for."))
return
if(being_used || !ismob(target_mob)) //originally this was going to check if the mob was friendly, but if an icecat wants to name some terror mob while it's tearing chunks out of them, why not?
return
if(target_mob.ckey)
to_chat(user, span_warning("You would never shame a creature so intelligent by not allowing it to choose its own name."))
return

if(try_anoint(target_mob, user))
qdel(src)
else
being_used = FALSE

/obj/item/anointing_oil/proc/try_anoint(mob/living/target_mob, mob/living/user)
being_used = TRUE

var/new_name = sanitize_name(tgui_input_text(user, "Speak forth this beast's new name for all the Kin to hear.", "Input a name", target_mob.name, MAX_NAME_LEN))

if(!new_name || QDELETED(src) || QDELETED(target_mob) || new_name == target_mob.name || !target_mob.Adjacent(user))
being_used = FALSE
return FALSE

target_mob.visible_message(span_notice("[user] leans down and smears twinned streaks of glistening bloodresin upon [target_mob], then straightens up with ritual purpose..."))
user.say("Let the ice know you forevermore as +[new_name]+.")

user.log_message("used [src] on [target_mob], renaming it to [new_name].", LOG_GAME)

target_mob.name = new_name

//give the stupid dog zoomies from getting named
if(istype(target_mob, /mob/living/basic/mining/wolf))
target_mob.emote("awoo")
target_mob.emote("spin")

return TRUE

/obj/item/anointing_oil/examine(mob/user)
. = ..()
if(is_species(user, /datum/species/human/felinid/primitive))
. += span_info("Using this on the local wildlife will allow you to give them a name.")

/datum/crafting_recipe/anointing_oil
name = "Anointing Bloodresin"
category = CAT_MISC

//recipe given to icecats as part of their spawner/team setting
always_available = FALSE

reqs = list(
/datum/reagent/consumable/liquidgibs = 80,
/datum/reagent/blood = 20,
)

result = /obj/item/anointing_oil
29 changes: 29 additions & 0 deletions modular_skyrat/modules/icemoon_additions/code/pet_commands.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/datum/component/obeys_commands/RegisterWithParent()
. = ..()
RegisterSignal(parent, COMSIG_ATOM_EXAMINE_MORE, PROC_REF(on_examine_more))

/datum/component/obeys_commands/UnregisterFromParent()
. = ..()
UnregisterSignal(parent, COMSIG_ATOM_EXAMINE_MORE)

/datum/component/obeys_commands/on_examine(mob/living/source, mob/user, list/examine_list)
. = ..()
. += span_italics("You can alt+click [source.p_them()] when adjacent to see available commands.")
. += span_italics("You can also examine [source.p_them()] closely to check on [source.p_their()] wounds. Many companions can be healed with sutures or creams!")

/datum/component/obeys_commands/proc/on_examine_more(mob/living/source, mob/user, list/examine_list)
SIGNAL_HANDLER

if (IS_DEAD_OR_INCAP(source))
return
if (!(user in source.ai_controller?.blackboard[BB_FRIENDS_LIST]))
return

if (source.health < source.maxHealth*0.2)
examine_list += span_bolddanger("[source.p_They()] look[source.p_s()] severely injured.")
else if (source.health < source.maxHealth*0.5)
examine_list += span_danger("[source.p_They()] look[source.p_s()] moderately injured.")
else if (source.health < source.maxHealth*0.8)
examine_list += span_warning("[source.p_They()] look[source.p_s()] slightly injured.")
else
examine_list += span_notice("[source.p_They()] look[source.p_s()] to be in good condition.")
1 change: 1 addition & 0 deletions modular_skyrat/modules/primitive_catgirls/code/spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
/datum/crafting_recipe/boneaxe,
/datum/crafting_recipe/bonespear,
/datum/crafting_recipe/bonedagger,
/datum/crafting_recipe/anointing_oil,
)

/datum/antagonist/primitive_catgirl/Destroy()
Expand Down
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7169,6 +7169,8 @@
#include "modular_skyrat\modules\hyposprays\code\hyposprays_II.dm"
#include "modular_skyrat\modules\hyposprays\code\hypovials.dm"
#include "modular_skyrat\modules\hyposprays\code\vending_hypospray.dm"
#include "modular_skyrat\modules\icemoon_additions\code\icecat_recipes.dm"
#include "modular_skyrat\modules\icemoon_additions\code\pet_commands.dm"
#include "modular_skyrat\modules\ices_events\code\_ICES_globalvars.dm"
#include "modular_skyrat\modules\ices_events\code\ICES_event_config.dm"
#include "modular_skyrat\modules\ices_events\code\ICES_intensity_credits.dm"
Expand Down
Loading