Couple of changes. Starting on the point bank.

This commit is contained in:
BlackMajor
2019-12-31 23:28:30 +13:00
parent c14a639f6e
commit 8085022d97
8 changed files with 127 additions and 10 deletions

View File

@@ -16,7 +16,7 @@
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 = 0
var/digrange = 1
/obj/item/pickaxe/attack_self(mob/user)
if(initial(digrange) > 0)
@@ -26,7 +26,7 @@
to_chat(user, "<span class='notice'>You increase the tools dig range, decreasing its mining speed.</span>")
else
digrange = 0
toolspeed = toolspeed/3
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>")
@@ -65,7 +65,6 @@
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
force = 19
materials = list(MAT_DIAMOND=4000)
digrange = 1
/obj/item/pickaxe/drill
name = "mining drill"
@@ -79,10 +78,9 @@
/obj/item/pickaxe/drill/cyborg
name = "cyborg mining drill"
desc = "An integrated electric mining drill. Mines in 3 wide"
desc = "An integrated electric mining drill."
flags_1 = NONE
toolspeed = 0.5
digrange = 1
/obj/item/pickaxe/drill/cyborg/Initialize()
. = ..()
@@ -93,7 +91,6 @@
icon_state = "diamonddrill"
toolspeed = 0.4
desc = "Yours is the drill that will pierce the heavens!"
digrange = 1
/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.
@@ -106,7 +103,6 @@
icon_state = "jackhammer"
item_state = "jackhammer"
w_class = WEIGHT_CLASS_HUGE
digrange = 2
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'

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