Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into xenoarch

Conflicts:
	baystation12.dme
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Machinery.dm
	code/modules/research/xenoarchaeology/artifact_effect.dm
	code/modules/research/xenoarchaeology/finds.dm
	icons/obj/device.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-02 16:55:24 +10:00
1196 changed files with 105274 additions and 74852 deletions

View File

@@ -120,7 +120,7 @@
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["sel_iron"])
if (href_list["sel_iron"] == "yes")
@@ -237,35 +237,35 @@
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_gold > 0)
ore_gold--;
new /obj/item/stack/sheet/gold(output.loc)
new /obj/item/stack/sheet/mineral/gold(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_silver > 0)
ore_silver--;
new /obj/item/stack/sheet/silver(output.loc)
new /obj/item/stack/sheet/mineral/silver(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_diamond > 0)
ore_diamond--;
new /obj/item/stack/sheet/diamond(output.loc)
new /obj/item/stack/sheet/mineral/diamond(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_plasma > 0)
ore_plasma--;
new /obj/item/stack/sheet/plasma(output.loc)
new /obj/item/stack/sheet/mineral/plasma(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
if (ore_uranium > 0)
ore_uranium--;
new /obj/item/stack/sheet/uranium(output.loc)
new /obj/item/stack/sheet/mineral/uranium(output.loc)
else
on = 0
continue
@@ -287,7 +287,7 @@
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
if (ore_clown > 0)
ore_clown--;
new /obj/item/stack/sheet/clown(output.loc)
new /obj/item/stack/sheet/mineral/clown(output.loc)
else
on = 0
continue
@@ -297,7 +297,7 @@
if (ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
ore_diamond -= 1
new /obj/item/stack/sheet/adamantine(output.loc)
new /obj/item/stack/sheet/mineral/adamantine(output.loc)
else
on = 0
continue
@@ -305,7 +305,7 @@
if (ore_silver >= 1 && ore_plasma >= 3)
ore_silver -= 1
ore_plasma -= 3
new /obj/item/stack/sheet/mythril(output.loc)
new /obj/item/stack/sheet/mineral/mythril(output.loc)
else
on = 0
continue*/

View File

@@ -64,19 +64,19 @@
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
if(..())
return
usr.machine = src
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/plasma/G = new /obj/item/stack/sheet/plasma
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/uranium/G = new /obj/item/stack/sheet/uranium
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
@@ -94,19 +94,19 @@
machine.ore_rglass = 0
if ("gold")
if (machine.ore_gold > 0)
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold
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/silver/G = new /obj/item/stack/sheet/silver
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/diamond/G = new /obj/item/stack/sheet/diamond
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
@@ -148,19 +148,19 @@
machine.ore_leather = 0
if ("clown")
if (machine.ore_clown > 0)
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown
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/adamantine/G = new /obj/item/stack/sheet/adamantine
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/mythril/G = new /obj/item/stack/sheet/mythril
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
@@ -222,27 +222,27 @@
ore_iron+= O:amount;
del(O)
continue
if (istype(O,/obj/item/stack/sheet/diamond))
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
ore_diamond+= O:amount;
del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasma))
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
ore_plasma+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/gold))
if (istype(O,/obj/item/stack/sheet/mineral/gold))
ore_gold+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/silver))
if (istype(O,/obj/item/stack/sheet/mineral/silver))
ore_silver+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/clown))
if (istype(O,/obj/item/stack/sheet/mineral/clown))
ore_clown+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/uranium))
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
ore_uranium+= O:amount
del(O)
continue
@@ -258,11 +258,11 @@
ore_plasteel+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/adamantine))
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
ore_adamantine+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/mythril))
if (istype(O,/obj/item/stack/sheet/mineral/mythril))
ore_mythril+= O:amount
del(O)
continue
@@ -287,25 +287,25 @@
continue
O.loc = src.output.loc
if (ore_gold >= stack_amt)
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold
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/silver/G = new /obj/item/stack/sheet/silver
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/diamond/G = new /obj/item/stack/sheet/diamond
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/plasma/G = new /obj/item/stack/sheet/plasma
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
@@ -317,13 +317,13 @@
ore_iron -= stack_amt
return
if (ore_clown >= stack_amt)
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown
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/uranium/G = new /obj/item/stack/sheet/uranium
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
@@ -371,13 +371,13 @@
ore_leather -= stack_amt
return
if (ore_adamantine >= stack_amt)
var/obj/item/stack/sheet/adamantine/G = new /obj/item/stack/sheet/adamantine
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/mythril/G = new /obj/item/stack/sheet/mythril
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

View File

