From 6117e3a6aa87b7a29a1ff6f139548701372e8f4f Mon Sep 17 00:00:00 2001 From: Thalpy Date: Wed, 29 May 2019 19:09:40 +0100 Subject: [PATCH] Fixes to the hypnoflash, --- code/__DEFINES/status_effects.dm | 2 ++ code/datums/status_effects/debuffs.dm | 19 +++++++++++++++++++ code/modules/assembly/flash.dm | 9 +++++---- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index ffaaa04d0f..3cd64af8c7 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -44,6 +44,8 @@ #define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep +#define STATUS_EFFECT_PACIFY /datum/status_effect/pacify //the affected is pacified, preventing direct hostile actions + #define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run #define STATUS_EFFECT_GEISTRACKER /datum/status_effect/geis_tracker //if you're using geis, this tracks that and keeps you from using scripture diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index ec8093b782..db2761356a 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -508,6 +508,25 @@ icon_state = "ichorial_stain" alerttooltipstyle = "clockcult" +datum/status_effect/pacify + id = "pacify" + status_type = STATUS_EFFECT_REPLACE + tick_interval = 1 + duration = 100 + alert_type = null + +/datum/status_effect/pacify/on_creation(mob/living/new_owner, set_duration) + if(isnum(set_duration)) + duration = set_duration + . = ..() + +/datum/status_effect/pacify/on_apply() + owner.add_trait(TRAIT_PACIFISM, "status_effect") + return ..() + +/datum/status_effect/pacify/on_remove() + owner.remove_trait(TRAIT_PACIFISM, "status_effect") + /datum/status_effect/trance id = "trance" status_type = STATUS_EFFECT_UNIQUE diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index c723e5fed9..fbcc55896d 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -12,6 +12,7 @@ crit_fail = FALSE //Is the flash burnt out? light_color = LIGHT_COLOR_WHITE light_power = FLASH_LIGHT_POWER + var/flashing_overlay = "flash-f" var/times_used = 0 //Number of times it's been used. var/burnout_resistance = 0 var/last_used = 0 //last world.time it was used. @@ -36,8 +37,8 @@ add_overlay("flashburnt") attached_overlays += "flashburnt" if(flash) - add_overlay("flash-f") - attached_overlays += "flash-f" + add_overlay(flashing_overlay) + attached_overlays += flashing_overlay addtimer(CALLBACK(src, .proc/update_icon), 5) if(holder) holder.update_icon() @@ -317,7 +318,7 @@ //ported from tg - check to make sure it can't appear where it's not supposed to. /obj/item/assembly/flash/hypnotic desc = "A modified flash device, programmed to emit a sequence of subliminal flashes that can send a vulnerable target into a hypnotic trance." - //flashing_overlay = "flash-hypno" doesn't seem to be in citcode yet. + flashing_overlay = "flash-hypno" //I cannot find this icon no matter how hard I look in tg, so I might just make my own. light_color = LIGHT_COLOR_PINK cooldown = 20 @@ -346,7 +347,7 @@ M.confused += min(M.confused + 10, 20) M.dizziness += min(M.dizziness + 10, 20) M.drowsyness += min(M.drowsyness + 10, 20) - //M.apply_status_effect(STATUS_EFFECT_PACIFY, 100) for when we port apply_status_effect pacifist (maybe I'll do it) + M.apply_status_effect(STATUS_EFFECT_PACIFY, 100) else M.apply_status_effect(/datum/status_effect/trance, 200, TRUE)