replaces BANG_PROTECT_2 with a component, also kills OMNITONGUE_2 and flags_2

This commit is contained in:
vuonojenmustaturska
2018-05-02 21:13:41 +03:00
committed by CitadelStationBot
parent e42cce26da
commit 0958d35b26
27 changed files with 890 additions and 41 deletions
+11
View File
@@ -0,0 +1,11 @@
/datum/component/wearertargeting/earprotection
signals = list(COMSIG_CARBON_SOUNDBANG)
mobtype = /mob/living/carbon
/datum/component/wearertargeting/earprotection/Initialize(_valid_slots)
. = ..()
valid_slots = _valid_slots
callback = CALLBACK(src, .proc/reducebang)
/datum/component/wearertargeting/earprotection/proc/reducebang(list/reflist)
reflist[1]--
@@ -53,7 +53,11 @@
var/list/tc = allowed_typecache
if(user.a_intent != INTENT_HELP)
return
<<<<<<< HEAD
if((I.flags_2 & (HOLOGRAM_2 | NO_MAT_REDEMPTION_2)) || (tc && !is_type_in_typecache(I, tc)))
=======
if((I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION) || (tc && !is_type_in_typecache(I, tc)))
>>>>>>> fd4c753... replaces BANG_PROTECT_2 with a component, also kills OMNITONGUE_2 and flags_2 (#37597)
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
return
. = COMPONENT_NO_AFTERATTACK
@@ -4,5 +4,6 @@
/datum/component/redirect/Initialize(list/signals, datum/callback/_callback)
//It's not our job to verify the right signals are registered here, just do it.
if(!LAZYLEN(signals) || !istype(_callback))
warning("signals are [list2params(signals)], callback is [_callback]]")
return COMPONENT_INCOMPATIBLE
RegisterSignal(signals, _callback)