mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Re-education campt for naughty players. Glory to Cyberiad!
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/turf/simulated/mineral/random/labormineral
|
||||
mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
|
||||
@@ -0,0 +1,136 @@
|
||||
var/labor_shuttle_tickstomove = 10
|
||||
var/labor_shuttle_moving = 0
|
||||
var/labor_shuttle_location = 0 // 0 = station 13, 1 = labor station
|
||||
|
||||
proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle to the station to the release button.
|
||||
|
||||
if(labor_shuttle_moving) return
|
||||
labor_shuttle_moving = 1
|
||||
spawn(labor_shuttle_tickstomove*10)
|
||||
var/area/fromArea
|
||||
var/area/toArea
|
||||
if (labor_shuttle_location == 1)
|
||||
fromArea = locate(/area/shuttle/siberia/outpost)
|
||||
toArea = locate(/area/shuttle/siberia/station)
|
||||
|
||||
else
|
||||
fromArea = locate(/area/shuttle/siberia/station)
|
||||
toArea = locate(/area/shuttle/siberia/outpost)
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in toArea)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
// NOTE: Commenting this out to avoid recreating mass driver glitch
|
||||
/*
|
||||
spawn(0)
|
||||
AM.throw_at(E, 1, 1)
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
|
||||
bug.gib()
|
||||
|
||||
fromArea.move_contents_to(toArea)
|
||||
if (labor_shuttle_location)
|
||||
labor_shuttle_location = 0
|
||||
else
|
||||
labor_shuttle_location = 1
|
||||
|
||||
for(var/mob/M in toArea)
|
||||
if(M.client)
|
||||
spawn(0)
|
||||
if(M.buckled)
|
||||
shake_camera(M, 3, 1) // buckled, not a lot of shaking
|
||||
else
|
||||
shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!M.buckled)
|
||||
M.Weaken(3)
|
||||
|
||||
labor_shuttle_moving = 0
|
||||
return
|
||||
|
||||
/obj/machinery/computer/labor_shuttle
|
||||
name = "Labor Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
circuit = "/obj/item/weapon/circuitboard/labor_shuttle"
|
||||
var/location = 0 //0 = station, 1 = labor camp
|
||||
req_access = list(access_brig)
|
||||
var/hacked = 0
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center><A href='?src=\ref[src];move=[1]'>Send Labor Shuttle</A></center>")
|
||||
//user << browse("[dat]", "window=laborshuttle;size=200x100")
|
||||
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/Topic(href, href_list)
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(!allowed(usr))
|
||||
usr << "\red Access denied."
|
||||
return
|
||||
if (!labor_shuttle_moving)
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
move_labor_shuttle()
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
src.req_access = list()
|
||||
hacked = 1
|
||||
usr << "You fried the consoles ID checking system. It's now available to everyone!"
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/one_way
|
||||
name = "Prisoner Shuttle Console"
|
||||
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
|
||||
circuit = "/obj/item/weapon/circuitboard/one_way_shuttle"
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/one_way/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center><A href='?src=\ref[src];move=[1]'>Summon Labor Shuttle</A></center>")
|
||||
//user << browse("[dat]", "window=laborshuttle;size=200x100")
|
||||
var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/labor_shuttle/one_way/Topic(href, href_list)
|
||||
if(href_list["move"] && labor_shuttle_location == 1)
|
||||
usr << "\blue Shuttle is already at the outpost."
|
||||
return
|
||||
..()
|
||||
@@ -0,0 +1,115 @@
|
||||
/**********************Prisoners' Console**************************/
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console
|
||||
name = "Point Claim Console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/stacking_machine/laborstacker/machine = null
|
||||
var/machinedir = SOUTH
|
||||
var/obj/item/weapon/card/id/prisoner/inserted_id
|
||||
var/obj/machinery/door/airlock/release_door
|
||||
var/door_tag = "prisonshuttle"
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
var/t
|
||||
for(var/obj/machinery/door/airlock/d in range(5,src))
|
||||
t = d.id_tag
|
||||
if(t == src.door_tag)
|
||||
src.release_door = d
|
||||
if (machine && release_door)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob)
|
||||
var/dat
|
||||
dat += text("<b>Point Claim Console</b><br><br>")
|
||||
if(emagged)
|
||||
dat += text("<b>QU&#t0A In%aL*D</b><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=3'>Proceed to Station.</A><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=4'>Open release door.</A><br>")
|
||||
if(istype(inserted_id))
|
||||
var/p = inserted_id.points
|
||||
var/g = inserted_id.goal
|
||||
dat += text("[p] / [g] collected. <A href='?src=\ref[src];choice=1'>Eject ID.</A><br>")
|
||||
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=2'>Claim points.</A><br>")
|
||||
if(p >= g)
|
||||
dat += text("<b>Quota met.</b><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=3'>Proceed to Station.</A><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=4'>Open release door.</A><br>")
|
||||
else
|
||||
dat += text("No ID inserted. <A href='?src=\ref[src];choice=0'>Insert ID.</A><br>")
|
||||
|
||||
|
||||
user << browse("[dat]", "window=console_stacking_machine")
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/card/emag))
|
||||
emagged = 1
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/card/id))
|
||||
return attack_hand(user)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/Topic(href, href_list)
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("0")
|
||||
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
else usr << "\red No valid ID."
|
||||
if("1")
|
||||
inserted_id.loc = get_step(src,get_turf(usr))
|
||||
inserted_id = null
|
||||
if("2")
|
||||
inserted_id.points += machine.points
|
||||
machine.points = 0
|
||||
usr << "Points transferred."
|
||||
if("3")
|
||||
if(labor_shuttle_location == 1)
|
||||
if (!labor_shuttle_moving)
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
move_labor_shuttle()
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
else
|
||||
usr << "\blue Shuttle is already on-station."
|
||||
if("4")
|
||||
if(release_door.density)
|
||||
release_door.open()
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/**********************Prisoner Collection Unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker
|
||||
var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity. Iron = 1; Diamond = 25.
|
||||
var/list/ore_values = list(("metal" = 1), ("diamond" = 25), ("solid plasma" = 2), ("gold" = 5), ("silver" = 5), ("bananium" = 9999), ("uranium" = 5), ("glass" = 1), ("reinforced glass" = 2), ("plasteel" = 3))
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(istype(inp))
|
||||
var/n = inp.name
|
||||
var/a = inp.amount
|
||||
if(n in ore_values)
|
||||
points += ore_values[n] * a
|
||||
..()
|
||||
@@ -18,57 +18,23 @@
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/process()
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(user as mob)
|
||||
|
||||
var/obj/item/stack/sheet/s
|
||||
var/dat
|
||||
|
||||
dat += text("<b>Stacking unit console</b><br><br>")
|
||||
|
||||
if(machine.ore_iron)
|
||||
dat += text("Iron: [machine.ore_iron] <A href='?src=\ref[src];release=iron'>Release</A><br>")
|
||||
if(machine.ore_plasteel)
|
||||
dat += text("Plasteel: [machine.ore_plasteel] <A href='?src=\ref[src];release=plasteel'>Release</A><br>")
|
||||
if(machine.ore_glass)
|
||||
dat += text("Glass: [machine.ore_glass] <A href='?src=\ref[src];release=glass'>Release</A><br>")
|
||||
if(machine.ore_rglass)
|
||||
dat += text("Reinforced Glass: [machine.ore_rglass] <A href='?src=\ref[src];release=rglass'>Release</A><br>")
|
||||
if(machine.ore_plasma)
|
||||
dat += text("Plasma: [machine.ore_plasma] <A href='?src=\ref[src];release=plasma'>Release</A><br>")
|
||||
if(machine.ore_gold)
|
||||
dat += text("Gold: [machine.ore_gold] <A href='?src=\ref[src];release=gold'>Release</A><br>")
|
||||
if(machine.ore_silver)
|
||||
dat += text("Silver: [machine.ore_silver] <A href='?src=\ref[src];release=silver'>Release</A><br>")
|
||||
if(machine.ore_uranium)
|
||||
dat += text("Uranium: [machine.ore_uranium] <A href='?src=\ref[src];release=uranium'>Release</A><br>")
|
||||
if(machine.ore_diamond)
|
||||
dat += text("Diamond: [machine.ore_diamond] <A href='?src=\ref[src];release=diamond'>Release</A><br>")
|
||||
if(machine.ore_wood)
|
||||
dat += text("Wood: [machine.ore_wood] <A href='?src=\ref[src];release=wood'>Release</A><br>")
|
||||
if(machine.ore_cardboard)
|
||||
dat += text("Cardboard: [machine.ore_cardboard] <A href='?src=\ref[src];release=cardboard'>Release</A><br>")
|
||||
if(machine.ore_cloth)
|
||||
dat += text("Cloth: [machine.ore_cloth] <A href='?src=\ref[src];release=cloth'>Release</A><br>")
|
||||
if(machine.ore_leather)
|
||||
dat += text("Leather: [machine.ore_leather] <A href='?src=\ref[src];release=leather'>Release</A><br>")
|
||||
if(machine.ore_clown)
|
||||
dat += text("Bananium: [machine.ore_clown] <A href='?src=\ref[src];release=clown'>Release</A><br>")
|
||||
if(machine.ore_adamantine)
|
||||
dat += text ("Adamantine: [machine.ore_adamantine] <A href='?src=\ref[src];release=adamantine'>Release</A><br>")
|
||||
if(machine.ore_mythril)
|
||||
dat += text ("Mythril: [machine.ore_mythril] <A href='?src=\ref[src];release=adamantine'>Release</A><br>")
|
||||
for(var/O in machine.stack_list)
|
||||
s = machine.stack_list[O]
|
||||
if(s.amount > 0)
|
||||
dat += text("[s.name]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
|
||||
|
||||
dat += text("<br>Stacking: [machine.stack_amt]<br><br>")
|
||||
|
||||
user << browse("[dat]", "window=console_stacking_machine")
|
||||
onclose(user, "console_stacking_machine")
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -76,103 +42,13 @@
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["release"])
|
||||
switch(href_list["release"])
|
||||
if ("plasma")
|
||||
if (machine.ore_plasma > 0)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma
|
||||
G.amount = machine.ore_plasma
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_plasma = 0
|
||||
if ("uranium")
|
||||
if (machine.ore_uranium > 0)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium
|
||||
G.amount = machine.ore_uranium
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_uranium = 0
|
||||
if ("glass")
|
||||
if (machine.ore_glass > 0)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass
|
||||
G.amount = machine.ore_glass
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_glass = 0
|
||||
if ("rglass")
|
||||
if (machine.ore_rglass > 0)
|
||||
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass
|
||||
G.amount = machine.ore_rglass
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_rglass = 0
|
||||
if ("gold")
|
||||
if (machine.ore_gold > 0)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold
|
||||
G.amount = machine.ore_gold
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_gold = 0
|
||||
if ("silver")
|
||||
if (machine.ore_silver > 0)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver
|
||||
G.amount = machine.ore_silver
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_silver = 0
|
||||
if ("diamond")
|
||||
if (machine.ore_diamond > 0)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond
|
||||
G.amount = machine.ore_diamond
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_diamond = 0
|
||||
if ("iron")
|
||||
if (machine.ore_iron > 0)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal
|
||||
G.amount = machine.ore_iron
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_iron = 0
|
||||
if ("plasteel")
|
||||
if (machine.ore_plasteel > 0)
|
||||
var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel
|
||||
G.amount = machine.ore_plasteel
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_plasteel = 0
|
||||
if ("wood")
|
||||
if (machine.ore_wood > 0)
|
||||
var/obj/item/stack/sheet/wood/G = new /obj/item/stack/sheet/wood
|
||||
G.amount = machine.ore_wood
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_wood = 0
|
||||
if ("cardboard")
|
||||
if (machine.ore_cardboard > 0)
|
||||
var/obj/item/stack/sheet/cardboard/G = new /obj/item/stack/sheet/cardboard
|
||||
G.amount = machine.ore_cardboard
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_cardboard = 0
|
||||
if ("cloth")
|
||||
if (machine.ore_cloth > 0)
|
||||
var/obj/item/stack/sheet/cloth/G = new /obj/item/stack/sheet/cloth
|
||||
G.amount = machine.ore_cloth
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_cloth = 0
|
||||
if ("leather")
|
||||
if (machine.ore_leather > 0)
|
||||
var/obj/item/stack/sheet/leather/G = new /obj/item/stack/sheet/leather
|
||||
G.amount = machine.ore_diamond
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_leather = 0
|
||||
if ("clown")
|
||||
if (machine.ore_clown > 0)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown
|
||||
G.amount = machine.ore_clown
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_clown = 0
|
||||
if ("adamantine")
|
||||
if (machine.ore_adamantine > 0)
|
||||
var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine
|
||||
G.amount = machine.ore_adamantine
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_adamantine = 0
|
||||
if ("mythril")
|
||||
if (machine.ore_mythril > 0)
|
||||
var/obj/item/stack/sheet/mineral/mythril/G = new /obj/item/stack/sheet/mineral/mythril
|
||||
G.amount = machine.ore_mythril
|
||||
G.loc = machine.output.loc
|
||||
machine.ore_mythril = 0
|
||||
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
out.amount = inp.amount
|
||||
inp.amount = 0
|
||||
out.loc = machine.output.loc
|
||||
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -191,22 +67,7 @@
|
||||
var/stk_amt = list()
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/ore_gold = 0;
|
||||
var/ore_silver = 0;
|
||||
var/ore_diamond = 0;
|
||||
var/ore_plasma = 0;
|
||||
var/ore_iron = 0;
|
||||
var/ore_uranium = 0;
|
||||
var/ore_clown = 0;
|
||||
var/ore_glass = 0;
|
||||
var/ore_rglass = 0;
|
||||
var/ore_plasteel = 0;
|
||||
var/ore_wood = 0
|
||||
var/ore_cardboard = 0
|
||||
var/ore_cloth = 0;
|
||||
var/ore_leather = 0;
|
||||
var/ore_adamantine = 0;
|
||||
var/ore_mythril = 0;
|
||||
var/stack_list[0] //Key: Type. Value: Instance of type.
|
||||
var/stack_amt = 50; //ammount to stack before releassing
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
@@ -218,177 +79,32 @@
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
if(!istype(output) || !istype(input))
|
||||
del(src)
|
||||
return
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(!istype(inp)) //Non-sheets. Yuck.
|
||||
return
|
||||
if(!(inp.type in stack_list)) //It's the first of this sheet added
|
||||
stack_list[inp.type] = new inp.type(src,0)
|
||||
var/obj/item/stack/sheet/storage = stack_list[inp.type]
|
||||
storage.amount += inp.amount //Stack the sheets
|
||||
inp.loc = null //Let the old sheet garbage collect
|
||||
while(storage.amount > stack_amt) //Get rid of excessive stackage
|
||||
var/obj/item/stack/sheet/out = new input.type()
|
||||
out.amount = stack_amt
|
||||
out.loc = output.loc
|
||||
storage.amount -= stack_amt
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
if (src.output && src.input)
|
||||
var/obj/item/O
|
||||
while (locate(/obj/item, input.loc))
|
||||
O = locate(/obj/item, input.loc)
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
ore_iron+= O:amount;
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
ore_diamond+= O:amount;
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
|
||||
ore_plasma+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
ore_gold+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
ore_silver+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/clown))
|
||||
ore_clown+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
ore_uranium+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/glass))
|
||||
ore_glass+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/rglass))
|
||||
ore_rglass+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/plasteel))
|
||||
ore_plasteel+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
|
||||
ore_adamantine+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/mythril))
|
||||
ore_mythril+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/cardboard))
|
||||
ore_cardboard+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/wood))
|
||||
ore_wood+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/cloth))
|
||||
ore_cloth+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/leather))
|
||||
ore_leather+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/slag))
|
||||
del(O)
|
||||
continue
|
||||
O.loc = src.output.loc
|
||||
if (ore_gold >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_gold -= stack_amt
|
||||
return
|
||||
if (ore_silver >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_silver -= stack_amt
|
||||
return
|
||||
if (ore_diamond >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_diamond -= stack_amt
|
||||
return
|
||||
if (ore_plasma >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_plasma -= stack_amt
|
||||
return
|
||||
if (ore_iron >= stack_amt)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_iron -= stack_amt
|
||||
return
|
||||
if (ore_clown >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_clown -= stack_amt
|
||||
return
|
||||
if (ore_uranium >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_uranium -= stack_amt
|
||||
return
|
||||
if (ore_glass >= stack_amt)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_glass -= stack_amt
|
||||
return
|
||||
if (ore_rglass >= stack_amt)
|
||||
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_rglass -= stack_amt
|
||||
return
|
||||
if (ore_plasteel >= stack_amt)
|
||||
var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_plasteel -= stack_amt
|
||||
return
|
||||
if (ore_wood >= stack_amt)
|
||||
var/obj/item/stack/sheet/wood/G = new /obj/item/stack/sheet/wood
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_wood -= stack_amt
|
||||
return
|
||||
if (ore_cardboard >= stack_amt)
|
||||
var/obj/item/stack/sheet/cardboard/G = new /obj/item/stack/sheet/cardboard
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_cardboard -= stack_amt
|
||||
return
|
||||
if (ore_cloth >= stack_amt)
|
||||
var/obj/item/stack/sheet/cloth/G = new /obj/item/stack/sheet/cloth
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_cloth -= stack_amt
|
||||
return
|
||||
if (ore_leather >= stack_amt)
|
||||
var/obj/item/stack/sheet/leather/G = new /obj/item/stack/sheet/leather
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_leather -= stack_amt
|
||||
return
|
||||
if (ore_adamantine >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_adamantine -= stack_amt
|
||||
return
|
||||
if (ore_mythril >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/mythril/G = new /obj/item/stack/sheet/mineral/mythril
|
||||
G.amount = stack_amt
|
||||
G.loc = output.loc
|
||||
ore_mythril -= stack_amt
|
||||
return
|
||||
var/obj/item/stack/sheet/O
|
||||
while (locate(/obj/item/stack/sheet, input.loc))
|
||||
O = locate(/obj/item/stack/sheet, input.loc)
|
||||
if(istype(O,/obj/item/stack/sheet))
|
||||
process_sheet(O)
|
||||
return
|
||||
|
||||
@@ -167,6 +167,7 @@ var/list/artifact_spawning_turfs = list()
|
||||
M = new/turf/simulated/mineral/uranium(src)
|
||||
if("Iron")
|
||||
M = new/turf/simulated/mineral/iron(src)
|
||||
M.icon_state = "rock_Iron[rand(1,3)]"
|
||||
if("Diamond")
|
||||
M = new/turf/simulated/mineral/diamond(src)
|
||||
if("Gold")
|
||||
@@ -175,6 +176,7 @@ var/list/artifact_spawning_turfs = list()
|
||||
M = new/turf/simulated/mineral/silver(src)
|
||||
if("Plasma")
|
||||
M = new/turf/simulated/mineral/plasma(src)
|
||||
M.icon_state = "rock_Plasma[rand(1,3)]"
|
||||
/*if("Adamantine")
|
||||
M = new/turf/simulated/mineral/adamantine(src)*/
|
||||
if(M)
|
||||
@@ -212,7 +214,7 @@ var/list/artifact_spawning_turfs = list()
|
||||
|
||||
/turf/simulated/mineral/iron
|
||||
name = "Iron deposit"
|
||||
icon_state = "rock_Iron"
|
||||
icon_state = "rock_Iron1"
|
||||
mineralName = "Iron"
|
||||
mineralAmt = 5
|
||||
spreadChance = 25
|
||||
@@ -248,7 +250,7 @@ var/list/artifact_spawning_turfs = list()
|
||||
|
||||
/turf/simulated/mineral/plasma
|
||||
name = "Plasma deposit"
|
||||
icon_state = "rock_Plasma"
|
||||
icon_state = "rock_Plasma1"
|
||||
mineralName = "Plasma"
|
||||
mineralAmt = 5
|
||||
spreadChance = 25
|
||||
|
||||
Reference in New Issue
Block a user