mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-27 07:09:40 +01:00
yea
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
///Action button checks if user is restrained
|
||||
#define AB_CHECK_RESTRAINED (1<<0)
|
||||
///Action button checks if user is stunned
|
||||
#define AB_CHECK_STUN (1<<1)
|
||||
///Action button checks if user is resting
|
||||
#define AB_CHECK_LYING (1<<2)
|
||||
///Action button checks if user is conscious
|
||||
#define AB_CHECK_CONSCIOUS (1<<3)
|
||||
|
||||
/*
|
||||
DEFINE_BITFIELD(check_flags, list(
|
||||
"CHECK IF RESTRAINED" = AB_CHECK_RESTRAINED,
|
||||
"CHECK IF STUNNED" = AB_CHECK_STUN,
|
||||
"CHECK IF LYING DOWN" = AB_CHECK_LYING,
|
||||
"CHECK IF CONSCIOUS" = AB_CHECK_CONSCIOUS,
|
||||
)) */
|
||||
|
||||
///Action button triggered with right click
|
||||
#define TRIGGER_SECONDARY_ACTION (1<<0)
|
||||
///Action triggered to ignore any availability checks
|
||||
#define TRIGGER_FORCE_AVAILABLE (1<<1)
|
||||
|
||||
#define ACTION_BUTTON_DEFAULT_BACKGROUND "_use_ui_default_background"
|
||||
|
||||
#define UPDATE_BUTTON_NAME (1<<0)
|
||||
#define UPDATE_BUTTON_ICON (1<<1)
|
||||
#define UPDATE_BUTTON_BACKGROUND (1<<2)
|
||||
#define UPDATE_BUTTON_OVERLAY (1<<3)
|
||||
#define UPDATE_BUTTON_STATUS (1<<4)
|
||||
|
||||
/// Takes in a typepath of a `/datum/action` and adds it to `src`.
|
||||
/// Only useful if you want to add the action and never desire to reference it again ever.
|
||||
#define GRANT_ACTION(typepath) do {\
|
||||
var/datum/action/_ability = new typepath(src);\
|
||||
_ability.Grant(src);\
|
||||
} while (FALSE)
|
||||
@@ -459,97 +459,6 @@
|
||||
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM sounds an audible alarm
|
||||
#define COMSIG_SUPERMATTER_DELAM_ALARM "sm_delam_alarm"
|
||||
|
||||
// /obj/item signals
|
||||
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
|
||||
#define COMPONENT_NO_INTERACT 1
|
||||
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
|
||||
#define COMPONENT_NO_ATTACK_OBJ 1
|
||||
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
|
||||
#define COMPONENT_NO_ATTACK 1
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_ALT_AFTERATTACK "item_alt_afterattack" //from base of obj/item/altafterattack(): (atom/target, mob/user, proximity, params)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
/// A mob has just unequipped an item.
|
||||
#define COMSIG_MOB_UNEQUIPPED_ITEM "mob_unequipped_item"
|
||||
// Do not grant actions on equip.
|
||||
#define COMPONENT_NO_GRANT_ACTIONS 1
|
||||
#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user)
|
||||
// relocated, tell inventory procs if those called this that the item isn't available anymore.
|
||||
#define COMPONENT_DROPPED_RELOCATION 1
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" //from base of item/sharpener/attackby(): (amount, max)
|
||||
#define COMPONENT_BLOCK_SHARPEN_APPLIED 1
|
||||
#define COMPONENT_BLOCK_SHARPEN_BLOCKED 2
|
||||
#define COMPONENT_BLOCK_SHARPEN_ALREADY 4
|
||||
#define COMPONENT_BLOCK_SHARPEN_MAXED 8
|
||||
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
|
||||
|
||||
// /obj/item signals for economy
|
||||
#define COMSIG_ITEM_SOLD "item_sold" //called when an item is sold by the exports subsystem
|
||||
#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped" //called when a wrapped up structure is opened by hand
|
||||
#define COMSIG_ITEM_UNWRAPPED "item_unwrapped" //called when a wrapped up item is opened by hand
|
||||
#define COMSIG_ITEM_SPLIT_VALUE 1
|
||||
#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits" //Called when getting the item's exact ratio for cargo's profit.
|
||||
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
#define COMSIG_ARMOR_PLATED "armor_plated" //called when an armor plate is successfully applied to an object
|
||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
// Item mouse siganls
|
||||
#define COMSIG_ITEM_MOUSE_EXIT "item_mouse_exit" //from base of obj/item/MouseExited(): (location, control, params)
|
||||
#define COMSIG_ITEM_MOUSE_ENTER "item_mouse_enter" //from base of obj/item/MouseEntered(): (location, control, params)
|
||||
#define COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN "deconstructor_deepscan" //Called by deconstructive analyzers deepscanning an item: (obj/machinery/rnd/destructive_analyzer/analyzer_machine, mob/user, list/information_list)
|
||||
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" ///from [/obj/item/proc/disableEmbedding]:
|
||||
#define COMSIG_MINE_TRIGGERED "minegoboom" ///from [/obj/effect/mine/proc/triggermine]:
|
||||
// Uncovered information
|
||||
#define COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION 1
|
||||
///Called when an item is being offered, from [/obj/item/proc/on_offered(mob/living/carbon/offerer)]
|
||||
#define COMSIG_ITEM_OFFERING "item_offering"
|
||||
///Interrupts the offer proc
|
||||
#define COMPONENT_OFFER_INTERRUPT (1<<0)
|
||||
///Called when an someone tries accepting an offered item, from [/obj/item/proc/on_offer_taken(mob/living/carbon/offer, mob/living/carbon/taker)]
|
||||
#define COMSIG_ITEM_OFFER_TAKEN "item_offer_taken"
|
||||
///Interrupts the offer acceptance
|
||||
#define COMPONENT_OFFER_TAKE_INTERRUPT (1<<0)
|
||||
///from [/obj/structure/closet/supplypod/proc/endlaunch]:
|
||||
#define COMSIG_SUPPLYPOD_LANDED "supplypodgoboom"
|
||||
|
||||
// /obj/item/grenade signals
|
||||
#define COMSIG_GRENADE_PRIME "grenade_prime" //called in /obj/item/gun/process_fire (user, target, params, zone_override)
|
||||
#define COMSIG_GRENADE_ARMED "grenade_armed" //called in /obj/item/gun/process_fire (user, target, params, zone_override)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
#define COMSIG_SUIT_MADE_HELMET "suit_made_helmet" //from base of obj/item/clothing/suit/MakeHelmet(): (helmet)
|
||||
|
||||
// /obj/item/implant signals
|
||||
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
|
||||
#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" //from base of /obj/item/implant/proc/implant(): (list/args)
|
||||
#define COMPONENT_STOP_IMPLANTING 1
|
||||
#define COMSIG_IMPLANT_OTHER "implant_other" //called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant)
|
||||
//#define COMPONENT_STOP_IMPLANTING 1 //The name makes sense for both
|
||||
#define COMPONENT_DELETE_NEW_IMPLANT 2
|
||||
#define COMPONENT_DELETE_OLD_IMPLANT 4
|
||||
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
|
||||
//This uses all return values of COMSIG_IMPLANT_OTHER
|
||||
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
|
||||
|
||||
// /obj/item/pda signals
|
||||
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
|
||||
#define COMPONENT_STOP_RINGTONE_CHANGE 1
|
||||
|
||||
// /obj/item/radio signals
|
||||
#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" //called from base of /obj/item/radio/proc/set_frequency(): (list/args)
|
||||
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit" ///from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle, hit_limb)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" ///from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle, hit_limb)
|
||||
@@ -680,10 +589,6 @@
|
||||
// /datum/component/squeak signals
|
||||
#define COMSIG_CROSS_SQUEAKED "cross_squeaked" // sent when a squeak component squeaks from crossing something, to delay anything else crossing that might squeak to prevent ear hurt.
|
||||
|
||||
// /datum/action signals
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
|
||||
|
||||
//Xenobio hotkeys
|
||||
#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob)
|
||||
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob)
|
||||
|
||||
@@ -1,6 +1,53 @@
|
||||
// Action signals
|
||||
|
||||
///from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger"
|
||||
// Return to block the trigger from occurring
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER (1<<0)
|
||||
/// From /datum/action/Grant(): (mob/grant_to)
|
||||
#define COMSIG_ACTION_GRANTED "action_grant"
|
||||
/// From /datum/action/Grant(): (datum/action)
|
||||
#define COMSIG_MOB_GRANTED_ACTION "mob_action_grant"
|
||||
/// From /datum/action/Remove(): (mob/removed_from)
|
||||
#define COMSIG_ACTION_REMOVED "action_removed"
|
||||
/// From /datum/action/Remove(): (datum/action)
|
||||
#define COMSIG_MOB_REMOVED_ACTION "mob_action_removed"
|
||||
/// From /datum/action/apply_button_overlay()
|
||||
#define COMSIG_ACTION_OVERLAY_APPLY "action_overlay_applied"
|
||||
|
||||
// Cooldown action signals
|
||||
|
||||
/// From base of /datum/action/cooldown/proc/PreActivate(), sent to the action owner: (datum/action/cooldown/activated)
|
||||
#define COMSIG_MOB_ABILITY_STARTED "mob_ability_base_started"
|
||||
/// Return to block the ability from starting / activating
|
||||
#define COMPONENT_BLOCK_ABILITY_START (1<<0)
|
||||
/// From base of /datum/action/cooldown/proc/PreActivate(), sent to the action owner: (datum/action/cooldown/finished)
|
||||
#define COMSIG_MOB_ABILITY_FINISHED "mob_ability_base_finished"
|
||||
|
||||
/// From base of /datum/action/cooldown/proc/set_statpanel_format(): (list/stat_panel_data)
|
||||
#define COMSIG_ACTION_SET_STATPANEL "ability_set_statpanel"
|
||||
|
||||
// Specific cooldown action signals
|
||||
|
||||
/// From base of /datum/action/cooldown/mob_cooldown/blood_warp/proc/blood_warp(): ()
|
||||
#define COMSIG_BLOOD_WARP "mob_ability_blood_warp"
|
||||
/// From base of /datum/action/cooldown/mob_cooldown/charge/proc/do_charge(): ()
|
||||
#define COMSIG_STARTED_CHARGE "mob_ability_charge_started"
|
||||
/// From base of /datum/action/cooldown/mob_cooldown/charge/proc/do_charge(): ()
|
||||
#define COMSIG_FINISHED_CHARGE "mob_ability_charge_finished"
|
||||
/// From base of /datum/action/cooldown/mob_cooldown/lava_swoop/proc/swoop_attack(): ()
|
||||
#define COMSIG_SWOOP_INVULNERABILITY_STARTED "mob_swoop_invulnerability_started"
|
||||
/// From base of /datum/action/cooldown/mob_cooldown/lava_swoop/proc/swoop_attack(): ()
|
||||
#define COMSIG_LAVA_ARENA_FAILED "mob_lava_arena_failed"
|
||||
|
||||
/// From /datum/action/vehicle/sealed/mecha/mech_toggle_safeties/proc/update_action_icon(): ()
|
||||
#define COMSIG_MECH_SAFETIES_TOGGLE "mech_safeties_toggle"
|
||||
|
||||
/// From /datum/action/cooldown/mob_cooldown/assume_form/proc/assume_appearances(), sent to the action owner: (atom/movable/target)
|
||||
#define COMSIG_ACTION_DISGUISED_APPEARANCE "mob_ability_disguise_appearance"
|
||||
|
||||
/// From /datum/action/cooldown/manual_heart/Activate(): ()
|
||||
#define COMSIG_HEART_MANUAL_PULSE "heart_manual_pulse"
|
||||
|
||||
/// From /datum/action/cooldown/mob_cooldown/capture_photo/Activate():
|
||||
#define COMSIG_ACTION_PHOTO_CAPTURED "action_photo_captured"
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
// /obj/item signals
|
||||
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
|
||||
#define COMPONENT_NO_INTERACT 1
|
||||
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
|
||||
#define COMPONENT_NO_ATTACK_OBJ 1
|
||||
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
|
||||
#define COMPONENT_NO_ATTACK 1
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_ALT_AFTERATTACK "item_alt_afterattack" //from base of obj/item/altafterattack(): (atom/target, mob/user, proximity, params)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
/// A mob has just unequipped an item.
|
||||
#define COMSIG_MOB_UNEQUIPPED_ITEM "mob_unequipped_item"
|
||||
// Do not grant actions on equip.
|
||||
#define COMPONENT_NO_GRANT_ACTIONS 1
|
||||
#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user)
|
||||
// relocated, tell inventory procs if those called this that the item isn't available anymore.
|
||||
#define COMPONENT_DROPPED_RELOCATION 1
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
|
||||
|
||||
/// Sent from obj/item/item_action_slot_check(): (mob/user, datum/action, slot)
|
||||
#define COMSIG_ITEM_UI_ACTION_SLOT_CHECKED "item_action_slot_checked"
|
||||
/// Return to prevent the default behavior (attack_selfing) from occurring.
|
||||
#define COMPONENT_ITEM_ACTION_SLOT_INVALID (1<<0)
|
||||
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" //from base of item/sharpener/attackby(): (amount, max)
|
||||
#define COMPONENT_BLOCK_SHARPEN_APPLIED 1
|
||||
#define COMPONENT_BLOCK_SHARPEN_BLOCKED 2
|
||||
#define COMPONENT_BLOCK_SHARPEN_ALREADY 4
|
||||
#define COMPONENT_BLOCK_SHARPEN_MAXED 8
|
||||
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
|
||||
|
||||
// /obj/item signals for economy
|
||||
#define COMSIG_ITEM_SOLD "item_sold" //called when an item is sold by the exports subsystem
|
||||
#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped" //called when a wrapped up structure is opened by hand
|
||||
#define COMSIG_ITEM_UNWRAPPED "item_unwrapped" //called when a wrapped up item is opened by hand
|
||||
#define COMSIG_ITEM_SPLIT_VALUE 1
|
||||
#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits" //Called when getting the item's exact ratio for cargo's profit.
|
||||
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
#define COMSIG_ARMOR_PLATED "armor_plated" //called when an armor plate is successfully applied to an object
|
||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
// Item mouse siganls
|
||||
#define COMSIG_ITEM_MOUSE_EXIT "item_mouse_exit" //from base of obj/item/MouseExited(): (location, control, params)
|
||||
#define COMSIG_ITEM_MOUSE_ENTER "item_mouse_enter" //from base of obj/item/MouseEntered(): (location, control, params)
|
||||
#define COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN "deconstructor_deepscan" //Called by deconstructive analyzers deepscanning an item: (obj/machinery/rnd/destructive_analyzer/analyzer_machine, mob/user, list/information_list)
|
||||
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" ///from [/obj/item/proc/disableEmbedding]:
|
||||
#define COMSIG_MINE_TRIGGERED "minegoboom" ///from [/obj/effect/mine/proc/triggermine]:
|
||||
// Uncovered information
|
||||
#define COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION 1
|
||||
///Called when an item is being offered, from [/obj/item/proc/on_offered(mob/living/carbon/offerer)]
|
||||
#define COMSIG_ITEM_OFFERING "item_offering"
|
||||
///Interrupts the offer proc
|
||||
#define COMPONENT_OFFER_INTERRUPT (1<<0)
|
||||
///Called when an someone tries accepting an offered item, from [/obj/item/proc/on_offer_taken(mob/living/carbon/offer, mob/living/carbon/taker)]
|
||||
#define COMSIG_ITEM_OFFER_TAKEN "item_offer_taken"
|
||||
///Interrupts the offer acceptance
|
||||
#define COMPONENT_OFFER_TAKE_INTERRUPT (1<<0)
|
||||
///from [/obj/structure/closet/supplypod/proc/endlaunch]:
|
||||
#define COMSIG_SUPPLYPOD_LANDED "supplypodgoboom"
|
||||
|
||||
// /obj/item/grenade signals
|
||||
#define COMSIG_GRENADE_PRIME "grenade_prime" //called in /obj/item/gun/process_fire (user, target, params, zone_override)
|
||||
#define COMSIG_GRENADE_ARMED "grenade_armed" //called in /obj/item/gun/process_fire (user, target, params, zone_override)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
#define COMSIG_SUIT_MADE_HELMET "suit_made_helmet" //from base of obj/item/clothing/suit/MakeHelmet(): (helmet)
|
||||
|
||||
// /obj/item/implant signals
|
||||
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
|
||||
#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" //from base of /obj/item/implant/proc/implant(): (list/args)
|
||||
#define COMPONENT_STOP_IMPLANTING 1
|
||||
#define COMSIG_IMPLANT_OTHER "implant_other" //called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant)
|
||||
//#define COMPONENT_STOP_IMPLANTING 1 //The name makes sense for both
|
||||
#define COMPONENT_DELETE_NEW_IMPLANT 2
|
||||
#define COMPONENT_DELETE_OLD_IMPLANT 4
|
||||
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
|
||||
//This uses all return values of COMSIG_IMPLANT_OTHER
|
||||
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
|
||||
|
||||
// /obj/item/pda signals
|
||||
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
|
||||
#define COMPONENT_STOP_RINGTONE_CHANGE 1
|
||||
|
||||
// /obj/item/radio signals
|
||||
#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" //called from base of /obj/item/radio/proc/set_frequency(): (list/args)
|
||||
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
@@ -1,3 +1,5 @@
|
||||
#define INVISIBILITY_NONE 0
|
||||
|
||||
#define SEE_INVISIBLE_MINIMUM 5
|
||||
|
||||
#define INVISIBILITY_LIGHTING 20
|
||||
|
||||
@@ -56,8 +56,10 @@
|
||||
#define span_icon(str) ("<span class='icon'>" + str + "</span>")
|
||||
#define span_info(str) ("<span class='info'>" + str + "</span>")
|
||||
#define span_interface(str) ("<span class='interface'>" + str + "</span>")
|
||||
#define span_italics(str) ("<span class='italics" + str + "</span>")
|
||||
#define span_linkify(str) ("<span class='linkify'>" + str + "</span>")
|
||||
#define span_looc(str) ("<span class='looc'>" + str + "</span>")
|
||||
#define span_love(str) ("<span class='love'>" + str + "</span>")
|
||||
#define span_medal(str) ("<span class='medal'>" + str + "</span>")
|
||||
#define span_medradio(str) ("<span class='medradio'>" + str + "</span>")
|
||||
#define span_memo(str) ("<span class='memo'>" + str + "</span>")
|
||||
|
||||
@@ -662,12 +662,18 @@
|
||||
/datum/action/report
|
||||
name = "Show roundend report"
|
||||
button_icon_state = "round_end"
|
||||
check_flags = NONE
|
||||
required_mobility_flags = NONE
|
||||
|
||||
/datum/action/report/Trigger()
|
||||
/datum/action/report/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(owner && GLOB.common_report && SSticker.current_state == GAME_STATE_FINISHED)
|
||||
SSticker.show_roundend_report(owner.client)
|
||||
return TRUE
|
||||
|
||||
/datum/action/report/IsAvailable()
|
||||
/datum/action/report/IsAvailable(feedback)
|
||||
return TRUE
|
||||
|
||||
/datum/action/report/Topic(href,href_list)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
|
||||
|
||||
/atom/movable/screen/movable/action_button
|
||||
var/datum/action/linked_action
|
||||
var/datum/hud/our_hud
|
||||
@@ -7,9 +5,13 @@
|
||||
screen_loc = null
|
||||
mouse_over_pointer = MOUSE_HAND_POINTER
|
||||
|
||||
var/button_icon_state
|
||||
var/appearance_cache
|
||||
/// The icon state of our active overlay, used to prevent re-applying identical overlays
|
||||
var/active_overlay_icon_state
|
||||
/// The icon state of our active underlay, used to prevent re-applying identical underlays
|
||||
var/active_underlay_icon_state
|
||||
/// The overlay we have overtop our button
|
||||
var/mutable_appearance/button_overlay
|
||||
|
||||
/// Where we are currently placed on the hud. SCRN_OBJ_DEFAULT asks the linked action what it thinks
|
||||
var/location = SCRN_OBJ_DEFAULT
|
||||
/// A unique bitflag, combined with the name of our linked action this lets us persistently remember any user changes to our position
|
||||
@@ -17,6 +19,8 @@
|
||||
/// A weakref of the last thing we hovered over
|
||||
/// God I hate how dragging works
|
||||
var/datum/weakref/last_hovored_ref
|
||||
/// overlay for keybind maptext
|
||||
var/mutable_appearance/keybind_maptext
|
||||
|
||||
/atom/movable/screen/movable/action_button/Destroy()
|
||||
if(our_hud)
|
||||
@@ -44,20 +48,33 @@
|
||||
|
||||
/atom/movable/screen/movable/action_button/Click(location,control,params)
|
||||
if (!can_use(usr))
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
/* if(LAZYACCESS(modifiers, ALT_CLICK))
|
||||
begin_creating_bind(usr)
|
||||
return TRUE */
|
||||
if(LAZYACCESS(modifiers, SHIFT_CLICK))
|
||||
var/datum/hud/our_hud = usr.hud_used
|
||||
our_hud.position_action(src, SCRN_OBJ_DEFAULT)
|
||||
return TRUE
|
||||
var/mob/clicker = usr
|
||||
if(!clicker.CheckActionCooldown())
|
||||
if(!usr.CheckActionCooldown())
|
||||
return
|
||||
clicker.DelayNextAction(1)
|
||||
linked_action.Trigger()
|
||||
usr.DelayNextAction(1)
|
||||
var/trigger_flags
|
||||
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
||||
trigger_flags |= TRIGGER_SECONDARY_ACTION
|
||||
linked_action.Trigger(trigger_flags = trigger_flags)
|
||||
return TRUE
|
||||
|
||||
/* /atom/movable/screen/movable/action_button/proc/begin_creating_bind(mob/user)
|
||||
if(!isnull(linked_action.full_key))
|
||||
linked_action.full_key = null
|
||||
linked_action.update_button_status(src)
|
||||
return
|
||||
linked_action.full_key = tgui_input_keycombo(user, "Please bind a key for this action.")
|
||||
linked_action.update_button_status(src) */
|
||||
|
||||
// Entered and Exited won't fire while you're dragging something, because you're still "holding" it
|
||||
// Very much byond logic, but I want nice behavior, so we fake it with drag
|
||||
/atom/movable/screen/movable/action_button/MouseDrag(atom/over_object, atom/src_location, atom/over_location, src_control, over_control, params)
|
||||
@@ -77,11 +94,8 @@
|
||||
if(old_object)
|
||||
old_object.MouseExited(over_location, over_control, params)
|
||||
|
||||
if(QDELETED(over_location))
|
||||
last_hovored_ref = null
|
||||
return
|
||||
last_hovored_ref = WEAKREF(over_object)
|
||||
over_object.MouseEntered(over_location, over_control, params)
|
||||
over_object?.MouseEntered(over_location, over_control, params)
|
||||
|
||||
/atom/movable/screen/movable/action_button/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
@@ -96,30 +110,37 @@
|
||||
last_hovored_ref = null
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
var/datum/hud/our_hud = usr.hud_used
|
||||
if(over_object == src)
|
||||
our_hud.hide_landings()
|
||||
return
|
||||
|
||||
if(istype(over_object, /atom/movable/screen/action_landing))
|
||||
var/atom/movable/screen/action_landing/reserve = over_object
|
||||
reserve.hit_by(src)
|
||||
our_hud.hide_landings()
|
||||
save_position()
|
||||
our_hud.hide_landings()
|
||||
return
|
||||
|
||||
our_hud.hide_landings()
|
||||
if(istype(over_object, /atom/movable/screen/button_palette) || istype(over_object, /atom/movable/screen/palette_scroll))
|
||||
our_hud.position_action(src, SCRN_OBJ_IN_PALETTE)
|
||||
save_position()
|
||||
our_hud.hide_landings()
|
||||
return
|
||||
|
||||
if(istype(over_object, /atom/movable/screen/movable/action_button))
|
||||
var/atom/movable/screen/movable/action_button/button = over_object
|
||||
our_hud.position_action_relative(src, button)
|
||||
save_position()
|
||||
our_hud.hide_landings()
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
our_hud.position_action(src, screen_loc)
|
||||
save_position()
|
||||
our_hud.hide_landings()
|
||||
|
||||
/atom/movable/screen/movable/action_button/proc/save_position()
|
||||
var/mob/user = our_hud.mymob
|
||||
@@ -151,6 +172,15 @@
|
||||
user.client.prefs.action_buttons_screen_locs -= "[name]_[id]"
|
||||
user.client.prefs.queue_save_pref(1 SECONDS, TRUE)
|
||||
|
||||
/atom/movable/screen/movable/action_button/proc/update_keybind_maptext(key)
|
||||
cut_overlay(keybind_maptext)
|
||||
if(!key)
|
||||
return
|
||||
keybind_maptext = new
|
||||
keybind_maptext.maptext = MAPTEXT("<span style='text-align: right'>[key]</span>")
|
||||
keybind_maptext.transform = keybind_maptext.transform.Translate(-4, length(key) > 1 ? -6 : 2) //with modifiers, its placed lower so cooldown is visible
|
||||
add_overlay(keybind_maptext)
|
||||
|
||||
/**
|
||||
* This is a silly proc used in hud code code to determine what icon and icon state we should be using
|
||||
* for hud elements (such as action buttons) that don't have their own icon and icon state set.
|
||||
@@ -161,13 +191,18 @@
|
||||
. = list()
|
||||
.["bg_icon"] = ui_style
|
||||
.["bg_state"] = "template"
|
||||
.["bg_state_active"] = "template_active"
|
||||
|
||||
//see human and alien hud for specific implementations.
|
||||
|
||||
/mob/proc/update_action_buttons_icon(status_only = FALSE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons(status_only)
|
||||
/**
|
||||
* Updates all action buttons this mob has.
|
||||
*
|
||||
* Arguments:
|
||||
* * update_flags - Which flags of the action should we update
|
||||
* * force - Force buttons update even if the given button icon state has not changed
|
||||
*/
|
||||
/mob/proc/update_mob_action_buttons(update_flags = ALL, force = FALSE)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.build_all_button_icons(update_flags, force)
|
||||
|
||||
/**
|
||||
* This proc handles adding all of the mob's actions to their screen
|
||||
@@ -186,7 +221,7 @@
|
||||
|
||||
for(var/datum/action/action as anything in actions)
|
||||
var/atom/movable/screen/movable/action_button/button = action.viewers[hud_used]
|
||||
action.UpdateButtons()
|
||||
action.build_all_button_icons()
|
||||
if(reload_screen)
|
||||
client.screen += button
|
||||
|
||||
@@ -195,6 +230,48 @@
|
||||
// This holds the logic for the palette buttons
|
||||
hud_used.palette_actions.refresh_actions()
|
||||
|
||||
/**
|
||||
* Show (most) of the another mob's action buttons to this mob
|
||||
*
|
||||
* Used for observers viewing another mob's screen
|
||||
*/
|
||||
/mob/proc/show_other_mob_action_buttons(mob/take_from)
|
||||
if(!hud_used || !client)
|
||||
return
|
||||
|
||||
for(var/datum/action/action as anything in take_from.actions)
|
||||
if(!action.show_to_observers || !action.owner_has_control)
|
||||
continue
|
||||
action.GiveAction(src)
|
||||
RegisterSignal(take_from, COMSIG_MOB_GRANTED_ACTION, PROC_REF(on_observing_action_granted))
|
||||
RegisterSignal(take_from, COMSIG_MOB_REMOVED_ACTION, PROC_REF(on_observing_action_removed))
|
||||
|
||||
/**
|
||||
* Hide another mob's action buttons from this mob
|
||||
*
|
||||
* Used for observers viewing another mob's screen
|
||||
*/
|
||||
/mob/proc/hide_other_mob_action_buttons(mob/take_from)
|
||||
for(var/datum/action/action as anything in take_from.actions)
|
||||
action.HideFrom(src)
|
||||
UnregisterSignal(take_from, list(COMSIG_MOB_GRANTED_ACTION, COMSIG_MOB_REMOVED_ACTION))
|
||||
|
||||
/// Signal proc for [COMSIG_MOB_GRANTED_ACTION] - If we're viewing another mob's action buttons,
|
||||
/// we need to update with any newly added buttons granted to the mob.
|
||||
/mob/proc/on_observing_action_granted(mob/living/source, datum/action/action)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!action.show_to_observers || !action.owner_has_control)
|
||||
return
|
||||
action.GiveAction(src)
|
||||
|
||||
/// Signal proc for [COMSIG_MOB_REMOVED_ACTION] - If we're viewing another mob's action buttons,
|
||||
/// we need to update with any removed buttons from the mob.
|
||||
/mob/proc/on_observing_action_removed(mob/living/source, datum/action/action)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
action.HideFrom(src)
|
||||
|
||||
/atom/movable/screen/button_palette
|
||||
desc = "<b>Drag</b> buttons to move them<br><b>Shift-click</b> any button to reset it<br><b>Alt-click</b> this to reset all buttons"
|
||||
icon = 'icons/hud/64x16_actions.dmi'
|
||||
@@ -220,6 +297,7 @@
|
||||
/atom/movable/screen/button_palette/proc/set_hud(datum/hud/our_hud)
|
||||
src.our_hud = our_hud
|
||||
refresh_owner()
|
||||
disable_landing() // If our hud already has elements, don't force hide us
|
||||
|
||||
/atom/movable/screen/button_palette/update_name(updates)
|
||||
. = ..()
|
||||
@@ -241,6 +319,21 @@
|
||||
|
||||
icon_state = "[ui_name]_palette"
|
||||
|
||||
/atom/movable/screen/button_palette/proc/activate_landing()
|
||||
// Reveal ourselves to the user
|
||||
invisibility = INVISIBILITY_NONE
|
||||
|
||||
/atom/movable/screen/button_palette/proc/disable_landing()
|
||||
// If we have no elements in the palette, hide your ugly self please
|
||||
if (!length(our_hud.palette_actions?.actions) && !length(our_hud.floating_actions))
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/atom/movable/screen/button_palette/proc/update_state()
|
||||
if (length(our_hud.floating_actions))
|
||||
activate_landing()
|
||||
else
|
||||
disable_landing()
|
||||
|
||||
/atom/movable/screen/button_palette/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -134,10 +134,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
QDEL_NULL(module_store_icon)
|
||||
QDEL_LIST(static_inventory)
|
||||
|
||||
// all already deleted by static inventory clear
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
zone_select = null
|
||||
pull_icon = null
|
||||
rest_icon = null
|
||||
hand_slots.Cut()
|
||||
|
||||
QDEL_LIST(toggleable_inventory)
|
||||
QDEL_LIST(hotkeybuttons)
|
||||
@@ -255,6 +258,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
show_hud(hud_version, M)
|
||||
else if (viewmob.hud_used)
|
||||
viewmob.hud_used.plane_masters_update()
|
||||
viewmob.show_other_mob_action_buttons(mymob)
|
||||
|
||||
screenmob.reload_rendering()
|
||||
|
||||
@@ -369,6 +373,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
floating_actions += button
|
||||
button.screen_loc = position
|
||||
position = SCRN_OBJ_FLOATING
|
||||
toggle_palette.update_state()
|
||||
|
||||
button.location = position
|
||||
|
||||
@@ -387,6 +392,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
position_action(button, button.linked_action.default_button_position)
|
||||
return
|
||||
button.screen_loc = get_valid_screen_location(relative_to.screen_loc, world.icon_size, our_client.view_size.getView()) // Asks for a location adjacent to our button that won't overflow the map
|
||||
toggle_palette.update_state()
|
||||
|
||||
button.location = relative_to.location
|
||||
|
||||
@@ -396,6 +402,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
if(SCRN_OBJ_DEFAULT) // Invalid
|
||||
CRASH("We just tried to hide an action buttion that somehow has the default position as its location, you done fucked up")
|
||||
if(SCRN_OBJ_FLOATING)
|
||||
toggle_palette.update_state()
|
||||
floating_actions -= button
|
||||
if(SCRN_OBJ_IN_LIST)
|
||||
listed_actions.remove_action(button)
|
||||
@@ -407,11 +414,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
/datum/hud/proc/generate_landings(atom/movable/screen/movable/action_button/button)
|
||||
listed_actions.generate_landing()
|
||||
palette_actions.generate_landing()
|
||||
toggle_palette.activate_landing()
|
||||
|
||||
/// Clears all currently visible landings
|
||||
/datum/hud/proc/hide_landings()
|
||||
listed_actions.clear_landing()
|
||||
palette_actions.clear_landing()
|
||||
toggle_palette.disable_landing()
|
||||
|
||||
// Updates any existing "owned" visuals, ensures they continue to be visible
|
||||
/datum/hud/proc/update_our_owner()
|
||||
@@ -429,7 +438,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
listed_actions.check_against_view()
|
||||
palette_actions.check_against_view()
|
||||
for(var/atom/movable/screen/movable/action_button/floating_button as anything in floating_actions)
|
||||
var/list/current_offsets = screen_loc_to_offset(floating_button.screen_loc)
|
||||
var/list/current_offsets = screen_loc_to_offset(floating_button.screen_loc, our_view)
|
||||
// We set the view arg here, so the output will be properly hemm'd in by our new view
|
||||
floating_button.screen_loc = offset_to_screen_loc(current_offsets[1], current_offsets[2], view = our_view)
|
||||
|
||||
@@ -442,7 +451,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
var/atom/movable/screen/movable/action_button/button = action.viewers[src]
|
||||
if(!button)
|
||||
action.ShowTo(mymob)
|
||||
button = action.viewers[src]
|
||||
else
|
||||
position_action(button, button.location)
|
||||
|
||||
@@ -655,4 +663,4 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
|
||||
/datum/action_group/listed/refresh_actions()
|
||||
. = ..()
|
||||
owner?.palette_actions.refresh_actions() // We effect them, so we gotta refresh em
|
||||
owner.palette_actions.refresh_actions() // We effect them, so we gotta refresh em
|
||||
|
||||
@@ -620,6 +620,8 @@
|
||||
return
|
||||
SEND_SOUND(hud.mymob, sound('sound/effects/splat.ogg', volume = 50))
|
||||
SSticker.start_immediately = TRUE
|
||||
if(SSticker.current_state == GAME_STATE_STARTUP)
|
||||
to_chat(usr, span_admin("The server is still setting up, but the round will be started as soon as possible."))
|
||||
|
||||
#undef SHUTTER_MOVEMENT_DURATION
|
||||
#undef SHUTTER_WAIT_DURATION
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
var/image/item_overlay = image(holding)
|
||||
item_overlay.alpha = 92
|
||||
|
||||
if(!holding.mob_can_equip(user, slot_id, disable_warning = TRUE, bypass_equip_delay_self = TRUE))
|
||||
if(!holding.mob_can_equip(user, user, slot_id, disable_warning = TRUE, bypass_equip_delay_self = TRUE))
|
||||
item_overlay.color = "#FF0000"
|
||||
else
|
||||
item_overlay.color = "#00ff00"
|
||||
@@ -596,7 +596,7 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/atom/movable/screen/healths/clock
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon = 'icons/hud/actions.dmi'
|
||||
icon_state = "bg_clock"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
@@ -608,7 +608,7 @@
|
||||
|
||||
/atom/movable/screen/healths/revenant
|
||||
name = "essence"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon = 'icons/hud/actions.dmi'
|
||||
icon_state = "bg_revenant"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
@@ -56,9 +56,8 @@ SUBSYSTEM_DEF(augury)
|
||||
|
||||
/datum/action/innate/augury
|
||||
name = "Auto Follow Debris"
|
||||
icon_icon = 'icons/obj/meteor.dmi'
|
||||
button_icon = 'icons/obj/meteor.dmi'
|
||||
button_icon_state = "flaming"
|
||||
background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND
|
||||
|
||||
/datum/action/innate/augury/Destroy()
|
||||
if(owner)
|
||||
@@ -67,19 +66,10 @@ SUBSYSTEM_DEF(augury)
|
||||
|
||||
/datum/action/innate/augury/Activate()
|
||||
SSaugury.watchers += owner
|
||||
to_chat(owner, "<span class='notice'>You are now auto-following debris.</span>")
|
||||
to_chat(owner, span_notice("You are now auto-following debris."))
|
||||
active = TRUE
|
||||
UpdateButtons()
|
||||
|
||||
/datum/action/innate/augury/Deactivate()
|
||||
SSaugury.watchers -= owner
|
||||
to_chat(owner, "<span class='notice'>You are no longer auto-following debris.</span>")
|
||||
to_chat(owner, span_notice("You are no longer auto-following debris."))
|
||||
active = FALSE
|
||||
UpdateButtons()
|
||||
|
||||
/datum/action/innate/augury/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force)
|
||||
..()
|
||||
if(active)
|
||||
button.icon_state = "template_active"
|
||||
else
|
||||
button.icon_state = "template"
|
||||
|
||||
@@ -728,14 +728,21 @@ SUBSYSTEM_DEF(vote)
|
||||
/datum/action/vote
|
||||
name = "Vote!"
|
||||
button_icon_state = "vote"
|
||||
check_flags = NONE
|
||||
required_mobility_flags = NONE
|
||||
|
||||
/datum/action/vote/Trigger()
|
||||
if(owner)
|
||||
owner.vote()
|
||||
remove_from_client()
|
||||
Remove(owner)
|
||||
/datum/action/vote/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!owner)
|
||||
return FALSE
|
||||
owner.vote()
|
||||
remove_from_client()
|
||||
Remove(owner)
|
||||
return TRUE
|
||||
|
||||
/datum/action/vote/IsAvailable(silent = FALSE)
|
||||
/datum/action/vote/IsAvailable(feedback = TRUE)
|
||||
return TRUE
|
||||
|
||||
/datum/action/vote/proc/remove_from_client()
|
||||
|
||||
+366
-384
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
|
||||
/datum/action/item_action/zoom_speed_action
|
||||
name = "Toggle Zooming Speed"
|
||||
icon_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon_state = "projectile"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
/datum/action/item_action/zoom_lock_action
|
||||
name = "Switch Zoom Mode"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "zoom_mode"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
#define COOLDOWN_NO_DISPLAY_TIME (180 SECONDS)
|
||||
|
||||
/// Preset for an action with a cooldown
|
||||
/datum/action/cooldown
|
||||
check_flags = 0
|
||||
transparent_when_unavailable = FALSE
|
||||
/// The default cooldown applied when StartCooldown() is called
|
||||
var/cooldown_time = 0
|
||||
/// The actual next time this ability can be used
|
||||
var/next_use_time = 0
|
||||
/// Whether or not you want the cooldown for the ability to display in text form
|
||||
var/text_cooldown = TRUE
|
||||
/// Significant figures to round cooldown to
|
||||
var/cooldown_rounding = 0.1
|
||||
/// Setting for intercepting clicks before activating the ability
|
||||
var/click_to_activate = FALSE
|
||||
/// Shares cooldowns with other cooldown abilities of the same value, not active if null
|
||||
var/shared_cooldown
|
||||
/// The base icon_state of this action's background
|
||||
var/base_background_icon_state
|
||||
/// The icon state the background uses when active
|
||||
var/active_background_icon_state
|
||||
/// The base icon_state of the overlay we apply
|
||||
var/base_overlay_icon_state
|
||||
/// The active icon_state of the overlay we apply
|
||||
var/active_overlay_icon_state
|
||||
/// The base icon state of the spell's button icon, used for editing the icon "off"
|
||||
var/base_icon_state
|
||||
/// The active icon state of the spell's button icon, used for editing the icon "on"
|
||||
var/active_icon_state
|
||||
|
||||
/datum/action/cooldown/create_button()
|
||||
var/atom/movable/screen/movable/action_button/button = ..()
|
||||
button.maptext = ""
|
||||
button.maptext_x = 8
|
||||
button.maptext_y = 0
|
||||
button.maptext_width = 24
|
||||
button.maptext_height = 12
|
||||
return button
|
||||
|
||||
/datum/action/cooldown/update_button_status(atom/movable/screen/movable/action_button/button, force = FALSE)
|
||||
. = ..()
|
||||
var/time_left = max(next_use_time - world.time, 0)
|
||||
if(!text_cooldown || !owner || time_left == 0 || time_left >= COOLDOWN_NO_DISPLAY_TIME)
|
||||
button.maptext = ""
|
||||
else
|
||||
if (cooldown_rounding > 0)
|
||||
button.maptext = MAPTEXT_TINY_UNICODE("[round(time_left/10, cooldown_rounding)]")
|
||||
else
|
||||
button.maptext = MAPTEXT_TINY_UNICODE("[round(time_left/10)]")
|
||||
|
||||
if(!IsAvailable() || !is_action_active(button))
|
||||
return
|
||||
// If we don't change the icon state, or don't apply a special overlay,
|
||||
if(active_background_icon_state || active_icon_state || active_overlay_icon_state)
|
||||
return
|
||||
// ...we need to show it's active somehow. So, make it greeeen
|
||||
button.color = COLOR_GREEN
|
||||
|
||||
/datum/action/cooldown/apply_button_background(atom/movable/screen/movable/action_button/current_button, force)
|
||||
if(active_background_icon_state)
|
||||
background_icon_state = is_action_active(current_button) ? active_background_icon_state : base_background_icon_state
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/apply_button_icon(atom/movable/screen/movable/action_button/current_button, force)
|
||||
if(active_icon_state)
|
||||
button_icon_state = is_action_active(current_button) ? active_icon_state : base_icon_state
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/apply_button_overlay(atom/movable/screen/movable/action_button/current_button, force)
|
||||
if(active_overlay_icon_state)
|
||||
overlay_icon_state = is_action_active(current_button) ? active_overlay_icon_state : base_overlay_icon_state
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/is_action_active(atom/movable/screen/movable/action_button/current_button)
|
||||
return click_to_activate && current_button.our_hud?.mymob?.click_intercept == src
|
||||
|
||||
/datum/action/cooldown/IsAvailable(feedback = FALSE)
|
||||
return ..() && (next_use_time <= world.time)
|
||||
|
||||
/// Starts a cooldown time to be shared with similar abilities, will use default cooldown time if an override is not specified
|
||||
/datum/action/cooldown/proc/StartCooldown(override_cooldown_time)
|
||||
if(shared_cooldown)
|
||||
for(var/datum/action/cooldown/shared_ability in owner.actions - src)
|
||||
if(shared_cooldown == shared_ability.shared_cooldown)
|
||||
if(isnum(override_cooldown_time))
|
||||
shared_ability.StartCooldownSelf(override_cooldown_time)
|
||||
else
|
||||
shared_ability.StartCooldownSelf(cooldown_time)
|
||||
StartCooldownSelf(override_cooldown_time)
|
||||
|
||||
/// Starts a cooldown time for this ability only, will use default cooldown time if an override is not specified
|
||||
/datum/action/cooldown/proc/StartCooldownSelf(override_cooldown_time)
|
||||
if(isnum(override_cooldown_time))
|
||||
next_use_time = world.time + override_cooldown_time
|
||||
else
|
||||
next_use_time = world.time + cooldown_time
|
||||
build_all_button_icons()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/datum/action/cooldown/Trigger(trigger_flags, atom/target)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!owner)
|
||||
return FALSE
|
||||
if(click_to_activate)
|
||||
if(target)
|
||||
// For automatic / mob handling
|
||||
return InterceptClickOn(owner, null, target)
|
||||
if(owner.click_intercept == src)
|
||||
owner.click_intercept = null
|
||||
else
|
||||
owner.click_intercept = src
|
||||
for(var/datum/action/cooldown/ability in owner.actions)
|
||||
ability.build_all_button_icons()
|
||||
return TRUE
|
||||
return PreActivate(owner)
|
||||
|
||||
/// Intercepts client owner clicks to activate the ability
|
||||
/datum/action/cooldown/proc/InterceptClickOn(mob/living/caller, params, atom/target)
|
||||
if(!IsAvailable())
|
||||
return FALSE
|
||||
if(!target)
|
||||
return FALSE
|
||||
PreActivate(target)
|
||||
caller.click_intercept = null
|
||||
return TRUE
|
||||
|
||||
/// For signal calling
|
||||
/datum/action/cooldown/proc/PreActivate(atom/target)
|
||||
if(SEND_SIGNAL(owner, COMSIG_MOB_ABILITY_STARTED, src) & COMPONENT_BLOCK_ABILITY_START)
|
||||
return
|
||||
. = Activate(target)
|
||||
SEND_SIGNAL(owner, COMSIG_MOB_ABILITY_FINISHED, src)
|
||||
|
||||
/// To be implemented by subtypes
|
||||
/datum/action/cooldown/proc/Activate(atom/target)
|
||||
return
|
||||
|
||||
/datum/action/cooldown/process()
|
||||
var/time_left = max(next_use_time - world.time, 0)
|
||||
if(!owner || time_left == 0)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/cooldown/Grant(mob/M)
|
||||
..()
|
||||
if(!owner)
|
||||
return
|
||||
build_all_button_icons()
|
||||
if(next_use_time > world.time)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
@@ -1,117 +1,126 @@
|
||||
/datum/action/item_action/flightsuit
|
||||
icon_icon = 'icons/mob/actions/actions_flightsuit.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_flightsuit.dmi'
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_boots
|
||||
name = "Toggle Boots"
|
||||
button_icon_state = "flightsuit_shoes"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_boots/Trigger()
|
||||
/datum/action/item_action/flightsuit/toggle_boots/do_effect(trigger_flags)
|
||||
var/obj/item/clothing/suit/space/hardsuit/flightsuit/FS = target
|
||||
if(istype(FS))
|
||||
FS.deployedshoes? FS.retract_flightshoes() : FS.extend_flightshoes()
|
||||
return ..()
|
||||
if(!istype(FS))
|
||||
return FALSE
|
||||
FS.deployedshoes? FS.retract_flightshoes() : FS.extend_flightshoes()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_helmet
|
||||
name = "Toggle Helmet"
|
||||
button_icon_state = "flightsuit_helmet"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_helmet/Trigger()
|
||||
/datum/action/item_action/flightsuit/toggle_helmet/do_effect(trigger_flags)
|
||||
var/obj/item/clothing/suit/space/hardsuit/flightsuit/FS = target
|
||||
if(istype(FS))
|
||||
FS.ToggleHelmet()
|
||||
return ..()
|
||||
if(!istype(FS))
|
||||
return FALSE
|
||||
FS.ToggleHelmet()
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_flightpack
|
||||
name = "Toggle Flightpack"
|
||||
button_icon_state = "flightsuit_pack"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
/datum/action/item_action/flightsuit/toggle_flightpack/Trigger()
|
||||
/datum/action/item_action/flightsuit/toggle_flightpack/do_effect(trigger_flags)
|
||||
var/obj/item/clothing/suit/space/hardsuit/flightsuit/FS = target
|
||||
if(istype(FS))
|
||||
FS.deployedpack? FS.retract_flightpack() : FS.extend_flightpack()
|
||||
return ..()
|
||||
if(!istype(FS))
|
||||
return FALSE
|
||||
FS.deployedpack? FS.retract_flightpack() : FS.extend_flightpack()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightsuit/lock_suit
|
||||
name = "Lock Suit"
|
||||
button_icon_state = "flightsuit_lock"
|
||||
background_icon_state = "bg_tech"
|
||||
|
||||
/datum/action/item_action/flightsuit/lock_suit/Trigger()
|
||||
/datum/action/item_action/flightsuit/lock_suit/do_effect(trigger_flags)
|
||||
var/obj/item/clothing/suit/space/hardsuit/flightsuit/FS = target
|
||||
if(istype(FS))
|
||||
FS.locked? FS.unlock_suit(owner) : FS.lock_suit(owner)
|
||||
return ..()
|
||||
if(!istype(FS))
|
||||
return FALSE
|
||||
FS.locked? FS.unlock_suit(owner) : FS.lock_suit(owner)
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack
|
||||
icon_icon = 'icons/mob/actions/actions_flightsuit.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_flightsuit.dmi'
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_flight
|
||||
name = "Toggle Flight"
|
||||
button_icon_state = "flightpack_fly"
|
||||
background_icon_state = "bg_tech_blue"
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_flight/Trigger()
|
||||
/datum/action/item_action/flightpack/toggle_flight/do_effect(trigger_flags)
|
||||
var/obj/item/flightpack/F = target
|
||||
if(istype(F))
|
||||
F.flight? F.disable_flight() : F.enable_flight()
|
||||
return ..()
|
||||
if(!istype(F))
|
||||
return FALSE
|
||||
F.flight? F.disable_flight() : F.enable_flight()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack/engage_boosters
|
||||
name = "Toggle Boosters"
|
||||
button_icon_state = "flightpack_boost"
|
||||
background_icon_state = "bg_tech_blue"
|
||||
|
||||
/datum/action/item_action/flightpack/engage_boosters/Trigger()
|
||||
/datum/action/item_action/flightpack/engage_boosters/do_effect(trigger_flags)
|
||||
var/obj/item/flightpack/F = target
|
||||
if(istype(F))
|
||||
F.boost? F.deactivate_booster() : F.activate_booster()
|
||||
return ..()
|
||||
if(!istype(F))
|
||||
return FALSE
|
||||
F.boost? F.deactivate_booster() : F.activate_booster()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_stabilizers
|
||||
name = "Toggle Stabilizers"
|
||||
button_icon_state = "flightpack_stabilizer"
|
||||
background_icon_state = "bg_tech_blue"
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_stabilizers/Trigger()
|
||||
/datum/action/item_action/flightpack/toggle_stabilizers/do_effect(trigger_flags)
|
||||
var/obj/item/flightpack/F = target
|
||||
if(istype(F))
|
||||
F.stabilizer? F.disable_stabilizers() : F.enable_stabilizers()
|
||||
return ..()
|
||||
if(!istype(F))
|
||||
return FALSE
|
||||
F.stabilizer? F.disable_stabilizers() : F.enable_stabilizers()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack/change_power
|
||||
name = "Flight Power Setting"
|
||||
button_icon_state = "flightpack_power"
|
||||
background_icon_state = "bg_tech_blue"
|
||||
|
||||
/datum/action/item_action/flightpack/change_power/Trigger()
|
||||
/datum/action/item_action/flightpack/change_power/do_effect(trigger_flags)
|
||||
var/obj/item/flightpack/F = target
|
||||
if(istype(F))
|
||||
F.cycle_power()
|
||||
return ..()
|
||||
if(!istype(F))
|
||||
return FALSE
|
||||
F.cycle_power()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_airbrake
|
||||
name = "Toggle Airbrake"
|
||||
button_icon_state = "flightpack_airbrake"
|
||||
background_icon_state = "bg_tech_blue"
|
||||
|
||||
/datum/action/item_action/flightpack/toggle_airbrake/Trigger()
|
||||
/datum/action/item_action/flightpack/toggle_airbrake/do_effect(trigger_flags)
|
||||
var/obj/item/flightpack/F = target
|
||||
if(istype(F))
|
||||
F.brake? F.disable_airbrake() : F.enable_airbrake()
|
||||
return ..()
|
||||
if(!istype(F))
|
||||
return FALSE
|
||||
F.brake? F.disable_airbrake() : F.enable_airbrake()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/flightpack/zoom
|
||||
name = "Helmet Smart Zoom"
|
||||
icon_icon = 'icons/mob/actions.dmi'
|
||||
button_icon = 'icons/mob/actions.dmi'
|
||||
background_icon_state = "bg_tech_blue"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "sniper_zoom"
|
||||
|
||||
/datum/action/item_action/flightpack/zoom/Trigger()
|
||||
/datum/action/item_action/flightpack/zoom/do_effect(trigger_flags)
|
||||
var/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/FH = target
|
||||
if(istype(FH))
|
||||
if(!istype(FH))
|
||||
return FALSE
|
||||
FH.toggle_zoom(owner)
|
||||
return ..()
|
||||
return TRUE
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
//Preset for general and toggled actions
|
||||
/datum/action/innate
|
||||
check_flags = NONE
|
||||
required_mobility_flags = NONE
|
||||
/// Whether we're active or not, if we're a innate - toggle action.
|
||||
var/active = FALSE
|
||||
|
||||
/datum/action/innate/Trigger(trigger_flags)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/active_status = active
|
||||
if(active_status)
|
||||
Deactivate()
|
||||
else
|
||||
Activate()
|
||||
|
||||
if(active != active_status)
|
||||
build_all_button_icons(UPDATE_BUTTON_STATUS)
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/is_action_active(atom/movable/screen/movable/action_button/current_button)
|
||||
return active
|
||||
|
||||
/datum/action/innate/proc/Activate()
|
||||
return
|
||||
|
||||
/datum/action/innate/proc/Deactivate()
|
||||
return
|
||||
@@ -0,0 +1,37 @@
|
||||
//Presets for item actions
|
||||
/datum/action/item_action
|
||||
name = "Item Action"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
button_icon_state = null
|
||||
|
||||
/datum/action/item_action/New(Target)
|
||||
. = ..()
|
||||
|
||||
// If our button state is null, use the target's icon instead
|
||||
if(target && isnull(button_icon_state))
|
||||
AddComponent(/datum/component/action_item_overlay, target)
|
||||
|
||||
/datum/action/item_action/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(!. || !target)
|
||||
return
|
||||
|
||||
if(var_name == NAMEOF(src, button_icon_state))
|
||||
// If someone vv's our icon either add or remove the component
|
||||
if(isnull(var_name))
|
||||
AddComponent(/datum/component/action_item_overlay, target)
|
||||
else
|
||||
qdel(GetComponent(/datum/component/action_item_overlay))
|
||||
|
||||
/datum/action/item_action/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
return do_effect(trigger_flags)
|
||||
|
||||
/datum/action/item_action/proc/do_effect(trigger_flags)
|
||||
if(!target)
|
||||
return FALSE
|
||||
var/obj/item/item_target = target
|
||||
item_target.ui_action_click(owner, src)
|
||||
return TRUE
|
||||
@@ -200,7 +200,7 @@
|
||||
/datum/action/innate/imaginary_join
|
||||
name = "Join"
|
||||
desc = "Join your owner, following them from inside their mind."
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
background_icon_state = "bg_revenant"
|
||||
button_icon_state = "join"
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
/datum/action/innate/imaginary_hide
|
||||
name = "Hide"
|
||||
desc = "Hide yourself from your owner's sight."
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
background_icon_state = "bg_revenant"
|
||||
button_icon_state = "hide"
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
name = "Hide"
|
||||
desc = "Hide yourself from your owner's sight."
|
||||
button_icon_state = "hide"
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/innate/imaginary_hide/Activate()
|
||||
var/mob/camera/imaginary_friend/I = owner
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Apply to an action to allow it to take an item
|
||||
* and apply it as an overlay of the action button
|
||||
*/
|
||||
/datum/component/action_item_overlay
|
||||
/// Weakref to what item the component uses to apply as an overlay.
|
||||
var/datum/weakref/item_ref
|
||||
/// Callback that dictates what item the component uses to apply as an overlay.
|
||||
var/datum/callback/item_callback
|
||||
|
||||
/// The appearance of the item we've applied
|
||||
var/mutable_appearance/item_appearance
|
||||
|
||||
/datum/component/action_item_overlay/Initialize(atom/movable/item, datum/callback/item_callback)
|
||||
if(!istype(parent, /datum/action))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
ASSERT(isnull(item) || istype(item))
|
||||
|
||||
if(!item && !item_callback)
|
||||
stack_trace("[type] created without a reference item or an item callback - one or the other is required.")
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.item_ref = WEAKREF(item)
|
||||
src.item_callback = item_callback
|
||||
|
||||
/datum/component/action_item_overlay/Destroy(force)
|
||||
item_ref = null
|
||||
item_callback = null
|
||||
item_appearance = null
|
||||
return ..()
|
||||
|
||||
/datum/component/action_item_overlay/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ACTION_OVERLAY_APPLY, PROC_REF(on_overlays_applied))
|
||||
|
||||
var/datum/action/parent_action = parent
|
||||
parent_action.build_all_button_icons(UPDATE_BUTTON_OVERLAY)
|
||||
|
||||
/datum/component/action_item_overlay/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_ACTION_OVERLAY_APPLY)
|
||||
|
||||
// If we're being unregistered / deleted but our parent is sticking around,
|
||||
// force an overlay update to get rid of our item appearance
|
||||
if(!QDELING(parent))
|
||||
var/datum/action/parent_action = parent
|
||||
parent_action.build_all_button_icons(UPDATE_BUTTON_OVERLAY)
|
||||
|
||||
/// Signal proc for [COMSIG_ACTION_OVERLAY_APPLY], applies the item appearance if possible.
|
||||
/datum/component/action_item_overlay/proc/on_overlays_applied(datum/action/source, atom/movable/screen/movable/action_button/current_button, force)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
// We're in the middle of being removed / deleted, remove our associated overlay
|
||||
if(QDELING(src))
|
||||
if(item_appearance)
|
||||
current_button.cut_overlay(item_appearance)
|
||||
item_appearance = null
|
||||
return
|
||||
|
||||
var/atom/movable/muse = item_callback?.Invoke() || item_ref?.resolve()
|
||||
if(!istype(muse))
|
||||
if(item_appearance) // New item does not exist but we have an old appearance
|
||||
current_button.cut_overlay(item_appearance)
|
||||
item_appearance = null
|
||||
return
|
||||
|
||||
if(item_appearance)
|
||||
// For caching purposes, we will try not to update if we don't need to
|
||||
if(!force && item_appearance.icon == muse.icon && item_appearance.icon_state == muse.icon_state)
|
||||
return
|
||||
current_button.cut_overlay(item_appearance)
|
||||
|
||||
var/mutable_appearance/muse_appearance = new(muse.appearance)
|
||||
muse_appearance.plane = FLOAT_PLANE
|
||||
muse_appearance.layer = FLOAT_LAYER
|
||||
muse_appearance.pixel_x = 0
|
||||
muse_appearance.pixel_y = 0
|
||||
|
||||
current_button.add_overlay(muse_appearance)
|
||||
item_appearance = muse_appearance
|
||||
@@ -151,8 +151,7 @@
|
||||
name = "Toggle Perspective"
|
||||
desc = "Switch between seeing normally from your head, or blindly from your body."
|
||||
|
||||
/datum/action/item_action/organ_action/dullahan/Trigger()
|
||||
. = ..()
|
||||
/datum/action/item_action/organ_action/dullahan/do_effect(trigger_flags)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/obj/item/organ/eyes/E = owner.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(E)
|
||||
@@ -162,13 +161,14 @@
|
||||
E.tint = INFINITY
|
||||
|
||||
var/datum/component/dullahan/D = H.GetComponent(/datum/component/dullahan)
|
||||
if(D)
|
||||
D.update_vision_perspective()
|
||||
if(!D)
|
||||
return FALSE
|
||||
return D.update_vision_perspective()
|
||||
|
||||
/datum/component/dullahan/proc/update_vision_perspective()
|
||||
var/mob/living/carbon/human/H = parent
|
||||
if(!H)
|
||||
return .
|
||||
return FALSE
|
||||
var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(eyes)
|
||||
H.update_tint()
|
||||
@@ -176,6 +176,7 @@
|
||||
H.reset_perspective(H)
|
||||
else
|
||||
H.reset_perspective(dullahan_head)
|
||||
return TRUE
|
||||
|
||||
/datum/component/dullahan/Destroy()
|
||||
UnregisterSignal(parent, COMSIG_LIVING_REGENERATE_LIMBS)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
if(!isitem(parent) || !allow_quick_gather)
|
||||
return
|
||||
var/obj/item/I = parent
|
||||
modeswitch_action = new(I)
|
||||
modeswitch_action = I.add_item_action(/datum/action/item_action/storage_gather_mode)
|
||||
RegisterSignal(modeswitch_action, COMSIG_ACTION_TRIGGER, PROC_REF(action_trigger))
|
||||
if(I.obj_flags & IN_INVENTORY)
|
||||
var/mob/M = I.loc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/action/innate/dash
|
||||
name = "Dash"
|
||||
desc = "Teleport to the targeted location."
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "jetboot"
|
||||
var/current_charges = 1
|
||||
var/max_charges = 1
|
||||
@@ -17,7 +17,7 @@
|
||||
. = ..()
|
||||
dashing_item = dasher
|
||||
|
||||
/datum/action/innate/dash/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/dash/IsAvailable(feedback = TRUE)
|
||||
if(current_charges > 0)
|
||||
return TRUE
|
||||
else
|
||||
@@ -36,12 +36,12 @@
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
addtimer(CALLBACK(src, PROC_REF(charge)), charge_rate)
|
||||
|
||||
/datum/action/innate/dash/proc/charge()
|
||||
current_charges = clamp(current_charges + 1, 0, max_charges)
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
if(recharge_sound)
|
||||
playsound(dashing_item, recharge_sound, 50, 1)
|
||||
to_chat(owner, "<span class='notice'>[src] now has [current_charges]/[max_charges] charges.</span>")
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(apply_overlays))
|
||||
|
||||
if(_flags & POLYCHROMIC_ALTCLICK)
|
||||
RegisterSignal(A, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
||||
RegisterSignal(A, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, PROC_REF(on_requesting_context_from_item))
|
||||
RegisterSignal(A, COMSIG_CLICK_ALT, PROC_REF(set_color))
|
||||
RegisterSignal(A, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
||||
|
||||
if(!overlays_names && names) //generate
|
||||
overlays_names = names
|
||||
@@ -77,7 +78,7 @@
|
||||
if(P)
|
||||
actions_by_atom -= A
|
||||
qdel(P)
|
||||
UnregisterSignal(A, list(COMSIG_PARENT_EXAMINE, COMSIG_CLICK_ALT, COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_ITEM_WORN_OVERLAYS, COMSIG_SUIT_MADE_HELMET))
|
||||
UnregisterSignal(A, list(COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_CLICK_ALT, COMSIG_PARENT_EXAMINE, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_ITEM_WORN_OVERLAYS, COMSIG_SUIT_MADE_HELMET))
|
||||
if(isitem(A))
|
||||
var/obj/item/clothing/head/H = helmet_by_suit[A]
|
||||
if(H)
|
||||
@@ -161,9 +162,21 @@
|
||||
|
||||
/datum/element/polychromic/proc/activate_action(datum/action/source, atom/target)
|
||||
set_color(target, source.owner)
|
||||
return COMPONENT_ACTION_BLOCK_TRIGGER
|
||||
|
||||
/datum/element/polychromic/proc/on_examine(atom/source, mob/user, list/examine_list)
|
||||
examine_list += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
examine_list += span_notice("Alt-click to recolor it.")
|
||||
|
||||
/datum/element/polychromic/proc/on_requesting_context_from_item(
|
||||
obj/source,
|
||||
list/context,
|
||||
obj/item/held_item,
|
||||
mob/living/user,
|
||||
)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Modify [source]'\s Colors")
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/datum/element/polychromic/proc/connect_helmet(atom/I, var/applycolor)
|
||||
if(isitem(I))
|
||||
@@ -203,7 +216,7 @@
|
||||
button_icon_state = null
|
||||
check_flags = NONE
|
||||
|
||||
/datum/action/item_action/polychromic/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
|
||||
/datum/action/item_action/polychromic/apply_button_icon(atom/movable/screen/movable/action_button/current_button, force = FALSE)
|
||||
var/atom/polychromic_thing = target
|
||||
|
||||
var/matrix/save_matrix = polychromic_thing.transform
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
/datum/action/innate/end_holocall
|
||||
name = "End Holocall"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon_state = "camera_off"
|
||||
var/datum/holocall/hcall
|
||||
|
||||
|
||||
@@ -8,63 +8,90 @@
|
||||
|
||||
/datum/action/neck_chop
|
||||
name = "Neck Chop - Injures the neck, stopping the victim from speaking for a while."
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "neckchop"
|
||||
|
||||
/datum/action/neck_chop/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return
|
||||
/datum/action/neck_chop/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if (H.mind.martial_art.streak == "neck_chop")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Neck Chop stance!</span>", "<b><i>Your next attack will be a Neck Chop.</i></b>")
|
||||
H.mind.martial_art.streak = "neck_chop"
|
||||
return TRUE
|
||||
|
||||
/datum/action/neck_chop/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/leg_sweep
|
||||
name = "Leg Sweep - Trips the victim, knocking them down for a brief moment."
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "legsweep"
|
||||
|
||||
/datum/action/leg_sweep/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return
|
||||
/datum/action/leg_sweep/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if (H.mind.martial_art.streak == "leg_sweep")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>", "<b><i>Your next attack will be a Leg Sweep.</i></b>")
|
||||
H.mind.martial_art.streak = "leg_sweep"
|
||||
return TRUE
|
||||
|
||||
/datum/action/leg_sweep/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/lung_punch//referred to internally as 'quick choke'
|
||||
name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time."
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "lungpunch"
|
||||
|
||||
/datum/action/lung_punch/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return
|
||||
/datum/action/lung_punch/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if (H.mind.martial_art.streak == "quick_choke")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Lung Punch stance!</span>", "<b><i>Your next attack will be a Lung Punch.</i></b>")
|
||||
H.mind.martial_art.streak = "quick_choke"//internal name for lung punch
|
||||
return TRUE
|
||||
|
||||
/datum/action/lung_punch/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/krav_maga/teach(mob/living/carbon/human/H,make_temporary=0)
|
||||
if(..())
|
||||
|
||||
@@ -41,24 +41,33 @@
|
||||
|
||||
/datum/action/risingbassmove
|
||||
name = ""
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = ""
|
||||
var/movestreak = ""
|
||||
|
||||
/datum/action/risingbassmove/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return
|
||||
/datum/action/risingbassmove/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if (H.mind.martial_art.streak == "[movestreak]")
|
||||
H.mind.martial_art.streak = ""
|
||||
to_chat(H,"<span class='danger'>You relax your muscles and return to a neutral position.</span>")
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
to_chat(H,"<span class='danger'>You get ready to use the [name] maneuver!</span>")
|
||||
H.mind.martial_art.streak = "[movestreak]"
|
||||
return TRUE
|
||||
|
||||
/datum/action/risingbassmove/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You can't use [name] while you're incapacitated.</span>")
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/risingbassmove/sidekick
|
||||
name = "Side Kick"
|
||||
|
||||
@@ -47,77 +47,121 @@
|
||||
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
|
||||
button_icon_state = "wrassle_slam"
|
||||
|
||||
/datum/action/slam/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to BODY SLAM!</span>", "<b><i>Your next attack will be a BODY SLAM.</i></b>")
|
||||
/datum/action/slam/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
owner.visible_message(span_danger("[owner] prepares to BODY SLAM!"), "<b><i>Your next attack will be a BODY SLAM.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "slam"
|
||||
return TRUE
|
||||
|
||||
/datum/action/slam/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT."))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You are too HIPPIE to WRESTLE other living beings!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/throw_wrassle
|
||||
name = "Throw (Cinch) - Spin a cinched opponent around and throw them."
|
||||
button_icon_state = "wrassle_throw"
|
||||
|
||||
/datum/action/throw_wrassle/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to THROW!</span>", "<b><i>Your next attack will be a THROW.</i></b>")
|
||||
/datum/action/throw_wrassle/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
owner.visible_message(span_danger("[owner] prepares to THROW!"), "<b><i>Your next attack will be a THROW.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "throw"
|
||||
return TRUE
|
||||
|
||||
/datum/action/throw_wrassle/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT."))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You are too HIPPIE to WRESTLE other living beings!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/kick
|
||||
name = "Kick - A powerful kick, sends people flying away from you. Also useful for escaping from bad situations."
|
||||
button_icon_state = "wrassle_kick"
|
||||
|
||||
/datum/action/kick/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to KICK!</span>", "<b><i>Your next attack will be a KICK.</i></b>")
|
||||
/datum/action/kick/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
owner.visible_message(span_danger("[owner] prepares to KICK!"), "<b><i>Your next attack will be a KICK.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "kick"
|
||||
return TRUE
|
||||
|
||||
/datum/action/kick/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT."))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You are too HIPPIE to WRESTLE other living beings!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/strike
|
||||
name = "Strike - Hit a neaby opponent with a quick attack."
|
||||
button_icon_state = "wrassle_strike"
|
||||
|
||||
/datum/action/strike/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to STRIKE!</span>", "<b><i>Your next attack will be a STRIKE.</i></b>")
|
||||
/datum/action/strike/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
owner.visible_message(span_danger("[owner] prepares to STRIKE!"), "<b><i>Your next attack will be a STRIKE.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "strike"
|
||||
return TRUE
|
||||
|
||||
/datum/action/strike/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT."))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You are too HIPPIE to WRESTLE other living beings!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/drop
|
||||
name = "Drop - Smash down onto an opponent."
|
||||
button_icon_state = "wrassle_drop"
|
||||
|
||||
/datum/action/drop/Trigger()
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to LEG DROP!</span>", "<b><i>Your next attack will be a LEG DROP.</i></b>")
|
||||
/datum/action/drop/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
owner.visible_message(span_danger("[owner] prepares to LEG DROP!"), "<b><i>Your next attack will be a LEG DROP.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "drop"
|
||||
|
||||
/datum/action/drop/IsAvailable(feedback)
|
||||
if(owner.incapacitated())
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT."))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
if(feedback)
|
||||
to_chat(owner, span_warning("You are too HIPPIE to WRESTLE other living beings!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/wrestling/teach(mob/living/carbon/human/H,make_temporary=0)
|
||||
if(..())
|
||||
to_chat(H, "<span class = 'userdanger'>SNAP INTO A THIN TIM!</span>")
|
||||
@@ -473,8 +517,8 @@
|
||||
if(A.pulling == D || A == D) // don't stun grab yoursel
|
||||
return FALSE
|
||||
A.start_pulling(D)
|
||||
D.visible_message("<span class='danger'>[A] gets [D] in a cinch!</span>", \
|
||||
"<span class='userdanger'>[A] gets [D] in a cinch!</span>")
|
||||
D.visible_message(span_danger("[A] gets [D] in a cinch!"), \
|
||||
span_userdanger("[A] gets [D] in a cinch!"))
|
||||
D.Stun(rand(60,100))
|
||||
log_combat(A, D, "cinched")
|
||||
return TRUE
|
||||
|
||||
@@ -492,7 +492,7 @@
|
||||
..()
|
||||
|
||||
/datum/action/innate/send_chems
|
||||
icon_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
background_icon_state = "bg_spell"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "spikechemswap"
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
apply_fingerprints(H)
|
||||
if(internals_slot)
|
||||
H.internal = H.get_item_by_slot(internals_slot)
|
||||
H.update_action_buttons_icon()
|
||||
H.update_mob_action_buttons()
|
||||
if(implants)
|
||||
for(var/implant_type in implants)
|
||||
var/obj/item/implant/I = new implant_type(H)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
excludefromjob = list("Research Director","Scientist", "Roboticist")
|
||||
|
||||
/datum/objective_item/steal/slime/check_special_completion(obj/item/slime_extract/E)
|
||||
if(E.Uses > 0)
|
||||
if(E.extract_uses > 0)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
/datum/action/innate/camera_off
|
||||
name = "End Camera View"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon_state = "camera_off"
|
||||
|
||||
/datum/action/innate/camera_off/Activate()
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
/datum/action/innate/camera_jump
|
||||
name = "Jump To Camera"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon_state = "camera_jump"
|
||||
|
||||
/datum/action/innate/camera_jump/Activate()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
MA.plane = 0
|
||||
holder.appearance = MA
|
||||
update_indicator()
|
||||
|
||||
|
||||
/obj/machinery/launchpad/Destroy()
|
||||
qdel(hud_list[DIAG_LAUNCHPAD_HUD])
|
||||
return ..()
|
||||
|
||||
@@ -673,25 +673,33 @@ DEFINE_BITFIELD(turret_flags, list(
|
||||
|
||||
/datum/action/turret_toggle
|
||||
name = "Toggle Mode"
|
||||
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon_state = "mech_cycle_equip_off"
|
||||
|
||||
/datum/action/turret_toggle/Trigger()
|
||||
/datum/action/turret_toggle/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/obj/machinery/porta_turret/P = target
|
||||
if(!istype(P))
|
||||
return
|
||||
return FALSE
|
||||
P.setState(P.on,!P.mode)
|
||||
return TRUE
|
||||
|
||||
/datum/action/turret_quit
|
||||
name = "Release Control"
|
||||
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon_state = "mech_eject"
|
||||
|
||||
/datum/action/turret_quit/Trigger()
|
||||
/datum/action/turret_quit/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/obj/machinery/porta_turret/P = target
|
||||
if(!istype(P))
|
||||
return
|
||||
return FALSE
|
||||
P.remove_control(FALSE)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/porta_turret/proc/give_control(mob/A)
|
||||
if(manual_control || !can_interact(A))
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
reactants += G.reagents
|
||||
|
||||
for(var/obj/item/slime_extract/S in beakers)
|
||||
if(S.Uses)
|
||||
if(S.extract_uses)
|
||||
for(var/obj/item/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to(S, G.reagents.total_volume)
|
||||
|
||||
|
||||
@@ -86,8 +86,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
var/list/actions //list of /datum/action's that this item has.
|
||||
var/list/actions_types //list of paths of action datums to give to the item on New().
|
||||
///list of /datum/action's that this item has.
|
||||
var/list/datum/action/actions
|
||||
///list of paths of action datums to give to the item on New().
|
||||
var/list/actions_types
|
||||
///Slot flags in which this item grants actions. If null, defaults to the item's slot flags (so actions are granted when worn)
|
||||
var/action_slots = null
|
||||
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
@@ -185,7 +189,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
. = ..()
|
||||
for(var/path in actions_types)
|
||||
new path(src)
|
||||
add_item_action(path)
|
||||
actions_types = null
|
||||
|
||||
if(force_string)
|
||||
@@ -213,8 +217,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
for(var/X in actions)
|
||||
qdel(X)
|
||||
|
||||
// Handle cleaning up our actions list
|
||||
for(var/datum/action/action as anything in actions)
|
||||
remove_item_action(action)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/ComponentInitialize()
|
||||
@@ -237,6 +244,50 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(sharpness && force > 5) //give sharp objects butchering functionality, for consistency
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed)
|
||||
|
||||
/// Called when an action associated with our item is deleted
|
||||
/obj/item/proc/on_action_deleted(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!(source in actions))
|
||||
CRASH("An action ([source.type]) was deleted that was associated with an item ([src]), but was not found in the item's actions list.")
|
||||
|
||||
LAZYREMOVE(actions, source)
|
||||
|
||||
/// Adds an item action to our list of item actions.
|
||||
/// Item actions are actions linked to our item, that are granted to mobs who equip us.
|
||||
/// This also ensures that the actions are properly tracked in the actions list and removed if they're deleted.
|
||||
/// Can be be passed a typepath of an action or an instance of an action.
|
||||
/obj/item/proc/add_item_action(action_or_action_type)
|
||||
|
||||
var/datum/action/action
|
||||
if(ispath(action_or_action_type, /datum/action))
|
||||
action = new action_or_action_type(src)
|
||||
else if(istype(action_or_action_type, /datum/action))
|
||||
action = action_or_action_type
|
||||
else
|
||||
CRASH("item add_item_action got a type or instance of something that wasn't an action.")
|
||||
|
||||
LAZYADD(actions, action)
|
||||
RegisterSignal(action, COMSIG_PARENT_QDELETING, PROC_REF(on_action_deleted))
|
||||
grant_action_to_bearer(action)
|
||||
return action
|
||||
|
||||
/// Grant the action to anyone who has this item equipped to an appropriate slot
|
||||
/obj/item/proc/grant_action_to_bearer(datum/action/action)
|
||||
if(!ismob(loc))
|
||||
return
|
||||
var/mob/holder = loc
|
||||
give_item_action(action, holder, holder.get_slot_by_item(src))
|
||||
|
||||
/// Removes an instance of an action from our list of item actions.
|
||||
/obj/item/proc/remove_item_action(datum/action/action)
|
||||
if(!action)
|
||||
return
|
||||
|
||||
UnregisterSignal(action, COMSIG_PARENT_QDELETING)
|
||||
LAZYREMOVE(actions, action)
|
||||
qdel(action)
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
|
||||
return FALSE
|
||||
@@ -567,10 +618,26 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_WORN_OVERLAYS, isinhands, icon_file, used_state, style_flags, .)
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == ITEM_SLOT_BACKPACK || slot == ITEM_SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
|
||||
/// Gives one of our item actions to a mob, when equipped to a certain slot
|
||||
/obj/item/proc/give_item_action(datum/action/action, mob/to_who, slot)
|
||||
// Some items only give their actions buttons when in a specific slot.
|
||||
if(!item_action_slot_check(slot, to_who, action) || SEND_SIGNAL(src, COMSIG_ITEM_UI_ACTION_SLOT_CHECKED, to_who, action, slot) & COMPONENT_ITEM_ACTION_SLOT_INVALID)
|
||||
// There is a chance we still have our item action currently,
|
||||
// and are moving it from a "valid slot" to an "invalid slot".
|
||||
// So call Remove() here regardless, even if excessive.
|
||||
action.Remove(to_who)
|
||||
return
|
||||
|
||||
action.Grant(to_who)
|
||||
|
||||
/// Sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/action)
|
||||
if(slot & (ITEM_SLOT_BACKPACK|ITEM_SLOT_LEGCUFFED)) //these aren't true slots, so avoid granting actions there
|
||||
return FALSE
|
||||
if(!isnull(action_slots))
|
||||
return (slot & action_slots)
|
||||
else if (slot_flags)
|
||||
return (slot & slot_flags)
|
||||
return TRUE
|
||||
|
||||
//the mob M is attempting to equip this item into the slot passed through as 'slot'. return TRUE if it can do this and 0 if it can't.
|
||||
@@ -1284,7 +1351,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
*/
|
||||
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.UpdateButtons(status_only, force)
|
||||
current_action.build_all_button_icons(status_only, force)
|
||||
|
||||
/// Special stuff you want to do when an outfit equips this item.
|
||||
/obj/item/proc/on_outfit_equip(mob/living/carbon/human/outfit_wearer, visuals_only, item_slot)
|
||||
|
||||
@@ -450,12 +450,13 @@
|
||||
/obj/item/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE)
|
||||
action_slots = ALL
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
var/forged = FALSE //have we set a custom name and job assignment, or will we use what we're given when we chameleon change?
|
||||
|
||||
/obj/item/card/id/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
update_power()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/defibrillator/proc/make_paddles()
|
||||
if(!combat)
|
||||
|
||||
@@ -30,6 +30,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
|
||||
actions_types = list(/datum/action/item_action/toggle_light/pda)
|
||||
action_slots = ALL
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
action_slots = ALL
|
||||
var/on = FALSE
|
||||
var/brightness_on = 4 //range of light when on
|
||||
var/flashlight_power = 0.8 //strength of the light when on
|
||||
@@ -40,7 +41,7 @@
|
||||
playsound(src, on ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, TRUE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/flashlight/DoRevenantThrowEffects(atom/target)
|
||||
@@ -514,6 +515,10 @@
|
||||
/obj/item/flashlight/glowstick/proc/activate()
|
||||
if(!on)
|
||||
on = TRUE
|
||||
var/datum/action/toggle = locate(/datum/action/item_action/toggle_light) in actions
|
||||
// No sense having a toggle light action that we don't use eh?
|
||||
if(toggle)
|
||||
remove_item_action(toggle)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/glowstick/red
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
eye = new /mob/camera/aiEye/remote/ai_detector()
|
||||
toggle_action = new /datum/action/item_action/toggle_multitool(src)
|
||||
toggle_action = add_item_action(/datum/action/item_action/toggle_multitool)
|
||||
|
||||
/obj/item/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -236,12 +236,11 @@
|
||||
name = "Toggle AI detector HUD"
|
||||
check_flags = NONE
|
||||
|
||||
/datum/action/item_action/toggle_multitool/Trigger()
|
||||
if(!..())
|
||||
/datum/action/item_action/toggle_multitool/do_effect(trigger_flags)
|
||||
if(!istype(target, /obj/item/multitool/ai_detect))
|
||||
return FALSE
|
||||
if(target)
|
||||
var/obj/item/multitool/ai_detect/M = target
|
||||
M.toggle_hud(owner)
|
||||
var/obj/item/multitool/ai_detect/M = target
|
||||
M.toggle_hud(owner)
|
||||
return TRUE
|
||||
|
||||
/obj/item/multitool/cyborg
|
||||
|
||||
@@ -129,12 +129,12 @@
|
||||
/datum/action/innate/drink_fling/Activate()
|
||||
button_icon_state = "drinkfling_on"
|
||||
active = TRUE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/innate/drink_fling/Deactivate()
|
||||
button_icon_state = "drinkfling_off"
|
||||
active = FALSE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/obj/item/book/granter/action/origami
|
||||
granted_action = /datum/action/innate/origami
|
||||
@@ -155,13 +155,13 @@
|
||||
to_chat(owner, "<span class='notice'>You will now fold origami planes.</span>")
|
||||
button_icon_state = "origami_on"
|
||||
active = TRUE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/innate/origami/Deactivate()
|
||||
to_chat(owner, "<span class='notice'>You will no longer fold origami planes.</span>")
|
||||
button_icon_state = "origami_off"
|
||||
active = FALSE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
///SPELLS///
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
return FALSE
|
||||
|
||||
for(var/obj/item/slime_extract/S in beakers)
|
||||
if(S.Uses)
|
||||
if(S.extract_uses)
|
||||
for(var/obj/item/reagent_containers/glass/G in beakers)
|
||||
G.reagents.trans_to(S, G.reagents.total_volume)
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
action_slots = ALL
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/obj/item/implant/mindshield
|
||||
name = "mindshield implant"
|
||||
desc = "Protects against brainwashing."
|
||||
actions_types = null
|
||||
activated = 0
|
||||
|
||||
/obj/item/implant/mindshield/get_data()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
action_slots = ALL
|
||||
force = 14
|
||||
throwforce = 10
|
||||
wound_bonus = 15
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
return FALSE
|
||||
|
||||
icon_state = "selfrepair_off"
|
||||
toggle_action = new /datum/action/item_action/toggle(src)
|
||||
toggle_action = add_item_action(/datum/action/item_action/toggle)
|
||||
toggle_action.Grant(R)
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
@@ -705,7 +705,7 @@
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl
|
||||
name = "vTec Control"
|
||||
desc = "Allows finer-grained control of the vTec speed boost."
|
||||
action_icon = 'icons/mob/actions.dmi'
|
||||
action_icon = 'icons/hud/actions.dmi'
|
||||
action_icon_state = "Chevron_State_0"
|
||||
|
||||
var/currentState = 0
|
||||
@@ -725,6 +725,6 @@
|
||||
user.vtec = initial(user.vtec) - maxReduction * 1
|
||||
|
||||
action.button_icon_state = "Chevron_State_[currentState]"
|
||||
action.UpdateButtons()
|
||||
action.build_all_button_icons()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/tank/jetpack/proc/turn_on(mob/user)
|
||||
on = TRUE
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
throw_range = 4
|
||||
custom_materials = list(/datum/material/iron = 500)
|
||||
actions_types = list(/datum/action/item_action/set_internals)
|
||||
action_slots = ALL
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 80, ACID = 30)
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
var/distribute_pressure = ONE_ATMOSPHERE
|
||||
@@ -59,7 +60,7 @@
|
||||
else
|
||||
to_chat(H, "<span class='notice'>You open [src] valve.</span>")
|
||||
H.internal = src
|
||||
H.update_action_buttons_icon()
|
||||
H.update_mob_action_buttons()
|
||||
|
||||
|
||||
/obj/item/tank/Initialize(mapload)
|
||||
|
||||
@@ -467,7 +467,7 @@ GLOBAL_LIST_INIT(double_bedsheets, list(/obj/item/bedsheet/double,
|
||||
|
||||
/obj/item/bedsheet/chameleon/New()
|
||||
..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/bedsheet
|
||||
chameleon_action.chameleon_name = "Bedsheet"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/bedsheet/chameleon, /obj/item/bedsheet/random, /obj/item/bedsheet/unlockable), only_root_path = FALSE)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
to_chat(new_spawn, "<b>You can expand the weather proof area provided by your shelters by using the 'New Area' key near the bottom right of your HUD.</b>")
|
||||
to_chat(new_spawn, "<b>Dragging injured ashwalkers to the tentacle or using the sleep verb next to it youself causes the body to remade whole after a short delay!</b>")
|
||||
else
|
||||
to_chat(new_spawn, "<span class='userdanger'>You have been born outside of your natural home! Whether you decide to return home, or make due with your new home is your own decision.</span>")
|
||||
to_chat(new_spawn, span_userdanger("You have been born outside of your natural home! Whether you decide to return home, or make due with your new home is your own decision."))
|
||||
|
||||
//Ash walkers on birth understand how to make bone bows, bone arrows and ashen arrows
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK))
|
||||
return
|
||||
log_game("[key_name(user)] golem-swapped into [src]")
|
||||
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
|
||||
user.visible_message(span_notice("A faint light leaves [user], moving to [src] and animating it!"),span_notice("You leave your old body behind, and transfer into [src]!"))
|
||||
show_flavour = FALSE
|
||||
create(ckey = user.ckey,name = user.real_name)
|
||||
user.death()
|
||||
@@ -477,7 +477,7 @@
|
||||
id.registered_name = L.real_name
|
||||
id.update_label()
|
||||
else
|
||||
to_chat(L, "<span class='userdanger'>Your owner is already dead! You will soon perish.</span>")
|
||||
to_chat(L, span_userdanger("Your owner is already dead! You will soon perish."))
|
||||
addtimer(CALLBACK(L, TYPE_PROC_REF(/mob, dust), 150)) //Give em a few seconds as a mercy.
|
||||
|
||||
/datum/outfit/demonic_friend
|
||||
@@ -666,24 +666,24 @@
|
||||
if(.)
|
||||
return
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/pirate))
|
||||
to_chat(user, "<span class='notice'>Your shipmate sails within their dreams for now. Perhaps they may wake up eventually.</span>")
|
||||
to_chat(user, span_notice("Your shipmate sails within their dreams for now. Perhaps they may wake up eventually."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>If you want to kill the pirate off, something to pry open the sleeper might be the best way to do it.</span>")
|
||||
to_chat(user, span_notice("If you want to kill the pirate off, something to pry open the sleeper might be the best way to do it."))
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/attackby(obj/item/W, mob/user, params)
|
||||
if(W.tool_behaviour == TOOL_CROWBAR && user.a_intent != INTENT_HARM)
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/pirate))
|
||||
to_chat(user,"<span class='warning'>Why would you want to do that to your shipmate? That'd kill them.</span>")
|
||||
to_chat(user,span_warning("Why would you want to do that to your shipmate? That'd kill them."))
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] start to pry open [src]...</span>",
|
||||
"<span class='notice'>You start to pry open [src]...</span>",
|
||||
"<span class='italics'>You hear prying...</span>")
|
||||
user.visible_message(span_warning("[user] start to pry open [src]..."),
|
||||
span_notice("You start to pry open [src]..."),
|
||||
span_italics("You hear prying..."))
|
||||
W.play_tool_sound(src)
|
||||
if(do_after(user, 100*W.toolspeed, target = src))
|
||||
user.visible_message("<span class='warning'>[user] pries open [src], disrupting the sleep of the pirate within and killing them.</span>",
|
||||
"<span class='notice'>You pry open [src], disrupting the sleep of the pirate within and killing them.</span>",
|
||||
"<span class='italics'>You hear prying, followed by the death rattling of bones.</span>")
|
||||
user.visible_message(span_warning("[user] pries open [src], disrupting the sleep of the pirate within and killing them."),
|
||||
span_notice("You pry open [src], disrupting the sleep of the pirate within and killing them."),
|
||||
span_italics("You hear prying, followed by the death rattling of bones."))
|
||||
log_game("[key_name(user)] has successfully pried open [src] and disabled a space pirate spawner.")
|
||||
W.play_tool_sound(src)
|
||||
playsound(src.loc, 'modular_citadel/sound/voice/scream_skeleton.ogg', 50, 1, 4, 1.2)
|
||||
@@ -746,27 +746,28 @@
|
||||
banType = ROLE_GHOSTCAFE
|
||||
|
||||
/datum/action/toggle_dead_chat_mob
|
||||
icon_icon = 'icons/mob/mob.dmi'
|
||||
button_icon = 'icons/mob/mob.dmi'
|
||||
button_icon_state = "ghost"
|
||||
name = "Toggle deadchat"
|
||||
desc = "Turn off or on your ability to hear ghosts."
|
||||
|
||||
/datum/action/toggle_dead_chat_mob/Trigger()
|
||||
if(!..())
|
||||
/datum/action/toggle_dead_chat_mob/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/M = target
|
||||
if(HAS_TRAIT_FROM(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT))
|
||||
REMOVE_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
|
||||
to_chat(M,"<span class='notice'>You're no longer hearing deadchat.</span>")
|
||||
to_chat(M,span_notice("You're no longer hearing deadchat."))
|
||||
else
|
||||
ADD_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT)
|
||||
to_chat(M,"<span class='notice'>You're once again longer hearing deadchat.</span>")
|
||||
|
||||
to_chat(M,span_notice("You're once again longer hearing deadchat."))
|
||||
return TRUE
|
||||
|
||||
/datum/action/disguise
|
||||
name = "Disguise"
|
||||
button_icon_state = "ling_transform"
|
||||
icon_icon = 'icons/mob/actions/actions_changeling.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_changeling.dmi'
|
||||
background_icon_state = "bg_mime"
|
||||
var/currently_disguised = FALSE
|
||||
var/static/list/mob_blacklist = typecacheof(list(
|
||||
@@ -798,36 +799,44 @@
|
||||
))
|
||||
|
||||
|
||||
/datum/action/disguise/Trigger()
|
||||
/datum/action/disguise/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(!currently_disguised)
|
||||
var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB")
|
||||
if(user_object_type)
|
||||
var/search_term = stripped_input(H, "Enter the search term")
|
||||
if(search_term)
|
||||
var/list_to_search
|
||||
if(user_object_type == "MOB")
|
||||
list_to_search = subtypesof(/mob) - mob_blacklist
|
||||
else
|
||||
list_to_search = subtypesof(/obj)
|
||||
var/list/filtered_results = list()
|
||||
for(var/some_search_item in list_to_search)
|
||||
if(findtext("[some_search_item]", search_term))
|
||||
filtered_results += some_search_item
|
||||
if(!length(filtered_results))
|
||||
to_chat(H, "Nothing matched your search query!")
|
||||
else
|
||||
var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results
|
||||
if(disguise_selection)
|
||||
var/atom/disguise_item = disguise_selection
|
||||
var/image/I = image(icon = initial(disguise_item.icon), icon_state = initial(disguise_item.icon_state), loc = H)
|
||||
I.override = TRUE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
H.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "ghost_cafe_disguise", I)
|
||||
currently_disguised = TRUE
|
||||
else
|
||||
if(currently_disguised)
|
||||
H.remove_alt_appearance("ghost_cafe_disguise")
|
||||
currently_disguised = FALSE
|
||||
return TRUE
|
||||
else
|
||||
var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB")
|
||||
if(!user_object_type)
|
||||
return FALSE
|
||||
var/search_term = stripped_input(H, "Enter the search term")
|
||||
if(!search_term)
|
||||
return FALSE
|
||||
var/list_to_search
|
||||
if(user_object_type == "MOB")
|
||||
list_to_search = subtypesof(/mob) - mob_blacklist
|
||||
else
|
||||
list_to_search = subtypesof(/obj)
|
||||
var/list/filtered_results = list()
|
||||
for(var/some_search_item in list_to_search)
|
||||
if(findtext("[some_search_item]", search_term))
|
||||
filtered_results += some_search_item
|
||||
if(!length(filtered_results))
|
||||
to_chat(H, "Nothing matched your search query!")
|
||||
return FALSE
|
||||
var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results
|
||||
if(!disguise_selection)
|
||||
return FALSE
|
||||
var/atom/disguise_item = disguise_selection
|
||||
var/image/I = image(icon = initial(disguise_item.icon), icon_state = initial(disguise_item.icon_state), loc = H)
|
||||
I.override = TRUE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
H.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "ghost_cafe_disguise", I)
|
||||
currently_disguised = TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn)
|
||||
if(new_spawn.client)
|
||||
@@ -844,7 +853,7 @@
|
||||
ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT)
|
||||
ADD_TRAIT(new_spawn, TRAIT_EXEMPT_HEALTH_EVENTS, GHOSTROLE_TRAIT)
|
||||
ADD_TRAIT(new_spawn, TRAIT_NO_MIDROUND_ANTAG, GHOSTROLE_TRAIT) //The mob can't be made into a random antag, they are still eligible for ghost roles popups.
|
||||
to_chat(new_spawn,"<span class='boldwarning'>Ghosting is free!</span>")
|
||||
to_chat(new_spawn,span_boldwarning("Ghosting is free!"))
|
||||
var/datum/action/toggle_dead_chat_mob/D = new(new_spawn)
|
||||
D.Grant(new_spawn)
|
||||
var/datum/action/disguise/disguise_action = new(new_spawn)
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
/datum/action/quit_vr
|
||||
name = "Quit Virtual Reality"
|
||||
icon_icon = 'icons/mob/actions/actions_vr.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_vr.dmi'
|
||||
button_icon_state = "logout"
|
||||
|
||||
/datum/action/quit_vr/Trigger() //this merely a trigger for /datum/component/virtual_reality
|
||||
/datum/action/quit_vr/Trigger(trigger_flags) //this merely a trigger for /datum/component/virtual_reality
|
||||
. = ..()
|
||||
if(.) //The component was not there to block the trigger.
|
||||
Remove(owner)
|
||||
|
||||
@@ -523,11 +523,16 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
src.antag_datum = antag_datum
|
||||
name += " [antag_datum.name]"
|
||||
|
||||
/datum/action/antag_info/Trigger()
|
||||
if(antag_datum)
|
||||
antag_datum.ui_interact(owner)
|
||||
/datum/action/antag_info/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!antag_datum)
|
||||
return FALSE
|
||||
antag_datum.ui_interact(owner)
|
||||
return TRUE
|
||||
|
||||
/datum/action/antag_info/IsAvailable()
|
||||
/datum/action/antag_info/IsAvailable(feedback)
|
||||
return TRUE
|
||||
|
||||
///Clears change requests from deleted objectives to avoid broken references.
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
H.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == ITEM_SLOT_OCLOTHING) //we only give the mob the ability to activate the vest if he's actually wearing it.
|
||||
@@ -441,6 +441,7 @@
|
||||
force = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/toggle_mode)
|
||||
action_slots = ALL
|
||||
|
||||
/obj/item/abductor/baton/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/abductor/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
|
||||
if(tele_in_action)
|
||||
actions += new tele_in_action(src)
|
||||
if(tele_out_action)
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/datum/action/innate/teleport_in
|
||||
name = "Send To"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "beam_down"
|
||||
|
||||
/datum/action/innate/teleport_in/Activate()
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/datum/action/innate/teleport_out
|
||||
name = "Retrieve"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "beam_up"
|
||||
|
||||
/datum/action/innate/teleport_out/Activate()
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/datum/action/innate/teleport_self
|
||||
name = "Send Self"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "beam_down"
|
||||
|
||||
/datum/action/innate/teleport_self/Activate()
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/datum/action/innate/vest_mode_swap
|
||||
name = "Switch Vest Mode"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "vest_mode"
|
||||
|
||||
/datum/action/innate/vest_mode_swap/Activate()
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
/datum/action/innate/vest_disguise_swap
|
||||
name = "Switch Vest Disguise"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "vest_disguise"
|
||||
|
||||
/datum/action/innate/vest_disguise_swap/Activate()
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
/datum/action/innate/set_droppoint
|
||||
name = "Set Experiment Release Point"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "set_drop"
|
||||
|
||||
/datum/action/innate/set_droppoint/Activate()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/datum/action/innate/blobpop
|
||||
name = "Pop"
|
||||
desc = "Unleash the blob"
|
||||
icon_icon = 'icons/mob/blob.dmi'
|
||||
button_icon = 'icons/mob/blob.dmi'
|
||||
button_icon_state = "blob"
|
||||
|
||||
/datum/action/innate/blobpop/Activate()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A vampiric gift."
|
||||
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the BACKGROUND icon
|
||||
background_icon_state = "vamp_power_off" //And this is the state for the background icon
|
||||
icon_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||
button_icon_state = "power_feed" //And this is the state for the action icon
|
||||
buttontooltipstyle = "cult"
|
||||
transparent_when_unavailable = TRUE
|
||||
@@ -51,17 +51,17 @@
|
||||
// spells.dm /add_ranged_ability() <--- How we take over the mouse click to use a power on a target.
|
||||
|
||||
// TODO: Refactor this to use /Activate().
|
||||
/datum/action/cooldown/bloodsucker/Trigger()
|
||||
/datum/action/cooldown/bloodsucker/Trigger(trigger_flags)
|
||||
// Active? DEACTIVATE AND END!
|
||||
if(active && CheckCanDeactivate(TRUE))
|
||||
DeactivatePower()
|
||||
return
|
||||
return FALSE
|
||||
if(!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE))
|
||||
return
|
||||
return FALSE
|
||||
PayCost()
|
||||
if(amToggle)
|
||||
active = !active
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
if(!amToggle || !active)
|
||||
StartCooldown() // Must come AFTER UpdateButton(), otherwise icon will revert.
|
||||
ActivatePower() // NOTE: ActivatePower() freezes this power in place until it ends.
|
||||
@@ -69,6 +69,7 @@
|
||||
DeactivatePower()
|
||||
if(amSingleUse)
|
||||
RemoveAfterUse()
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/bloodsucker/proc/CheckCanPayCost(display_error)
|
||||
if(!owner || !owner.mind)
|
||||
@@ -82,7 +83,7 @@
|
||||
var/mob/living/L = owner
|
||||
if(L.blood_volume < bloodcost)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You need at least [bloodcost] blood to activate [name]</span>")
|
||||
to_chat(owner, span_warning("You need at least [bloodcost] blood to activate [name]"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -92,12 +93,12 @@
|
||||
// Torpor?
|
||||
if(!can_use_in_torpor && HAS_TRAIT(owner, TRAIT_DEATHCOMA))
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>Not while you're in Torpor.</span>")
|
||||
to_chat(owner, span_warning("Not while you're in Torpor."))
|
||||
return FALSE
|
||||
// Stake?
|
||||
if(!can_be_staked && owner.AmStaked())
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You have a stake in your chest! Your powers are useless.</span>")
|
||||
to_chat(owner, span_warning("You have a stake in your chest! Your powers are useless."))
|
||||
return FALSE
|
||||
if(istype(owner.get_item_by_slot(ITEM_SLOT_NECK), /obj/item/clothing/neck/garlic_necklace))
|
||||
if(display_error)
|
||||
@@ -105,35 +106,36 @@
|
||||
return FALSE
|
||||
if(owner.reagents?.has_reagent(/datum/reagent/consumable/garlic))
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>Garlic in your blood is interfering with your powers!</span>")
|
||||
to_chat(owner, span_warning("Garlic in your blood is interfering with your powers!"))
|
||||
return FALSE
|
||||
if(must_be_concious)
|
||||
if(owner.stat != CONSCIOUS)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You can't do this while you are unconcious!</span>")
|
||||
to_chat(owner, span_warning("You can't do this while you are unconcious!"))
|
||||
return FALSE
|
||||
// Incap?
|
||||
if(must_be_capacitated)
|
||||
var/mob/living/L = owner
|
||||
if (L.incapacitated(TRUE, TRUE) || !CHECK_MOBILITY(L, MOBILITY_STAND) && !can_be_immobilized)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>Not while you're incapacitated!</span>")
|
||||
to_chat(owner, span_warning("Not while you're incapacitated!"))
|
||||
return FALSE
|
||||
// Constant Cost (out of blood)
|
||||
if(warn_constant_cost)
|
||||
var/mob/living/L = owner
|
||||
if(L.blood_volume <= 0)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You don't have the blood to upkeep [src].</span>")
|
||||
to_chat(owner, span_warning("You don't have the blood to upkeep [src]."))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/bloodsucker/proc/CheckCanDeactivate(display_error)
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/bloodsucker/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force = FALSE)
|
||||
background_icon_state = active? background_icon_state_on : background_icon_state_off
|
||||
..()//UpdateButton()
|
||||
/datum/action/cooldown/bloodsucker/apply_button_background(atom/movable/screen/movable/action_button/current_button, force)
|
||||
if(active_background_icon_state)
|
||||
background_icon_state = is_action_active(current_button) ? active_background_icon_state : base_background_icon_state
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/bloodsucker/proc/PayCost()
|
||||
// owner for actions is the mob, not mind.
|
||||
@@ -146,7 +148,7 @@
|
||||
|
||||
/datum/action/cooldown/bloodsucker/proc/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
active = FALSE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
StartCooldown()
|
||||
|
||||
/datum/action/cooldown/bloodsucker/proc/ContinueActive(mob/living/user, mob/living/target) // Used by loops to make sure this power can stay active.
|
||||
@@ -182,15 +184,15 @@
|
||||
|
||||
// TODO: Refactor this to use /Activate() and click_to_activate = TRUE.
|
||||
// Click power: Begin Aim
|
||||
/datum/action/cooldown/bloodsucker/targeted/Trigger()
|
||||
/datum/action/cooldown/bloodsucker/targeted/Trigger(trigger_flags)
|
||||
if(active && CheckCanDeactivate(TRUE))
|
||||
DeactivateRangedAbility()
|
||||
DeactivatePower()
|
||||
return
|
||||
return FALSE
|
||||
if(!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE))
|
||||
return
|
||||
return FALSE
|
||||
active = !active
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
// Create & Link Targeting Proc
|
||||
var/mob/living/L = owner
|
||||
if(L.ranged_ability)
|
||||
@@ -198,7 +200,8 @@
|
||||
bs_proc_holder.add_ranged_ability(L)
|
||||
|
||||
if(message_Trigger != "")
|
||||
to_chat(owner, "<span class='announce'>[message_Trigger]</span>")
|
||||
to_chat(owner, span_announce("[message_Trigger]"))
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/bloodsucker/targeted/CheckCanUse(display_error)
|
||||
. = ..()
|
||||
@@ -211,7 +214,7 @@
|
||||
/datum/action/cooldown/bloodsucker/targeted/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
// Don't run ..(), we don't want to engage the cooldown until we USE this power!
|
||||
active = FALSE
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/cooldown/bloodsucker/targeted/proc/DeactivateRangedAbility()
|
||||
// Only Turned off when CLICK is disabled...aka, when you successfully clicked (or
|
||||
@@ -226,7 +229,7 @@
|
||||
// Out of Range
|
||||
if(!(A in view(target_range, owner)))
|
||||
if(display_error && target_range > 1) // Only warn for range if it's greater than 1. Brawn doesn't need to announce itself.
|
||||
to_chat(owner, "<span class='warning'>Your target is out of range.</span>")
|
||||
to_chat(owner, span_warning("Your target is out of range."))
|
||||
return FALSE
|
||||
return istype(A)
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
desc = "Take a moment to look for clues of any nearby monsters.<br>These creatures are slippery, and often look like the crew."
|
||||
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the BACKGROUND icon
|
||||
background_icon_state = "vamp_power_off" //And this is the state for the background icon
|
||||
icon_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||
button_icon_state = "power_hunter" //And this is the state for the action icon
|
||||
amToggle = FALSE // Action-Related
|
||||
cooldown = 300 // 10 ticks, 1 second.
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/datum/action/innate/cellular_emporium
|
||||
name = "Cellular Emporium"
|
||||
icon_icon = 'icons/obj/drinks.dmi'
|
||||
button_icon = 'icons/obj/drinks.dmi'
|
||||
button_icon_state = "changelingsting"
|
||||
background_icon_state = "bg_changeling"
|
||||
var/datum/cellular_emporium/cellular_emporium
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/datum/action/changeling
|
||||
name = "Prototype Sting - Debug button, ahelp this"
|
||||
background_icon_state = "bg_changeling"
|
||||
icon_icon = 'icons/mob/actions/actions_changeling.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_changeling.dmi'
|
||||
var/needs_button = TRUE//for passive abilities like hivemind that dont need a button
|
||||
var/helptext = "" // Details
|
||||
var/chemical_cost = 0 // negative chemical cost is for passive abilities (chemical glands)
|
||||
@@ -30,11 +30,12 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
|
||||
if(needs_button)
|
||||
Grant(user)//how powers are added rather than the checks in mob.dm
|
||||
|
||||
/datum/action/changeling/Trigger()
|
||||
/datum/action/changeling/Trigger(trigger_flags)
|
||||
var/mob/user = owner
|
||||
if(!user || !user.mind || !user.mind.has_antag_datum(/datum/antagonist/changeling))
|
||||
return
|
||||
return FALSE
|
||||
try_to_sting(user)
|
||||
return TRUE
|
||||
|
||||
/datum/action/changeling/proc/try_to_sting(mob/user, mob/target)
|
||||
if(!can_sting(user, target))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
name = "Reviving Stasis"
|
||||
desc = "We fall into a stasis, allowing us to regenerate and trick our enemies. Costs 15 chemicals."
|
||||
button_icon_state = "fake_death"
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
chemical_cost = 15
|
||||
to_chat(user, "<span class='notice'>We have revived ourselves.</span>")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
name = "Revive"
|
||||
desc = "We arise once more."
|
||||
button_icon_state = "revive"
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
chemical_cost = 0
|
||||
revive_ready = TRUE
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name = "Pheromone Receptors"
|
||||
desc = "We attune our senses to track other changelings by scent. The closer they are, the easier we can find them."
|
||||
helptext = "We will know the general direction of nearby changelings, with closer scents being stronger. Our chemical generation is slowed while this is active."
|
||||
icon_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon_state = "nose"
|
||||
chemical_cost = 0 //Reduces regain rate while active.
|
||||
dna_cost = 2
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
desc = "Stabby stabby"
|
||||
var/sting_icon = null
|
||||
|
||||
/datum/action/changeling/sting/Trigger()
|
||||
/datum/action/changeling/sting/Trigger(trigger_flags)
|
||||
var/mob/user = owner
|
||||
if(!user || !user.mind)
|
||||
return
|
||||
return FALSE
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(!changeling)
|
||||
return
|
||||
return FALSE
|
||||
if(!changeling.chosen_sting)
|
||||
set_sting(user)
|
||||
else
|
||||
unset_sting(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/datum/action/changeling/sting/proc/set_sting(mob/user)
|
||||
to_chat(user, "<span class='notice'>We prepare our sting, use Alt+click or click the middle mouse button on a target to sting them.</span>")
|
||||
to_chat(user, span_notice("We prepare our sting, use Alt+click or click the middle mouse button on a target to sting them."))
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.chosen_sting = src
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
user.hud_used.lingstingdisplay.invisibility = 0
|
||||
|
||||
/datum/action/changeling/sting/proc/unset_sting(mob/user)
|
||||
to_chat(user, "<span class='warning'>We retract our sting, we can't sting anyone for now.</span>")
|
||||
to_chat(user, span_warning("We retract our sting, we can't sting anyone for now."))
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.chosen_sting = null
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
/datum/action/changeling/sting/sting_feedback(mob/user, mob/target)
|
||||
if(!target)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>We stealthily sting [target.name].</span>")
|
||||
to_chat(user, span_notice("We stealthily sting [target.name]."))
|
||||
if(target.mind && target.mind.has_antag_datum(/datum/antagonist/changeling))
|
||||
to_chat(target, "<span class='warning'>You feel a tiny prick.</span>")
|
||||
to_chat(target, span_warning("You feel a tiny prick."))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -75,31 +75,31 @@
|
||||
loudness = 1
|
||||
var/datum/changelingprofile/selected_dna = null
|
||||
|
||||
/datum/action/changeling/sting/transformation/Trigger()
|
||||
/datum/action/changeling/sting/transformation/Trigger(trigger_flags)
|
||||
var/mob/user = owner
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling.chosen_sting)
|
||||
unset_sting(user)
|
||||
return
|
||||
return FALSE
|
||||
selected_dna = changeling.select_dna()
|
||||
if(!selected_dna)
|
||||
return
|
||||
return FALSE
|
||||
if(NOTRANSSTING in selected_dna.dna.species.species_traits)
|
||||
to_chat(user, "<span class = 'notice'>That DNA is not compatible with changeling retrovirus!</span>")
|
||||
return
|
||||
..()
|
||||
to_chat(user, span_notice("That DNA is not compatible with changeling retrovirus!"))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target)
|
||||
if(!..())
|
||||
return
|
||||
if((HAS_TRAIT(target, TRAIT_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
|
||||
to_chat(user, span_warning("Our sting appears ineffective against its DNA."))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/changeling/sting/transformation/sting_action(mob/user, mob/target)
|
||||
if(ismonkey(target))
|
||||
to_chat(user, "<span class='notice'>Our genes cry out as we sting [target.name]!</span>")
|
||||
to_chat(user, span_notice("Our genes cry out as we sting [target.name]!"))
|
||||
|
||||
var/mob/living/carbon/C = target
|
||||
. = TRUE
|
||||
@@ -132,7 +132,7 @@
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if((HAS_TRAIT(L, TRAIT_HUSK)) || !L.has_dna())
|
||||
to_chat(user, "<span class='warning'>Our sting appears ineffective against its DNA.</span>")
|
||||
to_chat(user, span_warning("Our sting appears ineffective against its DNA."))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -141,15 +141,15 @@
|
||||
|
||||
var/obj/item/held = target.get_active_held_item()
|
||||
if(held && !target.dropItemToGround(held))
|
||||
to_chat(user, "<span class='warning'>[held] is stuck to [target.p_their()] hand, you cannot grow a false armblade over it!</span>")
|
||||
to_chat(user, span_warning("[held] is stuck to [target.p_their()] hand, you cannot grow a false armblade over it!"))
|
||||
return
|
||||
|
||||
if(ismonkey(target))
|
||||
to_chat(user, "<span class='notice'>Our genes cry out as we sting [target.name]!</span>")
|
||||
to_chat(user, span_notice("Our genes cry out as we sting [target.name]!"))
|
||||
|
||||
var/obj/item/melee/arm_blade/false/blade = new(target,1)
|
||||
target.put_in_hands(blade)
|
||||
target.visible_message("<span class='warning'>A grotesque blade forms around [target.name]\'s arm!</span>", "<span class='userdanger'>Your arm twists and mutates, transforming into a horrific monstrosity!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
target.visible_message(span_warning("A grotesque blade forms around [target.name]\'s arm!"), span_userdanger("Your arm twists and mutates, transforming into a horrific monstrosity!"), span_italics("You hear organic matter ripping and tearing!"))
|
||||
playsound(target, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_fake), target, blade), 600)
|
||||
@@ -157,9 +157,9 @@
|
||||
|
||||
/datum/action/changeling/sting/false_armblade/proc/remove_fake(mob/target, obj/item/melee/arm_blade/false/blade)
|
||||
playsound(target, 'sound/effects/blobattack.ogg', 30, 1)
|
||||
target.visible_message("<span class='warning'>With a sickening crunch, \
|
||||
[target] reforms [target.p_their()] [blade.name] into an arm!</span>",
|
||||
"<span class='warning'>[blade] reforms back to normal.</span>",
|
||||
target.visible_message(span_warning("With a sickening crunch, \
|
||||
[target] reforms [target.p_their()] [blade.name] into an arm!"),
|
||||
span_warning("[blade] reforms back to normal."),
|
||||
"<span class='italics>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
qdel(blade)
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
/datum/action/changeling/sting/blind/sting_action(mob/user, mob/living/carbon/target)
|
||||
log_combat(user, target, "stung", "blind sting")
|
||||
to_chat(target, "<span class='danger'>Your eyes burn horrifically!</span>")
|
||||
to_chat(target, span_danger("Your eyes burn horrifically!"))
|
||||
target.become_nearsighted(EYE_DAMAGE)
|
||||
target.blind_eyes(20)
|
||||
target.blur_eyes(40)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/datum/action/innate/hierophant
|
||||
name = "Hierophant Network"
|
||||
desc = "Allows you to communicate with other Servants."
|
||||
icon_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon_state = "hierophant"
|
||||
background_icon_state = "bg_clock"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
@@ -35,7 +35,7 @@
|
||||
var/span_for_name = "heavy_brass"
|
||||
var/span_for_message = "brass"
|
||||
|
||||
/datum/action/innate/hierophant/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/hierophant/IsAvailable(feedback = TRUE)
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/action/innate/call_weapon
|
||||
name = "Call Weapon"
|
||||
desc = "This definitely shouldn't exist."
|
||||
icon_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon_state = "ratvarian_spear"
|
||||
background_icon_state = "bg_clock"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
@@ -12,7 +12,7 @@
|
||||
var/obj/item/clockwork/weapon/weapon_type //The type of weapon to create
|
||||
var/obj/item/clockwork/weapon/weapon
|
||||
|
||||
/datum/action/innate/call_weapon/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/call_weapon/IsAvailable(feedback = TRUE)
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
qdel(src)
|
||||
return
|
||||
@@ -39,11 +39,11 @@
|
||||
owner.visible_message("<span class='warning'>A [weapon.name] materializes in [owner]'s hands!</span>", "<span class='brass'>You call forth your [weapon.name]!</span>")
|
||||
weapon.forceMove(get_turf(owner))
|
||||
owner.put_in_hands(weapon)
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/call_weapon/proc/weapon_reset(cooldown_time)
|
||||
cooldown = world.time + cooldown_time
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_action_buttons_icon)), cooldown_time)
|
||||
owner.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_mob_action_buttons)), cooldown_time)
|
||||
owner.update_mob_action_buttons()
|
||||
QDEL_NULL(weapon)
|
||||
|
||||
@@ -405,12 +405,12 @@
|
||||
for(var/i in 1 to quickbound.len)
|
||||
if(!quickbound[i])
|
||||
continue
|
||||
var/datum/action/item_action/clock/quickbind/Q = new /datum/action/item_action/clock/quickbind(src)
|
||||
var/datum/action/item_action/clock/quickbind/Q = add_item_action(/datum/action/item_action/clock/quickbind)
|
||||
Q.scripture_index = i
|
||||
var/datum/clockwork_scripture/quickbind_slot = GLOB.all_scripture[quickbound[i]]
|
||||
Q.name = "[quickbind_slot.name] ([Q.scripture_index])"
|
||||
Q.desc = quickbind_slot.quickbind_desc
|
||||
Q.button_icon_state = quickbind_slot.name
|
||||
Q.UpdateButtons()
|
||||
Q.build_all_button_icons()
|
||||
if(isliving(loc))
|
||||
Q.Grant(loc)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/mob/living/L = loc
|
||||
active = change_to
|
||||
icon_state = "judicial_visor_[active]"
|
||||
L.update_action_buttons_icon()
|
||||
L.update_mob_action_buttons()
|
||||
L.update_inv_glasses()
|
||||
if(!is_servant_of_ratvar(L) || L.stat)
|
||||
return FALSE
|
||||
@@ -95,7 +95,7 @@
|
||||
active = FALSE
|
||||
icon_state = "judicial_visor_[active]"
|
||||
if(user)
|
||||
user.update_action_buttons_icon()
|
||||
user.update_mob_action_buttons()
|
||||
user.update_inv_glasses()
|
||||
|
||||
/obj/effect/proc_holder/judicial_visor
|
||||
@@ -137,7 +137,7 @@
|
||||
var/turf/targetturf = get_turf(target)
|
||||
new/obj/effect/clockwork/judicial_marker(targetturf, ranged_ability_user)
|
||||
log_combat(ranged_ability_user, targetturf, "created a judicial marker")
|
||||
ranged_ability_user.update_action_buttons_icon()
|
||||
ranged_ability_user.update_mob_action_buttons()
|
||||
ranged_ability_user.update_inv_glasses()
|
||||
addtimer(CALLBACK(visor, TYPE_PROC_REF(/obj/item/clothing/glasses/judicial_visor, recharge_visor), ranged_ability_user), GLOB.ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown)//Cooldown is reduced by 10x if Ratvar is up
|
||||
remove_ranged_ability()
|
||||
|
||||
@@ -231,11 +231,11 @@
|
||||
/datum/action/innate/eminence
|
||||
name = "Eminence Action"
|
||||
desc = "You shouldn't see this. File a bug report!"
|
||||
icon_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
background_icon_state = "bg_clock"
|
||||
buttontooltipstyle = "clockcult"
|
||||
|
||||
/datum/action/innate/eminence/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/eminence/IsAvailable(feedback = TRUE)
|
||||
if(!iseminence(owner))
|
||||
qdel(src)
|
||||
return
|
||||
@@ -323,7 +323,7 @@
|
||||
desc = "Initiates a mass recall, warping all servants to the Ark after a short delay. This can only be used once."
|
||||
button_icon_state = "Spatial Gateway"
|
||||
|
||||
/datum/action/innate/eminence/mass_recall/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/eminence/mass_recall/IsAvailable(feedback = TRUE)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
|
||||
|
||||
@@ -381,12 +381,14 @@
|
||||
var/list/defend_phrases = list("Defend me", "Come forth", "Assist me", "Protect me", "Give aid", "Help me")
|
||||
var/list/return_phrases = list("Return", "Return to me", "Your job is done", "You have served", "Come back", "Retreat")
|
||||
|
||||
/datum/action/innate/summon_guardian/IsAvailable()
|
||||
/datum/action/innate/summon_guardian/IsAvailable(feedback)
|
||||
if(!linked_guardian)
|
||||
return FALSE
|
||||
if(isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
if(!L.can_speak_vocal() || L.stat)
|
||||
if(feedback)
|
||||
L.balloon_alert(L, "can't speak!")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -409,7 +411,7 @@
|
||||
buttontooltipstyle = "clockcult"
|
||||
var/mob/living/simple_animal/hostile/clockwork/guardian/linked_guardian
|
||||
|
||||
/datum/action/innate/linked_minds/IsAvailable()
|
||||
/datum/action/innate/linked_minds/IsAvailable(feedback)
|
||||
if(!linked_guardian)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
/datum/action/innate/clockwork_armaments
|
||||
name = "Clockwork Armaments"
|
||||
desc = "Outfits you in a full set of Ratvarian armor."
|
||||
icon_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_clockcult.dmi'
|
||||
button_icon_state = "clockwork_armor"
|
||||
background_icon_state = "bg_clock"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
@@ -190,7 +190,7 @@
|
||||
/obj/item/clothing/head/helmet/space,
|
||||
/obj/item/clothing/shoes/magboots)) //replace this only if ratvar is up
|
||||
|
||||
/datum/action/innate/clockwork_armaments/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/clockwork_armaments/IsAvailable(feedback = TRUE)
|
||||
if(!is_servant_of_ratvar(owner))
|
||||
qdel(src)
|
||||
return
|
||||
@@ -216,8 +216,8 @@
|
||||
owner.visible_message("<span class='warning'>Strange armor appears on [owner]!</span>", "<span class='heavy_brass'>A bright shimmer runs down your body, equipping you with Ratvarian armor.</span>")
|
||||
playsound(owner, 'sound/magic/clockwork/fellowship_armory.ogg', 15 * do_message, TRUE) //get sound loudness based on how much we equipped
|
||||
cooldown = CLOCKWORK_ARMOR_COOLDOWN + world.time
|
||||
owner.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_action_buttons_icon)), CLOCKWORK_ARMOR_COOLDOWN)
|
||||
owner.update_mob_action_buttons()
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_mob_action_buttons)), CLOCKWORK_ARMOR_COOLDOWN)
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/clockwork_armaments/proc/remove_item_if_better(obj/item/I, mob/user)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
GLOB.all_clockwork_mobs += current
|
||||
current.faction |= "ratvar"
|
||||
current.grant_language(/datum/language/ratvar, source = LANGUAGE_CLOCKIE)
|
||||
current.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
|
||||
current.update_mob_action_buttons() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = current
|
||||
if(iscyborg(S))
|
||||
@@ -171,7 +171,7 @@
|
||||
var/mob/living/silicon/robot/R = temp_owner
|
||||
R.module.rebuild_modules()
|
||||
if(temp_owner)
|
||||
temp_owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons
|
||||
temp_owner.update_mob_action_buttons() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons
|
||||
temp_owner.cut_overlays()
|
||||
temp_owner.regenerate_icons()
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
qdel(X)
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/blood_magic/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/blood_magic/IsAvailable(feedback = TRUE)
|
||||
if(!iscultist(owner))
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -119,7 +119,7 @@
|
||||
hand_magic = null
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/blood_spell/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/blood_spell/IsAvailable(feedback = TRUE)
|
||||
if(!iscultist(owner) || owner.incapacitated() || !charges)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -274,7 +274,7 @@
|
||||
attached_action.charges--
|
||||
attached_action.desc = attached_action.base_desc
|
||||
attached_action.desc += "<br><b><u>Has [attached_action.charges] use\s remaining</u></b>."
|
||||
attached_action.UpdateButtons()
|
||||
attached_action.build_all_button_icons()
|
||||
if(attached_action.charges <= 0)
|
||||
remove_ranged_ability("<span class='cult'>You have exhausted the spell's power!</span>")
|
||||
qdel(src)
|
||||
@@ -326,7 +326,7 @@
|
||||
qdel(src)
|
||||
desc = base_desc
|
||||
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
/datum/action/innate/cult/blood_spell/manipulation
|
||||
name = "Blood Rites"
|
||||
@@ -374,7 +374,7 @@
|
||||
source.charges = uses
|
||||
source.desc = source.base_desc
|
||||
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
|
||||
source.UpdateButtons()
|
||||
source.build_all_button_icons()
|
||||
..()
|
||||
|
||||
/obj/item/melee/blood_magic/attack_self(mob/living/user)
|
||||
@@ -401,7 +401,7 @@
|
||||
else if(source)
|
||||
source.desc = source.base_desc
|
||||
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
|
||||
source.UpdateButtons()
|
||||
source.build_all_button_icons()
|
||||
|
||||
//Stun
|
||||
/obj/item/melee/blood_magic/stun
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
reckoning.Grant(current)
|
||||
bloodmark.Grant(current)
|
||||
throwing.Grant(current)
|
||||
current.update_action_buttons_icon()
|
||||
current.update_mob_action_buttons()
|
||||
current.apply_status_effect(/datum/status_effect/cult_master)
|
||||
if(cult_team?.cult_risen)
|
||||
cult_team.rise(current)
|
||||
@@ -238,7 +238,7 @@
|
||||
reckoning.Remove(current)
|
||||
bloodmark.Remove(current)
|
||||
throwing.Remove(current)
|
||||
current.update_action_buttons_icon()
|
||||
current.update_mob_action_buttons()
|
||||
current.remove_status_effect(/datum/status_effect/cult_master)
|
||||
|
||||
if(ishuman(current))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Contains cult communion, guide, and cult master abilities
|
||||
|
||||
/datum/action/innate/cult
|
||||
icon_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
background_icon_state = "bg_demon"
|
||||
buttontooltipstyle = "cult"
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
|
||||
/datum/action/innate/cult/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/IsAvailable(feedback = TRUE)
|
||||
if(!iscultist(owner))
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -51,7 +51,7 @@
|
||||
name = "Spiritual Communion"
|
||||
desc = "Conveys a message from the spirit realm that all cultists can hear."
|
||||
|
||||
/datum/action/innate/cult/comm/spirit/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/comm/spirit/IsAvailable(feedback = TRUE)
|
||||
if(iscultist(owner.mind.current))
|
||||
return TRUE
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
name = "Assert Leadership"
|
||||
button_icon_state = "cultvote"
|
||||
|
||||
/datum/action/innate/cult/mastervote/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/mastervote/IsAvailable(feedback = TRUE)
|
||||
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
|
||||
if(!C?.cult_team || C.cult_team.cult_vote_called || !ishuman(owner))
|
||||
return FALSE
|
||||
@@ -94,7 +94,7 @@
|
||||
team.cult_vote_called = TRUE //somebody's trying to be a master, make sure we don't let anyone else try
|
||||
for(var/datum/mind/B in team.members)
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
B.current.update_mob_action_buttons()
|
||||
if(!B.current.incapacitated())
|
||||
SEND_SOUND(B.current, 'sound/hallucinations/im_here1.ogg')
|
||||
to_chat(B.current, "<span class='cultlarge'>Acolyte [Nominee] has asserted that [Nominee.p_theyre()] worthy of leading the cult. A vote will be called shortly.</span>")
|
||||
@@ -109,7 +109,7 @@
|
||||
team.cult_vote_called = FALSE
|
||||
for(var/datum/mind/B in team.members)
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
B.current.update_mob_action_buttons()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has died in the process of attempting to win the cult's support!</span>")
|
||||
return FALSE
|
||||
@@ -117,7 +117,7 @@
|
||||
team.cult_vote_called = FALSE
|
||||
for(var/datum/mind/B in team.members)
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
B.current.update_mob_action_buttons()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has gone catatonic in the process of attempting to win the cult's support!</span>")
|
||||
return FALSE
|
||||
@@ -125,7 +125,7 @@
|
||||
team.cult_vote_called = FALSE
|
||||
for(var/datum/mind/B in team.members)
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
B.current.update_mob_action_buttons()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current, "<span class='cultlarge'>[Nominee] could not win the cult's support and shall continue to serve as an acolyte.</span>")
|
||||
return FALSE
|
||||
@@ -140,7 +140,7 @@
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/cult/master/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/master/IsAvailable(feedback = TRUE)
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(/datum/antagonist/cult/master) || GLOB.cult_narsie)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -226,9 +226,9 @@
|
||||
CM.attached_action = src
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/master/cultmark/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/master/cultmark/IsAvailable(feedback = TRUE)
|
||||
if(cooldown > world.time)
|
||||
if(!CM.active && !silent)
|
||||
if(!CM.active && feedback)
|
||||
to_chat(owner, "<span class='cultlarge'><b>You need to wait [DisplayTimeText(cooldown - world.time)] before you can mark another target!</b></span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -278,7 +278,7 @@
|
||||
C.cult_team.blood_target = target
|
||||
var/area/A = get_area(target)
|
||||
attached_action.cooldown = world.time + attached_action.base_cooldown
|
||||
addtimer(CALLBACK(attached_action.owner, TYPE_PROC_REF(/mob, update_action_buttons_icon)), attached_action.base_cooldown)
|
||||
addtimer(CALLBACK(attached_action.owner, TYPE_PROC_REF(/mob, update_mob_action_buttons)), attached_action.base_cooldown)
|
||||
C.cult_team.blood_target_image = image('icons/effects/cult_target.dmi', target, "glow", ABOVE_MOB_LAYER)
|
||||
C.cult_team.blood_target_image.appearance_flags = RESET_COLOR
|
||||
C.cult_team.blood_target_image.pixel_x = -target.pixel_x
|
||||
@@ -288,7 +288,7 @@
|
||||
to_chat(B.current, "<span class='cultlarge'><b>[ranged_ability_user] has marked [C.cult_team.blood_target] in the [A.name] as the cult's top priority, get there immediately!</b></span>")
|
||||
SEND_SOUND(B.current, sound(pick('sound/hallucinations/over_here2.ogg','sound/hallucinations/over_here3.ogg'),0,1,75))
|
||||
B.current.client.images += C.cult_team.blood_target_image
|
||||
attached_action.owner.update_action_buttons_icon()
|
||||
attached_action.owner.update_mob_action_buttons()
|
||||
remove_ranged_ability("<span class='cult'>The marking rite is complete! It will last for 90 seconds.</span>")
|
||||
C.cult_team.blood_target_reset_timer = addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(reset_blood_target),C.cult_team), 900, TIMER_STOPPABLE)
|
||||
return TRUE
|
||||
@@ -308,7 +308,7 @@
|
||||
name = "Mark a Blood Target for the Cult"
|
||||
desc = "Marks a target for the entire cult to track."
|
||||
|
||||
/datum/action/innate/cult/master/cultmark/ghost/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/master/cultmark/ghost/IsAvailable(feedback = TRUE)
|
||||
if(istype(owner, /mob/dead/observer) && iscultist(owner.mind.current))
|
||||
return TRUE
|
||||
else
|
||||
@@ -322,7 +322,7 @@
|
||||
var/cooldown = 0
|
||||
var/base_cooldown = 600
|
||||
|
||||
/datum/action/innate/cult/ghostmark/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/ghostmark/IsAvailable(feedback = TRUE)
|
||||
if(istype(owner, /mob/dead/observer) && iscultist(owner.mind.current))
|
||||
return TRUE
|
||||
else
|
||||
@@ -333,7 +333,7 @@
|
||||
name = "Blood Mark your Target"
|
||||
desc = "Marks whatever you are orbitting - for the entire cult to track."
|
||||
button_icon_state = "cult_mark"
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
SEND_SOUND(owner, 'sound/magic/enter_blood.ogg')
|
||||
to_chat(owner,"<span class='cultbold'>Your previous mark is gone - you are now ready to create a new blood mark.</span>")
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
C.cult_team.blood_target = target
|
||||
var/area/A = get_area(target)
|
||||
cooldown = world.time + base_cooldown
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_action_buttons_icon)), base_cooldown)
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_mob_action_buttons)), base_cooldown)
|
||||
C.cult_team.blood_target_image = image('icons/effects/cult_target.dmi', target, "glow", ABOVE_MOB_LAYER)
|
||||
C.cult_team.blood_target_image.appearance_flags = RESET_COLOR
|
||||
C.cult_team.blood_target_image.pixel_x = -C.cult_team.blood_target.pixel_x
|
||||
@@ -376,7 +376,7 @@
|
||||
name = "Clear the Blood Mark"
|
||||
desc = "Remove the Blood Mark you previously set."
|
||||
button_icon_state = "emp"
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
C.cult_team.blood_target_reset_timer = addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(reset_blood_target),C.cult_team), base_cooldown, TIMER_STOPPABLE)
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_button)), base_cooldown)
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/datum/action/innate/cult/master/pulse
|
||||
name = "Eldritch Pulse"
|
||||
desc = "Seize upon a fellow cultist or cult structure and teleport it to a nearby location."
|
||||
icon_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
button_icon_state = "arcane_barrage"
|
||||
var/obj/effect/proc_holder/pulse/PM
|
||||
var/cooldown = 0
|
||||
@@ -401,11 +401,11 @@
|
||||
PM.attached_action = src
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/master/pulse/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/master/pulse/IsAvailable(feedback = TRUE)
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(/datum/antagonist/cult/master))
|
||||
return FALSE
|
||||
if(cooldown > world.time)
|
||||
if(!PM.active && !silent)
|
||||
if(!PM.active && feedback)
|
||||
to_chat(owner, "<span class='cultlarge'><b>You need to wait [DisplayTimeText(cooldown - world.time)] before you can pulse again!</b></span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -467,5 +467,5 @@
|
||||
attached_action.throwing = FALSE
|
||||
attached_action.cooldown = world.time + attached_action.base_cooldown
|
||||
remove_ranged_ability("<span class='cult'>A pulse of blood magic surges through you as you shift [attached_action.throwee] through time and space.</span>")
|
||||
caller.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(caller, TYPE_PROC_REF(/mob, update_action_buttons_icon)), attached_action.base_cooldown)
|
||||
caller.update_mob_action_buttons()
|
||||
addtimer(CALLBACK(caller, TYPE_PROC_REF(/mob, update_mob_action_buttons)), attached_action.base_cooldown)
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
/datum/action/innate/dash/cult
|
||||
name = "Rend the Veil"
|
||||
desc = "Use the sword to shear open the flimsy fabric of this reality and teleport to your target."
|
||||
icon_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_cult.dmi'
|
||||
button_icon_state = "phaseshift"
|
||||
dash_sound = 'sound/magic/enter_blood.ogg'
|
||||
recharge_sound = 'sound/magic/exit_blood.ogg'
|
||||
@@ -230,7 +230,7 @@
|
||||
phasein = /obj/effect/temp_visual/dir_setting/cult/phase
|
||||
phaseout = /obj/effect/temp_visual/dir_setting/cult/phase/out
|
||||
|
||||
/datum/action/innate/dash/cult/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/dash/cult/IsAvailable(feedback = TRUE)
|
||||
if(iscultist(owner) && current_charges)
|
||||
return TRUE
|
||||
else
|
||||
@@ -250,7 +250,7 @@
|
||||
sword = bastard
|
||||
holder = user
|
||||
|
||||
/datum/action/innate/cult/spin2win/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/spin2win/IsAvailable(feedback = TRUE)
|
||||
if(iscultist(holder) && cooldown <= world.time)
|
||||
return TRUE
|
||||
else
|
||||
@@ -264,14 +264,14 @@
|
||||
sword.block_chance = 100
|
||||
sword.slowdown += 1.5
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_spinning)), 50)
|
||||
holder.update_action_buttons_icon()
|
||||
holder.update_mob_action_buttons()
|
||||
|
||||
/datum/action/innate/cult/spin2win/proc/stop_spinning()
|
||||
sword.spinning = FALSE
|
||||
sword.block_chance = 50
|
||||
sword.slowdown -= 1.5
|
||||
sleep(sword.spin_cooldown)
|
||||
holder.update_action_buttons_icon()
|
||||
holder.update_mob_action_buttons()
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/cult
|
||||
name = "\improper Nar'Sien bola"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/obj/effect/temp_visual/cult/rune_spawn/rune_center_type
|
||||
var/rune_color
|
||||
|
||||
/datum/action/innate/cult/create_rune/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/cult/create_rune/IsAvailable(feedback = TRUE)
|
||||
if(!rune_type || cooldown > world.time)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -56,8 +56,8 @@
|
||||
R4 = new rune_center_type(T, scribe_time, rune_color)
|
||||
|
||||
cooldown = base_cooldown + world.time
|
||||
owner.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_action_buttons_icon)), base_cooldown)
|
||||
owner.update_mob_action_buttons()
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob, update_mob_action_buttons)), base_cooldown)
|
||||
var/list/health
|
||||
if(damage_interrupt && isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
@@ -78,7 +78,7 @@
|
||||
if(R4)
|
||||
qdel(R4)
|
||||
cooldown = 0
|
||||
owner.update_action_buttons_icon()
|
||||
owner.update_mob_action_buttons()
|
||||
|
||||
//teleport rune
|
||||
/datum/action/innate/cult/create_rune/tele
|
||||
|
||||
@@ -164,7 +164,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
|
||||
/datum/action/cooldown/disease_cough
|
||||
name = "Cough"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "cough"
|
||||
desc = "Force the host you are following to cough with extra force, spreading your infection to those within two meters of your host even if your transmissibility is low.<br>Cooldown: 10 seconds"
|
||||
cooldown_time = 100
|
||||
@@ -194,7 +194,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
|
||||
/datum/action/cooldown/disease_sneeze
|
||||
name = "Sneeze"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "sneeze"
|
||||
desc = "Force the host you are following to sneeze with extra force, spreading your infection to any victims in a 4 meter cone in front of your host even if your transmissibility is low.<br>Cooldown: 20 seconds"
|
||||
cooldown_time = 200
|
||||
@@ -228,7 +228,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
|
||||
/datum/action/cooldown/disease_infect
|
||||
name = "Secrete Infection"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "infect"
|
||||
desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds.<br>Cooldown: 40 seconds"
|
||||
cooldown_time = 400
|
||||
|
||||
@@ -403,7 +403,7 @@ the new instance inside the host to be updated to the template's stats.
|
||||
|
||||
/datum/action/innate/disease_adapt
|
||||
name = "Adaptation Menu"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "disease_menu"
|
||||
|
||||
/datum/action/innate/disease_adapt/Activate()
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
desc = "Destroys all runes that were drawn by this blade."
|
||||
background_icon_state = "bg_ecult"
|
||||
button_icon_state = "rune_break"
|
||||
icon_icon = 'icons/mob/actions/actions_ecult.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_ecult.dmi'
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
///Reference to the rune knife it is inside of
|
||||
var/obj/item/melee/rune_knife/sword
|
||||
|
||||
@@ -608,7 +608,7 @@
|
||||
name = "Mansus Link"
|
||||
desc = "Send a psychic message to everyone connected to your Mansus Net."
|
||||
button_icon_state = "link_speech"
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_ecult"
|
||||
var/mob/living/simple_animal/hostile/eldritch/raw_prophet/originator
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
desc = "Teach new recruits the Secret Handshake to join."
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "recruit"
|
||||
icon_icon = 'icons/obj/gang/actions.dmi'
|
||||
button_icon = 'icons/obj/gang/actions.dmi'
|
||||
cooldown_time = 300
|
||||
/// The family antagonist datum of the "owner" of this action.
|
||||
var/datum/antagonist/gang/my_gang_datum
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
to_chat(src, "<span class='revenboldnotice'>You can move again!</span>")
|
||||
if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
|
||||
essence = min(essence_regen_cap, essence+essence_regen_amount)
|
||||
update_action_buttons_icon() //because we update something required by our spells in life, we need to update our buttons
|
||||
update_mob_action_buttons() //because we update something required by our spells in life, we need to update our buttons
|
||||
update_spooky_icon()
|
||||
update_health_hud()
|
||||
|
||||
@@ -200,12 +200,12 @@
|
||||
"<span class='revendanger'>As \the [W] passes through you, you feel your essence draining away!</span>")
|
||||
adjustBruteLoss(25) //hella effective
|
||||
inhibited = TRUE
|
||||
update_action_buttons_icon()
|
||||
update_mob_action_buttons()
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_inhibit)), 30)
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/reset_inhibit()
|
||||
inhibited = FALSE
|
||||
update_action_buttons_icon()
|
||||
update_mob_action_buttons()
|
||||
|
||||
/mob/living/simple_animal/revenant/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && !revealed)
|
||||
@@ -314,7 +314,7 @@
|
||||
if(essence_excess < essence_cost)
|
||||
return FALSE
|
||||
essence_excess -= essence_cost
|
||||
update_action_buttons_icon()
|
||||
update_mob_action_buttons()
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/revenant/proc/change_essence_amount(essence_amt, silent = FALSE, source = null)
|
||||
@@ -327,7 +327,7 @@
|
||||
if(essence_amt > 0)
|
||||
essence_accumulated = max(0, essence_accumulated+essence_amt)
|
||||
essence_excess = max(0, essence_excess+essence_amt)
|
||||
update_action_buttons_icon()
|
||||
update_mob_action_buttons()
|
||||
if(!silent)
|
||||
if(essence_amt > 0)
|
||||
to_chat(src, "<span class='revennotice'>Gained [essence_amt]E[source ? " from [source]":""].</span>")
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
user.reveal(reveal)
|
||||
user.stun(stun)
|
||||
if(action)
|
||||
action.UpdateButtons()
|
||||
action.build_all_button_icons()
|
||||
return TRUE
|
||||
|
||||
//Overload Light: Breaks a light that's online and sends out lightning bolts to all nearby people.
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
/datum/action/cooldown/slam
|
||||
name = "Slaughter Slam"
|
||||
desc = "Launch enemies and break bones in one strike."
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
background_icon_state = "bg_demon"
|
||||
button_icon_state = "slam"
|
||||
cooldown_time = 45 SECONDS
|
||||
|
||||
@@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
name = "AI Action"
|
||||
desc = "You aren't entirely sure what this does, but it's very beepy and boopy."
|
||||
background_icon_state = "bg_tech_blue"
|
||||
icon_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
check_flags = AB_CHECK_CONSCIOUS //can't doomsday if dead.
|
||||
var/mob/living/silicon/ai/owner_AI //The owner AI, so we don't have to typecast every time
|
||||
var/uses //If we have multiple uses of the same power
|
||||
@@ -43,28 +43,29 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
else
|
||||
owner_AI = owner
|
||||
|
||||
/datum/action/innate/ai/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/ai/IsAvailable(feedback = TRUE)
|
||||
. = ..()
|
||||
if(owner_AI && owner_AI.malf_cooldown > world.time)
|
||||
return FALSE
|
||||
|
||||
/datum/action/innate/ai/Trigger()
|
||||
/datum/action/innate/ai/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(auto_use_uses)
|
||||
adjust_uses(-1)
|
||||
if(cooldown_period)
|
||||
owner_AI.malf_cooldown = world.time + cooldown_period
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/ai/proc/adjust_uses(amt, silent)
|
||||
uses += amt
|
||||
if(uses)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
to_chat(owner, span_notice("[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining."))
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
return
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
to_chat(owner, span_warning("[name] has run out of uses!"))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -88,12 +89,12 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
uses += amt
|
||||
if(uses)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
to_chat(owner, span_notice("[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining."))
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
return
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
to_chat(owner, span_warning("[name] has run out of uses!"))
|
||||
Remove(owner)
|
||||
QDEL_IN(src, 100) //let any active timers on us finish up
|
||||
|
||||
@@ -107,8 +108,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
//The actual ranged proc holder.
|
||||
/obj/effect/proc_holder/ranged_ai
|
||||
var/enable_text = "<span class='notice'>Hello World!</span>" //Appears when the user activates the ability
|
||||
var/disable_text = "<span class='danger'>Goodbye Cruel World!</span>" //Context clues!
|
||||
var/enable_text = span_notice("Hello World!") //Appears when the user activates the ability
|
||||
var/disable_text = span_danger("Goodbye Cruel World!") //Context clues!
|
||||
var/datum/action/innate/ai/ranged/attached_action
|
||||
|
||||
/obj/effect/proc_holder/ranged_ai/Destroy()
|
||||
@@ -166,7 +167,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
var/mob/living/silicon/ai/A = usr
|
||||
|
||||
if(A.stat == DEAD)
|
||||
to_chat(A, "<span class='warning'>You are already dead!</span>")
|
||||
to_chat(A, span_warning("You are already dead!"))
|
||||
return
|
||||
|
||||
for(var/datum/AI_Module/AM in possible_modules)
|
||||
@@ -201,7 +202,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
else //Adding uses to an existing module
|
||||
action.uses += initial(action.uses)
|
||||
action.desc = "[initial(action.desc)] It has [action.uses] use\s remaining."
|
||||
action.UpdateButtons()
|
||||
action.build_all_button_icons()
|
||||
temp = "Additional use[action.uses > 1 ? "s" : ""] added to [action.name]!"
|
||||
processing_time -= AM.cost
|
||||
|
||||
@@ -222,7 +223,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
var/power_type = /datum/action/innate/ai //If the module gives an active ability, use this. Mutually exclusive with upgrade.
|
||||
var/upgrade //If the module gives a passive upgrade, use this. Mutually exclusive with power_type.
|
||||
var/unlock_text = "<span class='notice'>Hello World!</span>" //Text shown when an ability is unlocked
|
||||
var/unlock_text = span_notice("Hello World!") //Text shown when an ability is unlocked
|
||||
var/unlock_sound //Sound played when an ability is unlocked
|
||||
|
||||
/datum/AI_Module/proc/upgrade(mob/living/silicon/ai/AI) //Apply upgrades!
|
||||
@@ -240,7 +241,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 130
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/nuke_station
|
||||
unlock_text = "<span class='notice'>You slowly, carefully, establish a connection with the on-station self-destruct. You can now activate it at any time.</span>"
|
||||
unlock_text = span_notice("You slowly, carefully, establish a connection with the on-station self-destruct. You can now activate it at any time.")
|
||||
|
||||
/datum/action/innate/ai/nuke_station
|
||||
name = "Doomsday Device"
|
||||
@@ -251,7 +252,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
/datum/action/innate/ai/nuke_station/Activate()
|
||||
var/turf/T = get_turf(owner)
|
||||
if(!istype(T) || !is_station_level(T.z))
|
||||
to_chat(owner, "<span class='warning'>You cannot activate the doomsday device while off-station!</span>")
|
||||
to_chat(owner, span_warning("You cannot activate the doomsday device while off-station!"))
|
||||
return
|
||||
if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
|
||||
return
|
||||
@@ -275,13 +276,13 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
owner.playsound_local(owner, 'sound/misc/bloblarm.ogg', 50, 0)
|
||||
to_chat(owner, "<span class='userdanger'>!!! UNAUTHORIZED SELF-DESTRUCT ACCESS !!!</span>")
|
||||
to_chat(owner, "<span class='boldannounce'>This is a class-3 security violation. This incident will be reported to Central Command.</span>")
|
||||
to_chat(owner, span_userdanger("!!! UNAUTHORIZED SELF-DESTRUCT ACCESS !!!"))
|
||||
to_chat(owner, span_boldannounce("This is a class-3 security violation. This incident will be reported to Central Command."))
|
||||
for(var/i in 1 to 3)
|
||||
sleep(20)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldannounce'>Sending security report to Central Command.....[rand(0, 9) + (rand(20, 30) * i)]%</span>")
|
||||
to_chat(owner, span_boldannounce("Sending security report to Central Command.....[rand(0, 9) + (rand(20, 30) * i)]%"))
|
||||
sleep(3)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
@@ -290,12 +291,12 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
sleep(30)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Welcome, akjv9c88asdf12nb.</span>")
|
||||
to_chat(owner, span_boldnotice("Credentials accepted. Welcome, akjv9c88asdf12nb."))
|
||||
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
|
||||
sleep(5)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Arm self-destruct device? (Y/N)</span>")
|
||||
to_chat(owner, span_boldnotice("Arm self-destruct device? (Y/N)"))
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage1.ogg', 50, 0)
|
||||
sleep(20)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
@@ -304,7 +305,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
sleep(15)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Confirm arming of self-destruct device? (Y/N)</span>")
|
||||
to_chat(owner, span_boldnotice("Confirm arming of self-destruct device? (Y/N)"))
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
|
||||
sleep(10)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
@@ -313,7 +314,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
sleep(rand(15, 25))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Please repeat password to confirm.</span>")
|
||||
to_chat(owner, span_boldnotice("Please repeat password to confirm."))
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
|
||||
sleep(14)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
@@ -322,14 +323,14 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
sleep(40)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Transmitting arming signal...</span>")
|
||||
to_chat(owner, span_boldnotice("Credentials accepted. Transmitting arming signal..."))
|
||||
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
|
||||
sleep(30)
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
if(istype(owner.loc, /obj/item/aicard))
|
||||
to_chat(owner, "<span class='boldnotice'>Error: Signal transmission failed. Reason: Lost connection to network.</span>")
|
||||
to_chat(owner, "<span class='warning'>You can't activate the doomsday device while inside an intelliCard!</span>")
|
||||
to_chat(owner, span_boldnotice("Error: Signal transmission failed. Reason: Lost connection to network."))
|
||||
to_chat(owner, span_warning("You can't activate the doomsday device while inside an intelliCard!"))
|
||||
return
|
||||
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", "aimalf")
|
||||
set_security_level("delta")
|
||||
@@ -409,7 +410,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
continue
|
||||
if(issilicon(L))
|
||||
continue
|
||||
to_chat(L, "<span class='userdanger'>The blast wave from [src] tears you atom from atom!</span>")
|
||||
to_chat(L, span_userdanger("The blast wave from [src] tears you atom from atom!"))
|
||||
L.dust()
|
||||
to_chat(world, "<B>The AI cleansed the station of life with the doomsday device!</B>")
|
||||
SSticker.force_ending = 1
|
||||
@@ -422,7 +423,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
description = "Improves the power and health of all AI turrets. This effect is permanent."
|
||||
cost = 30
|
||||
upgrade = TRUE
|
||||
unlock_text = "<span class='notice'>You establish a power diversion to your turrets, upgrading their health and damage.</span>"
|
||||
unlock_text = span_notice("You establish a power diversion to your turrets, upgrading their health and damage.")
|
||||
unlock_sound = 'sound/items/rped.ogg'
|
||||
|
||||
/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/ai/AI)
|
||||
@@ -441,7 +442,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 30
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/lockdown
|
||||
unlock_text = "<span class='notice'>You upload a sleeper trojan into the door control systems. You can send a signal to set it off at any time.</span>"
|
||||
unlock_text = span_notice("You upload a sleeper trojan into the door control systems. You can send a signal to set it off at any time.")
|
||||
unlock_sound = 'sound/machines/boltsdown.ogg'
|
||||
|
||||
/datum/action/innate/ai/lockdown
|
||||
@@ -462,7 +463,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
C.post_status("alert", "lockdown")
|
||||
|
||||
minor_announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.","Network Alert:", TRUE)
|
||||
to_chat(owner, "<span class='danger'>Lockdown initiated. Network reset in 90 seconds.</span>")
|
||||
to_chat(owner, span_danger("Lockdown initiated. Network reset in 90 seconds."))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, PROC_REF(minor_announce),
|
||||
"Automatic system reboot complete. Have a secure day.",
|
||||
"Network reset:"), 900)
|
||||
@@ -476,7 +477,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 25
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/destroy_rcds
|
||||
unlock_text = "<span class='notice'>After some improvisation, you rig your onboard radio to be able to send a signal to detonate all RCDs.</span>"
|
||||
unlock_text = span_notice("After some improvisation, you rig your onboard radio to be able to send a signal to detonate all RCDs.")
|
||||
unlock_sound = 'sound/items/timer.ogg'
|
||||
|
||||
/datum/action/innate/ai/destroy_rcds
|
||||
@@ -491,7 +492,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
if(!istype(I, /obj/item/construction/rcd/borg)) //Ensures that cyborg RCDs are spared.
|
||||
var/obj/item/construction/rcd/RCD = I
|
||||
RCD.detonate_pulse()
|
||||
to_chat(owner, "<span class='danger'>RCD detonation pulse emitted.</span>")
|
||||
to_chat(owner, span_danger("RCD detonation pulse emitted."))
|
||||
owner.playsound_local(owner, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -503,7 +504,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
Do not allow the mech to leave the station's vicinity or allow it to be destroyed."
|
||||
cost = 30
|
||||
upgrade = TRUE
|
||||
unlock_text = "<span class='notice'>Virus package compiled. Select a target mech at any time. <b>You must remain on the station at all times. Loss of signal will result in total system lockout.</b></span>"
|
||||
unlock_text = span_notice("Virus package compiled. Select a target mech at any time. <b>You must remain on the station at all times. Loss of signal will result in total system lockout.</b>")
|
||||
unlock_sound = 'sound/mecha/nominal.ogg'
|
||||
|
||||
/datum/AI_Module/large/mecha_domination/upgrade(mob/living/silicon/ai/AI)
|
||||
@@ -519,7 +520,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
one_purchase = TRUE
|
||||
cost = 25
|
||||
power_type = /datum/action/innate/ai/break_fire_alarms
|
||||
unlock_text = "<span class='notice'>You replace the thermal sensing capabilities of all fire alarms with a manual override, allowing you to turn them off at will.</span>"
|
||||
unlock_text = span_notice("You replace the thermal sensing capabilities of all fire alarms with a manual override, allowing you to turn them off at will.")
|
||||
unlock_sound = 'goon/sound/machinery/firealarm.ogg'
|
||||
|
||||
/datum/action/innate/ai/break_fire_alarms
|
||||
@@ -534,7 +535,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
continue
|
||||
F.obj_flags |= EMAGGED
|
||||
F.update_icon()
|
||||
to_chat(owner, "<span class='notice'>All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.</span>")
|
||||
to_chat(owner, span_notice("All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized."))
|
||||
owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -547,7 +548,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
one_purchase = TRUE
|
||||
cost = 50
|
||||
power_type = /datum/action/innate/ai/break_air_alarms
|
||||
unlock_text = "<span class='notice'>You remove the safety overrides on all air alarms, but you leave the confirm prompts open. You can hit 'Yes' at any time... you bastard.</span>"
|
||||
unlock_text = span_notice("You remove the safety overrides on all air alarms, but you leave the confirm prompts open. You can hit 'Yes' at any time... you bastard.")
|
||||
unlock_sound = 'sound/effects/space_wind.ogg'
|
||||
|
||||
/datum/action/innate/ai/break_air_alarms
|
||||
@@ -561,7 +562,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
if(!is_station_level(AA.z))
|
||||
continue
|
||||
AA.obj_flags |= EMAGGED
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overridden. Air alarms may now use the Flood environmental mode.</span>")
|
||||
to_chat(owner, span_notice("All air alarm safeties on the station have been overridden. Air alarms may now use the Flood environmental mode."))
|
||||
owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -572,7 +573,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
description = "Overheats an electrical machine, causing a small explosion and destroying it. Two uses per purchase."
|
||||
cost = 20
|
||||
power_type = /datum/action/innate/ai/ranged/overload_machine
|
||||
unlock_text = "<span class='notice'>You enable the ability for the station's APCs to direct intense energy into machinery.</span>"
|
||||
unlock_text = span_notice("You enable the ability for the station's APCs to direct intense energy into machinery.")
|
||||
unlock_sound = 'sound/effects/comfyfire.ogg' //definitely not comfy, but it's the closest sound to "roaring fire" we have
|
||||
|
||||
/datum/action/innate/ai/ranged/overload_machine
|
||||
@@ -594,8 +595,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
/obj/effect/proc_holder/ranged_ai/overload_machine
|
||||
active = FALSE
|
||||
ranged_mousepointer = 'icons/effects/overload_machine_target.dmi'
|
||||
enable_text = "<span class='notice'>You tap into the station's powernet. Click on a machine to detonate it, or use the ability again to cancel.</span>"
|
||||
disable_text = "<span class='notice'>You release your hold on the powernet.</span>"
|
||||
enable_text = span_notice("You tap into the station's powernet. Click on a machine to detonate it, or use the ability again to cancel.")
|
||||
disable_text = span_notice("You release your hold on the powernet.")
|
||||
|
||||
/obj/effect/proc_holder/ranged_ai/overload_machine/InterceptClickOn(mob/living/caller, params, obj/machinery/target)
|
||||
if(..())
|
||||
@@ -604,16 +605,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
remove_ranged_ability()
|
||||
return
|
||||
if(!istype(target))
|
||||
to_chat(ranged_ability_user, "<span class='warning'>You can only overload machines!</span>")
|
||||
to_chat(ranged_ability_user, span_warning("You can only overload machines!"))
|
||||
return
|
||||
if(is_type_in_typecache(target, GLOB.blacklisted_malf_machines))
|
||||
to_chat(ranged_ability_user, "<span class='warning'>You cannot overload that device!</span>")
|
||||
to_chat(ranged_ability_user, span_warning("You cannot overload that device!"))
|
||||
return
|
||||
ranged_ability_user.playsound_local(ranged_ability_user, "sparks", 50, 0)
|
||||
attached_action.adjust_uses(-1)
|
||||
target.audible_message("<span class='userdanger'>You hear a loud electrical buzzing sound coming from [target]!</span>")
|
||||
target.audible_message(span_userdanger("You hear a loud electrical buzzing sound coming from [target]!"))
|
||||
addtimer(CALLBACK(attached_action, TYPE_PROC_REF(/datum/action/innate/ai/ranged/overload_machine, detonate_machine), target), 50) //kaboom!
|
||||
remove_ranged_ability("<span class='danger'>Overcharging machine...</span>")
|
||||
remove_ranged_ability(span_danger("Overcharging machine..."))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -624,7 +625,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. Four uses."
|
||||
cost = 30
|
||||
power_type = /datum/action/innate/ai/ranged/override_machine
|
||||
unlock_text = "<span class='notice'>You procure a virus from the Space Dark Web and distribute it to the station's machines.</span>"
|
||||
unlock_text = span_notice("You procure a virus from the Space Dark Web and distribute it to the station's machines.")
|
||||
unlock_sound = 'sound/machines/airlock_alien_prying.ogg'
|
||||
|
||||
/datum/action/innate/ai/ranged/override_machine
|
||||
@@ -641,8 +642,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
/obj/effect/proc_holder/ranged_ai/override_machine
|
||||
active = FALSE
|
||||
ranged_mousepointer = 'icons/effects/override_machine_target.dmi'
|
||||
enable_text = "<span class='notice'>You tap into the station's powernet. Click on a machine to animate it, or use the ability again to cancel.</span>"
|
||||
disable_text = "<span class='notice'>You release your hold on the powernet.</span>"
|
||||
enable_text = span_notice("You tap into the station's powernet. Click on a machine to animate it, or use the ability again to cancel.")
|
||||
disable_text = span_notice("You release your hold on the powernet.")
|
||||
|
||||
/obj/effect/proc_holder/ranged_ai/override_machine/InterceptClickOn(mob/living/caller, params, obj/machinery/target)
|
||||
if(..())
|
||||
@@ -651,16 +652,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
remove_ranged_ability()
|
||||
return
|
||||
if(!istype(target))
|
||||
to_chat(ranged_ability_user, "<span class='warning'>You can only animate machines!</span>")
|
||||
to_chat(ranged_ability_user, span_warning("You can only animate machines!"))
|
||||
return
|
||||
if(!target.can_be_overridden() || is_type_in_typecache(target, GLOB.blacklisted_malf_machines))
|
||||
to_chat(ranged_ability_user, "<span class='warning'>That machine can't be overridden!</span>")
|
||||
to_chat(ranged_ability_user, span_warning("That machine can't be overridden!"))
|
||||
return
|
||||
ranged_ability_user.playsound_local(ranged_ability_user, 'sound/misc/interference.ogg', 50, 0)
|
||||
attached_action.adjust_uses(-1)
|
||||
target.audible_message("<span class='userdanger'>You hear a loud electrical buzzing sound coming from [target]!</span>")
|
||||
target.audible_message(span_userdanger("You hear a loud electrical buzzing sound coming from [target]!"))
|
||||
addtimer(CALLBACK(attached_action, TYPE_PROC_REF(/datum/action/innate/ai/ranged/override_machine, animate_machine), target), 50) //kabeep!
|
||||
remove_ranged_ability("<span class='danger'>Sending override signal...</span>")
|
||||
remove_ranged_ability(span_danger("Sending override signal..."))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -672,7 +673,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 100
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/place_transformer
|
||||
unlock_text = "<span class='notice'>You make contact with Space Amazon and request a robotics factory for delivery.</span>"
|
||||
unlock_text = span_notice("You make contact with Space Amazon and request a robotics factory for delivery.")
|
||||
unlock_sound = 'sound/machines/ping.ogg'
|
||||
|
||||
/datum/action/innate/ai/place_transformer
|
||||
@@ -704,7 +705,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
conveyor.masterAI = owner
|
||||
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
|
||||
owner_AI.can_shunt = FALSE
|
||||
to_chat(owner, "<span class='warning'>You are no longer able to shunt your core to APCs.</span>")
|
||||
to_chat(owner, span_warning("You are no longer able to shunt your core to APCs."))
|
||||
adjust_uses(-1)
|
||||
|
||||
/mob/living/silicon/ai/proc/remove_transformer_image(client/C, image/I, turf/T)
|
||||
@@ -736,7 +737,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
I.icon_state = "[success ? "green" : "red"]Overlay" //greenOverlay and redOverlay for success and failure respectively
|
||||
addtimer(CALLBACK(src, PROC_REF(remove_transformer_image), client, I, T), 30)
|
||||
if(!success)
|
||||
to_chat(src, "<span class='warning'>[alert_msg]</span>")
|
||||
to_chat(src, span_warning("[alert_msg]"))
|
||||
return success
|
||||
|
||||
|
||||
@@ -747,7 +748,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
description = "Attempts to overload the lighting circuits on the station, destroying some bulbs. Three uses."
|
||||
cost = 15
|
||||
power_type = /datum/action/innate/ai/blackout
|
||||
unlock_text = "<span class='notice'>You hook into the powernet and route bonus power towards the station's lighting.</span>"
|
||||
unlock_text = span_notice("You hook into the powernet and route bonus power towards the station's lighting.")
|
||||
unlock_sound = "sparks"
|
||||
|
||||
/datum/action/innate/ai/blackout
|
||||
@@ -767,13 +768,13 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
apc.overload_lighting()
|
||||
else
|
||||
apc.overload++
|
||||
to_chat(owner, "<span class='notice'>Overcurrent applied to the powernet.</span>")
|
||||
to_chat(owner, span_notice("Overcurrent applied to the powernet."))
|
||||
owner.playsound_local(owner, "sparks", 50, 0)
|
||||
adjust_uses(-1)
|
||||
if(QDELETED(src) || uses) //Not sure if not having src here would cause a runtime, so it's here to be safe
|
||||
return
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
//Disable Emergency Lights
|
||||
/datum/AI_Module/small/emergency_lights
|
||||
@@ -783,7 +784,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 10
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/emergency_lights
|
||||
unlock_text = "<span class='notice'>You hook into the powernet and locate the connections between light fixtures and their fallbacks.</span>"
|
||||
unlock_text = span_notice("You hook into the powernet and locate the connections between light fixtures and their fallbacks.")
|
||||
unlock_sound = "sparks"
|
||||
|
||||
/datum/action/innate/ai/emergency_lights
|
||||
@@ -798,7 +799,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
L.no_emergency = TRUE
|
||||
INVOKE_ASYNC(L, TYPE_PROC_REF(/obj/machinery/light, update), FALSE)
|
||||
CHECK_TICK
|
||||
to_chat(owner, "<span class='notice'>Emergency light connections severed.</span>")
|
||||
to_chat(owner, span_notice("Emergency light connections severed."))
|
||||
owner.playsound_local(owner, 'sound/effects/light_flicker.ogg', 50, FALSE)
|
||||
|
||||
|
||||
@@ -810,7 +811,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 10
|
||||
one_purchase = TRUE
|
||||
power_type = /datum/action/innate/ai/reactivate_cameras
|
||||
unlock_text = "<span class='notice'>You deploy nanomachines to the cameranet.</span>"
|
||||
unlock_text = span_notice("You deploy nanomachines to the cameranet.")
|
||||
unlock_sound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
/datum/action/innate/ai/reactivate_cameras
|
||||
@@ -836,13 +837,13 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
C.view_range = initial(C.view_range)
|
||||
fixed_cameras++
|
||||
uses-- //Not adjust_uses() so it doesn't automatically delete or show a message
|
||||
to_chat(owner, "<span class='notice'>Diagnostic complete! Cameras reactivated: <b>[fixed_cameras]</b>. Reactivations remaining: <b>[uses]</b>.</span>")
|
||||
to_chat(owner, span_notice("Diagnostic complete! Cameras reactivated: <b>[fixed_cameras]</b>. Reactivations remaining: <b>[uses]</b>."))
|
||||
owner.playsound_local(owner, 'sound/items/wirecutter.ogg', 50, 0)
|
||||
adjust_uses(0, TRUE) //Checks the uses remaining
|
||||
if(QDELETED(src) || !uses) //Not sure if not having src here would cause a runtime, so it's here to be safe
|
||||
return
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
//Upgrade Camera Network: EMP-proofs all cameras, in addition to giving them X-ray vision.
|
||||
/datum/AI_Module/large/upgrade_cameras
|
||||
@@ -853,7 +854,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
one_purchase = TRUE
|
||||
cost = 35 //Decent price for omniscience!
|
||||
upgrade = TRUE
|
||||
unlock_text = "<span class='notice'>OTA firmware distribution complete! Cameras upgraded: CAMSUPGRADED. Light amplification system online.</span>"
|
||||
unlock_text = span_notice("OTA firmware distribution complete! Cameras upgraded: CAMSUPGRADED. Light amplification system online.")
|
||||
unlock_sound = 'sound/items/rped.ogg'
|
||||
|
||||
/datum/AI_Module/large/upgrade_cameras/upgrade(mob/living/silicon/ai/AI)
|
||||
@@ -888,7 +889,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
cost = 30
|
||||
one_purchase = TRUE
|
||||
upgrade = TRUE
|
||||
unlock_text = "<span class='notice'>OTA firmware distribution complete! Cameras upgraded: Enhanced surveillance package online.</span>"
|
||||
unlock_text = span_notice("OTA firmware distribution complete! Cameras upgraded: Enhanced surveillance package online.")
|
||||
unlock_sound = 'sound/items/rped.ogg'
|
||||
|
||||
/datum/AI_Module/large/eavesdrop/upgrade(mob/living/silicon/ai/AI)
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
/datum/action/item_action/chameleon/drone/randomise
|
||||
name = "Randomise Headgear"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "random"
|
||||
|
||||
/datum/action/item_action/chameleon/drone/randomise/Trigger()
|
||||
if(!IsAvailable())
|
||||
return
|
||||
|
||||
/datum/action/item_action/chameleon/drone/randomise/do_effect(trigger_flags)
|
||||
// Damn our lack of abstract interfeces
|
||||
if (istype(target, /obj/item/clothing/head/chameleon/drone))
|
||||
var/obj/item/clothing/head/chameleon/drone/X = target
|
||||
@@ -22,7 +19,7 @@
|
||||
|
||||
/datum/action/item_action/chameleon/drone/togglehatmask
|
||||
name = "Toggle Headgear Mode"
|
||||
icon_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_silicon.dmi'
|
||||
|
||||
/datum/action/item_action/chameleon/drone/togglehatmask/New()
|
||||
..()
|
||||
@@ -32,19 +29,14 @@
|
||||
if (istype(target, /obj/item/clothing/mask/chameleon/drone))
|
||||
button_icon_state = "drone_camogear_mask"
|
||||
|
||||
/datum/action/item_action/chameleon/drone/togglehatmask/Trigger()
|
||||
if(!IsAvailable())
|
||||
return
|
||||
|
||||
/datum/action/item_action/chameleon/drone/togglehatmask/do_effect(trigger_flags)
|
||||
// No point making the code more complicated if no non-drone
|
||||
// is ever going to use one of these
|
||||
|
||||
var/mob/living/simple_animal/drone/D
|
||||
var/mob/living/simple_animal/drone/D = owner
|
||||
|
||||
if(istype(owner, /mob/living/simple_animal/drone))
|
||||
D = owner
|
||||
else
|
||||
return
|
||||
if(!istype(owner, /mob/living/simple_animal/drone))
|
||||
return FALSE
|
||||
|
||||
// The drone unEquip() proc sets head to null after dropping
|
||||
// an item, so we need to keep a reference to our old headgear
|
||||
@@ -58,13 +50,13 @@
|
||||
new_headgear = new /obj/item/clothing/head/chameleon/drone()
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You shouldn't be able to toggle a camogear helmetmask if you're not wearing it</span>")
|
||||
if(new_headgear)
|
||||
// Force drop the item in the headslot, even though
|
||||
// it's TRAIT_NODROP
|
||||
D.dropItemToGround(target, TRUE)
|
||||
qdel(old_headgear)
|
||||
// where is `ITEM_SLOT_HEAD` defined? WHO KNOWS
|
||||
D.equip_to_slot(new_headgear, ITEM_SLOT_HEAD)
|
||||
return FALSE
|
||||
// Force drop the item in the headslot, even though
|
||||
// it's TRAIT_NODROP
|
||||
D.dropItemToGround(target, TRUE)
|
||||
qdel(old_headgear)
|
||||
// where is `ITEM_SLOT_HEAD` defined? WHO KNOWS
|
||||
D.equip_to_slot(new_headgear, ITEM_SLOT_HEAD)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -87,7 +79,10 @@
|
||||
sortTim(standard_outfit_options, GLOBAL_PROC_REF(cmp_text_asc))
|
||||
outfit_options = standard_outfit_options
|
||||
|
||||
/datum/action/chameleon_outfit/Trigger()
|
||||
/datum/action/chameleon_outfit/Trigger(trigger_flags)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
return select_outfit(owner)
|
||||
|
||||
/datum/action/chameleon_outfit/proc/select_outfit(mob/user)
|
||||
@@ -163,7 +158,7 @@
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/initialize_disguises()
|
||||
name = "Change [chameleon_name] Appearance"
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
chameleon_blacklist |= typecacheof(target.type)
|
||||
for(var/V in typesof(chameleon_type))
|
||||
@@ -180,11 +175,11 @@
|
||||
var/picked_name
|
||||
picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list
|
||||
if(!picked_name)
|
||||
return
|
||||
return FALSE
|
||||
picked_item = chameleon_list[picked_name]
|
||||
if(!picked_item)
|
||||
return
|
||||
update_look(user, picked_item)
|
||||
return FALSE
|
||||
return update_look(user, picked_item)
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/random_look(mob/user)
|
||||
var/picked_name = pick(chameleon_list)
|
||||
@@ -201,15 +196,17 @@
|
||||
update_item(chameleon_list[picked_name])
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/update_look(mob/user, obj/item/picked_item)
|
||||
if(isliving(user))
|
||||
var/mob/living/C = user
|
||||
if(C.stat != CONSCIOUS)
|
||||
return
|
||||
if(!isliving(user))
|
||||
return FALSE
|
||||
var/mob/living/C = user
|
||||
if(C.stat != CONSCIOUS)
|
||||
return FALSE
|
||||
|
||||
update_item(picked_item)
|
||||
var/obj/item/thing = target
|
||||
thing.update_slot_icon()
|
||||
UpdateButtons()
|
||||
update_item(picked_item)
|
||||
var/obj/item/thing = target
|
||||
thing.update_slot_icon()
|
||||
build_all_button_icons()
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/update_item(obj/item/picked_item)
|
||||
var/obj/item/chameleon_item = target
|
||||
@@ -242,10 +239,7 @@
|
||||
P.set_new_overlays()
|
||||
P.update_icon()
|
||||
|
||||
/datum/action/item_action/chameleon/change/Trigger()
|
||||
if(!IsAvailable())
|
||||
return
|
||||
|
||||
/datum/action/item_action/chameleon/change/do_effect(trigger_flags)
|
||||
select_look(owner)
|
||||
return TRUE
|
||||
|
||||
@@ -293,7 +287,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/under/chameleon)
|
||||
|
||||
/obj/item/clothing/under/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/under
|
||||
chameleon_action.chameleon_name = "Jumpsuit"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/under, /obj/item/clothing/under/color, /obj/item/clothing/under/rank, /obj/item/clothing/under/changeling), only_root_path = TRUE)
|
||||
@@ -322,7 +316,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/suit/chameleon)
|
||||
|
||||
/obj/item/clothing/suit/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/suit
|
||||
chameleon_action.chameleon_name = "Suit"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/suit/armor/abductor, /obj/item/clothing/suit/changeling), only_root_path = TRUE)
|
||||
@@ -350,7 +344,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/glasses/chameleon)
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/glasses
|
||||
chameleon_action.chameleon_name = "Glasses"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/glasses/changeling, only_root_path = TRUE)
|
||||
@@ -382,7 +376,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/gloves/chameleon/insulated)
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/gloves
|
||||
chameleon_action.chameleon_name = "Gloves"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/clothing/gloves, /obj/item/clothing/gloves/color, /obj/item/clothing/gloves/changeling), only_root_path = TRUE)
|
||||
@@ -410,7 +404,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/head/chameleon)
|
||||
|
||||
/obj/item/clothing/head/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/head
|
||||
chameleon_action.chameleon_name = "Hat"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/head/changeling, only_root_path = TRUE)
|
||||
@@ -436,10 +430,10 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/head/chameleon)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
|
||||
chameleon_action.random_look()
|
||||
var/datum/action/item_action/chameleon/drone/togglehatmask/togglehatmask_action = new(src)
|
||||
togglehatmask_action.UpdateButtons()
|
||||
var/datum/action/item_action/chameleon/drone/randomise/randomise_action = new(src)
|
||||
randomise_action.UpdateButtons()
|
||||
var/datum/action/item_action/chameleon/drone/togglehatmask/togglehatmask_action = add_item_action(/datum/action/item_action/chameleon/drone/togglehatmask)
|
||||
togglehatmask_action.build_all_button_icons()
|
||||
var/datum/action/item_action/chameleon/drone/randomise/randomise_action = add_item_action(/datum/action/item_action/chameleon/drone/randomise)
|
||||
randomise_action.build_all_button_icons()
|
||||
|
||||
CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/mask/chameleon)
|
||||
name = "gas mask"
|
||||
@@ -460,7 +454,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/mask/chameleon)
|
||||
|
||||
/obj/item/clothing/mask/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/mask
|
||||
chameleon_action.chameleon_name = "Mask"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/mask/changeling, only_root_path = TRUE)
|
||||
@@ -490,10 +484,10 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/mask/chameleon)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
|
||||
chameleon_action.random_look()
|
||||
var/datum/action/item_action/chameleon/drone/togglehatmask/togglehatmask_action = new(src)
|
||||
togglehatmask_action.UpdateButtons()
|
||||
var/datum/action/item_action/chameleon/drone/randomise/randomise_action = new(src)
|
||||
randomise_action.UpdateButtons()
|
||||
var/datum/action/item_action/chameleon/drone/togglehatmask/togglehatmask_action = add_item_action(/datum/action/item_action/chameleon/drone/togglehatmask)
|
||||
togglehatmask_action.build_all_button_icons()
|
||||
var/datum/action/item_action/chameleon/drone/randomise/randomise_action = add_item_action(/datum/action/item_action/chameleon/drone/randomise)
|
||||
randomise_action.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/mask/chameleon/drone/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>[src] does not have a voice changer.</span>")
|
||||
@@ -511,7 +505,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/shoes/chameleon)
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/shoes
|
||||
chameleon_action.chameleon_name = "Shoes"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/shoes/changeling, only_root_path = TRUE)
|
||||
@@ -539,7 +533,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/storage/backpack/chameleon)
|
||||
|
||||
/obj/item/storage/backpack/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/storage/backpack
|
||||
chameleon_action.chameleon_name = "Backpack"
|
||||
chameleon_action.initialize_disguises()
|
||||
@@ -562,7 +556,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/storage/belt/chameleon)
|
||||
/obj/item/storage/belt/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/storage/belt
|
||||
chameleon_action.chameleon_name = "Belt"
|
||||
chameleon_action.initialize_disguises()
|
||||
@@ -588,7 +582,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/radio/headset/chameleon)
|
||||
|
||||
/obj/item/radio/headset/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/radio/headset
|
||||
chameleon_action.chameleon_name = "Headset"
|
||||
chameleon_action.initialize_disguises()
|
||||
@@ -609,7 +603,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/pda/chameleon)
|
||||
|
||||
/obj/item/pda/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/pda
|
||||
chameleon_action.chameleon_name = "PDA"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(list(/obj/item/pda/heads, /obj/item/pda/ai, /obj/item/pda/ai/pai), only_root_path = TRUE)
|
||||
@@ -630,7 +624,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/stamp/chameleon)
|
||||
|
||||
/obj/item/stamp/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/stamp
|
||||
chameleon_action.chameleon_name = "Stamp"
|
||||
chameleon_action.initialize_disguises()
|
||||
@@ -652,7 +646,7 @@ CHAMELEON_CLOTHING_DEFINE(/obj/item/clothing/neck/cloak/chameleon)
|
||||
|
||||
/obj/item/clothing/neck/cloak/chameleon/Initialize(mapload)
|
||||
. = ..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/neck
|
||||
chameleon_action.chameleon_name = "Cloak"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
@@ -402,7 +402,7 @@ BLIND // can't see anything
|
||||
C.head_update(src, forced = 1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
/obj/item/clothing/glasses/thermal/syndi/New()
|
||||
..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/glasses
|
||||
chameleon_action.chameleon_name = "Glasses"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/glasses/changeling, only_root_path = TRUE)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
update_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/glasses/meson/engine/attack_self(mob/user)
|
||||
toggle_mode(user, TRUE)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/chameleon/New()
|
||||
..()
|
||||
chameleon_action = new(src)
|
||||
chameleon_action = add_item_action(/datum/action/item_action/chameleon/change)
|
||||
chameleon_action.chameleon_type = /obj/item/clothing/glasses
|
||||
chameleon_action.chameleon_name = "Glasses"
|
||||
chameleon_action.chameleon_blacklist = typecacheof(/obj/item/clothing/glasses/changeling, only_root_path = TRUE)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/clothing/head/helmet/Initialize(mapload)
|
||||
. = ..()
|
||||
if(attached_light)
|
||||
alight = new(src)
|
||||
alight = add_item_action(/datum/action/item_action/toggle_helmet_flashlight)
|
||||
|
||||
/obj/item/clothing/head/helmet/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -389,7 +389,7 @@
|
||||
set_light(0)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/head/helmet/durathread
|
||||
name = "makeshift helmet"
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if(!just_flavor)
|
||||
to_chat(user, "<span class='notice'>You push \the [src] [mask_adjusted ? "out of the way" : "back into place"].</span>")
|
||||
user.wear_mask_update(src, toggle_off = mask_adjusted)
|
||||
user.update_action_buttons_icon() //when mask is adjusted out, we update all buttons icon so the user's potential internal tank correctly shows as off.
|
||||
user.update_mob_action_buttons() //when mask is adjusted out, we update all buttons icon so the user's potential internal tank correctly shows as off.
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You adjust [src], it will now [mask_adjusted ? "not" : ""] obscure your identity while worn.</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
user.update_inv_wear_mask()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
to_chat(user, "<span class='notice'>Your Clown Mask has now morphed into [choice], all praise the Honkmother!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
user.update_inv_wear_mask()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
to_chat(user, "<span class='notice'>Your Mime Mask has now morphed into [choice]!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
user.update_inv_wear_mask()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
to_chat(M, "The Tiki Mask has now changed into the [choice] Mask!")
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
user.update_inv_wear_mask()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
to_chat(user, "<span class='notice'>Your Joy mask now has a [choice] Emotion!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -475,6 +475,6 @@
|
||||
user.update_inv_wear_mask()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
to_chat(user, "<span class='notice'>Your paper mask now has a [choice] symbol!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
user.update_gravity(user.has_gravity())
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/shoes/magboots/negates_gravity()
|
||||
return clothing_flags & NOSLIP
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
if(camera)
|
||||
camera.remove_target_ui()
|
||||
camera.forceMove(user)
|
||||
teleport_now.UpdateButtons()
|
||||
teleport_now.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/proc/chronowalk(atom/location)
|
||||
var/mob/living/carbon/human/user = src.loc
|
||||
@@ -105,7 +105,7 @@
|
||||
if(camera)
|
||||
camera.remove_target_ui()
|
||||
|
||||
teleport_now.UpdateButtons()
|
||||
teleport_now.build_all_button_icons()
|
||||
|
||||
var/list/nonsafe_slots = list(ITEM_SLOT_BELT, ITEM_SLOT_BACK)
|
||||
var/list/exposed = list()
|
||||
@@ -312,12 +312,12 @@
|
||||
|
||||
/datum/action/innate/chrono_teleport
|
||||
name = "Teleport Now"
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "chrono_phase"
|
||||
check_flags = AB_CHECK_CONSCIOUS //|AB_CHECK_INSIDE
|
||||
var/obj/item/clothing/suit/space/chronos/chronosuit = null
|
||||
|
||||
/datum/action/innate/chrono_teleport/IsAvailable(silent = FALSE)
|
||||
/datum/action/innate/chrono_teleport/IsAvailable(feedback = TRUE)
|
||||
return (chronosuit && chronosuit.activated && chronosuit.camera && !chronosuit.teleporting)
|
||||
|
||||
/datum/action/innate/chrono_teleport/Activate()
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
C.head_update(src, forced = 1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/proc/toggle_hardsuit_mode(mob/user) //Helmet Toggles Suit Mode
|
||||
if(linkedsuit)
|
||||
@@ -937,7 +937,7 @@
|
||||
set_light(0)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
usr.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
A.build_all_button_icons()
|
||||
|
||||
/obj/item/clothing/suit/toggle/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
/datum/action/item_action/stickmen
|
||||
name = "Summon Stick Minions"
|
||||
desc = "Allows you to summon faithful stickmen allies to aide you in battle."
|
||||
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi'
|
||||
button_icon_state = "art_summon"
|
||||
var/ready = TRUE
|
||||
var/list/summoned_stickmen = list()
|
||||
@@ -222,10 +222,7 @@
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_POINTED)
|
||||
|
||||
/datum/action/item_action/stickmen/Trigger()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
/datum/action/item_action/stickmen/do_effect(trigger_flags)
|
||||
if(!ready)
|
||||
to_chat(owner, "<span class='warning'>[src]'s internal magic supply is still recharging!</span>")
|
||||
return FALSE
|
||||
@@ -249,6 +246,7 @@
|
||||
RegisterSignal(S, COMSIG_PARENT_QDELETING, PROC_REF(remove_from_list))
|
||||
ready = FALSE
|
||||
addtimer(CALLBACK(src, PROC_REF(ready_again)), cooldown)
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/stickmen/proc/remove_from_list(datum/source, forced)
|
||||
summoned_stickmen -= source
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user