Skip to content

Commit

Permalink
Merge branch 'master' into crusher-bufff
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx authored Apr 12, 2024
2 parents 3f32a56 + 72a1e3f commit 8d1fd16
Show file tree
Hide file tree
Showing 144 changed files with 77,102 additions and 734 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
10 changes: 5 additions & 5 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

#define OPEN_TURF_PENALTY 1
#define DOOR_PENALTY 3
#define OBJECT_PENALTY 20
#define HUMAN_PENALTY 4
#define XENO_PENALTY 20
#define VEHICLE_PENALTY 25
#define OBJECT_PENALTY 20
#define FIRE_PENALTY 25
#define SENTRY_PENALTY 25
#define VEHICLE_PENALTY 25
#define WINDOW_FRAME_PENALTY 25
#define BARRICADE_PENALTY 50
#define WALL_PENALTY 50
#define FIRE_PENALTY 25
#define WALL_PENALTY 100

/*
PROBABILITY CALCULATIONS ARE HERE
Expand Down Expand Up @@ -90,7 +90,7 @@ PROBABILITY CALCULATIONS ARE HERE


/// Special blockers for pathfinding or obstacle handling
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile, /turf/open/space)
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile, /turf/open/space, /turf/open/gm/river)

// Friend-or-foe universal check
#define IS_SAME_HIVENUMBER(A,B) (A.hivenumber == B.hivenumber)
2 changes: 1 addition & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
var/obj/item/card/id/ID = A
if(ID.registered_name == oldname)
ID.registered_name = newname
ID.name = "[newname]'s ID Card ([ID.assignment])"
ID.name = "[newname]'s [ID.card_name] ([ID.assignment])"
if(!search_pda) break
search_id = 0
return 1
Expand Down
7 changes: 4 additions & 3 deletions code/controllers/subsystem/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ SUBSYSTEM_DEF(xeno_pathfinding)
/datum/controller/subsystem/xeno_pathfinding/proc/check_special_blockers(mob/living/carbon/xenomorph/xeno, turf/checking_turf)
var/list/pass_back = list()

pass_back += (checking_turf.type in XENO_AI_SPECIAL_BLOCKERS) ? checking_turf : list()
for(var/spec_blocker in XENO_AI_SPECIAL_BLOCKERS)
pass_back += istype(checking_turf, spec_blocker) ? checking_turf : list()

for(var/atom/checked_atom as anything in checking_turf)
pass_back += (checked_atom.type in XENO_AI_SPECIAL_BLOCKERS) ? checked_atom : list()
for(var/atom/checked_atom as anything in checking_turf)
pass_back += istype(checked_atom, spec_blocker) ? checked_atom : list()

return pass_back

Expand Down
7 changes: 4 additions & 3 deletions code/datums/ammo/bullet/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@

accuracy = HIT_ACCURACY_TIER_2
damage = 50
penetration = ARMOR_PENETRATION_TIER_4
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2
damage_falloff = DAMAGE_FALLOFF_TIER_3 //"VP78 - the only pistol viable as a primary."-Vampmare, probably.
penetration = ARMOR_PENETRATION_TIER_2
shrapnel_chance = SHRAPNEL_CHANCE_TIER_1
effective_range_max = 3 //hopefully this fixes the damage woes.
damage_falloff = DAMAGE_FALLOFF_TIER_6

/datum/ammo/bullet/pistol/squash/toxin
name = "toxic squash-head pistol bullet"
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
16 changes: 1 addition & 15 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 Expand Up @@ -287,7 +273,7 @@ COMMAND STAFF
SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_MEDIC,
SKILL_POLICE = SKILL_POLICE_FLASH,
SKILL_VEHICLE = SKILL_VEHICLE_SMALL,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
SKILL_JTAC = SKILL_JTAC_EXPERT,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_SURGERY = SKILL_SURGERY_NOVICE,
Expand Down
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
Loading

0 comments on commit 8d1fd16

Please sign in to comment.