initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,223 @@
|
||||
//Originally coded by ISaidNo, later modified by Kelenius. Ported from Baystation12.
|
||||
|
||||
/obj/structure/closet/crate/secure/loot
|
||||
name = "abandoned crate"
|
||||
desc = "What could be inside?"
|
||||
icon_state = "securecrate"
|
||||
var/code = null
|
||||
var/lastattempt = null
|
||||
var/attempts = 10
|
||||
var/codelen = 4
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/New()
|
||||
..()
|
||||
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "z")
|
||||
code = ""
|
||||
for(var/i = 0, i < codelen, i++)
|
||||
var/dig = pick(digits)
|
||||
code += dig
|
||||
digits -= dig //Player can enter codes with matching digits, but there are never matching digits in the answer
|
||||
|
||||
var/loot = rand(1,100) //100 different crates with varying chances of spawning
|
||||
switch(loot)
|
||||
if(1 to 5) //5% chance
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus(src)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src)
|
||||
new /obj/item/weapon/lighter(src)
|
||||
if(6 to 10)
|
||||
new /obj/item/weapon/bedsheet(src)
|
||||
new /obj/item/weapon/kitchen/knife(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(11 to 15)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/bluespace(src)
|
||||
if(16 to 20)
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/weapon/ore/diamond(src)
|
||||
if(21 to 25)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/poster/contraband(src)
|
||||
if(26 to 30)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/noreact(src)
|
||||
if(31 to 35)
|
||||
new /obj/item/seeds/cash(src)
|
||||
if(36 to 40)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
if(41 to 45)
|
||||
new /obj/item/clothing/under/shorts/red(src)
|
||||
new /obj/item/clothing/under/shorts/blue(src)
|
||||
if(46 to 50)
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/clothing/tie/horrible(src)
|
||||
if(51 to 52) // 2% chance
|
||||
new /obj/item/weapon/melee/classic_baton(src)
|
||||
if(53 to 54)
|
||||
new /obj/item/toy/balloon(src)
|
||||
if(55 to 56)
|
||||
var/newitem = pick(subtypesof(/obj/item/toy/prize))
|
||||
new newitem(src)
|
||||
if(57 to 58)
|
||||
new /obj/item/toy/syndicateballoon(src)
|
||||
if(59 to 60)
|
||||
new /obj/item/weapon/gun/energy/kinetic_accelerator/hyper(src)
|
||||
new /obj/item/clothing/suit/space(src)
|
||||
new /obj/item/clothing/head/helmet/space(src)
|
||||
if(61 to 62)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/clothing/head/kitty(src)
|
||||
new /obj/item/clothing/tie/petcollar(src)
|
||||
if(63 to 64)
|
||||
for(var/i in 1 to rand(4, 7))
|
||||
var/newcoin = pick(/obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/diamond, /obj/item/weapon/coin/plasma, /obj/item/weapon/coin/uranium)
|
||||
new newcoin(src)
|
||||
if(65 to 66)
|
||||
new /obj/item/clothing/suit/ianshirt(src)
|
||||
new /obj/item/clothing/suit/hooded/ian_costume(src)
|
||||
if(67 to 68)
|
||||
for(var/i in 1 to rand(4, 7))
|
||||
var /newitem = pick(subtypesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts/subspace)
|
||||
new newitem(src)
|
||||
if(69 to 70)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/ore/bluespace_crystal(src)
|
||||
if(71 to 72)
|
||||
new /obj/item/weapon/pickaxe/drill(src)
|
||||
if(73 to 74)
|
||||
new /obj/item/weapon/pickaxe/drill/jackhammer(src)
|
||||
if(75 to 76)
|
||||
new /obj/item/weapon/pickaxe/diamond(src)
|
||||
if(77 to 78)
|
||||
new /obj/item/weapon/pickaxe/drill/diamonddrill(src)
|
||||
if(79 to 80)
|
||||
new /obj/item/weapon/cane(src)
|
||||
new /obj/item/clothing/head/collectable/tophat(src)
|
||||
if(81 to 82)
|
||||
new /obj/item/weapon/gun/energy/plasmacutter(src)
|
||||
if(83 to 84)
|
||||
new /obj/item/toy/katana(src)
|
||||
if(85 to 86)
|
||||
new /obj/item/weapon/defibrillator/compact(src)
|
||||
if(87) //1% chance
|
||||
new /obj/item/weed_extract(src)
|
||||
if(88)
|
||||
new /obj/item/organ/brain(src)
|
||||
if(89)
|
||||
new /obj/item/organ/brain/alien(src)
|
||||
if(90)
|
||||
new /obj/item/organ/heart(src)
|
||||
if(91)
|
||||
new /obj/item/device/soulstone/anybody(src)
|
||||
if(92)
|
||||
new /obj/item/weapon/katana(src)
|
||||
if(93)
|
||||
new /obj/item/weapon/dnainjector/xraymut(src)
|
||||
if(94)
|
||||
new /obj/item/weapon/storage/backpack/clown(src)
|
||||
new /obj/item/clothing/under/rank/clown(src)
|
||||
new /obj/item/clothing/shoes/clown_shoes(src)
|
||||
new /obj/item/device/pda/clown(src)
|
||||
new /obj/item/clothing/mask/gas/clown_hat(src)
|
||||
new /obj/item/weapon/bikehorn(src)
|
||||
new /obj/item/toy/crayon/rainbow(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/waterflower(src)
|
||||
if(95)
|
||||
new /obj/item/clothing/under/rank/mime(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/device/pda/mime(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/mask/gas/mime(src)
|
||||
new /obj/item/clothing/head/beret(src)
|
||||
new /obj/item/clothing/suit/suspenders(src)
|
||||
new /obj/item/toy/crayon/mime(src)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(src)
|
||||
if(96)
|
||||
new /obj/item/weapon/hand_tele(src)
|
||||
if(97)
|
||||
new /obj/item/clothing/mask/balaclava
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
if(98)
|
||||
new /obj/item/weapon/katana/cursed(src)
|
||||
if(99)
|
||||
new /obj/item/weapon/storage/belt/champion(src)
|
||||
new /obj/item/clothing/mask/luchador(src)
|
||||
if(100)
|
||||
new /obj/item/clothing/head/bearpelt(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/attack_hand(mob/user)
|
||||
if(locked)
|
||||
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
|
||||
var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
|
||||
if(user.canUseTopic(src, 1))
|
||||
if (input == code)
|
||||
user << "<span class='notice'>The crate unlocks!</span>"
|
||||
locked = 0
|
||||
cut_overlays()
|
||||
add_overlay("securecrateg")
|
||||
else if (input == null || length(input) != codelen)
|
||||
user << "<span class='notice'>You leave the crate alone.</span>"
|
||||
else
|
||||
user << "<span class='warning'>A red light flashes.</span>"
|
||||
lastattempt = replacetext(input, 0, "z")
|
||||
attempts--
|
||||
if(attempts == 0)
|
||||
boom(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/attack_animal(mob/user)
|
||||
boom(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W, mob/user)
|
||||
if(locked)
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
boom(user)
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
user << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
|
||||
if(attempts == 1)
|
||||
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
|
||||
else
|
||||
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
|
||||
if(lastattempt != null)
|
||||
var/list/guess = list()
|
||||
var/bulls = 0
|
||||
var/cows = 0
|
||||
for(var/i = 1, i < codelen + 1, i++)
|
||||
var/a = copytext(lastattempt, i, i+1) //Stuff the code into the list
|
||||
guess += a
|
||||
guess[a] = i
|
||||
for(var/i in guess) //Go through list and count matches
|
||||
var/a = findtext(code, i)
|
||||
if(a == guess[i])
|
||||
++bulls
|
||||
else if(a)
|
||||
++cows
|
||||
user << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/togglelock(mob/user)
|
||||
if(locked)
|
||||
boom(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/proc/boom(mob/user)
|
||||
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
|
||||
for(var/atom/movable/AM in src)
|
||||
qdel(AM)
|
||||
var/turf/T = get_turf(src)
|
||||
explosion(T, -1, -1, 1, 1)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,484 @@
|
||||
/****************Explorer's Suit**************************/
|
||||
|
||||
/obj/item/clothing/suit/hooded/explorer
|
||||
name = "explorer suit"
|
||||
desc = "An armoured suit for exploring harsh environments."
|
||||
icon_state = "explorer"
|
||||
item_state = "explorer"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
|
||||
cold_protection = CHEST|GROIN|LEGS|ARMS
|
||||
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
|
||||
heat_protection = CHEST|GROIN|LEGS|ARMS
|
||||
hooded = 1
|
||||
hoodtype = /obj/item/clothing/head/explorer
|
||||
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 50, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals, /obj/item/weapon/resonator, /obj/item/device/mining_scanner, /obj/item/device/t_scanner/adv_mining_scanner, /obj/item/weapon/gun/energy/kinetic_accelerator, /obj/item/weapon/pickaxe)
|
||||
|
||||
/obj/item/clothing/head/explorer
|
||||
name = "explorer hood"
|
||||
desc = "An armoured hood for exploring harsh environments."
|
||||
icon_state = "explorer"
|
||||
body_parts_covered = HEAD
|
||||
flags = NODROP
|
||||
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS
|
||||
min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT
|
||||
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 50, bio = 100, rad = 50)
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer
|
||||
name = "explorer gas mask"
|
||||
desc = "A military-grade gas mask that can be connected to an air supply."
|
||||
icon_state = "gas_mining"
|
||||
visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
|
||||
visor_flags_inv = HIDEFACIALHAIR
|
||||
visor_flags_cover = MASKCOVERSMOUTH
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
armor = list(melee = 10, bullet = 5, laser = 5, energy = 5, bomb = 0, bio = 50, rad = 0)
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer/attack_self(mob/user)
|
||||
adjustmask(user)
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer/adjustmask(user)
|
||||
..()
|
||||
w_class = mask_adjusted ? 3 : 2
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer/folded/New()
|
||||
..()
|
||||
adjustmask()
|
||||
|
||||
|
||||
/**********************Mining Equipment Vendor Items**************************/
|
||||
|
||||
/**********************Jaunter**********************/
|
||||
|
||||
/obj/item/device/wormhole_jaunter
|
||||
name = "wormhole jaunter"
|
||||
desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space 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/mining.dmi'
|
||||
icon_state = "Jaunter"
|
||||
item_state = "electronic"
|
||||
throwforce = 0
|
||||
w_class = 2
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = "bluespace=2"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/device/wormhole_jaunter/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user.name] activates the [src.name]!</span>")
|
||||
feedback_add_details("jaunter", "U") // user activated
|
||||
activate(user)
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user)
|
||||
var/turf/device_turf = get_turf(user)
|
||||
if(!device_turf||device_turf.z==2||device_turf.z>=7)
|
||||
user << "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>"
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/get_destinations(mob/user)
|
||||
var/list/destinations = list()
|
||||
|
||||
if(isgolem(user))
|
||||
for(var/obj/item/device/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(istype(T.loc, /area/ruin/powered/golem_ship))
|
||||
destinations += B
|
||||
|
||||
// In the event golem beacon is destroyed, send to station instead
|
||||
if(destinations.len)
|
||||
return destinations
|
||||
|
||||
for(var/obj/item/device/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z == ZLEVEL_STATION)
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/activate(mob/user)
|
||||
if(!turf_check(user))
|
||||
return
|
||||
|
||||
var/list/L = get_destinations(user)
|
||||
if(!L.len)
|
||||
user << "<span class='notice'>The [src.name] found no beacons in the world to anchor a wormhole to.</span>"
|
||||
return
|
||||
var/chosen_beacon = pick(L)
|
||||
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100)
|
||||
J.target = chosen_beacon
|
||||
try_move_adjacent(J)
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/wormhole_jaunter/emp_act(power)
|
||||
var/triggered = FALSE
|
||||
|
||||
if(usr.get_item_by_slot(slot_belt) == src)
|
||||
if(power == 1)
|
||||
triggered = TRUE
|
||||
else if(power == 2 && prob(50))
|
||||
triggered = TRUE
|
||||
|
||||
if(triggered)
|
||||
usr.visible_message("<span class='warning'>The [src] overloads and activates!</span>")
|
||||
feedback_add_details("jaunter","E") // EMP accidental activation
|
||||
activate(usr)
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user)
|
||||
if(user.get_item_by_slot(slot_belt) == src)
|
||||
user << "Your [src] activates, saving you from the chasm!</span>"
|
||||
feedback_add_details("jaunter","C") // chasm automatic activation
|
||||
activate(user)
|
||||
else
|
||||
user << "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.</span>"
|
||||
|
||||
|
||||
/obj/effect/portal/wormhole/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."
|
||||
|
||||
/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
|
||||
if(istype(M, /obj/effect))
|
||||
return
|
||||
|
||||
if(istype(M, /atom/movable))
|
||||
if(do_teleport(M, target, 6))
|
||||
// KERPLUNK
|
||||
playsound(M,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/L = M
|
||||
L.Weaken(3)
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
addtimer(L, "vomit", 20)
|
||||
|
||||
/**********************Resonator**********************/
|
||||
|
||||
/obj/item/weapon/resonator
|
||||
name = "resonator"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "resonator"
|
||||
item_state = "resonator"
|
||||
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 vacuum."
|
||||
w_class = 3
|
||||
force = 15
|
||||
throwforce = 10
|
||||
var/cooldown = 0
|
||||
var/fieldsactive = 0
|
||||
var/burst_time = 30
|
||||
var/fieldlimit = 4
|
||||
origin_tech = "magnets=3;engineering=3"
|
||||
|
||||
/obj/item/weapon/resonator/upgraded
|
||||
name = "upgraded resonator"
|
||||
desc = "An upgraded version of the resonator that can produce more fields at once."
|
||||
icon_state = "resonator_u"
|
||||
item_state = "resonator_u"
|
||||
origin_tech = "materials=4;powerstorage=3;engineering=3;magnets=3"
|
||||
fieldlimit = 6
|
||||
|
||||
/obj/item/weapon/resonator/proc/CreateResonance(target, creator)
|
||||
var/turf/T = get_turf(target)
|
||||
if(locate(/obj/effect/resonance) in T)
|
||||
return
|
||||
if(fieldsactive < fieldlimit)
|
||||
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
|
||||
new /obj/effect/resonance(T, creator, burst_time)
|
||||
fieldsactive++
|
||||
spawn(burst_time)
|
||||
fieldsactive--
|
||||
|
||||
/obj/item/weapon/resonator/attack_self(mob/user)
|
||||
if(burst_time == 50)
|
||||
burst_time = 30
|
||||
user << "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>"
|
||||
else
|
||||
burst_time = 50
|
||||
user << "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>"
|
||||
|
||||
/obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(proximity_flag)
|
||||
if(!check_allowed_items(target, 1)) return
|
||||
CreateResonance(target, user)
|
||||
|
||||
/obj/effect/resonance
|
||||
name = "resonance field"
|
||||
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shield1"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/resonance_damage = 20
|
||||
|
||||
/obj/effect/resonance/New(loc, var/creator = null, var/timetoburst)
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
if(!istype(proj_turf))
|
||||
return
|
||||
if(istype(proj_turf, /turf/closed/mineral))
|
||||
var/turf/closed/mineral/M = proj_turf
|
||||
spawn(timetoburst)
|
||||
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
M.gets_drilled(creator)
|
||||
qdel(src)
|
||||
else
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 50)
|
||||
name = "strong resonance field"
|
||||
resonance_damage = 60
|
||||
spawn(timetoburst)
|
||||
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
if(creator)
|
||||
for(var/mob/living/L in src.loc)
|
||||
add_logs(creator, L, "used a resonator field on", "resonator")
|
||||
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
|
||||
L.adjustBruteLoss(resonance_damage)
|
||||
else
|
||||
for(var/mob/living/L in src.loc)
|
||||
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
|
||||
L.adjustBruteLoss(resonance_damage)
|
||||
qdel(src)
|
||||
|
||||
/**********************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
|
||||
|
||||
/**********************Lazarus Injector**********************/
|
||||
|
||||
/obj/item/weapon/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/syringe.dmi'
|
||||
icon_state = "lazarus_hypo"
|
||||
item_state = "hypo"
|
||||
throwforce = 0
|
||||
w_class = 2
|
||||
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
|
||||
origin_tech = "biotech=4;magnets=6"
|
||||
|
||||
/obj/item/weapon/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)
|
||||
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(full_heal = 1, admin_revive = 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>")
|
||||
feedback_add_details("lazarus_injector", "[M.type]")
|
||||
playsound(src,'sound/effects/refill.ogg',50,1)
|
||||
icon_state = "lazarus_empty"
|
||||
return
|
||||
else
|
||||
user << "<span class='info'>[src] is only effective on the dead.</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='info'>[src] is only effective on lesser beings.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/lazarus_injector/emp_act()
|
||||
if(!malfunctioning)
|
||||
malfunctioning = 1
|
||||
|
||||
/obj/item/weapon/lazarus_injector/examine(mob/user)
|
||||
..()
|
||||
if(!loaded)
|
||||
user << "<span class='info'>[src] is empty.</span>"
|
||||
if(malfunctioning)
|
||||
user << "<span class='info'>The display on [src] seems to be flickering.</span>"
|
||||
|
||||
/**********************Mining Scanners**********************/
|
||||
|
||||
/obj/item/device/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_state = "mining1"
|
||||
item_state = "analyzer"
|
||||
w_class = 2
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/cooldown = 0
|
||||
origin_tech = "engineering=1;magnets=1"
|
||||
|
||||
/obj/item/device/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/device/mining_scanner/admin
|
||||
|
||||
/obj/item/device/mining_scanner/admin/attack_self(mob/user)
|
||||
for(var/turf/closed/mineral/M in world)
|
||||
if(M.scan_state)
|
||||
M.icon_state = M.scan_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/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 = 2
|
||||
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/device/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/device/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/device/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/device/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, 1,0,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/closed/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/closed/mineral/M in minerals)
|
||||
var/turf/F = get_turf(M)
|
||||
var/image/I = image('icons/turf/smoothrocks.dmi', loc = F, icon_state = M.scan_state, layer = FLASH_LAYER)
|
||||
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/closed/mineral/M in range(range, T))
|
||||
if(M.scan_state)
|
||||
minerals += M
|
||||
if(minerals.len)
|
||||
for(var/turf/closed/mineral/M in minerals)
|
||||
var/obj/effect/overlay/temp/mining_overlay/C = PoolOrNew(/obj/effect/overlay/temp/mining_overlay, M)
|
||||
C.icon_state = M.scan_state
|
||||
|
||||
/obj/effect/overlay/temp/mining_overlay
|
||||
layer = FLASH_LAYER
|
||||
icon = 'icons/turf/smoothrocks.dmi'
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
duration = 30
|
||||
pixel_x = -4
|
||||
pixel_y = -4
|
||||
|
||||
|
||||
/**********************Xeno Warning Sign**********************/
|
||||
/obj/structure/sign/xeno_warning_mining
|
||||
name = "DANGEROUS ALIEN LIFE"
|
||||
desc = "A sign that warns would be travellers of hostile alien life in the vicinity."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "xeno_warning"
|
||||
|
||||
/******************Hardsuit Jetpack Upgrade*******************/
|
||||
/obj/item/hardsuit_jetpack
|
||||
name = "hardsuit jetpack upgrade"
|
||||
icon_state = "jetpack_upgrade"
|
||||
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
|
||||
origin_tech = "materials=4;magnets=4;engineering=5"
|
||||
// Same as jetpack implant minus biotech, makes sense.
|
||||
|
||||
|
||||
/obj/item/hardsuit_jetpack/afterattack(var/obj/item/clothing/suit/space/hardsuit/S, mob/user)
|
||||
..()
|
||||
if(!istype(S))
|
||||
user << "<span class='warning'>This upgrade can only be applied to a hardsuit.</span>"
|
||||
else if(S.jetpack)
|
||||
user << "<span class='warning'>[S] already has a jetpack installed.</span>"
|
||||
else if(S == user.get_item_by_slot(slot_wear_suit)) //Make sure the player is not wearing the suit before applying the upgrade.
|
||||
user << "<span class='warning'>You cannot install the upgrade to [S] while wearing it.</span>"
|
||||
else
|
||||
S.jetpack = new /obj/item/weapon/tank/jetpack/suit(S)
|
||||
user << "<span class='notice'>You successfully install the jetpack into [S].</span>"
|
||||
qdel(src)
|
||||
|
||||
/*********************Hivelord stabilizer****************/
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer
|
||||
name = "stabilizing serum"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle19"
|
||||
desc = "Inject certain types of monster organs with this stabilizer to preserve their healing powers indefinitely."
|
||||
w_class = 1
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/organ/M, mob/user)
|
||||
var/obj/item/organ/hivelord_core/C = M
|
||||
if(!istype(C, /obj/item/organ/hivelord_core))
|
||||
user << "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>"
|
||||
return ..()
|
||||
|
||||
C.preserved()
|
||||
user << "<span class='notice'>You inject the [M] with the stabilizer. It will no longer go inert.</span>"
|
||||
qdel(src)
|
||||
@@ -0,0 +1,189 @@
|
||||
var/list/total_extraction_beacons = list()
|
||||
|
||||
/obj/item/weapon/extraction_pack
|
||||
name = "fulton material extraction pack"
|
||||
desc = "A balloon that can be used to extract a target to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand."
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "extraction_pack"
|
||||
w_class = 3
|
||||
var/obj/structure/extraction_point/beacon
|
||||
var/list/beacon_networks = list("station")
|
||||
var/uses_left = 3
|
||||
var/can_use_indoors
|
||||
var/safe_for_living_creatures = 0
|
||||
|
||||
/obj/item/weapon/extraction_pack/medivac
|
||||
name = "fulton medivac extraction pack"
|
||||
desc = "A specialized extraction balloon capable of safely extracting living targets."
|
||||
uses_left = 1
|
||||
safe_for_living_creatures = 1
|
||||
|
||||
/obj/item/weapon/extraction_pack/examine()
|
||||
. = ..()
|
||||
usr.show_message("It has [uses_left] uses remaining.", 1)
|
||||
|
||||
/obj/item/weapon/extraction_pack/attack_self(mob/user)
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in total_extraction_beacons)
|
||||
var/obj/structure/extraction_point/EP = B
|
||||
if(EP.beacon_network in beacon_networks)
|
||||
possible_beacons += EP
|
||||
|
||||
if(!possible_beacons.len)
|
||||
user << "There are no extraction beacons in existance!"
|
||||
return
|
||||
|
||||
else
|
||||
var/A
|
||||
|
||||
A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) in possible_beacons
|
||||
|
||||
if(!A)
|
||||
return
|
||||
beacon = A
|
||||
|
||||
/obj/item/weapon/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
if(!beacon)
|
||||
user << "[src] is not linked to a beacon, and cannot be used."
|
||||
return
|
||||
if(!can_use_indoors)
|
||||
var/area/area = get_area(A)
|
||||
if(!area.outdoors)
|
||||
user << "[src] can only be used on things that are outdoors!"
|
||||
return
|
||||
if(!flag)
|
||||
return
|
||||
if(!istype(A))
|
||||
return
|
||||
else
|
||||
if(!safe_for_living_creatures && check_for_living_mobs(A))
|
||||
user << "[src] is not safe for use with living creatures, they wouldn't survive the trip back!"
|
||||
return
|
||||
if(A.loc == user || A == user) // no extracting stuff you're holding in your hands/yourself
|
||||
return
|
||||
if(A.anchored)
|
||||
return
|
||||
user << "<span class='notice'>You start attaching the pack to [A]...</span>"
|
||||
if(do_after(user,50,target=A))
|
||||
user << "<span class='notice'>You attach the pack to [A] and activate it.</span>"
|
||||
uses_left--
|
||||
if(uses_left <= 0)
|
||||
user.drop_item(src)
|
||||
loc = A
|
||||
var/image/balloon
|
||||
var/image/balloon2
|
||||
var/image/balloon3
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
M.Weaken(16) // Keep them from moving during the duration of the extraction
|
||||
M.buckled = 0 // Unbuckle them to prevent anchoring problems
|
||||
else
|
||||
A.anchored = 1
|
||||
A.density = 0
|
||||
var/obj/effect/extraction_holder/holder_obj = new(A.loc)
|
||||
holder_obj.appearance = A.appearance
|
||||
A.loc = holder_obj
|
||||
balloon2 = image('icons/obj/fulton_balloon.dmi',"fulton_expand")
|
||||
balloon2.pixel_y = 10
|
||||
balloon2.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.overlays += balloon2
|
||||
sleep(4)
|
||||
balloon = image('icons/obj/fulton_balloon.dmi',"fulton_balloon")
|
||||
balloon.pixel_y = 10
|
||||
balloon.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.overlays -= balloon2
|
||||
holder_obj.overlays += balloon
|
||||
playsound(holder_obj.loc, 'sound/items/fulext_deploy.wav', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 10, time = 20)
|
||||
sleep(20)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
playsound(holder_obj.loc, 'sound/items/fultext_launch.wav', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 1000, time = 30)
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/L = A
|
||||
L.SetParalysis(0)
|
||||
L.drowsyness = 0
|
||||
L.sleeping = 0
|
||||
sleep(30)
|
||||
var/list/flooring_near_beacon = list()
|
||||
for(var/turf/open/floor in orange(1, beacon))
|
||||
flooring_near_beacon += floor
|
||||
holder_obj.loc = pick(flooring_near_beacon)
|
||||
animate(holder_obj, pixel_z = 10, time = 50)
|
||||
sleep(50)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
balloon3 = image('icons/obj/fulton_balloon.dmi',"fulton_retract")
|
||||
balloon3.pixel_y = 10
|
||||
balloon3.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.overlays -= balloon
|
||||
holder_obj.overlays += balloon3
|
||||
sleep(4)
|
||||
holder_obj.overlays -= balloon3
|
||||
A.anchored = 0 // An item has to be unanchored to be extracted in the first place.
|
||||
A.density = initial(A.density)
|
||||
animate(holder_obj, pixel_z = 0, time = 5)
|
||||
sleep(5)
|
||||
A.loc = holder_obj.loc
|
||||
qdel(holder_obj)
|
||||
if(uses_left <= 0)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/fulton_core
|
||||
name = "extraction beacon signaller"
|
||||
desc = "Emits a signal which fulton recovery devices can lock on to. Craft with metal to create a beacon."
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "subspace_amplifier"
|
||||
|
||||
/datum/crafting_recipe/fulton
|
||||
name = "Fulton Recovery Beacon"
|
||||
result = /obj/structure/extraction_point
|
||||
reqs = list(/obj/item/fulton_core = 1, /obj/item/stack/sheet/metal = 5)
|
||||
time = 15
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/structure/extraction_point
|
||||
name = "fulton recovery beacon"
|
||||
desc = "A beacon for the fulton recovery system. Hit a beacon with a pack to link the pack to a beacon."
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "extraction_point"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/beacon_network = "station"
|
||||
|
||||
/obj/structure/extraction_point/New()
|
||||
var/area/area_name = get_area(src)
|
||||
name += " ([rand(100,999)]) ([area_name.name])"
|
||||
total_extraction_beacons += src
|
||||
..()
|
||||
|
||||
/obj/structure/extraction_point/Destroy()
|
||||
total_extraction_beacons -= src
|
||||
..()
|
||||
|
||||
/obj/effect/extraction_holder
|
||||
name = "extraction holder"
|
||||
desc = "you shouldnt see this"
|
||||
var/atom/movable/stored_obj
|
||||
|
||||
/obj/item/weapon/extraction_pack/proc/check_for_living_mobs(atom/A)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
if(L.stat != DEAD)
|
||||
return 1
|
||||
for(var/thing in A.GetAllContents())
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
if(L.stat != DEAD)
|
||||
return 1
|
||||
return 0
|
||||
@@ -0,0 +1,19 @@
|
||||
/turf/closed/mineral/random/labormineral
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/iron = 100, /turf/closed/mineral/uranium = 1, /turf/closed/mineral/diamond = 1,
|
||||
/turf/closed/mineral/gold = 1, /turf/closed/mineral/silver = 1, /turf/closed/mineral/plasma = 1)
|
||||
icon_state = "rock_labor"
|
||||
|
||||
/turf/closed/mineral/random/labormineral/New()
|
||||
icon_state = "rock"
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/random/labormineral/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/iron/volcanic = 100, /turf/closed/mineral/uranium/volcanic = 1, /turf/closed/mineral/diamond/volcanic = 1,
|
||||
/turf/closed/mineral/gold/volcanic = 1, /turf/closed/mineral/silver/volcanic = 1, /turf/closed/mineral/plasma/volcanic = 1)
|
||||
@@ -0,0 +1,27 @@
|
||||
/obj/machinery/computer/shuttle/labor
|
||||
name = "labor shuttle console"
|
||||
desc = "Used to call and send the labor camp shuttle."
|
||||
circuit = /obj/item/weapon/circuitboard/computer/labor_shuttle
|
||||
shuttleId = "laborcamp"
|
||||
possible_destinations = "laborcamp_home;laborcamp_away"
|
||||
req_access = list(access_brig)
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way
|
||||
name = "prisoner shuttle console"
|
||||
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
|
||||
possible_destinations = "laborcamp_away"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/labor_shuttle/one_way
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
|
||||
if(!M)
|
||||
usr << "<span class='warning'>Cannot locate shuttle!</span>"
|
||||
return 0
|
||||
var/obj/docking_port/stationary/S = M.get_docked()
|
||||
if(S && S.name == "laborcamp_away")
|
||||
usr << "<span class='warning'>Shuttle is already at the outpost!</span>"
|
||||
return 0
|
||||
..()
|
||||
@@ -0,0 +1,168 @@
|
||||
/**********************Prisoners' Console**************************/
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console
|
||||
name = "point claim console"
|
||||
desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine = null
|
||||
var/machinedir = SOUTH
|
||||
var/obj/item/weapon/card/id/prisoner/inserted_id
|
||||
var/obj/machinery/door/airlock/release_door
|
||||
var/door_tag = "prisonshuttle"
|
||||
var/obj/item/device/radio/Radio //needed to send messages to sec radio
|
||||
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/New()
|
||||
..()
|
||||
Radio = new/obj/item/device/radio(src)
|
||||
Radio.listening = 0
|
||||
addtimer(src, "locate_stacking_machine", 7)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||
if(!inserted_id)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
user << "<span class='notice'>You insert [I].</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>There's an ID inserted already.</span>"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "labor_claim_console", name, 450, 475, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/can_go_home = FALSE
|
||||
|
||||
data["emagged"] = emagged
|
||||
if(inserted_id)
|
||||
data["id"] = inserted_id
|
||||
data["id_name"] = inserted_id.registered_name
|
||||
data["points"] = inserted_id.points
|
||||
data["goal"] = inserted_id.goal
|
||||
if(check_auth())
|
||||
can_go_home = TRUE
|
||||
|
||||
var/list/ores = list()
|
||||
if(stacking_machine)
|
||||
data["unclaimed_points"] = stacking_machine.points
|
||||
for(var/ore in stacking_machine.ore_values)
|
||||
var/list/O = list()
|
||||
O["ore"] = ore
|
||||
O["value"] = stacking_machine.ore_values[ore]
|
||||
ores += list(O)
|
||||
|
||||
data["ores"] = ores
|
||||
data["can_go_home"] = can_go_home
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("handle_id")
|
||||
if(inserted_id)
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(inserted_id)
|
||||
inserted_id = null
|
||||
else
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
inserted_id = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
if("claim_points")
|
||||
inserted_id.points += stacking_machine.points
|
||||
stacking_machine.points = 0
|
||||
usr << "Points transferred."
|
||||
if("move_shuttle")
|
||||
if(!alone_in_area(get_area(src), usr))
|
||||
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
|
||||
else
|
||||
switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home"))
|
||||
if(1)
|
||||
usr << "<span class='notice'>Shuttle not found</span>"
|
||||
if(2)
|
||||
usr << "<span class='notice'>Shuttle already at station</span>"
|
||||
if(3)
|
||||
usr << "<span class='notice'>No permission to dock could be granted.</span>"
|
||||
else
|
||||
if(!emagged)
|
||||
Radio.set_frequency(SEC_FREQ)
|
||||
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", SEC_FREQ)
|
||||
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
|
||||
if(emagged)
|
||||
return 1 //Shuttle is emagged, let any ol' person through
|
||||
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
|
||||
stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if(stacking_machine)
|
||||
stacking_machine.CONSOLE = src
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
|
||||
|
||||
/**********************Prisoner Collection Unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker
|
||||
var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity.
|
||||
var/list/ore_values = list("glass" = 1, "metal" = 2, "solid plasma" = 20, "plasteel" = 23, "reinforced glass" = 4, "gold" = 20, "silver" = 20, "uranium" = 20, "diamond" = 25, "bananium" = 50)
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(istype(inp))
|
||||
var/n = inp.name
|
||||
var/a = inp.amount
|
||||
if(n in ore_values)
|
||||
points += ore_values[n] * a
|
||||
..()
|
||||
|
||||
|
||||
/**********************Point Lookup Console**************************/
|
||||
/obj/machinery/mineral/labor_points_checker
|
||||
name = "points checking console"
|
||||
desc = "A console used by prisoners to check the progress on their quotas. Simply swipe a prisoner ID."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||
var/obj/item/weapon/card/id/prisoner/prisoner_id = I
|
||||
user << "<span class='notice'><B>ID: [prisoner_id.registered_name]</B></span>"
|
||||
user << "<span class='notice'>Points Collected:[prisoner_id.points]</span>"
|
||||
user << "<span class='notice'>Point Quota: [prisoner_id.goal]</span>"
|
||||
user << "<span class='notice'>Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Error: Invalid ID</span>"
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,32 @@
|
||||
/**********************Lavaland Areas**************************/
|
||||
|
||||
/area/lavaland
|
||||
icon_state = "mining"
|
||||
has_gravity = 1
|
||||
|
||||
/area/lavaland/surface
|
||||
name = "Lavaland"
|
||||
icon_state = "explored"
|
||||
music = null
|
||||
requires_power = 1
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
/area/lavaland/underground
|
||||
name = "Lavaland Caves"
|
||||
icon_state = "unexplored"
|
||||
music = null
|
||||
always_unpowered = 1
|
||||
requires_power = 1
|
||||
poweralm = 0
|
||||
power_environ = 0
|
||||
power_equip = 0
|
||||
power_light = 0
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
|
||||
/area/lavaland/surface/outdoors
|
||||
name = "Lavaland Wastes"
|
||||
outdoors = 1
|
||||
|
||||
/area/lavaland/surface/outdoors/explored
|
||||
name = "Lavaland Labor Camp"
|
||||
@@ -0,0 +1,721 @@
|
||||
//The chests dropped by mob spawner tendrils. Also contains associated loot.
|
||||
|
||||
/obj/structure/closet/crate/necropolis
|
||||
name = "necropolis chest"
|
||||
desc = "It's watching you closely."
|
||||
icon_state = "necrocrate"
|
||||
|
||||
/obj/structure/closet/crate/necropolis/tendril
|
||||
desc = "It's watching you suspiciously."
|
||||
|
||||
/obj/structure/closet/crate/necropolis/tendril/New()
|
||||
..()
|
||||
var/loot = rand(1,25)
|
||||
switch(loot)
|
||||
if(1)
|
||||
new /obj/item/device/shared_storage/red(src)
|
||||
if(2)
|
||||
new /obj/item/clothing/suit/space/hardsuit/cult(src)
|
||||
if(3)
|
||||
new /obj/item/device/soulstone/anybody(src)
|
||||
if(4)
|
||||
new /obj/item/weapon/katana/cursed(src)
|
||||
if(5)
|
||||
new /obj/item/clothing/glasses/godeye(src)
|
||||
if(6)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/potion/flight(src)
|
||||
if(7)
|
||||
new /obj/item/weapon/pickaxe/diamond(src)
|
||||
if(8)
|
||||
new /obj/item/clothing/head/culthood(src)
|
||||
new /obj/item/clothing/suit/cultrobes(src)
|
||||
new /obj/item/weapon/bedsheet/cult(src)
|
||||
if(9)
|
||||
new /obj/item/organ/brain/alien(src)
|
||||
if(10)
|
||||
new /obj/item/organ/heart/cursed(src)
|
||||
if(11)
|
||||
new /obj/item/ship_in_a_bottle(src)
|
||||
if(12)
|
||||
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker(src)
|
||||
if(13)
|
||||
new /obj/item/weapon/sord(src)
|
||||
if(14)
|
||||
new /obj/item/weapon/nullrod/scythe/talking(src)
|
||||
if(15)
|
||||
new /obj/item/weapon/nullrod/armblade(src)
|
||||
if(16)
|
||||
new /obj/item/weapon/guardiancreator(src)
|
||||
if(17)
|
||||
new /obj/item/stack/sheet/runed_metal/fifty(src)
|
||||
if(18)
|
||||
new /obj/item/device/warp_cube/red(src)
|
||||
if(19)
|
||||
new /obj/item/device/wisp_lantern(src)
|
||||
if(20)
|
||||
new /obj/item/device/immortality_talisman(src)
|
||||
if(21)
|
||||
new /obj/item/weapon/gun/magic/hook(src)
|
||||
if(22)
|
||||
new /obj/item/voodoo(src)
|
||||
if(23)
|
||||
new /obj/item/weapon/grenade/clusterbuster/inferno(src)
|
||||
if(24)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/hell(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor(src)
|
||||
if(25)
|
||||
new /obj/item/weapon/spellbook/oneuse/summonitem(src)
|
||||
|
||||
|
||||
|
||||
//Spooky special loot
|
||||
|
||||
/obj/item/device/wisp_lantern
|
||||
name = "spooky lantern"
|
||||
desc = "This lantern gives off no light, but is home to a friendly wisp."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "lantern-blue"
|
||||
var/obj/effect/wisp/wisp
|
||||
|
||||
/obj/item/device/wisp_lantern/attack_self(mob/user)
|
||||
if(!wisp)
|
||||
user << "<span class='warning'>The wisp has gone missing!</span>"
|
||||
return
|
||||
if(wisp.loc == src)
|
||||
user << "<span class='notice'>You release the wisp. It begins to \
|
||||
bob around your head.</span>"
|
||||
user.sight |= SEE_MOBS
|
||||
icon_state = "lantern"
|
||||
wisp.orbit(user, 20)
|
||||
feedback_add_details("wisp_lantern","F") // freed
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You return the wisp to the lantern.\
|
||||
</span>"
|
||||
|
||||
if(wisp.orbiting)
|
||||
var/atom/A = wisp.orbiting
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
M.sight &= ~SEE_MOBS
|
||||
M << "<span class='notice'>Your vision returns to \
|
||||
normal.</span>"
|
||||
|
||||
wisp.stop_orbit()
|
||||
wisp.loc = src
|
||||
icon_state = "lantern-blue"
|
||||
feedback_add_details("wisp_lantern","R") // returned
|
||||
|
||||
/obj/item/device/wisp_lantern/New()
|
||||
..()
|
||||
wisp = new(src)
|
||||
|
||||
/obj/item/device/wisp_lantern/Destroy()
|
||||
if(wisp)
|
||||
if(wisp.loc == src)
|
||||
qdel(wisp)
|
||||
else
|
||||
wisp.visible_message("<span class='notice'>[wisp] has a sad \
|
||||
feeling for a moment, then it passes.</span>")
|
||||
..()
|
||||
|
||||
//Wisp Lantern
|
||||
/obj/effect/wisp
|
||||
name = "friendly wisp"
|
||||
desc = "Happy to light your way."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "orb"
|
||||
luminosity = 7
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
|
||||
/obj/item/device/warp_cube
|
||||
name = "blue cube"
|
||||
desc = "A mysterious blue cube."
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "blue_cube"
|
||||
var/obj/item/device/warp_cube/linked
|
||||
|
||||
|
||||
//Red/Blue Cubes
|
||||
|
||||
/obj/item/device/warp_cube/attack_self(mob/user)
|
||||
if(!linked)
|
||||
user << "[src] fizzles uselessly."
|
||||
if(linked.z == CENTCOMM)
|
||||
user << "[linked] is somewhere you can't go."
|
||||
|
||||
PoolOrNew(/obj/effect/particle_effect/smoke, user.loc)
|
||||
user.forceMove(get_turf(linked))
|
||||
feedback_add_details("warp_cube","[src.type]")
|
||||
PoolOrNew(/obj/effect/particle_effect/smoke, user.loc)
|
||||
|
||||
/obj/item/device/warp_cube/red
|
||||
name = "red cube"
|
||||
desc = "A mysterious red cube."
|
||||
icon_state = "red_cube"
|
||||
|
||||
/obj/item/device/warp_cube/red/New()
|
||||
..()
|
||||
if(!linked)
|
||||
var/obj/item/device/warp_cube/blue = new(src.loc)
|
||||
linked = blue
|
||||
blue.linked = src
|
||||
|
||||
//Meat Hook
|
||||
/obj/item/weapon/gun/magic/hook
|
||||
name = "meat hook"
|
||||
desc = "Mid or feed."
|
||||
ammo_type = /obj/item/ammo_casing/magic/hook
|
||||
icon_state = "hook"
|
||||
item_state = "chain"
|
||||
fire_sound = 'sound/weapons/batonextend.ogg'
|
||||
max_charges = 1
|
||||
flags = NOBLUDGEON
|
||||
force = 18
|
||||
|
||||
/obj/item/ammo_casing/magic/hook
|
||||
name = "hook"
|
||||
desc = "a hook."
|
||||
projectile_type = /obj/item/projectile/hook
|
||||
caliber = "hook"
|
||||
icon_state = "hook"
|
||||
|
||||
/obj/item/projectile/hook
|
||||
name = "hook"
|
||||
icon_state = "hook"
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
pass_flags = PASSTABLE
|
||||
damage = 25
|
||||
armour_penetration = 100
|
||||
damage_type = BRUTE
|
||||
hitsound = 'sound/effects/splat.ogg'
|
||||
weaken = 3
|
||||
var/chain
|
||||
|
||||
/obj/item/ammo_casing/magic/hook/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
..()
|
||||
var/obj/item/projectile/hook/P = BB
|
||||
spawn(1)
|
||||
P.chain = P.Beam(user,icon_state="chain",icon = 'icons/obj/lavaland/artefacts.dmi',time=1000, maxdistance = 30)
|
||||
|
||||
/obj/item/projectile/hook/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.visible_message("<span class='danger'>[L] is snagged by [firer]'s hook!</span>")
|
||||
L.forceMove(get_turf(firer))
|
||||
qdel(chain)
|
||||
|
||||
//Immortality Talisman
|
||||
/obj/item/device/immortality_talisman
|
||||
name = "Immortality Talisman"
|
||||
desc = "A dread talisman that can render you completely invulnerable."
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "talisman"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/device/immortality_talisman/Destroy(force)
|
||||
if(force)
|
||||
. = ..()
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/obj/item/device/immortality_talisman/attack_self(mob/user)
|
||||
if(cooldown < world.time)
|
||||
feedback_add_details("immortality_talisman","U") // usage
|
||||
cooldown = world.time + 600
|
||||
user.visible_message("<span class='danger'>[user] vanishes from reality, leaving a a hole in their place!</span>")
|
||||
var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc))
|
||||
Z.name = "hole in reality"
|
||||
Z.desc = "It's shaped an awful lot like [user.name]."
|
||||
Z.setDir(user.dir)
|
||||
user.forceMove(Z)
|
||||
user.notransform = 1
|
||||
user.status_flags |= GODMODE
|
||||
spawn(100)
|
||||
user.status_flags &= ~GODMODE
|
||||
user.notransform = 0
|
||||
user.forceMove(get_turf(Z))
|
||||
user.visible_message("<span class='danger'>[user] pops back into reality!</span>")
|
||||
Z.can_destroy = TRUE
|
||||
qdel(Z)
|
||||
|
||||
/obj/effect/immortality_talisman
|
||||
icon_state = "blank"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
burn_state = LAVA_PROOF
|
||||
var/can_destroy = FALSE
|
||||
|
||||
/obj/effect/immortality_talisman/attackby()
|
||||
return
|
||||
|
||||
/obj/effect/immortality_talisman/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/immortality_talisman/singularity_pull()
|
||||
return 0
|
||||
|
||||
/obj/effect/immortality_talisman/Destroy(force)
|
||||
if(!can_destroy && !force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
|
||||
//Shared Bag
|
||||
|
||||
//Internal
|
||||
|
||||
/obj/item/weapon/storage/backpack/shared
|
||||
name = "paradox bag"
|
||||
desc = "Somehow, it's in two places at once."
|
||||
max_combined_w_class = 60
|
||||
max_w_class = 3
|
||||
|
||||
|
||||
//External
|
||||
|
||||
/obj/item/device/shared_storage
|
||||
name = "paradox bag"
|
||||
desc = "Somehow, it's in two places at once."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "cultpack"
|
||||
slot_flags = SLOT_BACK
|
||||
var/obj/item/weapon/storage/backpack/shared/bag
|
||||
|
||||
|
||||
/obj/item/device/shared_storage/red
|
||||
name = "paradox bag"
|
||||
desc = "Somehow, it's in two places at once."
|
||||
|
||||
/obj/item/device/shared_storage/red/New()
|
||||
..()
|
||||
if(!bag)
|
||||
var/obj/item/weapon/storage/backpack/shared/S = new(src)
|
||||
var/obj/item/device/shared_storage/blue = new(src.loc)
|
||||
|
||||
src.bag = S
|
||||
blue.bag = S
|
||||
|
||||
|
||||
/obj/item/device/shared_storage/attackby(obj/item/W, mob/user, params)
|
||||
if(bag)
|
||||
bag.loc = user
|
||||
bag.attackby(W, user, params)
|
||||
|
||||
|
||||
/obj/item/device/shared_storage/attack_hand(mob/living/carbon/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(loc == user && user.back && user.back == src)
|
||||
if(bag)
|
||||
bag.loc = user
|
||||
bag.attack_hand(user)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/shared_storage/MouseDrop(atom/over_object)
|
||||
if(iscarbon(usr) || isdrone(usr))
|
||||
var/mob/M = usr
|
||||
|
||||
if(!over_object)
|
||||
return
|
||||
|
||||
if (istype(usr.loc,/obj/mecha))
|
||||
return
|
||||
|
||||
if(!M.restrained() && !M.stat)
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
|
||||
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
switch(H.slot_id)
|
||||
if(slot_r_hand)
|
||||
M.put_in_r_hand(src)
|
||||
if(slot_l_hand)
|
||||
M.put_in_l_hand(src)
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
|
||||
//Boat
|
||||
|
||||
/obj/vehicle/lavaboat
|
||||
name = "lava boat"
|
||||
desc = "A boat used for traversing lava."
|
||||
icon_state = "goliath_boat"
|
||||
icon = 'icons/obj/lavaland/dragonboat.dmi'
|
||||
keytype = /obj/item/weapon/oar
|
||||
burn_state = LAVA_PROOF
|
||||
|
||||
/obj/vehicle/lavaboat/relaymove(mob/user, direction)
|
||||
var/turf/next = get_step(src, direction)
|
||||
var/turf/current = get_turf(src)
|
||||
|
||||
if(istype(next, /turf/open/floor/plating/lava) || istype(current, /turf/open/floor/plating/lava)) //We can move from land to lava, or lava to land, but not from land to land
|
||||
..()
|
||||
else
|
||||
user << "Boats don't go on land!"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/oar
|
||||
name = "oar"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "oar"
|
||||
item_state = "rods"
|
||||
desc = "Not to be confused with the kind Research hassles you for."
|
||||
force = 12
|
||||
w_class = 3
|
||||
burn_state = LAVA_PROOF
|
||||
|
||||
/datum/crafting_recipe/oar
|
||||
name = "goliath bone oar"
|
||||
result = /obj/item/weapon/oar
|
||||
reqs = list(/obj/item/stack/sheet/bone = 2)
|
||||
time = 15
|
||||
category = CAT_PRIMAL
|
||||
|
||||
/datum/crafting_recipe/boat
|
||||
name = "goliath hide boat"
|
||||
result = /obj/vehicle/lavaboat
|
||||
reqs = list(/obj/item/stack/sheet/animalhide/goliath_hide = 3)
|
||||
time = 50
|
||||
category = CAT_PRIMAL
|
||||
|
||||
//Dragon Boat
|
||||
|
||||
|
||||
/obj/item/ship_in_a_bottle
|
||||
name = "ship in a bottle"
|
||||
desc = "A tiny ship inside a bottle."
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "ship_bottle"
|
||||
|
||||
/obj/item/ship_in_a_bottle/attack_self(mob/user)
|
||||
user << "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out."
|
||||
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
|
||||
new /obj/vehicle/lavaboat/dragon(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/vehicle/lavaboat/dragon
|
||||
name = "mysterious boat"
|
||||
desc = "This boat moves where you will it, without the need for an oar."
|
||||
keytype = null
|
||||
icon_state = "dragon_boat"
|
||||
generic_pixel_y = 2
|
||||
generic_pixel_x = 1
|
||||
vehicle_move_delay = 1
|
||||
|
||||
//Potion of Flight
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/potion
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
icon_state = "potionflask"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/potion/flight
|
||||
name = "strange elixir"
|
||||
desc = "A flask with an almost-holy aura emitting from it. The label on the bottle says: 'erqo'hyy tvi'rf lbh jv'atf'."
|
||||
list_reagents = list("flightpotion" = 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/potion/update_icon()
|
||||
if(reagents.total_volume)
|
||||
icon_state = "potionflask"
|
||||
else
|
||||
icon_state = "potionflask_empty"
|
||||
|
||||
/datum/reagent/flightpotion
|
||||
name = "Flight Potion"
|
||||
id = "flightpotion"
|
||||
description = "Strange mutagenic compound of unknown origins."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFEBEB"
|
||||
|
||||
/datum/reagent/flightpotion/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(iscarbon(M) && M.stat != DEAD)
|
||||
if(!ishumanbasic(M) || reac_volume < 5) // implying xenohumans are holy
|
||||
if(method == INGEST && show_message)
|
||||
M << "<span class='notice'><i>You feel nothing but a terrible aftertaste.</i></span>"
|
||||
return ..()
|
||||
|
||||
M << "<span class='userdanger'>A terrible pain travels down your back as wings burst out!</span>"
|
||||
M.set_species(/datum/species/angel)
|
||||
playsound(M.loc, 'sound/items/poster_ripped.ogg', 50, 1, -1)
|
||||
M.adjustBruteLoss(20)
|
||||
M.emote("scream")
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
///Bosses
|
||||
|
||||
|
||||
|
||||
|
||||
//Dragon
|
||||
|
||||
/obj/structure/closet/crate/necropolis/dragon
|
||||
name = "dragon chest"
|
||||
|
||||
/obj/structure/closet/crate/necropolis/dragon/New()
|
||||
..()
|
||||
var/loot = rand(1,4)
|
||||
switch(loot)
|
||||
if(1)
|
||||
new /obj/item/weapon/melee/ghost_sword(src)
|
||||
if(2)
|
||||
new /obj/item/weapon/lava_staff(src)
|
||||
if(3)
|
||||
new /obj/item/weapon/spellbook/oneuse/fireball(src)
|
||||
new /obj/item/weapon/gun/magic/wand/fireball(src)
|
||||
if(4)
|
||||
new /obj/item/weapon/dragons_blood(src)
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword
|
||||
name = "spectral blade"
|
||||
desc = "A rusted and dulled blade. It doesn't look like it'd do much damage. It glows weakly."
|
||||
icon_state = "spectral"
|
||||
item_state = "spectral"
|
||||
flags = CONDUCT
|
||||
sharpness = IS_SHARP
|
||||
w_class = 4
|
||||
force = 1
|
||||
throwforce = 1
|
||||
hitsound = 'sound/effects/ghost2.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "rended")
|
||||
var/summon_cooldown = 0
|
||||
var/list/mob/dead/observer/spirits
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/New()
|
||||
..()
|
||||
spirits = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
poi_list |= src
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/Destroy()
|
||||
for(var/mob/dead/observer/G in spirits)
|
||||
G.invisibility = initial(G.invisibility)
|
||||
spirits.Cut()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/attack_self(mob/user)
|
||||
if(summon_cooldown > world.time)
|
||||
user << "You just recently called out for aid. You don't want to annoy the spirits."
|
||||
return
|
||||
user << "You call out for aid, attempting to summon spirits to your side."
|
||||
|
||||
notify_ghosts("[user] is raising their [src], calling for your help!",
|
||||
enter_link="<a href=?src=\ref[src];orbit=1>(Click to help)</a>",
|
||||
source = user, action=NOTIFY_ORBIT)
|
||||
|
||||
summon_cooldown = world.time + 600
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/Topic(href, href_list)
|
||||
if(href_list["orbit"])
|
||||
var/mob/dead/observer/ghost = usr
|
||||
if(istype(ghost))
|
||||
ghost.ManualFollow(src)
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/process()
|
||||
ghost_check()
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/proc/ghost_check()
|
||||
var/ghost_counter = 0
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/contents = T.GetAllContents()
|
||||
var/mob/dead/observer/current_spirits = list()
|
||||
for(var/mob/dead/observer/G in dead_mob_list)
|
||||
if(G.orbiting in contents)
|
||||
ghost_counter++
|
||||
G.invisibility = 0
|
||||
current_spirits |= G
|
||||
|
||||
for(var/mob/dead/observer/G in spirits - current_spirits)
|
||||
G.invisibility = initial(G.invisibility)
|
||||
|
||||
spirits = current_spirits
|
||||
|
||||
return ghost_counter
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
force = 0
|
||||
var/ghost_counter = ghost_check()
|
||||
|
||||
force = Clamp((ghost_counter * 4), 0, 75)
|
||||
user.visible_message("<span class='danger'>[user] strikes with the force of [ghost_counter] vengeful spirits!</span>")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
var/ghost_counter = ghost_check()
|
||||
final_block_chance += Clamp((ghost_counter * 5), 0, 75)
|
||||
owner.visible_message("<span class='danger'>[owner] is protected by a ring of [ghost_counter] ghosts!</span>")
|
||||
return ..()
|
||||
|
||||
//Blood
|
||||
|
||||
/obj/item/weapon/dragons_blood
|
||||
name = "bottle of dragons blood"
|
||||
desc = "You're not actually going to drink this, are you?"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "vial"
|
||||
|
||||
/obj/item/weapon/dragons_blood/attack_self(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/random = rand(1,4)
|
||||
|
||||
switch(random)
|
||||
if(1)
|
||||
user << "<span class='danger'>Other than tasting terrible, nothing really happens.</span>"
|
||||
if(2)
|
||||
user << "<span class='danger'>Your flesh begins to melt! Miraculously, you seem fine otherwise.</span>"
|
||||
H.set_species(/datum/species/skeleton)
|
||||
if(3)
|
||||
user << "<span class='danger'>You don't feel so good...</span>"
|
||||
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has started transforming into a dragon via dragon's blood.")
|
||||
H.ForceContractDisease(new /datum/disease/transformation/dragon(0))
|
||||
if(4)
|
||||
user << "<span class='danger'>You feel like you could walk straight through lava now.</span>"
|
||||
H.weather_immunities |= "lava"
|
||||
|
||||
playsound(user.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
qdel(src)
|
||||
|
||||
/datum/disease/transformation/dragon
|
||||
name = "dragon transformation"
|
||||
cure_text = "nothing"
|
||||
cures = list("adminordrazine")
|
||||
agent = "dragon's blood"
|
||||
desc = "What do dragons have to do with Space Station 13?"
|
||||
stage_prob = 20
|
||||
severity = BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list("Your bones ache.")
|
||||
stage2 = list("Your skin feels scaley.")
|
||||
stage3 = list("<span class='danger'>You have an overwhelming urge to terrorize some peasants.</span>", "<span class='danger'>Your teeth feel sharper.</span>")
|
||||
stage4 = list("<span class='danger'>Your blood burns.</span>")
|
||||
stage5 = list("<span class='danger'>You're a fucking dragon. However, any previous allegiances you held still apply. It'd be incredibly rude to eat your still human friends for no reason.</span>")
|
||||
new_form = /mob/living/simple_animal/hostile/megafauna/dragon/lesser
|
||||
|
||||
|
||||
//Lava Staff
|
||||
|
||||
/obj/item/weapon/lava_staff
|
||||
name = "staff of lava"
|
||||
desc = "The ability to fill the emergency shuttle with lava. What more could you want out of life?"
|
||||
icon_state = "staffofstorms"
|
||||
item_state = "staffofstorms"
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
item_state = "staffofstorms"
|
||||
w_class = 4
|
||||
force = 25
|
||||
damtype = BURN
|
||||
burn_state = LAVA_PROOF
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
var/turf_type = /turf/open/floor/plating/lava/smooth
|
||||
var/cooldown = 200
|
||||
var/timer = 0
|
||||
var/banned_turfs
|
||||
|
||||
/obj/item/weapon/lava_staff/New()
|
||||
. = ..()
|
||||
banned_turfs = typecacheof(list(/turf/open/space/transit, /turf/closed))
|
||||
|
||||
/obj/item/weapon/lava_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
..()
|
||||
if(timer > world.time)
|
||||
return
|
||||
|
||||
if(is_type_in_typecache(target, banned_turfs))
|
||||
return
|
||||
|
||||
if(target in view(user.client.view, get_turf(user)))
|
||||
var/turf/T = get_turf(target)
|
||||
message_admins("[key_name_admin(user)] fired the lava staff at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[get_area(target)] ([T.x], [T.y], [T.z])</a>).")
|
||||
log_game("[key_name(user)] fired the lava staff at [get_area(target)] ([T.x], [T.y], [T.z]).")
|
||||
|
||||
var/turf/open/O = target
|
||||
user.visible_message("<span class='danger'>[user] turns \the [O] into lava!</span>")
|
||||
O.ChangeTurf(turf_type)
|
||||
playsound(get_turf(src),'sound/magic/Fireball.ogg', 200, 1)
|
||||
timer = world.time + cooldown
|
||||
|
||||
///Bubblegum
|
||||
|
||||
/obj/item/mayhem
|
||||
name = "mayhem in a bottle"
|
||||
desc = "A magically infused bottle of blood, the scent of which will drive anyone nearby into a murderous frenzy."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "vial"
|
||||
|
||||
/obj/item/mayhem/attack_self(mob/user)
|
||||
for(var/mob/living/carbon/human/H in range(7,user))
|
||||
spawn()
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(H)
|
||||
B.mineEffect(H)
|
||||
user << "<span class='notice'>You shatter the bottle!</span>"
|
||||
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/crate/necropolis/bubblegum
|
||||
name = "bubblegum chest"
|
||||
|
||||
/obj/structure/closet/crate/necropolis/bubblegum/New()
|
||||
..()
|
||||
var/loot = rand(1,3)
|
||||
switch(loot)
|
||||
if(1)
|
||||
new /obj/item/weapon/antag_spawner/slaughter_demon(src)
|
||||
if(2)
|
||||
new /obj/item/mayhem(src)
|
||||
if(3)
|
||||
new /obj/item/blood_contract(src)
|
||||
|
||||
/obj/item/blood_contract
|
||||
name = "blood contract"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
color = "#FF0000"
|
||||
desc = "Mark your target for death. "
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/blood_contract/attack_self(mob/user)
|
||||
if(used)
|
||||
return
|
||||
used = TRUE
|
||||
var/choice = input(user,"Who do you want dead?","Pick Reinforcement") as null|anything in player_list
|
||||
|
||||
if(!(isliving(choice)))
|
||||
user << "[choice] is already dead!"
|
||||
used = FALSE
|
||||
return
|
||||
else
|
||||
|
||||
var/mob/living/L = choice
|
||||
|
||||
message_admins("<span class='adminnotice'>[L] has been marked for death!</span>")
|
||||
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = L.mind
|
||||
L.mind.objectives += survive
|
||||
L << "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>"
|
||||
L.color = "#FF0000"
|
||||
spawn()
|
||||
var/obj/effect/mine/pickup/bloodbath/B = new(L)
|
||||
B.mineEffect(L)
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H == L)
|
||||
continue
|
||||
H << "<span class='userdanger'>You have an overwhelming desire to kill [L]. They have been marked red! Go kill them!</span>"
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife/butcher(H), slot_l_hand)
|
||||
|
||||
qdel(src)
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/structure/punching_bag
|
||||
name = "punching bag"
|
||||
desc = "A punching bag. Can you get to speed level 4???"
|
||||
icon = 'goon/icons/obj/fitness.dmi'
|
||||
icon_state = "punchingbag"
|
||||
anchored = 1
|
||||
layer = WALL_OBJ_LAYER
|
||||
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
|
||||
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
|
||||
|
||||
/obj/structure/punching_bag/attack_hand(mob/user as mob)
|
||||
flick("[icon_state]2", src)
|
||||
playsound(src.loc, pick(src.hit_sounds), 25, 1, -1)
|
||||
|
||||
/obj/structure/stacklifter
|
||||
name = "Weight Machine"
|
||||
desc = "Just looking at this thing makes you feel tired."
|
||||
icon = 'goon/icons/obj/fitness.dmi'
|
||||
icon_state = "fitnesslifter"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/stacklifter/attack_hand(mob/user as mob)
|
||||
if(in_use)
|
||||
user << "Its already in use - wait a bit."
|
||||
return
|
||||
else
|
||||
in_use = 1
|
||||
icon_state = "fitnesslifter2"
|
||||
user.setDir(SOUTH)
|
||||
user.Stun(4)
|
||||
user.loc = src.loc
|
||||
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
|
||||
user.visible_message("<B>[user] is [bragmessage]!</B>")
|
||||
var/lifts = 0
|
||||
while (lifts++ < 6)
|
||||
if (user.loc != src.loc)
|
||||
break
|
||||
sleep(3)
|
||||
animate(user, pixel_y = -2, time = 3)
|
||||
sleep(3)
|
||||
animate(user, pixel_y = -4, time = 3)
|
||||
sleep(3)
|
||||
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
|
||||
|
||||
playsound(user, 'sound/machines/click.ogg', 60, 1)
|
||||
in_use = 0
|
||||
user.pixel_y = 0
|
||||
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
|
||||
icon_state = "fitnesslifter"
|
||||
user << finishmessage
|
||||
|
||||
/obj/structure/weightlifter
|
||||
name = "Weight Machine"
|
||||
desc = "Just looking at this thing makes you feel tired."
|
||||
icon = 'goon/icons/obj/fitness.dmi'
|
||||
icon_state = "fitnessweight"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/weightlifter/attack_hand(mob/user as mob)
|
||||
if(in_use)
|
||||
user << "Its already in use - wait a bit."
|
||||
return
|
||||
else
|
||||
in_use = 1
|
||||
icon_state = "fitnessweight-c"
|
||||
user.setDir(SOUTH)
|
||||
user.Stun(4)
|
||||
user.loc = src.loc
|
||||
var/image/W = image('goon/icons/obj/fitness.dmi',"fitnessweight-w")
|
||||
W.layer = WALL_OBJ_LAYER
|
||||
add_overlay(W)
|
||||
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
|
||||
user.visible_message("<B>[user] is [bragmessage]!</B>")
|
||||
var/reps = 0
|
||||
user.pixel_y = 5
|
||||
while (reps++ < 6)
|
||||
if (user.loc != src.loc)
|
||||
break
|
||||
|
||||
for (var/innerReps = max(reps, 1), innerReps > 0, innerReps--)
|
||||
sleep(3)
|
||||
animate(user, pixel_y = (user.pixel_y == 3) ? 5 : 3, time = 3)
|
||||
|
||||
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
|
||||
|
||||
sleep(3)
|
||||
animate(user, pixel_y = 2, time = 3)
|
||||
sleep(3)
|
||||
playsound(user, 'sound/machines/click.ogg', 60, 1)
|
||||
in_use = 0
|
||||
animate(user, pixel_y = 0, time = 3)
|
||||
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
|
||||
icon_state = "fitnessweight"
|
||||
overlays -= W
|
||||
user << "[finishmessage]"
|
||||
@@ -0,0 +1,110 @@
|
||||
#define STARTUP_STAGE 1
|
||||
#define MAIN_STAGE 2
|
||||
#define WIND_DOWN_STAGE 3
|
||||
#define END_STAGE 4
|
||||
|
||||
/datum/weather
|
||||
var/name = "storm"
|
||||
var/start_up_time = 300 //30 seconds
|
||||
var/start_up_message = "The wind begins to pick up."
|
||||
var/start_up_sound
|
||||
var/duration = 120 //2 minutes
|
||||
var/duration_lower = 120
|
||||
var/duration_upper = 120
|
||||
var/duration_sound
|
||||
var/duration_message = "A storm has started!"
|
||||
var/wind_down = 300 // 30 seconds
|
||||
var/wind_down_message = "The storm is passing."
|
||||
var/wind_down_sound
|
||||
|
||||
var/target_z = 1
|
||||
var/exclude_walls = TRUE
|
||||
var/area_type = /area/space
|
||||
var/stage = STARTUP_STAGE
|
||||
|
||||
|
||||
var/start_up_overlay = "lava"
|
||||
var/duration_overlay = "lava"
|
||||
var/overlay_layer = AREA_LAYER //This is the default area layer, and above everything else. TURF_LAYER is floors/below walls and mobs.
|
||||
var/purely_aesthetic = FALSE //If we just want gentle rain that doesn't hurt people
|
||||
var/list/impacted_areas = list()
|
||||
var/immunity_type = "storm"
|
||||
|
||||
/datum/weather/proc/weather_start_up()
|
||||
for(var/area/N in get_areas(area_type))
|
||||
if(N.z == target_z)
|
||||
impacted_areas += N
|
||||
duration = rand(duration_lower,duration_upper)
|
||||
update_areas()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.z == target_z)
|
||||
M << "<span class='warning'><B>[start_up_message]</B></span>"
|
||||
if(start_up_sound)
|
||||
M << start_up_sound
|
||||
sleep(start_up_time)
|
||||
if(src && stage != MAIN_STAGE)
|
||||
stage = MAIN_STAGE
|
||||
weather_main()
|
||||
|
||||
|
||||
/datum/weather/proc/weather_main()
|
||||
update_areas()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.z == target_z)
|
||||
M << "<span class='userdanger'><i>[duration_message]</i></span>"
|
||||
if(duration_sound)
|
||||
M << duration_sound
|
||||
if(purely_aesthetic)
|
||||
sleep(duration*10)
|
||||
else //Storm effects
|
||||
for(var/i in 1 to duration-1)
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
var/area/storm_area = get_area(L)
|
||||
if(storm_area in impacted_areas)
|
||||
storm_act(L)
|
||||
sleep(10)
|
||||
|
||||
if(src && stage != WIND_DOWN_STAGE)
|
||||
stage = WIND_DOWN_STAGE
|
||||
weather_wind_down()
|
||||
|
||||
|
||||
/datum/weather/proc/weather_wind_down()
|
||||
update_areas()
|
||||
for(var/mob/M in player_list)
|
||||
if(M.z == target_z)
|
||||
M << "<span class='danger'><B>[wind_down_message]</B></span>"
|
||||
if(wind_down_sound)
|
||||
M << wind_down_sound
|
||||
sleep(wind_down)
|
||||
|
||||
if(src && stage != END_STAGE)
|
||||
stage = END_STAGE
|
||||
update_areas()
|
||||
|
||||
|
||||
/datum/weather/proc/storm_act(mob/living/L)
|
||||
if(immunity_type in L.weather_immunities)
|
||||
return
|
||||
|
||||
/datum/weather/proc/update_areas()
|
||||
for(var/area/N in impacted_areas)
|
||||
N.layer = overlay_layer
|
||||
N.icon = 'icons/effects/weather_effects.dmi'
|
||||
N.invisibility = 0
|
||||
switch(stage)
|
||||
if(STARTUP_STAGE)
|
||||
N.icon_state = start_up_overlay
|
||||
|
||||
if(MAIN_STAGE)
|
||||
N.icon_state = duration_overlay
|
||||
|
||||
if(WIND_DOWN_STAGE)
|
||||
N.icon_state = start_up_overlay
|
||||
|
||||
if(END_STAGE)
|
||||
N.icon_state = initial(N.icon_state)
|
||||
N.icon = 'icons/turf/areas.dmi'
|
||||
N.layer = AREA_LAYER //Just default back to normal area stuff since I assume setting a var is faster than initial
|
||||
N.invisibility = INVISIBILITY_MAXIMUM
|
||||
N.opacity = 0
|
||||
@@ -0,0 +1,108 @@
|
||||
///The floor is lava
|
||||
|
||||
/datum/weather/floor_is_lava
|
||||
name = "floor is lava"
|
||||
start_up_time = 30 //3 seconds
|
||||
start_up_message = "The ground begins to bubble."
|
||||
duration_lower = 45
|
||||
duration_upper = 60 //1 minute
|
||||
duration_message = "The floor is lava!"
|
||||
wind_down = 30// 3 seconds
|
||||
wind_down_message = "The ground begins to cool."
|
||||
|
||||
target_z = 1
|
||||
exclude_walls = TRUE
|
||||
area_type = /area
|
||||
|
||||
start_up_overlay = "lava"
|
||||
duration_overlay = "lava"
|
||||
overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only
|
||||
|
||||
immunity_type = "lava"
|
||||
|
||||
|
||||
/datum/weather/floor_is_lava/storm_act(mob/living/L)
|
||||
if(immunity_type in L.weather_immunities)
|
||||
return
|
||||
|
||||
var/turf/F = get_turf(L)
|
||||
for(var/obj/structure/O in F.contents)
|
||||
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
|
||||
return
|
||||
L.adjustFireLoss(3)
|
||||
|
||||
|
||||
|
||||
/datum/weather/advanced_darkness
|
||||
name = "advanced darkness"
|
||||
start_up_time = 100 //10 seconds
|
||||
start_up_message = "The lights begin to dim... is power going out?"
|
||||
duration_lower = 45
|
||||
duration_upper = 60 //1 minute
|
||||
duration_message = "This isn't average everyday darkness... this is advanced darkness!"
|
||||
wind_down = 100 // 10 seconds
|
||||
wind_down_message = "The darkness recedes."
|
||||
purely_aesthetic = TRUE
|
||||
|
||||
target_z = 1
|
||||
exclude_walls = TRUE
|
||||
area_type = /area
|
||||
|
||||
start_up_overlay = ""
|
||||
duration_overlay = ""
|
||||
overlay_layer = AREA_LAYER
|
||||
|
||||
/datum/weather/advanced_darkness/update_areas()
|
||||
for(var/area/A in impacted_areas)
|
||||
if(stage == MAIN_STAGE)
|
||||
A.invisibility = 0
|
||||
A.opacity = 1
|
||||
A.layer = overlay_layer
|
||||
A.icon = 'icons/effects/weather_effects.dmi'
|
||||
A.icon_state = start_up_overlay
|
||||
else
|
||||
A.invisibility = INVISIBILITY_MAXIMUM
|
||||
A.opacity = 0
|
||||
//Ash storms
|
||||
|
||||
/datum/weather/ash_storm
|
||||
name = "ash storm"
|
||||
start_up_time = 300 //30 seconds
|
||||
start_up_message = "An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter."
|
||||
start_up_sound = 'sound/lavaland/ash_storm_windup.ogg'
|
||||
duration_lower = 60 //1 minute
|
||||
duration_upper = 150 //2.5 minutes
|
||||
duration_message = "Smoldering clouds of scorching ash billow down around you! Get inside!"
|
||||
duration_sound = 'sound/lavaland/ash_storm_start.ogg'
|
||||
wind_down = 300 // 30 seconds
|
||||
wind_down_message = "The shrieking wind whips away the last of the ash and falls to its usual murmur. It should be safe to go outside now."
|
||||
wind_down_sound = 'sound/lavaland/ash_storm_end.ogg'
|
||||
|
||||
target_z = ZLEVEL_LAVALAND
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
|
||||
start_up_overlay = "light_ash"
|
||||
duration_overlay = "ash_storm"
|
||||
overlay_layer = AREA_LAYER
|
||||
|
||||
immunity_type = "ash"
|
||||
|
||||
|
||||
/datum/weather/ash_storm/false_alarm //No storm, just light ember fall
|
||||
purely_aesthetic = TRUE
|
||||
duration_overlay = "light_ash"
|
||||
duration_message = "<span class='notice'>Gentle ashfall surrounds you like grotesque snow. The storm seems to have passed you by.</span>"
|
||||
wind_down_message = "The ashfall quietly slows, then stops. Another layer of hardened soot to the volcanic rock beneath you."
|
||||
|
||||
/datum/weather/ash_storm/storm_act(mob/living/L)
|
||||
if(immunity_type in L.weather_immunities)
|
||||
return
|
||||
|
||||
if(istype(L.loc, /obj/mecha))
|
||||
return
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/thermal_protection = H.get_thermal_protection()
|
||||
if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT)
|
||||
return
|
||||
L.adjustFireLoss(4)
|
||||
@@ -0,0 +1,31 @@
|
||||
/**********************Input and output plates**************************/
|
||||
|
||||
/obj/machinery/mineral/input
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
name = "Input area"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/mineral/input/New()
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/machinery/mineral/output
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
name = "Output area"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/mineral/output/New()
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/machinery/mineral
|
||||
var/input_dir = NORTH
|
||||
var/output_dir = SOUTH
|
||||
|
||||
/obj/machinery/mineral/proc/unload_mineral(atom/movable/S)
|
||||
S.loc = loc
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
S.loc = T
|
||||
@@ -0,0 +1,398 @@
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
name = "production machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/processing_unit/machine = null
|
||||
var/machinedir = EAST
|
||||
speed_process = 1
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
|
||||
|
||||
var/dat = "<b>Smelter control console</b><br><br>"
|
||||
//iron
|
||||
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_adamantine)
|
||||
if(machine.ore_iron)
|
||||
if (machine.selected_iron==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_iron=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_iron=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Iron: [machine.ore_iron]<br>")
|
||||
else
|
||||
machine.selected_iron = 0
|
||||
|
||||
//sand - glass
|
||||
if(machine.ore_glass)
|
||||
if (machine.selected_glass==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_glass=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_glass=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Sand: [machine.ore_glass]<br>")
|
||||
else
|
||||
machine.selected_glass = 0
|
||||
|
||||
//plasma
|
||||
if(machine.ore_plasma)
|
||||
if (machine.selected_plasma==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_plasma=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_plasma=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Plasma: [machine.ore_plasma]<br>")
|
||||
else
|
||||
machine.selected_plasma = 0
|
||||
|
||||
//uranium
|
||||
if(machine.ore_uranium)
|
||||
if (machine.selected_uranium==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_uranium=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_uranium=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Uranium: [machine.ore_uranium]<br>")
|
||||
else
|
||||
machine.selected_uranium = 0
|
||||
|
||||
//gold
|
||||
if(machine.ore_gold)
|
||||
if (machine.selected_gold==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_gold=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_gold=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Gold: [machine.ore_gold]<br>")
|
||||
else
|
||||
machine.selected_gold = 0
|
||||
|
||||
//silver
|
||||
if(machine.ore_silver)
|
||||
if (machine.selected_silver==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_silver=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_silver=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Silver: [machine.ore_silver]<br>")
|
||||
else
|
||||
machine.selected_silver = 0
|
||||
|
||||
//diamond
|
||||
if(machine.ore_diamond)
|
||||
if (machine.selected_diamond==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_diamond=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_diamond=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Diamond: [machine.ore_diamond]<br>")
|
||||
else
|
||||
machine.selected_diamond = 0
|
||||
|
||||
//bananium
|
||||
if(machine.ore_clown)
|
||||
if (machine.selected_clown==1)
|
||||
dat += text("<A href='?src=\ref[src];sel_clown=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_clown=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Bananium: [machine.ore_clown]<br>")
|
||||
else
|
||||
machine.selected_clown = 0
|
||||
|
||||
|
||||
//On or off
|
||||
dat += text("Machine is currently ")
|
||||
if (machine.on==1)
|
||||
dat += text("<A href='?src=\ref[src];set_on=off'>On</A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];set_on=on'>Off</A> ")
|
||||
else
|
||||
dat+="---No Materials Loaded---"
|
||||
|
||||
|
||||
user << browse("[dat]", "window=console_processing_unit")
|
||||
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["sel_iron"])
|
||||
if (href_list["sel_iron"] == "yes")
|
||||
machine.selected_iron = 1
|
||||
else
|
||||
machine.selected_iron = 0
|
||||
if(href_list["sel_glass"])
|
||||
if (href_list["sel_glass"] == "yes")
|
||||
machine.selected_glass = 1
|
||||
else
|
||||
machine.selected_glass = 0
|
||||
if(href_list["sel_plasma"])
|
||||
if (href_list["sel_plasma"] == "yes")
|
||||
machine.selected_plasma = 1
|
||||
else
|
||||
machine.selected_plasma = 0
|
||||
if(href_list["sel_uranium"])
|
||||
if (href_list["sel_uranium"] == "yes")
|
||||
machine.selected_uranium = 1
|
||||
else
|
||||
machine.selected_uranium = 0
|
||||
if(href_list["sel_gold"])
|
||||
if (href_list["sel_gold"] == "yes")
|
||||
machine.selected_gold = 1
|
||||
else
|
||||
machine.selected_gold = 0
|
||||
if(href_list["sel_silver"])
|
||||
if (href_list["sel_silver"] == "yes")
|
||||
machine.selected_silver = 1
|
||||
else
|
||||
machine.selected_silver = 0
|
||||
if(href_list["sel_diamond"])
|
||||
if (href_list["sel_diamond"] == "yes")
|
||||
machine.selected_diamond = 1
|
||||
else
|
||||
machine.selected_diamond = 0
|
||||
if(href_list["sel_clown"])
|
||||
if (href_list["sel_clown"] == "yes")
|
||||
machine.selected_clown = 1
|
||||
else
|
||||
machine.selected_clown = 0
|
||||
if(href_list["set_on"])
|
||||
if (href_list["set_on"] == "on")
|
||||
machine.on = 1
|
||||
else
|
||||
machine.on = 0
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/**********************Mineral processing unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit
|
||||
name = "furnace"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/CONSOLE = null
|
||||
var/ore_gold = 0;
|
||||
var/ore_silver = 0;
|
||||
var/ore_diamond = 0;
|
||||
var/ore_glass = 0;
|
||||
var/ore_plasma = 0;
|
||||
var/ore_uranium = 0;
|
||||
var/ore_iron = 0;
|
||||
var/ore_clown = 0;
|
||||
var/ore_adamantine = 0;
|
||||
var/selected_gold = 0
|
||||
var/selected_silver = 0
|
||||
var/selected_diamond = 0
|
||||
var/selected_glass = 0
|
||||
var/selected_plasma = 0
|
||||
var/selected_uranium = 0
|
||||
var/selected_iron = 0
|
||||
var/selected_clown = 0
|
||||
var/on = 0 //0 = off, 1 =... oh you know!
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
var/i
|
||||
for (i = 0; i < 10; i++)
|
||||
if (on)
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_glass > 0)
|
||||
ore_glass--;
|
||||
generate_mineral(/obj/item/stack/sheet/glass)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_glass > 0 && ore_iron > 0)
|
||||
ore_glass--;
|
||||
ore_iron--;
|
||||
generate_mineral(/obj/item/stack/sheet/rglass)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_gold > 0)
|
||||
ore_gold--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/gold)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver > 0)
|
||||
ore_silver--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/silver)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_diamond > 0)
|
||||
ore_diamond--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/diamond)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_plasma > 0)
|
||||
ore_plasma--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/plasma)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium > 0)
|
||||
ore_uranium--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/uranium)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0)
|
||||
ore_iron--;
|
||||
generate_mineral(/obj/item/stack/sheet/metal)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0 && ore_plasma > 0)
|
||||
ore_iron--;
|
||||
ore_plasma--;
|
||||
generate_mineral(/obj/item/stack/sheet/plasteel)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
|
||||
if (ore_clown > 0)
|
||||
ore_clown--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/bananium)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
|
||||
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
|
||||
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium >= 2 && ore_diamond >= 1)
|
||||
ore_uranium -= 2
|
||||
ore_diamond -= 1
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/adamantine)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver >= 1 && ore_plasma >= 3)
|
||||
ore_silver -= 1
|
||||
ore_plasma -= 3
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/mythril)
|
||||
else
|
||||
on = 0
|
||||
continue*/
|
||||
|
||||
|
||||
//if a non valid combination is selected
|
||||
|
||||
var/b = 1 //this part checks if all required ores are available
|
||||
|
||||
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
|
||||
b = 0
|
||||
|
||||
if (selected_gold == 1)
|
||||
if (ore_gold <= 0)
|
||||
b = 0
|
||||
if (selected_silver == 1)
|
||||
if (ore_silver <= 0)
|
||||
b = 0
|
||||
if (selected_diamond == 1)
|
||||
if (ore_diamond <= 0)
|
||||
b = 0
|
||||
if (selected_uranium == 1)
|
||||
if (ore_uranium <= 0)
|
||||
b = 0
|
||||
if (selected_plasma == 1)
|
||||
if (ore_plasma <= 0)
|
||||
b = 0
|
||||
if (selected_iron == 1)
|
||||
if (ore_iron <= 0)
|
||||
b = 0
|
||||
if (selected_glass == 1)
|
||||
if (ore_glass <= 0)
|
||||
b = 0
|
||||
if (selected_clown == 1)
|
||||
if (ore_clown <= 0)
|
||||
b = 0
|
||||
|
||||
if (b) //if they are, deduct one from each, produce slag and shut the machine off
|
||||
if (selected_gold == 1)
|
||||
ore_gold--
|
||||
if (selected_silver == 1)
|
||||
ore_silver--
|
||||
if (selected_diamond == 1)
|
||||
ore_diamond--
|
||||
if (selected_uranium == 1)
|
||||
ore_uranium--
|
||||
if (selected_plasma == 1)
|
||||
ore_plasma--
|
||||
if (selected_iron == 1)
|
||||
ore_iron--
|
||||
if (selected_clown == 1)
|
||||
ore_clown--
|
||||
generate_mineral(/obj/item/weapon/ore/slag)
|
||||
on = 0
|
||||
else
|
||||
on = 0
|
||||
break
|
||||
break
|
||||
else
|
||||
break
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
var/n = 0
|
||||
for(var/obj/item/O in T)
|
||||
n++
|
||||
if(n>10)
|
||||
break
|
||||
if (istype(O,/obj/item/weapon/ore/iron))
|
||||
ore_iron++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/glass))
|
||||
ore_glass++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/diamond))
|
||||
ore_diamond++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/plasma))
|
||||
ore_plasma++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/gold))
|
||||
ore_gold++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/silver))
|
||||
ore_silver++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/uranium))
|
||||
ore_uranium++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/bananium))
|
||||
ore_clown++
|
||||
O.loc = null
|
||||
continue
|
||||
unload_mineral(O)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/generate_mineral(P)
|
||||
var/O = new P(src)
|
||||
unload_mineral(O)
|
||||
@@ -0,0 +1,272 @@
|
||||
/**********************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 = 1
|
||||
anchored = 1
|
||||
input_dir = NORTH
|
||||
output_dir = SOUTH
|
||||
req_access = list(access_mineral_storeroom)
|
||||
var/stk_types = list()
|
||||
var/stk_amt = list()
|
||||
var/stack_list[0] //Key: Type. Value: Instance of type.
|
||||
var/obj/item/weapon/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), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60))
|
||||
speed_process = 1
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/New()
|
||||
..()
|
||||
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/ore_redemption(null)
|
||||
B.apply_default_parts(src)
|
||||
|
||||
/obj/item/weapon/circuitboard/machine/ore_redemption
|
||||
name = "circuit board (Ore Redemption)"
|
||||
build_path = /obj/machinery/mineral/ore_redemption
|
||||
origin_tech = "programming=2;engineering=2;plasmatech=3"
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/device/assembly/igniter = 1)
|
||||
|
||||
/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/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
sheet_per_ore_temp = 0.65 + (0.35 * B.rating)
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
ore_pickup_rate_temp = 15 * M.rating
|
||||
for(var/obj/item/weapon/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/process_sheet(obj/item/weapon/ore/O)
|
||||
var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O)
|
||||
if(processed_sheet)
|
||||
if(!(processed_sheet in stack_list)) //It's the first of this sheet added
|
||||
var/obj/item/stack/sheet/s = new processed_sheet(src,0)
|
||||
s.amount = 0
|
||||
stack_list[processed_sheet] = s
|
||||
if(s.name != "glass" && s.name != "metal") //we can get these from cargo anyway
|
||||
var/msg = "[capitalize(s.name)] sheets are now available in the Cargo Bay."
|
||||
for(var/obj/machinery/requests_console/D in allConsoles)
|
||||
if(D.department == "Science" || D.department == "Robotics" || D.department == "Research Director's Desk" || (D.department == "Chemistry" && (s.name == "uranium" || s.name == "solid plasma")))
|
||||
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
|
||||
var/obj/item/stack/sheet/storage = stack_list[processed_sheet]
|
||||
storage.amount += sheet_per_ore //Stack the sheets
|
||||
O.loc = null //Let the old sheet...
|
||||
qdel(O) //... garbage collect
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/process()
|
||||
if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
var/i = 0
|
||||
if(T)
|
||||
for(var/obj/item/weapon/ore/O in T)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
else
|
||||
var/obj/structure/ore_box/B = locate() in T
|
||||
if(B)
|
||||
for(var/obj/item/weapon/ore/O in B.contents)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_pry_open(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/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = user.get_active_hand()
|
||||
if(istype(I) && !istype(inserted_id))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/deconstruction()
|
||||
empty_content()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(obj/item/weapon/ore/O)
|
||||
if(O.refined_type)
|
||||
var/obj/item/stack/sheet/M = O.refined_type
|
||||
points += O.points * point_upgrade
|
||||
return M
|
||||
qdel(O)//No refined type? Purge it.
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/interact(mob/user)
|
||||
var/obj/item/stack/sheet/s
|
||||
var/dat
|
||||
|
||||
dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.<br><br>")
|
||||
dat += text("Current unclaimed points: [points]<br>")
|
||||
|
||||
if(istype(inserted_id))
|
||||
dat += text("You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>")
|
||||
dat += text("<A href='?src=\ref[src];choice=claim'>Claim points.</A><br>")
|
||||
else
|
||||
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
|
||||
|
||||
for(var/O in stack_list)
|
||||
s = stack_list[O]
|
||||
if(s.amount > 0)
|
||||
if(O == stack_list[1])
|
||||
dat += "<br>" //just looks nicer
|
||||
dat += text("[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
|
||||
|
||||
if((/obj/item/stack/sheet/metal in stack_list) && (/obj/item/stack/sheet/mineral/plasma in stack_list))
|
||||
var/obj/item/stack/sheet/metalstack = stack_list[/obj/item/stack/sheet/metal]
|
||||
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
|
||||
if(min(metalstack.amount, plasmastack.amount))
|
||||
dat += text("Plasteel Alloy (Metal + Plasma): <A href='?src=\ref[src];plasteel=1'>Smelt</A><BR>")
|
||||
|
||||
dat += text("<br><div class='statusDisplay'><b>Mineral Value List:</b><BR>[get_ore_values()]</div>")
|
||||
|
||||
var/datum/browser/popup = new(user, "console_stacking_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
|
||||
if(href_list["choice"])
|
||||
if(istype(inserted_id))
|
||||
if(href_list["choice"] == "eject")
|
||||
inserted_id.loc = loc
|
||||
inserted_id.verb_pickup()
|
||||
inserted_id = null
|
||||
if(href_list["choice"] == "claim")
|
||||
if(access_mining_station in inserted_id.access)
|
||||
inserted_id.mining_points += points
|
||||
points = 0
|
||||
else
|
||||
usr << "<span class='warning'>Required access not found.</span>"
|
||||
else if(href_list["choice"] == "insert")
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
else usr << "<span class='warning'>No valid ID.</span>"
|
||||
if(href_list["release"])
|
||||
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user.
|
||||
if(!(text2path(href_list["release"]) in stack_list)) return
|
||||
var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])]
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
var/desired = input("How much?", "How much to eject?", 1) as num
|
||||
out.amount = round(min(desired,50,inp.amount))
|
||||
if(out.amount >= 1)
|
||||
inp.amount -= out.amount
|
||||
unload_mineral(out)
|
||||
if(inp.amount < 1)
|
||||
stack_list -= text2path(href_list["release"])
|
||||
else
|
||||
usr << "<span class='warning'>Required access not found.</span>"
|
||||
if(href_list["plasteel"])
|
||||
if(check_access(inserted_id) || allowed(usr))
|
||||
if(!(/obj/item/stack/sheet/metal in stack_list)) return
|
||||
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
|
||||
var/obj/item/stack/sheet/metalstack = stack_list[/obj/item/stack/sheet/metal]
|
||||
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
|
||||
|
||||
var/desired = input("How much?", "How much would you like to smelt?", 1) as num
|
||||
var/obj/item/stack/sheet/plasteel/plasteelout = new
|
||||
plasteelout.amount = round(min(desired,50,metalstack.amount,plasmastack.amount))
|
||||
if(plasteelout.amount >= 1)
|
||||
metalstack.amount -= plasteelout.amount
|
||||
plasmastack.amount -= plasteelout.amount
|
||||
unload_mineral(plasteelout)
|
||||
else
|
||||
usr << "<span class='warning'>Required access not found.</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/ex_act(severity, target)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(severity == 1)
|
||||
if(prob(50))
|
||||
empty_content()
|
||||
qdel(src)
|
||||
else if(severity == 2)
|
||||
if(prob(25))
|
||||
empty_content()
|
||||
qdel(src)
|
||||
|
||||
//empty the redemption machine by stacks of at most max_amount (50 at this time) size
|
||||
/obj/machinery/mineral/ore_redemption/proc/empty_content()
|
||||
var/obj/item/stack/sheet/s
|
||||
|
||||
for(var/O in stack_list)
|
||||
s = stack_list[O]
|
||||
while(s.amount > s.max_amount)
|
||||
new s.type(loc,s.max_amount)
|
||||
s.use(s.max_amount)
|
||||
s.loc = loc
|
||||
s.layer = initial(s.layer)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
@@ -0,0 +1,92 @@
|
||||
/**********************Mineral stacking unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console
|
||||
name = "stacking machine console"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "console"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/stacking_machine/machine = null
|
||||
var/machinedir = SOUTHEAST
|
||||
speed_process = 1
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.CONSOLE = src
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
|
||||
var/obj/item/stack/sheet/s
|
||||
var/dat
|
||||
|
||||
dat += text("<b>Stacking unit console</b><br><br>")
|
||||
|
||||
for(var/O in machine.stack_list)
|
||||
s = machine.stack_list[O]
|
||||
if(s.amount > 0)
|
||||
dat += text("[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
|
||||
|
||||
dat += text("<br>Stacking: [machine.stack_amt]<br><br>")
|
||||
|
||||
user << browse("[dat]", "window=console_stacking_machine")
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["release"])
|
||||
if(!(text2path(href_list["release"]) in machine.stack_list)) return //someone tried to spawn materials by spoofing hrefs
|
||||
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
out.amount = inp.amount
|
||||
inp.amount = 0
|
||||
machine.unload_mineral(out)
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/**********************Mineral stacking unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine
|
||||
name = "stacking machine"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "stacker"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/stacking_unit_console/CONSOLE
|
||||
var/stk_types = list()
|
||||
var/stk_amt = list()
|
||||
var/stack_list[0] //Key: Type. Value: Instance of type.
|
||||
var/stack_amt = 50; //ammount to stack before releassing
|
||||
input_dir = EAST
|
||||
output_dir = WEST
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(!(inp.type in stack_list)) //It's the first of this sheet added
|
||||
var/obj/item/stack/sheet/s = new inp.type(src,0)
|
||||
s.amount = 0
|
||||
stack_list[inp.type] = s
|
||||
var/obj/item/stack/sheet/storage = stack_list[inp.type]
|
||||
storage.amount += inp.amount //Stack the sheets
|
||||
inp.loc = null //Let the old sheet garbage collect
|
||||
while(storage.amount > stack_amt) //Get rid of excessive stackage
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
out.amount = stack_amt
|
||||
unload_mineral(out)
|
||||
storage.amount -= stack_amt
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/stack/sheet/S in T)
|
||||
process_sheet(S)
|
||||
@@ -0,0 +1,32 @@
|
||||
/**********************Unloading unit**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/unloading_machine
|
||||
name = "unloading machine"
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "unloader"
|
||||
density = 1
|
||||
anchored = 1
|
||||
input_dir = WEST
|
||||
output_dir = EAST
|
||||
speed_process = 1
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/process()
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
var/limit
|
||||
for(var/obj/structure/ore_box/B in T)
|
||||
for (var/obj/item/weapon/ore/O in B)
|
||||
B.contents -= O
|
||||
unload_mineral(O)
|
||||
limit++
|
||||
if (limit>=10)
|
||||
return
|
||||
CHECK_TICK
|
||||
CHECK_TICK
|
||||
for(var/obj/item/I in T)
|
||||
unload_mineral(I)
|
||||
limit++
|
||||
if (limit>=10)
|
||||
return
|
||||
CHECK_TICK
|
||||
@@ -0,0 +1,256 @@
|
||||
/**********************Mining Equipment Vendor**************************/
|
||||
|
||||
/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
|
||||
var/obj/item/weapon/card/id/inserted_id
|
||||
var/list/prize_list = list(
|
||||
new /datum/data/mining_equipment("Stimpack", /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack, 50),
|
||||
new /datum/data/mining_equipment("Stimpack Bundle", /obj/item/weapon/storage/box/medipens/utility, 200),
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 100),
|
||||
new /datum/data/mining_equipment("Absinthe", /obj/item/weapon/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/weapon/soap/nanotrasen, 200),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 300),
|
||||
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 800),
|
||||
new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/weapon/hivelordstabilizer , 400),
|
||||
new /datum/data/mining_equipment("Fulton Beacon", /obj/item/fulton_core , 400),
|
||||
new /datum/data/mining_equipment("Shelter Capsule", /obj/item/weapon/survivalcapsule , 400),
|
||||
new /datum/data/mining_equipment("GAR scanners", /obj/item/clothing/glasses/meson/gar, 500),
|
||||
new /datum/data/mining_equipment("Explorer's Webbing", /obj/item/weapon/storage/belt/mining, 500),
|
||||
new /datum/data/mining_equipment("Survival Medipen", /obj/item/weapon/reagent_containers/hypospray/medipen/survival, 500),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Tracking Implant Kit",/obj/item/weapon/storage/box/minertracker, 600),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800),
|
||||
new /datum/data/mining_equipment("Medivac Balloon", /obj/item/weapon/extraction_pack/medivac, 800),
|
||||
new /datum/data/mining_equipment("Fulton Pack", /obj/item/weapon/extraction_pack, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Jetpack Upgrade", /obj/item/hardsuit_jetpack, 2000),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/stack/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Mining Hardsuit", /obj/item/clothing/suit/space/hardsuit/mining, 2000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 2500),
|
||||
new /datum/data/mining_equipment("Super Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator/super, 3000),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 800),
|
||||
new /datum/data/mining_equipment("Drone Melee Upgrade", /obj/item/device/mine_bot_ugprade, 400),
|
||||
new /datum/data/mining_equipment("Drone Health Upgrade",/obj/item/device/mine_bot_ugprade/health, 400),
|
||||
new /datum/data/mining_equipment("Drone Ranged Upgrade",/obj/item/device/mine_bot_ugprade/cooldown, 600),
|
||||
new /datum/data/mining_equipment("Drone AI Upgrade", /obj/item/slimepotion/sentience/mining, 1000),
|
||||
)
|
||||
|
||||
/datum/data/mining_equipment/
|
||||
var/equipment_name = "generic"
|
||||
var/equipment_path = null
|
||||
var/cost = 0
|
||||
|
||||
/datum/data/mining_equipment/New(name, path, cost)
|
||||
src.equipment_name = name
|
||||
src.equipment_path = path
|
||||
src.cost = cost
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/New()
|
||||
..()
|
||||
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/mining_equipment_vendor(null)
|
||||
B.apply_default_parts(src)
|
||||
|
||||
/obj/item/weapon/circuitboard/machine/mining_equipment_vendor
|
||||
name = "circuit board (Mining Equipment Vendor)"
|
||||
build_path = /obj/machinery/mineral/equipment_vendor
|
||||
origin_tech = "programming=1;engineering=3"
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/interact(mob/user)
|
||||
var/dat
|
||||
dat +="<div class='statusDisplay'>"
|
||||
if(istype(inserted_id))
|
||||
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=\ref[src];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=\ref[src];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()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
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/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
else 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))
|
||||
return
|
||||
if(prize.cost > inserted_id.mining_points)
|
||||
else
|
||||
inserted_id.mining_points -= prize.cost
|
||||
new prize.equipment_path(src.loc)
|
||||
feedback_add_details("mining_equipment_bought",
|
||||
"[src.type]|[prize.equipment_path]")
|
||||
// Add src.type to keep track of free golem purchases
|
||||
// seperately.
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/mining_voucher))
|
||||
RedeemVoucher(I, user)
|
||||
return
|
||||
if(istype(I,/obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = usr.get_active_hand()
|
||||
if(istype(C) && !istype(inserted_id))
|
||||
if(!usr.drop_item())
|
||||
return
|
||||
C.loc = src
|
||||
inserted_id = C
|
||||
interact(user)
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
|
||||
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator and Advanced Scanner", "Mining Drone", "Medivac Kit", "Extraction 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
|
||||
switch(selection)
|
||||
if("Survival Capsule and Explorer's Webbing")
|
||||
new /obj/item/weapon/storage/belt/mining/vendor(src.loc)
|
||||
if("Resonator and Advanced Scanner")
|
||||
new /obj/item/weapon/resonator(src.loc)
|
||||
new /obj/item/device/t_scanner/adv_mining_scanner(src.loc)
|
||||
if("Mining Drone")
|
||||
new /mob/living/simple_animal/hostile/mining_drone(src.loc)
|
||||
new /obj/item/weapon/weldingtool/hugetank(src.loc)
|
||||
if("Medivac Kit")
|
||||
new /obj/item/stack/sheet/metal/five(loc)
|
||||
new /obj/item/fulton_core(loc)
|
||||
new /obj/item/weapon/extraction_pack/medivac(loc)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/survival(loc)
|
||||
if("Extraction Kit")
|
||||
new /obj/item/stack/sheet/metal/five(loc)
|
||||
new /obj/item/weapon/extraction_pack(loc)
|
||||
new /obj/item/fulton_core(loc)
|
||||
|
||||
feedback_add_details("mining_voucher_redeemed", selection)
|
||||
qdel(voucher)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(prob(50 / severity) && severity < 3)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/****************Golem Point Vendor**************************/
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/golem
|
||||
name = "golem ship equipment vendor"
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/golem/New()
|
||||
..()
|
||||
desc += "\nIt seems a few selections have been added."
|
||||
prize_list += list(
|
||||
new /datum/data/mining_equipment("Science Goggles", /obj/item/clothing/glasses/science, 250),
|
||||
new /datum/data/mining_equipment("Monkey Cube", /obj/item/weapon/reagent_containers/food/snacks/monkeycube, 300),
|
||||
new /datum/data/mining_equipment("Toolbelt", /obj/item/weapon/storage/belt/utility, 350),
|
||||
new /datum/data/mining_equipment("Sulphuric Acid", /obj/item/weapon/reagent_containers/glass/beaker/sulphuric, 500),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Grey Slime Extract", /obj/item/slime_extract/grey, 1000),
|
||||
new /datum/data/mining_equipment("Modification Kit", /obj/item/modkit, 1700),
|
||||
new /datum/data/mining_equipment("The Liberator's Legacy", /obj/item/weapon/storage/box/rndboards, 2000),
|
||||
|
||||
)
|
||||
|
||||
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/mining_equipment_vendor/golem(null)
|
||||
B.apply_default_parts(src)
|
||||
|
||||
/obj/item/weapon/circuitboard/machine/mining_equipment_vendor/golem
|
||||
name = "circuit board (Golem Ship Equipment Vendor)"
|
||||
build_path = /obj/machinery/mineral/equipment_vendor/golem
|
||||
|
||||
|
||||
/**********************Mining Equipment Vendor Items**************************/
|
||||
|
||||
/**********************Mining Equipment Voucher**********************/
|
||||
|
||||
/obj/item/weapon/mining_voucher
|
||||
name = "mining voucher"
|
||||
desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "mining_voucher"
|
||||
w_class = 1
|
||||
|
||||
/**********************Mining Point Card**********************/
|
||||
|
||||
/obj/item/weapon/card/mining_point_card
|
||||
name = "mining points 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/weapon/card/mining_point_card/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
if(points)
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
C.mining_points += points
|
||||
user << "<span class='info'>You transfer [points] points to [C].</span>"
|
||||
points = 0
|
||||
else
|
||||
user << "<span class='info'>There's no points left on [src].</span>"
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/mining_point_card/examine(mob/user)
|
||||
..()
|
||||
user << "There's [points] point\s on the card."
|
||||
@@ -0,0 +1,77 @@
|
||||
/**********************Mine areas**************************/
|
||||
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
has_gravity = 1
|
||||
|
||||
/area/mine/explored
|
||||
name = "Mine"
|
||||
icon_state = "explored"
|
||||
music = null
|
||||
always_unpowered = 1
|
||||
requires_power = 1
|
||||
poweralm = 0
|
||||
power_environ = 0
|
||||
power_equip = 0
|
||||
power_light = 0
|
||||
outdoors = 1
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
/area/mine/unexplored
|
||||
name = "Mine"
|
||||
icon_state = "unexplored"
|
||||
music = null
|
||||
always_unpowered = 1
|
||||
requires_power = 1
|
||||
poweralm = 0
|
||||
power_environ = 0
|
||||
power_equip = 0
|
||||
power_light = 0
|
||||
outdoors = 1
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
/area/mine/lobby
|
||||
name = "Mining station"
|
||||
|
||||
/area/mine/storage
|
||||
name = "Mining station Storage"
|
||||
|
||||
/area/mine/production
|
||||
name = "Mining Station Starboard Wing"
|
||||
icon_state = "mining_production"
|
||||
|
||||
/area/mine/abandoned
|
||||
name = "Abandoned Mining Station"
|
||||
|
||||
/area/mine/living_quarters
|
||||
name = "Mining Station Port Wing"
|
||||
icon_state = "mining_living"
|
||||
|
||||
/area/mine/eva
|
||||
name = "Mining Station EVA"
|
||||
icon_state = "mining_eva"
|
||||
|
||||
/area/mine/maintenance
|
||||
name = "Mining Station Communications"
|
||||
|
||||
/area/mine/cafeteria
|
||||
name = "Mining station Cafeteria"
|
||||
|
||||
/area/mine/hydroponics
|
||||
name = "Mining station Hydroponics"
|
||||
|
||||
/area/mine/sleeper
|
||||
name = "Mining station Emergency Sleeper"
|
||||
|
||||
/area/mine/north_outpost
|
||||
name = "North Mining Outpost"
|
||||
|
||||
/area/mine/west_outpost
|
||||
name = "West Mining Outpost"
|
||||
|
||||
/area/mine/laborcamp
|
||||
name = "Labor Camp"
|
||||
|
||||
/area/mine/laborcamp/security
|
||||
name = "Labor Camp Security"
|
||||
icon_state = "security"
|
||||
@@ -0,0 +1,494 @@
|
||||
/**********************Light************************/
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
/obj/effect/light_emitter
|
||||
name = "Light-emtter"
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
luminosity = 8
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
/obj/structure/closet/wardrobe/miner
|
||||
name = "mining wardrobe"
|
||||
icon_door = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/miner/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/dufflebag(src)
|
||||
new /obj/item/weapon/storage/backpack/explorer(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_explorer(src)
|
||||
new /obj/item/clothing/under/rank/miner/lavaland(src)
|
||||
new /obj/item/clothing/under/rank/miner/lavaland(src)
|
||||
new /obj/item/clothing/under/rank/miner/lavaland(src)
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/miner
|
||||
name = "miner's equipment"
|
||||
icon_state = "mining"
|
||||
req_access = list(access_mining)
|
||||
|
||||
/obj/structure/closet/secure_closet/miner/New()
|
||||
..()
|
||||
new /obj/item/stack/sheet/mineral/sandbags(src, 5)
|
||||
new /obj/item/weapon/storage/box/emptysandbags(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe/mini(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo/mining(src)
|
||||
new /obj/item/device/t_scanner/adv_mining_scanner/lesser(src)
|
||||
new /obj/item/weapon/storage/bag/ore(src)
|
||||
new /obj/item/weapon/gun/energy/kinetic_accelerator(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/weapon/survivalcapsule(src)
|
||||
|
||||
|
||||
/**********************Shuttle Computer**************************/
|
||||
|
||||
/obj/machinery/computer/shuttle/mining
|
||||
name = "Mining Shuttle Console"
|
||||
desc = "Used to call and send the mining shuttle."
|
||||
circuit = /obj/item/weapon/circuitboard/computer/mining_shuttle
|
||||
shuttleId = "mining"
|
||||
possible_destinations = "mining_home;mining_away"
|
||||
no_destination_swap = 1
|
||||
|
||||
/*********************Pickaxe & Drills**************************/
|
||||
|
||||
/obj/item/weapon/pickaxe
|
||||
name = "pickaxe"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "pickaxe"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
force = 15
|
||||
throwforce = 10
|
||||
item_state = "pickaxe"
|
||||
w_class = 4
|
||||
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
|
||||
var/digspeed = 40
|
||||
var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg')
|
||||
origin_tech = "materials=2;engineering=3"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
|
||||
/obj/item/weapon/pickaxe/mini
|
||||
name = "compact pickaxe"
|
||||
desc = "A smaller, compact version of the standard pickaxe."
|
||||
icon_state = "minipick"
|
||||
force = 10
|
||||
throwforce = 7
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 3
|
||||
materials = list(MAT_METAL=1000)
|
||||
|
||||
/obj/item/weapon/pickaxe/proc/playDigSound()
|
||||
playsound(src, pick(digsound),50,1)
|
||||
|
||||
/obj/item/weapon/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 20 //mines faster than a normal pickaxe, bought from mining vendor
|
||||
origin_tech = "materials=3;engineering=4"
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
force = 17
|
||||
|
||||
/obj/item/weapon/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
digspeed = 14
|
||||
origin_tech = "materials=5;engineering=4"
|
||||
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
|
||||
force = 19
|
||||
|
||||
/obj/item/weapon/pickaxe/drill
|
||||
name = "mining drill"
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
slot_flags = SLOT_BELT
|
||||
digspeed = 25 //available from roundstart, faster than a pickaxe.
|
||||
digsound = list('sound/weapons/drill.ogg')
|
||||
hitsound = 'sound/weapons/drill.ogg'
|
||||
origin_tech = "materials=2;powerstorage=2;engineering=3"
|
||||
desc = "An electric mining drill for the especially scrawny."
|
||||
|
||||
/obj/item/weapon/pickaxe/drill/cyborg
|
||||
name = "cyborg mining drill"
|
||||
desc = "An integrated electric mining drill."
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/weapon/pickaxe/drill/diamonddrill
|
||||
name = "diamond-tipped mining drill"
|
||||
icon_state = "diamonddrill"
|
||||
digspeed = 7
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=4"
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
digspeed = 7
|
||||
|
||||
/obj/item/weapon/pickaxe/drill/jackhammer
|
||||
name = "sonic jackhammer"
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5;magnets=4"
|
||||
digsound = list('sound/weapons/sonic_jackhammer.ogg')
|
||||
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
|
||||
|
||||
/*****************************Shovel********************************/
|
||||
|
||||
/obj/item/weapon/shovel
|
||||
name = "shovel"
|
||||
desc = "A large tool for digging and moving dirt."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "shovel"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8
|
||||
var/digspeed = 20
|
||||
throwforce = 4
|
||||
item_state = "shovel"
|
||||
w_class = 3
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/weapon/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 = 2
|
||||
|
||||
/obj/item/weapon/emptysandbag
|
||||
name = "empty sandbag"
|
||||
desc = "A bag to be filled with sand."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "sandbag"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/emptysandbag/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W,/obj/item/weapon/ore/glass))
|
||||
user << "<span class='notice'>You fill the sandbag.</span>"
|
||||
var/obj/item/stack/sheet/mineral/sandbags/I = new /obj/item/stack/sheet/mineral/sandbags
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/**********************Mining car (Crate like thing, not the rail car)**************************/
|
||||
|
||||
/obj/structure/closet/crate/miningcar
|
||||
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
|
||||
name = "Mining car (not for rails)"
|
||||
icon_state = "miningcar"
|
||||
|
||||
/*****************************Survival Pod********************************/
|
||||
|
||||
|
||||
/area/survivalpod
|
||||
name = "\improper Emergency Shelter"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
has_gravity = 1
|
||||
|
||||
/obj/item/weapon/survivalcapsule
|
||||
name = "bluespace shelter capsule"
|
||||
desc = "An emergency shelter stored within a pocket of bluespace."
|
||||
icon_state = "capsule"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
w_class = 1
|
||||
origin_tech = "engineering=3;bluespace=3"
|
||||
var/template_id = "shelter_alpha"
|
||||
var/datum/map_template/shelter/template
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/weapon/survivalcapsule/proc/get_template()
|
||||
if(template)
|
||||
return
|
||||
template = shelter_templates[template_id]
|
||||
if(!template)
|
||||
throw EXCEPTION("Shelter template ([template_id]) not found!")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/survivalcapsule/Destroy()
|
||||
template = null // without this, capsules would be one use. per round.
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/survivalcapsule/examine(mob/user)
|
||||
. = ..()
|
||||
get_template()
|
||||
user << "This capsule has the [template.name] stored."
|
||||
user << template.description
|
||||
|
||||
/obj/item/weapon/survivalcapsule/attack_self()
|
||||
// Can't grab when capsule is New() because templates aren't loaded then
|
||||
get_template()
|
||||
if(used == FALSE)
|
||||
src.loc.visible_message("<span class='warning'>\The [src] begins \
|
||||
to shake. Stand back!</span>")
|
||||
used = TRUE
|
||||
sleep(50)
|
||||
var/turf/deploy_location = get_turf(src)
|
||||
var/status = template.check_deploy(deploy_location)
|
||||
switch(status)
|
||||
if(SHELTER_DEPLOY_BAD_AREA)
|
||||
src.loc.visible_message("<span class='warning'>\The [src] \
|
||||
will not function in this area.</span>")
|
||||
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
|
||||
var/width = template.width
|
||||
var/height = template.height
|
||||
src.loc.visible_message("<span class='warning'>\The [src] \
|
||||
doesn't have room to deploy! You need to clear a \
|
||||
[width]x[height] area!</span>")
|
||||
|
||||
if(status != SHELTER_DEPLOY_ALLOWED)
|
||||
used = FALSE
|
||||
return
|
||||
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
var/turf/T = deploy_location
|
||||
if(T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)//only report capsules away from the mining/lavaland level
|
||||
message_admins("[key_name_admin(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) activated a bluespace capsule away from the mining level! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]")
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
PoolOrNew(/obj/effect/particle_effect/smoke, get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
//Pod turfs and objects
|
||||
|
||||
|
||||
//Floors
|
||||
/turf/open/floor/pod
|
||||
name = "pod floor"
|
||||
icon_state = "podfloor"
|
||||
icon_regular_floor = "podfloor"
|
||||
floor_tile = /obj/item/stack/tile/pod
|
||||
|
||||
/turf/open/floor/pod/light
|
||||
icon_state = "podfloor_light"
|
||||
icon_regular_floor = "podfloor_light"
|
||||
floor_tile = /obj/item/stack/tile/pod/light
|
||||
|
||||
/turf/open/floor/pod/dark
|
||||
icon_state = "podfloor_dark"
|
||||
icon_regular_floor = "podfloor_dark"
|
||||
floor_tile = /obj/item/stack/tile/pod/dark
|
||||
|
||||
//Walls
|
||||
/turf/closed/wall/shuttle/survival
|
||||
name = "pod wall"
|
||||
desc = "An easily-compressable wall used for temporary shelter."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "smooth"
|
||||
walltype = "shuttle"
|
||||
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
|
||||
canSmoothWith = list(/turf/closed/wall/shuttle/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod, /obj/structure/shuttle/engine)
|
||||
|
||||
/turf/closed/wall/shuttle/survival/nodiagonal
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/turf/closed/wall/shuttle/survival/pod
|
||||
canSmoothWith = list(/turf/closed/wall/shuttle/survival, /obj/machinery/door/airlock, /obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/shuttle, /obj/structure/shuttle/engine)
|
||||
|
||||
//Window
|
||||
/obj/structure/window/shuttle/survival_pod
|
||||
name = "pod window"
|
||||
icon = 'icons/obj/smooth_structures/pod_window.dmi'
|
||||
icon_state = "smooth"
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/closed/wall/shuttle/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod)
|
||||
|
||||
//Door
|
||||
/obj/machinery/door/airlock/survival_pod
|
||||
name = "airlock"
|
||||
icon = 'icons/obj/doors/airlocks/survival/horizontal/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/horizontal/survival_overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_pod
|
||||
opacity = 0
|
||||
glass = 1
|
||||
|
||||
/obj/machinery/door/airlock/survival_pod/vertical
|
||||
icon = 'icons/obj/doors/airlocks/survival/vertical/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/vertical/survival_overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_pod/vertical
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod
|
||||
name = "pod airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/survival/horizontal/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/horizontal/survival_overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/survival_pod
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod/vertical
|
||||
icon = 'icons/obj/doors/airlocks/survival/vertical/survival.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/survival/vertical/survival_overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/survival_pod/vertical
|
||||
|
||||
//Table
|
||||
/obj/structure/table/survival_pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "table"
|
||||
smooth = SMOOTH_FALSE
|
||||
|
||||
//Sleeper
|
||||
/obj/machinery/sleeper/survival_pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "sleeper"
|
||||
|
||||
/obj/machinery/sleeper/survival_pod/update_icon()
|
||||
if(state_open)
|
||||
cut_overlays()
|
||||
else
|
||||
add_overlay("sleeper_cover")
|
||||
|
||||
//Computer
|
||||
/obj/item/device/gps/computer
|
||||
name = "pod computer"
|
||||
icon_state = "pod_computer"
|
||||
icon = 'icons/obj/lavaland/pod_computer.dmi'
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_y = -32
|
||||
|
||||
/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the gps.</span>", \
|
||||
"<span class='notice'>You start to disassemble the gps...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 20/W.toolspeed, target = src))
|
||||
new /obj/item/device/gps(src.loc)
|
||||
qdel(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/gps/computer/attack_hand(mob/user)
|
||||
attack_self(user)
|
||||
|
||||
//Bed
|
||||
/obj/structure/bed/pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "bed"
|
||||
|
||||
//Survival Storage Unit
|
||||
/obj/machinery/smartfridge/survival_pod
|
||||
name = "survival pod storage"
|
||||
desc = "A heated storage unit."
|
||||
icon_state = "donkvendor"
|
||||
icon = 'icons/obj/lavaland/donkvendor.dmi'
|
||||
icon_on = "donkvendor"
|
||||
icon_off = "donkvendor"
|
||||
luminosity = 8
|
||||
max_n_of_items = 10
|
||||
pixel_y = -4
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/empty
|
||||
name = "dusty survival pod storage"
|
||||
desc = "A heated storage unit. This one's seen better days."
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/empty/New()
|
||||
return()
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
|
||||
if(istype(O, /obj/item))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/warm/W = new(src)
|
||||
load(W)
|
||||
if(prob(50))
|
||||
var/obj/item/weapon/storage/pill_bottle/dice/D = new(src)
|
||||
load(D)
|
||||
else
|
||||
var/obj/item/device/instrument/guitar/G = new(src)
|
||||
load(G)
|
||||
|
||||
//Fans
|
||||
/obj/structure/fans
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "fans"
|
||||
name = "environmental regulation system"
|
||||
desc = "A large machine releasing a constant gust of air."
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/arbitraryatmosblockingvar = TRUE
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 5
|
||||
|
||||
/obj/structure/fans/deconstruct()
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
..()
|
||||
|
||||
/obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the fan.</span>", \
|
||||
"<span class='notice'>You start to disassemble the fan...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 20/W.toolspeed, target = src))
|
||||
deconstruct()
|
||||
return ..()
|
||||
|
||||
/obj/structure/fans/tiny
|
||||
name = "tiny fan"
|
||||
desc = "A tiny fan, releasing a thin gust of air."
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
density = 0
|
||||
icon_state = "fan_tiny"
|
||||
buildstackamount = 2
|
||||
|
||||
/obj/structure/fans/New(loc)
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/fans/Destroy()
|
||||
arbitraryatmosblockingvar = FALSE
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/fans/CanAtmosPass(turf/T)
|
||||
return !arbitraryatmosblockingvar
|
||||
|
||||
//Signs
|
||||
/obj/structure/sign/mining
|
||||
name = "nanotrasen mining corps sign"
|
||||
desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "ntpod"
|
||||
|
||||
/obj/structure/sign/mining/survival
|
||||
name = "shelter sign"
|
||||
desc = "A high visibility sign designating a safe shelter."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "survival"
|
||||
|
||||
//Fluff
|
||||
/obj/structure/tubes
|
||||
icon_state = "tubes"
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
name = "tubes"
|
||||
anchored = 1
|
||||
layer = BELOW_MOB_LAYER
|
||||
density = 0
|
||||
@@ -0,0 +1,806 @@
|
||||
/**********************Mineral deposits**************************/
|
||||
|
||||
/turf/closed/mineral //wall piece
|
||||
name = "rock"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
icon_state = "rock"
|
||||
var/smooth_icon = 'icons/turf/smoothrocks.dmi'
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed/mineral, /turf/closed/wall)
|
||||
baseturf = /turf/open/floor/plating/asteroid/airless
|
||||
initial_gas_mix = "TEMP=2.7"
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
layer = EDGED_TURF_LAYER
|
||||
temperature = TCMB
|
||||
var/environment_type = "asteroid"
|
||||
var/turf/open/floor/plating/turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
var/mineralType = null
|
||||
var/mineralAmt = 3
|
||||
var/spread = 0 //will the seam spread?
|
||||
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
|
||||
var/last_act = 0
|
||||
var/scan_state = null //Holder for the image we display when we're pinged by a mining scanner
|
||||
var/defer_change = 0
|
||||
|
||||
/turf/closed/mineral/New()
|
||||
pixel_y = -4
|
||||
pixel_x = -4
|
||||
icon = smooth_icon
|
||||
..()
|
||||
if (mineralType && mineralAmt && spread && spreadChance)
|
||||
for(var/dir in cardinal)
|
||||
if(prob(spreadChance))
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(istype(T, /turf/closed/mineral/random))
|
||||
Spread(T)
|
||||
|
||||
/turf/closed/mineral/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
|
||||
/turf/closed/mineral/ex_act(severity, target)
|
||||
..()
|
||||
switch(severity)
|
||||
if(3)
|
||||
if (prob(75))
|
||||
src.gets_drilled(null, 1)
|
||||
if(2)
|
||||
if (prob(90))
|
||||
src.gets_drilled(null, 1)
|
||||
if(1)
|
||||
src.gets_drilled(null, 1)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/Spread(turf/T)
|
||||
new src.type(T)
|
||||
|
||||
/turf/closed/mineral/random
|
||||
var/mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
|
||||
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40,
|
||||
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 2, /turf/closed/mineral/bscrystal = 1)
|
||||
//Currently, Adamantine won't spawn as it has no uses. -Durandan
|
||||
var/mineralChance = 13
|
||||
|
||||
/turf/closed/mineral/random/New()
|
||||
..()
|
||||
|
||||
if (prob(mineralChance))
|
||||
var/path = pickweight(mineralSpawnChanceList)
|
||||
var/turf/T = new path(src)
|
||||
|
||||
if(T && istype(T, /turf/closed/mineral))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.mineralAmt = rand(1, 5)
|
||||
M.environment_type = src.environment_type
|
||||
M.turf_type = src.turf_type
|
||||
M.baseturf = src.baseturf
|
||||
src = M
|
||||
M.levelupdate()
|
||||
|
||||
/turf/closed/mineral/random/high_chance
|
||||
icon_state = "rock_highchance"
|
||||
mineralChance = 25
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 35, /turf/closed/mineral/diamond = 30, /turf/closed/mineral/gold = 45,
|
||||
/turf/closed/mineral/silver = 50, /turf/closed/mineral/plasma = 50, /turf/closed/mineral/bscrystal = 20)
|
||||
|
||||
/turf/closed/mineral/random/high_chance/New()
|
||||
icon_state = "rock"
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/random/low_chance
|
||||
icon_state = "rock_lowchance"
|
||||
mineralChance = 6
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 2, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 4,
|
||||
/turf/closed/mineral/silver = 6, /turf/closed/mineral/plasma = 15, /turf/closed/mineral/iron = 40,
|
||||
/turf/closed/mineral/gibtonite = 2, /turf/closed/mineral/bscrystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/low_chance/New()
|
||||
icon_state = "rock"
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/iron
|
||||
mineralType = /obj/item/weapon/ore/iron
|
||||
spreadChance = 20
|
||||
spread = 1
|
||||
scan_state = "rock_Iron"
|
||||
|
||||
/turf/closed/mineral/uranium
|
||||
mineralType = /obj/item/weapon/ore/uranium
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Uranium"
|
||||
|
||||
/turf/closed/mineral/diamond
|
||||
mineralType = /obj/item/weapon/ore/diamond
|
||||
spreadChance = 0
|
||||
spread = 1
|
||||
scan_state = "rock_Diamond"
|
||||
|
||||
/turf/closed/mineral/gold
|
||||
mineralType = /obj/item/weapon/ore/gold
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Gold"
|
||||
|
||||
/turf/closed/mineral/silver
|
||||
mineralType = /obj/item/weapon/ore/silver
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Silver"
|
||||
|
||||
/turf/closed/mineral/plasma
|
||||
mineralType = /obj/item/weapon/ore/plasma
|
||||
spreadChance = 8
|
||||
spread = 1
|
||||
scan_state = "rock_Plasma"
|
||||
|
||||
/turf/closed/mineral/clown
|
||||
mineralType = /obj/item/weapon/ore/bananium
|
||||
mineralAmt = 3
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_Clown"
|
||||
|
||||
/turf/closed/mineral/bscrystal
|
||||
mineralType = /obj/item/weapon/ore/bluespace_crystal
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_BScrystal"
|
||||
|
||||
////////////////////////////////Gibtonite
|
||||
/turf/closed/mineral/gibtonite
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_Gibtonite"
|
||||
var/det_time = 8 //Countdown till explosion, but also rewards the player for how close you were to detonation when you defuse it
|
||||
var/stage = 0 //How far into the lifecycle of gibtonite we are, 0 is untouched, 1 is active and attempting to detonate, 2 is benign and ready for extraction
|
||||
var/activated_ckey = null //These are to track who triggered the gibtonite deposit for logging purposes
|
||||
var/activated_name = null
|
||||
var/activated_image = null
|
||||
|
||||
/turf/closed/mineral/gibtonite/New()
|
||||
det_time = rand(8,10) //So you don't know exactly when the hot potato will explode
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/gibtonite/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner) && stage == 1)
|
||||
user.visible_message("<span class='notice'>[user] holds [I] to [src]...</span>", "<span class='notice'>You use [I] to locate where to cut off the chain reaction and attempt to stop it...</span>")
|
||||
defuse()
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null, triggered_by_explosion = 0)
|
||||
if(stage == 0)
|
||||
var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_active", layer = ON_EDGED_TURF_LAYER)
|
||||
add_overlay(I)
|
||||
activated_image = I
|
||||
name = "gibtonite deposit"
|
||||
desc = "An active gibtonite reserve. Run!"
|
||||
stage = 1
|
||||
visible_message("<span class='danger'>There was gibtonite inside! It's going to explode!</span>")
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
var/notify_admins = 0
|
||||
if(z != 5)
|
||||
notify_admins = 1
|
||||
if(!triggered_by_explosion)
|
||||
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
else
|
||||
message_admins("An explosion has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
|
||||
if(!triggered_by_explosion)
|
||||
log_game("[key_name(user)] has triggered a gibtonite deposit reaction at [A.name] ([A.x], [A.y], [A.z]).")
|
||||
else
|
||||
log_game("An explosion has triggered a gibtonite deposit reaction at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
|
||||
countdown(notify_admins)
|
||||
|
||||
/turf/closed/mineral/gibtonite/proc/countdown(notify_admins = 0)
|
||||
set waitfor = 0
|
||||
while(istype(src, /turf/closed/mineral/gibtonite) && stage == 1 && det_time > 0 && mineralAmt >= 1)
|
||||
det_time--
|
||||
sleep(5)
|
||||
if(istype(src, /turf/closed/mineral/gibtonite))
|
||||
if(stage == 1 && det_time <= 0 && mineralAmt >= 1)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
mineralAmt = 0
|
||||
stage = 3
|
||||
explosion(bombturf,1,3,5, adminlog = notify_admins)
|
||||
|
||||
/turf/closed/mineral/gibtonite/proc/defuse()
|
||||
if(stage == 1)
|
||||
overlays -= activated_image
|
||||
var/image/I = image('icons/turf/smoothrocks.dmi', loc = src, icon_state = "rock_Gibtonite_inactive", layer = ON_EDGED_TURF_LAYER)
|
||||
add_overlay(I)
|
||||
desc = "An inactive gibtonite reserve. The ore can be extracted."
|
||||
stage = 2
|
||||
if(det_time < 0)
|
||||
det_time = 0
|
||||
visible_message("<span class='notice'>The chain reaction was stopped! The gibtonite had [src.det_time] reactions left till the explosion!</span>")
|
||||
|
||||
/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = 0)
|
||||
if(stage == 0 && mineralAmt >= 1) //Gibtonite deposit is activated
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
|
||||
explosive_reaction(user, triggered_by_explosion)
|
||||
return
|
||||
if(stage == 1 && mineralAmt >= 1) //Gibtonite deposit goes kaboom
|
||||
var/turf/bombturf = get_turf(src)
|
||||
mineralAmt = 0
|
||||
stage = 3
|
||||
explosion(bombturf,1,2,5, adminlog = 0)
|
||||
if(stage == 2) //Gibtonite deposit is now benign and extractable. Depending on how close you were to it blowing up before defusing, you get better quality ore.
|
||||
var/obj/item/weapon/twohanded/required/gibtonite/G = new /obj/item/weapon/twohanded/required/gibtonite/(src)
|
||||
if(det_time <= 0)
|
||||
G.quality = 3
|
||||
G.icon_state = "Gibtonite ore 3"
|
||||
if(det_time >= 1 && det_time <= 2)
|
||||
G.quality = 2
|
||||
G.icon_state = "Gibtonite ore 2"
|
||||
|
||||
ChangeTurf(turf_type, defer_change)
|
||||
spawn(10)
|
||||
AfterChange()
|
||||
|
||||
/turf/closed/mineral/gibtonite/volcanic
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
|
||||
////////////////////////////////End Gibtonite
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave
|
||||
var/length = 100
|
||||
var/mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 1, /mob/living/simple_animal/hostile/asteroid/goliath = 5, /mob/living/simple_animal/hostile/asteroid/basilisk = 4, /mob/living/simple_animal/hostile/asteroid/hivelord = 3)
|
||||
var/sanity = 1
|
||||
turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/volcanic
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 10, /mob/living/simple_animal/hostile/asteroid/goliath/beast = 50, /mob/living/simple_animal/hostile/asteroid/basilisk/watcher = 40, /mob/living/simple_animal/hostile/asteroid/hivelord/legion = 30,
|
||||
/mob/living/simple_animal/hostile/spawner/lavaland = 2, /mob/living/simple_animal/hostile/spawner/lavaland/goliath = 3, /mob/living/simple_animal/hostile/spawner/lavaland/legion = 3, \
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon = 2, /mob/living/simple_animal/hostile/megafauna/bubblegum = 2, /mob/living/simple_animal/hostile/megafauna/colossus = 2)
|
||||
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/New(loc, length, go_backwards = 1, exclude_dir = -1)
|
||||
// If length (arg2) isn't defined, get a random length; otherwise assign our length to the length arg.
|
||||
if(!length)
|
||||
src.length = rand(25, 50)
|
||||
else
|
||||
src.length = length
|
||||
|
||||
// Get our directiosn
|
||||
var/forward_cave_dir = pick(alldirs - exclude_dir)
|
||||
// Get the opposite direction of our facing direction
|
||||
var/backward_cave_dir = angle2dir(dir2angle(forward_cave_dir) + 180)
|
||||
|
||||
// Make our tunnels
|
||||
make_tunnel(forward_cave_dir)
|
||||
if(go_backwards)
|
||||
make_tunnel(backward_cave_dir)
|
||||
// Kill ourselves by replacing ourselves with a normal floor.
|
||||
SpawnFloor(src)
|
||||
..()
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/make_tunnel(dir)
|
||||
|
||||
var/turf/closed/mineral/tunnel = src
|
||||
var/next_angle = pick(45, -45)
|
||||
|
||||
for(var/i = 0; i < length; i++)
|
||||
if(!sanity)
|
||||
break
|
||||
|
||||
var/list/L = list(45)
|
||||
if(IsOdd(dir2angle(dir))) // We're going at an angle and we want thick angled tunnels.
|
||||
L += -45
|
||||
|
||||
// Expand the edges of our tunnel
|
||||
for(var/edge_angle in L)
|
||||
var/turf/closed/mineral/edge = get_step(tunnel, angle2dir(dir2angle(dir) + edge_angle))
|
||||
if(istype(edge))
|
||||
SpawnFloor(edge)
|
||||
|
||||
// Move our tunnel forward
|
||||
tunnel = get_step(tunnel, dir)
|
||||
|
||||
if(istype(tunnel))
|
||||
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
|
||||
if(i > 3 && prob(20))
|
||||
new src.type(tunnel, rand(10, 15), 0, dir)
|
||||
else
|
||||
SpawnFloor(tunnel)
|
||||
else //if(!istype(tunnel, src.parent)) // We hit space/normal/wall, stop our tunnel.
|
||||
break
|
||||
|
||||
// Chance to change our direction left or right.
|
||||
if(i > 2 && prob(33))
|
||||
// We can't go a full loop though
|
||||
next_angle = -next_angle
|
||||
setDir(angle2dir(dir2angle(dir) )+ next_angle)
|
||||
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T)
|
||||
for(var/turf/S in range(2,T))
|
||||
if(istype(S, /turf/open/space) || istype(S.loc, /area/mine/explored))
|
||||
sanity = 0
|
||||
break
|
||||
if(!sanity)
|
||||
return
|
||||
|
||||
SpawnMonster(T)
|
||||
new turf_type(T)
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
|
||||
if(prob(30))
|
||||
if(istype(loc, /area/mine/explored) || istype(loc, /area/lavaland/surface/outdoors/explored))
|
||||
return
|
||||
for(var/atom/A in urange(12,T))//Lowers chance of mob clumps
|
||||
if(istype(A, /mob/living/simple_animal/hostile/asteroid))
|
||||
return
|
||||
var/randumb = pickweight(mob_spawn_list)
|
||||
new randumb(T)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/attackby(obj/item/weapon/pickaxe/P, mob/user, params)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
if (istype(P, /obj/item/weapon/pickaxe))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
if(last_act+P.digspeed > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
user << "<span class='notice'>You start picking...</span>"
|
||||
P.playDigSound()
|
||||
|
||||
if(do_after(user,P.digspeed, target = src))
|
||||
if(istype(src, /turf/closed/mineral))
|
||||
user << "<span class='notice'>You finish cutting into the rock.</span>"
|
||||
gets_drilled(user)
|
||||
feedback_add_details("pick_used_mining","[P.type]")
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/proc/gets_drilled()
|
||||
if (mineralType && (src.mineralAmt > 0) && (src.mineralAmt < 11))
|
||||
var/i
|
||||
for (i=0;i<mineralAmt;i++)
|
||||
new mineralType(src)
|
||||
feedback_add_details("ore_mined","[mineralType]|[mineralAmt]")
|
||||
ChangeTurf(turf_type, defer_change)
|
||||
spawn(10)
|
||||
AfterChange()
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
|
||||
return
|
||||
|
||||
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash >= 2)
|
||||
gets_drilled()
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/attack_alien(mob/living/carbon/alien/M)
|
||||
M << "<span class='notice'>You start digging into the rock...</span>"
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1)
|
||||
if(do_after(M,40, target = src))
|
||||
M << "<span class='notice'>You tunnel into the rock.</span>"
|
||||
gets_drilled(M)
|
||||
|
||||
/turf/closed/mineral/Bumped(AM as mob|obj)
|
||||
..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
|
||||
src.attackby(H.l_hand,H)
|
||||
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
|
||||
src.attackby(H.r_hand,H)
|
||||
return
|
||||
else if(istype(AM,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
if(istype(R.module_active,/obj/item/weapon/pickaxe))
|
||||
src.attackby(R.module_active,R)
|
||||
return
|
||||
/* else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/drill))
|
||||
src.attackby(M.selected,M)
|
||||
return*/
|
||||
//Aparantly mechs are just TOO COOL to call Bump(), so fuck em (for now)
|
||||
else
|
||||
return
|
||||
|
||||
/**********************Asteroid**************************/
|
||||
|
||||
/turf/open/floor/plating/asteroid //floor piece
|
||||
name = "asteroid sand"
|
||||
baseturf = /turf/open/floor/plating/asteroid
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "asteroid"
|
||||
icon_plating = "asteroid"
|
||||
var/environment_type = "asteroid"
|
||||
var/turf_type = /turf/open/floor/plating/asteroid //Because caves do whacky shit to revert to normal
|
||||
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
|
||||
var/sand_type = /obj/item/weapon/ore/glass
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless
|
||||
initial_gas_mix = "TEMP=2.7"
|
||||
turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
/turf/open/floor/plating/asteroid/basalt
|
||||
name = "volcanic floor"
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "basalt"
|
||||
icon_plating = "basalt"
|
||||
environment_type = "basalt"
|
||||
sand_type = /obj/item/weapon/ore/glass/basalt
|
||||
|
||||
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath
|
||||
baseturf = /turf/open/floor/plating/lava/smooth
|
||||
|
||||
/turf/open/floor/plating/asteroid/basalt/airless
|
||||
initial_gas_mix = "TEMP=2.7"
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow
|
||||
name = "snow"
|
||||
desc = "Looks cold."
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
baseturf = /turf/open/floor/plating/asteroid/snow
|
||||
icon_state = "snow"
|
||||
icon_plating = "snow"
|
||||
initial_gas_mix = "TEMP=180"
|
||||
slowdown = 2
|
||||
environment_type = "snow"
|
||||
sand_type = /obj/item/stack/sheet/mineral/snow
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/airless
|
||||
initial_gas_mix = "TEMP=2.7"
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/temperatre
|
||||
initial_gas_mix = "TEMP=255.37"
|
||||
|
||||
/turf/open/floor/plating/asteroid/New()
|
||||
var/proper_name = name
|
||||
..()
|
||||
name = proper_name
|
||||
if(prob(20))
|
||||
icon_state = "[environment_type][rand(0,12)]"
|
||||
|
||||
/turf/open/floor/plating/asteroid/burn_tile()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
switch(severity)
|
||||
if(3)
|
||||
return
|
||||
if(2)
|
||||
if (prob(20))
|
||||
src.gets_dug()
|
||||
if(1)
|
||||
src.gets_dug()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/attackby(obj/item/weapon/W, mob/user, params)
|
||||
//note that this proc does not call ..()
|
||||
if(!W || !user)
|
||||
return 0
|
||||
var/digging_speed = 0
|
||||
if (istype(W, /obj/item/weapon/shovel))
|
||||
var/obj/item/weapon/shovel/S = W
|
||||
digging_speed = S.digspeed
|
||||
else if (istype(W, /obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
digging_speed = P.digspeed
|
||||
if (digging_speed)
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
if (dug)
|
||||
user << "<span class='warning'>This area has already been dug!</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start digging...</span>"
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, digging_speed, target = src))
|
||||
if(istype(src, /turf/open/floor/plating/asteroid))
|
||||
user << "<span class='notice'>You dig a hole.</span>"
|
||||
gets_dug()
|
||||
feedback_add_details("pick_used_mining","[W.type]")
|
||||
|
||||
if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
var/obj/item/weapon/storage/bag/ore/S = W
|
||||
if(S.collection_mode == 1)
|
||||
for(var/obj/item/weapon/ore/O in src.contents)
|
||||
O.attackby(W,user)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/tile))
|
||||
var/obj/item/stack/tile/Z = W
|
||||
if(!Z.use(1))
|
||||
return
|
||||
var/turf/open/floor/T = ChangeTurf(Z.turf_type)
|
||||
if(istype(Z,/obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
|
||||
var/obj/item/stack/tile/light/L = Z
|
||||
var/turf/open/floor/light/F = T
|
||||
F.state = L.state
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
|
||||
/turf/open/floor/plating/asteroid/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
for(var/i in 1 to 5)
|
||||
new sand_type(src)
|
||||
dug = 1
|
||||
icon_plating = "[environment_type]_dug"
|
||||
icon_state = "[environment_type]_dug"
|
||||
slowdown = 0
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_act()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_pull(S, current_size)
|
||||
return
|
||||
|
||||
//////////////CHASM//////////////////
|
||||
|
||||
/turf/open/chasm
|
||||
name = "chasm"
|
||||
desc = "Watch your step."
|
||||
baseturf = /turf/open/chasm
|
||||
smooth = SMOOTH_TRUE | SMOOTH_BORDER
|
||||
icon = 'icons/turf/floors/Chasms.dmi'
|
||||
icon_state = "smooth"
|
||||
var/drop_x = 1
|
||||
var/drop_y = 1
|
||||
var/drop_z = 1
|
||||
|
||||
|
||||
/turf/open/chasm/Entered(atom/movable/AM)
|
||||
if(istype(AM, /obj/singularity) || istype(AM, /obj/item/projectile))
|
||||
return
|
||||
if(istype(AM, /obj/effect/portal))
|
||||
// Portals aren't affected by gravity. Probably.
|
||||
return
|
||||
// Flies right over the chasm
|
||||
if(istype(AM, /mob/living/simple_animal))
|
||||
// apparently only simple_animals can fly??
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(SA.flying)
|
||||
return
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.belt, /obj/item/device/wormhole_jaunter))
|
||||
var/obj/item/device/wormhole_jaunter/J = H.belt
|
||||
// To freak out any bystanders
|
||||
visible_message("<span class='boldwarning'>[H] falls into [src]!</span>")
|
||||
J.chasm_react(H)
|
||||
return
|
||||
if(H.dna.species && (FLYING in H.dna.species.specflags))
|
||||
return
|
||||
drop(AM)
|
||||
|
||||
|
||||
/turf/open/chasm/proc/drop(atom/movable/AM)
|
||||
/*visible_message("[AM] falls into [src]!")
|
||||
qdel(AM)*/
|
||||
AM.forceMove(locate(drop_x, drop_y, drop_z))
|
||||
AM.visible_message("<span class='boldwarning'>[AM] falls from above!</span>", "<span class='userdanger'>GAH! Ah... where are you?</span>")
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/L = AM
|
||||
L.Weaken(5)
|
||||
L.adjustBruteLoss(30)
|
||||
|
||||
/turf/open/chasm/straight_down/New()
|
||||
..()
|
||||
drop_x = x
|
||||
drop_y = y
|
||||
if(z+1 <= world.maxz)
|
||||
drop_z = z+1
|
||||
|
||||
/**********************Lavaland Turfs**************************/
|
||||
|
||||
///////Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground.
|
||||
|
||||
/turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
baseturf = /turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
|
||||
/turf/open/chasm/straight_down/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
baseturf = /turf/open/chasm/straight_down/lava_land_surface
|
||||
|
||||
/turf/open/chasm/straight_down/lava_land_surface/normal_air
|
||||
initial_gas_mix = "o2=22;n2=82;TEMP=293.15"
|
||||
|
||||
/turf/open/chasm/straight_down/lava_land_surface/drop(atom/movable/AM)
|
||||
if(!AM.invisibility)
|
||||
AM.visible_message("<span class='boldwarning'>[AM] falls into [src]!</span>", "<span class='userdanger'>You stumble and stare into an abyss before you. It stares back, and you fall \
|
||||
into the enveloping dark.</span>")
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
L.notransform = TRUE
|
||||
L.Stun(10)
|
||||
L.resting = TRUE
|
||||
animate(AM, transform = matrix() - matrix(), alpha = 0, color = rgb(0, 0, 0), time = 10)
|
||||
for(var/i in 1 to 5)
|
||||
AM.pixel_y--
|
||||
sleep(2)
|
||||
if(isrobot(AM))
|
||||
var/mob/living/silicon/robot/S = AM
|
||||
qdel(S.mmi)
|
||||
qdel(AM)
|
||||
|
||||
/turf/closed/mineral/volcanic/lava_land_surface
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/random/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
mineralChance = 10
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 5, /turf/closed/mineral/diamond/volcanic = 1, /turf/closed/mineral/gold/volcanic = 10,
|
||||
/turf/closed/mineral/silver/volcanic = 12, /turf/closed/mineral/plasma/volcanic = 20, /turf/closed/mineral/iron/volcanic = 40,
|
||||
/turf/closed/mineral/gibtonite/volcanic = 4, /turf/open/floor/plating/asteroid/airless/cave/volcanic = 1, /turf/closed/mineral/bscrystal/volcanic = 1)
|
||||
|
||||
/turf/closed/mineral/random/high_chance/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 35, /turf/closed/mineral/diamond/volcanic = 30, /turf/closed/mineral/gold/volcanic = 45,
|
||||
/turf/closed/mineral/silver/volcanic = 50, /turf/closed/mineral/plasma/volcanic = 50, /turf/closed/mineral/bscrystal/volcanic = 20)
|
||||
|
||||
/turf/open/floor/plating/lava/smooth/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
baseturf = /turf/open/chasm/straight_down/lava_land_surface
|
||||
|
||||
/turf/closed/mineral/gibtonite/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/uranium/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/diamond/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/gold/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/silver/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/plasma/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/iron/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/bscrystal/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
defer_change = 1
|
||||
|
||||
|
||||
//BECAUSE ONE PLANET WASNT ENOUGH
|
||||
|
||||
/turf/closed/mineral/ash_rock //wall piece
|
||||
name = "rock"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/rock_wall.dmi'
|
||||
icon_state = "rock"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed/mineral, /turf/closed/wall)
|
||||
baseturf = /turf/open/floor/plating/ash
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
environment_type = "waste"
|
||||
turf_type = /turf/open/floor/plating/ash
|
||||
defer_change = 1
|
||||
|
||||
/turf/open/floor/plating/ash
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
name = "ash"
|
||||
icon_state = "ash"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/open/floor/plating/ash, /turf/closed)
|
||||
var/smooth_icon = 'icons/turf/floors/ash.dmi'
|
||||
desc = "The ground is covered in volcanic ash."
|
||||
baseturf = /turf/open/floor/plating/ash //I assume this will be a chasm eventually, once this becomes an actual surface
|
||||
slowdown = 1
|
||||
initial_gas_mix = "o2=14;n2=23;TEMP=300"
|
||||
|
||||
/turf/open/floor/plating/ash/New()
|
||||
pixel_y = -4
|
||||
pixel_x = -4
|
||||
icon = smooth_icon
|
||||
..()
|
||||
|
||||
/turf/open/floor/plating/ash/break_tile()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/ash/burn_tile()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/ash/rocky
|
||||
name = "rocky ground"
|
||||
icon_state = "rockyash"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/floors/rocky_ash.dmi'
|
||||
slowdown = 0
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/open/floor/plating/ash/rocky, /turf/closed)
|
||||
|
||||
//Necropolis
|
||||
|
||||
/turf/closed/indestructible/necropolis
|
||||
name = "necropolis wall"
|
||||
desc = "A seemingly impenetrable wall."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
explosion_block = 50
|
||||
baseturf = /turf/closed/indestructible/necropolis
|
||||
|
||||
/turf/open/indestructible/necropolis
|
||||
name = "necropolis floor"
|
||||
desc = "It's regarding you suspiciously."
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "floor"
|
||||
baseturf = /turf/open/indestructible/necropolis
|
||||
|
||||
/turf/open/indestructible/necropolis/New()
|
||||
..()
|
||||
if(prob(12))
|
||||
icon_state = "necropolis[rand(1,2)]"
|
||||
@@ -0,0 +1,188 @@
|
||||
/**********************Mining drone**********************/
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone
|
||||
name = "nanotrasen minebot"
|
||||
desc = "The instructions printed on the side read: This is a small robot used to support miners, can be set to search and collect loose ore, or to help fend off wildlife. A mining scanner can instruct it to drop loose ore. Field repairs can be done with a welder."
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon_state = "mining_drone"
|
||||
icon_living = "mining_drone"
|
||||
status_flags = CANSTUN|CANWEAKEN|CANPUSH
|
||||
stop_automated_movement_when_pulled = 1
|
||||
mouse_opacity = 1
|
||||
faction = list("neutral")
|
||||
a_intent = "harm"
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
wander = 0
|
||||
idle_vision_range = 5
|
||||
move_to_delay = 10
|
||||
retreat_distance = 1
|
||||
minimum_distance = 2
|
||||
health = 125
|
||||
maxHealth = 125
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
environment_smash = 0
|
||||
check_friendly_fire = 1
|
||||
attacktext = "drills"
|
||||
attack_sound = 'sound/weapons/circsawhit.ogg'
|
||||
ranged = 1
|
||||
sentience_type = SENTIENCE_MINEBOT
|
||||
ranged_message = "shoots"
|
||||
ranged_cooldown_time = 30
|
||||
projectiletype = /obj/item/projectile/kinetic
|
||||
projectilesound = 'sound/weapons/Gunshot4.ogg'
|
||||
speak_emote = list("states")
|
||||
wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver,
|
||||
/obj/item/weapon/ore/plasma, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/iron,
|
||||
/obj/item/weapon/ore/bananium)
|
||||
healable = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.welding && !stat)
|
||||
if(AIStatus != AI_OFF && AIStatus != AI_IDLE)
|
||||
user << "<span class='info'>[src] is moving around too much to repair!</span>"
|
||||
return
|
||||
if(maxHealth == health)
|
||||
user << "<span class='info'>[src] is at full integrity.</span>"
|
||||
else
|
||||
adjustBruteLoss(-10)
|
||||
user << "<span class='info'>You repair some of the armor on [src].</span>"
|
||||
return
|
||||
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner))
|
||||
user << "<span class='info'>You instruct [src] to drop any collected ore.</span>"
|
||||
DropOre()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/death()
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
DropOre()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/New()
|
||||
..()
|
||||
SetCollectBehavior()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M)
|
||||
if(M.a_intent == "help")
|
||||
switch(search_objects)
|
||||
if(0)
|
||||
SetCollectBehavior()
|
||||
M << "<span class='info'>[src] has been set to search and store loose ore.</span>"
|
||||
if(2)
|
||||
SetOffenseBehavior()
|
||||
M << "<span class='info'>[src] has been set to attack hostile wildlife.</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/SetCollectBehavior()
|
||||
idle_vision_range = 9
|
||||
search_objects = 2
|
||||
wander = 1
|
||||
ranged = 0
|
||||
minimum_distance = 1
|
||||
retreat_distance = null
|
||||
icon_state = "mining_drone"
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/SetOffenseBehavior()
|
||||
idle_vision_range = 7
|
||||
search_objects = 0
|
||||
wander = 0
|
||||
ranged = 1
|
||||
retreat_distance = 1
|
||||
minimum_distance = 2
|
||||
icon_state = "mining_drone_offense"
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/AttackingTarget()
|
||||
if(istype(target, /obj/item/weapon/ore))
|
||||
CollectOre()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre()
|
||||
var/obj/item/weapon/ore/O
|
||||
for(O in src.loc)
|
||||
O.loc = src
|
||||
for(var/dir in alldirs)
|
||||
var/turf/T = get_step(src,dir)
|
||||
for(O in T)
|
||||
O.loc = src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre()
|
||||
if(!contents.len)
|
||||
return
|
||||
for(var/obj/item/weapon/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustHealth()
|
||||
if(search_objects)
|
||||
SetOffenseBehavior()
|
||||
. = ..()
|
||||
|
||||
/**********************Minebot Upgrades**********************/
|
||||
|
||||
//Melee
|
||||
|
||||
/obj/item/device/mine_bot_ugprade
|
||||
name = "minebot melee upgrade"
|
||||
desc = "A minebot upgrade."
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
|
||||
if(!istype(M) || !proximity)
|
||||
return
|
||||
upgrade_bot(M, user)
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/proc/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
|
||||
if(M.melee_damage_upper != initial(M.melee_damage_upper))
|
||||
user << "[src] already has a combat upgrade installed!"
|
||||
return
|
||||
M.melee_damage_lower = 22
|
||||
M.melee_damage_upper = 22
|
||||
qdel(src)
|
||||
|
||||
//Health
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health
|
||||
name = "minebot chassis upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
|
||||
if(M.maxHealth != initial(M.maxHealth))
|
||||
user << "[src] already has a reinforced chassis!"
|
||||
return
|
||||
M.maxHealth = 170
|
||||
qdel(src)
|
||||
|
||||
|
||||
//Cooldown
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/cooldown
|
||||
name = "minebot cooldown upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/cooldown/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
|
||||
name = "minebot cooldown upgrade"
|
||||
if(M.ranged_cooldown_time != initial(M.ranged_cooldown_time))
|
||||
user << "[src] already has a decreased weapon cooldown!"
|
||||
return
|
||||
M.ranged_cooldown_time = 10
|
||||
qdel(src)
|
||||
|
||||
|
||||
//AI
|
||||
/obj/item/slimepotion/sentience/mining
|
||||
name = "minebot AI upgrade"
|
||||
desc = "Can be used to grant sentience to minebots."
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
sentience_type = SENTIENCE_MINEBOT
|
||||
origin_tech = "programming=6"
|
||||
@@ -0,0 +1,219 @@
|
||||
/**********************Mint**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint
|
||||
name = "coin press"
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/amt_silver = 0 //amount of silver
|
||||
var/amt_gold = 0 //amount of gold
|
||||
var/amt_diamond = 0
|
||||
var/amt_iron = 0
|
||||
var/amt_plasma = 0
|
||||
var/amt_uranium = 0
|
||||
var/amt_clown = 0
|
||||
var/amt_adamantine = 0
|
||||
var/amt_mythril = 0
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/processing = 0
|
||||
var/chosen = "metal" //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
speed_process = 1
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/gold))
|
||||
amt_gold += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/silver))
|
||||
amt_silver += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/diamond))
|
||||
amt_diamond += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/plasma))
|
||||
amt_plasma += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
amt_uranium += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/metal))
|
||||
amt_iron += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/bananium))
|
||||
amt_clown += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
if (istype(O, /obj/item/stack/sheet/mineral/adamantine))
|
||||
amt_adamantine += MINERAL_MATERIAL_AMOUNT * O.amount
|
||||
O.loc = null
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(mob/user)
|
||||
|
||||
var/dat = "<b>Coin Press</b><br>"
|
||||
|
||||
dat += text("<br><font color='#ffcc00'><b>Gold inserted: </b>[amt_gold] cm3</font> ")
|
||||
if (chosen == "gold")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=gold'>Choose</A>")
|
||||
dat += text("<br><font color='#888888'><b>Silver inserted: </b>[amt_silver] cm3</font> ")
|
||||
if (chosen == "silver")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=silver'>Choose</A>")
|
||||
dat += text("<br><font color='#555555'><b>Iron inserted: </b>[amt_iron] cm3</font> ")
|
||||
if (chosen == "metal")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=metal'>Choose</A>")
|
||||
dat += text("<br><font color='#8888FF'><b>Diamond inserted: </b>[amt_diamond] cm3</font> ")
|
||||
if (chosen == "diamond")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=diamond'>Choose</A>")
|
||||
dat += text("<br><font color='#FF8800'><b>Plasma inserted: </b>[amt_plasma] cm3</font> ")
|
||||
if (chosen == "plasma")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=plasma'>Choose</A>")
|
||||
dat += text("<br><font color='#008800'><b>Uranium inserted: </b>[amt_uranium] cm3</font> ")
|
||||
if (chosen == "uranium")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=uranium'>Choose</A>")
|
||||
if(amt_clown > 0)
|
||||
dat += text("<br><font color='#AAAA00'><b>Bananium inserted: </b>[amt_clown] cm3</font> ")
|
||||
if (chosen == "clown")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=clown'>Choose</A>")
|
||||
dat += text("<br><font color='#888888'><b>Adamantine inserted: </b>[amt_adamantine] cm3</font> ")//I don't even know these color codes, so fuck it.
|
||||
if (chosen == "adamantine")
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=adamantine'>Choose</A>")
|
||||
|
||||
dat += text("<br><br>Will produce [coinsToProduce] [chosen] coins if enough materials are available.<br>")
|
||||
//dat += text("The dial which controls the number of conins to produce seems to be stuck. A technician has already been dispatched to fix this.")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=-10'>-10</A> ")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=-5'>-5</A> ")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=-1'>-1</A> ")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=1'>+1</A> ")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=5'>+5</A> ")
|
||||
dat += text("<A href='?src=\ref[src];chooseAmt=10'>+10</A> ")
|
||||
|
||||
dat += text("<br><br>In total this machine produced <font color='green'><b>[newCoins]</b></font> coins.")
|
||||
dat += text("<br><A href='?src=\ref[src];makeCoins=[1]'>Make coins</A>")
|
||||
user << browse("[dat]", "window=mint")
|
||||
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
usr << "<span class='notice'>The machine is processing.</span>"
|
||||
return
|
||||
if(href_list["choose"])
|
||||
chosen = href_list["choose"]
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
processing = 1;
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
while(amt_iron >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/iron)
|
||||
amt_iron -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("gold")
|
||||
while(amt_gold >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/gold)
|
||||
amt_gold -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("silver")
|
||||
while(amt_silver >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/silver)
|
||||
amt_silver -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("diamond")
|
||||
while(amt_diamond >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/diamond)
|
||||
amt_diamond -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("plasma")
|
||||
while(amt_plasma >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/plasma)
|
||||
amt_plasma -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("uranium")
|
||||
while(amt_uranium >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/uranium)
|
||||
amt_uranium -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5)
|
||||
if("clown")
|
||||
while(amt_clown >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/clown)
|
||||
amt_clown -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("adamantine")
|
||||
while(amt_adamantine >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/adamantine)
|
||||
amt_adamantine -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("mythril")
|
||||
while(amt_adamantine >= coin_mat && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/mythril)
|
||||
amt_mythril -= coin_mat
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
icon_state = "coinpress0"
|
||||
processing = 0;
|
||||
coinsToProduce = temp_coins
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins(P)
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
var/obj/item/O = new P(src)
|
||||
var/obj/item/weapon/storage/bag/money/M = locate(/obj/item/weapon/storage/bag/money, T)
|
||||
if(!M)
|
||||
M = new /obj/item/weapon/storage/bag/money(src)
|
||||
unload_mineral(M)
|
||||
O.loc = M
|
||||
@@ -0,0 +1,25 @@
|
||||
/*****************************Money bag********************************/
|
||||
|
||||
/obj/item/weapon/storage/bag/money
|
||||
name = "money bag"
|
||||
icon_state = "moneybag"
|
||||
force = 10
|
||||
throwforce = 0
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
w_class = 4
|
||||
max_w_class = 3
|
||||
storage_slots = 80
|
||||
max_combined_w_class = 40
|
||||
can_hold = list(/obj/item/weapon/coin, /obj/item/stack/spacecash)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/bag/money/vault/New()
|
||||
..()
|
||||
new /obj/item/weapon/coin/silver(src)
|
||||
new /obj/item/weapon/coin/silver(src)
|
||||
new /obj/item/weapon/coin/silver(src)
|
||||
new /obj/item/weapon/coin/silver(src)
|
||||
new /obj/item/weapon/coin/gold(src)
|
||||
new /obj/item/weapon/coin/gold(src)
|
||||
new /obj/item/weapon/coin/adamantine(src)
|
||||
@@ -0,0 +1,390 @@
|
||||
/**********************Mineral ores**************************/
|
||||
|
||||
/obj/item/weapon/ore
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore"
|
||||
var/points = 0 //How many points this ore gets you from the ore redemption machine
|
||||
var/refined_type = null //What this ore defaults to being refined into
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(15) && refined_type)
|
||||
new refined_type(get_turf(src.loc))
|
||||
qdel(src)
|
||||
else if(W.isOn())
|
||||
user << "<span class='info'>Not enough fuel to smelt [src].</span>"
|
||||
..()
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "uranium ore"
|
||||
icon_state = "Uranium ore"
|
||||
origin_tech = "materials=5"
|
||||
points = 30
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "iron ore"
|
||||
icon_state = "Iron ore"
|
||||
origin_tech = "materials=1"
|
||||
points = 1
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "sand pile"
|
||||
icon_state = "Glass ore"
|
||||
origin_tech = "materials=1"
|
||||
points = 1
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/glass
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/ore/glass/attack_self(mob/living/user)
|
||||
user << "<span class='notice'>You use the sand to make sandstone.</span>"
|
||||
var/sandAmt = 1
|
||||
for(var/obj/item/weapon/ore/glass/G in user.loc) // The sand on the floor
|
||||
sandAmt += 1
|
||||
qdel(G)
|
||||
while(sandAmt > 0)
|
||||
var/obj/item/stack/sheet/mineral/sandstone/SS = new /obj/item/stack/sheet/mineral/sandstone(user.loc)
|
||||
if(sandAmt >= SS.max_amount)
|
||||
SS.amount = SS.max_amount
|
||||
else
|
||||
SS.amount = sandAmt
|
||||
for(var/obj/item/stack/sheet/mineral/sandstone/SA in user.loc)
|
||||
if(SA != SS && SA.amount < SA.max_amount)
|
||||
SA.attackby(SS, user) //we try to transfer all old unfinished stacks to the new stack we created.
|
||||
sandAmt -= SS.max_amount
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/ore/glass/throw_impact(atom/hit_atom)
|
||||
if(..() || !ishuman(hit_atom))
|
||||
return
|
||||
var/mob/living/carbon/human/C = hit_atom
|
||||
if(C.head && C.head.flags_cover & HEADCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s headgear blocks the sand!</span>")
|
||||
return
|
||||
if(C.wear_mask && C.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s mask blocks the sand!</span>")
|
||||
return
|
||||
if(C.glasses && C.glasses.flags_cover & GLASSESCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s glasses block the sand!</span>")
|
||||
return
|
||||
C.adjust_blurriness(6)
|
||||
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
|
||||
C.confused += 5
|
||||
C << "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/glass/basalt
|
||||
name = "volcanic ash"
|
||||
icon_state = "volcanic_sand"
|
||||
|
||||
/obj/item/weapon/ore/plasma
|
||||
name = "plasma ore"
|
||||
icon_state = "Plasma ore"
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
points = 15
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/item/weapon/ore/plasma/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.welding)
|
||||
user << "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "silver ore"
|
||||
icon_state = "Silver ore"
|
||||
origin_tech = "materials=3"
|
||||
points = 16
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "gold ore"
|
||||
icon_state = "Gold ore"
|
||||
origin_tech = "materials=4"
|
||||
points = 18
|
||||
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamond ore"
|
||||
icon_state = "Diamond ore"
|
||||
origin_tech = "materials=6"
|
||||
points = 50
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
/obj/item/weapon/ore/bananium
|
||||
name = "bananium ore"
|
||||
icon_state = "Clown ore"
|
||||
origin_tech = "materials=4"
|
||||
points = 60
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "slag"
|
||||
desc = "Completely useless"
|
||||
icon_state = "slag"
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite
|
||||
name = "gibtonite ore"
|
||||
desc = "Extremely explosive if struck with mining equipment, Gibtonite is often used by miners to speed up their work by using it as a mining charge. This material is illegal to possess by unauthorized personnel under space law."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "Gibtonite ore"
|
||||
item_state = "Gibtonite ore"
|
||||
w_class = 4
|
||||
throw_range = 0
|
||||
var/primed = 0
|
||||
var/det_time = 100
|
||||
var/quality = 1 //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better
|
||||
var/attacher = "UNKNOWN"
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
|
||||
if(!wires && istype(I, /obj/item/device/assembly/igniter))
|
||||
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
|
||||
wires = new /datum/wires/explosive/gibtonite(src)
|
||||
attacher = key_name(user)
|
||||
qdel(I)
|
||||
add_overlay("Gibtonite_igniter")
|
||||
return
|
||||
|
||||
if(wires && !primed)
|
||||
if(is_wire_tool(I))
|
||||
wires.interact(user)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/pickaxe) || istype(I, /obj/item/weapon/resonator) || I.force >= 10)
|
||||
GibtoniteReaction(user)
|
||||
return
|
||||
if(primed)
|
||||
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner) || istype(I, /obj/item/device/multitool))
|
||||
primed = 0
|
||||
user.visible_message("The chain reaction was stopped! ...The ore's quality looks diminished.", "<span class='notice'>You stopped the chain reaction. ...The ore's quality looks diminished.</span>")
|
||||
icon_state = "Gibtonite ore"
|
||||
quality = 1
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/attack_self(user)
|
||||
if(wires)
|
||||
wires.interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/bullet_act(obj/item/projectile/P)
|
||||
GibtoniteReaction(P.firer)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/ex_act()
|
||||
GibtoniteReaction(null, 1)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
|
||||
if(!primed)
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
|
||||
primed = 1
|
||||
icon_state = "Gibtonite active"
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/notify_admins = 0
|
||||
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
notify_admins = 1
|
||||
|
||||
if(notify_admins)
|
||||
if(triggered_by == 1)
|
||||
message_admins("An explosion has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
else if(triggered_by == 2)
|
||||
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[attacher]'>FLW</A>)")
|
||||
else
|
||||
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
if(triggered_by == 1)
|
||||
log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
else if(triggered_by == 2)
|
||||
log_game("A signal has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z]). Igniter attacher: [key_name(attacher)].")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] strikes \the [src], causing a chain reaction!</span>", "<span class='danger'>You strike \the [src], causing a chain reaction.</span>")
|
||||
log_game("[key_name(user)] has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
spawn(det_time)
|
||||
if(primed)
|
||||
if(quality == 3)
|
||||
explosion(src.loc,2,4,9,adminlog = notify_admins)
|
||||
if(quality == 2)
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
if(quality == 1)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/weapon/ore/ex_act()
|
||||
return
|
||||
|
||||
/*****************************Coin********************************/
|
||||
|
||||
// The coin's value is a value of it's materials.
|
||||
// Yes, the gold standard makes a come-back!
|
||||
// This is the only way to make coins that are possible to produce on station actually worth anything.
|
||||
/obj/item/weapon/coin
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
name = "coin"
|
||||
icon_state = "coin__heads"
|
||||
flags = CONDUCT
|
||||
force = 1
|
||||
throwforce = 2
|
||||
w_class = 1
|
||||
var/string_attached
|
||||
var/list/sideslist = list("heads","tails")
|
||||
var/cmineral = null
|
||||
var/cooldown = 0
|
||||
var/value = 1
|
||||
|
||||
/obj/item/weapon/coin/New()
|
||||
..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
icon_state = "coin_[cmineral]_heads"
|
||||
if(cmineral)
|
||||
name = "[cmineral] coin"
|
||||
|
||||
/obj/item/weapon/coin/examine(mob/user)
|
||||
..()
|
||||
if(value)
|
||||
user << "<span class='info'>It's worth [value] credit\s.</span>"
|
||||
|
||||
/obj/item/weapon/coin/gold
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
value = 50
|
||||
materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/silver
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
value = 20
|
||||
materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/diamond
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
value = 500
|
||||
materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/iron
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
value = 1
|
||||
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/plasma
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
value = 100
|
||||
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/uranium
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
value = 80
|
||||
materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/clown
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
value = 1000 //makes the clown cry
|
||||
materials = list(MAT_BANANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
|
||||
/obj/item/weapon/coin/adamantine
|
||||
cmineral = "adamantine"
|
||||
icon_state = "coin_adamantine_heads"
|
||||
value = 1500
|
||||
|
||||
/obj/item/weapon/coin/mythril
|
||||
cmineral = "mythril"
|
||||
icon_state = "coin_mythril_heads"
|
||||
value = 3000
|
||||
|
||||
/obj/item/weapon/coin/twoheaded
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
desc = "Hey, this coin's the same on both sides!"
|
||||
sideslist = list("heads")
|
||||
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
|
||||
value = 1
|
||||
|
||||
/obj/item/weapon/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")
|
||||
value = 0
|
||||
|
||||
/obj/item/weapon/coin/antagtoken/New()
|
||||
return
|
||||
|
||||
/obj/item/weapon/coin/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
user << "<span class='warning'>There already is a string attached to this coin!</span>"
|
||||
return
|
||||
|
||||
if (CC.use(1))
|
||||
add_overlay(image('icons/obj/economy.dmi',"coin_string_overlay"))
|
||||
string_attached = 1
|
||||
user << "<span class='notice'>You attach a string to the coin.</span>"
|
||||
else
|
||||
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/weapon/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
|
||||
user << "<span class='notice'>You detach the string from the coin.</span>"
|
||||
else ..()
|
||||
|
||||
/obj/item/weapon/coin/attack_self(mob/user)
|
||||
if(cooldown < world.time - 15)
|
||||
if(string_attached) //does the coin have a wire attached
|
||||
user << "<span class='warning'>The coin won't flip very well with something attached!</span>" //Tell user it will not flip
|
||||
return //do not flip the coin
|
||||
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)
|
||||
var/oldloc = loc
|
||||
sleep(15)
|
||||
if(loc == oldloc && user && !user.incapacitated())
|
||||
user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \
|
||||
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
|
||||
"<span class='italics'>You hear the clattering of loose change.</span>")
|
||||
@@ -0,0 +1,125 @@
|
||||
|
||||
/**********************Ore box**************************/
|
||||
|
||||
/obj/structure/ore_box
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "orebox"
|
||||
name = "ore box"
|
||||
desc = "A heavy wooden box, which can be filled with a lot of ores."
|
||||
density = 1
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/ore))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
W.loc = src
|
||||
else if (istype(W, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = W
|
||||
for(var/obj/item/weapon/ore/O in S.contents)
|
||||
S.remove_from_storage(O, src) //This will move the item to this item's contents
|
||||
user << "<span class='notice'>You empty the ore in [S] into \the [src].</span>"
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/item/weapon/crowbar/C = W
|
||||
var/time = 50
|
||||
if(do_after(user, time/C.toolspeed, target = src))
|
||||
user.visible_message("[user] pries \the [src] apart.", "<span class='notice'>You pry apart \the [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
|
||||
// If you change the amount of wood returned, remember
|
||||
// to change the construction costs
|
||||
var/obj/item/stack/sheet/mineral/wood/wo = new (loc, 4)
|
||||
wo.add_fingerprint(user)
|
||||
deconstruct()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/ore_box/attack_hand(mob/user)
|
||||
if(Adjacent(user))
|
||||
show_contents(user)
|
||||
|
||||
/obj/structure/ore_box/attack_robot(mob/user)
|
||||
if(Adjacent(user))
|
||||
show_contents(user)
|
||||
|
||||
/obj/structure/ore_box/proc/show_contents(mob/user)
|
||||
var/amt_gold = 0
|
||||
var/amt_silver = 0
|
||||
var/amt_diamond = 0
|
||||
var/amt_glass = 0
|
||||
var/amt_iron = 0
|
||||
var/amt_plasma = 0
|
||||
var/amt_uranium = 0
|
||||
var/amt_clown = 0
|
||||
var/amt_bluespace = 0
|
||||
|
||||
for (var/obj/item/weapon/ore/C in contents)
|
||||
if (istype(C,/obj/item/weapon/ore/diamond))
|
||||
amt_diamond++;
|
||||
if (istype(C,/obj/item/weapon/ore/glass))
|
||||
amt_glass++;
|
||||
if (istype(C,/obj/item/weapon/ore/plasma))
|
||||
amt_plasma++;
|
||||
if (istype(C,/obj/item/weapon/ore/iron))
|
||||
amt_iron++;
|
||||
if (istype(C,/obj/item/weapon/ore/silver))
|
||||
amt_silver++;
|
||||
if (istype(C,/obj/item/weapon/ore/gold))
|
||||
amt_gold++;
|
||||
if (istype(C,/obj/item/weapon/ore/uranium))
|
||||
amt_uranium++;
|
||||
if (istype(C,/obj/item/weapon/ore/bananium))
|
||||
amt_clown++;
|
||||
if (istype(C,/obj/item/weapon/ore/bluespace_crystal))
|
||||
amt_bluespace++
|
||||
|
||||
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
|
||||
if (amt_gold)
|
||||
dat += text("Gold ore: [amt_gold]<br>")
|
||||
if (amt_silver)
|
||||
dat += text("Silver ore: [amt_silver]<br>")
|
||||
if (amt_iron)
|
||||
dat += text("Metal ore: [amt_iron]<br>")
|
||||
if (amt_glass)
|
||||
dat += text("Sand: [amt_glass]<br>")
|
||||
if (amt_diamond)
|
||||
dat += text("Diamond ore: [amt_diamond]<br>")
|
||||
if (amt_plasma)
|
||||
dat += text("Plasma ore: [amt_plasma]<br>")
|
||||
if (amt_uranium)
|
||||
dat += text("Uranium ore: [amt_uranium]<br>")
|
||||
if (amt_clown)
|
||||
dat += text("Bananium ore: [amt_clown]<br>")
|
||||
if (amt_bluespace)
|
||||
dat += text("Bluespace crystals: [amt_bluespace]<br>")
|
||||
|
||||
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
|
||||
user << browse("[dat]", "window=orebox")
|
||||
return
|
||||
|
||||
/obj/structure/ore_box/proc/dump_contents()
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = src.loc
|
||||
|
||||
/obj/structure/ore_box/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
dump_contents()
|
||||
usr << "<span class='notice'>You empty the box.</span>"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/structure/ore_box/ex_act(severity, target)
|
||||
if(prob(100 / severity) && severity < 3)
|
||||
qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them
|
||||
|
||||
/obj/structure/ore_box/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/datum/map_template/shelter
|
||||
var/shelter_id
|
||||
var/description
|
||||
var/blacklisted_turfs
|
||||
var/whitelisted_turfs
|
||||
var/banned_areas
|
||||
|
||||
/datum/map_template/shelter/New()
|
||||
. = ..()
|
||||
blacklisted_turfs = typecacheof(/turf/closed)
|
||||
whitelisted_turfs = list()
|
||||
banned_areas = typecacheof(/area/shuttle)
|
||||
|
||||
/datum/map_template/shelter/proc/check_deploy(turf/deploy_location)
|
||||
var/affected = get_affected_turfs(deploy_location, centered=TRUE)
|
||||
for(var/turf/T in affected)
|
||||
var/area/A = get_area(T)
|
||||
if(is_type_in_typecache(A, banned_areas))
|
||||
return SHELTER_DEPLOY_BAD_AREA
|
||||
|
||||
var/banned = is_type_in_typecache(T, blacklisted_turfs)
|
||||
var/permitted = is_type_in_typecache(T, whitelisted_turfs)
|
||||
if(banned && !permitted)
|
||||
return SHELTER_DEPLOY_BAD_TURFS
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density && O.anchored)
|
||||
return SHELTER_DEPLOY_ANCHORED_OBJECTS
|
||||
return SHELTER_DEPLOY_ALLOWED
|
||||
|
||||
/datum/map_template/shelter/alpha
|
||||
name = "Shelter Alpha"
|
||||
shelter_id = "shelter_alpha"
|
||||
description = "A cosy self-contained pressurized shelter, with \
|
||||
built-in navigation, entertainment, medical facilities and a \
|
||||
sleeping area! Order now, and we'll throw in a TINY FAN, \
|
||||
absolutely free!"
|
||||
mappath = "_maps/templates/shelter_1.dmm"
|
||||
|
||||
/datum/map_template/shelter/alpha/New()
|
||||
. = ..()
|
||||
whitelisted_turfs = typecacheof(/turf/closed/mineral)
|
||||
Reference in New Issue
Block a user