Skip to content

Commit

Permalink
[MIRROR] Gulag Adjustments Two (#2055) (#2959)
Browse files Browse the repository at this point in the history
* Gulag Adjustments Two (#82561)

## About The Pull Request

I have received feedback that after the prior changes in #81971, the
gulag is still a little bit too subject to RNG.
The main culprit (as in my previous PR) is Iron being kind of cheap and
the fact that unlike the old Gulag you no longer have any way of
headhunting more valuable materials (everything appears as boulders on
your ore scanner).

My solution to this is wider than the last one of tweaking point values,
but also much simpler:
Just make every boulder you mine be worth the same amount of points
regardless of what is inside of it.

On the average test I made I could comfortably mine about 40-45 boulders
in ten minutes.
We'll make some adjustments to that rather than leaving 40 as the target
number;
Most players upon being teleported to the gulag are going to spend a few
minutes whining and bemoaning their fate instead of getting straight to
work. I had the benefit of being able to make sure my run started as
soon as a storm ended so I wouldn't need any kind of midpoint break. I
was also always the only person playing on my local instance, there
hadn't been any other pesky prisoners before me who had already mined
out all the nearest available deposits. And of course, let us not
forget, I am an MLG master league ss13 player who was surely performing
well above average.

So we'll round that down to: Each boulder is worth 33 points, meaning
you need to collect 31 boulders to complete a 1000 point (roughly ten
minute) sentence.

How do I ensure that every boulder is worth the same amount of points?
Well it's pretty easy.
One boulder = one material sheet. One material sheet = 33 points.
Simple.

"Now Jacquerel", I hear you not saying because you don't want me to know
about this thing you would prefer to do instead of hitting rocks
outside; "if I simply smash all of the tables and microwaves and botany
trays and bed in the gulag I can easily get like 65 sheets of Iron,
which is almost enough to buy the freedom for two entire people!"
Unfortunately I knew you were going to try and do that and the prisoner
point machine will only give you points for material sheets which have
been printed from the material smelter (well, any material smelter
actually but you should probably use the one in the gulag). You'll be
able to tell because if you examine a valid material sheet it will
mention a little maker's mark on it, which is absent in the beat-up iron
that you get from smashing furniture to bits.

Also glass is worth 0 points. Don't waste time digging up that shit. 

As glass has had all of its point value removed, I have added a "work
pit" to the gulag to compensate. You can pull boulders out of this
indefinitely via effort, however it also stamcrits you every time.
It's not very fun to do this, but that's because I would prefer you to
go find the rocks out in the field instead. This is a last resort.
You can do this if there's no boulders left to mine or if you really
really really hate mining and would rather very slowly click on one tile
repeatedly to get your boulders instead.
As a tiny bonus doing this gives workout experience.

This isn't a totally ideal solution but I think it'll do for now.

## Why It's Good For The Game

What we want out of the gulag is:
- Something where officers can vaguely approximate an expected sentence
duration.
- A task that requires players to actually be spending that time doing
something to get out of here.
- Produces at least some amount of useful materials.

In I think roughly that order.
I hope this change accomplishes all three of these in a way that is
somewhat predictable rather than throwing darts at a board.

## Changelog

:cl:
balance: Gulag mining has been rebalanced so that every boulder is worth
the same amount of points to mine for a prisoner regardless of what it
contains, and should be more consistent.
add: A vent which boulders can be hauled out of by hand has been added
to the gulag which you can use if there's nothing left to mine. It is
very slow, but at least it gives you a workout...
/:cl:

* Gulag Adjustments Two

* Update stone.dm

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Jacquerel <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
  • Loading branch information
4 people authored Apr 19, 2024
1 parent e377cf0 commit be2efa9
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 172 deletions.
206 changes: 105 additions & 101 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions _maps/map_files/Mining/Lavaland.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4160,6 +4160,10 @@
dir = 1
},
/area/mine/storage/public)
"xX" = (
/obj/structure/gulag_vent,
/turf/open/misc/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"yc" = (
/obj/docking_port/stationary{
dir = 2;
Expand Down Expand Up @@ -4487,7 +4491,7 @@
/turf/open/misc/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"Af" = (
/obj/machinery/mineral/processing_unit{
/obj/machinery/mineral/processing_unit/gulag{
dir = 1;
input_dir = 8;
output_dir = 4
Expand Down Expand Up @@ -22569,7 +22573,7 @@ uU
uU
uU
pU
pU
xX
pU
ff
Gf
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/material/material_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@
while(sheet_amt > 0)
//don't merge yet. we need to do stuff with it first
var/obj/item/stack/sheet/new_sheets = new material.sheet_type(target, min(sheet_amt, MAX_STACK_SIZE), FALSE)
new_sheets.manufactured = TRUE
count += new_sheets.amount
//use material & deduct work needed
use_amount_mat(new_sheets.amount * SHEET_MATERIAL_AMOUNT, material)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/stacks/bscrystal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
icon = 'icons/obj/stack_objects.dmi'
icon_state = "polycrystal"
inhand_icon_state = null
gulag_valid = TRUE
singular_name = "bluespace polycrystal"
desc = "A stable polycrystal, made of fused-together bluespace crystals. You could probably break one off."
mats_per_unit = list(/datum/material/bluespace=SHEET_MATERIAL_AMOUNT)
attack_verb_continuous = list("bluespace polybashes", "bluespace polybatters", "bluespace polybludgeons", "bluespace polythrashes", "bluespace polysmashes")
attack_verb_simple = list("bluespace polybash", "bluespace polybatter", "bluespace polybludgeon", "bluespace polythrash", "bluespace polysmash")
novariants = TRUE
grind_results = list(/datum/reagent/bluespace = 20)
point_value = 90
merge_type = /obj/item/stack/sheet/bluespace_crystal
material_type = /datum/material/bluespace
var/crystal_type = /obj/item/stack/ore/bluespace_crystal/refined
Expand Down
4 changes: 1 addition & 3 deletions code/game/objects/items/stacks/sheets/glass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
merge_type = /obj/item/stack/sheet/glass
grind_results = list(/datum/reagent/silicon = 20)
material_type = /datum/material/glass
point_value = 1
tableVariant = /obj/structure/table/glass
matter_amount = 4
cost = SHEET_MATERIAL_AMOUNT
Expand Down Expand Up @@ -159,7 +158,6 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/rglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
point_value = 12
matter_amount = 6
tableVariant = /obj/structure/table/reinforced/rglass

Expand Down Expand Up @@ -197,7 +195,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
material_flags = NONE
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 69
gulag_valid = TRUE
matter_amount = 8
tableVariant = /obj/structure/table/reinforced/plasmarglass

Expand Down
20 changes: 10 additions & 10 deletions code/game/objects/items/stacks/sheets/mineral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
sheettype = "diamond"
mats_per_unit = list(/datum/material/diamond=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/carbon = 20)
point_value = 75
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/diamond
material_type = /datum/material/diamond
walltype = /turf/closed/wall/mineral/diamond
Expand All @@ -124,7 +124,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
sheettype = "uranium"
mats_per_unit = list(/datum/material/uranium=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/uranium = 20)
point_value = 60
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/uranium
material_type = /datum/material/uranium
walltype = /turf/closed/wall/mineral/uranium
Expand Down Expand Up @@ -157,7 +157,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
max_integrity = 100
mats_per_unit = list(/datum/material/plasma=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/toxin/plasma = 20)
point_value = 60
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/plasma
material_type = /datum/material/plasma
walltype = /turf/closed/wall/mineral/plasma
Expand Down Expand Up @@ -192,7 +192,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
sheettype = "gold"
mats_per_unit = list(/datum/material/gold=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/gold = 20)
point_value = 60
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/gold
material_type = /datum/material/gold
walltype = /turf/closed/wall/mineral/gold
Expand All @@ -219,7 +219,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
sheettype = "silver"
mats_per_unit = list(/datum/material/silver=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/silver = 20)
point_value = 60
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/silver
material_type = /datum/material/silver
tableVariant = /obj/structure/table/optable
Expand All @@ -245,7 +245,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \
sheettype = "bananium"
mats_per_unit = list(/datum/material/bananium=SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/consumable/banana = 20)
point_value = 150
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/bananium
material_type = /datum/material/bananium
walltype = /turf/closed/wall/mineral/bananium
Expand Down Expand Up @@ -276,7 +276,7 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \
throw_range = 3
sheettype = "titanium"
mats_per_unit = list(/datum/material/titanium=SHEET_MATERIAL_AMOUNT)
point_value = 60
gulag_valid = TRUE
merge_type = /obj/item/stack/sheet/mineral/titanium
material_type = /datum/material/titanium
walltype = /turf/closed/wall/mineral/titanium
Expand Down Expand Up @@ -308,7 +308,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
throw_range = 3
sheettype = "plastitanium"
mats_per_unit = list(/datum/material/alloy/plastitanium=SHEET_MATERIAL_AMOUNT)
point_value = 135
gulag_valid = TRUE
material_type = /datum/material/alloy/plastitanium
merge_type = /obj/item/stack/sheet/mineral/plastitanium
material_flags = NONE
Expand Down Expand Up @@ -482,7 +482,7 @@ GLOBAL_LIST_INIT(metalhydrogen_recipes, list(
singular_name = "metal hydrogen sheet"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF | LAVA_PROOF | ACID_PROOF | INDESTRUCTIBLE
point_value = 300
gulag_valid = TRUE
mats_per_unit = list(/datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT)
material_type = /datum/material/metalhydrogen
merge_type = /obj/item/stack/sheet/mineral/metal_hydrogen
Expand All @@ -497,7 +497,7 @@ GLOBAL_LIST_INIT(metalhydrogen_recipes, list(
inhand_icon_state = "sheet-zaukerite"
singular_name = "zaukerite crystal"
w_class = WEIGHT_CLASS_NORMAL
point_value = 360
gulag_valid = TRUE
mats_per_unit = list(/datum/material/zaukerite = SHEET_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/mineral/zaukerite
material_type = /datum/material/zaukerite
4 changes: 2 additions & 2 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
resistance_flags = FIRE_PROOF
merge_type = /obj/item/stack/sheet/iron
grind_results = list(/datum/reagent/iron = 20)
point_value = 6
gulag_valid = TRUE
tableVariant = /obj/structure/table
material_type = /datum/material/iron
matter_amount = 4
Expand Down Expand Up @@ -277,7 +277,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
resistance_flags = FIRE_PROOF
merge_type = /obj/item/stack/sheet/plasteel
grind_results = list(/datum/reagent/iron = 20, /datum/reagent/toxin/plasma = 20)
point_value = 69
gulag_valid = TRUE
tableVariant = /obj/structure/table/reinforced
material_flags = NONE
matter_amount = 12
Expand Down
18 changes: 17 additions & 1 deletion code/game/objects/items/stacks/sheets/sheets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
novariants = FALSE
material_flags = MATERIAL_EFFECTS
var/sheettype = null //this is used for girders in the creation of walls/false walls
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity.
///If true, this is worth points in the gulag labour stacker
var/gulag_valid = FALSE
///Set to true if this is vended from a material storage
var/manufactured = FALSE
///What type of wall does this sheet spawn
var/walltype
/// whether this sheet can be sniffed by the material sniffer
Expand All @@ -32,11 +35,24 @@
GLOB.sniffable_sheets -= src
return ..()

/obj/item/stack/sheet/examine(mob/user)
. = ..()
if (manufactured && gulag_valid)
. += "It has been embossed with a manufacturer's mark of guaranteed quality."

/obj/item/stack/sheet/add(_amount)
. = ..()
if(sniffable && amount >= 10 && is_station_level(z))
GLOB.sniffable_sheets |= src

/obj/item/stack/sheet/merge(obj/item/stack/sheet/target_stack, limit)
. = ..()
manufactured = manufactured && target_stack.manufactured

/obj/item/stack/sheet/copy_evidences(obj/item/stack/sheet/from)
. = ..()
manufactured = from.manufactured

/// removing from sniffable handled by the sniffer itself when it checks for targets

/**
Expand Down
42 changes: 42 additions & 0 deletions code/game/objects/structures/lavaland/gulag_vent.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* A boulder-spawning structure superficially similar to an ore vent which doesnt share any of its behaviour
* Prisoners can haul boulders up out of it in case the actual mining area is totally spent
*/
/obj/structure/gulag_vent
name = "work pit"
desc = "A timeworn shaft, almost totally mined out. With a bit of effort you might be able to haul something up."
icon = 'icons/obj/mining_zones/terrain.dmi'
icon_state = "ore_vent_active"
move_resist = MOVE_FORCE_EXTREMELY_STRONG
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF //This thing will take a beating.
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_REQUIRES_DEXTERITY
anchored = TRUE
density = TRUE
/// What kind of rock we got in there?
var/spawned_boulder = /obj/item/boulder/gulag
/// Prevents multiple people from hauling at a time
var/occupied = FALSE

/obj/structure/gulag_vent/ice
icon_state = "ore_vent_ice_active"

/obj/structure/gulag_vent/interact(mob/user)
. = ..()
if (!isliving(user))
return
if (occupied)
balloon_alert(user, "occupied!")
return
var/mob/living/living_user = user
occupied = TRUE
living_user.balloon_alert_to_viewers("hauling...")
var/succeeded = do_after(living_user, 8 SECONDS, src)
occupied = FALSE
if (!succeeded)
return
living_user.mind?.adjust_experience(/datum/skill/fitness, 10)
living_user.apply_status_effect(/datum/status_effect/exercised)
new spawned_boulder(get_turf(living_user))
living_user.visible_message(span_notice("[living_user] hauls a boulder out of [src]."))
living_user.apply_damage(120, STAMINA)
playsound(src, 'sound/weapons/genhit.ogg', vol = 50, vary = TRUE)
4 changes: 2 additions & 2 deletions code/modules/jobs/job_types/prisoner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
. = ..()

var/crime_name = new_prisoner.client?.prefs?.read_preference(/datum/preference/choiced/prisoner_crime)
if(!crime_name)
return
var/datum/prisoner_crime/crime = GLOB.prisoner_crimes[crime_name]
if (isnull(crime))
return
var/list/limbs_to_tat = new_prisoner.bodyparts.Copy()
for(var/i in 1 to crime.tattoos)
if(!length(SSpersistence.prison_tattoos_to_use) || visualsOnly)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mining/boulder_processing/boulder_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/datum/material/uranium = 3,
)

set_custom_materials(list(pick_weight(gulag_minerals) = SHEET_MATERIAL_AMOUNT * rand(1, 3)))
set_custom_materials(list(pick_weight(gulag_minerals) = SHEET_MATERIAL_AMOUNT))

///Boulders usually spawned in lavaland labour camp area but with bluespace material
/obj/item/boulder/gulag_expanded
Expand All @@ -66,7 +66,7 @@
/datum/material/uranium = 3,
)

set_custom_materials(list(pick_weight(expanded_gulag_minerals) = SHEET_MATERIAL_AMOUNT * rand(1, 3)))
set_custom_materials(list(pick_weight(expanded_gulag_minerals) = SHEET_MATERIAL_AMOUNT))

///lowgrade boulder, most commonly spawned
/obj/item/boulder/shabby
Expand Down
22 changes: 6 additions & 16 deletions code/modules/mining/laborcamp/laborstacker.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GLOBAL_LIST(labor_sheet_values)
#define SHEET_POINT_VALUE 33

/**********************Prisoners' Console**************************/

Expand All @@ -22,14 +22,6 @@ GLOBAL_LIST(labor_sheet_values)
if(!stacking_machine)
return INITIALIZE_HINT_QDEL

if(!GLOB.labor_sheet_values)
var/sheet_list = list()
for(var/obj/item/stack/sheet/sheet as anything in subtypesof(/obj/item/stack/sheet))
if(!initial(sheet.point_value) || (initial(sheet.merge_type) && initial(sheet.merge_type) != sheet)) //ignore no-value sheets and x/fifty subtypes
continue
sheet_list += list(list("ore" = initial(sheet.name), "value" = initial(sheet.point_value)))
GLOB.labor_sheet_values = sort_list(sheet_list, GLOBAL_PROC_REF(cmp_sheet_list))

/obj/machinery/mineral/labor_claim_console/Destroy()
QDEL_NULL(security_radio)
if(stacking_machine)
Expand All @@ -46,11 +38,6 @@ GLOBAL_LIST(labor_sheet_values)
ui = new(user, src, "LaborClaimConsole", name)
ui.open()

/obj/machinery/mineral/labor_claim_console/ui_static_data(mob/user)
var/list/data = list()
data["ores"] = GLOB.labor_sheet_values
return data

/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
var/list/data = list()
var/can_go_home = FALSE
Expand Down Expand Up @@ -155,8 +142,9 @@ GLOBAL_LIST(labor_sheet_values)
labor_console = null
return ..()

/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
points += inp.point_value * inp.amount
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/input)
if (input.manufactured && input.gulag_valid)
points += SHEET_POINT_VALUE * input.amount
return ..()

/obj/machinery/mineral/stacking_machine/laborstacker/attackby(obj/item/weapon, mob/user, params)
Expand Down Expand Up @@ -190,3 +178,5 @@ GLOBAL_LIST(labor_sheet_values)
say("ID: [prisoner_id.registered_name].")
say("Points Collected: [prisoner_id.points] / [prisoner_id.goal].")
say("Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.")

#undef SHEET_POINT_VALUE
12 changes: 9 additions & 3 deletions code/modules/mining/machine_processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
var/datum/proximity_monitor/proximity_monitor
///Material container for materials
var/datum/component/material_container/materials
/// What can be input into the machine?
var/accepted_type = /obj/item/stack

/obj/machinery/mineral/processing_unit/Initialize(mapload)
. = ..()
Expand All @@ -153,7 +155,7 @@
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
INFINITY, \
MATCONTAINER_EXAMINE, \
allowed_items = /obj/item/stack \
allowed_items = accepted_type \
)
if(!GLOB.autounlock_techwebs[/datum/techweb/autounlocking/smelter])
GLOB.autounlock_techwebs[/datum/techweb/autounlocking/smelter] = new /datum/techweb/autounlocking/smelter
Expand All @@ -166,7 +168,7 @@
stored_research = null
return ..()

/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O)
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/O)
if(QDELETED(O))
return
var/material_amount = materials.get_item_material_amount(O)
Expand Down Expand Up @@ -225,7 +227,7 @@
/obj/machinery/mineral/processing_unit/pickup_item(datum/source, atom/movable/target, direction)
if(QDELETED(target))
return
if(istype(target, /obj/item/stack/ore))
if(istype(target, accepted_type))
process_ore(target)

/obj/machinery/mineral/processing_unit/process(seconds_per_tick)
Expand Down Expand Up @@ -282,4 +284,8 @@
var/O = new P(src)
unload_mineral(O)

/// Only accepts ore, for the work camp
/obj/machinery/mineral/processing_unit/gulag
accepted_type = /obj/item/stack/ore

#undef SMELT_AMOUNT
Loading

0 comments on commit be2efa9

Please sign in to comment.