@@ -2,16 +2,15 @@
/area/mine
icon_state = "mining"
music = 'sound/ambience/song_game.ogg'
/area/mine/explored
name = "Mine"
icon_state = "explored"
music = null
/area/mine/unexplored
name = "Mine"
icon_state = "unexplored"
music = null
/area/mine/lobby
name = "Mining station"

View File

@@ -26,12 +26,12 @@
new /obj/item/weapon/storage/backpack/industrial(src)
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/device/radio/headset/headset_mine(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/under/rank/miner(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/device/analyzer(src)
new /obj/item/weapon/storage/satchel(src)
new /obj/item/weapon/storage/bag/ore(src)
new /obj/item/device/flashlight/lantern(src)
new /obj/item/weapon/shovel(src)
new /obj/item/weapon/pickaxe(src)
@@ -53,11 +53,11 @@ proc/move_mining_shuttle()
if (mining_shuttle_location == 1)
fromArea = locate(/area/shuttle/mining/outpost)
toArea = locate(/area/shuttle/mining/station)
else
fromArea = locate(/area/shuttle/mining/station)
toArea = locate(/area/shuttle/mining/outpost)
var/list/dstturfs = list()
var/throwy = world.maxy
@@ -91,6 +91,18 @@ proc/move_mining_shuttle()
mining_shuttle_location = 0
else
mining_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)
mining_shuttle_moving = 0
return
@@ -104,6 +116,8 @@ proc/move_mining_shuttle()
var/location = 0 //0 = station, 1 = mining base
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat
dat = text("<center>Mining shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
@@ -112,7 +126,7 @@ proc/move_mining_shuttle()
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["move"])
if(ticker.mode.name == "blob")
@@ -288,6 +302,3 @@ proc/move_mining_shuttle()
icon_opened = "miningcaropen"
icon_closed = "miningcar"

View File

@@ -193,6 +193,8 @@
spreadChance = 0
spread = 0
/*
commented out in r5061, I left it because of the shroom thingies
/turf/simulated/mineral/ReplaceWithFloor()
if(!icon_old) icon_old = icon_state
@@ -219,7 +221,7 @@
W.fullUpdateMineralOverlays()
W.levelupdate()
return W
*/
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -291,9 +293,11 @@
O.geological_data = src.geological_data
if (prob(src.artifactChance))
//spawn a rare, xeno-archaelogical artifact here
//spawn a rare artifact here
new /obj/machinery/artifact(src)
ReplaceWithFloor()
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
N.fullUpdateMineralOverlays()
if(destroyed) //Display message about being a terrible miner
usr << "\red You destroy some of the rocks!"
return
@@ -426,8 +430,8 @@
user << "\blue You dug a hole."
gets_dug()
if(istype(W,/obj/item/weapon/storage/satchel))
var/obj/item/weapon/storage/satchel/S = W
if(istype(W,/obj/item/weapon/storage/bag/ore))
var/obj/item/weapon/storage/bag/ore/S = W
if(S.collection_mode)
for(var/obj/item/weapon/ore/O in src.contents)
O.attackby(W,user)
@@ -452,7 +456,7 @@
/turf/simulated/floor/plating/airless/asteroid/proc/updateMineralOverlays()
src.overlays = null
src.overlays.Cut()
if(istype(get_step(src, NORTH), /turf/simulated/mineral))
src.overlays += image('icons/turf/walls.dmi', "rock_side_n")
@@ -497,11 +501,11 @@
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(istype(R.module, /obj/item/weapon/robot_module/miner))
if(istype(R.module_state_1,/obj/item/weapon/storage/satchel))
if(istype(R.module_state_1,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_1,R)
else if(istype(R.module_state_2,/obj/item/weapon/storage/satchel))
else if(istype(R.module_state_2,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_2,R)
else if(istype(R.module_state_3,/obj/item/weapon/storage/satchel))
else if(istype(R.module_state_3,/obj/item/weapon/storage/bag/ore))
src.attackby(R.module_state_3,R)
else
return

View File

@@ -43,28 +43,28 @@
var/obj/item/stack/sheet/O
O = locate(/obj/item/stack/sheet, input.loc)
if(O)
if (istype(O,/obj/item/stack/sheet/gold))
if (istype(O,/obj/item/stack/sheet/mineral/gold))
amt_gold += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/silver))
if (istype(O,/obj/item/stack/sheet/mineral/silver))
amt_silver += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/diamond))
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
amt_diamond += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/plasma))
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
amt_plasma += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/uranium))
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
amt_uranium += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/metal))
amt_iron += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/clown))
if (istype(O,/obj/item/stack/sheet/mineral/clown))
amt_clown += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/adamantine))
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
amt_adamantine += 100 * O.amount
del(O) //Commented out for now. -Durandan
@@ -138,7 +138,7 @@
/obj/machinery/mineral/mint/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(processing==1)
usr << "\blue The machine is processing."

