diff --git a/code/game/machinery/prisonlabor.dm b/code/game/machinery/prisonlabor.dm new file mode 100644 index 0000000000..b76a62a6be --- /dev/null +++ b/code/game/machinery/prisonlabor.dm @@ -0,0 +1,66 @@ +/obj/machinery/plate_press + name = "license plate press" + desc = "You know, we're making a lot of license plates for a station with literaly no cars in it." + icon = 'icons/obj/machines/prison.dmi' + icon_state = "offline" + use_power = IDLE_POWER_USE + idle_power_usage = 2 + active_power_usage = 50 + var/obj/item/stack/license_plates/empty/current_plate + var/pressing = FALSE + +/obj/machinery/plate_press/update_icon() + . = ..() + if(!is_operational()) + icon_state = "offline" + else if(pressing) + icon_state = "loop" + else if(current_plate) + icon_state = "online_loaded" + else + icon_state = "online" + +/obj/machinery/plate_press/Destroy() + QDEL_NULL(current_plate) + . = ..() + +/obj/machinery/plate_press/attackby(obj/item/I, mob/living/user, params) + if(!is_operational()) + to_chat(user, "[src] has to be on to do this!") + return FALSE + if(pressing) + to_chat(user, "[src] already has a plate in it!") + return FALSE + if(istype(I, /obj/item/stack/license_plates/empty)) + var/obj/item/stack/license_plates/empty/plate = I + plate.use(1) + current_plate = new plate.type(src, 1) //Spawn a new single sheet in the machine + update_icon() + else + return ..() + +/obj/machinery/plate_press/attack_hand(mob/living/user) + . = ..() + if(!pressing && current_plate) + work_press(user) + +///This proc attempts to create a plate. User cannot move during this process. +/obj/machinery/plate_press/proc/work_press(mob/living/user) + + pressing = TRUE + update_icon() + to_chat(user, "You start pressing a new license plate!") + + if(!do_after(user, 40, target = src)) + pressing = FALSE + update_icon() + return FALSE + + use_power(100) + to_chat(user, "You finish pressing a new license plate!") + + pressing = FALSE + QDEL_NULL(current_plate) + update_icon() + + new /obj/item/stack/license_plates/filled(drop_location(), 1) diff --git a/code/game/objects/items/stacks/license_plates.dm b/code/game/objects/items/stacks/license_plates.dm new file mode 100644 index 0000000000..06dc86ee61 --- /dev/null +++ b/code/game/objects/items/stacks/license_plates.dm @@ -0,0 +1,30 @@ +/obj/item/stack/license_plates + name = "invalid plate" + desc = "someone fucked up" + icon = 'icons/obj/machines/prison.dmi' + icon_state = "empty_plate" + novariants = FALSE + max_amount = 50 + +/obj/item/stack/license_plates/empty + name = "empty license plate" + desc = "Instead of a license plate number, this could contain a quote like \"Live laugh love\"." + +/obj/item/stack/license_plates/empty/fifty + amount = 50 + +/obj/item/stack/license_plates/filled + name = "license plate" + desc = "Prison labor paying off." + icon_state = "filled_plate_1_1" + +///Override to allow for variations +/obj/item/stack/license_plates/filled/update_icon_state() + if(novariants) + return + if(amount <= (max_amount * (1/3))) + icon_state = "filled_plate_[rand(1,6)]_1" + else if (amount <= (max_amount * (2/3))) + icon_state = "filled_plate_[rand(1,6)]_2" + else + icon_state = "filled_plate_[rand(1,6)]_3" diff --git a/code/modules/jobs/job_types/prisoner.dm b/code/modules/jobs/job_types/prisoner.dm new file mode 100644 index 0000000000..67b2b2c020 --- /dev/null +++ b/code/modules/jobs/job_types/prisoner.dm @@ -0,0 +1,24 @@ +datum/job/prisoner + title = "Prisoner" + flag = PRISONER + department_head = list("The Security Team") + department_flag = CIVILIAN + faction = "Station" + total_positions = 2 + spawn_positions = 2 + supervisors = "the security team" + + outfit = /datum/outfit/job/prisoner + plasma_outfit = /datum/outfit/plasmaman/prisoner + + display_order = JOB_DISPLAY_ORDER_PRISONER + +/datum/outfit/job/prisoner + name = "Prisoner" + jobtype = /datum/job/prisoner + + uniform = /obj/item/clothing/under/rank/prisoner + shoes = /obj/item/clothing/shoes/sneakers/orange + id = /obj/item/card/id/prisoner + ears = null + belt = null diff --git a/icons/obj/machines/prison.dmi b/icons/obj/machines/prison.dmi new file mode 100644 index 0000000000..7ce58e93a2 Binary files /dev/null and b/icons/obj/machines/prison.dmi differ