Skip to content

Commit

Permalink
Merge branch 'master' into human-vs-human-gamemode
Browse files Browse the repository at this point in the history
  • Loading branch information
cuberound authored Nov 5, 2024
2 parents a0ad04e + 65267a1 commit 1dadf23
Show file tree
Hide file tree
Showing 61 changed files with 1,480 additions and 812 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/weapon_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ It DOES NOT control where your bullets go, that's scatter and projectile varianc
////SCATTER////
*/

#define SCATTER_AMOUNT_NEURO 60
#define SCATTER_AMOUNT_NEURO 45
#define SCATTER_AMOUNT_TIER_1 15
#define SCATTER_AMOUNT_TIER_2 10
#define SCATTER_AMOUNT_TIER_3 8
Expand Down
20 changes: 20 additions & 0 deletions code/__HELPERS/sanitize_values.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,23 @@
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
else return default
return .

/proc/sanitize_gear(list/gear, client/user)
var/list/sanitized_gear = list()
var/running_cost = 0

for(var/gear_option in gear)
if(!GLOB.gear_datums_by_name[gear_option])
continue

var/datum/gear/gear_datum = GLOB.gear_datums_by_name[gear_option]
var/new_total = running_cost + gear_datum.cost

if(new_total > MAX_GEAR_COST)
to_chat(user, SPAN_WARNING("Your [gear_option] was removed from your loadout as it exceeded the point limit."))
continue

running_cost = new_total
sanitized_gear += gear_option

return sanitized_gear
3 changes: 3 additions & 0 deletions code/__pragmas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#pragma DanglingVarType error
#pragma MissingInterpolatedExpression error
#pragma InvalidIndexOperation error
#pragma PointlessPositionalArgument error
#pragma ProcArgumentGlobal error

//3000-3999
#pragma EmptyBlock error
#pragma AmbiguousInOrder error
8 changes: 4 additions & 4 deletions code/controllers/subsystem/objectives_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ SUBSYSTEM_DEF(objectives)
for(var/datum/cm_objective/objective in medium_value)
while(LAZYLEN(objective.required_objectives) < objective.number_of_clues_to_generate && LAZYLEN(low_value))
var/datum/cm_objective/req = pick(low_value)
if(req in objective.required_objectives || (req.objective_flags & OBJECTIVE_DEAD_END))
if((req in objective.required_objectives) || (req.objective_flags & OBJECTIVE_DEAD_END))
continue //don't want to pick the same thing twice OR use a dead-end objective.
link_objectives(req, objective)

Expand All @@ -327,7 +327,7 @@ SUBSYSTEM_DEF(objectives)
for(var/datum/cm_objective/objective in high_value)
while(LAZYLEN(objective.required_objectives) < objective.number_of_clues_to_generate && LAZYLEN(medium_value))
var/datum/cm_objective/req = pick(medium_value)
if(req in objective.required_objectives || (req.objective_flags & OBJECTIVE_DEAD_END))
if((req in objective.required_objectives) || (req.objective_flags & OBJECTIVE_DEAD_END))
continue //don't want to pick the same thing twice OR use a dead-end objective.
link_objectives(req, objective)

Expand All @@ -340,7 +340,7 @@ SUBSYSTEM_DEF(objectives)
for(var/datum/cm_objective/objective in extreme_value)
while(LAZYLEN(objective.required_objectives) < objective.number_of_clues_to_generate && LAZYLEN(high_value))
var/datum/cm_objective/req = pick(high_value)
if(req in objective.required_objectives || (req.objective_flags & OBJECTIVE_DEAD_END))
if((req in objective.required_objectives) || (req.objective_flags & OBJECTIVE_DEAD_END))
continue //don't want to pick the same thing twice OR use a dead-end objective.
link_objectives(req, objective)

