mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
## About The Pull Request People had been noting that it was taking longer to pay off a 1000 point gulag sentence than expected, because we made some changes to mining and forgot to update it So now: - There are ores in the walls again (iron, plasma, silver, and gold) - Materials are now worth a variable amount of points (iron = plasma < silver < gold) - Boulders mined from the walls pop into a large amount of the kinds of ores you can mine - Boulders dragged out of the infinite use "work pit" contain a guaranteed large amount of iron The upshot of these changes are: - You can pull 14 boulders out of the hole for a guaranteed time spent of about 6 and a half quite boring minutes to guarantee finishing your sentence (if you know exactly what you are doing and optimise it, probably a bit longer for many people) - You can mine the walls for ore at the mercy of RNG, you will _likely_ be done in about 5 minutes of mining if you're an early sentence and obviously it gets harder the more people have already mined out the ores I aimed for about 5 and 6 minutes as a target because of a combination of travel time, the fact that you need to actively do something, and because of the weather. Remember that's only 5 or 6 minutes actually doing _mining_ (or... watching progress bars and repeatedly falling over), doesn't include variations in skill or luck, being hustled into the teleporter, suiting up, processing the ores, summoning the shuttle, taking the ores to the shuttle, and an ash storm if you're unlucky. So all around, probably adds up to be reasonably close to a 10 minute brig timer. We all know most people given a 1 point sentence are just going to kill themselves anyway. Also I moved some lightbulbs in the mining station work camp area because you couldn't see some of the important tiles and it was annoying me ## Why It's Good For The Game We advise players that 1000 points in the work camp is work about a 10 minute brig sentence and this is basically ban-baiting from our policy page if it's not actually true ## Changelog 🆑 balance: Adjusted the values of ores from the work camp to make a 1000 point sentence closer to a 10 minute brig timer map: Moved some lightbulbs around in the work camp so you can see the bars getting printed /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
246 lines
8.8 KiB
Plaintext
246 lines
8.8 KiB
Plaintext
/**********************Prisoners' Console**************************/
|
|
|
|
/obj/machinery/mineral/labor_claim_console
|
|
name = "point claim console"
|
|
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "console"
|
|
density = FALSE
|
|
/// Connected stacking machine
|
|
var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine
|
|
/// Whether the claim console initiated the launch.
|
|
var/initiated_launch = FALSE
|
|
/// Cooldown for console says.
|
|
COOLDOWN_DECLARE(say_cooldown)
|
|
|
|
/obj/machinery/mineral/labor_claim_console/Initialize(mapload)
|
|
. = ..()
|
|
locate_stacking_machine()
|
|
if(!SSshuttle.initialized)
|
|
RegisterSignal(SSshuttle, COMSIG_SUBSYSTEM_POST_INITIALIZE, PROC_REF(register_shuttle_signal))
|
|
else
|
|
register_shuttle_signal()
|
|
//If we can't find a stacking machine end it all ok?
|
|
if(!stacking_machine)
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
/obj/machinery/mineral/labor_claim_console/proc/register_shuttle_signal()
|
|
SIGNAL_HANDLER
|
|
var/obj/docking_port/mobile/laborshuttle = SSshuttle.getShuttle("laborcamp")
|
|
if(laborshuttle)
|
|
RegisterSignal(laborshuttle, COMSIG_SHUTTLE_SHOULD_MOVE, PROC_REF(on_laborshuttle_can_move))
|
|
UnregisterSignal(SSshuttle, COMSIG_SUBSYSTEM_POST_INITIALIZE)
|
|
|
|
/obj/machinery/mineral/labor_claim_console/Destroy()
|
|
if(stacking_machine)
|
|
stacking_machine.labor_console = null
|
|
stacking_machine = null
|
|
return ..()
|
|
|
|
/proc/cmp_sheet_list(list/a, list/b)
|
|
return a["value"] - b["value"]
|
|
|
|
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "LaborClaimConsole", name)
|
|
ui.open()
|
|
|
|
/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
|
|
var/list/data = list()
|
|
var/can_go_home = FALSE
|
|
|
|
if(obj_flags & EMAGGED)
|
|
can_go_home = TRUE
|
|
var/obj/item/card/id/worn_id
|
|
if(isliving(user))
|
|
var/mob/living/living_user = user
|
|
worn_id = living_user.get_idcard(TRUE)
|
|
if(istype(worn_id, /obj/item/card/id/advanced/prisoner))
|
|
var/obj/item/card/id/advanced/prisoner/worn_prisoner_id = worn_id
|
|
data["id_points"] = worn_prisoner_id.points
|
|
if(!worn_prisoner_id.goal)
|
|
data["status_info"] = "No goal set!"
|
|
else if(worn_prisoner_id.points >= worn_prisoner_id.goal)
|
|
can_go_home = TRUE
|
|
data["status_info"] = "Goal met!"
|
|
else
|
|
data["status_info"] = "You are [(worn_prisoner_id.goal - worn_prisoner_id.points)] points away."
|
|
else
|
|
data["status_info"] = "No Prisoner ID detected."
|
|
data["id_points"] = 0
|
|
|
|
if(stacking_machine)
|
|
data["unclaimed_points"] = stacking_machine.points
|
|
|
|
data["can_go_home"] = can_go_home
|
|
return data
|
|
|
|
/obj/machinery/mineral/labor_claim_console/ui_static_data(mob/user)
|
|
var/list/data = list()
|
|
data["shuttle_exists"] = !isnull(SSshuttle.getShuttle("laborcamp"))
|
|
return data
|
|
|
|
/obj/machinery/mineral/labor_claim_console/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
var/mob/user_mob = usr
|
|
|
|
switch(action)
|
|
|
|
if("claim_points")
|
|
var/obj/item/card/id/worn_id
|
|
if(isliving(user_mob))
|
|
var/mob/living/living_mob = user_mob
|
|
worn_id = living_mob.get_idcard(TRUE)
|
|
if(istype(worn_id, /obj/item/card/id/advanced/prisoner))
|
|
var/obj/item/card/id/advanced/prisoner/worn_prisoner_id = worn_id
|
|
worn_prisoner_id.points += stacking_machine.points
|
|
stacking_machine.points = 0
|
|
say("Points transferred.")
|
|
return TRUE
|
|
else
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("No valid id for point transfer detected.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
|
|
if("move_shuttle")
|
|
if(isnull(SSshuttle.getShuttle("laborcamp")))
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("Shuttle not found.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
return
|
|
|
|
var/list/labor_shuttle_mobs = find_labor_shuttle_mobs()
|
|
if(length(labor_shuttle_mobs) > 1 || labor_shuttle_mobs[1] != user_mob)
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("Prisoners may only be released one at a time.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
return
|
|
|
|
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
|
|
if(1)
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("Shuttle not found.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
if(2)
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("Shuttle already at station.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
if(3)
|
|
if(COOLDOWN_FINISHED(src, say_cooldown))
|
|
say("No permission to dock could be granted.")
|
|
COOLDOWN_START(src, say_cooldown, 2 SECONDS)
|
|
else
|
|
if(!(obj_flags & EMAGGED))
|
|
var/datum/record/crew/target = find_record(user_mob.real_name)
|
|
target?.wanted_status = WANTED_PAROLE
|
|
|
|
aas_config_announce(/datum/aas_config_entry/security_labor_stacker, list("PERSON" = user_mob.real_name), src, list(RADIO_CHANNEL_SECURITY))
|
|
user_mob.log_message("has completed their labor points goal and is now sending the gulag shuttle back to the station.", LOG_GAME)
|
|
say("Labor sentence finished, shuttle returning.")
|
|
initiated_launch = TRUE
|
|
return TRUE
|
|
|
|
/obj/machinery/mineral/labor_claim_console/proc/find_labor_shuttle_mobs()
|
|
var/list/prisoners = mobs_in_area_type(list(get_area(src)))
|
|
|
|
// security personnel and nonhumans do not count towards this
|
|
for(var/mob/living/mob as anything in prisoners)
|
|
var/obj/item/card/id/card = mob.get_idcard(FALSE)
|
|
if(!ishuman(mob) || (ACCESS_BRIG in card?.GetAccess()))
|
|
prisoners -= mob
|
|
|
|
return prisoners
|
|
|
|
/obj/machinery/mineral/labor_claim_console/proc/on_laborshuttle_can_move(obj/docking_port/mobile/source)
|
|
SIGNAL_HANDLER
|
|
|
|
if(initiated_launch && length(find_labor_shuttle_mobs()) > 1)
|
|
initiated_launch = FALSE
|
|
say("Takeoff aborted. Prisoners may only be released one at a time.")
|
|
return BLOCK_SHUTTLE_MOVE
|
|
|
|
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
|
|
stacking_machine = locate(/obj/machinery/mineral/stacking_machine) in dview(2, get_turf(src))
|
|
if(stacking_machine)
|
|
stacking_machine.labor_console = src
|
|
|
|
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user, obj/item/card/emag/emag_card)
|
|
if (obj_flags & EMAGGED)
|
|
return FALSE
|
|
|
|
obj_flags |= EMAGGED
|
|
balloon_alert(user, "id authenticator short-circuited")
|
|
visible_message(span_warning("[src] lets out a few sparks!"))
|
|
do_sparks(2, TRUE, src)
|
|
return TRUE
|
|
|
|
/**********************Prisoner Collection Unit**************************/
|
|
|
|
/obj/machinery/mineral/stacking_machine/laborstacker
|
|
name = "labor camp collection unit"
|
|
force_connect = TRUE
|
|
damage_deflection = 21 //otherwise prisoners will destroy it
|
|
///Idle points sitting in the machine left to be claimed.
|
|
var/points = 0
|
|
///Labor claim console synced to our stacking machine, set by the console.
|
|
var/obj/machinery/mineral/labor_claim_console/labor_console
|
|
|
|
/obj/machinery/mineral/stacking_machine/laborstacker/Destroy()
|
|
if(labor_console)
|
|
labor_console.stacking_machine = null
|
|
labor_console = null
|
|
return ..()
|
|
|
|
/obj/machinery/mineral/stacking_machine/laborstacker/process_stack(obj/item/stack/input)
|
|
if (!istype(input, /obj/item/stack/sheet))
|
|
return ..()
|
|
var/obj/item/stack/sheet/sheet = input
|
|
if (sheet.manufactured && sheet.gulag_value)
|
|
points += sheet.gulag_value * sheet.amount
|
|
return ..()
|
|
|
|
/obj/machinery/mineral/stacking_machine/laborstacker/base_item_interaction(mob/living/user, obj/item/weapon, list/modifiers)
|
|
if (is_type_in_typecache(weapon, accepted_types))
|
|
process_stack(weapon)
|
|
return ITEM_INTERACT_SUCCESS
|
|
return ..()
|
|
|
|
/**********************Point Lookup Console**************************/
|
|
|
|
/obj/machinery/mineral/labor_points_checker
|
|
name = "points checking console"
|
|
desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID."
|
|
icon = 'icons/obj/machines/mining_machines.dmi'
|
|
icon_state = "console"
|
|
density = FALSE
|
|
|
|
/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user, list/modifiers)
|
|
. = ..()
|
|
if(. || user.is_blind())
|
|
return
|
|
user.examinate(src)
|
|
|
|
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/weapon, mob/user, list/modifiers, list/attack_modifiers)
|
|
if(!istype(weapon, /obj/item/card/id/advanced/prisoner))
|
|
return ..()
|
|
var/obj/item/card/id/advanced/prisoner/prisoner_id = weapon
|
|
if(!prisoner_id.goal) //no goal to reach
|
|
say("No goal required for this ID.")
|
|
return
|
|
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.")
|
|
|
|
/datum/aas_config_entry/security_labor_stacker
|
|
name = "Security Alert: Labor Camp Release"
|
|
announcement_lines_map = list(
|
|
"Message" = "%PERSON returned to the station. Minerals and Prisoner ID card ready for retrieval."
|
|
)
|
|
vars_and_tooltips_map = list(
|
|
"PERSON" = "will be replaced with the name of the prisoner."
|
|
)
|