Skip to content

Commit e42a32d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into basic_m4gp1e
2 parents bdd84b1 + df1f9ae commit e42a32d

262 files changed

Lines changed: 6867 additions & 4296 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

+secret

_std/__build.dm

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ o+` `-` ``..-:yooos-..----------..`
5252
//#define ME_AND_MY_40_ALT_ACCOUNTS // Override game mode minimum player requirements for testing revs, nukies etc.
5353
//#define I_WANNA_BE_THE_JOB "IMCODER" // Spawn as a 'imcoder' job. Gives CE belt, captain ID, etc. Change string to different job ID as needed
5454
//#define NO_ADMIN_SPEECH_MODULES // Loads the admin speech and listen module trees without any modules.
55+
//#define NO_PREGAME_HTML // Don't spawn the HTML pregame browser lobby screen
5556

5657
//#define STOP_DISTRACTING_ME //All of the below
5758

@@ -153,6 +154,8 @@ o+` `-` ``..-:yooos-..----------..`
153154
//#define MAP_OVERRIDE_MUSHROOM // Updated Mushroom
154155
//#define MAP_OVERRIDE_DENSITY2 // Density2 (second smallest map), by Emily
155156

157+
//#define GENERATE_GOONHUB_MAP // Generate map screenshots for goonhub map viewer (NOT USED NORMALLY). Use with a map override.
158+
156159
//------------ Unit Test Framework ------------//
157160

158161
//#define UNIT_TESTS
@@ -177,7 +180,51 @@ o+` `-` ``..-:yooos-..----------..`
177180
//#define ENABLE_ARTEMIS // Enables artemis for development
178181
//#define MIDSUMMER 1
179182

180-
//Don't comment this ty
183+
//----- Testmerge & Revision Information -----//
184+
185+
/// The literal current commit hash the server is running off of
186+
#define VCS_REVISION "1"
187+
/// The literal current author of the commit the server is runing off of
188+
#define VCS_AUTHOR "bob"
189+
/// The latest commit on the origin at the time of the server build, for display
190+
#define ORIGIN_REVISION "1"
191+
/// The latest commit author on the origin at the time of the server build, for display
192+
#define ORIGIN_AUTHOR "bob"
193+
// This exists and is set to a list of PR numbers when testmerges exist - goonstation/goonhub/app/Libraries/GameBuilder/Build.php#L392
194+
// #define TESTMERGE_PRS list(123, 456)
195+
196+
// The following describe when the server was compiled
197+
#define BUILD_TIME_TIMEZONE_ALPHA "UTC" // Server is UTC
198+
#define BUILD_TIME_TIMEZONE_OFFSET 0000
199+
#define BUILD_TIME_FULL "2009-02-13 18:31:30"
200+
#define BUILD_TIME_YEAR 2053
201+
#define BUILD_TIME_MONTH 03
202+
#define BUILD_TIME_DAY 13
203+
#define BUILD_TIME_HOUR 18
204+
#define BUILD_TIME_MINUTE 31
205+
#define BUILD_TIME_SECOND 30
206+
#define BUILD_TIME_UNIX 1234567890 // Unix epoch, second precision
207+
208+
// Uncomment and set to a URL with a zip of the RSC to offload RSC sending to an external webserver/CDN.
209+
//#define PRELOAD_RSC_URL ""
210+
211+
// -- Internal __build.dm stuff --
212+
#ifdef GENERATE_GOONHUB_MAP
213+
#define GOTTA_GO_FAST_BUT_ZLEVELS_TOO_SLOW
214+
#define IM_REALLY_IN_A_FUCKING_HURRY_HERE
215+
#define I_AM_ABOVE_THE_LAW
216+
#define ALL_ROBOT_AND_COMPUTERS_MUST_SHUT_THE_HELL_UP
217+
#define BAD_MONKEY_NO_BANANA
218+
#define CLONING_IS_A_SIN
219+
#define NO_CRITTERS
220+
#define NO_RANDOM_ROOMS
221+
#define NO_RANDOM_EVENTS
222+
#define NO_SHUTTLE_CALLS
223+
#define FUCK_OFF_WITH_THE_MAIL
224+
#define GHOSTDRONES_ON_STRIKE
225+
#define STOP_BREAKING_THE_FUCKING_LIGHTS_I_WANT_TO_SEE_SHIT
226+
#endif
227+
181228
#ifdef STOP_DISTRACTING_ME
182229
#define I_AM_ABOVE_THE_LAW
183230
#define ALL_ROBOT_AND_COMPUTERS_MUST_SHUT_THE_HELL_UP
@@ -207,31 +254,3 @@ o+` `-` ``..-:yooos-..----------..`
207254
#define IM_TESTING_SHIT_STOP_BARFING_CHANGELOGS_AT_ME
208255
#define I_DONT_WANNA_WAIT_FOR_THIS_PREGAME_SHIT_JUST_GO
209256
#endif
210-
211-
//----- Testmerge & Revision Information -----//
212-
213-
/// The literal current commit hash the server is running off of
214-
#define VCS_REVISION "1"
215-
/// The literal current author of the commit the server is runing off of
216-
#define VCS_AUTHOR "bob"
217-
/// The latest commit on the origin at the time of the server build, for display
218-
#define ORIGIN_REVISION "1"
219-
/// The latest commit author on the origin at the time of the server build, for display
220-
#define ORIGIN_AUTHOR "bob"
221-
// This exists and is set to a list of PR numbers when testmerges exist - goonstation/goonhub/app/Libraries/GameBuilder/Build.php#L392
222-
// #define TESTMERGE_PRS list(123, 456)
223-
224-
// The following describe when the server was compiled
225-
#define BUILD_TIME_TIMEZONE_ALPHA "UTC" // Server is UTC
226-
#define BUILD_TIME_TIMEZONE_OFFSET 0000
227-
#define BUILD_TIME_FULL "2009-02-13 18:31:30"
228-
#define BUILD_TIME_YEAR 2053
229-
#define BUILD_TIME_MONTH 03
230-
#define BUILD_TIME_DAY 13
231-
#define BUILD_TIME_HOUR 18
232-
#define BUILD_TIME_MINUTE 31
233-
#define BUILD_TIME_SECOND 30
234-
#define BUILD_TIME_UNIX 1234567890 // Unix epoch, second precision
235-
236-
// Uncomment and set to a URL with a zip of the RSC to offload RSC sending to an external webserver/CDN.
237-
//#define PRELOAD_RSC_URL ""

