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:
@@ -1209,6 +1209,15 @@
|
||||
throw_range = 3
|
||||
var/perunit = 3750
|
||||
|
||||
/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/sheetsnatcher))
|
||||
var/obj/item/weapon/sheetsnatcher/S = W
|
||||
if(!S.mode)
|
||||
S.add(src,user)
|
||||
else
|
||||
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
|
||||
S.add(stack,user)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
name = "wooden planks"
|
||||
desc = "One can only guess that this is a bunch of wood."
|
||||
|
||||
@@ -114,6 +114,51 @@
|
||||
equip_cooldown = 20
|
||||
force = 15
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<font color='red'><b>[chassis] starts to drill [target]</b></font>", "You hear the drill.")
|
||||
occupant_message("<font color='red'><b>You start to drill [target]</b></font>")
|
||||
var/T = chassis.loc
|
||||
var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(3)
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.gets_drilled()
|
||||
log_message("Drilled through [target]")
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
ore.Move(ore_box)
|
||||
else if(istype(target,/turf/simulated/floor/plating/airless/asteroid))
|
||||
for(var/turf/simulated/floor/plating/airless/asteroid/M in range(target,1))
|
||||
M.gets_dug()
|
||||
log_message("Drilled through [target]")
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in range(chassis,1))
|
||||
ore.Move(ore_box)
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
can_attach(obj/mecha/M as obj)
|
||||
if(..())
|
||||
if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher
|
||||
name = "Extinguisher"
|
||||
desc = "Exosuit-mounted extinguisher (Can be attached to: Engineering exosuits)"
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
name = "APLU \"Miner\""
|
||||
|
||||
/obj/mecha/working/ripley/mining/New()
|
||||
//Do not use ..() here, doing so would spawn it with a tracking beacon allowing people to find secret mining asteroid rooms easily.
|
||||
|
||||
..()
|
||||
//Attach drill
|
||||
if(prob(25)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
@@ -59,6 +58,8 @@
|
||||
//Attach hydrolic clamp
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
HC.attach(src)
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily
|
||||
del (B)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
|
||||
@@ -151,9 +151,32 @@
|
||||
/turf/proc/ReplaceWithFloor(explode=0)
|
||||
var/prior_icon = icon_old
|
||||
var/old_dir = dir
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
var/aco = 0
|
||||
var/atox = 0
|
||||
var/atemp = 0
|
||||
|
||||
var/turf/simulated/floor/W = new /turf/simulated/floor( locate(src.x, src.y, src.z) )
|
||||
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))
|
||||
continue
|
||||
else if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)
|
||||
aoxy += S.air.oxygen
|
||||
anitro += S.air.nitrogen
|
||||
aco += S.air.carbon_dioxide
|
||||
atox += S.air.toxins
|
||||
atemp += S.air.temperature
|
||||
W.air.oxygen = (aoxy/4)
|
||||
W.air.nitrogen = (anitro/4)
|
||||
W.air.carbon_dioxide = (aco/4)
|
||||
W.air.toxins = (atox/4)
|
||||
W.air.temperature = (atemp/4)
|
||||
|
||||
W.RemoveLattice()
|
||||
W.dir = old_dir
|
||||
if(prior_icon) W.icon_state = prior_icon
|
||||
@@ -169,8 +192,31 @@
|
||||
/turf/proc/ReplaceWithPlating()
|
||||
var/prior_icon = icon_old
|
||||
var/old_dir = dir
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
var/aco = 0
|
||||
var/atox = 0
|
||||
var/atemp = 0
|
||||
|
||||
var/turf/simulated/floor/plating/W = new /turf/simulated/floor/plating( locate(src.x, src.y, src.z) )
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))
|
||||
continue
|
||||
else if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)
|
||||
aoxy += S.air.oxygen
|
||||
anitro += S.air.nitrogen
|
||||
aco += S.air.carbon_dioxide
|
||||
atox += S.air.toxins
|
||||
atemp += S.air.temperature
|
||||
W.air.oxygen = (aoxy/4)
|
||||
W.air.oxygen = (aoxy/4)
|
||||
W.air.nitrogen = (anitro/4)
|
||||
W.air.carbon_dioxide = (aco/4)
|
||||
W.air.toxins = (atox/4)
|
||||
W.air.temperature = (atemp/4)
|
||||
|
||||
W.RemoveLattice()
|
||||
W.dir = old_dir
|
||||
|
||||
@@ -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
|
||||
@@ -198,8 +198,8 @@
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
src.modules += new /obj/item/weapon/satchel/borg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
|
||||
src.modules += new /obj/item/weapon/sheetsnatcher/borg(src)
|
||||
// src.modules += new /obj/item/weapon/shovel(src) Uneeded due to buffed drill
|
||||
// src.jetpack += new/obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,21 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">June 18th, 2012</h2>
|
||||
<h3 class="author">Sieve updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Various small bugfixes, check the commit log for full details</li>
|
||||
<li class="bugfix">Fixed falsewalls not working</li>
|
||||
<li class="tweak">Made Lasertag ED-209's and turrets much more useful, including making their emag function more fitting</li>
|
||||
<li class="tweak">Added Mesons to the EngiVend to make up for how many lockers were removed</li>
|
||||
<li class="rscadd">New Item: Sheet Snatcher. Right now only borgs have them, but they can hold up to 500 sheets of minerals (Of any combination), and auto-stacks them to boot. Used just like the mining satchels, meaning minerborgs can actually deliver metal</li>
|
||||
<li class="rscadd">Mech drills can mine sand, and the diamond gets a much larger volume</li>
|
||||
<li class="rscadd">If a borg has the satchel in its modules (Doesn't have to be the active one), it will auto-magically pick up any ores it walks over.</li>
|
||||
<li class="rscadd">Bumping an asteroid wall with a pickaxe/drill in your hand makes you auto-magically start drilling the wall, making mining much less tedious (humans and borgs)(Also, gustavg's idea)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Monday, June 18th</h2>
|
||||
<h3 class="author">Icarus updated:</h3>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
Reference in New Issue
Block a user