Combat rework adjustments (Making use of 512's new filter feature, small balance tweaks, and more) (#6092)
* makes use of 512's filters, adds combat mode toggle component signals, and more * Update phantomthief.dm * Update living.dm
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#define ui_boxarea "EAST-4:6,SOUTH+1:6"
|
||||
#define ui_boxlang "EAST-5:22,SOUTH+1:6"
|
||||
|
||||
//Filters
|
||||
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F")
|
||||
|
||||
//organ defines
|
||||
#define COCK_SIZE_MIN 1
|
||||
@@ -130,4 +132,7 @@
|
||||
#define EATING_NOISES 2
|
||||
#define DIGESTION_NOISES 4
|
||||
|
||||
#define TOGGLES_CITADEL (MEDIHOUND_SLEEPER|EATING_NOISES|DIGESTION_NOISES)
|
||||
#define TOGGLES_CITADEL (MEDIHOUND_SLEEPER|EATING_NOISES|DIGESTION_NOISES)
|
||||
|
||||
//component stuff
|
||||
#define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack.
|
||||
|
||||
/datum/component/phantomthief
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
var/filter_x
|
||||
var/filter_y
|
||||
var/filter_size
|
||||
var/filter_border
|
||||
var/filter_color
|
||||
|
||||
var/datum/component/redirect/combattoggle_redir
|
||||
|
||||
/datum/component/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _border = 0, _color = "#E62111")
|
||||
filter_x = _x
|
||||
filter_y = _y
|
||||
filter_size = _size
|
||||
filter_border = _border
|
||||
filter_color = _color
|
||||
|
||||
RegisterSignal(COMSIG_COMBAT_TOGGLED, .proc/handlefilterstuff)
|
||||
RegisterSignal(COMSIG_ITEM_EQUIPPED, .proc/OnEquipped)
|
||||
RegisterSignal(COMSIG_ITEM_DROPPED, .proc/OnDropped)
|
||||
|
||||
/datum/component/phantomthief/proc/handlefilterstuff(mob/user, combatmodestate)
|
||||
if(istype(user))
|
||||
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
|
||||
if(!combatmodestate)
|
||||
user.filters -= thefilter
|
||||
else
|
||||
user.filters += thefilter
|
||||
|
||||
/datum/component/phantomthief/proc/stripdesiredfilter(mob/user)
|
||||
if(istype(user))
|
||||
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
|
||||
user.filters -= thefilter
|
||||
|
||||
/datum/component/phantomthief/proc/OnEquipped(mob/user, slot)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(!combattoggle_redir)
|
||||
combattoggle_redir = user.AddComponent(/datum/component/redirect,list(COMSIG_COMBAT_TOGGLED),CALLBACK(src,.proc/handlefilterstuff))
|
||||
|
||||
/datum/component/phantomthief/proc/OnDropped(mob/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(combattoggle_redir)
|
||||
QDEL_NULL(combattoggle_redir)
|
||||
stripdesiredfilter(user)
|
||||
@@ -9,3 +9,7 @@
|
||||
return max(total_mass,MIN_MELEE_STAMCOST)
|
||||
else
|
||||
return initial(w_class)*1.25
|
||||
|
||||
/obj/item/melee/transforming/cleaving_saw
|
||||
total_mass = 2.75
|
||||
total_mass_on = 5
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/obj/item/clothing/glasses/phantomthief
|
||||
name = "suspicious paper mask"
|
||||
desc = "A cheap, Syndicate-branded paper face mask. They'll never see it coming."
|
||||
alternate_worn_icon = 'icons/mob/mask.dmi'
|
||||
icon = 'icons/obj/clothing/masks.dmi'
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
|
||||
/obj/item/clothing/glasses/phantomthief/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/phantomthief)
|
||||
@@ -27,6 +27,7 @@
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
|
||||
selector.rebasetointerbay(src)
|
||||
SendSignal(COMSIG_COMBAT_TOGGLED, src, combatmode)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/Move(atom/newloc, direct = 0)
|
||||
|
||||
@@ -111,9 +111,11 @@
|
||||
if(combatmode)
|
||||
toggle_combat_mode()
|
||||
recoveringstam = TRUE
|
||||
filters += CIT_FILTER_STAMINACRIT
|
||||
update_canmove()
|
||||
if(recoveringstam && total_health >= STAMINA_SOFTCRIT_TRADITIONAL)
|
||||
to_chat(src, "<span class='notice'>You don't feel nearly as exhausted anymore.</span>")
|
||||
recoveringstam = FALSE
|
||||
filters -= CIT_FILTER_STAMINACRIT
|
||||
update_canmove()
|
||||
update_health_hud()
|
||||
|
||||
@@ -10,3 +10,10 @@
|
||||
|
||||
/datum/uplink_item/dangerous/revolver
|
||||
item = /obj/item/gun/ballistic/revolver/syndie
|
||||
|
||||
/datum/uplink_item/badass/phantomthief
|
||||
name = "Syndicate Mask"
|
||||
desc = "A cheap paper mask to slap over your eyes."
|
||||
item = /obj/item/clothing/glasses/phantomthief
|
||||
cost = 0
|
||||
limited_stock = 4
|
||||
|
||||
@@ -2659,6 +2659,7 @@
|
||||
#include "modular_citadel\code\controllers\subsystem\shuttle.dm"
|
||||
#include "modular_citadel\code\datums\uplink_items_cit.dm"
|
||||
#include "modular_citadel\code\datums\components\material_container.dm"
|
||||
#include "modular_citadel\code\datums\components\phantomthief.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\generic_negative_events.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\moodular.dm"
|
||||
@@ -2749,6 +2750,7 @@
|
||||
#include "modular_citadel\code\modules\client\loadout\uniform.dm"
|
||||
#include "modular_citadel\code\modules\client\verbs\who.dm"
|
||||
#include "modular_citadel\code\modules\clothing\clothing.dm"
|
||||
#include "modular_citadel\code\modules\clothing\glasses\phantomthief.dm"
|
||||
#include "modular_citadel\code\modules\clothing\spacesuits\flightsuit.dm"
|
||||
#include "modular_citadel\code\modules\clothing\suits\polychromic_cloaks.dm"
|
||||
#include "modular_citadel\code\modules\clothing\suits\suits.dm"
|
||||
|
||||
Reference in New Issue
Block a user