Oh Boy
This commit is contained in:
@@ -550,3 +550,6 @@
|
||||
// twitch plays
|
||||
/// Returns direction: (wipe_votes)
|
||||
#define COMSIG_TWITCH_PLAYS_MOVEMENT_DATA "twitch_plays_movement_data"
|
||||
|
||||
// /datum/component/identification signals
|
||||
#define COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK "id_knowledge_check" // (mob/user) - returns a value from ID_COMPONENT_KNOWLEDGE_NONE to ID_COMPONENT_KNOWLEDGE_FULL
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
identification_method_flags = id_method_flags
|
||||
|
||||
/datum/component/identification/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_IDENFICATION_KNOWLEDGE_CHECK, .proc/check_knowledge)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
if(identification_effect_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
|
||||
@@ -511,12 +511,13 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
*/
|
||||
/obj/item/proc/equipped(mob/user, slot, initial = FALSE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
var/signal_flags = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
current_equipped_slot = slot
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
if(!(signal_flags & COMPONENT_NO_GRANT_ACTIONS))
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
// if(!initial)
|
||||
// if(equip_sound && (slot_flags & slot))
|
||||
|
||||
@@ -79,21 +79,27 @@ effective or pretty fucking useless.
|
||||
var/ui_x = 320
|
||||
var/ui_y = 335
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/identification/syndicate, ID_COMPONENT_DEL_ON_IDENTIFY, ID_COMPONENT_EFFECT_NO_ACTIONS, ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
return ..()
|
||||
var/knowledge = SEND_SIGNAL(COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, user) == ID_COMPONENT_KNOWLEDGE_FULL
|
||||
if(!irradiate)
|
||||
return
|
||||
if(!used)
|
||||
log_combat(user, M, "irradiated", src)
|
||||
log_combat(user, M, "[knowledge? "" : "unknowingly "]irradiated", src)
|
||||
var/cooldown = get_cooldown()
|
||||
used = TRUE
|
||||
icon_state = "health1"
|
||||
addtimer(VARSET_CALLBACK(src, used, FALSE), cooldown)
|
||||
addtimer(VARSET_CALLBACK(src, icon_state, "health"), cooldown)
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
if(knowledge)
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
addtimer(CALLBACK(src, .proc/radiation_aftereffect, M), (wavelength+(intensity*4))*5)
|
||||
else
|
||||
else if(knowledge)
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M)
|
||||
@@ -110,7 +116,9 @@ effective or pretty fucking useless.
|
||||
interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/interact(mob/user)
|
||||
ui_interact(user)
|
||||
var/knowledge = SEND_SIGNAL(COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, user) == ID_COMPONENT_KNOWLEDGE_FULL
|
||||
if(knowledge)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
Reference in New Issue
Block a user