Skip to content

Commit

Permalink
Merge branch 'SPLURT-Station:master' into Snaxi-regretti
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraSayomi authored Dec 3, 2024
2 parents 3273fa3 + 3c63bdc commit 0cebc2b
Show file tree
Hide file tree
Showing 41 changed files with 679 additions and 326 deletions.
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"name": "Launch DreamSeeker",
"preLaunchTask": "Build All",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
},
{
"type": "byond",
"request": "launch",
"name": "Launch DreamSeeker (TRACY)",
"preLaunchTask": "Build All (TRACY)",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
},
{
"type": "byond",
Expand Down Expand Up @@ -45,6 +52,13 @@
"preLaunchTask": "Build All (LOWMEMORYMODE)",
"dmb": "${workspaceFolder}/${command:CurrentDMB}",
"dreamDaemon": true
},
{
"type": "byond",
"request": "launch",
"name": "Launch DreamSeeker (LOWMEMORYMODE + TRACY)",
"preLaunchTask": "Build All (LOWMEMORYMODE TRACY)",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
}
]
}
51 changes: 51 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@
"dependsOn": "dm: reparse",
"label": "Build All"
},
{
"type": "process",
"command": "tools/build/build",
"windows": {
"command": ".\\tools\\build\\build.bat"
},
"options": {
"env": {
"DM_EXE": "${config:dreammaker.byondPath}"
}
},
"problemMatcher": [
"$dreammaker",
"$tsc",
"$eslint-stylish"
],
"group": {
"kind": "build"
},
"dependsOn": "dm: reparse",
"args": [
"-DUSE_BYOND_TRACY"
],
"label": "Build All (TRACY)"
},
{
"type": "process",
"command": "tools/build/build",
Expand Down Expand Up @@ -74,6 +99,32 @@
],
"label": "Build All (LOWMEMORYMODE)"
},
{
"type": "process",
"command": "tools/build/build",
"windows": {
"command": ".\\tools\\build\\build.bat"
},
"options": {
"env": {
"DM_EXE": "${config:dreammaker.byondPath}"
}
},
"problemMatcher": [
"$dreammaker",
"$tsc",
"$eslint-stylish"
],
"group": {
"kind": "build"
},
"dependsOn": "dm: reparse",
"args": [
"-DLOWMEMORYMODE",
"-DUSE_BYOND_TRACY"
],
"label": "Build All (LOWMEMORYMODE TRACY)"
},
{
"type": "dreammaker",
"dme": "tgstation.dme",
Expand Down
8 changes: 3 additions & 5 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,11 @@
if((character.mind.assigned_role == "Cyborg") || (character.mind.assigned_role == character.mind.special_role) || (character.mind.assigned_role == "Stowaway"))
return

//Skyrat changes
var/displayed_rank = rank
if(character.client && character.client.prefs && character.client.prefs.alt_titles_preferences[rank])
displayed_rank = character.client.prefs.alt_titles_preferences[rank]
if(character.client && character.client.prefs && character.client?.prefs?.alt_titles_preferences[rank])
displayed_rank = character.client?.prefs?.alt_titles_preferences[rank]
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("ARRIVAL", character.real_name, displayed_rank, list()) //make the list empty to make it announce it in common
//End of skyrat changes
announcer.announce("ARRIVAL", character.real_name, rank, displayed_rank, list()) //make the list empty to make it announce it in common

/proc/lavaland_equipment_pressure_check(turf/T)
. = FALSE
Expand Down
4 changes: 4 additions & 0 deletions code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@

//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between

// If this is uncommented, will attempt to load and initialize prof.dll/libprof.so.
// We do not ship byond-tracy. Build it yourself here: https://github.com/mafemergency/byond-tracy/
//#define USE_BYOND_TRACY

#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
Expand Down
17 changes: 10 additions & 7 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
SS.state = SS_IDLE
if (SS.flags & SS_TICKER)
tickersubsystems += SS
timer += world.tick_lag * rand(1, 5)
// Timer subsystems aren't allowed to bunch up, so we offset them a bit
timer += world.tick_lag * rand(0, 1)
SS.next_fire = timer
continue

Expand Down Expand Up @@ -371,14 +372,16 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/checking_runlevel = current_runlevel
if(cached_runlevel != checking_runlevel)
//resechedule subsystems
var/list/old_subsystems = current_runlevel_subsystems
cached_runlevel = checking_runlevel
current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel]
var/stagger = world.time
for(var/I in current_runlevel_subsystems)
var/datum/controller/subsystem/SS = I
if(SS.next_fire <= world.time)
stagger += world.tick_lag * rand(1, 5)
SS.next_fire = stagger

