Skip to content

Commit

Permalink
Fixes kirbyplants (yogstation13#19899)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnFulpWillard authored Jul 29, 2023
1 parent 57ba40d commit 3c62d9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 6 additions & 2 deletions code/datums/components/tactical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
unmodify()

/datum/component/fantasy/Destroy()
/datum/component/tactical/Destroy()
unmodify()
return ..()

/datum/component/tactical/proc/modify(obj/item/source, mob/user, slot)
if(allowed_slot && slot != allowed_slot)
SIGNAL_HANDLER

if(allowed_slot && !(slot & allowed_slot))
unmodify()
return

Expand All @@ -32,6 +34,8 @@
I.layer = ABOVE_MOB_LAYER

/datum/component/tactical/proc/unmodify(obj/item/source, mob/user)
SIGNAL_HANDLER

var/obj/item/master = source || parent
if(!user)
if(!ismob(master.loc))
Expand Down
7 changes: 2 additions & 5 deletions code/game/objects/structures/flora.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@

/obj/item/kirbyplants/Initialize(mapload)
. = ..()
AddComponent(/datum/component/two_handed, require_twohands = TRUE)
AddComponent(/datum/component/tactical)
AddComponent(/datum/component/two_handed, require_twohands = TRUE)
AddComponent(/datum/component/storage/concrete/kirbyplants)

/obj/item/kirbyplants/random
icon = 'icons/obj/flora/_flora.dmi'
Expand Down Expand Up @@ -358,10 +359,6 @@
light_color = "#2cb2e8"
light_range = 3

/obj/item/kirbyplants/Initialize(mapload)
. = ..()
AddComponent(/datum/component/storage/concrete/kirbyplants)

/datum/component/storage/concrete/kirbyplants
max_items = 1
max_w_class = WEIGHT_CLASS_NORMAL
Expand Down

0 comments on commit 3c62d9f

Please sign in to comment.