Skip to content

Commit

Permalink
Merge branch 'master' into Zombie_Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 committed Aug 3, 2023
2 parents 215eff3 + 7e0ae9e commit bad3e74
Show file tree
Hide file tree
Showing 84 changed files with 1,118 additions and 452 deletions.
3 changes: 2 additions & 1 deletion code/__DEFINES/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#define MINIMAP_FLAG_PMC (1<<2)
#define MINIMAP_FLAG_UPP (1<<3)
#define MINIMAP_FLAG_CLF (1<<4)
#define MINIMAP_FLAG_ALL (1<<5) - 1
#define MINIMAP_FLAG_YAUTJA (1<<5)
#define MINIMAP_FLAG_ALL (1<<6) - 1

///Converts the overworld x and y to minimap x and y values
#define MINIMAP_SCALE 2
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#define TUNNEL_ENTER_BIG_XENO_DELAY 120
#define TUNNEL_ENTER_LARVA_DELAY 10

/// The duration it takes a player controlled facehugger to leap or hug adjacently
#define FACEHUGGER_WINDUP_DURATION 1 SECONDS

// Defines for action types and click delays used by xenomorph/unarmedattack() and attack_alien().

/// Full attack delay.
Expand Down
6 changes: 4 additions & 2 deletions code/__HELPERS/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
if (CONFIG_GET(flag/log_interact))
WRITE_LOG(GLOB.world_game_log, "INTERACT: [msg]")
LOG_REDIS("interact", "\[[time]\] [msg]")
origin.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(origin)
origin.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(target)
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"

GLOB.STUI.attack.Add("\[[time]]INTERACT: [msg]")
GLOB.STUI.processing |= STUI_LOG_ATTACK
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mapping_globals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GLOBAL_LIST_EMPTY(latewhiskey)

GLOBAL_LIST_EMPTY(latejoin)
GLOBAL_LIST_EMPTY(latejoin_by_squad)
GLOBAL_LIST_EMPTY(latejoin_by_job)

GLOBAL_LIST_EMPTY(zombie_landmarks)

Expand Down
5 changes: 5 additions & 0 deletions code/datums/components/weed_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@
return FALSE
if(!parent_turf?.weeds)
return FALSE
if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL)
return FALSE

if(unmerged_time == world.time)
return merge_with_weeds() // Weeds upgraded, re-merge now re-using the apperance
Expand Down Expand Up @@ -245,6 +247,9 @@
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
parent_buckle = null

if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL)
return FALSE

absorbing_weeds = parent_turf?.weeds
if(!absorbing_weeds)
return FALSE
Expand Down
15 changes: 10 additions & 5 deletions code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,35 @@
if(leaders < cryo_squad.max_leaders && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = H
leaders++
arm_equipment(H, /datum/equipment_preset/uscm/leader/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_LEADER, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/leader/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (heavies < max_heavies && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(H.client, JOB_SQUAD_SPECIALIST, time_required_for_job))
heavies++
arm_equipment(H, /datum/equipment_preset/uscm/spec/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/spec/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (medics < max_medics && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(H.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(H, /datum/equipment_preset/uscm/medic/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_MEDIC, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/medic/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (engineers < max_engineers && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(H.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
arm_equipment(H, /datum/equipment_preset/uscm/engineer/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_ENGI, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/engineer/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else
arm_equipment(H, /datum/equipment_preset/uscm/pfc/cryo, TRUE, TRUE)
H.client.prefs.copy_all_to(H, JOB_SQUAD_MARINE, TRUE, TRUE)
arm_equipment(H, /datum/equipment_preset/uscm/pfc/cryo, FALSE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
Expand Down
19 changes: 15 additions & 4 deletions code/datums/statistics/entities/death_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,25 @@
)

/mob/proc/track_mob_death(datum/cause_data/cause_data, turf/death_loc)
if(!mind || statistic_exempt)
return

if(cause_data && !istype(cause_data))
stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum")
cause_data = create_cause_data(cause_data)

var/log_message = "\[[time_stamp()]\] [key_name(src)] died to "
if(cause_data)
log_message += "[cause_data.cause_name]"
else
log_message += "unknown causes"
var/mob/cause_mob = cause_data?.resolve_mob()
if(cause_mob)
log_message += " from [key_name(cause_data.resolve_mob())]"
cause_mob.attack_log += "\[[time_stamp()]\] [key_name(cause_mob)] killed [key_name(src)] with [cause_data.cause_name]."

attack_log += "[log_message]."

if(!mind || statistic_exempt)
return

var/datum/entity/statistic/death/new_death = DB_ENTITY(/datum/entity/statistic/death)
var/datum/entity/player/player_entity = get_player_from_key(mind.ckey)
if(player_entity)
Expand All @@ -96,7 +108,6 @@
new_death.cause_role_name = cause_data?.role
new_death.cause_faction_name = cause_data?.faction

var/mob/cause_mob = cause_data?.resolve_mob()
if(cause_mob)
cause_mob.life_kills_total += life_value

Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@
var/headcount = count_per_faction()
var/living = headcount["total_headcount"]
if ((headcount["WY_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_WY.ogg')
musical_track = pick('sound/theme/lastmanstanding_wy.ogg')
else if ((headcount["UPP_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_UPP.ogg')
musical_track = pick('sound/theme/lastmanstanding_upp.ogg')
else if ((headcount["CLF_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_CLF.ogg')
musical_track = pick('sound/theme/lastmanstanding_clf.ogg')
else if ((headcount["marine_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/neutral_melancholy2.ogg') //This is the theme song for Colonial Marines the game, fitting
else
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@
/obj/item/ammo_magazine/rocket/wp)
if(2) //Smartgun supplies
spawnitems = list(
/obj/item/cell/high,
/obj/item/cell/high,
/obj/item/smartgun_battery,
/obj/item/smartgun_battery,
/obj/item/ammo_magazine/smartgun,
/obj/item/ammo_magazine/smartgun,
/obj/item/ammo_magazine/smartgun,
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@
join_turf = get_turf(pick(GLOB.spawns_by_job[type]))
else if(assigned_squad && GLOB.latejoin_by_squad[assigned_squad])
join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad]))
else if(GLOB.latejoin_by_job[title])
join_turf = get_turf(pick(GLOB.latejoin_by_job[title]))
else
join_turf = get_turf(pick(GLOB.latejoin))
human.forceMove(join_turf)
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
var/turf/late_join_turf
if(GLOB.latejoin_by_squad[assigned_squad])
late_join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad]))
else if(GLOB.latejoin_by_job[J.title])
late_join_turf = get_turf(pick(GLOB.latejoin_by_job[J.title]))
else
late_join_turf = get_turf(pick(GLOB.latejoin))
H.forceMove(late_join_turf)
Expand Down
Loading

0 comments on commit bad3e74

Please sign in to comment.