From 6e99113cae8c99493f99466ceb7eebc15404f01b Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 8 Jul 2024 09:05:08 +0200 Subject: [PATCH 1/3] PickWeightedSyntax now errors --- code/__pragmas.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/__pragmas.dm b/code/__pragmas.dm index 84fcc0dfc307..cb833c478381 100644 --- a/code/__pragmas.dm +++ b/code/__pragmas.dm @@ -21,6 +21,7 @@ #pragma InvalidOverride error #pragma DanglingVarType error #pragma MissingInterpolatedExpression error +#pragma PickWeightedSyntax error //3000-3999 #pragma EmptyBlock error From 1ea4c45f84cf12fa9059f23e1ccf302db5ca09ed Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 8 Jul 2024 11:17:07 +0200 Subject: [PATCH 2/3] some done, cmb and clf .dm not done yet --- .../subsystem/objectives_controller.dm | 16 +++++++-------- code/controllers/subsystem/ticker.dm | 2 +- code/datums/diseases/mob_procs.dm | 2 +- code/datums/emergency_calls/contractor.dm | 4 ++-- code/datums/emergency_calls/goons.dm | 8 ++++---- code/datums/emergency_calls/inspection.dm | 20 +++++++++---------- code/datums/emergency_calls/mercs.dm | 4 ++-- code/datums/emergency_calls/pmc.dm | 4 ++-- code/datums/emergency_calls/upp.dm | 10 +++++----- code/datums/emergency_calls/upp_commando.dm | 6 +++--- code/datums/origin/upp.dm | 2 +- .../effects/decals/cleanable/blood/blood.dm | 2 +- .../effects/decals/cleanable/blood/robots.dm | 2 +- .../effects/effect_system/explosions.dm | 2 +- .../items/reagent_containers/food/snacks.dm | 2 +- code/game/objects/items/toys/toys.dm | 2 +- code/game/sound.dm | 2 +- 17 files changed, 45 insertions(+), 45 deletions(-) diff --git a/code/controllers/subsystem/objectives_controller.dm b/code/controllers/subsystem/objectives_controller.dm index 38accda46004..73d0c26db75a 100644 --- a/code/controllers/subsystem/objectives_controller.dm +++ b/code/controllers/subsystem/objectives_controller.dm @@ -163,22 +163,22 @@ SUBSYSTEM_DEF(objectives) //Intel for(var/i=0;i [objectives]")), 1 SECONDS) /datum/emergency_call/goon/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) + to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(M, SPAN_BOLD("You have no idea what a xenomorph is.")) to_chat(M, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their outposts and colonies.")) @@ -83,14 +83,14 @@ /datum/emergency_call/goon/chem_retrieval/print_backstory(mob/living/carbon/human/backstory_human) if(backstory_human.job == JOB_WY_GOON_RESEARCHER) - to_chat(backstory_human, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a wealthy family.")) + to_chat(backstory_human, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) to_chat(backstory_human, SPAN_BOLD("Joining the ranks of Weyland-Yutani was the perfect way to further your research goals.")) to_chat(backstory_human, SPAN_BOLD("You have a very in depth understanding of xenomorphs.")) to_chat(backstory_human, SPAN_BOLD("You are a well educated scientist employed by Weyland-Yutani to study various non-humans.")) to_chat(backstory_human, SPAN_BOLD("You heard about the original distress signal ages ago, but you have only just gotten permission from corporate to enter the area.")) to_chat(backstory_human, SPAN_BOLD("Your only goal is to recover the chemical aboard the Almayer. Do whatever you have to do.")) else - to_chat(backstory_human, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) + to_chat(backstory_human, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) to_chat(backstory_human, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(backstory_human, SPAN_BOLD("You have had a basic brief on xenomorphs.")) to_chat(backstory_human, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their outposts and colonies.")) @@ -129,7 +129,7 @@ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS) /datum/emergency_call/goon/bodyguard/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) + to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(M, SPAN_BOLD("You have no idea what a xenomorph is.")) to_chat(M, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their Executives from all Divisions alike.")) diff --git a/code/datums/emergency_calls/inspection.dm b/code/datums/emergency_calls/inspection.dm index e473466f4fb8..f07b167d21fd 100644 --- a/code/datums/emergency_calls/inspection.dm +++ b/code/datums/emergency_calls/inspection.dm @@ -263,8 +263,8 @@ /datum/emergency_call/inspection_cmb/print_backstory(mob/living/carbon/human/M) if(M == leader) - to_chat(M, SPAN_BOLD("You are the Colonial Marshal, originally from [pick(70;"The United Americas", 20;"Sol", 10;"a colony on the frontier")].")) - to_chat(M, SPAN_BOLD("You started in the Marshals through [pick(50; "pursuing a career during college", 40;"working for law enforcement", 10;"being recruited for your skills")].")) + to_chat(M, SPAN_BOLD("You are the Colonial Marshal, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 20, "a colony on the frontier" = 10)) + to_chat(M, SPAN_BOLD("You started in the Marshals through [pick_weight(list( "pursuing a career during college" = 50, "working for law enforcement" = 40, "being recruited for your skills" = 10)) to_chat(M, SPAN_BOLD("Rising through positions across the galaxy, you have become renown for your steadfast commitment to justice, fighting against crime and corruption alike.")) to_chat(M, SPAN_BOLD("You have interstellar jurisdiction as a CMB Official to enforce Colonial and Earth law, but you cannot and should not override Marine Law on a Marine Ship.")) to_chat(M, SPAN_BOLD("The laws of Earth stretch beyond the Sol. Where others are tempted and fall to corruption, you stay steadfast in your morals.")) @@ -279,25 +279,25 @@ to_chat(M, SPAN_BOLD("Although combat is not expected, you are carrying light munition and equipment reserves of the team in your backpack, should they be needed.")) to_chat(M, SPAN_BOLD("Despite being stretched thin, the stalwart oath of the Marshals has continued to keep communities safe, with the CMB well respected by many. You are a representation of that oath, serve with distinction.")) else if(M == icc_liaison) - to_chat(M, SPAN_BOLD("You are an Interstellar Commerce Liaison, originally from [pick(70;"The United Americas", 25;"Sol", 5;"a colony on the frontier")].")) - to_chat(M, SPAN_BOLD("You are [pick(30; "skeptical", 40;"ambicable", 30;"supportive")] of Weyland-Yutani.")) + to_chat(M, SPAN_BOLD("You are an Interstellar Commerce Liaison, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 25, "a colony on the frontier" = 5)) + to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 30, "ambicable" = 40, "supportive" = 30)) to_chat(M, SPAN_BOLD("Your headset is equipped with several frequencies, including a gifted key from The ICC's parent company, Weyland-Yutani, to try to incentivize your support. Use it for communication.")) to_chat(M, SPAN_BOLD("As the ICC Agent attached to the CMB Office at Anchorpoint Station, your job is to observe and ensure fair trade practices. Inspect and document cargo shipments for suspected illict activity as needed. You should coordinate with the Marshals, and command(preferably for a warrant) in order to make arrests if necessary.")) to_chat(M, SPAN_BOLD("Serving alongside such reputable men has made you a more virtuous person, especially compared to the Corporate Liaisons of other heavy-weight organizations.")) to_chat(M, SPAN_BOLD("Work with the Colonial Marshals in their investigations and report to command if you suspect smuggling or illicit trade is happening.")) else if(M == cmb_observer) - to_chat(M, SPAN_BOLD("You are an Interstellar Human Rights Observer, originally from [pick(50;"The United Americas", 10;"Europe", 10;"Luna", 20;"Sol", 10;"a colony on the frontier")].")) - to_chat(M, SPAN_BOLD("You are [pick(60; "skeptical", 40;"ambicable", 10;"supportive")] of Weyland-Yutani and their practices.")) - to_chat(M, SPAN_BOLD("You are [pick(40; "skeptical", 30;"ambicable", 30;"supportive")] with the USCM's actions on the frontier.")) + to_chat(M, SPAN_BOLD("You are an Interstellar Human Rights Observer, originally from [pick_weight(list("The United Americas" = 50, "Europe" = 10, "Luna" = 10, "Sol" = 20, "a colony on the frontier" = 10)) + to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 60, "ambicable" = 40, "supportive" = 10)) + to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 40, "ambicable" = 30, "supportive" = 30)) to_chat(M, SPAN_BOLD("Through a lot of hard work, your organization managed to convince the Colonial Marshals to take you to the frontier for an article about the quality of life there.")) to_chat(M, SPAN_BOLD("Observe the Feds in their adventures and keep an eye out for any inhumane acts from others. The Neroid Sector is full of atrocities on every side.")) to_chat(M, SPAN_BOLD("Do not instigate or start any confrontations. You are an observer, and you do not wage wars. Only intervene in medical emergencies.")) else - to_chat(M, SPAN_BOLD("You are a CMB Deputy, originally from [pick(70;"The United Americas", 20;"Sol", 10;"a colony on the frontier")].")) - to_chat(M, SPAN_BOLD("You joined the Marshals through [pick(50; "pursuing a career during college", 40;"working for law enforcement", 10;"being recruited for your skills")].")) + to_chat(M, SPAN_BOLD("You are a CMB Deputy, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 20, "a colony on the frontier" = 10)) + to_chat(M, SPAN_BOLD("You joined the Marshals through [pick_weight(list( "pursuing a career during college" = 50, "working for law enforcement" = 40, "being recruited for your skills" = 10)) to_chat(M, SPAN_BOLD("Following the lead of your Marshal, you have become renown for your steadfast commitment to justice, fighting against crime and corruption alike.")) to_chat(M, SPAN_BOLD("You have interstellar jurisdiction as a CMB Official to enforce Colonial and Earth law, but you cannot and should not override Marine Law on a Marine Ship.")) - to_chat(M, SPAN_BOLD("You have been stationed at Anchorpoint Station for [pick(80;"several months", 10;"only a week", 10;"years")] investigating henious crimes among the frontier.")) + to_chat(M, SPAN_BOLD("You have been stationed at Anchorpoint Station for [pick_weight(list("several months" = 80, "only a week" = 10, "years" = 10)) to_chat(M, SPAN_BOLD("The laws of arth stretch beyond the Sol. Where others fall to corruption, you stay steadfast in your morals.")) to_chat(M, SPAN_BOLD("Corporate Officers chase after paychecks and promotions, but you are motivated to do your sworn duty and care for the population, no matter how far or isolated a colony may be.")) to_chat(M, SPAN_BOLD("Despite being stretched thin, the stalwart oath of the Marshals has continued to keep communities safe, with the CMB well respected by many. You are a representation of that oath, serve with distinction.")) diff --git a/code/datums/emergency_calls/mercs.dm b/code/datums/emergency_calls/mercs.dm index 33a261a1da5e..9eca07eb9fcf 100644 --- a/code/datums/emergency_calls/mercs.dm +++ b/code/datums/emergency_calls/mercs.dm @@ -10,7 +10,7 @@ /datum/emergency_call/mercs/New() . = ..() - hostility = pick(75;FALSE,25;TRUE) + hostility = pick_weight(list(FALSE = 75, TRUE = 25)) arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding." if(hostility) objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Warlord says. Ensure your survival at all costs." @@ -95,7 +95,7 @@ /datum/emergency_call/heavy_mercs/New() . = ..() - hostility = pick(75;FALSE,25;TRUE) + hostility = pick_weight(list(FALSE = 75, TRUE = 25)) arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding." if(hostility) objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs." diff --git a/code/datums/emergency_calls/pmc.dm b/code/datums/emergency_calls/pmc.dm index 06a51c9869eb..ae30fc431ebf 100644 --- a/code/datums/emergency_calls/pmc.dm +++ b/code/datums/emergency_calls/pmc.dm @@ -62,10 +62,10 @@ /datum/emergency_call/pmc/print_backstory(mob/living/carbon/human/M) if(ishuman_strict(M)) - to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a [pick(75;"well-off", 15;"well-established", 10;"average")] family.")) + to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10, "well-off" = 75, "well-established" = 15, "average" = 10)) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani has proven to be very profitable for you.")) to_chat(M, SPAN_BOLD("While you are officially an employee, much of your work is off the books. You work as a skilled mercenary.")) - to_chat(M, SPAN_BOLD("You are [pick(50;"unaware of the xenomorph threat", 15;"acutely aware of the xenomorph threat", 10;"well-informed of the xenomorph threat")]")) + to_chat(M, SPAN_BOLD("You are [pick_weight(list("unaware of the xenomorph threat" = 50, "acutely aware of the xenomorph threat" = 15, "well-informed of the xenomorph threat" = 10)) else to_chat(M, SPAN_BOLD("You were brought online in a Weyland-Yutani synthetic production facility, knowing only your engineers for the first few weeks for your pseudo-life.")) to_chat(M, SPAN_BOLD("You were programmed with standard synthetic skills as per facility and geneva protocol.")) diff --git a/code/datums/emergency_calls/upp.dm b/code/datums/emergency_calls/upp.dm index cb5db1f0e3b9..9a431e5048b6 100644 --- a/code/datums/emergency_calls/upp.dm +++ b/code/datums/emergency_calls/upp.dm @@ -20,7 +20,7 @@ /datum/emergency_call/upp/New() . = ..() - hostility = pick(50;FALSE,50;TRUE) + hostility = pick_weight(list(FALSE = 50, TRUE = 50)) arrival_message = "[MAIN_SHIP_NAME] t*is i* UP* d^sp^*ch`. STr*&e teaM, #*u are cLe*% for a*pr*%^h. Pr*mE a*l wE*p^ns and pR*epr# t% r@nd$r a(tD." if(hostility) objectives = "Eliminate the UA Forces to ensure the UPP prescence in this sector is continued. Listen to your superior officers and take over the [MAIN_SHIP_NAME] at all costs." @@ -29,14 +29,14 @@ /datum/emergency_call/upp/print_backstory(mob/living/carbon/human/M) if(ishuman_strict(M)) - to_chat(M, SPAN_BOLD("You grew up in relatively simple family in [pick(75;"Eurasia", 25;"a famished UPP colony")] with few belongings or luxuries.")) - to_chat(M, SPAN_BOLD("The family you grew up with were [pick(50;"getting by", 25;"impoverished", 25;"starving")] and you were one of [pick(10;"two", 20;"three", 20;"four", 30;"five", 20;"six")] children.")) - to_chat(M, SPAN_BOLD("You come from a long line of [pick(40;"crop-harvesters", 20;"soldiers", 20;"factory workers", 5;"scientists", 15;"engineers")], and quickly enlisted to improve your living conditions.")) + to_chat(M, SPAN_BOLD("You grew up in relatively simple family in [pick_weight(list("Eurasia" = 75, "a famished UPP colony" = 25)) + to_chat(M, SPAN_BOLD("The family you grew up with were [pick_weight(list("getting by" = 50, "impoverished" = 25, "starving" = 25, "two" = 10, "three" = 20, "four" = 20, "five" = 30, "six" = 20)) + to_chat(M, SPAN_BOLD("You come from a long line of [pick_weight(list("crop-harvesters" = 40, "soldiers" = 20, "factory workers" = 20, "scientists" = 5, "engineers" = 15)) to_chat(M, SPAN_BOLD("Following your enlistment to the UPP military at the age of 17, you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) else to_chat(M, SPAN_BOLD("You were brought online in a UPP engineering facility, knowing only your engineers for the first few weeks for your pseudo-life.")) to_chat(M, SPAN_BOLD("You were programmed with all of the medical and combat experience a military fighting force support asset required.")) - to_chat(M, SPAN_BOLD("Throughout your career, your engineers, and later, your UPP compatriots, treated you like [pick(75;"a tool, and only that.", 25;"a person, despite your purpose.")]")) + to_chat(M, SPAN_BOLD("Throughout your career, your engineers, and later, your UPP compatriots, treated you like [pick_weight(list("a tool = 75, "a person = 25)) to_chat(M, SPAN_BOLD("Some weeks after your unit integration, you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) to_chat(M, SPAN_BOLD("You were shipped off with the battalion to one of the UPP's most remote territories, a gas giant designated MV-35 in the Anglo-Japanese Arm, in the Neroid Sector.")) to_chat(M, SPAN_BOLD("For the past 14 months, you and the rest of the Smoldering Sons have been stationed at MV-35's only facility, the helium refinery, Altai Station.")) diff --git a/code/datums/emergency_calls/upp_commando.dm b/code/datums/emergency_calls/upp_commando.dm index 53f117c26127..c5df528192fe 100644 --- a/code/datums/emergency_calls/upp_commando.dm +++ b/code/datums/emergency_calls/upp_commando.dm @@ -11,9 +11,9 @@ hostility = TRUE /datum/emergency_call/upp_commando/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You grew up in relativly simple family in [pick(75;"Eurasia", 25;"a famished UPP colony")] with few belongings or luxuries.")) - to_chat(M, SPAN_BOLD("The family you grew up with were [pick(50;"getting by", 25;"impoverished", 25;"starving")] and you were one of [pick(10;"two", 20;"three", 20;"four", 30;"five", 20;"six")] children.")) - to_chat(M, SPAN_BOLD("You come from a long line of [pick(40;"crop-harvesters", 20;"soldiers", 20;"factory workers", 5;"scientists", 15;"engineers")], and quickly enlisted to improve your living conditions.")) + to_chat(M, SPAN_BOLD("You grew up in relativly simple family in [pick_weight(list("Eurasia" = 75, "a famished UPP colony" = 25)) + to_chat(M, SPAN_BOLD("The family you grew up with were [pick_weight(list("getting by" = 50, "impoverished" = 25, "starving" = 25, "two" = 10, "three" = 20, "four" = 20, "five" = 30, "six" = 20)) + to_chat(M, SPAN_BOLD("You come from a long line of [pick_weight(list("crop-harvesters" = 40, "soldiers" = 20, "factory workers" = 20, "scientists" = 5, "engineers" = 15)) to_chat(M, SPAN_BOLD("Following your enlistment UPP military at the age of 17 you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) to_chat(M, SPAN_BOLD("You were shipped off with the battalion to one of the UPP's most remote territories, a gas giant designated MV-35 in the Anglo-Japanese Arm, in the Neroid Sector.")) to_chat(M, SPAN_BOLD("For the past 14 months, you and the rest of the Smoldering Sons have been stationed at MV-35's only facility, the helium refinery, Altai Station.")) diff --git a/code/datums/origin/upp.dm b/code/datums/origin/upp.dm index 8346657c5020..1c93c5981046 100644 --- a/code/datums/origin/upp.dm +++ b/code/datums/origin/upp.dm @@ -18,7 +18,7 @@ first_name = "[pick(GLOB.first_names_female_upp)]" if(prob(35)) - last_name = "[capitalize(randomly_generate_chinese_word(pick(20;1, 80;2)))]" + last_name = "[capitalize(randomly_generate_chinese_word(pick_weight(list(1 = 20, 2 = 80)) else last_name = "[pick(GLOB.last_names_upp)]" diff --git a/code/game/objects/effects/decals/cleanable/blood/blood.dm b/code/game/objects/effects/decals/cleanable/blood/blood.dm index 9fd5e79965af..b77cddae1755 100644 --- a/code/game/objects/effects/decals/cleanable/blood/blood.dm +++ b/code/game/objects/effects/decals/cleanable/blood/blood.dm @@ -165,7 +165,7 @@ /obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions) var/direction = pick(directions) - for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) + for (var/i = 0, i < pick_weight(list( 2 = 200, 3 = 150, 4 = 50)) sleep(3) if (i > 0) var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc) diff --git a/code/game/objects/effects/decals/cleanable/blood/robots.dm b/code/game/objects/effects/decals/cleanable/blood/robots.dm index 3ee3c9e07f9a..353cfe0b2547 100644 --- a/code/game/objects/effects/decals/cleanable/blood/robots.dm +++ b/code/game/objects/effects/decals/cleanable/blood/robots.dm @@ -14,7 +14,7 @@ /obj/effect/decal/cleanable/blood/gibs/robot/streak(list/directions) var/direction = pick(directions) - for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) + for (var/i = 0, i < pick_weight(list( 2 = 200, 3 = 150, 4 = 50)) sleep(3) if (i > 0) if (prob(40)) diff --git a/code/game/objects/effects/effect_system/explosions.dm b/code/game/objects/effects/effect_system/explosions.dm index 709331e1c76a..3aedb6b8956c 100644 --- a/code/game/objects/effects/effect_system/explosions.dm +++ b/code/game/objects/effects/effect_system/explosions.dm @@ -94,7 +94,7 @@ spawn(0) var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(src.location) var/direct = pick(GLOB.alldirs) - for(i=0, i Date: Mon, 8 Jul 2024 11:23:43 +0200 Subject: [PATCH 3/3] Revert "some done, cmb and clf .dm not done yet" This reverts commit 1ea4c45f84cf12fa9059f23e1ccf302db5ca09ed. --- .../subsystem/objectives_controller.dm | 16 +++++++-------- code/controllers/subsystem/ticker.dm | 2 +- code/datums/diseases/mob_procs.dm | 2 +- code/datums/emergency_calls/contractor.dm | 4 ++-- code/datums/emergency_calls/goons.dm | 8 ++++---- code/datums/emergency_calls/inspection.dm | 20 +++++++++---------- code/datums/emergency_calls/mercs.dm | 4 ++-- code/datums/emergency_calls/pmc.dm | 4 ++-- code/datums/emergency_calls/upp.dm | 10 +++++----- code/datums/emergency_calls/upp_commando.dm | 6 +++--- code/datums/origin/upp.dm | 2 +- .../effects/decals/cleanable/blood/blood.dm | 2 +- .../effects/decals/cleanable/blood/robots.dm | 2 +- .../effects/effect_system/explosions.dm | 2 +- .../items/reagent_containers/food/snacks.dm | 2 +- code/game/objects/items/toys/toys.dm | 2 +- code/game/sound.dm | 2 +- 17 files changed, 45 insertions(+), 45 deletions(-) diff --git a/code/controllers/subsystem/objectives_controller.dm b/code/controllers/subsystem/objectives_controller.dm index 73d0c26db75a..38accda46004 100644 --- a/code/controllers/subsystem/objectives_controller.dm +++ b/code/controllers/subsystem/objectives_controller.dm @@ -163,22 +163,22 @@ SUBSYSTEM_DEF(objectives) //Intel for(var/i=0;i [objectives]")), 1 SECONDS) /datum/emergency_call/goon/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) + to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(M, SPAN_BOLD("You have no idea what a xenomorph is.")) to_chat(M, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their outposts and colonies.")) @@ -83,14 +83,14 @@ /datum/emergency_call/goon/chem_retrieval/print_backstory(mob/living/carbon/human/backstory_human) if(backstory_human.job == JOB_WY_GOON_RESEARCHER) - to_chat(backstory_human, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) + to_chat(backstory_human, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a wealthy family.")) to_chat(backstory_human, SPAN_BOLD("Joining the ranks of Weyland-Yutani was the perfect way to further your research goals.")) to_chat(backstory_human, SPAN_BOLD("You have a very in depth understanding of xenomorphs.")) to_chat(backstory_human, SPAN_BOLD("You are a well educated scientist employed by Weyland-Yutani to study various non-humans.")) to_chat(backstory_human, SPAN_BOLD("You heard about the original distress signal ages ago, but you have only just gotten permission from corporate to enter the area.")) to_chat(backstory_human, SPAN_BOLD("Your only goal is to recover the chemical aboard the Almayer. Do whatever you have to do.")) else - to_chat(backstory_human, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) + to_chat(backstory_human, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) to_chat(backstory_human, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(backstory_human, SPAN_BOLD("You have had a basic brief on xenomorphs.")) to_chat(backstory_human, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their outposts and colonies.")) @@ -129,7 +129,7 @@ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS) /datum/emergency_call/goon/bodyguard/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10)) + to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a poor family.")) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani was all you could do to keep yourself and your loved ones fed.")) to_chat(M, SPAN_BOLD("You have no idea what a xenomorph is.")) to_chat(M, SPAN_BOLD("You are a simple security officer employed by Weyland-Yutani to guard their Executives from all Divisions alike.")) diff --git a/code/datums/emergency_calls/inspection.dm b/code/datums/emergency_calls/inspection.dm index f07b167d21fd..e473466f4fb8 100644 --- a/code/datums/emergency_calls/inspection.dm +++ b/code/datums/emergency_calls/inspection.dm @@ -263,8 +263,8 @@ /datum/emergency_call/inspection_cmb/print_backstory(mob/living/carbon/human/M) if(M == leader) - to_chat(M, SPAN_BOLD("You are the Colonial Marshal, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 20, "a colony on the frontier" = 10)) - to_chat(M, SPAN_BOLD("You started in the Marshals through [pick_weight(list( "pursuing a career during college" = 50, "working for law enforcement" = 40, "being recruited for your skills" = 10)) + to_chat(M, SPAN_BOLD("You are the Colonial Marshal, originally from [pick(70;"The United Americas", 20;"Sol", 10;"a colony on the frontier")].")) + to_chat(M, SPAN_BOLD("You started in the Marshals through [pick(50; "pursuing a career during college", 40;"working for law enforcement", 10;"being recruited for your skills")].")) to_chat(M, SPAN_BOLD("Rising through positions across the galaxy, you have become renown for your steadfast commitment to justice, fighting against crime and corruption alike.")) to_chat(M, SPAN_BOLD("You have interstellar jurisdiction as a CMB Official to enforce Colonial and Earth law, but you cannot and should not override Marine Law on a Marine Ship.")) to_chat(M, SPAN_BOLD("The laws of Earth stretch beyond the Sol. Where others are tempted and fall to corruption, you stay steadfast in your morals.")) @@ -279,25 +279,25 @@ to_chat(M, SPAN_BOLD("Although combat is not expected, you are carrying light munition and equipment reserves of the team in your backpack, should they be needed.")) to_chat(M, SPAN_BOLD("Despite being stretched thin, the stalwart oath of the Marshals has continued to keep communities safe, with the CMB well respected by many. You are a representation of that oath, serve with distinction.")) else if(M == icc_liaison) - to_chat(M, SPAN_BOLD("You are an Interstellar Commerce Liaison, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 25, "a colony on the frontier" = 5)) - to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 30, "ambicable" = 40, "supportive" = 30)) + to_chat(M, SPAN_BOLD("You are an Interstellar Commerce Liaison, originally from [pick(70;"The United Americas", 25;"Sol", 5;"a colony on the frontier")].")) + to_chat(M, SPAN_BOLD("You are [pick(30; "skeptical", 40;"ambicable", 30;"supportive")] of Weyland-Yutani.")) to_chat(M, SPAN_BOLD("Your headset is equipped with several frequencies, including a gifted key from The ICC's parent company, Weyland-Yutani, to try to incentivize your support. Use it for communication.")) to_chat(M, SPAN_BOLD("As the ICC Agent attached to the CMB Office at Anchorpoint Station, your job is to observe and ensure fair trade practices. Inspect and document cargo shipments for suspected illict activity as needed. You should coordinate with the Marshals, and command(preferably for a warrant) in order to make arrests if necessary.")) to_chat(M, SPAN_BOLD("Serving alongside such reputable men has made you a more virtuous person, especially compared to the Corporate Liaisons of other heavy-weight organizations.")) to_chat(M, SPAN_BOLD("Work with the Colonial Marshals in their investigations and report to command if you suspect smuggling or illicit trade is happening.")) else if(M == cmb_observer) - to_chat(M, SPAN_BOLD("You are an Interstellar Human Rights Observer, originally from [pick_weight(list("The United Americas" = 50, "Europe" = 10, "Luna" = 10, "Sol" = 20, "a colony on the frontier" = 10)) - to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 60, "ambicable" = 40, "supportive" = 10)) - to_chat(M, SPAN_BOLD("You are [pick_weight(list( "skeptical" = 40, "ambicable" = 30, "supportive" = 30)) + to_chat(M, SPAN_BOLD("You are an Interstellar Human Rights Observer, originally from [pick(50;"The United Americas", 10;"Europe", 10;"Luna", 20;"Sol", 10;"a colony on the frontier")].")) + to_chat(M, SPAN_BOLD("You are [pick(60; "skeptical", 40;"ambicable", 10;"supportive")] of Weyland-Yutani and their practices.")) + to_chat(M, SPAN_BOLD("You are [pick(40; "skeptical", 30;"ambicable", 30;"supportive")] with the USCM's actions on the frontier.")) to_chat(M, SPAN_BOLD("Through a lot of hard work, your organization managed to convince the Colonial Marshals to take you to the frontier for an article about the quality of life there.")) to_chat(M, SPAN_BOLD("Observe the Feds in their adventures and keep an eye out for any inhumane acts from others. The Neroid Sector is full of atrocities on every side.")) to_chat(M, SPAN_BOLD("Do not instigate or start any confrontations. You are an observer, and you do not wage wars. Only intervene in medical emergencies.")) else - to_chat(M, SPAN_BOLD("You are a CMB Deputy, originally from [pick_weight(list("The United Americas" = 70, "Sol" = 20, "a colony on the frontier" = 10)) - to_chat(M, SPAN_BOLD("You joined the Marshals through [pick_weight(list( "pursuing a career during college" = 50, "working for law enforcement" = 40, "being recruited for your skills" = 10)) + to_chat(M, SPAN_BOLD("You are a CMB Deputy, originally from [pick(70;"The United Americas", 20;"Sol", 10;"a colony on the frontier")].")) + to_chat(M, SPAN_BOLD("You joined the Marshals through [pick(50; "pursuing a career during college", 40;"working for law enforcement", 10;"being recruited for your skills")].")) to_chat(M, SPAN_BOLD("Following the lead of your Marshal, you have become renown for your steadfast commitment to justice, fighting against crime and corruption alike.")) to_chat(M, SPAN_BOLD("You have interstellar jurisdiction as a CMB Official to enforce Colonial and Earth law, but you cannot and should not override Marine Law on a Marine Ship.")) - to_chat(M, SPAN_BOLD("You have been stationed at Anchorpoint Station for [pick_weight(list("several months" = 80, "only a week" = 10, "years" = 10)) + to_chat(M, SPAN_BOLD("You have been stationed at Anchorpoint Station for [pick(80;"several months", 10;"only a week", 10;"years")] investigating henious crimes among the frontier.")) to_chat(M, SPAN_BOLD("The laws of arth stretch beyond the Sol. Where others fall to corruption, you stay steadfast in your morals.")) to_chat(M, SPAN_BOLD("Corporate Officers chase after paychecks and promotions, but you are motivated to do your sworn duty and care for the population, no matter how far or isolated a colony may be.")) to_chat(M, SPAN_BOLD("Despite being stretched thin, the stalwart oath of the Marshals has continued to keep communities safe, with the CMB well respected by many. You are a representation of that oath, serve with distinction.")) diff --git a/code/datums/emergency_calls/mercs.dm b/code/datums/emergency_calls/mercs.dm index 9eca07eb9fcf..33a261a1da5e 100644 --- a/code/datums/emergency_calls/mercs.dm +++ b/code/datums/emergency_calls/mercs.dm @@ -10,7 +10,7 @@ /datum/emergency_call/mercs/New() . = ..() - hostility = pick_weight(list(FALSE = 75, TRUE = 25)) + hostility = pick(75;FALSE,25;TRUE) arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding." if(hostility) objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Warlord says. Ensure your survival at all costs." @@ -95,7 +95,7 @@ /datum/emergency_call/heavy_mercs/New() . = ..() - hostility = pick_weight(list(FALSE = 75, TRUE = 25)) + hostility = pick(75;FALSE,25;TRUE) arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding." if(hostility) objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs." diff --git a/code/datums/emergency_calls/pmc.dm b/code/datums/emergency_calls/pmc.dm index ae30fc431ebf..06a51c9869eb 100644 --- a/code/datums/emergency_calls/pmc.dm +++ b/code/datums/emergency_calls/pmc.dm @@ -62,10 +62,10 @@ /datum/emergency_call/pmc/print_backstory(mob/living/carbon/human/M) if(ishuman_strict(M)) - to_chat(M, SPAN_BOLD("You were born [pick_weight(list("in Europe" = 75, "in Asia" = 15, "on Mars" = 10, "well-off" = 75, "well-established" = 15, "average" = 10)) + to_chat(M, SPAN_BOLD("You were born [pick(75;"in Europe", 15;"in Asia", 10;"on Mars")] to a [pick(75;"well-off", 15;"well-established", 10;"average")] family.")) to_chat(M, SPAN_BOLD("Joining the ranks of Weyland-Yutani has proven to be very profitable for you.")) to_chat(M, SPAN_BOLD("While you are officially an employee, much of your work is off the books. You work as a skilled mercenary.")) - to_chat(M, SPAN_BOLD("You are [pick_weight(list("unaware of the xenomorph threat" = 50, "acutely aware of the xenomorph threat" = 15, "well-informed of the xenomorph threat" = 10)) + to_chat(M, SPAN_BOLD("You are [pick(50;"unaware of the xenomorph threat", 15;"acutely aware of the xenomorph threat", 10;"well-informed of the xenomorph threat")]")) else to_chat(M, SPAN_BOLD("You were brought online in a Weyland-Yutani synthetic production facility, knowing only your engineers for the first few weeks for your pseudo-life.")) to_chat(M, SPAN_BOLD("You were programmed with standard synthetic skills as per facility and geneva protocol.")) diff --git a/code/datums/emergency_calls/upp.dm b/code/datums/emergency_calls/upp.dm index 9a431e5048b6..cb5db1f0e3b9 100644 --- a/code/datums/emergency_calls/upp.dm +++ b/code/datums/emergency_calls/upp.dm @@ -20,7 +20,7 @@ /datum/emergency_call/upp/New() . = ..() - hostility = pick_weight(list(FALSE = 50, TRUE = 50)) + hostility = pick(50;FALSE,50;TRUE) arrival_message = "[MAIN_SHIP_NAME] t*is i* UP* d^sp^*ch`. STr*&e teaM, #*u are cLe*% for a*pr*%^h. Pr*mE a*l wE*p^ns and pR*epr# t% r@nd$r a(tD." if(hostility) objectives = "Eliminate the UA Forces to ensure the UPP prescence in this sector is continued. Listen to your superior officers and take over the [MAIN_SHIP_NAME] at all costs." @@ -29,14 +29,14 @@ /datum/emergency_call/upp/print_backstory(mob/living/carbon/human/M) if(ishuman_strict(M)) - to_chat(M, SPAN_BOLD("You grew up in relatively simple family in [pick_weight(list("Eurasia" = 75, "a famished UPP colony" = 25)) - to_chat(M, SPAN_BOLD("The family you grew up with were [pick_weight(list("getting by" = 50, "impoverished" = 25, "starving" = 25, "two" = 10, "three" = 20, "four" = 20, "five" = 30, "six" = 20)) - to_chat(M, SPAN_BOLD("You come from a long line of [pick_weight(list("crop-harvesters" = 40, "soldiers" = 20, "factory workers" = 20, "scientists" = 5, "engineers" = 15)) + to_chat(M, SPAN_BOLD("You grew up in relatively simple family in [pick(75;"Eurasia", 25;"a famished UPP colony")] with few belongings or luxuries.")) + to_chat(M, SPAN_BOLD("The family you grew up with were [pick(50;"getting by", 25;"impoverished", 25;"starving")] and you were one of [pick(10;"two", 20;"three", 20;"four", 30;"five", 20;"six")] children.")) + to_chat(M, SPAN_BOLD("You come from a long line of [pick(40;"crop-harvesters", 20;"soldiers", 20;"factory workers", 5;"scientists", 15;"engineers")], and quickly enlisted to improve your living conditions.")) to_chat(M, SPAN_BOLD("Following your enlistment to the UPP military at the age of 17, you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) else to_chat(M, SPAN_BOLD("You were brought online in a UPP engineering facility, knowing only your engineers for the first few weeks for your pseudo-life.")) to_chat(M, SPAN_BOLD("You were programmed with all of the medical and combat experience a military fighting force support asset required.")) - to_chat(M, SPAN_BOLD("Throughout your career, your engineers, and later, your UPP compatriots, treated you like [pick_weight(list("a tool = 75, "a person = 25)) + to_chat(M, SPAN_BOLD("Throughout your career, your engineers, and later, your UPP compatriots, treated you like [pick(75;"a tool, and only that.", 25;"a person, despite your purpose.")]")) to_chat(M, SPAN_BOLD("Some weeks after your unit integration, you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) to_chat(M, SPAN_BOLD("You were shipped off with the battalion to one of the UPP's most remote territories, a gas giant designated MV-35 in the Anglo-Japanese Arm, in the Neroid Sector.")) to_chat(M, SPAN_BOLD("For the past 14 months, you and the rest of the Smoldering Sons have been stationed at MV-35's only facility, the helium refinery, Altai Station.")) diff --git a/code/datums/emergency_calls/upp_commando.dm b/code/datums/emergency_calls/upp_commando.dm index c5df528192fe..53f117c26127 100644 --- a/code/datums/emergency_calls/upp_commando.dm +++ b/code/datums/emergency_calls/upp_commando.dm @@ -11,9 +11,9 @@ hostility = TRUE /datum/emergency_call/upp_commando/print_backstory(mob/living/carbon/human/M) - to_chat(M, SPAN_BOLD("You grew up in relativly simple family in [pick_weight(list("Eurasia" = 75, "a famished UPP colony" = 25)) - to_chat(M, SPAN_BOLD("The family you grew up with were [pick_weight(list("getting by" = 50, "impoverished" = 25, "starving" = 25, "two" = 10, "three" = 20, "four" = 20, "five" = 30, "six" = 20)) - to_chat(M, SPAN_BOLD("You come from a long line of [pick_weight(list("crop-harvesters" = 40, "soldiers" = 20, "factory workers" = 20, "scientists" = 5, "engineers" = 15)) + to_chat(M, SPAN_BOLD("You grew up in relativly simple family in [pick(75;"Eurasia", 25;"a famished UPP colony")] with few belongings or luxuries.")) + to_chat(M, SPAN_BOLD("The family you grew up with were [pick(50;"getting by", 25;"impoverished", 25;"starving")] and you were one of [pick(10;"two", 20;"three", 20;"four", 30;"five", 20;"six")] children.")) + to_chat(M, SPAN_BOLD("You come from a long line of [pick(40;"crop-harvesters", 20;"soldiers", 20;"factory workers", 5;"scientists", 15;"engineers")], and quickly enlisted to improve your living conditions.")) to_chat(M, SPAN_BOLD("Following your enlistment UPP military at the age of 17 you were assigned to the 17th 'Smoldering Sons' battalion (six hundred strong) under the command of Colonel Ganbaatar.")) to_chat(M, SPAN_BOLD("You were shipped off with the battalion to one of the UPP's most remote territories, a gas giant designated MV-35 in the Anglo-Japanese Arm, in the Neroid Sector.")) to_chat(M, SPAN_BOLD("For the past 14 months, you and the rest of the Smoldering Sons have been stationed at MV-35's only facility, the helium refinery, Altai Station.")) diff --git a/code/datums/origin/upp.dm b/code/datums/origin/upp.dm index 1c93c5981046..8346657c5020 100644 --- a/code/datums/origin/upp.dm +++ b/code/datums/origin/upp.dm @@ -18,7 +18,7 @@ first_name = "[pick(GLOB.first_names_female_upp)]" if(prob(35)) - last_name = "[capitalize(randomly_generate_chinese_word(pick_weight(list(1 = 20, 2 = 80)) + last_name = "[capitalize(randomly_generate_chinese_word(pick(20;1, 80;2)))]" else last_name = "[pick(GLOB.last_names_upp)]" diff --git a/code/game/objects/effects/decals/cleanable/blood/blood.dm b/code/game/objects/effects/decals/cleanable/blood/blood.dm index b77cddae1755..9fd5e79965af 100644 --- a/code/game/objects/effects/decals/cleanable/blood/blood.dm +++ b/code/game/objects/effects/decals/cleanable/blood/blood.dm @@ -165,7 +165,7 @@ /obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions) var/direction = pick(directions) - for (var/i = 0, i < pick_weight(list( 2 = 200, 3 = 150, 4 = 50)) + for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) sleep(3) if (i > 0) var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc) diff --git a/code/game/objects/effects/decals/cleanable/blood/robots.dm b/code/game/objects/effects/decals/cleanable/blood/robots.dm index 353cfe0b2547..3ee3c9e07f9a 100644 --- a/code/game/objects/effects/decals/cleanable/blood/robots.dm +++ b/code/game/objects/effects/decals/cleanable/blood/robots.dm @@ -14,7 +14,7 @@ /obj/effect/decal/cleanable/blood/gibs/robot/streak(list/directions) var/direction = pick(directions) - for (var/i = 0, i < pick_weight(list( 2 = 200, 3 = 150, 4 = 50)) + for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) sleep(3) if (i > 0) if (prob(40)) diff --git a/code/game/objects/effects/effect_system/explosions.dm b/code/game/objects/effects/effect_system/explosions.dm index 3aedb6b8956c..709331e1c76a 100644 --- a/code/game/objects/effects/effect_system/explosions.dm +++ b/code/game/objects/effects/effect_system/explosions.dm @@ -94,7 +94,7 @@ spawn(0) var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(src.location) var/direct = pick(GLOB.alldirs) - for(i=0, i