mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
added fire closets to spawn around the station. Each emergency closet has a 1/3 chance of changing to a fire closet. Lots of updates to mining, added satchels which can carry 10 pieces of ore each, they can gather all the ore from a tile at once or one at a time. They can get loaded into ore boxes, which can carry an unlimited amount, currently. Rail cars move much faster now, but demand more processor time, they will eventually get the role of getting loaded from satchels and producing ore boxes. Simply to make it easy to carry around hundreds of pieces of ore. (resubmit)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@799 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
icon_state = "captain"
|
||||
music = null
|
||||
|
||||
/area/mine/lobby //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
/area/mine/lobby
|
||||
name = "Mining station"
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
@@ -31,6 +31,7 @@
|
||||
var/mineralAmt = 0
|
||||
|
||||
/turf/simulated/asteroid/New()
|
||||
..()
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
|
||||
@@ -143,6 +144,7 @@
|
||||
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
|
||||
|
||||
/turf/simulated/floor/airless/asteroid/New()
|
||||
..()
|
||||
if (prob(50))
|
||||
seedName = pick(list("1","2","3","4"))
|
||||
seedAmt = rand(1,4)
|
||||
@@ -198,6 +200,24 @@
|
||||
icon = 'Mining.dmi'
|
||||
icon_state = "ore"
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/satchel))
|
||||
var/obj/item/weapon/satchel/S = W
|
||||
if (S.mode == 1)
|
||||
for (var/obj/item/weapon/ore/O in locate(src.x,src.y,src.z))
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += O;
|
||||
else
|
||||
user << "\blue The satchel is full."
|
||||
break
|
||||
user << "\blue You pick up all the ores."
|
||||
else
|
||||
if (S.contents.len < S.capacity)
|
||||
S.contents += src;
|
||||
else
|
||||
user << "\blue The satchel is full."
|
||||
return
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "Uranium ore"
|
||||
icon = 'Mining.dmi'
|
||||
@@ -232,6 +252,67 @@
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/**********************Ore pile**************************/
|
||||
|
||||
/obj/item/weapon/ore_pile
|
||||
name = "Pile of ores"
|
||||
icon = 'Mining.dmi'
|
||||
icon_state = "orepile"
|
||||
|
||||
/**********************Satchel**************************/
|
||||
|
||||
/obj/item/weapon/satchel
|
||||
icon = 'mining.dmi'
|
||||
icon_state = "satchel"
|
||||
name = "Mining Satchel"
|
||||
var/mode = 0; //0 = pick one at a time, 1 = pick all on tile
|
||||
var/capacity = 10; //the number of ore pieces it can carry.
|
||||
|
||||
/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/all_on_tile()
|
||||
mode = 1
|
||||
return
|
||||
|
||||
/obj/item/weapon/satchel/verb/one_at_a_time()
|
||||
mode = 0
|
||||
return
|
||||
|
||||
/**********************Ore box**************************/
|
||||
|
||||
/obj/ore_box
|
||||
icon = 'mining.dmi'
|
||||
icon_state = "orebox"
|
||||
name = "A box of ores"
|
||||
desc = "It's heavy"
|
||||
density = 1
|
||||
|
||||
/obj/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/ore))
|
||||
src.contents += W;
|
||||
if (istype(W, /obj/item/weapon/satchel))
|
||||
src.contents += W.contents
|
||||
user << "\blue You empty the satchel into the box."
|
||||
return
|
||||
|
||||
/obj/ore_box/attack_hand(obj, mob/user as mob)
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
user << "\blue You empty the box"
|
||||
return
|
||||
|
||||
/**********************Alien Seeds**************************/
|
||||
|
||||
/obj/item/seeds/alien/alien1
|
||||
@@ -413,23 +494,28 @@
|
||||
if (istype(O,/obj/item/weapon/ore/iron))
|
||||
new /obj/item/stack/sheet/metal(output.loc)
|
||||
del(O)
|
||||
return
|
||||
if (istype(O,/obj/item/weapon/ore/diamond))
|
||||
new /obj/item/stack/sheet/diamond(output.loc)
|
||||
del(O)
|
||||
return
|
||||
if (istype(O,/obj/item/weapon/ore/plasma))
|
||||
new /obj/item/stack/sheet/plasma(output.loc)
|
||||
del(O)
|
||||
return
|
||||
if (istype(O,/obj/item/weapon/ore/gold))
|
||||
new /obj/item/stack/sheet/gold(output.loc)
|
||||
del(O)
|
||||
return
|
||||
if (istype(O,/obj/item/weapon/ore/silver))
|
||||
new /obj/item/stack/sheet/silver(output.loc)
|
||||
del(O)
|
||||
if (istype(O,/obj/item/weapon/ore/uranium))
|
||||
new /obj/item/weapon/ore/uranium(output.loc)
|
||||
del(O)
|
||||
return
|
||||
if (O)
|
||||
O.loc = src.output.loc
|
||||
return
|
||||
|
||||
/**********************Mineral processing unit**************************/
|
||||
/**********************Mineral stacking unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine
|
||||
@@ -453,6 +539,14 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process() //PLACEHOLDER PROC
|
||||
if (src.output && src.input)
|
||||
var/obj/item/O
|
||||
O = locate(/obj/item, input.loc)
|
||||
if (O)
|
||||
O.loc = src.output.loc
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
@@ -960,6 +1054,9 @@
|
||||
var/moving = 0;
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/speed = 0
|
||||
var/slowing = 0
|
||||
var/atom/movable/load = null //what it's carrying
|
||||
|
||||
/obj/machinery/rail_car/attack_hand(user as mob)
|
||||
if (moving == 0)
|
||||
@@ -975,7 +1072,97 @@ for (var/client/C)
|
||||
C << "Dela."
|
||||
*/
|
||||
|
||||
/obj/machinery/rail_car/MouseDrop_T(var/atom/movable/C, mob/user)
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
if (!istype(C) || C.anchored || get_dist(user, src) > 1 || get_dist(src,C) > 1 )
|
||||
return
|
||||
|
||||
if(ismob(C))
|
||||
load(C)
|
||||
|
||||
|
||||
/obj/machinery/rail_car/proc/load(var/atom/movable/C)
|
||||
|
||||
if(get_dist(C, src) > 1)
|
||||
return
|
||||
//mode = 1
|
||||
|
||||
C.loc = src.loc
|
||||
sleep(2)
|
||||
C.loc = src
|
||||
load = C
|
||||
|
||||
C.pixel_y += 9
|
||||
if(C.layer < layer)
|
||||
C.layer = layer + 0.1
|
||||
overlays += C
|
||||
|
||||
if(ismob(C))
|
||||
var/mob/M = C
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
//mode = 0
|
||||
//send_status()
|
||||
|
||||
/obj/machinery/rail_car/proc/unload(var/dirn = 0)
|
||||
if(!load)
|
||||
return
|
||||
|
||||
overlays = null
|
||||
|
||||
load.loc = src.loc
|
||||
load.pixel_y -= 9
|
||||
load.layer = initial(load.layer)
|
||||
if(ismob(load))
|
||||
var/mob/M = load
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
|
||||
if(dirn)
|
||||
step(load, dirn)
|
||||
|
||||
load = null
|
||||
|
||||
// in case non-load items end up in contents, dump every else too
|
||||
// this seems to happen sometimes due to race conditions
|
||||
// with items dropping as mobs are loaded
|
||||
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.loc = src.loc
|
||||
AM.layer = initial(AM.layer)
|
||||
AM.pixel_y = initial(AM.pixel_y)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
/obj/machinery/rail_car/relaymove(var/mob/user)
|
||||
if(user.stat)
|
||||
return
|
||||
if(load == user)
|
||||
unload(0)
|
||||
return
|
||||
|
||||
/obj/machinery/rail_car/process()
|
||||
if (moving == 1)
|
||||
if (slowing == 1)
|
||||
if (speed > 0)
|
||||
speed--;
|
||||
if (speed == 0)
|
||||
slowing = 0
|
||||
else
|
||||
if (speed < 10)
|
||||
speed++;
|
||||
var/i = 0
|
||||
for (i = 0; i < speed; i++)
|
||||
if (moving == 1)
|
||||
switch (direction)
|
||||
if ("S")
|
||||
@@ -985,10 +1172,13 @@ for (var/client/C)
|
||||
if (R.dir == 9)
|
||||
direction = "E"
|
||||
if (R.dir == 2 || R.dir == 1 || R.dir == 10 || R.dir == 9)
|
||||
for (var/mob/living/M in locate(src.x,src.y-1,src.z))
|
||||
step(M,get_dir(src,R))
|
||||
step(src,get_dir(src,R))
|
||||
break
|
||||
else
|
||||
moving = 0
|
||||
speed = 0
|
||||
if ("N")
|
||||
for (var/obj/machinery/rail_track/R in locate(src.x,src.y+1,src.z))
|
||||
if (R.dir == 5)
|
||||
@@ -996,10 +1186,13 @@ for (var/client/C)
|
||||
if (R.dir == 6)
|
||||
direction = "W"
|
||||
if (R.dir == 5 || R.dir == 1 || R.dir == 6 || R.dir == 2)
|
||||
for (var/mob/living/M in locate(src.x,src.y+1,src.z))
|
||||
step(M,get_dir(src,R))
|
||||
step(src,get_dir(src,R))
|
||||
break
|
||||
else
|
||||
moving = 0
|
||||
speed = 0
|
||||
if ("E")
|
||||
for (var/obj/machinery/rail_track/R in locate(src.x+1,src.y,src.z))
|
||||
if (R.dir == 6)
|
||||
@@ -1007,10 +1200,13 @@ for (var/client/C)
|
||||
if (R.dir == 10)
|
||||
direction = "N"
|
||||
if (R.dir == 4 || R.dir == 8 || R.dir == 10 || R.dir == 6)
|
||||
for (var/mob/living/M in locate(src.x+1,src.y,src.z))
|
||||
step(M,get_dir(src,R))
|
||||
step(src,get_dir(src,R))
|
||||
break
|
||||
else
|
||||
moving = 0
|
||||
speed = 0
|
||||
if ("W")
|
||||
for (var/obj/machinery/rail_track/R in locate(src.x-1,src.y,src.z))
|
||||
if (R.dir == 9)
|
||||
@@ -1018,10 +1214,14 @@ for (var/client/C)
|
||||
if (R.dir == 5)
|
||||
direction = "S"
|
||||
if (R.dir == 8 || R.dir == 9 || R.dir == 5 || R.dir == 4)
|
||||
for (var/mob/living/M in locate(src.x-1,src.y,src.z))
|
||||
step(M,get_dir(src,R))
|
||||
step(src,get_dir(src,R))
|
||||
break
|
||||
else
|
||||
moving = 0
|
||||
speed = 0
|
||||
sleep(1)
|
||||
else
|
||||
processing_items.Remove(src)
|
||||
moving = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
if (prob(40))
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
|
||||
switch (pickweight(list("small" = 25, "aid" = 10, "tank" = 5, "both" = 5, "nothing" = 4, "delete" = 1)))
|
||||
switch (pickweight(list("fire" = 25, "small" = 25, "aid" = 10, "tank" = 5, "both" = 5, "nothing" = 4, "delete" = 1)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
@@ -26,3 +26,7 @@
|
||||
// teehee
|
||||
if ("delete")
|
||||
del(src)
|
||||
|
||||
if ("fire")
|
||||
new /obj/closet/firecloset(src.loc)
|
||||
del(src)
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
/obj/closet/firecloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
if (prob (1))
|
||||
del(src)
|
||||
return
|
||||
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
switch (pickweight(list("nothing" = 5, "bare-bones" = 35, "basic" = 40, "pickpocketed" = 10, "untouched" = 10)))
|
||||
if ("nothing")
|
||||
//better luck next time
|
||||
if ("bare-bones")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
|
||||
if ("basic")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("pickpocketed") //suit got stolen
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("untouched")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Reference in New Issue
Block a user