Skip to content

Commit

Permalink
Linters should be fine
Browse files Browse the repository at this point in the history
Only thing left is to clean up maps
  • Loading branch information
Szyszkrzyneczka committed Oct 6, 2024
1 parent 0da4bb4 commit 9979169
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/datums/actions/items/stealth_box.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/datum/action/item_action/agent_box/Grant(mob/grant_to)
. = ..()
if(owner)
RegisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT, .proc/suicide_act)
RegisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT, PROC_REF(suicide_act))

/datum/action/item_action/agent_box/Remove(mob/M)
if(owner)
Expand Down
53 changes: 53 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/giant_spider.dm
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,59 @@
else
clear_alert("temp")


// Net casters are the balanced generalist of the spider family: Moderate stats all around, and a ranged knockdown to assist others
/mob/living/simple_animal/hostile/poison/giant_spider/netcaster
name = "net caster"
obj_damage = 35
speed = 0.5
onweb_speed = 0
var/datum/action/cooldown/spell/basic_projectile/throw_web/spidernet

/mob/living/simple_animal/hostile/poison/giant_spider/netcaster/Initialize(mapload)
. = ..()
spidernet = new
spidernet.Grant()

/mob/living/simple_animal/hostile/poison/giant_spider/netcaster/Destroy()
. = ..()
spidernet.Remove()

/datum/action/cooldown/spell/basic_projectile/throw_web
name = "Throw web"
panel = "Spider"
desc = "Throw a sticky web at potential prey to immobilize them temporarily"
ranged_mousepointer = 'icons/effects/throwweb_target.dmi'
button_icon = 'icons/hud/actions/actions_animal.dmi'
button_icon_state = "throw_web_0"
background_icon_state = "bg_alien"
cooldown_time = 2 SECONDS
projectile_range = 20 // Proc holder had no range :shrug:
projectile_type = /obj/projectile/bullet/spidernet

/datum/action/cooldown/spell/basic_projectile/throw_web/can_cast_spell(feedback)
. = ..()
var/mob/living/user = owner
var/message
if(!istype(user, /mob/living/simple_animal/hostile/poison/giant_spider))
return FALSE
var/mob/living/simple_animal/hostile/poison/giant_spider/spider = user
if(spider.busy != SPINNING_WEB)
spider.busy = SPINNING_WEB
spider.visible_message("<span class='notice'>[spider] begins to secrete a sticky substance.</span>","<span class='notice'>You begin to prepare a net from webbing.</span>")
spider.stop_automated_movement = TRUE
if(do_after(spider, 40 * spider.web_speed, spider))
message = "<span class='notice'>You ready the completed net with your forelimbs. <B>Left-click to throw it at a target!</B></span>"
to_chat(spider, message)
return TRUE
spider.busy = SPIDER_IDLE
spider.stop_automated_movement = FALSE
else
to_chat(spider, "<span class='warning'>You're already spinning a web!</span>")
return FALSE



#undef SPIDER_IDLE
#undef SPINNING_WEB
#undef LAYING_EGGS
Expand Down
2 changes: 1 addition & 1 deletion code/modules/spells/spell_types/pointed/spell_cards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
range = 5, \
typecache = GLOB.typecache_living, \
amount = 1, \
when_locked = CALLBACK(src, .proc/on_lockon_component))
when_locked = CALLBACK(src, PROC_REF(on_lockon_component)))

/datum/action/cooldown/spell/pointed/projectile/spell_cards/proc/on_lockon_component(list/locked_weakrefs)
if(!length(locked_weakrefs))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/unit_tests/_unit_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
#include "shuttle_width_height_correctness.dm"
#include "siunit.dm"
#include "spawn_humans.dm"
#include "species_whitelists.dm"
#include "spell_invocations.dm"
#include "spell_mindswap.dm"
#include "spell_names.dm"
#include "spell_shapeshift.dm"
#include "species_whitelists.dm"
#include "stat_mc.dm"
#include "subsystem_init.dm"
#include "subsystem_metric_sanity.dm"
Expand Down

0 comments on commit 9979169

Please sign in to comment.