_std/__std.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#include "defines\item.dm"
7979
#include "defines\interdictor.dm"
8080
#include "defines\invisibility.dm"
81+
#include "defines\recipe.dm"
8182
#include "defines\jobs.dm"
8283
#include "defines\landmarks.dm"
8384
#include "defines\layer.dm"

_std/defines/access.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define access_robotics 29
4040
#define access_fine_large 30
4141
#define access_cargo 31 // QM.
42-
// Access 32 Unused
42+
#define access_pharmacy 32
4343
#define access_chemistry 33
4444
#define access_dwaine_superuser 34 // So it's not the same as the RD's office and locker.
4545
#define access_hydro 35

_std/defines/forensics.dm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#define FORENSIC_GROUP_TEXT 1
44
#define FORENSIC_GROUP_NOTES 2 // Basically a misc section
55
#define FORENSIC_GROUP_SLEUTH 3 // Pug sleuthing smells
6+
#define FORENSIC_GROUP_ADMINPRINTS 4 // Chain of custody for admins
7+
#define FORENSIC_GROUP_FINGERPRINTS 5
68

79
// Each group has a unique variable. Use that to create a new group.
810
// Placed here together with the FORENSIC_GROUP variable defines
@@ -12,6 +14,8 @@
1214
if(FORENSIC_GROUP_TEXT) group = new/datum/forensic_group/text
1315
if(FORENSIC_GROUP_NOTES) group = new/datum/forensic_group/basic_list/notes
1416
if(FORENSIC_GROUP_SLEUTH) group = new/datum/forensic_group/basic_list/sleuth
17+
if(FORENSIC_GROUP_ADMINPRINTS) group = new/datum/forensic_group/adminprints
18+
if(FORENSIC_GROUP_FINGERPRINTS) group = new/datum/forensic_group/fingerprints
1519
if(!group)
1620
CRASH("Forensic group category [category] not found.")
1721
return group
@@ -31,3 +35,10 @@
3135
#define FORENSIC_VALUE_MULT 3
3236
#define FORENSIC_VALUE_MAX 4
3337
#define FORENSIC_VALUE_MIN 5
38+
39+
// Chose 16 letters that look distinct and sort of fingerprinty with curves and such
40+
#define FORENSIC_CHARS_FINGERPRINTS list("a","b","c","d","e","g","n","o","p","q","s","u","v","x","y","z")
41+
#define FORENSIC_CHARS_HEX list("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F")
42+
43+
#define FORENSIC_GLOVE_MASK_FINGERLESS "0123-4567-89AB-CDEF"
44+
#define FORENSIC_GLOVE_MASK_NONE "...???..."

