Removes mining drill power mechanic.

- Removes the power mechanic from mining drills and the sonic
jackhammer.
- Fixes broken borg diamond drill upgrade.
This commit is contained in:
GunHog
2015-05-08 10:12:22 -05:00
parent 2febf4dacd
commit 26df5b6c8e
12 changed files with 19 additions and 119 deletions
+9 -65
View File
@@ -74,94 +74,38 @@
name = "mining drill"
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 25 //available from roundstart, faster than a pickaxe but needs recharging or cell replacements
digspeed = 25 //available from roundstart, faster than a pickaxe.
digsound = list('sound/weapons/drill.ogg')
hitsound = 'sound/weapons/drill.ogg'
origin_tech = "materials=2;powerstorage=3;engineering=2"
desc = "An electric mining drill for the especially scrawny."
var/drillcost = 15 //666 mineral walls by default
var/obj/item/weapon/stock_parts/cell/high/bcell = null
/obj/item/weapon/pickaxe/drill/New() //this one starts with a cell pre-installed.
..()
bcell = new(src)
return
/obj/item/weapon/pickaxe/drill/update_icon()
if(!bcell)
icon_state = "[initial(icon_state)]-nocell"
else if(bcell.charge < drillcost)
icon_state = "[initial(icon_state)]-empty"
else
icon_state = "[initial(icon_state)]"
/obj/item/weapon/pickaxe/drill/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
user.drop_item()
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
else
..()
/obj/item/weapon/pickaxe/drill/attack_self(mob/user)
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from [src].</span>"
update_icon()
else
user << "<span class='notice'>There is no cell in [src].</span>"
/obj/item/weapon/pickaxe/drill/examine(mob/user)
..()
if(bcell)
user <<"<span class='notice'>The [src.name] is [round(bcell.percent())]% charged.</span>"
if(!bcell)
user <<"<span class='warning'>The [src.name] does not have a power source installed.</span>"
/obj/item/weapon/pickaxe/drill/cyborg
name = "cyborg mining drill"
desc = "An integrated electric mining drill."
var/warned = 0
/obj/item/weapon/pickaxe/drill/cyborg/attack_self(mob/user)
return //can't remove the drill's cell
/obj/item/weapon/pickaxe/drill/cyborg/proc/use_robot_power(var/mob/living/silicon/robot/R)
if(!bcell.use(drillcost))
if(!warned)
usr << "<span class='danger'>Drill internal battery depleted, power will be drawn from user's power supply.</span>"
playsound(src, 'sound/weapons/smg_empty_alarm.ogg',50,1)
warned = 1
if(!R.cell.use(drillcost))
R << "<span class='warning'>You don't have enough charge to drill!</span>"
return 0
return 1
flags = NODROP
/obj/item/weapon/pickaxe/drill/diamonddrill
name = "diamond-tipped mining drill"
icon_state = "diamonddrill"
digspeed = 10 //it's a fast drill with a relatively low power cost. what more could you ask for?
digspeed = 10
origin_tech = "materials=6;powerstorage=4;engineering=5"
desc = "Yours is the drill that will pierce the heavens!"
drillcost = 25 //400 mineral walls by default, but very quickly
/obj/item/weapon/pickaxe/drill/cyborg/diamond //This is the BORG version!
name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics.
icon_state = "diamonddrill"
digspeed = 10
/obj/item/weapon/pickaxe/drill/jackhammer
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 5 //the epitome of powertools. high power consumption, extremely fast mining, laughs at puny walls
digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls
origin_tech = "materials=3;powerstorage=2;engineering=2"
digsound = list('sound/weapons/sonic_jackhammer.ogg')
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
drillcost = 30 //333 mineral walls by default, but very quickly
/*****************************Shovel********************************/
-10
View File
@@ -414,16 +414,6 @@
if (!( istype(T, /turf) ))
return
if(istype(P, /obj/item/weapon/pickaxe/drill))
var/obj/item/weapon/pickaxe/drill/D = P
if(isrobot(user))
var/obj/item/weapon/pickaxe/drill/cyborg/RD = D
if(!RD.use_robot_power(user))
return
else if(!D.bcell.use(D.drillcost))
user << "<span class='warning'>Your [D.name] doesn't have enough charge!</span>"
return
if(last_act+P.digspeed > world.time)//prevents message spam
return
last_act = world.time
+1 -1
View File
@@ -171,7 +171,7 @@ datum/design/proc/CalcReliability(var/list/temp_techs)
/datum/design/jackhammer
name = "Sonic Jackhammer"
desc = "Essentially a handheld planet-cracker. Can drill through walls with ease as well, but has high power cost for doing so."
desc = "Essentially a handheld planet-cracker. Can drill through walls with ease as well."
id = "jackhammer"
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6)
build_type = PROTOLATHE