mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into mineral_economy
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
var/obj/item/stack/sheet/M = O.refined_type
|
||||
points += O.points
|
||||
return M
|
||||
del(O)//No refined type? Purge it.
|
||||
qdel(O)//No refined type? Purge it.
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attack_hand(user as mob)
|
||||
@@ -262,7 +262,7 @@
|
||||
new /obj/item/weapon/weldingtool/hugetank(src.loc)
|
||||
if("Cancel")
|
||||
return
|
||||
del(voucher)
|
||||
qdel(voucher)
|
||||
|
||||
/obj/machinery/mineral/equipment_locker/ex_act()
|
||||
return
|
||||
@@ -335,7 +335,7 @@
|
||||
J.target = chosen_beacon
|
||||
try_move_adjacent(J)
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/portal/wormhole/jaunt_tunnel
|
||||
name = "jaunt tunnel"
|
||||
@@ -413,7 +413,7 @@
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
M.gets_drilled()
|
||||
spawn(5)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
@@ -431,7 +431,7 @@
|
||||
for(var/mob/living/L in src.loc)
|
||||
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
|
||||
L.adjustBruteLoss(resonance_damage)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/**********************Facehugger toy**********************/
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
DropOre()
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/New()
|
||||
@@ -694,4 +694,4 @@
|
||||
name = "mining jetpack"
|
||||
icon_state = "jetpack-mining"
|
||||
item_state = "jetpack-mining"
|
||||
desc = "A tank of compressed carbon dioxide for miners to use as propulsion in local space. Should not be used for internals."
|
||||
desc = "A tank of compressed carbon dioxide for miners to use as propulsion in local space. Should not be used for internals."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/turf/simulated/mineral/random/labormineral
|
||||
mineralSpawnChanceList = list("Uranium" = 1, "Iron" = 100, "Diamond" = 1, "Gold" = 1, "Silver" = 1, "Plasma" = 1/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
|
||||
icon_state = "rock_labor"
|
||||
|
||||
/turf/simulated/mineral/random/labormineral/New()
|
||||
icon_state = "rock"
|
||||
/turf/simulated/mineral/random/labormineral
|
||||
mineralSpawnChanceList = list("Uranium" = 1, "Iron" = 100, "Diamond" = 1, "Gold" = 1, "Silver" = 1, "Plasma" = 1/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
|
||||
icon_state = "rock_labor"
|
||||
|
||||
/turf/simulated/mineral/random/labormineral/New()
|
||||
icon_state = "rock"
|
||||
..()
|
||||
@@ -1,22 +1,22 @@
|
||||
/obj/machinery/computer/shuttle/labor
|
||||
name = "Labor Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
circuit = /obj/item/weapon/circuitboard/labor_shuttle
|
||||
id = "laborcamp"
|
||||
req_access = list(access_brig)
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/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/labor_shuttle/one_way
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
usr << "\blue Shuttle is already at the outpost."
|
||||
return 0
|
||||
/obj/machinery/computer/shuttle/labor
|
||||
name = "Labor Shuttle Console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
circuit = /obj/item/weapon/circuitboard/labor_shuttle
|
||||
id = "laborcamp"
|
||||
req_access = list(access_brig)
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/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/labor_shuttle/one_way
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
usr << "\blue Shuttle is already at the outpost."
|
||||
return 0
|
||||
..()
|
||||
@@ -1,139 +1,139 @@
|
||||
/**********************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."
|
||||
name = "stacking machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
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/proc/check_auth()
|
||||
if(emagged) return 1 //Shuttle is emagged, let any ol' person through
|
||||
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob)
|
||||
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 = 0
|
||||
anchored = 1
|
||||
var/dat
|
||||
dat += text("<b>Point Claim Console</b><br><br>")
|
||||
if(emagged) //Shit's broken
|
||||
dat += text("<b>QU&#t0A In%aL*D</b><br>")
|
||||
else if(istype(inserted_id)) //There's an ID in there.
|
||||
dat += text("[inserted_id.points] / [inserted_id.goal] collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
|
||||
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
|
||||
else //No ID in sight. Complain about it.
|
||||
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
|
||||
if(check_auth())
|
||||
dat += text("<A href='?src=\ref[src];choice=station'>Proceed to Station.</A><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=release'>Open release door.</A><br>")
|
||||
if(machine)
|
||||
dat += text("<HR><b>Mineral Value List:</b><BR>[machine.get_ore_values()]")
|
||||
|
||||
|
||||
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"])
|
||||
if(istype(inserted_id)) //Sanity check against href spoofs
|
||||
if(href_list["choice"] == "eject")
|
||||
inserted_id.loc = loc
|
||||
inserted_id.verb_pickup()
|
||||
inserted_id = null
|
||||
if(href_list["choice"] == "claim")
|
||||
inserted_id.points += machine.points
|
||||
machine.points = 0
|
||||
src << "Points transferred."
|
||||
else if(href_list["choice"] == "insert")
|
||||
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(check_auth()) //Sanity check against hef spoofs
|
||||
if(href_list["choice"] == "station")
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if (s.move_shuttle(0)) // No delay, to stop people from getting on while it is departing.
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
else
|
||||
usr << "\blue Shuttle is already on-station."
|
||||
if(href_list["choice"] == "release")
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if(release_door.density)
|
||||
release_door.open()
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
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.
|
||||
var/list/ore_values = list(("glass" = 1), ("metal" = 2), ("solid plasma" = 20), ("plasteel" = 23), ("reinforced glass" = 4), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("diamond" = 25), ("bananium" = 50))
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/proc/get_ore_values()
|
||||
var/dat = "<table border='0' width='200'>"
|
||||
for(var/ore in ore_values)
|
||||
var/value = ore_values[ore]
|
||||
dat += "<tr><td>[capitalize(ore)]</td><td>[value]</td></tr>"
|
||||
dat += "</table>"
|
||||
return dat
|
||||
|
||||
/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
|
||||
/**********************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."
|
||||
name = "stacking machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
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
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
|
||||
if(emagged) return 1 //Shuttle is emagged, let any ol' person through
|
||||
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob)
|
||||
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 = 0
|
||||
anchored = 1
|
||||
var/dat
|
||||
dat += text("<b>Point Claim Console</b><br><br>")
|
||||
if(emagged) //Shit's broken
|
||||
dat += text("<b>QU&#t0A In%aL*D</b><br>")
|
||||
else if(istype(inserted_id)) //There's an ID in there.
|
||||
dat += text("[inserted_id.points] / [inserted_id.goal] collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
|
||||
dat += text("Unclaimed Collection Points: [machine.points]. <A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
|
||||
else //No ID in sight. Complain about it.
|
||||
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
|
||||
if(check_auth())
|
||||
dat += text("<A href='?src=\ref[src];choice=station'>Proceed to Station.</A><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=release'>Open release door.</A><br>")
|
||||
if(machine)
|
||||
dat += text("<HR><b>Mineral Value List:</b><BR>[machine.get_ore_values()]")
|
||||
|
||||
|
||||
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"])
|
||||
if(istype(inserted_id)) //Sanity check against href spoofs
|
||||
if(href_list["choice"] == "eject")
|
||||
inserted_id.loc = loc
|
||||
inserted_id.verb_pickup()
|
||||
inserted_id = null
|
||||
if(href_list["choice"] == "claim")
|
||||
inserted_id.points += machine.points
|
||||
machine.points = 0
|
||||
src << "Points transferred."
|
||||
else if(href_list["choice"] == "insert")
|
||||
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(check_auth()) //Sanity check against hef spoofs
|
||||
if(href_list["choice"] == "station")
|
||||
var/datum/shuttle_manager/s = shuttles["laborcamp"]
|
||||
if(s.location == /area/shuttle/laborcamp/outpost)
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if (s.move_shuttle(0)) // No delay, to stop people from getting on while it is departing.
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
else
|
||||
usr << "\blue Shuttle is already on-station."
|
||||
if(href_list["choice"] == "release")
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
if(release_door.density)
|
||||
release_door.open()
|
||||
else
|
||||
usr << "\red Prisoners are only allowed to be released while alone."
|
||||
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.
|
||||
var/list/ore_values = list(("glass" = 1), ("metal" = 2), ("solid plasma" = 20), ("plasteel" = 23), ("reinforced glass" = 4), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("diamond" = 25), ("bananium" = 50))
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/proc/get_ore_values()
|
||||
var/dat = "<table border='0' width='200'>"
|
||||
for(var/ore in ore_values)
|
||||
var/value = ore_values[ore]
|
||||
dat += "<tr><td>[capitalize(ore)]</td><td>[value]</td></tr>"
|
||||
dat += "</table>"
|
||||
return dat
|
||||
|
||||
/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
|
||||
..()
|
||||
@@ -16,7 +16,7 @@
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(user as mob)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(user as mob)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
has_gravity = 1
|
||||
|
||||
/area/mine/explored
|
||||
name = "Mine"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(15))
|
||||
new refined_type(get_turf(src.loc))
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='info'>Not enough fuel to smelt [src].</span>"
|
||||
..()
|
||||
@@ -43,10 +43,10 @@
|
||||
var/sandAmt = 1 // The sand we're holding
|
||||
for(var/obj/item/weapon/ore/glass/sandToConvert in location) // The sand on the floor
|
||||
sandAmt += 1
|
||||
del(sandToConvert)
|
||||
qdel(sandToConvert)
|
||||
var/obj/item/stack/sheet/mineral/newSandstone = new /obj/item/stack/sheet/mineral/sandstone(location)
|
||||
newSandstone.amount = sandAmt
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/plasma
|
||||
name = "Plasma ore"
|
||||
@@ -158,7 +158,7 @@
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
if(quality == 1)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
if(CC.amount <= 0)
|
||||
user << "\blue This cable coil appears to be empty."
|
||||
del(CC)
|
||||
qdel(CC)
|
||||
return
|
||||
|
||||
overlays += image('icons/obj/economy.dmi',"coin_string_overlay")
|
||||
|
||||
Reference in New Issue
Block a user