Mass replace

This commit is contained in:
Tigercat2000
2016-07-07 19:34:02 -07:00
parent dc408f090d
commit 71e5344a98
870 changed files with 7679 additions and 7679 deletions
+2 -2
View File
@@ -156,12 +156,12 @@
to_chat(user, "<span class='notice'>The crate is locked with a Deca-code lock.</span>")
var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
if(in_range(src, user))
if (input == code)
if(input == code)
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
locked = 0
overlays.Cut()
overlays += "securecrateg"
else if (input == null || length(input) != codelen)
else if(input == null || length(input) != codelen)
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
else
to_chat(user, "<span class='warning'>A red light flashes.</span>")
+1 -1
View File
@@ -105,7 +105,7 @@
to_chat(user, "<span class='notice'>There already is a string attached to this coin.</span>")
return
if (CC.use(1))
if(CC.use(1))
overlays += image('icons/obj/items.dmi',"coin_string_overlay")
string_attached = 1
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
+6 -6
View File
@@ -84,9 +84,9 @@
var/i = 0
if(T)
for(var/obj/item/weapon/ore/O in T)
if (i >= ore_pickup_rate)
if(i >= ore_pickup_rate)
break
else if (!O || !O.refined_type)
else if(!O || !O.refined_type)
continue
else
process_sheet(O)
@@ -95,16 +95,16 @@
var/obj/structure/ore_box/B = locate() in T
if(B)
for(var/obj/item/weapon/ore/O in B.contents)
if (i >= ore_pickup_rate)
if(i >= ore_pickup_rate)
break
else if (!O || !O.refined_type)
else if(!O || !O.refined_type)
continue
else
process_sheet(O)
i++
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
if (!powered())
if(!powered())
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = usr.get_active_hand()
@@ -425,7 +425,7 @@
if(href_list["purchase"])
if(istype(inserted_id))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
if (!prize || !(prize in prize_list))
if(!prize || !(prize in prize_list))
return
if(prize.cost > inserted_id.mining_points)
else
@@ -28,7 +28,7 @@
t = d.id_tag
if(t == src.door_tag)
src.release_door = d
if (machine && (release_door || !use_release_door))
if(machine && (release_door || !use_release_door))
machine.CONSOLE = src
else
qdel(src)
+86 -86
View File
@@ -13,7 +13,7 @@
..()
spawn(7)
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
if (machine)
if(machine)
machine.CONSOLE = src
else
qdel(src)
@@ -24,7 +24,7 @@
//iron
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_mime || machine.ore_adamantine)
if(machine.ore_iron)
if (machine.selected_iron==1)
if(machine.selected_iron==1)
dat += text("<A href='?src=\ref[src];sel_iron=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_iron=yes'><font color='red'>Not smelting</font></A> ")
@@ -34,7 +34,7 @@
//sand - glass
if(machine.ore_glass)
if (machine.selected_glass==1)
if(machine.selected_glass==1)
dat += text("<A href='?src=\ref[src];sel_glass=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_glass=yes'><font color='red'>Not smelting</font></A> ")
@@ -44,7 +44,7 @@
//plasma
if(machine.ore_plasma)
if (machine.selected_plasma==1)
if(machine.selected_plasma==1)
dat += text("<A href='?src=\ref[src];sel_plasma=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_plasma=yes'><font color='red'>Not smelting</font></A> ")
@@ -54,7 +54,7 @@
//uranium
if(machine.ore_uranium)
if (machine.selected_uranium==1)
if(machine.selected_uranium==1)
dat += text("<A href='?src=\ref[src];sel_uranium=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_uranium=yes'><font color='red'>Not smelting</font></A> ")
@@ -64,7 +64,7 @@
//gold
if(machine.ore_gold)
if (machine.selected_gold==1)
if(machine.selected_gold==1)
dat += text("<A href='?src=\ref[src];sel_gold=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_gold=yes'><font color='red'>Not smelting</font></A> ")
@@ -74,7 +74,7 @@
//silver
if(machine.ore_silver)
if (machine.selected_silver==1)
if(machine.selected_silver==1)
dat += text("<A href='?src=\ref[src];sel_silver=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_silver=yes'><font color='red'>Not smelting</font></A> ")
@@ -84,7 +84,7 @@
//diamond
if(machine.ore_diamond)
if (machine.selected_diamond==1)
if(machine.selected_diamond==1)
dat += text("<A href='?src=\ref[src];sel_diamond=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_diamond=yes'><font color='red'>Not smelting</font></A> ")
@@ -94,7 +94,7 @@
//bananium
if(machine.ore_clown)
if (machine.selected_clown==1)
if(machine.selected_clown==1)
dat += text("<A href='?src=\ref[src];sel_clown=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_clown=yes'><font color='red'>Not smelting</font></A> ")
@@ -104,7 +104,7 @@
//tranquillite
if(machine.ore_mime)
if (machine.selected_mime==1)
if(machine.selected_mime==1)
dat += text("<A href='?src=\ref[src];sel_mime=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_mime=yes'><font color='red'>Not smelting</font></A> ")
@@ -115,7 +115,7 @@
//On or off
dat += text("Machine is currently ")
if (machine.on==1)
if(machine.on==1)
dat += text("<A href='?src=\ref[src];set_on=off'>On</A> ")
else
dat += text("<A href='?src=\ref[src];set_on=on'>Off</A> ")
@@ -131,52 +131,52 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["sel_iron"])
if (href_list["sel_iron"] == "yes")
if(href_list["sel_iron"] == "yes")
machine.selected_iron = 1
else
machine.selected_iron = 0
if(href_list["sel_glass"])
if (href_list["sel_glass"] == "yes")
if(href_list["sel_glass"] == "yes")
machine.selected_glass = 1
else
machine.selected_glass = 0
if(href_list["sel_plasma"])
if (href_list["sel_plasma"] == "yes")
if(href_list["sel_plasma"] == "yes")
machine.selected_plasma = 1
else
machine.selected_plasma = 0
if(href_list["sel_uranium"])
if (href_list["sel_uranium"] == "yes")
if(href_list["sel_uranium"] == "yes")
machine.selected_uranium = 1
else
machine.selected_uranium = 0
if(href_list["sel_gold"])
if (href_list["sel_gold"] == "yes")
if(href_list["sel_gold"] == "yes")
machine.selected_gold = 1
else
machine.selected_gold = 0
if(href_list["sel_silver"])
if (href_list["sel_silver"] == "yes")
if(href_list["sel_silver"] == "yes")
machine.selected_silver = 1
else
machine.selected_silver = 0
if(href_list["sel_diamond"])
if (href_list["sel_diamond"] == "yes")
if(href_list["sel_diamond"] == "yes")
machine.selected_diamond = 1
else
machine.selected_diamond = 0
if(href_list["sel_clown"])
if (href_list["sel_clown"] == "yes")
if(href_list["sel_clown"] == "yes")
machine.selected_clown = 1
else
machine.selected_clown = 0
if(href_list["sel_mime"])
if (href_list["sel_mime"] == "yes")
if(href_list["sel_mime"] == "yes")
machine.selected_mime = 1
else
machine.selected_mime = 0
if(href_list["set_on"])
if (href_list["set_on"] == "on")
if(href_list["set_on"] == "on")
machine.on = 1
else
machine.on = 0
@@ -216,82 +216,82 @@
/obj/machinery/mineral/processing_unit/process()
var/i
for (i = 0; i < 10; i++)
if (on)
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if (ore_glass > 0)
for(i = 0; i < 10; i++)
if(on)
if(selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if(ore_glass > 0)
ore_glass--;
generate_mineral(/obj/item/stack/sheet/glass)
else
on = 0
continue
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_mime == 0)
if (ore_glass > 0 && ore_iron > 0)
if(selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_mime == 0)
if(ore_glass > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
generate_mineral(/obj/item/stack/sheet/rglass)
else
on = 0
continue
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 && selected_mime == 0)
if (ore_gold > 0)
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 && selected_mime == 0)
if(ore_gold > 0)
ore_gold--;
generate_mineral(/obj/item/stack/sheet/mineral/gold)
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 && selected_mime == 0)
if (ore_silver > 0)
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 && selected_mime == 0)
if(ore_silver > 0)
ore_silver--;
generate_mineral(/obj/item/stack/sheet/mineral/silver)
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 && selected_mime == 0)
if (ore_diamond > 0)
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 && selected_mime == 0)
if(ore_diamond > 0)
ore_diamond--;
generate_mineral(/obj/item/stack/sheet/mineral/diamond)
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 && selected_mime == 0)
if (ore_plasma > 0)
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 && selected_mime == 0)
if(ore_plasma > 0)
ore_plasma--;
generate_mineral(/obj/item/stack/sheet/mineral/plasma)
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 && selected_mime == 0)
if (ore_uranium > 0)
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 && selected_mime == 0)
if(ore_uranium > 0)
ore_uranium--;
generate_mineral(/obj/item/stack/sheet/mineral/uranium)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_mime == 0)
if (ore_iron > 0)
if(selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_mime == 0)
if(ore_iron > 0)
ore_iron--;
generate_mineral(/obj/item/stack/sheet/metal)
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 == 1 && selected_clown == 0 && selected_mime == 0)
if (ore_iron > 0 && ore_plasma > 0)
if(selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_mime == 0)
if(ore_iron > 0 && ore_plasma > 0)
ore_iron--;
ore_plasma--;
generate_mineral(/obj/item/stack/sheet/plasteel)
else
on = 0
continue
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 && selected_mime == 0)
if (ore_clown > 0)
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 && selected_mime == 0)
if(ore_clown > 0)
ore_clown--;
generate_mineral(/obj/item/stack/sheet/mineral/bananium)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 1)
if (ore_mime > 0)
if(selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 1)
if(ore_mime > 0)
ore_mime--;
generate_mineral(/obj/item/stack/sheet/mineral/tranquillite)
else
@@ -299,16 +299,16 @@
continue
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if (ore_uranium >= 2 && ore_diamond >= 1)
/*if(selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if(ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
ore_diamond -= 1
generate_mineral(/obj/item/stack/sheet/mineral/adamantine)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if (ore_silver >= 1 && ore_plasma >= 3)
if(selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_mime == 0)
if(ore_silver >= 1 && ore_plasma >= 3)
ore_silver -= 1
ore_plasma -= 3
generate_mineral(/obj/item/stack/sheet/mineral/mythril)
@@ -321,53 +321,53 @@
var/b = 1 //this part checks if all required ores are available
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
if(!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
b = 0
if (selected_gold == 1)
if (ore_gold <= 0)
if(selected_gold == 1)
if(ore_gold <= 0)
b = 0
if (selected_silver == 1)
if (ore_silver <= 0)
if(selected_silver == 1)
if(ore_silver <= 0)
b = 0
if (selected_diamond == 1)
if (ore_diamond <= 0)
if(selected_diamond == 1)
if(ore_diamond <= 0)
b = 0
if (selected_uranium == 1)
if (ore_uranium <= 0)
if(selected_uranium == 1)
if(ore_uranium <= 0)
b = 0
if (selected_plasma == 1)
if (ore_plasma <= 0)
if(selected_plasma == 1)
if(ore_plasma <= 0)
b = 0
if (selected_iron == 1)
if (ore_iron <= 0)
if(selected_iron == 1)
if(ore_iron <= 0)
b = 0
if (selected_glass == 1)
if (ore_glass <= 0)
if(selected_glass == 1)
if(ore_glass <= 0)
b = 0
if (selected_clown == 1)
if (ore_clown <= 0)
if(selected_clown == 1)
if(ore_clown <= 0)
b = 0
if (selected_mime == 1)
if (ore_mime <= 0)
if(selected_mime == 1)
if(ore_mime <= 0)
b = 0
if (b) //if they are, deduct one from each, produce slag and shut the machine off
if (selected_gold == 1)
if(b) //if they are, deduct one from each, produce slag and shut the machine off
if(selected_gold == 1)
ore_gold--
if (selected_silver == 1)
if(selected_silver == 1)
ore_silver--
if (selected_diamond == 1)
if(selected_diamond == 1)
ore_diamond--
if (selected_uranium == 1)
if(selected_uranium == 1)
ore_uranium--
if (selected_plasma == 1)
if(selected_plasma == 1)
ore_plasma--
if (selected_iron == 1)
if(selected_iron == 1)
ore_iron--
if (selected_clown == 1)
if(selected_clown == 1)
ore_clown--
if (selected_mime == 1)
if(selected_mime == 1)
ore_mime--
generate_mineral(/obj/item/weapon/ore/slag)
on = 0
@@ -384,39 +384,39 @@
n++
if(n>10)
break
if (istype(O,/obj/item/weapon/ore/iron))
if(istype(O,/obj/item/weapon/ore/iron))
ore_iron++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/glass))
if(istype(O,/obj/item/weapon/ore/glass))
ore_glass++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/diamond))
if(istype(O,/obj/item/weapon/ore/diamond))
ore_diamond++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/plasma))
if(istype(O,/obj/item/weapon/ore/plasma))
ore_plasma++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/gold))
if(istype(O,/obj/item/weapon/ore/gold))
ore_gold++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/silver))
if(istype(O,/obj/item/weapon/ore/silver))
ore_silver++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/uranium))
if(istype(O,/obj/item/weapon/ore/uranium))
ore_uranium++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/bananium))
if(istype(O,/obj/item/weapon/ore/bananium))
ore_clown++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/tranquillite))
if(istype(O,/obj/item/weapon/ore/tranquillite))
ore_mime++
O.loc = null
continue
+1 -1
View File
@@ -13,7 +13,7 @@
..()
spawn(7)
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
if (machine)
if(machine)
machine.CONSOLE = src
else
qdel(src)
+3 -3
View File
@@ -15,14 +15,14 @@
if(T)
var/limit
for(var/obj/structure/ore_box/B in T)
for (var/obj/item/weapon/ore/O in B)
for(var/obj/item/weapon/ore/O in B)
B.contents -= O
unload_mineral(O)
limit++
if (limit>=10)
if(limit>=10)
return
for(var/obj/item/I in T)
unload_mineral(I)
limit++
if (limit>=10)
if(limit>=10)
return
+98 -98
View File
@@ -39,26 +39,26 @@
process()
..()
if (src.working) use_power(src.powconsumption)
if(src.working) use_power(src.powconsumption)
ex_act(severity)
switch(severity)
if(1.0) qdel(src)
if(2.0)
if (prob(60)) stat |= BROKEN
if(prob(60)) stat |= BROKEN
if(3.0)
if (prob(30)) stat |= BROKEN
if(prob(30)) stat |= BROKEN
return
blob_act()
if (prob(25)) del src
if(prob(25)) del src
return
power_change()
if(stat & BROKEN) icon_state = "fab-broken"
else
if( powered() )
if (src.working) src.icon_state = "fab-active"
if(src.working) src.icon_state = "fab-active"
else src.icon_state = "fab-idle"
stat &= ~NOPOWER
else
@@ -92,31 +92,31 @@
var/AMTfabr = 0
for(var/obj/item/weapon/ore/O in src.contents)
if (istype(O,/obj/item/weapon/ore/iron)) AMTmaux++
if (istype(O,/obj/item/weapon/ore/glass)) AMTmoli++
if (istype(O,/obj/item/weapon/ore/silver)) AMTphar++
if (istype(O,/obj/item/weapon/ore/diamond)) AMTclar++
if (istype(O,/obj/item/weapon/ore/gold)) AMTbohr++
if (istype(O,/obj/item/weapon/ore/coal)) AMTereb++
if (istype(O,/obj/item/weapon/ore/uranium)) AMTcere++
if (istype(O,/obj/item/weapon/ore/plasma)) AMTplas++
if (istype(O,/obj/item/weapon/ore/osmium)) AMTuqil++
if (istype(O,/obj/item/weapon/ore/hydrogen)) AMTtele++
if (istype(O,/obj/item/weapon/ore/fabric)) AMTfabr++
if(istype(O,/obj/item/weapon/ore/iron)) AMTmaux++
if(istype(O,/obj/item/weapon/ore/glass)) AMTmoli++
if(istype(O,/obj/item/weapon/ore/silver)) AMTphar++
if(istype(O,/obj/item/weapon/ore/diamond)) AMTclar++
if(istype(O,/obj/item/weapon/ore/gold)) AMTbohr++
if(istype(O,/obj/item/weapon/ore/coal)) AMTereb++
if(istype(O,/obj/item/weapon/ore/uranium)) AMTcere++
if(istype(O,/obj/item/weapon/ore/plasma)) AMTplas++
if(istype(O,/obj/item/weapon/ore/osmium)) AMTuqil++
if(istype(O,/obj/item/weapon/ore/hydrogen)) AMTtele++
if(istype(O,/obj/item/weapon/ore/fabric)) AMTfabr++
dat += "<B>Available Minerals</B><BR>"
if (AMTmaux) dat += "<A href='?src=\ref[src];eject=1'><B>Iron:</B></A> [AMTmaux]<br>"
if (AMTmoli) dat += "<A href='?src=\ref[src];eject=2'><B>Glass:</B></A> [AMTmoli]<br>"
if (AMTphar) dat += "<A href='?src=\ref[src];eject=3'><B>Silver:</B></A> [AMTphar]<br>"
if (AMTclar) dat += "<A href='?src=\ref[src];eject=4'><B>Diamond:</B></A> [AMTclar]<br>"
if (AMTbohr) dat += "<A href='?src=\ref[src];eject=5'><B>Gold:</B></A> [AMTbohr]<br>"
if (AMTereb) dat += "<A href='?src=\ref[src];eject=6'><B>Coal:</B></A> [AMTereb]<br>"
if (AMTcere) dat += "<A href='?src=\ref[src];eject=7'><B>Uranium:</B></A> [AMTcere]<br>"
if (AMTplas) dat += "<A href='?src=\ref[src];eject=8'><B>Plasma:</B></A> [AMTplas]<br>"
if (AMTuqil) dat += "<A href='?src=\ref[src];eject=9'><B>Platinum:</B></A> [AMTuqil]<br>"
if (AMTtele) dat += "<A href='?src=\ref[src];eject=10'><B>Hydrogen:</B></A> [AMTtele]<br>"
if (AMTfabr) dat += "<A href='?src=\ref[src];eject=11'><B>Fabric:</B></A> [AMTfabr]<br>"
if (!AMTmaux && !AMTmoli && !AMTphar && !AMTclar && !AMTbohr && !AMTereb && !AMTcere && !AMTplas && !AMTuqil && !AMTtele && !AMTfabr)
if(AMTmaux) dat += "<A href='?src=\ref[src];eject=1'><B>Iron:</B></A> [AMTmaux]<br>"
if(AMTmoli) dat += "<A href='?src=\ref[src];eject=2'><B>Glass:</B></A> [AMTmoli]<br>"
if(AMTphar) dat += "<A href='?src=\ref[src];eject=3'><B>Silver:</B></A> [AMTphar]<br>"
if(AMTclar) dat += "<A href='?src=\ref[src];eject=4'><B>Diamond:</B></A> [AMTclar]<br>"
if(AMTbohr) dat += "<A href='?src=\ref[src];eject=5'><B>Gold:</B></A> [AMTbohr]<br>"
if(AMTereb) dat += "<A href='?src=\ref[src];eject=6'><B>Coal:</B></A> [AMTereb]<br>"
if(AMTcere) dat += "<A href='?src=\ref[src];eject=7'><B>Uranium:</B></A> [AMTcere]<br>"
if(AMTplas) dat += "<A href='?src=\ref[src];eject=8'><B>Plasma:</B></A> [AMTplas]<br>"
if(AMTuqil) dat += "<A href='?src=\ref[src];eject=9'><B>Platinum:</B></A> [AMTuqil]<br>"
if(AMTtele) dat += "<A href='?src=\ref[src];eject=10'><B>Hydrogen:</B></A> [AMTtele]<br>"
if(AMTfabr) dat += "<A href='?src=\ref[src];eject=11'><B>Fabric:</B></A> [AMTfabr]<br>"
if(!AMTmaux && !AMTmoli && !AMTphar && !AMTclar && !AMTbohr && !AMTereb && !AMTcere && !AMTplas && !AMTuqil && !AMTtele && !AMTfabr)
dat += "No minerals currently loaded.<br>"
dat += {"<HR>
@@ -126,42 +126,42 @@
dat += {"<BR><A href='?src=\ref[src];disp=\ref[A]'>
<b><u>[A.name]</u></b></A><br>
<b>Cost:</b> [A.amount1] [A.cname1]"}
if (A.cost2) dat += ", [A.amount2] [A.cname2]"
if (A.cost3) dat += ", [A.amount3] [A.cname3]"
if(A.cost2) dat += ", [A.amount2] [A.cname2]"
if(A.cost3) dat += ", [A.amount3] [A.cname3]"
dat += "<br><b>Time:</b> [A.time] Seconds<br>"
for(var/datum/manufacture/A in src.download)
dat += {"<BR><A href='?src=\ref[src];disp=\ref[A]'>
<b><u>[A.name]</u></b></A> (Downloaded)<br>
<b>Cost:</b> [A.amount1] [A.cname1]"}
if (A.cost2) dat += ", [A.amount2] [A.cname2]"
if (A.cost3) dat += ", [A.amount3] [A.cname3]"
if(A.cost2) dat += ", [A.amount2] [A.cname2]"
if(A.cost3) dat += ", [A.amount3] [A.cname3]"
dat += "<br><b>Time:</b> [A.time] Seconds<br>"
for(var/datum/manufacture/A in src.diskload)
dat += {"<BR><A href='?src=\ref[src];disp=\ref[A]'>
<b><u>[A.name]</u></b></A> (Disk)<br>
<b>Cost:</b> [A.amount1] [A.cname1]"}
if (A.cost2) dat += ", [A.amount2] [A.cname2]"
if (A.cost3) dat += ", [A.amount3] [A.cname3]"
if(A.cost2) dat += ", [A.amount2] [A.cname2]"
if(A.cost3) dat += ", [A.amount3] [A.cname3]"
dat += "<br><b>Time:</b> [A.time] Seconds<br>"
if (src.hacked)
if(src.hacked)
for(var/datum/manufacture/A in src.hidden)
dat += {"<BR><A href='?src=\ref[src];disp=\ref[A]'>
<b><u>[A.name]</u></b></A> (Secret)<br>
<b>Cost:</b> [A.amount1] [A.cname1]"}
if (A.cost2) dat += ", [A.amount2] [A.cname2]"
if (A.cost3) dat += ", [A.amount3] [A.cname3]"
if(A.cost2) dat += ", [A.amount2] [A.cname2]"
if(A.cost3) dat += ", [A.amount3] [A.cname3]"
dat += "<br><b>Time:</b> [A.time] Seconds<br>"
dat += "<hr>"
if (src.dl_list)
if(src.dl_list)
dat += {"<A href='?src=\ref[src];download=1'>Download Available Schematics</A><BR>
<A href='?src=\ref[src];delete=2'>Clear Downloaded Schematics</A><BR>"}
if (src.acceptdisk)
if(src.acceptdisk)
dat += {"<A href='?src=\ref[src];delete=1'>Clear Disk Schematics</A><BR>"}
user << browse(dat, "window=manufact;size=400x500")
@@ -173,45 +173,45 @@
if(usr.stat || usr.restrained())
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))))
if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))))
usr.machine = src
if (href_list["download"])
if(href_list["download"])
to_chat(if(!src.dl_list) usr, "\red This unit is not capable of downloading any additional schematics.")
else
var/amtdl = 0
//var/dontload = 0
if (src.dl_list == "robotics")
if(src.dl_list == "robotics")
/*for(var/i = robotics_research.starting_tier, i <= robotics_research.max_tiers, i++)
for(var/datum/roboresearch/X in robotics_research.researched_items[i])
for (var/datum/manufacture/S in X.schematics)
for (var/datum/manufacture/A in src.download)
if (istype(S,A)) dontload = 1
if (!dontload)
for(var/datum/manufacture/S in X.schematics)
for(var/datum/manufacture/A in src.download)
if(istype(S,A)) dontload = 1
if(!dontload)
src.download += new S.type(src)
amtdl++
else dontload = 0*/
to_chat(if (amtdl) usr, "\blue [amtdl] new schematics downloaded from Robotics Research Database.")
to_chat(if(amtdl) usr, "\blue [amtdl] new schematics downloaded from Robotics Research Database.")
to_chat(else usr, "\red No new schematics currently available in Robotics Research Database.")
if (href_list["delete"])
if(href_list["delete"])
var/operation = text2num(href_list["delete"])
if(operation == 1) // Clear Disk Schematics
var/amtgone = 0
for(var/datum/manufacture/D in src.diskload)
src.diskload-= D
amtgone++
to_chat(if (amtgone) usr, "\blue Cleared [amtgone] schematics from database.")
to_chat(if(amtgone) usr, "\blue Cleared [amtgone] schematics from database.")
to_chat(else usr, "\red No disk-loaded schematics detected in database.")
if(operation == 2) // Clear Download Schematics
var/amtgone = 0
for(var/datum/manufacture/D in src.download)
src.download-= D
amtgone++
to_chat(if (amtgone) usr, "\blue Cleared [amtgone] schematics from database.")
to_chat(if(amtgone) usr, "\blue Cleared [amtgone] schematics from database.")
to_chat(else usr, "\red No downloaded schematics detected in database.")
if (href_list["eject"])
if(href_list["eject"])
var/operation = text2num(href_list["eject"])
var/ejectamt = 0
var/ejecting = null
@@ -233,22 +233,22 @@
sleep(3)
ejectamt = input(usr,"How many units do you want to eject?","Eject Materials") as num
for(var/obj/item/weapon/ore/O in src.contents)
if (ejectamt <= 0) break
if (istype(O, ejecting))
if(ejectamt <= 0) break
if(istype(O, ejecting))
O.loc = usr.loc
ejectamt--
if (href_list["disp"])
if(href_list["disp"])
var/datum/manufacture/I = locate(href_list["disp"])
// Material Check
var/A1 = 0
var/A2 = 0
var/A3 = 0
for(var/obj/item/weapon/ore/O in src.contents)
if (istype(O,I.cost1)) A1++
if (istype(O,I.cost2)) A2++
if (istype(O,I.cost3)) A3++
if (A1 < I.amount1 || A2 < I.amount2 || A3 < I.amount3)
if(istype(O,I.cost1)) A1++
if(istype(O,I.cost2)) A2++
if(istype(O,I.cost3)) A3++
if(A1 < I.amount1 || A2 < I.amount2 || A3 < I.amount3)
to_chat(usr, "\red Insufficient materials to manufacture that item.")
return
// Consume Mats
@@ -256,13 +256,13 @@
var/C2 = I.amount2
var/C3 = I.amount3
for(var/obj/item/weapon/ore/O in src.contents)
if (istype(O,I.cost1) && C1)
if(istype(O,I.cost1) && C1)
del O
C1--
if (istype(O,I.cost2) && C2)
if(istype(O,I.cost2) && C2)
del O
C2--
if (istype(O,I.cost3) && C3)
if(istype(O,I.cost3) && C3)
del O
C3--
// Manufacture Item
@@ -272,16 +272,16 @@
var/powconsume = round(1500*worktime/3)
/*for(var/i = robotics_research.starting_tier, i <= robotics_research.max_tiers, i++)
for(var/datum/roboresearch/a in robotics_research.researched_items[i])
if (a.manubonus)
if(a.manubonus)
worktime -= a.timebonus
if (a.multiplier != 0) worktime /= a.multiplier
if(a.multiplier != 0) worktime /= a.multiplier
powconsume -= a.powbonus*/
if (worktime < 1) worktime = 1
if(worktime < 1) worktime = 1
src.powconsumption = powconsume
src.updateUsrDialog()
sleep(worktime)
var/make = I.create
while (make > 0)
while(make > 0)
new I.item(src.loc)
make--
src.working = 0
@@ -298,24 +298,24 @@
var/obj/item/stack/sheet/STACK = W
for(var/mob/O in viewers(user, null)) O.show_message(text("\blue [] loads [] into the [].", user, W, src), 1)
if(istype(STACK, /obj/item/stack/sheet/metal))
for (var/amt = STACK.amount, amt > 0, amt--) new /obj/item/weapon/ore/iron(src)
for(var/amt = STACK.amount, amt > 0, amt--) new /obj/item/weapon/ore/iron(src)
if(istype(STACK, /obj/item/stack/sheet/plasteel))
for (var/amt = STACK.amount, amt > 0, amt--)
for(var/amt = STACK.amount, amt > 0, amt--)
new /obj/item/weapon/ore/iron(src)
new /obj/item/weapon/ore/plasma(src)
if(istype(STACK, /obj/item/stack/sheet/glass))
for (var/amt = STACK.amount, amt > 0, amt--) new /obj/item/weapon/ore/glass(src)
for(var/amt = STACK.amount, amt > 0, amt--) new /obj/item/weapon/ore/glass(src)
if(istype(STACK, /obj/item/stack/sheet/rglass))
for (var/amt = STACK.amount, amt > 0, amt--)
for(var/amt = STACK.amount, amt > 0, amt--)
new /obj/item/weapon/ore/iron(src)
new /obj/item/weapon/ore/glass(src)
load = 2
//else if (istype(W, /obj/item/weapon/plant/wheat/metal))
//else if(istype(W, /obj/item/weapon/plant/wheat/metal))
// new /obj/item/weapon/ore/iron(src)
// load = 2
/*else if(istype(W, /obj/item/stack/cable_coil/))
for(var/mob/O in viewers(user, null)) O.show_message(text("\blue [] loads [] into the [].", user, W, src), 1)
for (var/amt = W:amount, amt > 0, amt--)
for(var/amt = W:amount, amt > 0, amt--)
new /obj/item/weapon/ore/silver(src)
amt--
load = 2*/
@@ -324,7 +324,7 @@
load = 2
else if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/RODS = W
for (var/amt = RODS.amount, amt > 0, amt--) new /obj/item/weapon/ore/iron(src)
for(var/amt = RODS.amount, amt > 0, amt--) new /obj/item/weapon/ore/iron(src)
load = 2
else if(istype(W, /obj/item/clothing/))
if(istype(W, /obj/item/clothing/under/))
@@ -337,78 +337,78 @@
if(istype(W,/obj/item/clothing/suit/space/)) new /obj/item/weapon/ore/fabric(src)
load = 2
else if(istype(W, /obj/item/weapon/disk/data/schematic))
to_chat(if (!src.acceptdisk) user, "\red This unit is unable to accept disks.")
to_chat(if(!src.acceptdisk) user, "\red This unit is unable to accept disks.")
else
var/amtload = 0
var/dontload = 0
for (var/datum/manufacture/WS in W:schematics)
for (var/datum/manufacture/A in src.available)
if (istype(WS,A)) dontload = 1
for (var/datum/manufacture/B in src.download)
if (istype(WS,B)) dontload = 1
for (var/datum/manufacture/C in src.diskload)
if (istype(WS,C)) dontload = 1
for (var/datum/manufacture/D in src.hidden)
if (istype(WS,D) && src.hacked) dontload = 1
if (!dontload)
for(var/datum/manufacture/WS in W:schematics)
for(var/datum/manufacture/A in src.available)
if(istype(WS,A)) dontload = 1
for(var/datum/manufacture/B in src.download)
if(istype(WS,B)) dontload = 1
for(var/datum/manufacture/C in src.diskload)
if(istype(WS,C)) dontload = 1
for(var/datum/manufacture/D in src.hidden)
if(istype(WS,D) && src.hacked) dontload = 1
if(!dontload)
src.diskload += new WS.type(src)
amtload++
else dontload = 0
to_chat(if (amtload) user, "\blue [amtload] new schematics downloaded from disk.")
to_chat(if(amtload) user, "\blue [amtload] new schematics downloaded from disk.")
to_chat(else user, "\red No new schematics available on disk.")
else if (istype(W, /obj/item/weapon/storage/bag/ore))
else if(istype(W, /obj/item/weapon/storage/bag/ore))
for(var/mob/V in viewers(user, null)) V.show_message(text("\blue [] uses the []'s automatic ore loader on []!", user, src, W), 1)
var/amtload = 0
for (var/obj/item/weapon/ore/M in W.contents)
for(var/obj/item/weapon/ore/M in W.contents)
M.loc = src
amtload++
to_chat(if (amtload) user, "\blue [amtload] pieces of ore loaded from [W]!")
to_chat(if(amtload) user, "\blue [amtload] pieces of ore loaded from [W]!")
to_chat(else user, "\red No ore loaded!")
else if(istype(W, /obj/item/weapon/card/emag))
src.hacked = 1
to_chat(user, "\blue You remove the [src]'s product locks!")
else ..()
if (load == 1)
if(load == 1)
user.unEquip(W)
W.loc = src
if ((user.client && user.s_active != src))
if((user.client && user.s_active != src))
user.client.screen -= W
W.dropped()
else if (load == 2)
else if(load == 2)
user.unEquip(W)
W.dropped()
if ((user.client && user.s_active != src))
if((user.client && user.s_active != src))
user.client.screen -= W
del W
src.updateUsrDialog()
MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if (istype(O, /obj/structure/closet/crate/))
if(istype(O, /obj/structure/closet/crate/))
for(var/mob/V in viewers(user, null)) V.show_message(text("\blue [] uses the []'s automatic ore loader on []!", user, src, O), 1)
var/amtload = 0
for (var/obj/item/weapon/ore/M in O.contents)
for(var/obj/item/weapon/ore/M in O.contents)
M.loc = src
amtload++
to_chat(if (amtload) user, "\blue [amtload] pieces of ore loaded from [O]!")
to_chat(if(amtload) user, "\blue [amtload] pieces of ore loaded from [O]!")
to_chat(else user, "\red No ore loaded!")
else if (istype(O, /obj/item/weapon/ore/))
else if(istype(O, /obj/item/weapon/ore/))
for(var/mob/V in viewers(user, null)) V.show_message(text("\blue [] begins quickly stuffing ore into []!", user, src), 1)
var/staystill = user.loc
for(var/obj/item/weapon/ore/M in view(1,user))
M.loc = src
sleep(3)
if (user.loc != staystill) break
if(user.loc != staystill) break
to_chat(user, "\blue You finish stuffing ore into [src]!")
/*else if (istype(O, /obj/item/weapon/plant/wheat/metal))
/*else if(istype(O, /obj/item/weapon/plant/wheat/metal))
for(var/mob/V in viewers(user, null)) V.show_message(text("\blue [] begins quickly stuffing [O] into []!", user, src), 1)
var/staystill = user.loc
for(var/obj/item/weapon/plant/wheat/metal/M in view(1,user))
new /obj/item/weapon/ore/iron(src)
del M
sleep(3)
if (user.loc != staystill) break
if(user.loc != staystill) break
to_chat(user, "\blue You finish stuffing [O] into [src]!"*/)
else ..()
src.updateUsrDialog()
+24 -24
View File
@@ -45,10 +45,10 @@ var/global/list/rockTurfEdgeCache = list(
..()
switch(severity)
if(3.0)
if (prob(75))
if(prob(75))
src.gets_drilled(null, 1)
if(2.0)
if (prob(90))
if(prob(90))
src.gets_drilled(null, 1)
if(1.0)
src.gets_drilled(null, 1)
@@ -58,7 +58,7 @@ var/global/list/rockTurfEdgeCache = list(
..()
mineral_turfs += src
if (mineralType && mineralAmt && spread && spreadChance)
if(mineralType && mineralAmt && spread && spreadChance)
for(var/dir in cardinal)
if(prob(spreadChance))
var/turf/T = get_step(src, dir)
@@ -88,19 +88,19 @@ var/global/list/rockTurfEdgeCache = list(
var/turf/T
if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)))
T = get_step(src, NORTH)
if (T)
if(T)
T.overlays += rockTurfEdgeCache[SOUTH_EDGING]
if((istype(get_step(src, SOUTH), /turf/simulated/floor)) || (istype(get_step(src, SOUTH), /turf/space)))
T = get_step(src, SOUTH)
if (T)
if(T)
T.overlays += rockTurfEdgeCache[NORTH_EDGING]
if((istype(get_step(src, EAST), /turf/simulated/floor)) || (istype(get_step(src, EAST), /turf/space)))
T = get_step(src, EAST)
if (T)
if(T)
T.overlays += rockTurfEdgeCache[WEST_EDGING]
if((istype(get_step(src, WEST), /turf/simulated/floor)) || (istype(get_step(src, WEST), /turf/space)))
T = get_step(src, WEST)
if (T)
if(T)
T.overlays += rockTurfEdgeCache[EAST_EDGING]
/turf/simulated/mineral/random
@@ -116,10 +116,10 @@ var/global/list/rockTurfEdgeCache = list(
/turf/simulated/mineral/random/New()
..()
if (prob(mineralChance))
if(prob(mineralChance))
var/mName = pickweight(mineralSpawnChanceList) //temp mineral name
if (mName)
if(mName)
var/turf/simulated/mineral/M
switch(mName)
if("Uranium")
@@ -367,13 +367,13 @@ var/global/list/rockTurfEdgeCache = list(
/turf/simulated/mineral/attackby(var/obj/item/weapon/pickaxe/P as obj, mob/user as mob, params)
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if (istype(P, /obj/item/weapon/pickaxe))
if(istype(P, /obj/item/weapon/pickaxe))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
if(!( istype(T, /turf) ))
return
if(last_act+P.digspeed > world.time)//prevents message spam
@@ -393,9 +393,9 @@ var/global/list/rockTurfEdgeCache = list(
return
/turf/simulated/mineral/proc/gets_drilled()
if (mineralType && (src.mineralAmt > 0) && (src.mineralAmt < 11))
if(mineralType && (src.mineralAmt > 0) && (src.mineralAmt < 11))
var/i
for (i=0;i<mineralAmt;i++)
for(i=0;i<mineralAmt;i++)
new mineralType(src)
feedback_add_details("ore_mined","[mineralType]|[mineralAmt]")
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
@@ -465,7 +465,7 @@ var/global/list/rockTurfEdgeCache = list(
if(3.0)
return
if(2.0)
if (prob(20))
if(prob(20))
src.gets_dug()
if(1.0)
src.gets_dug()
@@ -476,37 +476,37 @@ var/global/list/rockTurfEdgeCache = list(
if(!W || !user)
return 0
if ((istype(W, /obj/item/weapon/shovel)))
if((istype(W, /obj/item/weapon/shovel)))
var/turf/T = user.loc
if (!( istype(T, /turf) ))
if(!( istype(T, /turf) ))
return
if (dug)
if(dug)
to_chat(user, "<span class='warning'>This area has already been dug!</span>")
return
to_chat(user, "<span class='notice'>You start digging...</span>")
sleep(20)
if ((user.loc == T && user.get_active_hand() == W))
if((user.loc == T && user.get_active_hand() == W))
to_chat(user, "<span class='notice'>You dig a hole.</span>")
gets_dug()
return
if ((istype(W, /obj/item/weapon/pickaxe)))
if((istype(W, /obj/item/weapon/pickaxe)))
var/obj/item/weapon/pickaxe/P = W
var/turf/T = user.loc
if (!( istype(T, /turf) ))
if(!( istype(T, /turf) ))
return
if (dug)
if(dug)
to_chat(user, "<span class='warning'>This area has already been dug!</span>")
return
to_chat(user, "<span class='notice'>You start digging...</span>")
sleep(P.digspeed)
if ((user.loc == T && user.get_active_hand() == W))
if((user.loc == T && user.get_active_hand() == W))
to_chat(user, "<span class='notice'>You dig a hole.</span>")
gets_dug()
return
@@ -557,7 +557,7 @@ var/global/list/rockTurfEdgeCache = list(
return
/turf/proc/fullUpdateMineralOverlays()
for (var/turf/t in range(1,src))
for(var/turf/t in range(1,src))
t.updateMineralOverlays()
/turf/simulated/floor/plating/airless/asteroid/cave
+17 -17
View File
@@ -26,28 +26,28 @@
var/turf/T = get_step(src,input_dir)
if(T)
for(var/obj/item/stack/sheet/O in T)
if (istype(O, /obj/item/stack/sheet/mineral/gold))
if(istype(O, /obj/item/stack/sheet/mineral/gold))
amt_gold += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/silver))
if(istype(O, /obj/item/stack/sheet/mineral/silver))
amt_silver += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/diamond))
if(istype(O, /obj/item/stack/sheet/mineral/diamond))
amt_diamond += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/plasma))
if(istype(O, /obj/item/stack/sheet/mineral/plasma))
amt_plasma += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/uranium))
if(istype(O, /obj/item/stack/sheet/mineral/uranium))
amt_uranium += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/metal))
if(istype(O, /obj/item/stack/sheet/metal))
amt_iron += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/bananium))
if(istype(O, /obj/item/stack/sheet/mineral/bananium))
amt_clown += 100 * O.amount
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/tranquillite))
if(istype(O, /obj/item/stack/sheet/mineral/tranquillite))
amt_mime += 100 * O.amount
O.loc = null
return
@@ -58,49 +58,49 @@
var/dat = "<b>Coin Press</b><br>"
dat += text("<br><font color='#ffcc00'><b>Gold inserted: </b>[amt_gold]</font> ")
if (chosen == "gold")
if(chosen == "gold")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=gold'>Choose</A>")
dat += text("<br><font color='#888888'><b>Silver inserted: </b>[amt_silver]</font> ")
if (chosen == "silver")
if(chosen == "silver")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=silver'>Choose</A>")
dat += text("<br><font color='#555555'><b>Iron inserted: </b>[amt_iron]</font> ")
if (chosen == "metal")
if(chosen == "metal")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=metal'>Choose</A>")
dat += text("<br><font color='#8888FF'><b>Diamond inserted: </b>[amt_diamond]</font> ")
if (chosen == "diamond")
if(chosen == "diamond")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=diamond'>Choose</A>")
dat += text("<br><font color='#FF8800'><b>Plasma inserted: </b>[amt_plasma]</font> ")
if (chosen == "plasma")
if(chosen == "plasma")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=plasma'>Choose</A>")
dat += text("<br><font color='#008800'><b>Uranium inserted: </b>[amt_uranium]</font> ")
if (chosen == "uranium")
if(chosen == "uranium")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=uranium'>Choose</A>")
if(amt_clown > 0)
dat += text("<br><font color='#AAAA00'><b>Bananium inserted: </b>[amt_clown]</font> ")
if (chosen == "clown")
if(chosen == "clown")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=clown'>Choose</A>")
if(amt_mime > 0)
dat += text("<br><font color='#666666'><b>Tranquillite inserted: </b>[amt_mime]</font> ")
if (chosen == "mime")
if(chosen == "mime")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=mime'>Choose</A>")
dat += text("<br><font color='#888888'><b>Adamantine inserted: </b>[amt_adamantine]</font> ")//I don't even know these color codes, so fuck it.
if (chosen == "adamantine")
if(chosen == "adamantine")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=adamantine'>Choose</A>")
+22 -22
View File
@@ -20,58 +20,58 @@
var/amt_mime = 0
var/amt_adamantine = 0
for (var/obj/item/weapon/coin/C in contents)
if (istype(C,/obj/item/weapon/coin/diamond))
for(var/obj/item/weapon/coin/C in contents)
if(istype(C,/obj/item/weapon/coin/diamond))
amt_diamond++
if (istype(C,/obj/item/weapon/coin/plasma))
if(istype(C,/obj/item/weapon/coin/plasma))
amt_plasma++
if (istype(C,/obj/item/weapon/coin/iron))
if(istype(C,/obj/item/weapon/coin/iron))
amt_iron++
if (istype(C,/obj/item/weapon/coin/silver))
if(istype(C,/obj/item/weapon/coin/silver))
amt_silver++
if (istype(C,/obj/item/weapon/coin/gold))
if(istype(C,/obj/item/weapon/coin/gold))
amt_gold++
if (istype(C,/obj/item/weapon/coin/uranium))
if(istype(C,/obj/item/weapon/coin/uranium))
amt_uranium++
if (istype(C,/obj/item/weapon/coin/clown))
if(istype(C,/obj/item/weapon/coin/clown))
amt_clown++
if (istype(C,/obj/item/weapon/coin/mime))
if(istype(C,/obj/item/weapon/coin/mime))
amt_mime++
if (istype(C,/obj/item/weapon/coin/adamantine))
if(istype(C,/obj/item/weapon/coin/adamantine))
amt_adamantine++
var/dat = text("<b>The contents of the moneybag reveal...</b><br>")
if (amt_gold)
if(amt_gold)
dat += text("Gold coins: [amt_gold] <A href='?src=\ref[src];remove=gold'>Remove one</A><br>")
if (amt_silver)
if(amt_silver)
dat += text("Silver coins: [amt_silver] <A href='?src=\ref[src];remove=silver'>Remove one</A><br>")
if (amt_iron)
if(amt_iron)
dat += text("Metal coins: [amt_iron] <A href='?src=\ref[src];remove=iron'>Remove one</A><br>")
if (amt_diamond)
if(amt_diamond)
dat += text("Diamond coins: [amt_diamond] <A href='?src=\ref[src];remove=diamond'>Remove one</A><br>")
if (amt_plasma)
if(amt_plasma)
dat += text("Plasma coins: [amt_plasma] <A href='?src=\ref[src];remove=plasma'>Remove one</A><br>")
if (amt_uranium)
if(amt_uranium)
dat += text("Uranium coins: [amt_uranium] <A href='?src=\ref[src];remove=uranium'>Remove one</A><br>")
if (amt_clown)
if(amt_clown)
dat += text("Bananium coins: [amt_clown] <A href='?src=\ref[src];remove=clown'>Remove one</A><br>")
if (amt_mime)
if(amt_mime)
dat += text("Tranquillite coins: [amt_mime] <A href='?src=\ref[src];remove=mime'>Remove one</A><br>")
if (amt_adamantine)
if(amt_adamantine)
dat += text("Adamantine coins: [amt_adamantine] <A href='?src=\ref[src];remove=adamantine'>Remove one</A><br>")
user << browse("[dat]", "window=moneybag")
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/coin))
if(istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
if(!user.drop_item())
return
to_chat(user, "<span class='notice'>You add the [C.name] into the bag.</span>")
contents += C
if (istype(W, /obj/item/weapon/moneybag))
if(istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
for (var/obj/O in C.contents)
for(var/obj/O in C.contents)
contents += O;
to_chat(user, "<span class='notice'>You empty the [C.name] into the bag.</span>")
return
+25 -25
View File
@@ -10,11 +10,11 @@
pressure_resistance = 5*ONE_ATMOSPHERE
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/ore))
if(istype(W, /obj/item/weapon/ore))
if(!user.drop_item())
return
W.loc = src
if (istype(W, /obj/item/weapon/storage))
if(istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
S.hide_from(usr)
for(var/obj/item/weapon/ore/O in S.contents)
@@ -34,48 +34,48 @@
var/amt_mime = 0
var/amt_bluespace = 0
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
for(var/obj/item/weapon/ore/C in contents)
if(istype(C,/obj/item/weapon/ore/diamond))
amt_diamond++
if (istype(C,/obj/item/weapon/ore/glass))
if(istype(C,/obj/item/weapon/ore/glass))
amt_glass++
if (istype(C,/obj/item/weapon/ore/plasma))
if(istype(C,/obj/item/weapon/ore/plasma))
amt_plasma++
if (istype(C,/obj/item/weapon/ore/iron))
if(istype(C,/obj/item/weapon/ore/iron))
amt_iron++
if (istype(C,/obj/item/weapon/ore/silver))
if(istype(C,/obj/item/weapon/ore/silver))
amt_silver++
if (istype(C,/obj/item/weapon/ore/gold))
if(istype(C,/obj/item/weapon/ore/gold))
amt_gold++
if (istype(C,/obj/item/weapon/ore/uranium))
if(istype(C,/obj/item/weapon/ore/uranium))
amt_uranium++
if (istype(C,/obj/item/weapon/ore/bananium))
if(istype(C,/obj/item/weapon/ore/bananium))
amt_clown++
if (istype(C,/obj/item/weapon/ore/tranquillite))
if(istype(C,/obj/item/weapon/ore/tranquillite))
amt_mime++
if (istype(C,/obj/item/weapon/ore/bluespace_crystal))
if(istype(C,/obj/item/weapon/ore/bluespace_crystal))
amt_bluespace++
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
if(amt_gold)
dat += text("Gold ore: [amt_gold]<br>")
if (amt_silver)
if(amt_silver)
dat += text("Silver ore: [amt_silver]<br>")
if (amt_iron)
if(amt_iron)
dat += text("Metal ore: [amt_iron]<br>")
if (amt_glass)
if(amt_glass)
dat += text("Sand: [amt_glass]<br>")
if (amt_diamond)
if(amt_diamond)
dat += text("Diamond ore: [amt_diamond]<br>")
if (amt_plasma)
if(amt_plasma)
dat += text("Plasma ore: [amt_plasma]<br>")
if (amt_uranium)
if(amt_uranium)
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
if(amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_mime)
if(amt_mime)
dat += text("Tranquillite ore: [amt_mime]<br>")
if (amt_bluespace)
if(amt_bluespace)
dat += text("Bluespace crystals: [amt_bluespace]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
@@ -88,7 +88,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["removeall"])
for (var/obj/item/weapon/ore/O in contents)
for(var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
to_chat(usr, "<span class='notice'>You empty the box.</span>")
@@ -122,7 +122,7 @@ obj/structure/ore_box/ex_act(severity, target)
to_chat(usr, "<span class='warning'>The ore box is empty.</span>")
return
for (var/obj/item/weapon/ore/O in contents)
for(var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
to_chat(usr, "<span class='notice'>You empty the ore box.</span>")