//now we'll go through all the subsystems we want to offset and give them a next_fire
for(var/datum/controller/subsystem/SS as anything in current_runlevel_subsystems)
//we only want to offset it if it's new and also behind
if(SS.next_fire > world.time || (SS in old_subsystems))
continue
SS.next_fire = world.time + world.tick_lag * rand(0, DS2TICKS(min(SS.wait, 2 SECONDS)))

subsystems_to_check = current_runlevel_subsystems
else
Expand Down
8 changes: 3 additions & 5 deletions code/controllers/subsystem/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,10 @@ SUBSYSTEM_DEF(job)
else
handle_auto_deadmin_roles(M.client, rank)

//Skyrat changes
var/display_rank = rank
if(M.client && M.client.prefs && M.client.prefs.alt_titles_preferences[rank])
display_rank = M.client.prefs.alt_titles_preferences[rank]
//End of skyrat changes
to_chat(M, "<b>You are the [display_rank].</b>") //Skyrat change
if(M.client && M.client.prefs && M.client?.prefs?.alt_titles_preferences[rank])
display_rank = M.client?.prefs?.alt_titles_preferences[rank]
to_chat(M, "<b>You are the [display_rank].</b>")
if(job)
to_chat(M, "<b>As the [display_rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>") //Skyrat change
job.radio_help_message(M)
Expand Down
111 changes: 105 additions & 6 deletions code/datums/components/storage/concrete/rped.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define MAX_STACK_PICKUP 30

/datum/component/storage/concrete/rped
collection_mode = COLLECT_EVERYTHING
allow_quick_gather = TRUE
Expand All @@ -9,13 +11,61 @@
max_items = 100
display_numerical_stacking = TRUE

var/static/list/allowed_material_types = list(
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/cable_coil,
)

var/static/list/allowed_bluespace_types = list(
/obj/item/stack/ore/bluespace_crystal,
/obj/item/stack/sheet/bluespace_crystal,
)

