Skip to content

Commit

Permalink
Merge branch 'master' into cmb_riot
Browse files Browse the repository at this point in the history
  • Loading branch information
Blundir committed Jul 19, 2024
2 parents bdffe58 + ee0b038 commit cc1f8e4
Show file tree
Hide file tree
Showing 130 changed files with 810 additions and 596 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@

/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_ACTION_USED "xeno_action_used"
/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_PRE_ACTION_USED "xeno_pre_action_used"
/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_FAILED_ACTION_USED "xeno_failed_action_used"
/// From /mob/living/carbon/xenomorph/proc/check_blood_splash()
#define COMSIG_XENO_DEAL_ACID_DAMAGE "xeno_deal_acid_damage"
/// From /mob/living/carbon/xenomorph/proc/recalculate_speed()
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,5 @@
#define COMSIG_CAMERA_SET_AREA "camera_manager_set_area"
#define COMSIG_CAMERA_CLEAR "camera_manager_clear_target"
#define COMSIG_CAMERA_REFRESH "camera_manager_refresh"

#define COMSIG_PRED_BRACER_DECLOAKED "pred_bracer_decloaked"
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#define COMSIG_ACTION_HIDDEN "action_hidden"
/// From base of /datum/action/proc/unhide_from(): (mob/owner)
#define COMSIG_ACTION_UNHIDDEN "action_unhidden"
/// From base of /datum/action/proc/action_activate() : ()
#define COMSIG_ACTION_ACTIVATED "action_activated"

///from /datum/component/bonus_damage_stack
#define COMSIG_BONUS_DAMAGE "bonus_damage"
Expand Down
7 changes: 6 additions & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
* * hive - The hive we're filling a slot for to check if the player is banished
* * sorted - Whether to sort by larva_queue_time (default TRUE) or leave unsorted
*/
/proc/get_alien_candidates(datum/hive_status/hive = null, sorted = TRUE)
/proc/get_alien_candidates(datum/hive_status/hive = null, sorted = TRUE, abomination = FALSE)
var/list/candidates = list()

for(var/mob/dead/observer/cur_obs as anything in GLOB.observer_list)
Expand Down Expand Up @@ -275,6 +275,11 @@
if(banished)
continue

if(abomination)
if(!(/datum/tutorial/xenomorph/abomination::tutorial_id in cur_obs.client.prefs.completed_tutorials))
to_chat(cur_obs, SPAN_BOLDNOTICE("You were passed over for playing as an Abomination because you have not completed its tutorial."))
continue

candidates += cur_obs

// Optionally sort by larva_queue_time
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(body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
if(body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED) || cannot_slash) //No attacks while laying down
return FALSE
var/mob/alt

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUBSYSTEM_DEF(sound)
if(!run_hearers) // Initialize for handling next template
run_hearers = run_queue[run_template] // get base hearers
if(run_template.range) // ranging
run_hearers |= SSquadtree.players_in_range(SQUARE(run_template.x, run_template.y, run_template.range), run_template.z)
run_hearers |= SSquadtree.players_in_range(SQUARE(run_template.x, run_template.y, run_template.range * 2), run_template.z)
if(MC_TICK_CHECK)
return
while(length(run_hearers)) // Output sound to hearers
Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ SUBSYSTEM_DEF(vote)
qdel(src)

/datum/action/innate/vote/action_activate()
. = ..()
owner.vote()

/datum/action/innate/vote/proc/remove_from_client()
Expand Down
9 changes: 8 additions & 1 deletion code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
return

/datum/action/proc/action_activate()
return
SHOULD_CALL_PARENT(TRUE)

SEND_SIGNAL(src, COMSIG_ACTION_ACTIVATED)

/// handler for when a keybind signal is received by the action, calls the action_activate proc asynchronous
/datum/action/proc/keybind_activation()
Expand Down Expand Up @@ -158,6 +160,10 @@
hidden = FALSE
L.update_action_buttons()

/proc/get_action(mob/action_mob, action_path)
for(var/datum/action/action in action_mob.actions)
if(istype(action, action_path))
return action

/datum/action/item_action
name = "Use item"
Expand All @@ -182,6 +188,7 @@
return ..()