View File

@@ -73,7 +73,7 @@
/obj/item/weapon/moneybag/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["remove"])
var/obj/item/weapon/coin/COIN

View File

@@ -25,9 +25,9 @@
attack_self(mob/living/user as mob) //It's magic I ain't gonna explain how instant conversion with no tool works. -- Urist
var/location = get_turf(user)
for(var/obj/item/weapon/ore/glass/sandToConvert in location)
new /obj/item/stack/sheet/sandstone(location)
new /obj/item/stack/sheet/mineral/sandstone(location)
del(sandToConvert)
new /obj/item/stack/sheet/sandstone(location)
new /obj/item/stack/sheet/mineral/sandstone(location)
del(src)
/obj/item/weapon/ore/plasma
@@ -161,129 +161,3 @@
string_attached = null
user << "\blue You detach the string from the coin."
else ..()
/******************************Materials****************************/
/obj/item/stack/sheet/gold
name = "gold"
icon_state = "sheet-gold"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/gold/New(loc,amount)
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/* recipes = gold_recipes //Commenting out until there's a proper sprite. The golden plaque is supposed to be a special item dedicated to a really good player. -Agouri
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("Plaque", /obj/item/weapon/plaque_assembly, 2), \
)*/
/obj/item/stack/sheet/silver
name = "silver"
icon_state = "sheet-silver"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=3"
perunit = 2000
/obj/item/stack/sheet/silver/New(loc,amount)
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/obj/item/stack/sheet/diamond
name = "diamond"
icon_state = "sheet-diamond"
force = 5.0
throwforce = 5
w_class = 3.0
throw_range = 3
origin_tech = "materials=6"
perunit = 3750
/obj/item/stack/sheet/diamond/New(loc,amount)
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
/obj/item/stack/sheet/uranium
name = "uranium"
icon_state = "sheet-uranium"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=5"
perunit = 2000
/obj/item/stack/sheet/enruranium
name = "enriched uranium"
icon_state = "sheet-enruranium"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=5"
perunit = 1000
/obj/item/stack/sheet/plasma
name = "solid plasma"
icon_state = "sheet-plasma"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "plasmatech=2;materials=2"
perunit = 2000
/obj/item/stack/sheet/adamantine
name = "adamantine"
icon_state = "sheet-adamantine"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/mythril
name = "mythril"
icon_state = "sheet-mythril"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/clown
name = "bananium"
icon_state = "sheet-clown"
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
origin_tech = "materials=4"
perunit = 2000
/obj/item/stack/sheet/clown/New(loc,amount)
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4

View File