_std/defines/item.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
#define OMNI_MODE_WELDING 7
9595
#define OMNI_MODE_DECON 8
9696
#define OMNI_MODE_SOLDERING 9
97+
#define OMNI_MODE_SPOONING 10
98+
#define OMNI_MODE_UNCAPPING 11
99+
#define OMNI_MODE_SAWING 12
97100

98101
//fluid_canister flags
99102
#define FLUID_CANISTER_MODE_OFF 1

_std/defines/recipe.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// machine IDs for recipe instructions
2+
#define RECIPE_ID_OVEN "oven"
3+
#define RECIPE_ID_MIXER "mixer"

_std/lists.dm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,3 +386,10 @@ proc/params2complexlist(params)
386386
for(var/i in 1 to round(listlen / 2)) \
387387
x.Swap(i, listlen - i + 1) \
388388
} while (0)
389+
390+
/// Cuts elements from the start and end of the list.
391+
#define trim_list(L, start_amt, end_amt) \
392+
do { \
393+
L.Cut(length(L) - end_amt + 1); \
394+
L.Cut(1, start_amt + 1) \
395+
} while (0)

_std/plane.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define PLANE_UNDERFLOOR -115
66
#define PLANE_FLOOR -110
77
#define PLANE_WALL -105
8+
#define PLANE_OVERFLOOR -103
89
#define PLANE_NOSHADOW_BELOW -102
910
#define PLANE_DEFAULT -101
1011
#define PLANE_DEFAULT_NOWARP -100 //for objects which should not be affected by gravitational lensing

_std/record_db.dm

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,147 @@
8989
indices = null
9090
..()
9191