/datum/action/item_action/action_activate()
. = ..()
if(target)
var/obj/item/I = target
I.ui_action_click(owner, holder_item)
Expand Down
15 changes: 13 additions & 2 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,21 @@
drop_flame(get_turf(P), P.weapon_cause_data)

/datum/ammo/flamethrower/tank_flamer
flamer_reagent_id = "napalmx"

flamer_reagent_id = "highdamagenapalm"
max_range = 8

/datum/ammo/flamethrower/tank_flamer/drop_flame(turf/turf, datum/cause_data/cause_data)
if(!istype(turf))
return

var/datum/reagent/napalm/high_damage/reagent = new()
new /obj/flamer_fire(turf, cause_data, reagent, 1)

var/datum/effect_system/smoke_spread/landingsmoke = new /datum/effect_system/smoke_spread
landingsmoke.set_up(1, 0, turf, null, 4, cause_data)
landingsmoke.start()
landingsmoke = null

/datum/ammo/flamethrower/sentry_flamer
flags_ammo_behavior = AMMO_IGNORE_ARMOR|AMMO_IGNORE_COVER|AMMO_FLAME
flamer_reagent_id = "napalmx"
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/bad_leg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
CRASH("No bound wound to link action")

/datum/action/human_action/rest_legs/action_activate()
. = ..()
var/mob/living/carbon/human/homan = owner
if(in_use)
to_chat(homan, SPAN_WARNING("You're already doing that!"))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/bonus_damage_stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
var/color = COLOR_BONUS_DAMAGE
var/intensity = bonus_damage_stacks / (initial(bonus_damage_cap) * 2)
// if intensity is too high of a value, the hex code will become invalid
color += num2text(BONUS_DAMAGE_MAX_ALPHA * clamp(intensity, 0, 0.5), 1, 16)
color += num2text(BONUS_DAMAGE_MAX_ALPHA * clamp(intensity, 0, 0.5), 2, 16)
if(parent)
var/atom/A = parent
A.add_filter("bonus_damage_stacks", 2, list("type" = "outline", "color" = color, "size" = 1 + clamp(intensity, 0, 1)))
Expand Down
1 change: 1 addition & 0 deletions code/datums/statistics/entities/round_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
return TRUE

/datum/action/show_round_statistics/action_activate()
. = ..()
if(!can_use_action())
return

Expand Down
12 changes: 12 additions & 0 deletions code/datums/supply_packs/explosives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@
containername = "\improper explosive M40 HEDP grenades crate (WARNING)"
group = "Explosives"

/datum/supply_packs/explosives_sebb
name = "G2 electroshock grenades crate (x6)"
contains = list(
/obj/item/storage/box/packet/sebb,
/obj/item/storage/box/packet/sebb,
)
cost = 30
containertype = /obj/structure/closet/crate/explosives
containername = "\improper G2 electroshock grenades crate (WARNING)"
group = "Explosives"


/datum/supply_packs/explosives_hedp
name = "M40 HEDP blast grenade box crate (x25)"
contains = list(
Expand Down
5 changes: 4 additions & 1 deletion code/datums/tutorial/_tutorial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)
/datum/tutorial
/// What the tutorial is called, is player facing
var/name = "Base"
/// Internal ID of the tutorial, kept for save files
/// Internal ID of the tutorial, kept for save files. Format is "tutorialtype_specifictutorial_number". So, the first basic xeno tutorial would be "xeno_basic_1", and the 2nd marine medical tutorial would be "marine_medical_2"
var/tutorial_id = "base"
/// A short 1-2 sentence description of the tutorial itself
var/desc = ""
Expand Down Expand Up @@ -144,6 +144,8 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)

/// Ends the tutorial after a certain amount of time.
/datum/tutorial/proc/tutorial_end_in(time = 5 SECONDS, completed = TRUE)
if(completed)
mark_completed() // This is done because if you're calling this proc with completed == TRUE, then the tutorial's a done deal. We shouldn't penalize the player if they exit a few seconds before it actually completes.
tutorial_ending = TRUE
addtimer(CALLBACK(src, PROC_REF(end_tutorial), completed), time)

Expand Down Expand Up @@ -221,6 +223,7 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)
tutorial = WEAKREF(selected_tutorial)

/datum/action/tutorial_end/action_activate()
. = ..()
if(!tutorial)
return

Expand Down
Loading

0 comments on commit cc1f8e4

Please sign in to comment.