Skip to content

Commit

Permalink
Merge branch 'master' into tg-effects-prelude-freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 13, 2023
2 parents 72637f9 + e1b59d5 commit 45283be
Show file tree
Hide file tree
Showing 166 changed files with 2,028 additions and 1,373 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
#define SHOES_SLOWDOWN -1

#define SLOWDOWN_ARMOR_NONE 0
#define SLOWDOWN_ARMOR_SUPER_LIGHT 0.10
#define SLOWDOWN_ARMOR_VERY_LIGHT 0.20
#define SLOWDOWN_ARMOR_LIGHT 0.35
#define SLOWDOWN_ARMOR_MEDIUM 0.55
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@

/// Called when an atom is mouse dropped on another atom, from /client/MouseDrop: (atom/dropped_onto)
#define COMSIG_ATOM_DROP_ON "atom_drop_on"

/// Called when an atom has emp_act called on it, from /atom/emp_act: (severity)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
26 changes: 26 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_cell.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// (charge_amount)
#define COMSIG_CELL_USE_CHARGE "cell_use_charge"
#define COMPONENT_CELL_NO_USE_CHARGE (1<<0)

/// (charge_amount)
#define COMSIG_CELL_ADD_CHARGE "cell_add_charge"

#define COMSIG_CELL_START_TICK_DRAIN "cell_start_tick_drain"

#define COMSIG_CELL_STOP_TICK_DRAIN "cell_stop_tick_drain"

/// (mob/living/user)
#define COMSIG_CELL_TRY_RECHARGING "cell_try_recharging"
#define COMPONENT_CELL_NO_RECHARGE (1<<0)

#define COMSIG_CELL_OUT_OF_CHARGE "cell_out_of_charge"

/// (charge_amount)
#define COMSIG_CELL_CHECK_CHARGE "cell_check_charge"
#define COMPONENT_CELL_CHARGE_INSUFFICIENT (1<<0)

#define COMSIG_CELL_TRY_INSERT_CELL "cell_try_insert_cell"
#define COMPONENT_CANCEL_CELL_INSERT (1<<0)

/// (mob/living/user)
#define COMSIG_CELL_REMOVE_CELL "cell_remove_cell"
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
/// from /obj/item/weapon/gun/proc/load_into_chamber() : ()
#define COMSIG_GUN_INTERRUPT_FIRE "gun_interrupt_fire"

//Additional procs on items that will be triggered right after the human finishes spawns in
//from /datum/authority/branch/role/proc/equip_role()
#define COMSIG_POST_SPAWN_UPDATE "post_spawn_update"
4 changes: 1 addition & 3 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@
#define CAN_DIG_SHRAPNEL (1<<11)
/// whether it has an animated icon state of "[icon_state]_on" to be used during surgeries.
#define ANIMATED_SURGICAL_TOOL (1<<12)
/// The item goes on top of tables, instead of into them with the overlay system
#define NOTABLEMERGE (1<<13)
/// Has heat source but isn't 'on fire' and thus can be stored
#define IGNITING_ITEM (1<<14)
#define IGNITING_ITEM (1<<13)
//==========================================================================================


