diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 05c11e969c1..2c4a7bad3b0 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -110,6 +110,8 @@ #define STATUS_EFFECT_HOLDUP /datum/status_effect/holdup // you are currently pointing a gun at someone #define STATUS_EFFECT_HIGHFIVE /datum/status_effect/high_fiving // you are angling for a high five + +#define STATUS_EFFECT_SURRENDER /datum/status_effect/surrender // gives an alert to quickly surrender ///////////// // SLIME // ///////////// diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index b2793d2fc94..4e54ca36a40 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -123,6 +123,14 @@ desc = "Making any sudden moves would probably be a bad idea!" icon_state = "aimed" +/datum/status_effect/heldup/on_apply() + owner.apply_status_effect(STATUS_EFFECT_SURRENDER) + return ..() + +/datum/status_effect/heldup/on_remove() + owner.remove_status_effect(STATUS_EFFECT_SURRENDER) + return ..() + // holdup is for the person aiming /datum/status_effect/holdup id = "holdup" @@ -293,6 +301,23 @@ /datum/status_effect/high_fiving/proc/dropped_slap(obj/item/source) slap_item = null +//this effect gives the user an alert they can use to surrender quickly +/datum/status_effect/surrender + id = "surrender" + duration = -1 + tick_interval = -1 + status_type = STATUS_EFFECT_UNIQUE + alert_type = /atom/movable/screen/alert/status_effect/surrender + +/atom/movable/screen/alert/status_effect/surrender + name = "Surrender" + desc = "Looks like you're in trouble now, bud. Click here to surrender. (Warning: You will be incapacitated.)" + icon_state = "surrender" + +/atom/movable/screen/alert/status_effect/surrender/Click(location, control, params) + . = ..() + owner.emote("surrender") + /* * A status effect used for preventing caltrop message spam * diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 40b48db0910..d369875153d 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -360,6 +360,7 @@ if(. && isliving(user)) var/mob/living/L = user L.Paralyze(200) + L.remove_status_effect(STATUS_EFFECT_SURRENDER) /datum/emote/living/sway key = "sway" diff --git a/icons/hud/screen_alert.dmi b/icons/hud/screen_alert.dmi index d5f4ce48d34..fb35edddf62 100755 Binary files a/icons/hud/screen_alert.dmi and b/icons/hud/screen_alert.dmi differ