mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 11:42:27 +00:00
## 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 🆑 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... /🆑
163 lines
5.2 KiB
Plaintext
163 lines
5.2 KiB
Plaintext
/**********************Mineral stacking unit console**************************/
|
|
|
|
/obj/machinery/mineral/stacking_unit_console
|
|
name = "stacking machine console"
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "console"
|
|
desc = "Controls a stacking machine... in theory."
|
|
density = FALSE
|
|
circuit = /obj/item/circuitboard/machine/stacking_unit_console
|
|
/// Connected stacking machine
|
|
var/obj/machinery/mineral/stacking_machine/machine
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/Initialize(mapload)
|
|
. = ..()
|
|
machine = locate(/obj/machinery/mineral/stacking_machine) in view(2, src)
|
|
if (machine)
|
|
machine.console = src
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/Destroy()
|
|
if(machine)
|
|
machine.console = null
|
|
machine = null
|
|
return ..()
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/multitool_act(mob/living/user, obj/item/I)
|
|
if(!multitool_check_buffer(user, I))
|
|
return
|
|
var/obj/item/multitool/M = I
|
|
M.set_buffer(src)
|
|
balloon_alert(user, "saved to multitool buffer")
|
|
return TRUE
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "StackingConsole", name)
|
|
ui.open()
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/ui_data(mob/user)
|
|
var/list/data = list()
|
|
data["machine"] = machine ? TRUE : FALSE
|
|
data["stacking_amount"] = null
|
|
data["contents"] = list()
|
|
if(machine)
|
|
data["stacking_amount"] = machine.stack_amt
|
|
data["input_direction"] = dir2text(machine.input_dir)
|
|
data["output_direction"] = dir2text(machine.output_dir)
|
|
for(var/stack_type in machine.stack_list)
|
|
var/obj/item/stack/sheet/stored_sheet = machine.stack_list[stack_type]
|
|
if(stored_sheet.amount <= 0)
|
|
continue
|
|
data["contents"] += list(list(
|
|
"type" = stored_sheet.type,
|
|
"name" = capitalize(stored_sheet.name),
|
|
"amount" = stored_sheet.amount,
|
|
))
|
|
return data
|
|
|
|
/obj/machinery/mineral/stacking_unit_console/ui_act(action, list/params)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
switch(action)
|
|
if("release")
|
|
var/obj/item/stack/sheet/released_type = text2path(params["type"])
|
|
if(!released_type || !(initial(released_type.merge_type) in machine.stack_list))
|
|
return //someone tried to spawn materials by spoofing hrefs
|
|
var/obj/item/stack/sheet/inp = machine.stack_list[initial(released_type.merge_type)]
|
|
var/obj/item/stack/sheet/out = new inp.type(null, inp.amount)
|
|
inp.amount = 0
|
|
machine.unload_mineral(out)
|
|
return TRUE
|
|
if("rotate")
|
|
var/input = text2num(params["input"])
|
|
machine.rotate(input)
|
|
return TRUE
|
|
|
|
/**********************Mineral stacking unit**************************/
|
|
|
|
|
|
/obj/machinery/mineral/stacking_machine
|
|
name = "stacking machine"
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "stacker"
|
|
desc = "A machine that automatically stacks acquired materials. Controlled by a nearby console."
|
|
density = TRUE
|
|
circuit = /obj/item/circuitboard/machine/stacking_machine
|
|
input_dir = EAST
|
|
output_dir = WEST
|
|
var/obj/machinery/mineral/stacking_unit_console/console
|
|
var/stk_types = list()
|
|
var/stk_amt = list()
|
|
var/stack_list[0] //Key: Type. Value: Instance of type.
|
|
var/stack_amt = 50 //amount to stack before releassing
|
|
var/datum/component/remote_materials/materials
|
|
var/force_connect = FALSE
|
|
///Proximity monitor associated with this atom, needed for proximity checks.
|
|
var/datum/proximity_monitor/proximity_monitor
|
|
|
|
/obj/machinery/mineral/stacking_machine/Initialize(mapload)
|
|
. = ..()
|
|
proximity_monitor = new(src, 1)
|
|
materials = AddComponent(
|
|
/datum/component/remote_materials, \
|
|
mapload, \
|
|
FALSE, \
|
|
(mapload && force_connect) \
|
|
)
|
|
|
|
/obj/machinery/mineral/stacking_machine/Destroy()
|
|
if(console)
|
|
console.machine = null
|
|
console = null
|
|
materials = null
|
|
return ..()
|
|
|
|
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
|
|
if(QDELETED(AM))
|
|
return
|
|
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
|
|
process_sheet(AM)
|
|
|
|
/obj/machinery/mineral/stacking_machine/multitool_act(mob/living/user, obj/item/multitool/M)
|
|
if(istype(M))
|
|
if(istype(M.buffer, /obj/machinery/mineral/stacking_unit_console))
|
|
console = M.buffer
|
|
console.machine = src
|
|
to_chat(user, span_notice("You link [src] to the console in [M]'s buffer."))
|
|
return TRUE
|
|
|
|
/obj/machinery/mineral/stacking_machine/proc/rotate(input)
|
|
if (input)
|
|
input_dir = turn(input_dir, 90)
|
|
else
|
|
output_dir = turn(output_dir, 90)
|
|
if (input_dir == output_dir)
|
|
rotate(input)
|
|
|
|
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/input)
|
|
if(QDELETED(input))
|
|
return
|
|
|
|
// Dump the sheets to the silo if attached
|
|
if(materials.silo && !materials.on_hold())
|
|
var/matlist = input.custom_materials & materials.mat_container.materials
|
|
if (length(matlist))
|
|
materials.insert_item(input)
|
|
return
|
|
|
|
// No silo attached process to internal storage
|
|
var/key = input.merge_type
|
|
var/obj/item/stack/sheet/storage = stack_list[key]
|
|
if(!storage) //It's the first of this sheet added
|
|
stack_list[key] = storage = new input.type(src, 0)
|
|
storage.amount += input.amount //Stack the sheets
|
|
qdel(input)
|
|
|
|
while(storage.amount >= stack_amt) //Get rid of excessive stackage
|
|
var/obj/item/stack/sheet/out = new input.type(null, stack_amt)
|
|
unload_mineral(out)
|
|
storage.amount -= stack_amt
|