mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Couple of changes. Starting on the point bank.
This commit is contained in:
@@ -886,5 +886,6 @@
|
||||
|
||||
/obj/item/card/id/miningborg
|
||||
name = "mining point card"
|
||||
desc = "A robotic ID strip used for claiming and transferring mining points. Must be held in an active slot to transfer points."
|
||||
access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
|
||||
icon_state = "data_1"
|
||||
@@ -63,9 +63,10 @@
|
||||
to_chat(user, "<span class='notice'>You start picking...</span>")
|
||||
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
var/range = I.digrange //Store the current digrange so people don't cheese digspeed swapping for faster mining
|
||||
if(ismineralturf(src))
|
||||
if(I.digrange > 0)
|
||||
for(var/turf/closed/mineral/M in range(user,I.digrange))
|
||||
for(var/turf/closed/mineral/M in range(user,range))
|
||||
if(get_dir(user,M)&user.dir)
|
||||
M.gets_drilled()
|
||||
to_chat(user, "<span class='notice'>You finish cutting into the rock.</span>")
|
||||
|
||||
@@ -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'
|
||||
|
||||
49
code/modules/mining/point_bank.dm
Normal file
49
code/modules/mining/point_bank.dm
Normal 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
|
||||
@@ -629,7 +629,16 @@
|
||||
id = "borg_upgrade_advcutter"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/borg/upgrade/advcutter
|
||||
materials = list(MAT_METAL=8000, MAT_PLASMA=2000)
|
||||
materials = list(MAT_METAL=8000, MAT_PLASMA=2000, MAT_GOLD= 2000)
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
/datum/design/borg_upgrade_premiumka
|
||||
name = "Cyborg Upgrade (Premium Kinetic Accelerator)"
|
||||
id = "borg_upgrade_premiumka"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/borg/upgrade/premiumka
|
||||
materials = list(MAT_METAL=8000, MAT_GLASS=4000, MAT_TITANIUM=2000)
|
||||
construction_time = 120
|
||||
category = list("Cyborg Upgrade Modules")
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
display_name = "Advanced Robotics Research"
|
||||
description = "It can even do the dishes!"
|
||||
prereq_ids = list("robotics")
|
||||
design_ids = list("borg_upgrade_diamonddrill", "borg_upgrade_advancedmop", "borg_upgrade_advcutter")
|
||||
design_ids = list("borg_upgrade_diamonddrill", "borg_upgrade_advancedmop", "borg_upgrade_advcutter", "borg_upgrade_premiumka")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000)
|
||||
export_price = 5000
|
||||
|
||||
|
||||
@@ -2023,6 +2023,7 @@
|
||||
#include "code\modules\mining\mint.dm"
|
||||
#include "code\modules\mining\money_bag.dm"
|
||||
#include "code\modules\mining\ores_coins.dm"
|
||||
#include "code\modules\mining\point_bank.dm"
|
||||
#include "code\modules\mining\satchel_ore_boxdm.dm"
|
||||
#include "code\modules\mining\shelters.dm"
|
||||
#include "code\modules\mining\equipment\explorer_gear.dm"
|
||||
|
||||
60
tgui/src/interfaces/point_bank.ract
Normal file
60
tgui/src/interfaces/point_bank.ract
Normal file
@@ -0,0 +1,60 @@
|
||||
<ui-display>
|
||||
<ui-section>
|
||||
Current stored points: {{data.totalPoints}}
|
||||
<div class="display tabular">
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
-All
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
-1000
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
-100
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
-10
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
-1
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
Transfer Points
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
+1
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
+10
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
+100
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
+1000
|
||||
</ui-button>
|
||||
</section>
|
||||
<section class="cell">
|
||||
<ui-button action='Claim'>
|
||||
+All
|
||||
</ui-button>
|
||||
</section>
|
||||
</div>
|
||||
</ui-section>
|
||||
</ui-display>
|
||||
Reference in New Issue
Block a user