Fixes Knockdown signal being incorrect, making knock-off items (and others) trigger when they should again. Also cleans up the knockoff component and unit tests it. (#67720)

At some point, someone did a find and replace over this file, and completely screwed up the signal for Knockdown().

This caused components that relied on it, like the Knockoff component, to work way less often.

This PR fixes that.
It also goes through and cleans up the Knockoff component. More consistent style guide stuff, minor improvements, better documentation.

It also unit tests it.
This commit is contained in:
MrMelbert
2022-06-16 16:39:15 +01:00
committed by GitHub
parent 425a292202
commit b438cc0039
6 changed files with 159 additions and 43 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.add_reagent_list(list_reagents)
if(starts_lit)
light()
AddComponent(/datum/component/knockoff, 90, list(BODY_ZONE_PRECISE_MOUTH), list(ITEM_SLOT_MASK)) //90% to knock off when wearing a mask
AddComponent(/datum/component/knockoff, 90, list(BODY_ZONE_PRECISE_MOUTH), slot_flags) //90% to knock off when wearing a mask
AddElement(/datum/element/update_icon_updates_onmob)
icon_state = icon_off
inhand_icon_state = inhand_icon_off