Expand Down
25 changes: 20 additions & 5 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@
_L = target._status_traits; \
_L[trait] = list(source); \
SEND_SIGNAL(target, SIGNAL_ADDTRAIT(trait), trait); \
if(trait in GLOB.traits_with_elements){ \
target.AddElement(GLOB.traits_with_elements[trait]); \
} \
} else { \
_L = target._status_traits; \
if (_L[trait]) { \
_L[trait] |= list(source); \
} else { \
_L[trait] = list(source); \
SEND_SIGNAL(target, SIGNAL_ADDTRAIT(trait), trait); \
if(trait in GLOB.traits_with_elements){ \
target.AddElement(GLOB.traits_with_elements[trait]); \
} \
} \
} \
} while (0)
Expand All @@ -38,6 +44,9 @@
if (!length(_L[trait])) { \
_L -= trait; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(trait), trait); \
if(trait in GLOB.traits_with_elements) { \
target.RemoveElement(GLOB.traits_with_elements[trait]); \
} \
}; \
if (!length(_L)) { \
target._status_traits = null \
Expand All @@ -62,6 +71,9 @@
if (!length(_traits_list[trait])) { \
_traits_list -= trait; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(trait), trait); \
if(trait in GLOB.traits_with_elements) { \
target.RemoveElement(GLOB.traits_with_elements[trait]); \
} \
}; \
if (!length(_traits_list)) { \
target._status_traits = null \
Expand All @@ -78,8 +90,11 @@
if (!length(_L[_T])) { \
_L -= _T; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(_T), _T); \
if(trait in GLOB.traits_with_elements) { \
target.RemoveElement(GLOB.traits_with_elements[trait]); \
}; \
};\
};\
if (!length(_L)) { \
target._status_traits = null\
};\
Expand All @@ -101,8 +116,11 @@
if (!length(_L[_T])) { \
_L -= _T; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(_T)); \
if(_T in GLOB.traits_with_elements) { \
target.RemoveElement(GLOB.traits_with_elements[_T]); \
}; \
};\
};\
if (!length(_L)) { \
target._status_traits = null\
};\
Expand All @@ -124,9 +142,6 @@
/// Example trait
// #define TRAIT_X "t_x"

/// cannot be removed without admin intervention
#define ROUNDSTART_TRAIT "roundstart"

//-- mob traits --
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
Expand Down Expand Up @@ -358,6 +373,8 @@ GLOBAL_LIST(trait_name_map)
/// Example trait source
// #define TRAIT_SOURCE_Y "t_s_y"
#define TRAIT_SOURCE_INHERENT "t_s_inherent"
/// cannot be removed without admin intervention
#define ROUNDSTART_TRAIT "roundstart"
//-- mob traits --
///Status trait coming from lying down through update_canmove()
#define LYING_TRAIT "lying"
Expand All @@ -367,8 +384,6 @@ GLOBAL_LIST(trait_name_map)
#define TRAIT_SOURCE_HIVE "t_s_hive"
///Status trait coming from being buckled.
#define TRAIT_SOURCE_BUCKLE "t_s_buckle"
///Status trait coming from roundstart quirks (that don't exist yet). Unremovable by REMOVE_TRAIT
#define TRAIT_SOURCE_QUIRK "t_s_quirk"
///Status trait coming from being assigned as [acting] squad leader.
#define TRAIT_SOURCE_SQUAD_LEADER "t_s_squad_leader"
///Status trait coming from their job
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ DEFINE_BITFIELD(flags_item, list(
"ITEM_OVERRIDE_NORTHFACE" = ITEM_OVERRIDE_NORTHFACE,
"CAN_DIG_SHRAPNEL" = CAN_DIG_SHRAPNEL,
"ANIMATED_SURGICAL_TOOL" = ANIMATED_SURGICAL_TOOL,
"NOTABLEMERGE" = NOTABLEMERGE,
"IGNITING_ITEM" = IGNITING_ITEM,
))

Expand Down
11 changes: 11 additions & 0 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
var/mob/dead/observer/G = usr
G.reenter_corpse()

/atom/movable/screen/ghost/toggle_huds
name = "Toggle HUDs"
icon_state = "ghost_hud_toggle"

/atom/movable/screen/ghost/toggle_huds/Click()
var/client/client = usr.client
client.toggle_ghost_hud()

/datum/hud/ghost/New(mob/owner, ui_style='icons/mob/hud/human_white.dmi', ui_color, ui_alpha = 230)
. = ..()
var/atom/movable/screen/using
Expand All @@ -68,6 +76,9 @@
using.screen_loc = ui_ghost_slot4
static_inventory += using

using = new /atom/movable/screen/ghost/toggle_huds()
using.screen_loc = ui_ghost_slot5
static_inventory += using