Expand All @@ -353,7 +353,7 @@ SUBSYSTEM_DEF(objectives)
for(var/datum/cm_objective/objective in absolute_value)
while(LAZYLEN(objective.required_objectives) < objective.number_of_clues_to_generate && LAZYLEN(extreme_value))
var/datum/cm_objective/req = pick(extreme_value)
if(req in objective.required_objectives || (req.objective_flags & OBJECTIVE_DEAD_END))
if((req in objective.required_objectives) || (req.objective_flags & OBJECTIVE_DEAD_END))
continue //don't want to pick the same thing twice OR use a dead-end objective.
link_objectives(req, objective)

Expand Down
1 change: 1 addition & 0 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
name = "armor-piercing smartgun bullet"
icon_state = "bullet"

damage_falloff = DAMAGE_FALLOFF_TIER_8
accurate_range = 12
accuracy = HIT_ACCURACY_TIER_2
damage = 20
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
return

if(ishuman(M))
M.apply_effect(2.5, SUPERSLOW)
M.apply_effect(4, SUPERSLOW)
M.visible_message(SPAN_DANGER("[M]'s movements are slowed."))

var/no_clothes_neuro = FALSE
Expand Down Expand Up @@ -127,7 +127,6 @@
accuracy_var_high = PROJECTILE_VARIANCE_TIER_6
accurate_range = 5
max_range = 5
scatter = SCATTER_AMOUNT_NEURO
bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_4

/datum/ammo/xeno/toxin/shotgun/New()
Expand All @@ -138,6 +137,7 @@
/datum/ammo/xeno/toxin/shotgun/additional
name = "additional neurotoxic droplets"

scatter = SCATTER_AMOUNT_NEURO
bonus_projectiles_amount = 0

/datum/ammo/xeno/acid
Expand Down
2 changes: 1 addition & 1 deletion code/datums/bug_report.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

/datum/tgui_bug_report_form/proc/sanitize_payload(list/params)
for(var/param in params)
params[param] = sanitize(params[param], list("\t"=" ",""=" "))
params[param] = sanitize(params[param], list("\t"=" ",""=" ","<"=" ",">"=" ","&"=" "))

return params

Expand Down
124 changes: 124 additions & 0 deletions code/datums/entities/player_sticky_ban.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,127 @@ BSQL_PROTECT_DATUM(/datum/entity/stickyban)
"ip",
"linked_stickyban",
)

/// Returns either a list containing the primary CKEYs this alt is connected to,
/// or FALSE.
/proc/get_player_is_alt(ckey)
var/list/datum/view_record/known_alt/alts = DB_VIEW(/datum/view_record/known_alt, DB_COMP("ckey", DB_EQUALS, ckey))
if(!length(alts))
return FALSE

var/ckeys = list()
for(var/datum/view_record/known_alt/alt as anything in alts)
ckeys += alt.player_ckey

return ckeys

/client/proc/add_known_alt()
set name = "Add Known Alt"
set category = "Admin.Alt"

var/player_ckey = ckey(tgui_input_text(src, "What is the player's primary Ckey?", "Player Ckey"))
if(!player_ckey)
return

var/datum/entity/player/player = get_player_from_key(player_ckey)
if(!istype(player))
return

var/existing_alts = get_player_is_alt(player_ckey)
if(existing_alts)
var/confirm = tgui_alert(src, "Primary Ckey [player_ckey] is already an alt for [english_list(existing_alts)].", "Primary Ckey", list("Confirm", "Cancel"))

if(confirm != "Confirm")
return

var/whitelist_to_add = ckey(tgui_input_text(src, "What is the Ckey that should be added to known alts?", "Alt Ckey"))
if(!whitelist_to_add)
return

var/alts_existing_primaries = get_player_is_alt(whitelist_to_add)
if(alts_existing_primaries)
if(player_ckey in alts_existing_primaries)
to_chat(src, SPAN_WARNING("The alt '[whitelist_to_add]' is already set as an alt Ckey for '[player_ckey]'."))
return

var/confirm = tgui_alert(src, "Alt is already an alt for [english_list(alts_existing_primaries)].", "Alt Ckey", list("Confirm", "Cancel"))

if(confirm != "Confirm")
return

var/datum/entity/known_alt/alt = DB_ENTITY(/datum/entity/known_alt)
alt.player_id = player.id
alt.player_ckey = player.ckey
alt.ckey = whitelist_to_add

