Skip to content

Commit

Permalink
Merge branch 'master' into M108-Canister
Browse files Browse the repository at this point in the history
  • Loading branch information
KoishiVibe authored Apr 15, 2024
2 parents 9bcef7f + d12b65f commit 29a06ba
Show file tree
Hide file tree
Showing 112 changed files with 112,267 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ block( \
#define MAP_RUNTIME "USS Runtime"
#define MAP_LV522_CHANCES_CLAIM "LV-522 Chance's Claim" // Highpop Only
#define MAP_NEW_VARADERO "New Varadero"//ice colony underground but as its own map
#define MAP_NEW_VARADERO_REPAIRED "New Varadero Repaired"
#define MAP_CHINOOK "Chinook 91 GSO" //admin level
#define MAP_DERELICT_ALMAYER "Derelict Almayer"

Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/dropships.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
#define DROPSHIP_MIN_AUTO_DELAY 10 SECONDS
#define DROPSHIP_AUTO_RETRY_COOLDOWN 20 SECONDS
#define DROPSHIP_MEDEVAC_COOLDOWN 20 SECONDS

//Hatches states
#define SHUTTLE_DOOR_BROKEN -1
#define SHUTTLE_DOOR_UNLOCKED 0
#define SHUTTLE_DOOR_LOCKED 1
2 changes: 1 addition & 1 deletion code/__DEFINES/weapon_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ As such, don't expect any values assigned to common firearms to even consider ho
#define FIRE_DELAY_TIER_10 2.5
#define FIRE_DELAY_TIER_11 2
#define FIRE_DELAY_TIER_LMG 1.5
#define FIRE_DELAY_TIER_SG 1.5
#define FIRE_DELAY_TIER_SG 1.0
#define FIRE_DELAY_TIER_SMG 1.5
#define FIRE_DELAY_TIER_12 1

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define VEHICLE_PENALTY 25
#define WINDOW_FRAME_PENALTY 25
#define BARRICADE_PENALTY 50
#define WALL_PENALTY 50
#define WALL_PENALTY 100

/*
PROBABILITY CALCULATIONS ARE HERE
Expand Down
6 changes: 6 additions & 0 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@
shell_speed = 2*AMMO_SPEED_TIER_6
accuracy = HIT_ACCURACY_TIER_5

/datum/ammo/bullet/turret/upp
damage = 45
penetration = ARMOR_PENETRATION_TIER_2
accuracy_var_low = PROJECTILE_VARIANCE_TIER_2
accuracy_var_high = PROJECTILE_VARIANCE_TIER_2

/datum/ammo/bullet/turret/dumb
icon_state = "bullet"
flags_ammo_behavior = AMMO_BALLISTIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@
qdel(src)
return FALSE

if(locate(/obj/structure/mineral_door/resin) in location)
qdel(src)
return FALSE

var/area/current_area = get_area(location)
if(!current_area.is_resin_allowed)
for(var/client/game_master in GLOB.game_masters)
to_chat(game_master, SPAN_XENOBOLDNOTICE("This area doesn't allow xenos to build here"))
to_chat(game_master, SPAN_XENOBOLDNOTICE("[current_area] doesn't allow xenos to build here"))

qdel(src)
return FALSE

if(distance > 10)
if(locate(/obj/structure/mineral_door/resin) in location)
qdel(src)
return FALSE

if(checked_xeno.current_target)
if(distance > 10)
return FALSE

if(!locate(/datum/action/xeno_action/activable/secrete_resin) in checked_xeno.actions)
Expand All @@ -55,7 +52,7 @@
if(checked_xeno.get_plasma_percentage() < PLASMA_RETREAT_PERCENTAGE)
var/turf/xeno_loc = get_turf(checked_xeno)
if(xeno_loc.weeds)
checked_xeno.set_resting(TRUE, FALSE, TRUE)
checked_xeno.set_resting(TRUE, FALSE)

return FALSE

Expand All @@ -75,19 +72,21 @@
var/turf/parent_turf = get_turf(parent)
var/distance = get_dist(processing_xeno, parent)

var/list/turfs_around = xeno_loc.AdjacentTurfs()
if(turfs_around && distance < 1) // We are gonna be stuck after building at our loc, let's step away
return processing_xeno.move_to_next_turf(pick(turfs_around))

var/is_diagonal = (get_dir(processing_xeno, parent_turf) in diagonals)
if(is_diagonal || distance > 1)
/// Is xeno adjacent to parent_turf?
if(distance > 1)
return processing_xeno.move_to_next_turf(parent_turf)

/// Xeno will be stuck after building at its loc, if so - we command droney to step away
if(distance < 1)
return processing_xeno.move_to_next_turf(pick(GLOB.cardinals))

/// If there is something that might block our resin - slash it
for(var/obj/structure/blocker in parent_turf.contents)
if(!blocker.unslashable && blocker.density || istype(blocker, /obj/structure/bed))
if(!blocker.unslashable && (blocker.density || istype(blocker, /obj/structure/bed)))
INVOKE_ASYNC(processing_xeno, TYPE_PROC_REF(/mob, do_click), blocker, "", list())
return TRUE

/// If no ground weeds present - command our xeno to plant one
if(!parent_turf.weeds)
var/datum/action/xeno_action/onclick/plant_weeds/weeds_action = locate() in processing_xeno.actions
INVOKE_ASYNC(weeds_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/plant_weeds, use_ability_wrapper))
Expand All @@ -96,24 +95,30 @@
var/list/resin_types = processing_xeno.resin_build_order
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_turf/wall) in resin_types

var/wall_nearby = FALSE
var/blocked_turfs = 0
for(var/turf/blocked_turf in orange(1, parent_turf) - parent_turf.AdjacentTurfs())
blocked_turfs++
/// Let's decide whenever we are building a door or naw
var/build_door = FALSE
for(var/turf/blocked_turf in RANGE_TURFS(1, parent_turf) - parent_turf)
var/direction = get_dir(parent_turf, blocked_turf)
if(direction in diagonals)
continue

if(get_dir(blocked_turf, parent_turf) in diagonals)
if(!blocked_turf.density)
continue

if(blocked_turf.density)
wall_nearby = TRUE
/// Checking for any opposite walls on angles 135, 180, 225 respectfully
for(var/opposite_dir in reverse_nearby_direction(direction))
var/turf/opposite_turf = get_step(parent_turf, opposite_dir)
if(opposite_turf.density)
build_door = TRUE
break

var/obj/effect/alien/weeds/turf_weeds = blocked_turf.weeds
if(turf_weeds && turf_weeds.secreting)
wall_nearby = TRUE // Something is being constructed nearby, let's bet this is a new resin wall
var/obj/effect/alien/weeds/opposite_weeds = opposite_turf.weeds
if(opposite_weeds && opposite_weeds.secreting)
/// Something is being constructed nearby, let's bet this is a new resin wall
build_door = TRUE

if(wall_nearby)
if(prob(XENO_DOOR_BUILDING_CHANCE) || (wall_nearby && blocked_turfs > 1))
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types
if(build_door || prob(XENO_DOOR_BUILDING_CHANCE))
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types

var/datum/action/xeno_action/activable/secrete_resin/build_action = locate() in processing_xeno.actions
INVOKE_ASYNC(build_action, TYPE_PROC_REF(/datum/action/xeno_action/activable/secrete_resin, use_ability_wrapper), parent_turf)
Expand Down
20 changes: 20 additions & 0 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
set waitfor=0
WAIT_DB_READY
load_player_data_info(get_player_from_key(ckey))
check_discord_link()

/client/proc/load_player_data_info(datum/entity/player/player)
if(ckey != player.ckey)
Expand All @@ -482,6 +483,25 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
record_login_triplet(player.ckey, address, computer_id)
player_data.sync()

/client/proc/check_discord_link()
var/datum/view_record/discord_link/current_link = locate() in DB_VIEW(/datum/view_record/discord_link, DB_COMP("player_id", DB_EQUALS, player_data.id))

if(!current_link)

if(player_data.discord_link_id != null)
player_data.discord_link_id = null
player_data.save()
player_data.sync()

return

if(player_data.discord_link_id == current_link.id)
return

player_data.discord_link_id = current_link.id
player_data.save()
player_data.sync()

/datum/entity/player/proc/check_ban(computer_id, address, is_telemetry)
. = list()

Expand Down
21 changes: 19 additions & 2 deletions code/datums/medal_awards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#define MARINE_VALOR_MEDAL "medal of valor"
#define MARINE_HEROISM_MEDAL "medal of exceptional heroism"

#define ALL_MARINE_MEDALS list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_MEDAL, MARINE_VALOR_MEDAL, MARINE_HEROISM_MEDAL)

#define XENO_SLAUGHTER_MEDAL "royal jelly of slaughter"
#define XENO_RESILIENCE_MEDAL "royal jelly of resilience"
#define XENO_SABOTAGE_MEDAL "royal jelly of sabotage"
Expand Down Expand Up @@ -35,7 +37,6 @@ GLOBAL_LIST_EMPTY(jelly_awards)
giver_mob = list()
giver_ckey = list()


/proc/give_medal_award(medal_location, as_admin = FALSE)
if(as_admin && !check_rights(R_ADMIN))
as_admin = FALSE
Expand All @@ -45,14 +46,22 @@ GLOBAL_LIST_EMPTY(jelly_awards)
var/list/recipient_ranks = list()
for(var/datum/data/record/record in GLOB.data_core.general)
var/recipient_name = record.fields["name"]
if(usr.real_name == recipient_name && !as_admin)
continue
recipient_ranks[recipient_name] = record.fields["rank"]
possible_recipients += recipient_name

var/chosen_recipient = tgui_input_list(usr, "Who do you want to award a medal to?", "Medal Recipient", possible_recipients)
if(!chosen_recipient)
return FALSE

var/list/choosable_medals = list(MARINE_CONDUCT_MEDAL)

if(as_admin)
choosable_medals = ALL_MARINE_MEDALS

// Pick a medal
var/medal_type = tgui_input_list(usr, "What type of medal do you want to award?", "Medal Type", list(MARINE_CONDUCT_MEDAL, MARINE_BRONZE_HEART_MEDAL, MARINE_VALOR_MEDAL, MARINE_HEROISM_MEDAL))
var/medal_type = tgui_input_list(usr, "What type of medal do you want to award?", "Medal Type", choosable_medals)
if(!medal_type)
return FALSE

Expand Down Expand Up @@ -179,6 +188,14 @@ GLOBAL_LIST_EMPTY(jelly_awards)
user.visible_message("ERROR: ID card not registered for [user.real_name] in USCM registry. Potential medal fraud detected.")
return

if(!(FACTION_USCM in user.faction_group))
to_chat(user, SPAN_WARNING("Medals only available for USCM personnel."))
return

if(length(GLOB.medal_awards))
to_chat(user, SPAN_WARNING("Only one medal may be awarded per operation."))
return

if(give_medal_award(get_turf(printer)))
user.visible_message(SPAN_NOTICE("[printer] prints a medal."))

Expand Down
5 changes: 4 additions & 1 deletion code/datums/paygrades/paygrade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ GLOBAL_LIST_INIT(co_paygrades, list(
"MO6E",
"MO6C",
"MO5",
"MO4"
"MO4",
"MO3",
"MO2",
"MO1",
))

GLOBAL_LIST_INIT(wy_paygrades, list(
Expand Down
14 changes: 0 additions & 14 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ United States Colonial Marines
name = "Private"
//same as default

/datum/skills/pfc/crafty
name = "Crafty Private"
skills = list(
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_TRAINED,
)

/datum/skills/combat_medic
name = "Combat Medic"
skills = list(
Expand All @@ -23,13 +16,6 @@ United States Colonial Marines
SKILL_JTAC = SKILL_JTAC_BEGINNER,
)

/datum/skills/combat_medic/crafty
name = "Crafty Combat Medic"
skills = list(
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_TRAINED,
)

/datum/skills/combat_engineer
name = "Combat Engineer"
skills = list(
Expand Down
12 changes: 12 additions & 0 deletions code/game/area/golden_arrow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
name = "\improper Platoon Sergeant Office"
icon_state = "alpha"

/area/golden_arrow/shared_office
name = "\improper Shared Office"
icon_state = "alpha"

/area/golden_arrow/squad_one
name = "\improper Squad One Prep"
icon_state = "charlie"
Expand All @@ -69,3 +73,11 @@
/area/golden_arrow/firingrange
name = "\improper Firing Range"
icon_state = "firingrange"

/area/golden_arrow/platoonprep
name = "\improper Platoon Prep"
icon_state = "bravo"

/area/golden_arrow/platoonarmory
name = "\improper Platoon Armory"
icon_state = "alpha"
3 changes: 2 additions & 1 deletion code/game/jobs/job/command/cic/staffofficer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/so
gear_preset_secondary = /datum/equipment_preset/uscm_ship/so/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>Your job is to monitor the Marines, man the CIC, and listen to your superior officers.</a> You are in charge of logistics and the overwatch system. You are also in line to take command after other eligible superior commissioned officers."
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>Your job is to conduct the briefing for the platoon, monitor the operation, and listen to your superior officers.</a> You are in charge of the platoon for the current operation and supported by your Company Command.<br>They will give your orders VIA the telephone in your office once they are ready.<br><b>You remember that you've stored your personal gear are located in your personal quarters.</b><br>Your job involves heavy roleplay and requires you to behave like an officer and to stay in character at all times."

job_options = list(FIRST_LT_VARIANT = "1stLt", SECOND_LT_VARIANT = "2ndLt")

Expand Down Expand Up @@ -52,6 +52,7 @@ AddTimelock(/datum/job/command/bridge, list(
/datum/job/command/bridge/ai
total_positions = 1
spawn_positions = 1
prime_priority = TRUE

/datum/job/command/bridge/ai/set_spawn_positions(count)
return spawn_positions
Expand Down
3 changes: 3 additions & 0 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
/// If TRUE, this job will spawn w/ a cryo emergency kit during evac/red alert
var/gets_emergency_kit = TRUE

/// Whether or not linking your discord account can let you get prime priority for this role
var/prime_priority = FALSE

/datum/job/New()
. = ..()

Expand Down
4 changes: 2 additions & 2 deletions code/game/jobs/job/marine/marine.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/datum/job/marine
supervisors = "the acting squad leader"
supervisors = "the acting platoon leader"
selection_class = "job_marine"
total_positions = 8
spawn_positions = 8
allow_additional = 1

/datum/job/marine/generate_entry_message(mob/living/carbon/human/current_human)
if(current_human.assigned_squad)
entry_message_intro = "You are a [title]!<br>You have been assigned to: <b><font size=3 color=[current_human.assigned_squad.equipment_color]>[lowertext(current_human.assigned_squad.name)] squad</font></b>.[Check_WO() ? "" : " Make your way to the cafeteria for some post-cryosleep chow, and then get equipped in your squad's prep room." ]"
entry_message_intro = "You are a [title]!<br>You have been assigned to the <b><font size=3 color=[current_human.assigned_squad.equipment_color]>[lowertext(current_human.assigned_squad.name)] platoon</font></b>.[Check_WO() ? "" : " Make your way to the cafeteria for some post-cryosleep chow, and then get equipped in your team's prep room." ]"
return ..()

/datum/job/marine/generate_entry_conditions(mob/living/carbon/human/current_human)
Expand Down
3 changes: 2 additions & 1 deletion code/game/jobs/job/marine/squad/leader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/leader
gear_preset_secondary = /datum/equipment_preset/uscm/leader/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are responsible for the men and women of your squad.</a> Make sure they are on task, working together, and communicating. You are also in charge of communicating with command and letting them know about the situation first hand. Keep out of harm's way."
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are responsible for the men and women of your entire platoon.</a> Make sure they are on task, working together, and communicating. You are also in charge of communicating with command and letting them know about the situation first hand. Keep out of harm's way.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"

job_options = list(GYSGT_VARIANT = "GYSGT", SSGT_VARIANT = "SSGT")

Expand Down Expand Up @@ -53,6 +53,7 @@ AddTimelock(/datum/job/marine/leader, list(
/datum/job/marine/leader/ai
total_positions = 1
spawn_positions = 1
prime_priority = TRUE

/datum/job/marine/leader/ai/upp
title = JOB_SQUAD_LEADER_UPP
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/marine/squad/medic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/medic
gear_preset_secondary = /datum/equipment_preset/uscm/medic/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You tend the wounds of your squad mates</a> and make sure they are healthy and active. You may not be a fully-fledged doctor, but you stand between life and death when it matters."
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You tend the wounds of your squad mates</a> and make sure they are healthy and active. You may not be a fully-fledged doctor, but you stand between life and death when it matters.<br><b>You remember that you've stored your personal gear and uniform are located in your medical office.</b>"

job_options = list(CPL_VARIANT = "CPL", LCPL_VARIANT = "LCPL")

Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/marine/squad/smartgunner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/sg
gear_preset_secondary = /datum/equipment_preset/uscm/sg/lesser_rank
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are the smartgunner.</a> Your task is to provide heavy weapons support."
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are a specialized automatic rifleman.</a> Your task is to provide heavy weapons support for your squad.<br><b>You remember that you've stored your personal gear and uniform are located in the dorm or locker rooms.</b>"

job_options = list(CPL_VARIANT = "CPL", LCPL_VARIANT = "LCPL")

Expand Down
Loading

0 comments on commit 29a06ba

Please sign in to comment.