Converts some actions to mob cooldown actions (#77680)

## About The Pull Request

It has come to my attention that it isn't possible for admins to grant
the abilities to place web, lay eggs, and issue commands to spiders to
arbitrary mobs. This refactors Spider, Goliath, and Meteor Heart
abilities (hey what do you know I last touched all of those) such that
they can.

## Why It's Good For The Game

You **can** create the spider pig as an event.

## Changelog

🆑
admin: Adds Spider, Goliath, and Meteor Heart actions to the "Grant Mob
Action" menu.
/🆑
This commit is contained in:
Jacquerel
2023-08-17 15:16:02 -06:00
committed by GitHub
parent 246d8992e1
commit 820afe72a7
15 changed files with 152 additions and 140 deletions
@@ -78,7 +78,7 @@
. = ..()
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
var/datum/action/cooldown/web_effigy/shed = new(src)
var/datum/action/cooldown/mob_cooldown/web_effigy/shed = new(src)
shed.Grant(src)
/**
@@ -135,7 +135,7 @@
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
var/datum/action/command_spiders/communication_spiders/spiders_communication = new(src)
var/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders/spiders_communication = new(src)
spiders_communication.Grant(src)
/**
@@ -161,7 +161,7 @@
speed = 4
player_speed_modifier = -3.1
web_speed = 0.25
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Support spider variant specializing in healing their brethren and placing webbings very swiftly, but has very low amount of health and deals low damage."
///The health HUD applied to the mob.
var/health_hud = DATA_HUD_MEDICAL_ADVANCED
@@ -208,21 +208,21 @@
web_speed = 0.25
speed = 4
player_speed_modifier = -3.1
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Support spider variant specializing in contruction to protect their brethren, but has very low amount of health and deals low damage."
/mob/living/basic/spider/giant/tangle/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
var/datum/action/cooldown/lay_web/web_passage/passage_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src)
passage_web.Grant(src)
var/datum/action/cooldown/lay_web/web_spikes/spikes_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/lay_web/sticky_web/web_sticky = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
@@ -270,17 +270,17 @@
mob_size = MOB_SIZE_LARGE
gold_core_spawnable = NO_SPAWN
web_speed = 0.7
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Tank spider variant with an enormous amount of health and damage, but is very slow when not on webbing. It also has a charge ability to close distance with a target after a small windup."
/// Charging ability
var/datum/action/cooldown/mob_cooldown/charge/basic_charge/charge
/mob/living/basic/spider/giant/tarantula/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
var/datum/action/cooldown/lay_web/web_passage/passage_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src)
passage_web.Grant(src)
charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge()
@@ -353,36 +353,36 @@
player_speed_modifier = -3.1
gold_core_spawnable = NO_SPAWN
web_speed = 0.5
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
menu_description = "Royal spider variant specializing in reproduction and leadership, deals low damage."
/mob/living/basic/spider/giant/midwife/Initialize(mapload)
. = ..()
var/datum/action/cooldown/lay_web/solid_web/web_solid = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src)
web_solid.Grant(src)
var/datum/action/cooldown/lay_web/web_passage/passage_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src)
passage_web.Grant(src)
var/datum/action/cooldown/lay_web/web_spikes/spikes_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/lay_web/sticky_web/web_sticky = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
var/datum/action/cooldown/wrap/wrapping = new(src)
var/datum/action/cooldown/mob_cooldown/wrap/wrapping = new(src)
wrapping.Grant(src)
var/datum/action/lay_eggs/make_eggs = new(src)
var/datum/action/cooldown/mob_cooldown/lay_eggs/make_eggs = new(src)
make_eggs.Grant(src)
var/datum/action/lay_eggs/enriched/make_better_eggs = new(src)
var/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/make_better_eggs = new(src)
make_better_eggs.Grant(src)
var/datum/action/set_spider_directive/give_orders = new(src)
var/datum/action/cooldown/mob_cooldown/set_spider_directive/give_orders = new(src)
give_orders.Grant(src)
var/datum/action/command_spiders/not_hivemind_talk = new(src)
var/datum/action/cooldown/mob_cooldown/command_spiders/not_hivemind_talk = new(src)
not_hivemind_talk.Grant(src)
AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web)
@@ -514,10 +514,10 @@
complete_text = "%SOURCE%'s wounds mend together.",\
)
var/datum/action/cooldown/lay_web/web_spikes/spikes_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/lay_web/sticky_web/web_sticky = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
/// Prevent you from healing other flesh spiders, or healing when on fire
@@ -552,10 +552,10 @@
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
var/datum/action/cooldown/lay_web/web_spikes/spikes_web = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src)
spikes_web.Grant(src)
var/datum/action/cooldown/lay_web/sticky_web/web_sticky = new(src)
var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src)
web_sticky.Grant(src)
@@ -38,7 +38,7 @@
/// Multiplier to apply to web laying speed. Fractional numbers make it faster, because it's a multiplier.
var/web_speed = 1
/// Type of webbing ability to learn.
var/web_type = /datum/action/cooldown/lay_web
var/web_type = /datum/action/cooldown/mob_cooldown/lay_web
/// The message that the mother spider left for this spider when the egg was layed.
var/directive = ""
/// Short description of what this mob is capable of, for radial menu uses
@@ -57,7 +57,7 @@
if(poison_per_bite)
AddElement(/datum/element/venomous, poison_type, poison_per_bite)
var/datum/action/cooldown/lay_web/webbing = new web_type(src)
var/datum/action/cooldown/mob_cooldown/lay_web/webbing = new web_type(src)
webbing.webbing_time *= web_speed
webbing.Grant(src)
ai_controller?.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing)
@@ -2,7 +2,7 @@
* Sets a directive to be given to all future spiders created by the user.
* This will be overwritten if used again.
*/
/datum/action/set_spider_directive
/datum/action/cooldown/mob_cooldown/set_spider_directive
name = "Set Directive"
desc = "Set a directive for your future children to follow."
button_icon = 'icons/mob/actions/actions_animal.dmi'
@@ -10,26 +10,27 @@
background_icon_state = "bg_alien"
overlay_icon_state = "bg_alien_border"
check_flags = AB_CHECK_CONSCIOUS
cooldown_time = 0
melee_cooldown_time = 0
shared_cooldown = NONE
click_to_activate = FALSE
/// Current directive to apply
var/current_directive = ""
/datum/action/set_spider_directive/Trigger(trigger_flags)
. = ..()
if(!.)
return
/datum/action/cooldown/mob_cooldown/set_spider_directive/Activate(atom/target)
var/new_directive = tgui_input_text(owner, "Enter the new directive", "Create directive", "[current_directive]")
if(isnull(new_directive) || QDELETED(src) || QDELETED(owner) || !IsAvailable(feedback = TRUE))
return FALSE
return
current_directive = new_directive
message_admins("[ADMIN_LOOKUPFLW(owner)] set its directive to: '[current_directive]'.")
owner.log_message("set its directive to: '[current_directive]'.", LOG_GAME)
return TRUE
StartCooldown()
/**
* Sends a message to all currently living spiders.
*/
/datum/action/command_spiders
/datum/action/cooldown/mob_cooldown/command_spiders
name = "Command"
desc = "Send a command to all living spiders."
button_icon = 'icons/mob/actions/actions_animal.dmi'
@@ -37,18 +38,17 @@
background_icon_state = "bg_alien"
overlay_icon_state = "bg_alien_border"
check_flags = AB_CHECK_CONSCIOUS
cooldown_time = 0
melee_cooldown_time = 0
shared_cooldown = NONE
click_to_activate = FALSE
/datum/action/command_spiders/Trigger(trigger_flags)
. = ..()
if(!.)
return
/datum/action/cooldown/mob_cooldown/command_spiders/Activate(trigger_flags)
var/input = tgui_input_text(owner, "Input a command for your legions to follow.", "Command")
if(!input || QDELETED(src) || QDELETED(owner) || !IsAvailable(feedback = TRUE))
return FALSE
return
spider_command(owner, input)
return TRUE
StartCooldown()
/**
* Sends a big message to all spiders from the target.
@@ -58,9 +58,7 @@
* * user - The spider sending the message
* * message - The message to be sent
*/
/datum/action/command_spiders/proc/spider_command(mob/living/user, message)
if(!message)
return
/datum/action/cooldown/mob_cooldown/command_spiders/proc/spider_command(mob/living/user, message)
var/my_message = format_message(user,message)
for(var/mob/living/basic/spider as anything in GLOB.spidermobs)
to_chat(spider, my_message)
@@ -72,17 +70,17 @@
/**
* Formats the string to have an appropiate size and text color
*/
/datum/action/command_spiders/proc/format_message(mob/living/user, message)
/datum/action/cooldown/mob_cooldown/command_spiders/proc/format_message(mob/living/user, message)
return span_spiderbroodmother("<b>Command from [user]:</b> [message]")
/**
* Sends a small message to all currently living spiders.
*/
/datum/action/command_spiders/communication_spiders
/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders
name = "Communication"
desc = "Send a report to all living spiders."
button_icon = 'icons/mob/actions/actions_animal.dmi'
button_icon_state = "message"
/datum/action/command_spiders/communication_spiders/format_message(mob/living/user, message)
/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders/format_message(mob/living/user, message)
return span_spiderscout("<b>Report from [user]:</b> [message]")
@@ -1,4 +1,4 @@
/datum/action/lay_eggs
/datum/action/cooldown/mob_cooldown/lay_eggs
name = "Lay Eggs"
desc = "Lay a cluster of eggs, which will soon grow into a normal spider."
button_icon = 'icons/mob/actions/actions_animal.dmi'
@@ -6,22 +6,26 @@
background_icon_state = "bg_alien"
overlay_icon_state = "bg_alien_border"
check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED
cooldown_time = 0
melee_cooldown_time = 0
shared_cooldown = NONE
click_to_activate = FALSE
///How long it takes for a broodmother to lay eggs.
var/egg_lay_time = 4 SECONDS
///The type of egg we create
var/egg_type = /obj/effect/mob_spawn/ghost_role/spider
/datum/action/lay_eggs/Grant(mob/grant_to)
/datum/action/cooldown/mob_cooldown/lay_eggs/Grant(mob/grant_to)
. = ..()
if (!owner)
return
RegisterSignals(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_status_on_signal))
/datum/action/lay_eggs/Remove(mob/removed_from)
/datum/action/cooldown/mob_cooldown/lay_eggs/Remove(mob/removed_from)
. = ..()
UnregisterSignal(removed_from, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED))
/datum/action/lay_eggs/IsAvailable(feedback = FALSE)
/datum/action/cooldown/mob_cooldown/lay_eggs/IsAvailable(feedback = FALSE)
. = ..()
if(!.)
return FALSE
@@ -36,30 +40,28 @@
return FALSE
return TRUE
/datum/action/lay_eggs/Trigger(trigger_flags)
. = ..()
if (!.)
return
/datum/action/cooldown/mob_cooldown/lay_eggs/Activate(atom/target)
owner.balloon_alert_to_viewers("laying eggs...")
if(do_after(owner, egg_lay_time, target = get_turf(owner), interaction_key = DOAFTER_SOURCE_SPIDER))
var/obj/structure/spider/eggcluster/eggs = locate() in get_turf(owner)
if(eggs)
owner.balloon_alert(owner, "already eggs here!")
else
lay_egg()
else
StartCooldown(360 SECONDS, 360 SECONDS)
if(!do_after(owner, egg_lay_time, target = get_turf(owner), interaction_key = DOAFTER_SOURCE_SPIDER))
owner.balloon_alert(owner, "interrupted!")
build_all_button_icons(UPDATE_BUTTON_STATUS)
StartCooldown(0 SECONDS)
return
var/obj/structure/spider/eggcluster/eggs = locate() in get_turf(owner)
if(eggs)
owner.balloon_alert(owner, "already eggs here!")
else
lay_egg()
StartCooldown()
/datum/action/lay_eggs/proc/lay_egg()
/datum/action/cooldown/mob_cooldown/lay_eggs/proc/lay_egg()
var/obj/effect/mob_spawn/ghost_role/spider/new_eggs = new egg_type(get_turf(owner))
new_eggs.faction = owner.faction
var/datum/action/set_spider_directive/spider_directive = locate() in owner.actions
var/datum/action/cooldown/mob_cooldown/set_spider_directive/spider_directive = locate() in owner.actions
if (spider_directive)
new_eggs.directive = spider_directive.current_directive
/datum/action/lay_eggs/enriched
/datum/action/cooldown/mob_cooldown/lay_eggs/enriched
name = "Lay Enriched Eggs"
desc = "Lay a cluster of eggs, which will soon grow into a greater spider. Requires you drain a human per cluster of these eggs."
button_icon_state = "lay_enriched_eggs"
@@ -67,7 +69,7 @@
/// How many charges we have to make eggs
var/charges = 0
/datum/action/lay_eggs/enriched/IsAvailable(feedback = FALSE)
/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/IsAvailable(feedback = FALSE)
. = ..()
if (!.)
return FALSE
@@ -77,6 +79,6 @@
return FALSE
return TRUE
/datum/action/lay_eggs/enriched/lay_egg()
/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/lay_egg()
charges--
return ..()
@@ -1,5 +1,5 @@
/// Make a sticky web under yourself for area fortification
/datum/action/cooldown/lay_web
/datum/action/cooldown/mob_cooldown/lay_web
name = "Spin Web"
desc = "Spin a web to slow down potential prey."
button_icon = 'icons/mob/actions/actions_animal.dmi'
@@ -9,20 +9,22 @@
check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED
cooldown_time = 0 SECONDS
melee_cooldown_time = 0
shared_cooldown = NONE
click_to_activate = FALSE
/// How long it takes to lay a web
var/webbing_time = 4 SECONDS
/datum/action/cooldown/lay_web/Grant(mob/grant_to)
/datum/action/cooldown/mob_cooldown/lay_web/Grant(mob/grant_to)
. = ..()
if (!owner)
return
RegisterSignals(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_status_on_signal))
/datum/action/cooldown/lay_web/Remove(mob/removed_from)
/datum/action/cooldown/mob_cooldown/lay_web/Remove(mob/removed_from)
. = ..()
UnregisterSignal(removed_from, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED))
/datum/action/cooldown/lay_web/IsAvailable(feedback = FALSE)
/datum/action/cooldown/mob_cooldown/lay_web/IsAvailable(feedback = FALSE)
. = ..()
if(!.)
return FALSE
@@ -45,10 +47,10 @@
return TRUE
/// Returns true if there's a web we can't put stuff on in our turf
/datum/action/cooldown/lay_web/proc/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/proc/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/stickyweb) in get_turf(owner))
/datum/action/cooldown/lay_web/Activate()
/datum/action/cooldown/mob_cooldown/lay_web/Activate()
. = ..()
var/turf/spider_turf = get_turf(owner)
var/obj/structure/spider/stickyweb/web = locate() in spider_turf
@@ -65,86 +67,86 @@
build_all_button_icons()
/// Creates a web in the current turf
/datum/action/cooldown/lay_web/proc/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/proc/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/stickyweb(target_turf)
/// Variant for genetics, created webs only allow the creator passage
/datum/action/cooldown/lay_web/genetic
/datum/action/cooldown/mob_cooldown/lay_web/genetic
desc = "Spin a web. Only you will be able to traverse your web easily."
cooldown_time = 4 SECONDS //the same time to lay a web
/datum/action/cooldown/lay_web/genetic/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/genetic/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/stickyweb/genetic(target_turf, owner)
/// Variant which allows webs to be stacked into walls
/datum/action/cooldown/lay_web/sealer
/datum/action/cooldown/mob_cooldown/lay_web/sealer
desc = "Spin a web to slow down potential prey. Webs can be stacked to make solid structures."
/datum/action/cooldown/lay_web/sealer/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/sealer/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
if (existing_web)
qdel(existing_web)
new /obj/structure/spider/stickyweb/sealed(target_turf)
return
new /obj/structure/spider/stickyweb(target_turf)
/datum/action/cooldown/lay_web/sealer/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/sealer/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/stickyweb/sealed) in get_turf(owner))
/datum/action/cooldown/lay_web/solid_web
/datum/action/cooldown/mob_cooldown/lay_web/solid_web
name = "Spin Solid Web"
desc = "Spin a web to obstruct potential prey."
button_icon_state = "lay_solid_web"
cooldown_time = 0 SECONDS
webbing_time = 5 SECONDS
/datum/action/cooldown/lay_web/solid_web/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/solid_web/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/solid) in get_turf(owner))
/datum/action/cooldown/lay_web/solid_web/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/solid_web/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/solid(target_turf)
/datum/action/cooldown/lay_web/web_passage
/datum/action/cooldown/mob_cooldown/lay_web/web_passage
name = "Spin Web Passage"
desc = "Spin a web passage to hide the nest from prey view."
button_icon_state = "lay_web_passage"
cooldown_time = 0 SECONDS
webbing_time = 4 SECONDS
/datum/action/cooldown/lay_web/web_passage/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/web_passage/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/passage) in get_turf(owner))
/datum/action/cooldown/lay_web/web_passage/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/web_passage/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/passage(target_turf)
/datum/action/cooldown/lay_web/sticky_web
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web
name = "Spin Sticky Web"
desc = "Spin a sticky web to trap intruders."
button_icon_state = "lay_sticky_web"
cooldown_time = 20 SECONDS
webbing_time = 3 SECONDS
/datum/action/cooldown/lay_web/sticky_web/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/sticky) in get_turf(owner))
/datum/action/cooldown/lay_web/sticky_web/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/sticky(target_turf)
/datum/action/cooldown/lay_web/web_spikes
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes
name = "Spin Web Spikes"
desc = "Extrude silk spikes to dissuade invaders."
button_icon_state = "lay_web_spikes"
cooldown_time = 40 SECONDS
webbing_time = 3 SECONDS
/datum/action/cooldown/lay_web/web_spikes/obstructed_by_other_web()
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/obstructed_by_other_web()
return !!(locate(/obj/structure/spider/spikes) in get_turf(owner))
/datum/action/cooldown/lay_web/web_spikes/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/plant_web(turf/target_turf, obj/structure/spider/stickyweb/existing_web)
new /obj/structure/spider/spikes(target_turf)
/// Makes a solid statue which you can use as cover
/datum/action/cooldown/web_effigy
/datum/action/cooldown/mob_cooldown/web_effigy
name = "Web Effigy"
desc = "Shed durable webbing in the shape of your body. It is intimidating and can obstruct attackers. \
It will decay after some time."
@@ -154,8 +156,10 @@
overlay_icon_state = "bg_alien_border"
cooldown_time = 60 SECONDS
melee_cooldown_time = 0
shared_cooldown = NONE
click_to_activate = FALSE
/datum/action/cooldown/web_effigy/IsAvailable(feedback = FALSE)
/datum/action/cooldown/mob_cooldown/web_effigy/IsAvailable(feedback = FALSE)
. = ..()
if(!.)
return FALSE
@@ -165,6 +169,6 @@
return FALSE
return TRUE
/datum/action/cooldown/web_effigy/Activate()
/datum/action/cooldown/mob_cooldown/web_effigy/Activate()
new /obj/structure/spider/effigy(get_turf(owner))
return ..()
@@ -1,4 +1,4 @@
/datum/action/cooldown/wrap
/datum/action/cooldown/mob_cooldown/wrap
name = "Wrap"
desc = "Wrap something or someone in a cocoon. \
If it's a human or similar species, you'll also consume them. \
@@ -11,20 +11,21 @@
check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED
click_to_activate = TRUE
ranged_mousepointer = 'icons/effects/mouse_pointers/wrap_target.dmi'
shared_cooldown = NONE
/// The time it takes to wrap something.
var/wrap_time = 5 SECONDS
/datum/action/cooldown/wrap/Grant(mob/grant_to)
/datum/action/cooldown/mob_cooldown/wrap/Grant(mob/grant_to)
. = ..()
if (!owner)
return
RegisterSignals(owner, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_status_on_signal))
/datum/action/cooldown/wrap/Remove(mob/removed_from)
/datum/action/cooldown/mob_cooldown/wrap/Remove(mob/removed_from)
. = ..()
UnregisterSignal(removed_from, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED))
/datum/action/cooldown/wrap/IsAvailable(feedback = FALSE)
/datum/action/cooldown/mob_cooldown/wrap/IsAvailable(feedback = FALSE)
. = ..()
if(!. || owner.incapacitated())
return FALSE
@@ -34,7 +35,7 @@
return FALSE
return TRUE
/datum/action/cooldown/wrap/set_click_ability(mob/on_who)
/datum/action/cooldown/mob_cooldown/wrap/set_click_ability(mob/on_who)
. = ..()
if(!.)
return
@@ -43,7 +44,7 @@
button_icon_state = "wrap_1"
build_all_button_icons()
/datum/action/cooldown/wrap/unset_click_ability(mob/on_who, refund_cooldown = TRUE)
/datum/action/cooldown/mob_cooldown/wrap/unset_click_ability(mob/on_who, refund_cooldown = TRUE)
. = ..()
if(!.)
return
@@ -53,7 +54,7 @@
button_icon_state = "wrap_0"
build_all_button_icons()
/datum/action/cooldown/wrap/Activate(atom/to_wrap)
/datum/action/cooldown/mob_cooldown/wrap/Activate(atom/to_wrap)
if(!owner.Adjacent(to_wrap))
owner.balloon_alert(owner, "must be closer!")
return FALSE
@@ -73,7 +74,7 @@
INVOKE_ASYNC(src, PROC_REF(cocoon), to_wrap)
return TRUE
/datum/action/cooldown/wrap/proc/cocoon(atom/movable/to_wrap)
/datum/action/cooldown/mob_cooldown/wrap/proc/cocoon(atom/movable/to_wrap)
owner.visible_message(
span_notice("[owner] begins to secrete a sticky substance around [to_wrap]."),
span_notice("You begin wrapping [to_wrap] into a cocoon."),
@@ -83,14 +84,14 @@
else
owner.balloon_alert(owner, "interrupted!")
/datum/action/cooldown/wrap/proc/wrap_target(atom/movable/to_wrap)
/datum/action/cooldown/mob_cooldown/wrap/proc/wrap_target(atom/movable/to_wrap)
var/obj/structure/spider/cocoon/casing = new(to_wrap.loc)
if(isliving(to_wrap))
var/mob/living/living_wrapped = to_wrap
// You get a point every time you consume a living player, even if they've been consumed before.
// You only get a point for any individual corpse once, so you can't keep breaking it out and eating it again.
if(ishuman(living_wrapped) && (living_wrapped.stat != DEAD || !HAS_TRAIT(living_wrapped, TRAIT_SPIDER_CONSUMED)))
var/datum/action/lay_eggs/enriched/egg_power = locate() in owner.actions
var/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/egg_power = locate() in owner.actions
if(egg_power)
egg_power.charges++
egg_power.build_all_button_icons()
@@ -80,7 +80,7 @@
melee_damage_upper = 4
speed = 0.7
web_speed = 0.5
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
///The health HUD applied to the mob.
var/health_hud = DATA_HUD_MEDICAL_ADVANCED
@@ -112,7 +112,7 @@
melee_damage_upper = 1
speed = 0.7
web_speed = 0.25
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
poison_per_bite = 2
poison_type = /datum/reagent/toxin/acid
@@ -151,7 +151,7 @@
melee_damage_upper = 10
speed = 0.7
web_speed = 0.5
web_type = /datum/action/cooldown/lay_web/sealer
web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer
/// Will differentiate into the "viper" giant spider.
/mob/living/basic/spider/growing/young/viper