alt.save()

to_chat(src, SPAN_NOTICE("[alt.ckey] added to the known alts of [player.ckey]."))

/client/proc/remove_known_alt()
set name = "Remove Known Alt"
set category = "Admin.Alt"

var/player_ckey = ckey(tgui_input_text(src, "What is the player's primary Ckey?", "Player Ckey"))
if(!player_ckey)
return

var/datum/entity/player/player = get_player_from_key(player_ckey)
if(!istype(player))
return

var/existing_alts = get_player_is_alt(player_ckey)
if(existing_alts)
var/confirm = tgui_alert(src, "Primary Ckey [player_ckey] is already an alt for [english_list(existing_alts)].", "Primary Ckey", list("Confirm", "Cancel"))

if(confirm != "Confirm")
return

var/list/datum/view_record/known_alt/alts = DB_VIEW(/datum/view_record/known_alt, DB_COMP("player_id", DB_EQUALS, player.id))
if(!length(alts))
to_chat(src, SPAN_WARNING("User has no alts on record."))
return

var/options = list()
for(var/datum/view_record/known_alt/alt in alts)
options[alt.ckey] = alt.id

var/picked = tgui_input_list(src, "Which known alt should be removed?", "Alt Removal", options)
if(!picked)
return

var/picked_id = options[picked]
var/datum/entity/known_alt/to_delete = DB_ENTITY(/datum/entity/known_alt, picked_id)
to_delete.delete()

to_chat(src, SPAN_NOTICE("[picked] removed from the known alts of [player.ckey]."))

/datum/entity/known_alt
var/player_id
var/player_ckey
var/ckey

/datum/entity_meta/known_alt
entity_type = /datum/entity/known_alt
table_name = "known_alts"
field_types = list(
"player_id" = DB_FIELDTYPE_BIGINT,
"player_ckey" = DB_FIELDTYPE_STRING_LARGE,
"ckey" = DB_FIELDTYPE_STRING_LARGE,
)

/datum/view_record/known_alt
var/id
var/player_id
var/player_ckey
var/ckey

/datum/entity_view_meta/known_alt
root_record_type = /datum/entity/known_alt
destination_entity = /datum/view_record/known_alt
fields = list(
"id",
"player_id",
"player_ckey",
"ckey",
)
45 changes: 45 additions & 0 deletions code/datums/fluff_emails.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,48 @@
</html>
"}


