Merge pull request #10305 from BlackMajor/Yeehaw

Various Mining borg changes. And some extras.
This commit is contained in:
Putnam3145
2020-01-07 16:50:21 -08:00
committed by GitHub
25 changed files with 395 additions and 91 deletions
@@ -29,6 +29,15 @@
var/light_on = FALSE
var/brightness_on = 7
/obj/item/twohanded/kinetic_crusher/cyborg //probably give this a unique sprite later
desc = "An integrated version of the standard kinetic crusher with a grinded down axe head to dissuade mis-use against crewmen. Deals damage equal to the standard crusher against creatures, however."
force = 10 //wouldn't want to give a borg a 20 brute melee weapon unemagged now would we
detonation_damage = 60
wielded = 1
/obj/item/twohanded/kinetic_crusher/cyborg/unwield()
return
/obj/item/twohanded/kinetic_crusher/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 60, 110) //technically it's huge and bulky, but this provides an incentive to use it
+20 -3
View File
@@ -16,6 +16,20 @@
toolspeed = 1
usesound = list('sound/effects/picaxe1.ogg', 'sound/effects/picaxe2.ogg', 'sound/effects/picaxe3.ogg')
attack_verb = list("hit", "pierced", "sliced", "attacked")
var/digrange = 1
/obj/item/pickaxe/attack_self(mob/user)
if(initial(digrange) > 0)
if(digrange == 0)
digrange = initial(digrange)
toolspeed = initial(toolspeed)
to_chat(user, "<span class='notice'>You increase the tools dig range, decreasing its mining speed.</span>")
else
digrange = 0
toolspeed = toolspeed/2
to_chat(user, "<span class='notice'>You decrease the tools dig range, increasing its mining speed.</span>")
else
to_chat(user, "<span class='notice'>Tool does not have a configureable dig range.</span>")
/obj/item/pickaxe/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins digging into [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -66,6 +80,7 @@
name = "cyborg mining drill"
desc = "An integrated electric mining drill."
flags_1 = NONE
toolspeed = 0.5
/obj/item/pickaxe/drill/cyborg/Initialize()
. = ..()
@@ -74,23 +89,25 @@
/obj/item/pickaxe/drill/diamonddrill
name = "diamond-tipped mining drill"
icon_state = "diamonddrill"
toolspeed = 0.2
toolspeed = 0.4
desc = "Yours is the drill that will pierce the heavens!"
/obj/item/pickaxe/drill/cyborg/diamond //This is the BORG version!
name = "diamond-tipped cyborg mining drill" //To inherit the NODROP_1 flag, and easier to change borg specific drill mechanics.
icon_state = "diamonddrill"
toolspeed = 0.1
toolspeed = 0.4
digrange = 2
/obj/item/pickaxe/drill/jackhammer
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
w_class = WEIGHT_CLASS_HUGE
toolspeed = 0.1 //the epitome of powertools. extremely fast mining, laughs at puny walls
toolspeed = 0.2 //the epitome of powertools. extremely fast mining, laughs at puny walls
usesound = '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."
digrange = 2
/obj/item/shovel
name = "shovel"
+49
View File
@@ -0,0 +1,49 @@
/obj/machinery/point_bank
name = "mining point bank"
desc = "A wall mounted machine that can be used to store and transfer mining points. Sharing is caring!"
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "ore_redemption"
density = FALSE
req_access = list(ACCESS_MINERAL_STOREROOM)
circuit = null
layer = BELOW_OBJ_LAYER
var/points = 0
/obj/machinery/point_bank/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "point_bank", "Point Bank", 200, 100, master_ui, state)
ui.open()
/obj/machinery/point_bank/ui_data(mob/user)
var/list/data = list()
data["totalPoints"] = points
return data
/obj/machinery/mineral/ore_redemption/ui_act(action, params)
if(..())
return
switch(action)
if("Claim")
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(points)
if(I)
I.mining_points += points
points = 0
else
to_chat(usr, "<span class='warning'>No ID detected.</span>")
else
to_chat(usr, "<span class='warning'>No points to claim.</span>")
return TRUE
/obj/machinery/point_bank/power_change()
..()
update_icon()
/obj/machinery/point_bank/update_icon()
if(powered())
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-off"
return