@@ -1,220 +0,0 @@
/**********************Satchel**************************/
/obj/item/weapon/satchel
icon = 'mining.dmi'
icon_state = "satchel"
name = "Mining Satchel"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 25; //the number of ore pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
/obj/item/weapon/satchel/attack_self(mob/user as mob)
for (var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the satchel."
return
/obj/item/weapon/satchel/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/ore))
var/obj/item/weapon/ore/O = W
src.contents += O;
return
/obj/item/weapon/satchel/verb/toggle_mode()
set name = "Switch Satchel Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The satchel now picks up all ore in a tile at once."
if(0)
usr << "The satchel now picks up one ore at a time."
/obj/item/weapon/satchel/borg
icon = 'mining.dmi'
icon_state = "satchel"
name = "Cyborg Mining Satchel"
mode = 1; //0 = pick one at a time, 1 = pick all on tile
capacity = 75; //the number of ore pieces it can carry.
/**********************Ore box**************************/
/obj/structure/ore_box
icon = 'mining.dmi'
icon_state = "orebox0"
name = "Ore Box"
desc = "A heavy box used for storing ore."
density = 1
var/capacity = 200
var/amt_gold = 0
var/amt_silver = 0
var/amt_diamond = 0
var/amt_glass = 0
var/amt_iron = 0
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
New()
if(prob(50))
icon_state = "orebox1"
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore))
if (src.contents.len + 1 <= src.capacity)
src.contents += W;
else
user << "\blue The ore box is full."
else if (istype(W, /obj/item/weapon/satchel))
if ( src.contents.len + W.contents.len <= src.capacity)
src.contents += W.contents
user << "\blue You empty the satchel into the box."
else
user << "\blue The ore box is full."
return
/obj/structure/ore_box/proc/update(obj, mob/user as mob)
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
amt_diamond++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/glass))
amt_glass++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/plasma))
amt_plasma++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/iron))
amt_iron++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/silver))
amt_silver++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/gold))
amt_gold++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/uranium))
amt_uranium++
del(C)
continue
else if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++
del(C)
continue
return
/obj/structure/ore_box/attack_hand(obj, mob/user as mob)
var/amt_gold = 0
var/amt_silver = 0
var/amt_diamond = 0
var/amt_glass = 0
var/amt_iron = 0
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
amt_diamond++;
else if (istype(C,/obj/item/weapon/ore/glass))
amt_glass++;
else if (istype(C,/obj/item/weapon/ore/plasma))
amt_plasma++;
else if (istype(C,/obj/item/weapon/ore/iron))
amt_iron++;
else if (istype(C,/obj/item/weapon/ore/silver))
amt_silver++;
else if (istype(C,/obj/item/weapon/ore/gold))
amt_gold++;
else if (istype(C,/obj/item/weapon/ore/uranium))
amt_uranium++;
else if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++;
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
dat += text("Gold ore: [amt_gold]<br>")
if (amt_silver)
dat += text("Silver ore: [amt_silver]<br>")
if (amt_iron)
dat += text("Metal ore: [amt_iron]<br>")
if (amt_glass)
dat += text("Sand: [amt_glass]<br>")
if (amt_diamond)
dat += text("Diamond ore: [amt_diamond]<br>")
if (amt_plasma)
dat += text("Plasma ore: [amt_plasma]<br>")
if (amt_uranium)
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
return
/obj/structure/ore_box/Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["removeall"])
if (amt_diamond > 0)
var/obj/item/weapon/ore/diamond/G = new /obj/item/weapon/ore/diamond
G.amount = src.amt_diamond
G.loc = src.loc
src.amt_diamond = 0
if (amt_glass > 0)
var/obj/item/weapon/ore/glass/G = new /obj/item/weapon/ore/glass
G.amount = src.amt_glass
G.loc = src.loc
src.amt_glass = 0
if (amt_plasma > 0)
var/obj/item/weapon/ore/plasma/G = new /obj/item/weapon/ore/plasma
G.amount = src.amt_plasma
G.loc = src.loc
src.amt_plasma = 0
if (amt_iron > 0)
var/obj/item/weapon/ore/iron/G = new /obj/item/weapon/ore/iron
G.amount = src.amt_iron
G.loc = src.loc
src.amt_iron = 0
if (amt_silver > 0)
var/obj/item/weapon/ore/silver/G = new /obj/item/weapon/ore/silver
G.amount = src.amt_silver
G.loc = src.loc
src.amt_silver = 0
if (amt_gold > 0)
var/obj/item/weapon/ore/gold/G = new /obj/item/weapon/ore/gold
G.amount = src.amt_gold
G.loc = src.loc
src.amt_gold = 0
if (amt_uranium > 0)
var/obj/item/weapon/ore/uranium/G = new /obj/item/weapon/ore/uranium
G.amount = src.amt_uranium
G.loc = src.loc
src.amt_uranium = 0
if (amt_clown > 0)
var/obj/item/weapon/ore/clown/G = new /obj/item/weapon/ore/clown
G.amount = src.amt_clown
G.loc = src.loc
src.amt_clown = 0
for (var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
usr << "\blue You empty the box."
src.updateUsrDialog()
return

View File

@@ -28,6 +28,7 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_strange = 0
for (var/obj/item/weapon/ore/C in contents)
@@ -47,6 +48,8 @@
amt_uranium++;
if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++;
if (istype(C,/obj/item/weapon/ore/strangerock))
amt_strange++;
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
@@ -65,6 +68,8 @@
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_strange)
dat += text("Strange rocks: [amt_strange]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
@@ -73,7 +78,7 @@
/obj/structure/ore_box/Topic(href, href_list)
if(..())
return
usr.machine = src
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["removeall"])
for (var/obj/item/weapon/ore/O in contents)
@@ -83,173 +88,3 @@
src.updateUsrDialog()
return
/**********************Sheet Snatcher**************************/
//Stolen satchel code, making it a box just wouldn't work well for this -Sieve
/obj/item/weapon/sheetsnatcher
icon = 'icons/obj/mining.dmi'
icon_state = "sheetsnatcher"
name = "Sheet Snatcher"
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 300; //the number of sheets it can carry.
flags = FPRINT | TABLEPASS
w_class = 3
var/metal = 0//Holder values, to have a count of how much of each type is in the snatcher
var/glass = 0
var/gold = 0
var/silver = 0
var/diamond = 0
var/plasma = 0
var/uranium = 0
var/clown = 0
var/euranium = 0
var/plasteel = 0
var/rglass = 0
/obj/item/weapon/sheetsnatcher/attack_self(mob/user as mob)//Credit goes to carn on this one
var/location = get_turf(src) //fetches the turf containing the object. (so stuff spawns on the floor)
while(metal)
var/obj/item/stack/sheet/metal/S = new (location)
var/stacksize = min(metal,50) //maximum stack size is 50!
S.amount = stacksize
metal -= stacksize
while(glass)
var/obj/item/stack/sheet/glass/S = new (location)
var/stacksize = min(glass,50)
S.amount = stacksize
glass -= stacksize
while(gold)
var/obj/item/stack/sheet/gold/S = new (location)
var/stacksize = min(gold,50)
S.amount = stacksize
gold -= stacksize
while(silver)
var/obj/item/stack/sheet/silver/S = new (location)
var/stacksize = min(silver,50)
S.amount = stacksize
silver -= stacksize
while(diamond)
var/obj/item/stack/sheet/diamond/S = new (location)
var/stacksize = min(diamond,50)
S.amount = stacksize
diamond -= stacksize
while(plasma)
var/obj/item/stack/sheet/plasma/S = new (location)
var/stacksize = min(plasma,50)
S.amount = stacksize
plasma -= stacksize
while(uranium)
var/obj/item/stack/sheet/uranium/S = new (location)
var/stacksize = min(uranium,50)
S.amount = stacksize
uranium -= stacksize
while(clown)
var/obj/item/stack/sheet/clown/S = new (location)
var/stacksize = min(clown,50)
S.amount = stacksize
clown -= stacksize
while(euranium)
var/obj/item/stack/sheet/enruranium/S = new (location)
var/stacksize = min(euranium,50)
S.amount = stacksize
euranium -= stacksize
while(plasteel)
var/obj/item/stack/sheet/plasteel/S = new (location)
var/stacksize = min(plasteel,50)
S.amount = stacksize
plasteel -= stacksize
while(rglass)
var/obj/item/stack/sheet/rglass/S = new (location)
var/stacksize = min(rglass,50)
S.amount = stacksize
rglass -= stacksize
if(!metal && !glass && !gold && !silver && !diamond && !plasma && !uranium && !clown && !euranium && !plasteel && !rglass)
user << "\blue You empty the snatch."
return
/obj/item/weapon/sheetsnatcher/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/stack/sheet))
var/obj/item/stack/sheet/O = W
src.add(O,user)
return
/obj/item/weapon/sheetsnatcher/verb/toggle_mode()
set name = "Switch Sheet Snatcher Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The snatcher now picks up all sheets on a tile at once."
if(0)
usr << "The snatcher now picks up one sheet at a time."
/obj/item/weapon/sheetsnatcher/proc/add(var/obj/item/stack/sheet/S as obj, mob/user as mob)//Handles sheets, adds them to the holder values
if((S.name == "Sandstone Bricks") || (S.name == "Wood Planks"))//Does not pick up sandstone or wood, as they are not true sheets
return
var/current = metal+glass+gold+silver+diamond+plasma+uranium+clown+euranium+plasteel+rglass
if(capacity == current)//If it's full, you're done
user << "\red The snatcher is full."
return
if(capacity < current + S.amount)//If the stack will fill it up
var/diff = capacity - current
switch(S.name)
if("metal")
metal += diff
if("glass")
glass += diff
if("silver")
silver += diff
if("gold")
gold += diff
if("diamond")
diamond += diff
if("solid plasma")
plasma += diff
if("uranium")
uranium += diff
if("bananium")
clown += diff
if("enriched uranium")
euranium += diff
if("plasteel")
plasteel += diff
if("reinforced glass")
rglass += diff
S.amount -= diff
user << "\blue You add the [S.name] to the [name]"
else
switch(S.name)
if("metal")
metal += S.amount
if("glass")
glass += S.amount
if("silver")
silver += S.amount
if("gold")
gold += S.amount
if("diamond")
diamond += S.amount
if("solid plasma")
plasma += S.amount
if("uranium")
uranium += S.amount
if("bananium")
clown += S.amount
if("enriched uranium")
euranium += S.amount
if("plasteel")
plasteel += S.amount
if("reinforced glass")
rglass += S.amount
user << "\blue You add the [S.name] to the [name]"
del (S)
return
/obj/item/weapon/sheetsnatcher/borg
name = "Sheet Snatcher 9000"
desc = ""
capacity = 500//Borgs get more because >specialization