/datum/fluff_email/almayer/newgunny
title = "RE: New Gunny"
entry_text = {"<html>
Hey man, you gotta be careful with those razors,
if our new Platoon Sergeant catches you trying to sell your stash, you'll be in for a world of pain.
<br>
<br>
Way I heard it, he transferred in from dealing with the shittiest boot camp at Twentynine Palms,
so he's extra rough around the edges and might just cut you to ribbons with your own supply.
</html>
"}

/datum/fluff_email/almayer/immunization
title = "RE: Immunizations & Training"
entry_text = {"<html>
One of the battalions just got mulched by a Beebop group and the AAR suggests their training was neglected, it's one hell of a shit show over here.
Command is breathing down everyone's necks and wants the entire regiment on high readiness. Orders are going out to immediately assess each battalion's state and conduct training.
<br>
<br>
Make sure that the recent transfers to the battalion undergo the immunization program, you know the one that was prepared for Swamp Hopper.
It's apart of the readiness check, gotta be prepared for those plant-suckin shitholes like back on O'Bannon's.
<br>
<br>
This is your heads-up, don't make me get chewed out chief.
</html>
"}

/datum/fluff_email/almayer/morevehicles
title = "RE: Any chance of replacement vehicles?"
entry_text = {"<htrml>
No, sorry. What we lost on Tychon was what we had. Maisie thinks there might be enough spare bits left to refurbish
one of the old rust buckets, but the chances of that are next to nil unless she can pull more than coins from behind her ear.
</html>
"}

//Sticking this here because I'm too lazy to type it all out.
/*
/datum/fluff_email/almayer/
title = ""
entry_text = {"<html>
</html>
"}
*/
4 changes: 2 additions & 2 deletions code/datums/global_variables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist among global variables")
return

if(param_var_name in locked && !check_rights(R_DEBUG))
if((param_var_name in locked) && !check_rights(R_DEBUG))
return

variable = param_var_name
Expand Down Expand Up @@ -270,7 +270,7 @@
if(!variable) return
var_value = global.vars[variable]

if(variable in locked && !check_rights(R_DEBUG))
if((variable in locked) && !check_rights(R_DEBUG))
return

if(!autodetect_class)
Expand Down
9 changes: 7 additions & 2 deletions code/game/area/LV522_Chances_Claim.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
icon_state = "green"
ceiling = CEILING_NONE

/area/lv522/outdoors/colony_streets/containers
name = "Colony Streets - Container Yard"
icon_state = "yellow"

/area/lv522/outdoors/colony_streets/windbreaker
name = "Colony Windbreakers"
icon_state = "tcomsatcham"
Expand All @@ -129,11 +133,11 @@
soundscape_playlist = SCAPE_PL_LV522_INDOORS

/area/lv522/outdoors/colony_streets/central_streets
name = "Central Street - West"
name = "Central Streets - West"
icon_state = "west"

/area/lv522/outdoors/colony_streets/east_central_street
name = "Central Street - East"
name = "Central Streets - East"
icon_state = "east"

/area/lv522/outdoors/colony_streets/south_street
Expand Down Expand Up @@ -403,6 +407,7 @@
ceiling = CEILING_REINFORCED_METAL
ambience_exterior = AMBIENCE_SHIP
minimap_color = MINIMAP_AREA_ENGI
unoviable_timer = FALSE

/area/lv522/atmos/outdoor
name = "Atmospheric Processor - Outdoors"
Expand Down
2 changes: 1 addition & 1 deletion code/game/area/almayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
flags_area = AREA_AVOID_BIOSCAN|AREA_NOTUNNEL|AREA_CONTAINMENT

/area/almayer/medical/containment/cell/cl
name = "\improper Containment"
name = "\improper Storage Room"

/area/almayer/medical/chemistry
name = "\improper Medical Chemical laboratory"
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cm_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ GLOBAL_VAR_INIT(next_admin_bioscan, 30 MINUTES)
for(var/mob/living/carbon/human/current_human as anything in GLOB.alive_human_list)
if(!(current_human.z && (current_human.z in z_levels) && !istype(current_human.loc, /turf/open/space)))
continue
if(current_human.faction in FACTION_LIST_WY || current_human.job == "Corporate Liaison") //The CL is assigned the USCM faction for gameplay purposes
if((current_human.faction in FACTION_LIST_WY) || current_human.job == "Corporate Liaison") //The CL is assigned the USCM faction for gameplay purposes
num_WY++
num_headcount++
continue
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou

// returns TRUE if transfer_marine's role is at max capacity in the new squad
/datum/authority/branch/role/proc/check_squad_capacity(mob/living/carbon/human/transfer_marine, datum/squad/new_squad)
if(transfer_marine.job in new_squad.roles_cap)
if(!isnull(new_squad.roles_cap[transfer_marine.job]))
if(new_squad.roles_in[transfer_marine.job] >= new_squad.roles_cap[transfer_marine.job])
return TRUE
return FALSE
9 changes: 9 additions & 0 deletions code/game/machinery/doors/poddoor/almayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
/obj/structure/machinery/door/poddoor/almayer/blended/white/open
density = FALSE

/obj/structure/machinery/door/poddoor/almayer/blended/liaison
name = "hull"
desc = "A metal wall used to separate rooms and make up the ship."
icon_state = "liaison_pdoor1"
base_icon_state = "liaison_pdoor"

/obj/structure/machinery/door/poddoor/almayer/blended/liaison/open
density = FALSE

/obj/structure/machinery/door/poddoor/almayer/blended/aicore
icon_state = "aidoor1"
base_icon_state = "aidoor"
Expand Down
Loading

0 comments on commit 1dadf23

Please sign in to comment.