/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating())
if (!stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
if(!.)
return .

//we check how much of glass,plasteel & cable the user can insert
if(isstack(I))
//user tried to insert invalid stacktype
if(!is_type_in_list(I, allowed_material_types) && !is_type_in_list(I, allowed_bluespace_types))
return FALSE

var/obj/item/stack/the_stack = I
var/present_amount = 0

//we try to count & limit how much the user can insert of each type to prevent them from using it as an normal storage medium
for(var/obj/item/stack/stack_content in parent)
//is user trying to insert any of these listed bluespace stuff
if(is_type_in_list(I, allowed_bluespace_types))
//if yes count total bluespace stuff is the RPED and then compare the total amount to the value the user is trying to insert
if(is_type_in_list(stack_content, allowed_bluespace_types))
present_amount += stack_content.amount
//count other normal stack stuff
else if(istype(I,stack_content.type))
present_amount = stack_content.amount
break

//no more storage for this specific stack type
if(MAX_STACK_PICKUP - present_amount == 0)
return FALSE

//we want the user to insert the exact stack amount which is available so we dont have to bother subtracting & leaving left overs for the user
var/available = MAX_STACK_PICKUP-present_amount
if(available - the_stack.amount < 0)
return FALSE

else if(istype(I, /obj/item/circuitboard/machine) || istype(I, /obj/item/circuitboard/computer))
return TRUE

//check normal insertion of other stock parts
else if(!I.get_part_rating())
return FALSE

return .

/datum/component/storage/concrete/rped/quick_empty(mob/M)
var/atom/A = parent
if(!M.canUseStorage() || !A.Adjacent(M) || M.incapacitated())
Expand Down Expand Up @@ -52,13 +102,60 @@
max_items = 350
display_numerical_stacking = TRUE

var/static/list/allowed_material_types = list(
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/cable_coil,
)

var/static/list/allowed_bluespace_types = list(
/obj/item/stack/ore/bluespace_crystal,
/obj/item/stack/sheet/bluespace_crystal,
)

/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating())
if (!stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
if(!.)
return .

//we check how much of glass,plasteel & cable the user can insert
if(isstack(I))
//user tried to insert invalid stacktype
if(!is_type_in_list(I, allowed_material_types) && !is_type_in_list(I, allowed_bluespace_types))
return FALSE

var/obj/item/stack/the_stack = I
var/present_amount = 0

//we try to count & limit how much the user can insert of each type to prevent them from using it as an normal storage medium
for(var/obj/item/stack/stack_content in parent)
//is user trying to insert any of these listed bluespace stuff
if(is_type_in_list(I, allowed_bluespace_types))
//if yes count total bluespace stuff is the RPED and then compare the total amount to the value the user is trying to insert
if(is_type_in_list(stack_content, allowed_bluespace_types))
present_amount += stack_content.amount
//count other normal stack stuff
else if(istype(I,stack_content.type))
present_amount = stack_content.amount
break

//no more storage for this specific stack type
if(MAX_STACK_PICKUP - present_amount == 0)
return FALSE

//we want the user to insert the exact stack amount which is available so we dont have to bother subtracting & leaving left overs for the user
var/available = MAX_STACK_PICKUP-present_amount
if(available - the_stack.amount < 0)
return FALSE

else if(istype(I, /obj/item/circuitboard/machine) || istype(I, /obj/item/circuitboard/computer))
return TRUE

//check normal insertion of other stock parts
else if(!I.get_part_rating())
return FALSE

return .

/datum/component/storage/concrete/bluespace/rped/quick_empty(mob/M)
var/atom/A = parent
Expand All @@ -85,3 +182,5 @@
stoplag(1)
progress.end_progress()
A.do_squish(0.8, 1.2)

#undef MAX_STACK_PICKUP
14 changes: 8 additions & 6 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,18 @@
var/static/list/show_directions = list(SOUTH, WEST)
if(H.mind && (H.mind.assigned_role != H.mind.special_role) && (H.mind.assigned_role != "Stowaway"))
var/assignment
var/displayed_rank
if(H.mind.assigned_role)
assignment = H.mind.assigned_role
else if(H.job)
assignment = H.job
else
assignment = "Unassigned"
//Skyrat changes
if(C && C.prefs && C.prefs.alt_titles_preferences[assignment])
assignment = C.prefs.alt_titles_preferences[assignment]
//End of skyrat changes
if(C && C.prefs && C.prefs.alt_titles_preferences[assignment])
assignment = C.prefs.alt_titles_preferences[assignment]

if(assignment)
displayed_rank = C.prefs.alt_titles_preferences[assignment]

var/static/record_id_num = 1001
var/id = num2hex(record_id_num++,6)
Expand All @@ -174,7 +176,7 @@
var/datum/data/record/G = new()
G.fields["id"] = id
G.fields["name"] = H.real_name
G.fields["rank"] = assignment
G.fields["rank"] = displayed_rank
G.fields["age"] = H.age
G.fields["species"] = H.dna.species.name
G.fields["fingerprint"] = md5(H.dna.uni_identity)
Expand Down Expand Up @@ -221,7 +223,7 @@
var/datum/data/record/L = new()
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") //surely this should just be id, like the others?
L.fields["name"] = H.real_name
L.fields["rank"] = H.mind.assigned_role
L.fields["rank"] = displayed_rank
L.fields["age"] = H.age
if(H.gender == MALE)
G.fields["gender"] = "Male"
Expand Down
Loading

0 comments on commit 0cebc2b

Please sign in to comment.