92+
proc/forensic_search(var/search_input)
93+
var/list/datum/db_record/record_matches = forensic_search_subjects(search_input)
94+
var/result = ""
95+
if(length(record_matches) > 0)
96+
result = SPAN_SUCCESS("<li>Records matching \"[search_input]\"</li>")
97+
var/match_num = ""
98+
if(length(record_matches) > 1)
99+
match_num = " (1/[length(record_matches)])"
100+
var/match_count = 1
101+
for(var/datum/db_record/R in record_matches)
102+
result += "<li>[SPAN_NOTICE("Match[match_num]:<b> [R["name"]]</b>")]" + " ([R["rank"]])</li>"
103+
var/fprint_right = R["fingerprint_right"]
104+
var/fprint_left = R["fingerprint_left"]
105+
if(fprint_right == fprint_left)
106+
result += "<li style='margin-left:15px;list-style-type:none'><i>Fingerprints:</i> [fprint_right]</li>"
107+
else
108+
result += "<li style='margin-left:15px;list-style-type:none'><i>Fingerprint (R):</i> [fprint_right]</li>\
109+
<li style='margin-left:15px;list-style-type:none'><i>Fingerprint (L):</i> [fprint_left]</li>"
110+
result += "<li style='margin-left:15px;list-style-type:none'><i>Blood DNA:</i> [R["dna"]]</li>"
111+
match_count++
112+
match_num = " ([match_count]/[length(record_matches)])"
113+
return result
114+
115+
// Search for partial fingerprints
116+
record_matches = forensic_search_fingerprint_partial(search_input)
117+
if(length(record_matches) > 0)
118+
result = SPAN_SUCCESS("<li>Potential matches for \"[search_input]\"</li>")
119+
for(var/datum/db_record/R in record_matches)
120+
var/fprint_right = R["fingerprint_right"]
121+
var/fprint_left = R["fingerprint_left"]
122+
var/match_result = SPAN_NOTICE("<li style='margin-left:15px;list-style-type:none'>["<b>[R["name"]]</b>"]")
123+
if(fprint_right == fprint_left)
124+
match_result += ": [fprint_right]</li>"
125+
else
126+
match_result += ": [fprint_right] | [fprint_left]</li>"
127+
result += match_result
128+
return result
129+
return SPAN_ALERT("No match found in security records for \"[search_input]\".")
130+
131+
/// Search for records based on name, dna, or fingerprints
132+
proc/forensic_search_subjects(var/search_input)
133+
var/search_low = lowertext(search_input)
134+
var/list/datum/db_record/subject_records = list()
135+
for(var/datum/db_record/R as anything in data_core.general.records)
136+
var/is_subj = (search_low == lowertext(R["dna"]))
137+
is_subj = is_subj || (search_low == lowertext(R["name"]))
138+
is_subj = is_subj || (search_low == lowertext(R["fingerprint_right"]))
139+
is_subj = is_subj || (search_low == lowertext(R["fingerprint_left"]))
140+
if(is_subj)
141+
subject_records += R
142+
return subject_records
143+
144+
proc/forensic_search_fingerprint_partial(var/search_input)
145+
RETURN_TYPE(/list/datum/db_record)
146+
if(!search_input)
147+
return null
148+
var/list/record_prints = list()
149+
var/list/datum/db_record/record_refs = list()
150+
151+
// Collect the fingerprint data and their associated records that we need to go through
152+
for(var/list/datum/db_record/record in data_core.general.records)
153+
var/fprint_right = record["fingerprint_right"]
154+
var/fprint_left = record["fingerprint_left"]
155+
if(fprint_right == fprint_left)
156+
if(!fprint_right)
157+
continue
158+
record_prints.Add(fprint_right)
159+
record_refs.Add(record)
160+
else
161+
if(fprint_right)
162+
record_prints.Add(fprint_right)
163+
record_refs.Add(record)
164+
if(fprint_left)
165+
record_prints.Add(fprint_left)
166+
record_refs.Add(record)
167+
if(!record_prints || !record_refs)
168+
return null
169+
170+
// Get the input into a more usable format
171+
// Print: (..3..-4567-...?...-CDEF) => Bunches: list("_3_","4567","_?_","CDEF")
172+
search_input = limit_chars(search_input, list("?",".","-"), TRUE, TRUE)
173+
var/list/input_bunches = splittext(search_input, "-")
174+
for(var/i in length(input_bunches) to 1 step -1)
175+
if(input_bunches[i] == "")
176+
input_bunches.Cut(i, i+1)
177+
if(length(input_bunches) == 0)
178+
return null
179+
var/list/input_empty = list()
180+
for(var/i in 1 to length(input_bunches))
181+
input_bunches[i] = text_replace_repeat(input_bunches[i], ".", "_")
182+
var/is_empty = !contains_chars(input_bunches[i], null, TRUE, TRUE)
183+
input_empty += is_empty
184+
185+
var/trim_start = 0
186+
var/trim_end = 0
187+
for(var/i in 1 to length(input_empty))
188+
if(!input_empty[i])
189+
break
190+
trim_start++
191+
for(var/i in length(input_empty) to 1 step -1)
192+
if(!input_empty[i])
193+
break
194+
trim_end++
195+
trim_list(input_bunches, trim_start, trim_end)
196+
if(length(input_bunches) == 0)
197+
return null
198+
199+
// Find and collect all records containing a matching print
200+
var/list/datum/db_record/match_records = list() // All records with a matching print
201+
for(var/i in 1 to length(record_prints))
202+
var/list/rec_bunches = splittext(record_prints[i], "-")
203+
trim_list(rec_bunches, trim_start, trim_end)
204+
if(length(rec_bunches) == 0)
205+
continue
206+
var/input_index = 1
207+
for(var/k in 1 to length(rec_bunches))
208+
var/bunch_match = FALSE
209+
if(findtext(input_bunches[input_index], "_")) // (-...A...-) or (...A...B...)
210+
// Not efficient to split the input bunch every time, but should be fine
211+
var/list/input_bunch_split = splittext(input_bunches[input_index], "_")
212+
input_bunch_split.RemoveAll("")
213+
if(length(input_empty) == 1)
214+
// Check the whole fingerprint rather than individual bunches
215+
if(findtextEx_ordered(record_prints[i], input_bunch_split))
216+
bunch_match = TRUE
217+
else if(findtextEx_ordered(rec_bunches[k], input_bunch_split))
218+
bunch_match = TRUE
219+
else if(findtextEx(input_bunches[input_index], "?"))
220+
if(text_replace_repeat(input_bunches[input_index], "?", "?") == "?") // Bunch only contains question marks
221+
input_index++
222+
else if(text_equals_partial(rec_bunches[k], input_bunches[input_index], "?")) // (-??A?-)
223+
bunch_match = TRUE
224+
if(bunch_match)
225+
input_index++
226+
else
227+
input_index = 1
228+
if(input_index == length(input_bunches) + 1) // Found a match!
229+
match_records += record_refs[i]
230+
break
231+
return match_records
232+
92233
/datum/db_record
93234
VAR_PRIVATE/datum/record_database/db
94235
VAR_PRIVATE/list/fields

0 commit comments

Comments
 (0)