/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
if(!user.hive.living_xeno_queen)
to_chat(user, SPAN_WARNING("Without a queen your psychic link is broken!"))
return FALSE
if(user.burrow || user.is_mob_incapacitated() || user.buckled)
if(HAS_TRAIT(user, TRAIT_ABILITY_BURROWED) || user.is_mob_incapacitated() || user.buckled)
return FALSE
user.hive.mark_ui.update_all_data()
user.hive.mark_ui.open_mark_menu(user)
Expand Down Expand Up @@ -583,7 +583,7 @@
if(!user.hive.living_xeno_queen)
to_chat(user, SPAN_WARNING("Your hive doesn't have a living queen!"))
return FALSE
if(user.burrow || user.is_mob_incapacitated() || user.buckled)
if(HAS_TRAIT(user, TRAIT_ABILITY_BURROWED) || user.is_mob_incapacitated() || user.buckled)
return FALSE
user.overwatch(user.hive.living_xeno_queen)

Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
if(xeno.stat != DEAD) // If the Xeno is alive, fight back
var/mob/living/carbon/carbon_user = user
if(!carbon_user || !carbon_user.ally_of_hivenumber(xeno.hivenumber))
user.KnockDown(rand(xeno.caste.tacklestrength_min, xeno.caste.tacklestrength_max))
carbon_user.KnockDown(rand(xeno.caste.tacklestrength_min, xeno.caste.tacklestrength_max))
playsound(user.loc, 'sound/weapons/pierce.ogg', 25, TRUE)
user.visible_message(SPAN_WARNING("\The [user] tried to unstrap \the [back_item] from [xeno] but instead gets a tail swipe to the head!"))
return
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

/mob/living/carbon/xenomorph/UnarmedAttack(atom/target, proximity, click_parameters, tile_attack = FALSE, ignores_resin = FALSE)
if(lying || burrow) //No attacks while laying down
if(lying || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
return FALSE
var/mob/alt

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/game_decorator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SUBSYSTEM_DEF(game_decorator)
var/defer_decoration = TRUE //! So map decoration is done post-setup after nightmare and spawners

/datum/game_decorator/New()
if(defer_decoration)
if(defer_decoration && is_active_decor())
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_POSTSETUP, PROC_REF(defered_decoration))

/datum/game_decorator/proc/is_active_decor()
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

neuro_callback = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(apply_neuro))

/proc/apply_neuro(mob/M, power, insta_neuro)
/proc/apply_neuro(mob/living/M, power, insta_neuro)
if(skillcheck(M, SKILL_ENDURANCE, SKILL_ENDURANCE_MAX) && !insta_neuro)
M.visible_message(SPAN_DANGER("[M] withstands the neurotoxin!"))
return //endurance 5 makes you immune to weak neurotoxin
Expand Down Expand Up @@ -69,7 +69,7 @@
M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
M.visible_message(SPAN_DANGER("[M] falls prone."))

/proc/apply_scatter_neuro(mob/M)
/proc/apply_scatter_neuro(mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(skillcheck(M, SKILL_ENDURANCE, SKILL_ENDURANCE_MAX))
Expand Down Expand Up @@ -317,7 +317,7 @@
shrapnel_type = /obj/item/shard/shrapnel/bone_chips
shrapnel_chance = 60

/datum/ammo/xeno/bone_chips/on_hit_mob(mob/M, obj/projectile/P)
/datum/ammo/xeno/bone_chips/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
Expand Down Expand Up @@ -347,7 +347,7 @@
damage = 10
shrapnel_chance = 0

/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/M, obj/projectile/P)
/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/autofire/autofire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
/datum/component/automatedfire/autofire/proc/initiate_shot()
SIGNAL_HANDLER
if(shooting)//if we are already shooting, it means the shooter is still on cooldown
if(bursting && (world.time > (next_fire + (burstfire_shot_delay * burst_shots_to_fire))))
hard_reset()
return
shooting = TRUE
process_shot()
Expand Down
Loading

0 comments on commit 45283be

Please sign in to comment.