mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Re-organizes Lavaland Files; Makes some Balacne tweaks
This commit is contained in:
@@ -40,9 +40,11 @@
|
||||
if(21 to 25)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/poster/random_contraband(src)
|
||||
if(26 to 35)
|
||||
if(26 to 30)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/glass/beaker/noreact(src)
|
||||
if(31 to 35)
|
||||
new /obj/item/seeds/firelemon(src)
|
||||
if(36 to 40)
|
||||
new /obj/item/melee/baton(src)
|
||||
if(41 to 45)
|
||||
@@ -109,7 +111,7 @@
|
||||
if(90)
|
||||
new /obj/item/organ/internal/heart(src)
|
||||
if(91)
|
||||
new /obj/item/soulstone(src)
|
||||
new /obj/item/soulstone/anybody(src)
|
||||
if(92)
|
||||
new /obj/item/katana(src)
|
||||
if(93)
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
/*****************************Coin********************************/
|
||||
|
||||
/obj/item/coin
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
name = "coin"
|
||||
icon_state = "coin__heads"
|
||||
flags = CONDUCT
|
||||
force = 1
|
||||
throwforce = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/string_attached
|
||||
var/list/sideslist = list("heads","tails")
|
||||
var/cmineral = null
|
||||
var/cooldown = 0
|
||||
var/credits = 10
|
||||
|
||||
/obj/item/coin/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
icon_state = "coin_[cmineral]_[sideslist[1]]"
|
||||
if(cmineral)
|
||||
name = "[cmineral] coin"
|
||||
|
||||
/obj/item/coin/gold
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
materials = list(MAT_GOLD = 400)
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/silver
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
materials = list(MAT_SILVER = 400)
|
||||
credits = 40
|
||||
|
||||
/obj/item/coin/diamond
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
materials = list(MAT_DIAMOND = 400)
|
||||
credits = 120
|
||||
|
||||
/obj/item/coin/iron
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
materials = list(MAT_METAL = 400)
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/plasma
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
materials = list(MAT_PLASMA = 400)
|
||||
credits = 80
|
||||
|
||||
/obj/item/coin/uranium
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
materials = list(MAT_URANIUM = 400)
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/clown
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
materials = list(MAT_BANANIUM = 400)
|
||||
credits = 600 //makes the clown cri
|
||||
|
||||
/obj/item/coin/mime
|
||||
cmineral = "tranquillite"
|
||||
icon_state = "coin_tranquillite_heads"
|
||||
materials = list(MAT_TRANQUILLITE = 400)
|
||||
credits = 600 //makes the mime cri
|
||||
|
||||
/obj/item/coin/adamantine
|
||||
cmineral = "adamantine"
|
||||
icon_state = "coin_adamantine_heads"
|
||||
credits = 400
|
||||
|
||||
/obj/item/coin/mythril
|
||||
cmineral = "mythril"
|
||||
icon_state = "coin_mythril_heads"
|
||||
credits = 400
|
||||
|
||||
/obj/item/coin/twoheaded
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/antagtoken
|
||||
name = "antag token"
|
||||
icon_state = "coin_valid_valid"
|
||||
cmineral = "valid"
|
||||
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
|
||||
sideslist = list("valid", "salad")
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/antagtoken/syndicate
|
||||
name = "syndicate coin"
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
to_chat(user, "<span class='notice'>There already is a string attached to this coin.</span>")
|
||||
return
|
||||
|
||||
if(CC.use(1))
|
||||
overlays += image('icons/obj/economy.dmi',"coin_string_overlay")
|
||||
string_attached = 1
|
||||
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/wirecutters))
|
||||
if(!string_attached)
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 1
|
||||
CC.update_icon()
|
||||
overlays = list()
|
||||
string_attached = null
|
||||
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
|
||||
else if(istype(W,/obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.welding && WT.remove_fuel(0, user))
|
||||
var/typelist = list("iron" = /obj/item/clothing/gloves/ring,
|
||||
"silver" = /obj/item/clothing/gloves/ring/silver,
|
||||
"gold" = /obj/item/clothing/gloves/ring/gold,
|
||||
"plasma" = /obj/item/clothing/gloves/ring/plasma,
|
||||
"uranium" = /obj/item/clothing/gloves/ring/uranium)
|
||||
var/typekey = typelist[cmineral]
|
||||
if(ispath(typekey))
|
||||
to_chat(user, "<span class='notice'>You make [src] into a ring.</span>")
|
||||
new typekey(get_turf(loc))
|
||||
qdel(src)
|
||||
else ..()
|
||||
|
||||
/obj/item/coin/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 15)
|
||||
var/coinflip = pick(sideslist)
|
||||
cooldown = world.time
|
||||
flick("coin_[cmineral]_flip", src)
|
||||
icon_state = "coin_[cmineral]_[coinflip]"
|
||||
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
|
||||
if(do_after(user, 15, target = src))
|
||||
user.visible_message("<span class='notice'>[user] has flipped [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You hear the clattering of loose change.</span>")
|
||||
@@ -0,0 +1,122 @@
|
||||
/**********************Lazarus Injector**********************/
|
||||
/obj/item/lazarus_injector
|
||||
name = "lazarus injector"
|
||||
desc = "An injector with a cocktail of nanomachines and chemicals, this device can seemingly raise animals from the dead, making them become friendly to the user. Unfortunately, the process is useless on higher forms of life and incredibly costly, so these were hidden in storage until an executive thought they'd be great motivation for some of their employees."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
icon_state = "lazarus_hypo"
|
||||
item_state = "hypo"
|
||||
origin_tech = "biotech=4;magnets=6"
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
var/loaded = 1
|
||||
var/malfunctioning = 0
|
||||
var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it
|
||||
|
||||
/obj/item/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!loaded)
|
||||
return
|
||||
if(istype(target, /mob/living) && proximity_flag)
|
||||
if(istype(target, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/M = target
|
||||
if(M.sentience_type != revive_type)
|
||||
to_chat(user, "<span class='info'>[src] does not work on this sort of creature.</span>")
|
||||
return
|
||||
if(M.stat == DEAD)
|
||||
M.faction = list("neutral")
|
||||
M.revive()
|
||||
M.can_collar = 1
|
||||
if(istype(target, /mob/living/simple_animal/hostile))
|
||||
var/mob/living/simple_animal/hostile/H = M
|
||||
if(malfunctioning)
|
||||
H.faction |= list("lazarus", "\ref[user]")
|
||||
H.robust_searching = 1
|
||||
H.friends += user
|
||||
H.attack_same = 1
|
||||
log_game("[user] has revived hostile mob [target] with a malfunctioning lazarus injector")
|
||||
else
|
||||
H.attack_same = 0
|
||||
loaded = 0
|
||||
user.visible_message("<span class='notice'>[user] injects [M] with [src], reviving it.</span>")
|
||||
playsound(src,'sound/effects/refill.ogg',50,1)
|
||||
icon_state = "lazarus_empty"
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='info'>[src] is only effective on the dead.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='info'>[src] is only effective on lesser beings.</span>")
|
||||
return
|
||||
|
||||
/obj/item/lazarus_injector/emag_act(mob/user)
|
||||
if(!malfunctioning)
|
||||
malfunctioning = 1
|
||||
to_chat(user, "<span class='notice'>You override [src]'s safety protocols.</span>")
|
||||
|
||||
/obj/item/lazarus_injector/emp_act()
|
||||
if(!malfunctioning)
|
||||
malfunctioning = 1
|
||||
|
||||
/obj/item/lazarus_injector/examine(mob/user)
|
||||
..(user)
|
||||
if(!loaded)
|
||||
to_chat(user, "<span class='info'>[src] is empty.</span>")
|
||||
if(malfunctioning)
|
||||
to_chat(user, "<span class='info'>The display on [src] seems to be flickering.</span>")
|
||||
|
||||
/*********************Mob Capsule*************************/
|
||||
|
||||
/obj/item/mobcapsule
|
||||
name = "lazarus capsule"
|
||||
desc = "It allows you to store and deploy lazarus-injected creatures easier."
|
||||
icon = 'icons/obj/mobcap.dmi'
|
||||
icon_state = "mobcap0"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_range = 20
|
||||
var/mob/living/simple_animal/captured = null
|
||||
var/colorindex = 0
|
||||
|
||||
/obj/item/mobcapsule/Destroy()
|
||||
if(captured)
|
||||
captured.ghostize()
|
||||
QDEL_NULL(captured)
|
||||
return ..()
|
||||
|
||||
/obj/item/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
|
||||
if(!istype(A, /mob/living/simple_animal) || isbot(A))
|
||||
return ..()
|
||||
capture(A, user)
|
||||
return 1
|
||||
|
||||
/obj/item/mobcapsule/proc/capture(var/mob/target, var/mob/U as mob)
|
||||
var/mob/living/simple_animal/T = target
|
||||
if(captured)
|
||||
to_chat(U, "<span class='notice'>Capture failed!</span>: The capsule already has a mob registered to it!")
|
||||
else
|
||||
if(istype(T) && "neutral" in T.faction)
|
||||
T.forceMove(src)
|
||||
T.name = "[U.name]'s [initial(T.name)]"
|
||||
T.cancel_camera()
|
||||
name = "Lazarus Capsule: [initial(T.name)]"
|
||||
to_chat(U, "<span class='notice'>You placed a [T.name] inside the Lazarus Capsule!</span>")
|
||||
captured = T
|
||||
else
|
||||
to_chat(U, "You can't capture that mob!")
|
||||
|
||||
/obj/item/mobcapsule/throw_impact(atom/A, mob/user)
|
||||
..()
|
||||
if(captured)
|
||||
dump_contents(user)
|
||||
|
||||
/obj/item/mobcapsule/proc/dump_contents(mob/user)
|
||||
if(captured)
|
||||
captured.forceMove(get_turf(src))
|
||||
captured = null
|
||||
|
||||
/obj/item/mobcapsule/attack_self(mob/user)
|
||||
colorindex += 1
|
||||
if(colorindex >= 6)
|
||||
colorindex = 0
|
||||
icon_state = "mobcap[colorindex]"
|
||||
update_icon()
|
||||
@@ -0,0 +1,116 @@
|
||||
/**********************Mining Scanner**********************/
|
||||
/obj/item/mining_scanner
|
||||
desc = "A scanner that checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear material scanners for optimal results."
|
||||
name = "manual mining scanner"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "mining1"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/cooldown = 0
|
||||
origin_tech = "engineering=1;magnets=1"
|
||||
|
||||
/obj/item/mining_scanner/attack_self(mob/user)
|
||||
if(!user.client)
|
||||
return
|
||||
if(!cooldown)
|
||||
cooldown = 1
|
||||
spawn(40)
|
||||
cooldown = 0
|
||||
var/list/mobs = list()
|
||||
mobs |= user
|
||||
mineral_scan_pulse(mobs, get_turf(user))
|
||||
|
||||
|
||||
//Debug item to identify all ore spread quickly
|
||||
/obj/item/mining_scanner/admin
|
||||
|
||||
/obj/item/mining_scanner/admin/attack_self(mob/user)
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
if(M.scan_state)
|
||||
M.icon_state = M.scan_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner
|
||||
desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear meson scanners for optimal results. This one has an extended range."
|
||||
name = "advanced automatic mining scanner"
|
||||
icon_state = "mining0"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/cooldown = 35
|
||||
var/on_cooldown = 0
|
||||
var/range = 7
|
||||
var/meson = TRUE
|
||||
origin_tech = "engineering=3;magnets=3"
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/cyborg
|
||||
flags = CONDUCT | NODROP
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/material
|
||||
meson = FALSE
|
||||
desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear material scanners for optimal results. This one has an extended range."
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/lesser
|
||||
name = "automatic mining scanner"
|
||||
desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear meson scanners for optimal results."
|
||||
range = 4
|
||||
cooldown = 50
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/lesser/material
|
||||
desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Wear material scanners for optimal results."
|
||||
meson = FALSE
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner/scan()
|
||||
if(!on_cooldown)
|
||||
on_cooldown = 1
|
||||
spawn(cooldown)
|
||||
on_cooldown = 0
|
||||
var/turf/t = get_turf(src)
|
||||
var/list/mobs = recursive_mob_check(t, client_check = 1, sight_check = 0, include_radio = 0)
|
||||
if(!mobs.len)
|
||||
return
|
||||
if(meson)
|
||||
mineral_scan_pulse(mobs, t, range)
|
||||
else
|
||||
mineral_scan_pulse_material(mobs, t, range)
|
||||
|
||||
//For use with mesons
|
||||
/proc/mineral_scan_pulse(list/mobs, turf/T, range = world.view)
|
||||
var/list/minerals = list()
|
||||
for(var/turf/simulated/mineral/M in range(range, T))
|
||||
if(M.scan_state)
|
||||
minerals += M
|
||||
if(minerals.len)
|
||||
for(var/mob/user in mobs)
|
||||
if(user.client)
|
||||
var/client/C = user.client
|
||||
for(var/turf/simulated/mineral/M in minerals)
|
||||
var/turf/F = get_turf(M)
|
||||
var/image/I = image('icons/turf/mining.dmi', loc = F, icon_state = M.scan_state, layer = 18)
|
||||
C.images += I
|
||||
spawn(30)
|
||||
if(C)
|
||||
C.images -= I
|
||||
|
||||
//For use with material scanners
|
||||
/proc/mineral_scan_pulse_material(list/mobs, turf/T, range = world.view)
|
||||
var/list/minerals = list()
|
||||
for(var/turf/simulated/mineral/M in range(range, T))
|
||||
if(M.scan_state)
|
||||
minerals += M
|
||||
if(minerals.len)
|
||||
for(var/turf/simulated/mineral/M in minerals)
|
||||
var/obj/effect/temp_visual/mining_overlay/C = new/obj/effect/temp_visual/mining_overlay(M)
|
||||
C.icon_state = M.scan_state
|
||||
|
||||
/obj/effect/temp_visual/mining_overlay
|
||||
layer = 18
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
anchored = 1
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
duration = 30
|
||||
pixel_x = -4
|
||||
pixel_y = -4
|
||||
@@ -0,0 +1,142 @@
|
||||
/*****************Pickaxes & Drills & Shovels****************/
|
||||
/obj/item/pickaxe
|
||||
name = "pickaxe"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pickaxe"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 15
|
||||
throwforce = 10
|
||||
item_state = "pickaxe"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
|
||||
origin_tech = "materials=2;engineering=3"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg')
|
||||
var/drill_verb = "picking"
|
||||
sharp = 1
|
||||
var/excavation_amount = 100
|
||||
usesound = 'sound/effects/picaxe1.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/pickaxe/proc/playDigSound()
|
||||
playsound(src, pick(digsound),20,1)
|
||||
|
||||
/obj/item/pickaxe/emergency
|
||||
name = "emergency disembarkation tool"
|
||||
desc = "For extracting yourself from rough landings."
|
||||
|
||||
/obj/item/pickaxe/safety
|
||||
name = "safety pickaxe"
|
||||
desc = "A pickaxe designed to be only effective at digging rock and ore, very ineffective as a weapon."
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("ineffectively hit")
|
||||
|
||||
/obj/item/pickaxe/mini
|
||||
name = "compact pickaxe"
|
||||
desc = "A smaller, compact version of the standard pickaxe."
|
||||
icon_state = "minipick"
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
/obj/item/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
origin_tech = "materials=3;engineering=4"
|
||||
toolspeed = 0.5 //mines faster than a normal pickaxe, bought from mining vendor
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
force = 17
|
||||
|
||||
/obj/item/pickaxe/gold
|
||||
name = "golden pickaxe"
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
toolspeed = 0.4
|
||||
desc = "A gold-plated pickaxe that mines faster than standard-issue."
|
||||
force = 18
|
||||
|
||||
/obj/item/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
origin_tech = "materials=5;engineering=4"
|
||||
toolspeed = 0.3
|
||||
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
|
||||
force = 19
|
||||
|
||||
/obj/item/pickaxe/drill
|
||||
name = "mining drill"
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digsound = list('sound/weapons/drill.ogg')
|
||||
toolspeed = 0.6 //available from roundstart, faster than a pickaxe.
|
||||
hitsound = 'sound/weapons/drill.ogg'
|
||||
usesound = 'sound/weapons/drill.ogg'
|
||||
origin_tech = "materials=2;powerstorage=2;engineering=3"
|
||||
desc = "An electric mining drill for the especially scrawny."
|
||||
|
||||
/obj/item/pickaxe/drill/cyborg
|
||||
name = "cyborg mining drill"
|
||||
desc = "An integrated electric mining drill."
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/pickaxe/drill/diamonddrill
|
||||
name = "diamond-tipped mining drill"
|
||||
icon_state = "diamonddrill"
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=4"
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
toolspeed = 0.2
|
||||
|
||||
/obj/item/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"
|
||||
toolspeed = 0.2
|
||||
|
||||
/obj/item/pickaxe/drill/jackhammer
|
||||
name = "sonic jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5;magnets=4"
|
||||
digsound = list('sound/weapons/sonic_jackhammer.ogg')
|
||||
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
|
||||
toolspeed = 0.1 //the epitome of powertools. extremely fast mining, laughs at puny walls
|
||||
|
||||
/obj/item/shovel
|
||||
name = "shovel"
|
||||
desc = "A large tool for digging and moving dirt."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "shovel"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8
|
||||
throwforce = 4
|
||||
item_state = "shovel"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
usesound = 'sound/effects/shovel_dig.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/shovel/spade
|
||||
name = "spade"
|
||||
desc = "A small tool for digging and moving dirt."
|
||||
icon_state = "spade"
|
||||
item_state = "spade"
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/shovel/safety
|
||||
name = "safety shovel"
|
||||
desc = "A large tool for digging and moving dirt. Was modified with extra safety, making it ineffective as a weapon."
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("ineffectively hit")
|
||||
@@ -0,0 +1,139 @@
|
||||
/*********************Hivelord stabilizer****************/
|
||||
/obj/item/hivelordstabilizer
|
||||
name = "hivelord stabilizer"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle19"
|
||||
desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
/obj/item/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user)
|
||||
. = ..()
|
||||
var/obj/item/organ/internal/hivelord_core/C = M
|
||||
if(!istype(C, /obj/item/organ/internal/hivelord_core))
|
||||
to_chat(user, "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>")
|
||||
return ..()
|
||||
|
||||
C.preserved()
|
||||
to_chat(user, "<span class='notice'>You inject the [M] with the stabilizer. It will no longer go inert.</span>")
|
||||
qdel(src)
|
||||
|
||||
/************************Hivelord core*******************/
|
||||
/obj/item/organ/internal/hivelord_core
|
||||
name = "hivelord remains"
|
||||
desc = "All that remains of a hivelord. It can be used to help keep your body going, but it will rapidly decay into uselessness."
|
||||
icon_state = "roro core 2"
|
||||
flags = NOBLUDGEON
|
||||
slot = "hivecore"
|
||||
force = 0
|
||||
actions_types = list(/datum/action/item_action/organ_action/use)
|
||||
var/inert = 0
|
||||
var/preserved = 0
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/New()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/inert_check), 2400)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/proc/inert_check()
|
||||
if(!preserved)
|
||||
go_inert()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/proc/preserved(implanted = 0)
|
||||
inert = FALSE
|
||||
preserved = TRUE
|
||||
update_icon()
|
||||
desc = "All that remains of a hivelord. It is preserved, allowing you to use it to heal completely without danger of decay."
|
||||
if(implanted)
|
||||
feedback_add_details("hivelord_core", "[type]|implanted")
|
||||
else
|
||||
feedback_add_details("hivelord_core", "[type]|stabilizer")
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/proc/go_inert()
|
||||
inert = TRUE
|
||||
name = "decayed regenerative core"
|
||||
desc = "All that remains of a hivelord. It has decayed, and is completely useless."
|
||||
feedback_add_details("hivelord_core", "[src.type]|inert")
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/ui_action_click()
|
||||
if(inert)
|
||||
to_chat(owner, "<span class='notice'>[src] breaks down as it tries to activate.</span>")
|
||||
else
|
||||
owner.revive()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/on_life()
|
||||
..()
|
||||
if(owner.health < HEALTH_THRESHOLD_CRIT)
|
||||
ui_action_click()
|
||||
|
||||
///Handles applying the core, logging and status/mood events.
|
||||
/obj/item/organ/internal/hivelord_core/proc/applyto(atom/target, mob/user)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(inert)
|
||||
to_chat(user, "<span class='notice'>[src] has decayed and can no longer be used to heal.</span>")
|
||||
return
|
||||
else
|
||||
if(H.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>[src] is useless on the dead.</span>")
|
||||
return
|
||||
if(H != user)
|
||||
H.visible_message("[user] forces [H] to apply [src]... Black tendrils entangle and reinforce [H.p_them()]!")
|
||||
feedback_add_details("hivelord_core","[src.type]|used|other")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to smear [src] on yourself. Disgusting tendrils hold you together and allow you to keep moving, but for how long?</span>")
|
||||
feedback_add_details("hivelord_core","[src.type]|used|self")
|
||||
H.revive()
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
if(proximity_flag)
|
||||
applyto(target, user)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/attack_self(mob/user)
|
||||
applyto(user, user)
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(!preserved && !inert)
|
||||
preserved(TRUE)
|
||||
owner.visible_message("<span class='notice'>[src] stabilizes as it's inserted.</span>")
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/remove(mob/living/carbon/M, special = 0)
|
||||
if(!inert && !special)
|
||||
owner.visible_message("<span class='notice'>[src] rapidly decays as it's removed.</span>")
|
||||
go_inert()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/prepare_eat()
|
||||
return null
|
||||
|
||||
/*************************Legion core********************/
|
||||
/obj/item/organ/internal/hivelord_core/legion
|
||||
name = "legion's soul"
|
||||
desc = "A strange rock that crackles with power. It can be used to heal completely, but it will rapidly decay into uselessness."
|
||||
icon_state = "legion_soul"
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/legion/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/legion/update_icon()
|
||||
icon_state = inert ? "legion_soul_inert" : "legion_soul"
|
||||
cut_overlays()
|
||||
if(!inert && !preserved)
|
||||
add_overlay("legion_soul_crackle")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/legion/go_inert()
|
||||
..()
|
||||
desc = "[src] has become inert. It has decayed, and is completely useless."
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/legion/preserved(implanted = 0)
|
||||
..()
|
||||
desc = "[src] has been stabilized. It is preserved, allowing you to use it to heal completely without danger of decay."
|
||||
@@ -0,0 +1,116 @@
|
||||
/**********************Resonator**********************/
|
||||
/obj/item/resonator
|
||||
name = "resonator"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "resonator"
|
||||
item_state = "resonator"
|
||||
origin_tech = "magnets=3;engineering=3"
|
||||
desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in a vaccuum."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
force = 15
|
||||
throwforce = 10
|
||||
var/burst_time = 30
|
||||
var/fieldlimit = 4
|
||||
var/list/fields = list()
|
||||
var/quick_burst_mod = 0.8
|
||||
|
||||
/obj/item/resonator/upgraded
|
||||
name = "upgraded resonator"
|
||||
desc = "An upgraded version of the resonator that can produce more fields at once."
|
||||
icon_state = "resonator_u"
|
||||
origin_tech = "materials=4;powerstorage=3;engineering=3;magnets=3"
|
||||
fieldlimit = 6
|
||||
quick_burst_mod = 1
|
||||
|
||||
/obj/item/resonator/attack_self(mob/user)
|
||||
if(burst_time == 50)
|
||||
burst_time = 30
|
||||
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>")
|
||||
else
|
||||
burst_time = 50
|
||||
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>")
|
||||
|
||||
/obj/item/resonator/proc/CreateResonance(target, mob/user)
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/effect/temp_visual/resonance/R = locate(/obj/effect/temp_visual/resonance) in T
|
||||
if(R)
|
||||
R.damage_multiplier = quick_burst_mod
|
||||
R.burst()
|
||||
return
|
||||
if(LAZYLEN(fields) < fieldlimit)
|
||||
new /obj/effect/temp_visual/resonance(T, user, src, burst_time)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
/obj/item/resonator/pre_attackby(atom/target, mob/user, params)
|
||||
if(check_allowed_items(target, 1))
|
||||
CreateResonance(target, user)
|
||||
return TRUE
|
||||
|
||||
//resonance field, crushes rock, damages mobs
|
||||
/obj/effect/temp_visual/resonance
|
||||
name = "resonance field"
|
||||
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures. More damaging in low pressure environments."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shield1"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
duration = 50
|
||||
var/resonance_damage = 20
|
||||
var/damage_multiplier = 1
|
||||
var/creator
|
||||
var/obj/item/resonator/res
|
||||
|
||||
/obj/effect/temp_visual/resonance/New(loc, set_creator, set_resonator, set_duration)
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
creator = set_creator
|
||||
res = set_resonator
|
||||
if(res)
|
||||
res.fields += src
|
||||
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
|
||||
transform = matrix() * 0.75
|
||||
animate(src, transform = matrix() * 1.5, time = duration)
|
||||
deltimer(timerid)
|
||||
timerid = addtimer(CALLBACK(src, .proc/burst), duration, TIMER_STOPPABLE)
|
||||
|
||||
/obj/effect/temp_visual/resonance/Destroy()
|
||||
if(res)
|
||||
res.fields -= src
|
||||
res = null
|
||||
creator = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/temp_visual/resonance/proc/check_pressure(turf/proj_turf)
|
||||
if(!proj_turf)
|
||||
proj_turf = get_turf(src)
|
||||
resonance_damage = initial(resonance_damage)
|
||||
if(lavaland_equipment_pressure_check(proj_turf))
|
||||
name = "strong [initial(name)]"
|
||||
resonance_damage *= 3
|
||||
else
|
||||
name = initial(name)
|
||||
resonance_damage *= damage_multiplier
|
||||
|
||||
/obj/effect/temp_visual/resonance/proc/burst()
|
||||
var/turf/T = get_turf(src)
|
||||
new /obj/effect/temp_visual/resonance_crush(T)
|
||||
if(ismineralturf(T))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.gets_drilled(creator)
|
||||
check_pressure(T)
|
||||
playsound(T,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
for(var/mob/living/L in T)
|
||||
if(creator)
|
||||
add_attack_logs(creator, L, "Resonance field'ed")
|
||||
to_chat(L, "<span class='userdanger'>[src] ruptured with you in it!</span>")
|
||||
L.apply_damage(resonance_damage, BRUTE)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush
|
||||
icon_state = "shield1"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush/New()
|
||||
..()
|
||||
transform = matrix()*1.5
|
||||
animate(src, transform = matrix() * 0.1, alpha = 50, time = 4)
|
||||
@@ -0,0 +1,14 @@
|
||||
/**********************Mining Equipment Vendor Items**************************/
|
||||
//misc stuff you can buy from the vendor that has special code but doesn't really need its own file
|
||||
|
||||
/**********************Facehugger toy**********************/
|
||||
/obj/item/clothing/mask/facehugger/toy
|
||||
item_state = "facehugger_inactive"
|
||||
desc = "A toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something."
|
||||
throwforce = 0
|
||||
real = 0
|
||||
sterile = 1
|
||||
tint = 3 //Makes it feel more authentic when it latches on
|
||||
|
||||
/obj/item/clothing/mask/facehugger/toy/Die()
|
||||
return
|
||||
@@ -0,0 +1,77 @@
|
||||
/**********************Jaunter**********************/
|
||||
/obj/item/wormhole_jaunter
|
||||
name = "wormhole jaunter"
|
||||
desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to bluespace for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least.\nThanks to modifications provided by the Free Golems, this jaunter can be worn on the belt to provide protection from chasms."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "Jaunter"
|
||||
item_state = "electronic"
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = "bluespace=2"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/wormhole_jaunter/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user.name] activates the [name]!</span>")
|
||||
activate(user, TRUE)
|
||||
|
||||
/obj/item/wormhole_jaunter/proc/turf_check(mob/user)
|
||||
var/turf/device_turf = get_turf(user)
|
||||
if(!device_turf || !is_teleport_allowed(device_turf.z))
|
||||
to_chat(user, "<span class='notice'>You're having difficulties getting the [name] to work.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/wormhole_jaunter/proc/get_destinations(mob/user)
|
||||
var/list/destinations = list()
|
||||
|
||||
for(var/obj/item/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(is_station_level(T.z))
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
/obj/item/wormhole_jaunter/proc/activate(mob/user, adjacent)
|
||||
if(!turf_check(user))
|
||||
return
|
||||
|
||||
var/list/L = get_destinations(user)
|
||||
if(!L.len)
|
||||
to_chat(user, "<span class='notice'>The [name] found no beacons in the world to anchor a wormhole to.</span>")
|
||||
return
|
||||
var/chosen_beacon = pick(L)
|
||||
var/obj/effect/portal/jaunt_tunnel/J = new(get_turf(src), get_turf(chosen_beacon), src, 100)
|
||||
if(adjacent)
|
||||
try_move_adjacent(J)
|
||||
else
|
||||
J.teleport(user)
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/wormhole_jaunter/proc/chasm_react(mob/user)
|
||||
if(user.get_item_by_slot(slot_belt) == src)
|
||||
to_chat(user, "Your [name] activates, saving you from the chasm!</span>")
|
||||
activate(user, FALSE)
|
||||
else
|
||||
to_chat(user, "[src] is not attached to your belt, preventing it from saving you from the chasm. RIP.</span>")
|
||||
|
||||
/obj/effect/portal/jaunt_tunnel
|
||||
name = "jaunt tunnel"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "bhole3"
|
||||
desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon."
|
||||
failchance = 0
|
||||
|
||||
/obj/effect/portal/jaunt_tunnel/teleport(atom/movable/M)
|
||||
. = ..()
|
||||
if(.)
|
||||
// KERPLUNK
|
||||
playsound(M,'sound/weapons/resonator_blast.ogg', 50, 1)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/L = M
|
||||
L.Weaken(6)
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
var/output_dir = SOUTH
|
||||
|
||||
/obj/machinery/mineral/proc/unload_mineral(atom/movable/S)
|
||||
S.forceMove(loc)
|
||||
S.forceMove(drop_location())
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
S.forceMove(T)
|
||||
|
||||
@@ -0,0 +1,391 @@
|
||||
/**********************Ore Redemption Unit**************************/
|
||||
//Turns all the various mining machines into a single unit to speed up mining and establish a point system
|
||||
|
||||
/obj/machinery/mineral/ore_redemption
|
||||
name = "ore redemption machine"
|
||||
desc = "A machine that accepts ore and instantly transforms it into workable material sheets. Points for ore are generated based on type and can be redeemed at a mining equipment vendor."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "ore_redemption"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
input_dir = NORTH
|
||||
output_dir = SOUTH
|
||||
req_access = list(access_mineral_storeroom)
|
||||
speed_process = TRUE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/req_access_reclaim = access_mining_station
|
||||
var/obj/item/card/id/inserted_id
|
||||
var/points = 0
|
||||
var/ore_pickup_rate = 15
|
||||
var/sheet_per_ore = 1
|
||||
var/point_upgrade = 1
|
||||
var/list/ore_values = list("sand" = 1, "iron" = 1, "plasma" = 15, "silver" = 16, "gold" = 18, "titanium" = 30, "uranium" = 30, "diamond" = 50, "bluespace crystal" = 50, "bananium" = 60, "tranquillite" = 60)
|
||||
var/message_sent = FALSE
|
||||
var/list/ore_buffer = list()
|
||||
var/datum/research/files
|
||||
var/obj/item/disk/design_disk/inserted_disk
|
||||
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"), "Virology" = list("plasma", "uranium", "gold"))
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/New()
|
||||
..()
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, FALSE, /obj/item/stack)
|
||||
files = new /datum/research/smelter(src)
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/ore_redemption(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/assembly/igniter(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/ore_redemption(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/assembly/igniter(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/golem
|
||||
req_access = list(access_free_golems)
|
||||
req_access_reclaim = access_free_golems
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/golem/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/ore_redemption/golem(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/assembly/igniter(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/Destroy()
|
||||
QDEL_NULL(files)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/RefreshParts()
|
||||
var/ore_pickup_rate_temp = 15
|
||||
var/point_upgrade_temp = 1
|
||||
var/sheet_per_ore_temp = 1
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
sheet_per_ore_temp = 0.65 + (0.35 * B.rating)
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
ore_pickup_rate_temp = 15 * M.rating
|
||||
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
|
||||
point_upgrade_temp = 0.65 + (0.35 * L.rating)
|
||||
ore_pickup_rate = ore_pickup_rate_temp
|
||||
point_upgrade = point_upgrade_temp
|
||||
sheet_per_ore = sheet_per_ore_temp
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
|
||||
|
||||
ore_buffer -= O
|
||||
|
||||
if(O && O.refined_type)
|
||||
points += O.points * point_upgrade * O.amount
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
|
||||
if(!material_amount)
|
||||
qdel(O) //no materials, incinerate it
|
||||
|
||||
else if(!materials.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it
|
||||
unload_mineral(O)
|
||||
|
||||
else
|
||||
materials.insert_item(O, sheet_per_ore) //insert it
|
||||
qdel(O)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/can_smelt_alloy(datum/design/D)
|
||||
if(D.make_reagents.len)
|
||||
return FALSE
|
||||
|
||||
var/build_amount = 0
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in D.materials)
|
||||
var/M = D.materials[mat_id]
|
||||
var/datum/material/redemption_mat = materials.materials[mat_id]
|
||||
|
||||
if(!M || !redemption_mat)
|
||||
return FALSE
|
||||
|
||||
var/smeltable_sheets = round(redemption_mat.amount / M)
|
||||
|
||||
if(!smeltable_sheets)
|
||||
return FALSE
|
||||
|
||||
if(!build_amount)
|
||||
build_amount = smeltable_sheets
|
||||
|
||||
build_amount = min(build_amount, smeltable_sheets)
|
||||
|
||||
return build_amount
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/process_ores(list/ores_to_process)
|
||||
var/current_amount = 0
|
||||
for(var/ore in ores_to_process)
|
||||
if(current_amount >= ore_pickup_rate)
|
||||
break
|
||||
smelt_ore(ore)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
message_sent = TRUE
|
||||
var/area/A = get_area(src)
|
||||
var/msg = "Now available in [A]:<br>"
|
||||
|
||||
var/has_minerals = FALSE
|
||||
var/mineral_name = null
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
var/mineral_amount = M.amount / MINERAL_MATERIAL_AMOUNT
|
||||
mineral_name = capitalize(M.name)
|
||||
if(mineral_amount)
|
||||
has_minerals = TRUE
|
||||
msg += "[mineral_name]: [mineral_amount] sheets<br>"
|
||||
|
||||
if(!has_minerals)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/requests_console/D in allConsoles)
|
||||
if(D.department in src.supply_consoles)
|
||||
if(supply_consoles[D.department] == null || (mineral_name in supply_consoles[D.department]))
|
||||
D.createMessage("Ore Redemption Machine", "New Minerals Available!", msg, 1)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/process()
|
||||
if(panel_open || !powered())
|
||||
return
|
||||
var/atom/input = get_step(src, input_dir)
|
||||
var/obj/structure/ore_box/OB = locate() in input
|
||||
if(OB)
|
||||
input = OB
|
||||
|
||||
for(var/obj/item/stack/ore/O in input)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
ore_buffer |= O
|
||||
O.forceMove(src)
|
||||
CHECK_TICK
|
||||
|
||||
if(LAZYLEN(ore_buffer))
|
||||
message_sent = FALSE
|
||||
process_ores(ore_buffer)
|
||||
else if(!message_sent)
|
||||
send_console_message()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params)
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
if(!powered())
|
||||
return
|
||||
if(istype(W, /obj/item/card/id))
|
||||
var/obj/item/card/id/I = user.get_active_hand()
|
||||
if(istype(I) && !istype(inserted_id))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
|
||||
if(ismultitool(W) && panel_open)
|
||||
input_dir = turn(input_dir, -90)
|
||||
output_dir = turn(output_dir, -90)
|
||||
to_chat(user, "<span class='notice'>You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/disk/design_disk))
|
||||
if(user.drop_item())
|
||||
W.forceMove(src)
|
||||
inserted_disk = W
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/interact(mob/user)
|
||||
var/dat = "This machine only accepts ore. Gibtonite and Slag are not accepted.<br><br>"
|
||||
dat += "Current unclaimed points: [points]<br>"
|
||||
|
||||
if(inserted_id)
|
||||
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=[UID()];eject_id=1'>Eject ID.</A><br>"
|
||||
dat += "<A href='?src=[UID()];claim=1'>Claim points.</A><br><br>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=[UID()];insert_id=1'>Insert ID.</A><br><br>"
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
if(M.amount)
|
||||
var/sheet_amount = M.amount / MINERAL_MATERIAL_AMOUNT
|
||||
dat += "[capitalize(M.name)]: [sheet_amount] "
|
||||
if(sheet_amount >= 1)
|
||||
dat += "<A href='?src=[UID()];release=[mat_id]'>Release</A><br>"
|
||||
else
|
||||
dat += "<span class='linkOff'>Release</span><br>"
|
||||
|
||||
dat += "<br><b>Alloys: </b><br>"
|
||||
|
||||
for(var/v in files.known_designs)
|
||||
var/datum/design/D = files.known_designs[v]
|
||||
if(can_smelt_alloy(D))
|
||||
dat += "[D.name]: <A href='?src=[UID()];alloy=[D.id]'>Smelt</A><br>"
|
||||
else
|
||||
dat += "[D.name]: <span class='linkOff'>Smelt</span><br>"
|
||||
|
||||
dat += "<br><div class='statusDisplay'><b>Mineral Value List:</b><br>[get_ore_values()]</div>"
|
||||
|
||||
if(inserted_disk)
|
||||
dat += "<A href='?src=[UID()];eject_disk=1'>Eject disk</A><br>"
|
||||
dat += "<div class='statusDisplay'><b>Uploadable designs: </b><br>"
|
||||
|
||||
if(inserted_disk.blueprint)
|
||||
var/datum/design/D = inserted_disk.blueprint
|
||||
if(D.build_type & SMELTER)
|
||||
dat += "Name: [D.name] <A href='?src=[UID()];upload=[inserted_disk.blueprint]'>Upload to smelter</A>"
|
||||
|
||||
dat += "</div><br>"
|
||||
else
|
||||
dat += "<A href='?src=[UID()];insert_disk=1'>Insert design disk</A><br><br>"
|
||||
|
||||
var/datum/browser/popup = new(user, "ore_redemption_machine", "Ore Redemption Machine", 400, 500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/get_ore_values()
|
||||
var/dat = "<table border='0' width='300'>"
|
||||
for(var/ore in ore_values)
|
||||
var/value = ore_values[ore]
|
||||
dat += "<tr><td>[capitalize(ore)]</td><td>[value * point_upgrade]</td></tr>"
|
||||
dat += "</table>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
if(href_list["eject_id"])
|
||||
usr.put_in_hands(inserted_id)
|
||||
inserted_id = null
|
||||
if(href_list["claim"])
|
||||
if(inserted_id)
|
||||
if(req_access_reclaim in inserted_id.access)
|
||||
inserted_id.mining_points += points
|
||||
points = 0
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||
else if(href_list["insert_id"])
|
||||
var/obj/item/card/id/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Not a valid ID!</span>")
|
||||
if(href_list["eject_disk"])
|
||||
if(inserted_disk)
|
||||
inserted_disk.forceMove(loc)
|
||||
inserted_disk = null
|
||||
if(href_list["insert_disk"])
|
||||
var/obj/item/disk/design_disk/D = usr.get_active_hand()
|
||||
if(istype(D))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
D.forceMove(src)
|
||||
inserted_disk = D
|
||||
if(href_list["upload"])
|
||||
if(inserted_disk && inserted_disk.blueprint)
|
||||
files.AddDesign2Known(inserted_disk.blueprint)
|
||||
|
||||
if(href_list["release"])
|
||||
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user
|
||||
var/mat_id = href_list["release"]
|
||||
if(!materials.materials[mat_id])
|
||||
return
|
||||
|
||||
var/datum/material/mat = materials.materials[mat_id]
|
||||
var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
if(!stored_amount)
|
||||
return
|
||||
|
||||
var/desired = input("How many sheets?", "How many sheets to eject?", 1) as null|num
|
||||
var/sheets_to_remove = round(min(desired,50,stored_amount))
|
||||
|
||||
var/out = get_step(src, output_dir)
|
||||
materials.retrieve_sheets(sheets_to_remove, mat_id, out)
|
||||
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||
|
||||
if(href_list["alloy"])
|
||||
var/alloy_id = href_list["alloy"]
|
||||
var/datum/design/alloy = files.FindDesignByID(alloy_id)
|
||||
if((check_access(inserted_id) || allowed(usr)) && alloy)
|
||||
var/desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
||||
if(desired < 1) // Stops an exploit that lets you build negative alloys and get free materials
|
||||
return
|
||||
var/smelt_amount = can_smelt_alloy(alloy)
|
||||
var/amount = round(min(desired,50,smelt_amount))
|
||||
materials.use_amount(alloy.materials, amount)
|
||||
|
||||
var/output = new alloy.build_path(src)
|
||||
if(istype(output, /obj/item/stack/sheet))
|
||||
var/obj/item/stack/sheet/mineral/produced_alloy = output
|
||||
produced_alloy.amount = amount
|
||||
unload_mineral(produced_alloy)
|
||||
else
|
||||
unload_mineral(output)
|
||||
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/ex_act(severity, target)
|
||||
do_sparks(5, 1, src)
|
||||
if(severity == 1)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
else if(severity == 2)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
if(inserted_id && !powered())
|
||||
visible_message("<span class='notice'>The ID slot indicator light flickers on [src] as it spits out a card before powering down.</span>")
|
||||
inserted_id.forceMove(loc)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
@@ -0,0 +1,311 @@
|
||||
/**********************Mining Equipment Locker**************************/
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor
|
||||
name = "mining equipment vendor"
|
||||
desc = "An equipment vendor for miners, points collected at an ore redemption machine can be spent here."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "mining"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/obj/item/card/id/inserted_id
|
||||
var/list/prize_list = list( //if you add something to this, please, for the love of god, sort it by price/type. use tabs and not spaces.
|
||||
new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 10),
|
||||
new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 100),
|
||||
new /datum/data/mining_equipment("30 Marker Beacons", /obj/item/stack/marker_beacon/thirty, 300),
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/reagent_containers/food/drinks/bottle/whiskey, 100),
|
||||
new /datum/data/mining_equipment("Absinthe", /obj/item/reagent_containers/food/drinks/bottle/absinthe/premium, 100),
|
||||
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 150),
|
||||
new /datum/data/mining_equipment("Soap", /obj/item/soap/nanotrasen, 200),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/laser_pointer, 300),
|
||||
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
|
||||
new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/hivelordstabilizer, 400),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/stack/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/card/mining_point_card, 500),
|
||||
new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core, 400),
|
||||
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/survivalcapsule, 400),
|
||||
new /datum/data/mining_equipment("GAR Meson Scanners", /obj/item/clothing/glasses/meson/gar, 500),
|
||||
new /datum/data/mining_equipment("Explorer's Webbing", /obj/item/storage/belt/mining, 500),
|
||||
new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/autoinjector/survival, 500),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/kinetic_crusher, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/t_scanner/adv_mining_scanner, 800),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/resonator, 800),
|
||||
new /datum/data/mining_equipment("Fulton Pack", /obj/item/extraction_pack, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Mining Conscription Kit", /obj/item/storage/backpack/duffel/mining_conscript, 1500),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/tank/jetpack/carbondioxide/mining, 2000),
|
||||
new /datum/data/mining_equipment("Mining Hardsuit", /obj/item/storage/box/mininghardsuit, 2000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/pickaxe/diamond, 2000),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/resonator/upgraded, 2500),
|
||||
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
|
||||
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/survivalcapsule/luxury, 3000),
|
||||
new /datum/data/mining_equipment("Nanotrasen Minebot", /obj/item/mining_drone_cube, 800),
|
||||
new /datum/data/mining_equipment("Minebot Melee Upgrade", /obj/item/mine_bot_upgrade, 400),
|
||||
new /datum/data/mining_equipment("Minebot Armor Upgrade", /obj/item/mine_bot_upgrade/health, 400),
|
||||
new /datum/data/mining_equipment("Minebot Cooldown Upgrade", /obj/item/borg/upgrade/modkit/cooldown/minebot, 600),
|
||||
new /datum/data/mining_equipment("Minebot AI Upgrade", /obj/item/slimepotion/sentience/mining, 1000),
|
||||
new /datum/data/mining_equipment("KA Minebot Passthrough", /obj/item/borg/upgrade/modkit/minebot_passthrough, 100),
|
||||
new /datum/data/mining_equipment("Lazarus Capsule", /obj/item/mobcapsule, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Capsule belt", /obj/item/storage/belt/lazarus, 200),
|
||||
new /datum/data/mining_equipment("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 100),
|
||||
new /datum/data/mining_equipment("KA Adjustable Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer/adjustable, 150),
|
||||
new /datum/data/mining_equipment("KA Super Chassis", /obj/item/borg/upgrade/modkit/chassis_mod, 250),
|
||||
new /datum/data/mining_equipment("KA Hyper Chassis", /obj/item/borg/upgrade/modkit/chassis_mod/orange, 300),
|
||||
new /datum/data/mining_equipment("KA Range Increase", /obj/item/borg/upgrade/modkit/range, 1000),
|
||||
new /datum/data/mining_equipment("KA Damage Increase", /obj/item/borg/upgrade/modkit/damage, 1000),
|
||||
new /datum/data/mining_equipment("KA Cooldown Decrease", /obj/item/borg/upgrade/modkit/cooldown, 1000),
|
||||
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000)
|
||||
)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/golem
|
||||
name = "golem ship equipment vendor"
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/golem/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/mining_equipment_vendor/golem(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/golem/Initialize()
|
||||
. = ..()
|
||||
desc += "\nIt seems a few selections have been added."
|
||||
prize_list += list(
|
||||
new /datum/data/mining_equipment("Extra Id", /obj/item/card/id/golem, 250),
|
||||
new /datum/data/mining_equipment("Science Backpack", /obj/item/storage/backpack/science, 250),
|
||||
new /datum/data/mining_equipment("Full Toolbelt", /obj/item/storage/belt/utility/full/multitool, 250),
|
||||
new /datum/data/mining_equipment("Monkey Cube", /obj/item/reagent_containers/food/snacks/monkeycube, 250),
|
||||
new /datum/data/mining_equipment("Royal Cape of the Liberator", /obj/item/bedsheet/rd/royal_cape, 500),
|
||||
new /datum/data/mining_equipment("Grey Slime Extract", /obj/item/slime_extract/grey, 1000),
|
||||
new /datum/data/mining_equipment("KA Trigger Modification Kit", /obj/item/borg/upgrade/modkit/trigger_guard, 1000),
|
||||
new /datum/data/mining_equipment("Shuttle Console Board", /obj/item/circuitboard/shuttle/golem_ship, 2000),
|
||||
new /datum/data/mining_equipment("The Liberator's Legacy", /obj/item/storage/box/rndboards, 2000)
|
||||
|
||||
)
|
||||
|
||||
/datum/data/mining_equipment
|
||||
var/equipment_name = "generic"
|
||||
var/equipment_path = null
|
||||
var/cost = 0
|
||||
|
||||
/datum/data/mining_equipment/New(name, path, equipment_cost)
|
||||
equipment_name = name
|
||||
equipment_path = path
|
||||
cost = equipment_cost
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/mining_equipment_vendor(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
if(inserted_id && !powered())
|
||||
visible_message("<span class='notice'>The ID slot indicator light flickers on \the [src] as it spits out a card before powering down.</span>")
|
||||
inserted_id.forceMove(loc)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_ghost(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat
|
||||
dat +="<div class='statusDisplay'>"
|
||||
if(istype(inserted_id))
|
||||
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=[UID()];choice=eject'>Eject ID.</A><br>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=[UID()];choice=insert'>Insert ID.</A><br>"
|
||||
dat += "</div>"
|
||||
dat += "<br><b>Equipment point cost list:</b><BR><table border='0' width='200'>"
|
||||
for(var/datum/data/mining_equipment/prize in prize_list)
|
||||
dat += "<tr><td>[prize.equipment_name]</td><td>[prize.cost]</td><td><A href='?src=[UID()];purchase=\ref[prize]'>Purchase</A></td></tr>"
|
||||
dat += "</table>"
|
||||
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["choice"])
|
||||
if(istype(inserted_id))
|
||||
if(href_list["choice"] == "eject")
|
||||
inserted_id.loc = loc
|
||||
inserted_id.verb_pickup()
|
||||
inserted_id = null
|
||||
else if(href_list["choice"] == "insert")
|
||||
var/obj/item/card/id/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>No valid ID.</span>")
|
||||
|
||||
if(href_list["purchase"])
|
||||
if(istype(inserted_id))
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
|
||||
if(!prize || !(prize in prize_list) || prize.cost > inserted_id.mining_points)
|
||||
return
|
||||
|
||||
inserted_id.mining_points -= prize.cost
|
||||
new prize.equipment_path(src.loc)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(loc) //Prevents deconstructing the ORM from deleting whatever ID was inside it.
|
||||
default_deconstruction_crowbar(I)
|
||||
return 1
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
if(!powered())
|
||||
return
|
||||
else
|
||||
RedeemVoucher(I, user)
|
||||
return
|
||||
if(istype(I,/obj/item/card/id))
|
||||
if(!powered())
|
||||
return
|
||||
else
|
||||
var/obj/item/card/id/C = usr.get_active_hand()
|
||||
if(istype(C) && !istype(inserted_id))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
C.forceMove(src)
|
||||
inserted_id = C
|
||||
interact(user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
|
||||
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit")
|
||||
|
||||
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in items
|
||||
if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
|
||||
return
|
||||
|
||||
var/drop_location = drop_location()
|
||||
switch(selection)
|
||||
if("Survival Capsule and Explorer's Webbing")
|
||||
new /obj/item/storage/belt/mining(drop_location)
|
||||
if("Resonator Kit")
|
||||
new /obj/item/extinguisher/mini(drop_location)
|
||||
new /obj/item/resonator(drop_location)
|
||||
if("Minebot Kit")
|
||||
new /obj/item/mining_drone_cube(drop_location)
|
||||
new /obj/item/weldingtool/hugetank(drop_location)
|
||||
new /obj/item/clothing/head/welding(drop_location)
|
||||
if("Extraction and Rescue Kit")
|
||||
new /obj/item/extraction_pack(drop_location)
|
||||
new /obj/item/fulton_core(drop_location)
|
||||
new /obj/item/stack/marker_beacon/thirty(drop_location)
|
||||
if("Crusher Kit")
|
||||
new /obj/item/extinguisher/mini(drop_location)
|
||||
new /obj/item/twohanded/kinetic_crusher(drop_location)
|
||||
if("Mining Conscription Kit")
|
||||
new /obj/item/storage/backpack/duffel/mining_conscript(drop_location)
|
||||
|
||||
qdel(voucher)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
|
||||
do_sparks(5, 1, src)
|
||||
if(prob(50 / severity) && severity < 3)
|
||||
qdel(src)
|
||||
|
||||
/**********************Mining Equipment Locker Items**************************/
|
||||
|
||||
/**********************Mining Equipment Voucher**********************/
|
||||
|
||||
/obj/item/mining_voucher
|
||||
name = "mining voucher"
|
||||
desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "mining_voucher"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/**********************Mining Point Card**********************/
|
||||
|
||||
/obj/item/card/mining_point_card
|
||||
name = "mining point card"
|
||||
desc = "A small card preloaded with mining points. Swipe your ID card over it to transfer the points, then discard."
|
||||
icon_state = "data"
|
||||
var/points = 500
|
||||
|
||||
/obj/item/card/mining_point_card/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(points)
|
||||
var/obj/item/card/id/C = I
|
||||
C.mining_points += points
|
||||
to_chat(user, "<span class='info'>You transfer [points] points to [C].</span>")
|
||||
points = 0
|
||||
else
|
||||
to_chat(user, "<span class='info'>There's no points left on [src].</span>")
|
||||
..()
|
||||
|
||||
/obj/item/card/mining_point_card/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "There's [points] points on the card.")
|
||||
|
||||
/**********************Conscription Kit**********************/
|
||||
|
||||
/obj/item/card/id/mining_access_card
|
||||
name = "mining access card"
|
||||
desc = "A small card, that when used on any ID, will add mining access."
|
||||
icon_state = "data_1"
|
||||
|
||||
/obj/item/card/id/mining_access_card/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
. = ..()
|
||||
if(istype(AM, /obj/item/card/id) && proximity)
|
||||
var/obj/item/card/id/I = AM
|
||||
I.access |= list(access_mining, access_mining_station, access_mineral_storeroom, access_cargo)
|
||||
to_chat(user, "You upgrade [I] with mining access.")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/storage/backpack/duffel/mining_conscript
|
||||
name = "mining conscription kit"
|
||||
desc = "A kit containing everything a crewmember needs to support a shaft miner in the field."
|
||||
|
||||
/obj/item/storage/backpack/duffel/mining_conscript/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/t_scanner/adv_mining_scanner/lesser(src)
|
||||
new /obj/item/storage/bag/ore(src)
|
||||
new /obj/item/clothing/suit/hooded/explorer(src)
|
||||
new /obj/item/encryptionkey/headset_cargo(src)
|
||||
new /obj/item/clothing/mask/gas/explorer(src)
|
||||
new /obj/item/card/id/mining_access_card(src)
|
||||
new /obj/item/gun/energy/kinetic_accelerator(src)
|
||||
new /obj/item/kitchen/knife/combat/survival(src)
|
||||
new /obj/item/flashlight/seclite(src)
|
||||
@@ -75,157 +75,6 @@
|
||||
desc = "A mining lantern."
|
||||
brightness_on = 6 // luminosity when on
|
||||
|
||||
/*****************************Pickaxe********************************/
|
||||
|
||||
/obj/item/pickaxe
|
||||
name = "pickaxe"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pickaxe"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 15
|
||||
throwforce = 10
|
||||
item_state = "pickaxe"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
|
||||
origin_tech = "materials=2;engineering=3"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg')
|
||||
var/drill_verb = "picking"
|
||||
sharp = 1
|
||||
var/excavation_amount = 100
|
||||
usesound = 'sound/effects/picaxe1.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/pickaxe/proc/playDigSound()
|
||||
playsound(src, pick(digsound),20,1)
|
||||
|
||||
/obj/item/pickaxe/emergency
|
||||
name = "emergency disembarkation tool"
|
||||
desc = "For extracting yourself from rough landings."
|
||||
|
||||
/obj/item/pickaxe/safety
|
||||
name = "safety pickaxe"
|
||||
desc = "A pickaxe designed to be only effective at digging rock and ore, very ineffective as a weapon."
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("ineffectively hit")
|
||||
|
||||
/obj/item/pickaxe/mini
|
||||
name = "compact pickaxe"
|
||||
desc = "A smaller, compact version of the standard pickaxe."
|
||||
icon_state = "minipick"
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
/obj/item/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
origin_tech = "materials=3;engineering=4"
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
toolspeed = 0.75
|
||||
|
||||
/obj/item/pickaxe/gold
|
||||
name = "golden pickaxe"
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
desc = "A gold-plated pickaxe that mines faster than standard-issue."
|
||||
toolspeed = 0.6
|
||||
|
||||
/obj/item/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
origin_tech = "materials=5;engineering=4"
|
||||
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/pickaxe/drill
|
||||
name = "mining drill"
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digsound = list('sound/weapons/drill.ogg')
|
||||
hitsound = 'sound/weapons/drill.ogg'
|
||||
usesound = 'sound/weapons/drill.ogg'
|
||||
origin_tech = "materials=2;powerstorage=2;engineering=3"
|
||||
desc = "An electric mining drill for the especially scrawny."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/pickaxe/drill/cyborg
|
||||
name = "cyborg mining drill"
|
||||
desc = "An integrated electric mining drill."
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/pickaxe/drill/diamonddrill
|
||||
name = "diamond-tipped mining drill"
|
||||
icon_state = "diamonddrill"
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=4"
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/pickaxe/diamonddrill/traitor //Pocket-sized traitor diamond drill.
|
||||
name = "supermatter drill"
|
||||
icon_state = "smdrill"
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=4;syndicate=3"
|
||||
desc = "Microscopic supermatter crystals cover the head of this tiny drill."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/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"
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/pickaxe/drill/jackhammer
|
||||
name = "sonic jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5;magnets=4"
|
||||
digsound = list('sound/weapons/sonic_jackhammer.ogg')
|
||||
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
|
||||
toolspeed = 0.1
|
||||
|
||||
/*****************************Shovel********************************/
|
||||
|
||||
/obj/item/shovel
|
||||
name = "shovel"
|
||||
desc = "A large tool for digging and moving dirt."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "shovel"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8
|
||||
throwforce = 4
|
||||
item_state = "shovel"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
usesound = 'sound/effects/shovel_dig.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/shovel/spade
|
||||
name = "spade"
|
||||
desc = "A small tool for digging and moving dirt."
|
||||
icon_state = "spade"
|
||||
item_state = "spade"
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
toolspeed = 2
|
||||
|
||||
/obj/item/shovel/safety
|
||||
name = "safety shovel"
|
||||
desc = "A large tool for digging and moving dirt. Was modified with extra safety, making it ineffective as a weapon."
|
||||
force = 1
|
||||
throwforce = 1
|
||||
attack_verb = list("ineffectively hit")
|
||||
|
||||
/**********************Mining car (Crate like thing, not the rail car)**************************/
|
||||
|
||||
/obj/structure/closet/crate/miningcar
|
||||
@@ -234,60 +83,4 @@
|
||||
icon_state = "miningcar"
|
||||
density = 1
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
/*********************Mob Capsule*************************/
|
||||
|
||||
/obj/item/mobcapsule
|
||||
name = "lazarus capsule"
|
||||
desc = "It allows you to store and deploy lazarus-injected creatures easier."
|
||||
icon = 'icons/obj/mobcap.dmi'
|
||||
icon_state = "mobcap0"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_range = 20
|
||||
var/mob/living/simple_animal/captured = null
|
||||
var/colorindex = 0
|
||||
|
||||
/obj/item/mobcapsule/Destroy()
|
||||
if(captured)
|
||||
captured.ghostize()
|
||||
QDEL_NULL(captured)
|
||||
return ..()
|
||||
|
||||
/obj/item/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
|
||||
if(!istype(A, /mob/living/simple_animal) || isbot(A))
|
||||
return ..()
|
||||
capture(A, user)
|
||||
return 1
|
||||
|
||||
/obj/item/mobcapsule/proc/capture(var/mob/target, var/mob/U as mob)
|
||||
var/mob/living/simple_animal/T = target
|
||||
if(captured)
|
||||
to_chat(U, "<span class='notice'>Capture failed!</span>: The capsule already has a mob registered to it!")
|
||||
else
|
||||
if(istype(T) && "neutral" in T.faction)
|
||||
T.forceMove(src)
|
||||
T.name = "[U.name]'s [initial(T.name)]"
|
||||
T.cancel_camera()
|
||||
name = "Lazarus Capsule: [initial(T.name)]"
|
||||
to_chat(U, "<span class='notice'>You placed a [T.name] inside the Lazarus Capsule!</span>")
|
||||
captured = T
|
||||
else
|
||||
to_chat(U, "You can't capture that mob!")
|
||||
|
||||
/obj/item/mobcapsule/throw_impact(atom/A, mob/user)
|
||||
..()
|
||||
if(captured)
|
||||
dump_contents(user)
|
||||
|
||||
/obj/item/mobcapsule/proc/dump_contents(mob/user)
|
||||
if(captured)
|
||||
captured.forceMove(get_turf(src))
|
||||
captured = null
|
||||
|
||||
/obj/item/mobcapsule/attack_self(mob/user)
|
||||
colorindex += 1
|
||||
if(colorindex >= 6)
|
||||
colorindex = 0
|
||||
icon_state = "mobcap[colorindex]"
|
||||
update_icon()
|
||||
icon_closed = "miningcar"
|
||||
@@ -303,6 +303,7 @@
|
||||
qdel(src)
|
||||
|
||||
//AI
|
||||
|
||||
/obj/item/slimepotion/sentience/mining
|
||||
name = "minebot AI upgrade"
|
||||
desc = "Can be used to grant sentience to minebots."
|
||||
@@ -325,5 +326,21 @@
|
||||
if(M.stored_gun)
|
||||
M.stored_gun.overheat_time += base_cooldown_add
|
||||
|
||||
/**********************Mining drone cube**********************/
|
||||
|
||||
/obj/item/mining_drone_cube
|
||||
name = "mining drone cube"
|
||||
desc = "Compressed mining drone, ready for deployment. Just press the button to activate!"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon_state = "minedronecube"
|
||||
item_state = "electronic"
|
||||
|
||||
/obj/item/mining_drone_cube/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [src] suddenly expands into a fully functional mining drone!</span>", \
|
||||
"<span class='warning'>You press center button on \the [src]. The device suddenly expands into a fully functional mining drone!</span>")
|
||||
new /mob/living/simple_animal/hostile/mining_drone(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
#undef MINEDRONE_COLLECT
|
||||
#undef MINEDRONE_ATTACK
|
||||
#undef MINEDRONE_ATTACK
|
||||
@@ -303,8 +303,165 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/stack/ore/ex_act()
|
||||
return
|
||||
/obj/item/stack/ore/ex_act(severity)
|
||||
if(!severity || severity >= 2)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
/*****************************Coin********************************/
|
||||
|
||||
/obj/item/coin
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
name = "coin"
|
||||
icon_state = "coin__heads"
|
||||
flags = CONDUCT
|
||||
force = 1
|
||||
throwforce = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/string_attached
|
||||
var/list/sideslist = list("heads","tails")
|
||||
var/cmineral = null
|
||||
var/cooldown = 0
|
||||
var/credits = 10
|
||||
|
||||
/obj/item/coin/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
icon_state = "coin_[cmineral]_[sideslist[1]]"
|
||||
if(cmineral)
|
||||
name = "[cmineral] coin"
|
||||
|
||||
/obj/item/coin/gold
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
materials = list(MAT_GOLD = 400)
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/silver
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
materials = list(MAT_SILVER = 400)
|
||||
credits = 40
|
||||
|
||||
/obj/item/coin/diamond
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
materials = list(MAT_DIAMOND = 400)
|
||||
credits = 120
|
||||
|
||||
/obj/item/coin/iron
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
materials = list(MAT_METAL = 400)
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/plasma
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
materials = list(MAT_PLASMA = 400)
|
||||
credits = 80
|
||||
|
||||
/obj/item/coin/uranium
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
materials = list(MAT_URANIUM = 400)
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/clown
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
materials = list(MAT_BANANIUM = 400)
|
||||
credits = 600 //makes the clown cri
|
||||
|
||||
/obj/item/coin/mime
|
||||
cmineral = "tranquillite"
|
||||
icon_state = "coin_tranquillite_heads"
|
||||
materials = list(MAT_TRANQUILLITE = 400)
|
||||
credits = 600 //makes the mime cri
|
||||
|
||||
/obj/item/coin/adamantine
|
||||
cmineral = "adamantine"
|
||||
icon_state = "coin_adamantine_heads"
|
||||
credits = 400
|
||||
|
||||
/obj/item/coin/mythril
|
||||
cmineral = "mythril"
|
||||
icon_state = "coin_mythril_heads"
|
||||
credits = 400
|
||||
|
||||
/obj/item/coin/twoheaded
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/antagtoken
|
||||
name = "antag token"
|
||||
icon_state = "coin_valid_valid"
|
||||
cmineral = "valid"
|
||||
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
|
||||
sideslist = list("valid", "salad")
|
||||
credits = 20
|
||||
|
||||
/obj/item/coin/antagtoken/syndicate
|
||||
name = "syndicate coin"
|
||||
credits = 160
|
||||
|
||||
/obj/item/coin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
to_chat(user, "<span class='notice'>There already is a string attached to this coin.</span>")
|
||||
return
|
||||
|
||||
if(CC.use(1))
|
||||
overlays += image('icons/obj/economy.dmi',"coin_string_overlay")
|
||||
string_attached = 1
|
||||
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/wirecutters))
|
||||
if(!string_attached)
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 1
|
||||
CC.update_icon()
|
||||
overlays = list()
|
||||
string_attached = null
|
||||
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
|
||||
else if(istype(W,/obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.welding && WT.remove_fuel(0, user))
|
||||
var/typelist = list("iron" = /obj/item/clothing/gloves/ring,
|
||||
"silver" = /obj/item/clothing/gloves/ring/silver,
|
||||
"gold" = /obj/item/clothing/gloves/ring/gold,
|
||||
"plasma" = /obj/item/clothing/gloves/ring/plasma,
|
||||
"uranium" = /obj/item/clothing/gloves/ring/uranium)
|
||||
var/typekey = typelist[cmineral]
|
||||
if(ispath(typekey))
|
||||
to_chat(user, "<span class='notice'>You make [src] into a ring.</span>")
|
||||
new typekey(get_turf(loc))
|
||||
qdel(src)
|
||||
else ..()
|
||||
|
||||
/obj/item/coin/attack_self(mob/user as mob)
|
||||
if(cooldown < world.time - 15)
|
||||
var/coinflip = pick(sideslist)
|
||||
cooldown = world.time
|
||||
flick("coin_[cmineral]_flip", src)
|
||||
icon_state = "coin_[cmineral]_[coinflip]"
|
||||
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
|
||||
if(do_after(user, 15, target = src))
|
||||
user.visible_message("<span class='notice'>[user] has flipped [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='notice'>You hear the clattering of loose change.</span>")
|
||||
|
||||
#undef GIBTONITE_QUALITY_LOW
|
||||
#undef GIBTONITE_QUALITY_MEDIUM
|
||||
Reference in New Issue
Block a user