Mining Coin (#9428)

This commit is contained in:
Geeves
2020-09-01 14:09:18 +02:00
committed by GitHub
parent ea72ca6a61
commit d582622a54
11 changed files with 51 additions and 4 deletions
+6
View File
@@ -65,6 +65,12 @@
icon_state = "coin_battlemonsters_heads"
cmineral = "battlemonsters"
/obj/item/coin/mining
name = "mining coin"
desc = "A flat disc or piece of metal with an official stamp. This coin can be used at a mining vendor to gain access to additional equipment."
icon_state = "coin_mining_heads"
cmineral = "mining"
/obj/item/coin/attackby(obj/item/W, mob/user)
if(W.iscoil())
var/obj/item/stack/cable_coil/CC = W
+16 -1
View File
@@ -204,7 +204,22 @@ var/global/list/minevendor_list = list( //keep in order of price
return
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
if(istype(I,/obj/item/card/id))
if(istype(I, /obj/item/coin/mining))
var/choice = input(user, "Which special equipment would you like to dispense from \the [src]?", capitalize_first_letters(name)) as null|anything in list("Enhanced Power Converter", "Hand-held Drill")
if(!choice || !I || !Adjacent(user))
return
var/obj/dispensed_equipment
switch(choice)
if("Enhanced Power Converter")
dispensed_equipment = new /obj/item/custom_ka_upgrade/barrels/barrel02(src)
if("Hand-held Drill")
dispensed_equipment = new /obj/item/pickaxe/drill/weak(src)
if(dispensed_equipment)
to_chat(user, SPAN_NOTICE("\The [src] accepts your coin and dispenses \a [dispensed_equipment]."))
qdel(I)
user.put_in_hands(dispensed_equipment)
return
else if(istype(I,/obj/item/card/id))
var/obj/item/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
usr.drop_from_inventory(C,src)
+18 -2
View File
@@ -240,10 +240,12 @@
/obj/item/pickaxe/drill
name = "mining drill" // Can dig sand as well!
desc = "Yours is the drill that will pierce through the rock walls."
icon = 'icons/obj/contained_items/tools/drills.dmi'
icon_state = "miningdrill"
item_state = "miningdrill"
contained_sprite = TRUE
origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
desc = "Yours is the drill that will pierce through the rock walls."
drill_verb = "drilling"
autodrill = TRUE
drill_sound = 'sound/weapons/drill.ogg'
@@ -257,12 +259,24 @@
action_button_name = null
/obj/item/pickaxe/drill/weak
name = "shaft drill"
desc = "Baby's first mining drill. Slow, but reliable."
icon_state = "babydrill"
item_state = "babydrill"
digspeed = 5
digspeed_unwielded = 10
excavation_amount = 80
force = 10
/obj/item/pickaxe/jackhammer
name = "sonic jackhammer"
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
icon = 'icons/obj/contained_items/tools/drills.dmi'
icon_state = "jackhammer"
item_state = "jackhammer"
contained_sprite = TRUE
origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2)
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
drill_verb = "hammering"
autodrill = TRUE
drill_sound = 'sound/weapons/sonic_jackhammer.ogg'
@@ -302,8 +316,10 @@
/obj/item/pickaxe/diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
name = "diamond mining drill"
icon = 'icons/obj/contained_items/tools/drills.dmi'
icon_state = "diamonddrill"
item_state = "diamonddrill"
contained_sprite = TRUE
digspeed = 3 //Digs through walls, girders, and can dig up sand
origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 5)
desc = "Yours is the drill that will pierce the heavens!"