mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
TIME FOR CONTENT
-New item, the Sheet Snatcher. Picks up mineral sheets (Excluding wood and sandstone, since they aren't 'sheets' per se). Standard one holds up to 300 sheets, minerborgs get 500. Will hold any combination of sheets, and auto-stacks them when emptied, works similarly to the ore satchels -Mech drills can mine sand, with diamond drills getting an extended volume -Mech Diamond Drills will drill through rwalls again, but it is pretty slow, sometimes taking 5-6 tries just to get the plating off -Mining Ripleys no longer runtime to hell when the status panel is opened -Fixes Issue 572, now when floors are created, they assimilate air from nearby tiles, so if it's in space, there will be no air, etc... -Bumping an asteroid wall as a human or borg with a pickaxe in your hand will make you automattically start mining the wall, feels MUCH faster due to ignoring click_delay() -Miner borgs with the satchel in their active modules will automatically scoop up the ores -Clicking an asteroid turf with the satchel will function just as if you clicked on an ore (if any are present) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3867 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -249,7 +249,7 @@ proc/move_mining_shuttle()
|
||||
name = "Diamond Mining Drill"
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 0 //Digs through walls, girders, and can dig up sand
|
||||
digspeed = 5 //Digs through walls, girders, and can dig up sand
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5"
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/mineralAmt = 0
|
||||
var/spread = 0 //will the seam spread?
|
||||
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
|
||||
var/last_act = 0
|
||||
|
||||
/turf/simulated/mineral/Del()
|
||||
return
|
||||
@@ -216,7 +217,9 @@
|
||||
return
|
||||
*/
|
||||
//Watch your tabbing, microwave. --NEO
|
||||
|
||||
if(last_act+W:digspeed > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
user << "\red You start picking."
|
||||
playsound(user, 'Genhit.ogg', 20, 1)
|
||||
|
||||
@@ -263,6 +266,28 @@
|
||||
mineralAmt = 5
|
||||
return*/
|
||||
|
||||
/turf/simulated/mineral/Bumped(AM as mob|obj)
|
||||
..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.l_hand,/obj/item/weapon/pickaxe))
|
||||
src.attackby(H.l_hand,H)
|
||||
else if(istype(H.r_hand,/obj/item/weapon/pickaxe))
|
||||
src.attackby(H.r_hand,H)
|
||||
return
|
||||
else if(istype(AM,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
if(istype(R.module_active,/obj/item/weapon/pickaxe))
|
||||
src.attackby(R.module_active,R)
|
||||
return
|
||||
/* else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
src.attackby(M.selected,M)
|
||||
return*/
|
||||
//Aparantly mechs are just TOO COOL to call Bump(), so fuck em (for now)
|
||||
else
|
||||
return
|
||||
|
||||
/**********************Asteroid**************************/
|
||||
|
||||
@@ -320,8 +345,7 @@
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
else
|
||||
..(W,user)
|
||||
|
||||
if ((istype(W,/obj/item/weapon/pickaxe/drill)))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
@@ -338,8 +362,6 @@
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
else
|
||||
..(W,user)
|
||||
|
||||
if ((istype(W,/obj/item/weapon/pickaxe/diamonddrill)) || (istype(W,/obj/item/weapon/pickaxe/borgdrill)))
|
||||
var/turf/T = user.loc
|
||||
@@ -357,9 +379,16 @@
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
|
||||
if(istype(W,/obj/item/weapon/satchel))
|
||||
var/obj/item/weapon/satchel/S = W
|
||||
if(S.mode)
|
||||
for(var/obj/item/weapon/ore/O in src.contents)
|
||||
O.attackby(W,user)
|
||||
return
|
||||
|
||||
else
|
||||
..(W,user)
|
||||
|
||||
return
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/proc/gets_dug()
|
||||
@@ -415,4 +444,18 @@
|
||||
if(istype(get_step(src, SOUTH), /turf/simulated/floor/plating/airless/asteroid))
|
||||
A = get_step(src, SOUTH)
|
||||
A.updateMineralOverlays()
|
||||
src.updateMineralOverlays()
|
||||
src.updateMineralOverlays()
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/Entered(atom/movable/M as mob|obj)
|
||||
..()
|
||||
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/satchel/borg))
|
||||
src.attackby(R.module_state_1,R)
|
||||
else if(istype(R.module_state_2,/obj/item/weapon/satchel/borg))
|
||||
src.attackby(R.module_state_2,R)
|
||||
else if(istype(R.module_state_3,/obj/item/weapon/satchel/borg))
|
||||
src.attackby(R.module_state_3,R)
|
||||
else
|
||||
return
|
||||
@@ -120,4 +120,165 @@
|
||||
O.loc = src.loc
|
||||
usr << "\blue You empty the box"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
return
|
||||
|
||||
/**********************Sheet Snatcher**************************/
|
||||
//Stolen satchel code, making it a box just wouldn't work well for this -Sieve
|
||||
|
||||
/obj/item/weapon/sheetsnatcher
|
||||
icon = '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
|
||||
|
||||
/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)
|
||||
if(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
|
||||
if(glass)
|
||||
var/obj/item/stack/sheet/glass/S = new (location)
|
||||
var/stacksize = min(glass,50)
|
||||
S.amount = stacksize
|
||||
glass -= stacksize
|
||||
if(gold)
|
||||
var/obj/item/stack/sheet/gold/S = new (location)
|
||||
var/stacksize = min(gold,50)
|
||||
S.amount = stacksize
|
||||
gold -= stacksize
|
||||
if(silver)
|
||||
var/obj/item/stack/sheet/silver/S = new (location)
|
||||
var/stacksize = min(silver,50)
|
||||
S.amount = stacksize
|
||||
silver -= stacksize
|
||||
if(diamond)
|
||||
var/obj/item/stack/sheet/diamond/S = new (location)
|
||||
var/stacksize = min(diamond,50)
|
||||
S.amount = stacksize
|
||||
diamond -= stacksize
|
||||
if(plasma)
|
||||
var/obj/item/stack/sheet/plasma/S = new (location)
|
||||
var/stacksize = min(plasma,50)
|
||||
S.amount = stacksize
|
||||
plasma -= stacksize
|
||||
if(uranium)
|
||||
var/obj/item/stack/sheet/uranium/S = new (location)
|
||||
var/stacksize = min(uranium,50)
|
||||
S.amount = stacksize
|
||||
uranium -= stacksize
|
||||
if(clown)
|
||||
var/obj/item/stack/sheet/clown/S = new (location)
|
||||
var/stacksize = min(clown,50)
|
||||
S.amount = stacksize
|
||||
clown -= stacksize
|
||||
if(euranium)
|
||||
var/obj/item/stack/sheet/enruranium/S = new (location)
|
||||
var/stacksize = min(euranium,50)
|
||||
S.amount = stacksize
|
||||
euranium -= stacksize
|
||||
if(plasteel)
|
||||
var/obj/item/stack/sheet/plasteel/S = new (location)
|
||||
var/stacksize = min(plasteel,50)
|
||||
S.amount = stacksize
|
||||
plasteel -= stacksize
|
||||
else if(!metal && !glass && !gold && !silver && !diamond && !plasma && !uranium && !clown && !euranium && !plasteel)
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
Reference in New Issue
Block a user