July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(href_list["random"] && !possible_destinations)
usr.changeNext_move(CLICK_CD_RAPID) //Anti-spam
var/turf/LZ = safepick(Z_TURFS(ZLEVEL_MINING)) //Pick a random mining Z-level turf
if(!istype(LZ, /turf/closed/mineral) && !istype(LZ, /turf/open/floor/plating/asteroid))
if(!ismineralturf(LZ) && !istype(LZ, /turf/open/floor/plating/asteroid))
//Find a suitable mining turf. Reduces chance of landing in a bad area
to_chat(usr, "<span class='warning'>Landing zone scan failed. Please try again.</span>")
updateUsrDialog()
+1 -1
View File
@@ -188,7 +188,7 @@
owner.changeNext_move(CLICK_CD_RANGE)
B.RCD.afterattack(rcd_target, owner, TRUE) //Activate the RCD and force it to work remotely!
playsound(target_turf, 'sound/items/Deconstruct.ogg', 60, 1)
playsound(target_turf, 'sound/items/deconstruct.ogg', 60, 1)
/datum/action/innate/aux_base/switch_mode
name = "Switch Mode"
@@ -4,6 +4,9 @@
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
icon = 'icons/obj/mining.dmi'
icon_state = "goliath_hide"
singular_name = "hide plate"
max_amount = 6
novariants = FALSE
flags = NOBLUDGEON
w_class = WEIGHT_CLASS_NORMAL
layer = MOB_LAYER
@@ -34,7 +34,7 @@
to_chat(user, "<span class='notice'>Does <b>80</b> damage if the target is backstabbed, instead of <b>50</b>.</span>")
for(var/t in trophies)
var/obj/item/crusher_trophy/T = t
to_chat(user, "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>")
to_chat(user, "<span class='notice'>It has \a [T] attached, which cause [T.effect_desc()].</span>")
/obj/item/weapon/twohanded/required/kinetic_crusher/attackby(obj/item/A, mob/living/user)
if(istype(A, /obj/item/weapon/crowbar))
@@ -101,7 +101,7 @@
if(!QDELETED(C))
C.total_damage += 80 //cheat a little and add the total before killing it, so certain mobs don't have much lower chances of giving an item
L.apply_damage(80, BRUTE, blocked = def_check)
playsound(user, 'sound/weapons/Kenetic_accel.ogg', 100, 1) //Seriously who spelled it wrong
playsound(user, 'sound/weapons/kenetic_accel.ogg', 100, 1) //Seriously who spelled it wrong
else
if(!QDELETED(C))
C.total_damage += 50
@@ -133,9 +133,8 @@
if(isliving(target))
var/mob/living/L = target
var/had_effect = (L.has_status_effect(STATUS_EFFECT_CRUSHERMARK)) //used as a boolean
var/datum/status_effect/crusher_mark/CM = L.apply_status_effect(STATUS_EFFECT_CRUSHERMARK)
var/datum/status_effect/crusher_mark/CM = L.apply_status_effect(STATUS_EFFECT_CRUSHERMARK, hammer_synced)
if(hammer_synced)
CM.hammer_synced = hammer_synced
for(var/t in hammer_synced.trophies)
var/obj/item/crusher_trophy/T = t
T.on_mark_application(target, CM, had_effect)
@@ -199,6 +198,7 @@
bonus_value = 2
var/missing_health_ratio = 0.1
var/missing_health_desc = 10
/obj/item/crusher_trophy/goliath_tentacle/effect_desc()
return "mark detonation to do <b>[bonus_value]</b> more damage for every <b>[missing_health_desc]</b> health you are missing"
@@ -209,7 +209,7 @@
if(missing_health > 0)
target.adjustBruteLoss(missing_health) //and do that much damage
/watcher
//watcher
/obj/item/crusher_trophy/watcher_wing
name = "watcher wing"
desc = "A wing ripped from a watcher. Suitable as a trophy for a kinetic crusher."
@@ -250,6 +250,18 @@
if(.)
H.charge_time += bonus_value
//blood-drunk hunter
/obj/item/crusher_trophy/miner_eye
name = "eye of a blood-drunk hunter"
desc = "Its pupil is collapsed and turned to mush. Suitable as a trophy for a kinetic crusher."
icon_state = "hunter_eye"
denied_type = /obj/item/crusher_trophy/miner_eye
/obj/item/crusher_trophy/miner_eye/effect_desc()
return "mark detonation to grant stun immunity and <b>90%</b> damage reduction for <b>1</b> second"
/obj/item/crusher_trophy/miner_eye/on_mark_detonation(mob/living/target, mob/living/user)
user.apply_status_effect(STATUS_EFFECT_BLOODDRUNK)
//ash drake
/obj/item/crusher_trophy/tail_spike
@@ -264,7 +276,7 @@
for(var/mob/living/L in oview(2, user))
if(L.stat == DEAD)
continue
playsound(L, 'sound/magic/Fireball.ogg', 20, 1)
playsound(L, 'sound/magic/fireball.ogg', 20, 1)
new /obj/effect/temp_visual/fire(L.loc)
addtimer(CALLBACK(src, .proc/pushback, L, user), 1) //no free backstabs, we push AFTER module stuff is done
L.adjustBruteLoss(bonus_value)
@@ -310,7 +322,7 @@
//colossus
/obj/item/crusher_trophy/blaster_tubes
name = "blaster tubes"
desc = "The blaster tubes from a colossus's arm. Suitable as a trophy for a kinetic crusher."
desc = "The blaster tubes from a colossus's arm. Suitable as a trophy for a kinetic crusher."
icon_state = "blaster_tubes"
gender = PLURAL
denied_type = /obj/item/crusher_trophy/blaster_tubes
@@ -18,7 +18,7 @@
if(!loaded)
return
if(isliving(target) && proximity_flag)
if(istype(target, /mob/living/simple_animal))
if(isanimal(target))
var/mob/living/simple_animal/M = target
if(M.sentience_type != revive_type)
to_chat(user, "<span class='info'>[src] does not work on this sort of creature.</span>")
@@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
M.update_icon()
transfer_fingerprints_to(M)
if(user.put_in_hands(M, TRUE)) //delete the beacon if it fails
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
qdel(src) //otherwise delete us
/obj/structure/marker_beacon/attackby(obj/item/I, mob/user, params)
@@ -123,7 +123,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
to_chat(user, "<span class='notice'>You start picking [src] up...</span>")
if(do_after(user, remove_speed, target = src) && M.amount + 1 <= M.max_amount)
M.add(1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
qdel(src)
else
return ..()
+2 -6
View File
@@ -4,7 +4,7 @@
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's more effective in a vacuum."
desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It does increased damage in low pressure."
w_class = WEIGHT_CLASS_NORMAL
force = 15
throwforce = 10
@@ -82,12 +82,8 @@
/obj/effect/temp_visual/resonance/proc/check_pressure(turf/proj_turf)
if(!proj_turf)
proj_turf = get_turf(src)
if(!istype(proj_turf))
return
var/datum/gas_mixture/environment = proj_turf.return_air()
var/pressure = environment.return_pressure()
resonance_damage = initial(resonance_damage)
if(pressure < 50)
if(lavaland_equipment_pressure_check(proj_turf))
name = "strong [initial(name)]"
resonance_damage *= 3
else
@@ -208,9 +208,7 @@
..(mapload, TRUE)
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
if(istype(O, /obj/item))
return 1
return 0
return isitem(O)
/obj/machinery/smartfridge/survival_pod/Initialize(mapload, empty)
. = ..()
@@ -53,8 +53,7 @@
to_chat(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
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new (get_turf(src), src, 100, null, FALSE, get_turf(chosen_beacon))
try_move_adjacent(J)
playsound(src,'sound/effects/sparks4.ogg',50,1)
qdel(src)
@@ -97,13 +96,13 @@
if(!(istype(M, /obj/mecha) && mech_sized))
return
if(istype(M, /atom/movable))
if(do_teleport(M, target, 6))
if(ismovableatom(M))
if(do_teleport(M, hard_target, 6))
// KERPLUNK
playsound(M,'sound/weapons/resonator_blast.ogg',50,1)
if(iscarbon(M))
var/mob/living/carbon/L = M
L.Weaken(3)
L.Knockdown(60)
if(ishuman(L))
shake_camera(L, 20, 1)
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)
+3 -3
View File
@@ -74,7 +74,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/mutable_appearance/balloon3
if(isliving(A))
var/mob/living/M = A
M.Weaken(16) // Keep them from moving during the duration of the extraction
M.Knockdown(320) // Keep them from moving during the duration of the extraction
M.buckled = 0 // Unbuckle them to prevent anchoring problems
else
A.anchored = 1
@@ -107,9 +107,9 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
animate(holder_obj, pixel_z = 1000, time = 30)
if(ishuman(A))
var/mob/living/carbon/human/L = A
L.SetParalysis(0)
L.SetUnconscious(0)
L.drowsyness = 0
L.sleeping = 0
L.SetSleeping(0)
sleep(30)
var/list/flooring_near_beacon = list()
for(var/turf/open/floor in orange(1, beacon))
+19 -16
View File
@@ -8,7 +8,7 @@
var/harvested_name = "shortened mushrooms"
var/harvested_desc = "Some quickly regrowing mushrooms, formerly known to be quite large."
var/needs_sharp_harvest = TRUE
var/harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings
var/harvest = /obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/shavings
var/harvest_amount_low = 1
var/harvest_amount_high = 3
var/harvest_time = 60
@@ -80,7 +80,7 @@
desc = "A number of mushrooms, each of which surrounds a greenish sporangium with a number of leaf-like structures."
harvested_name = "leafless mushrooms"
harvested_desc = "A bunch of formerly-leafed mushrooms, with their sporangiums exposed. Scandalous?"
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_leaf
harvest = /obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_leaf
needs_sharp_harvest = FALSE
harvest_amount_high = 4
harvest_time = 20
@@ -96,7 +96,7 @@
desc = "Several mushrooms, the larger of which have a ring of conks at the midpoint of their stems."
harvested_name = "small mushrooms"
harvested_desc = "Several small mushrooms near the stumps of what likely were larger mushrooms."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_cap
harvest = /obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_cap
harvest_amount_high = 4
harvest_time = 50
harvest_message_low = "You slice the cap off a mushroom."
@@ -112,7 +112,7 @@
luminosity = 1
harvested_name = "tiny mushrooms"
harvested_desc = "A few tiny mushrooms around larger stumps. You can already see them growing back."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_stem
harvest = /obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_stem
harvest_amount_high = 4
harvest_time = 40
harvest_message_low = "You pick and slice the cap off a mushroom, leaving the stem."
@@ -127,7 +127,7 @@
desc = "Several prickly cacti, brimming with ripe fruit and covered in a thin layer of ash."
harvested_name = "cacti"
harvested_desc = "A bunch of prickly cacti. You can see fruits slowly growing beneath the covering of ash."
harvest = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/cactus_fruit
harvest = /obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/cactus_fruit
needs_sharp_harvest = FALSE
harvest_amount_high = 2
harvest_time = 10
@@ -146,11 +146,11 @@
if(!istype(O) || (PIERCEIMMUNE in H.dna.species.species_traits))
return
H.apply_damage(rand(3, 6), BRUTE, picked_def_zone)
H.Weaken(2)
H.Knockdown(40)
H.visible_message("<span class='danger'>[H] steps on a cactus!</span>", \
"<span class='userdanger'>You step on a cactus!</span>")
/obj/item/weapon/reagent_containers/food/snacks/ash_flora
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora
name = "mushroom shavings"
desc = "Some shavings from a tall mushroom. With enough, might serve as a bowl."
icon = 'icons/obj/lavaland/ash_flora.dmi'
@@ -160,43 +160,46 @@
resistance_flags = FLAMMABLE
obj_integrity = 100
max_integrity = 100
seed = /obj/item/seeds/lavaland/polypore
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/New()
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/New()
..()
pixel_x = rand(-4, 4)
pixel_y = rand(-4, 4)
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings //for actual crafting
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/shavings //for actual crafting
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_leaf
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_leaf
name = "mushroom leaf"
desc = "A leaf, from a mushroom."
list_reagents = list("nutriment" = 3, "vitfro" = 2, "nicotine" = 2)
icon_state = "mushroom_leaf"
seed = /obj/item/seeds/lavaland/porcini
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_cap
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_cap
name = "mushroom cap"
desc = "The cap of a large mushroom."
list_reagents = list("mindbreaker" = 2, "entpoly" = 4, "mushroomhallucinogen" = 2)
icon_state = "mushroom_cap"
seed = /obj/item/seeds/lavaland/inocybe
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/mushroom_stem
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/mushroom_stem
name = "mushroom stem"
desc = "A long mushroom stem. It's slightly glowing."
list_reagents = list("tinlux" = 2, "vitamin" = 1, "space_drugs" = 1)
icon_state = "mushroom_stem"
luminosity = 1
seed = /obj/item/seeds/lavaland/ember
/obj/item/weapon/reagent_containers/food/snacks/ash_flora/cactus_fruit
/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/cactus_fruit
name = "cactus fruit"
list_reagents = list("vitamin" = 2, "nutriment" = 2, "vitfro" = 4)
desc = "A cactus fruit covered in a thick, reddish skin. And some ash."
icon_state = "cactus_fruit"
seed = /obj/item/seeds/lavaland/cactus
/obj/item/mushroom_bowl
@@ -213,6 +216,6 @@
/datum/crafting_recipe/mushroom_bowl
name = "Mushroom Bowl"
result = /obj/item/weapon/reagent_containers/food/drinks/mushroom_bowl
reqs = list(/obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings = 5)
reqs = list(/obj/item/weapon/reagent_containers/food/snacks/grown/ash_flora/shavings = 5)
time = 30
category = CAT_PRIMAL
+169 -17
View File
@@ -28,7 +28,7 @@
if(7)
new /obj/item/weapon/pickaxe/diamond(src)
if(8)
new /obj/item/borg/upgrade/modkit/resonator_blasts(src)
new /obj/item/weapon/disk/design_disk/modkit_disc/resonator_blast(src)
if(9)
new /obj/item/organ/brain/alien(src)
if(10)
@@ -38,7 +38,7 @@
if(12)
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker(src)
if(13)
new /obj/item/borg/upgrade/modkit/cooldown/repeater(src)
new /obj/item/weapon/disk/design_disk/modkit_disc/rapid_repeater(src)
if(14)
new /obj/item/weapon/nullrod/scythe/talking(src)
if(15)
@@ -46,7 +46,7 @@
if(16)
new /obj/item/weapon/guardiancreator(src)
if(17)
new /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs(src)
new /obj/item/weapon/disk/design_disk/modkit_disc/mob_and_turf_aoe(src)
if(18)
new /obj/item/device/warp_cube/red(src)
if(19)
@@ -70,12 +70,70 @@
new /obj/item/borg/upgrade/modkit/lifesteal(src)
new /obj/item/weapon/bedsheet/cult(src)
if(28)
new /obj/item/borg/upgrade/modkit/bounty(src)
new /obj/item/weapon/disk/design_disk/modkit_disc/bounty(src)
//KA modkit design discs
/obj/item/weapon/disk/design_disk/modkit_disc
name = "KA Mod Disk"
desc = "A design disc containing the design for a unique kinetic accelerator modkit."
icon_state = "datadisk1"
var/modkit_design = /datum/design/unique_modkit
/obj/item/weapon/disk/design_disk/modkit_disc/Initialize()
. = ..()
blueprints[1] = new modkit_design
/obj/item/weapon/disk/design_disk/modkit_disc/mob_and_turf_aoe
name = "Offensive Mining Explosion Mod Disk"
modkit_design = /datum/design/unique_modkit/offensive_turf_aoe
/obj/item/weapon/disk/design_disk/modkit_disc/rapid_repeater
name = "Rapid Repeater Mod Disk"
modkit_design = /datum/design/unique_modkit/rapid_repeater
/obj/item/weapon/disk/design_disk/modkit_disc/resonator_blast
name = "Resonator Blast Mod Disk"
modkit_design = /datum/design/unique_modkit/resonator_blast
/obj/item/weapon/disk/design_disk/modkit_disc/bounty
name = "Death Syphon Mod Disk"
modkit_design = /datum/design/unique_modkit/bounty
/datum/design/unique_modkit
category = list("Mining Designs", "Cyborg Upgrade Modules")
req_tech = list("materials" = 12) //can't be normally obtained
build_type = PROTOLATHE | MECHFAB
/datum/design/unique_modkit/offensive_turf_aoe
name = "Kinetic Accelerator Offensive Mining Explosion Mod"
desc = "A device which causes kinetic accelerators to fire AoE blasts that destroy rock and damage creatures."
id = "hyperaoemod"
materials = list(MAT_METAL = 7000, MAT_GLASS = 3000, MAT_SILVER = 3000, MAT_GOLD = 3000, MAT_DIAMOND = 4000)
build_path = /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
/datum/design/unique_modkit/rapid_repeater
name = "Kinetic Accelerator Rapid Repeater Mod"
desc = "A device which greatly reduces a kinetic accelerator's cooldown on striking a living target or rock, but greatly increases its base cooldown."
id = "repeatermod"
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 8000, MAT_BLUESPACE = 2000)
build_path = /obj/item/borg/upgrade/modkit/cooldown/repeater
/datum/design/unique_modkit/resonator_blast
name = "Kinetic Accelerator Resonator Blast Mod"
desc = "A device which causes kinetic accelerators to fire shots that leave and detonate resonator blasts."
id = "resonatormod"
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_SILVER = 5000, MAT_URANIUM = 5000)
build_path = /obj/item/borg/upgrade/modkit/resonator_blasts
/datum/design/unique_modkit/bounty
name = "Kinetic Accelerator Death Syphon Mod"
desc = "A device which causes kinetic accelerators to permenantly gain damage against creature types killed with it."
id = "bountymod"
materials = list(MAT_METAL = 4000, MAT_SILVER = 4000, MAT_GOLD = 4000, MAT_BLUESPACE = 4000)
reagents_list = list("blood" = 40)
build_path = /obj/item/borg/upgrade/modkit/bounty
//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."
@@ -189,7 +247,7 @@
armour_penetration = 100
damage_type = BRUTE
hitsound = 'sound/effects/splat.ogg'
weaken = 3
knockdown = 30
var/chain
/obj/item/projectile/hook/fire(setAngle)
@@ -200,7 +258,7 @@
/obj/item/projectile/hook/on_hit(atom/target)
. = ..()
if(istype(target, /atom/movable))
if(ismovableatom(target))
var/atom/movable/A = target
if(A.anchored)
return
@@ -415,7 +473,7 @@
/obj/item/ship_in_a_bottle/attack_self(mob/user)
to_chat(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)
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
new /obj/vehicle/lavaboat/dragon(get_turf(src))
qdel(src)
@@ -470,8 +528,99 @@
///Bosses
//Miniboss Miner
/obj/item/weapon/melee/transforming/cleaving_saw
name = "cleaving saw"
desc = "This saw, effective at drawing the blood of beasts, transforms into a long cleaver that makes use of centrifugal force."
force = 12
force_on = 20 //force when active
throwforce = 20
throwforce_on = 20
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
icon_state = "cleaving_saw"
icon_state_on = "cleaving_saw_open"
slot_flags = SLOT_BELT
attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut")
attack_verb_on = list("cleaved", "swiped", "slashed", "chopped")
hitsound = 'sound/weapons/bladeslice.ogg'
hitsound_on = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_BULKY
sharpness = IS_SHARP
var/transform_cooldown
var/swiping = FALSE
var/beast_force_bonus = 30
/obj/item/weapon/melee/transforming/cleaving_saw/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It is [active ? "open, and will cleave enemies in a wide arc":"closed, and can be used for rapid consecutive attacks that cause beastly enemies to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>")
/obj/item/weapon/melee/transforming/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
transform_cooldown = 0
transform_weapon(user, TRUE)
return BRUTELOSS
/obj/item/weapon/melee/transforming/cleaving_saw/transform_weapon(mob/living/user, supress_message_text)
if(transform_cooldown > world.time)
return FALSE
. = ..()
if(.)
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.changeNext_move(CLICK_CD_MELEE * 0.25)
/obj/item/weapon/melee/transforming/cleaving_saw/transform_messages(mob/living/user, supress_message_text)
if(!supress_message_text)
if(active)
to_chat(user, "<span class='notice'>You open [src]. It will now cleave enemies in a wide arc.</span>")
else
to_chat(user, "<span class='notice'>You close [src]. It will now attack rapidly and cause beastly enemies to bleed.</span>")
playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
/obj/item/weapon/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_bodypart_damage(10)
/obj/item/weapon/melee/transforming/cleaving_saw/melee_attack_chain(mob/user, atom/target, params)
..()
if(!active)
user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
/obj/item/weapon/melee/transforming/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user)
if(!active || swiping || !target.density || get_turf(target) == get_turf(user))
var/beast_bonus_active = FALSE
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(istype(target, /mob/living/simple_animal/hostile/asteroid) || ismegafauna(target))
if(!active)
if(!B)
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
else
force += beast_force_bonus //we do bonus damage against beastly creatures
beast_bonus_active = TRUE
..()
if(beast_bonus_active)
if(B)
B.add_bleed(B.bleed_buildup)
force -= beast_force_bonus
return
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(target))
swiping = TRUE
for(var/i in 1 to 3)
var/turf/T = get_step(user_turf, turn(dir_to_target, 90 - (45 * i)))
for(var/mob/living/L in T)
if(user.Adjacent(L) && L.density)
melee_attack_chain(user, L)
swiping = FALSE
//Dragon
@@ -582,7 +731,7 @@
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)
/obj/item/weapon/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
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>")
@@ -695,7 +844,7 @@
message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)]. [ADMIN_COORDJMP(T)]")
log_game("[key_name(user)] fired the lava staff at [get_area(target)] [COORD(T)].")
timer = world.time + create_cooldown
playsound(T,'sound/magic/Fireball.ogg', 200, 1)
playsound(T,'sound/magic/fireball.ogg', 200, 1)
else
timer = world.time
qdel(L)
@@ -704,7 +853,7 @@
if(T.TerraformTurf(reset_turf_type))
user.visible_message("<span class='danger'>[user] turns \the [old_name] into [reset_string]!</span>")
timer = world.time + reset_cooldown
playsound(T,'sound/magic/Fireball.ogg', 200, 1)
playsound(T,'sound/magic/fireball.ogg', 200, 1)
/obj/effect/temp_visual/lavastaff
icon_state = "lavastaff_warn"
@@ -742,7 +891,7 @@
var/obj/effect/mine/pickup/bloodbath/B = new(H)
INVOKE_ASYNC(B, /obj/effect/mine/pickup/bloodbath/.proc/mineEffect, H)
to_chat(user, "<span class='notice'>You shatter the bottle!</span>")
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
qdel(src)
/obj/item/blood_contract
@@ -910,7 +1059,7 @@
INVOKE_ASYNC(src, .proc/prepare_icon_update)
if(do_after(user, 50, target = user) && !beacon)
var/turf/T = get_turf(user)
playsound(T,'sound/magic/Blind.ogg', 200, 1, -4)
playsound(T,'sound/magic/blind.ogg', 200, 1, -4)
new /obj/effect/temp_visual/hierophant/telegraph/teleport(T, user)
beacon = new/obj/effect/hierophant(T)
user.update_action_buttons_icon()
@@ -953,8 +1102,8 @@
return
new /obj/effect/temp_visual/hierophant/telegraph(T, user)
new /obj/effect/temp_visual/hierophant/telegraph(source, user)
playsound(T,'sound/magic/Wand_Teleport.ogg', 200, 1)
playsound(source,'sound/machines/AirlockOpen.ogg', 200, 1)
playsound(T,'sound/magic/wand_teleport.ogg', 200, 1)
playsound(source,'sound/machines/airlockopen.ogg', 200, 1)
if(!do_after(user, 3, target = user) || !user || !beacon || QDELETED(beacon)) //no walking away shitlord
teleporting = FALSE
if(user)
@@ -1040,7 +1189,9 @@
for(var/i in 1 to range)
if(!J)
return
new /obj/effect/temp_visual/hierophant/blast(J, user, friendly_fire_check)
var/obj/effect/temp_visual/hierophant/blast/B = new(J, user, friendly_fire_check)
B.damage = 30
B.monster_damage_boost = FALSE
previousturf = J
J = get_step(previousturf, dir)
@@ -1051,4 +1202,5 @@
playsound(T,'sound/effects/bin_close.ogg', 200, 1)
sleep(2)
for(var/t in RANGE_TURFS(1, T))
new /obj/effect/temp_visual/hierophant/blast(t, user, friendly_fire_check)
var/obj/effect/temp_visual/hierophant/blast/B = new(t, user, friendly_fire_check)
B.damage = 15 //keeps monster damage boost due to lower damage
+4 -4
View File
@@ -20,7 +20,7 @@
density = 1
anchored = 1
/obj/structure/stacklifter/attack_hand(mob/user as mob)
/obj/structure/stacklifter/attack_hand(mob/living/user)
if(in_use)
to_chat(user, "It's already in use - wait a bit.")
return
@@ -28,7 +28,7 @@
in_use = 1
icon_state = "fitnesslifter2"
user.setDir(SOUTH)
user.Stun(4)
user.Stun(80)
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>")
@@ -58,7 +58,7 @@
density = 1
anchored = 1
/obj/structure/weightlifter/attack_hand(mob/user as mob)
/obj/structure/weightlifter/attack_hand(mob/living/user)
if(in_use)
to_chat(user, "It's already in use - wait a bit.")
return
@@ -66,7 +66,7 @@
in_use = 1
icon_state = "fitnessweight-c"
user.setDir(SOUTH)
user.Stun(4)
user.Stun(80)
user.loc = src.loc
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
add_overlay(swole_overlay)
@@ -1,31 +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)
/**********************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.forceMove(loc)
var/turf/T = get_step(src,output_dir)
if(T)
var/turf/T = get_step(src,output_dir)
if(T)
S.forceMove(T)
+61 -61
View File
@@ -1,17 +1,17 @@
#define SMELT_AMOUNT 10
/**********************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
/**********************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/Initialize()
. = ..()
machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
@@ -19,22 +19,22 @@
machine.CONSOLE = src
else
qdel(src)
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
if(!machine)
return
var/dat = machine.get_machine_data()
var/datum/browser/popup = new(user, "processing", "Smelting Console", 300, 500)
popup.set_content(dat)
popup.open()
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["material"])
@@ -45,33 +45,33 @@
machine.selected_material = null
machine.selected_alloy = href_list["alloy"]
if(href_list["set_on"])
if(href_list["set_on"])
machine.on = (href_list["set_on"] == "on")
updateUsrDialog()
return
return
/obj/machinery/mineral/processing_unit_console/Destroy()
machine = null
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
/**********************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/datum/material_container/materials
var/on = FALSE
var/selected_material = MAT_METAL
var/selected_alloy = null
var/datum/research/files
/obj/machinery/mineral/processing_unit/Initialize()
. = ..()
proximity_monitor = new(src, 1)
@@ -131,7 +131,7 @@
return dat
/obj/machinery/mineral/processing_unit/process()
/obj/machinery/mineral/processing_unit/process()
if (on)
if(selected_material)
smelt_ore()
@@ -144,26 +144,26 @@
CONSOLE.updateUsrDialog()
//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
//Even in the dark year of 2016, where /tg/ is dead, Urist still hasn't finished this -Bawhoppennn
/*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*/
//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
//Even in the dark year of 2016, where /tg/ is dead, Urist still hasn't finished this -Bawhoppennn
/*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*/
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
var/datum/material/mat = materials.materials[selected_material]
if(mat)
@@ -208,10 +208,10 @@
build_amount = min(build_amount, round(smelter_mat.amount / M))
return build_amount
/obj/machinery/mineral/processing_unit/proc/generate_mineral(P)
var/O = new P(src)
unload_mineral(O)
/obj/machinery/mineral/processing_unit/proc/generate_mineral(P)
var/O = new P(src)
unload_mineral(O)
/obj/machinery/mineral/processing_unit/on_deconstruction()
materials.retrieve_all()
+77 -77
View File
@@ -1,15 +1,15 @@
/**********************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
/**********************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/Initialize()
. = ..()
machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
@@ -17,58 +17,58 @@
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_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/Initialize()
. = ..()
@@ -77,17 +77,17 @@
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
/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)
/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
-3
View File
@@ -55,9 +55,6 @@
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),
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
new /datum/data/mining_equipment("Stimpack", /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack, 150),
new /datum/data/mining_equipment("Stimpack Value Pack", /obj/item/weapon/storage/box/medipens/utility, 500),
new /datum/data/mining_equipment("Survival Pen Kit", /obj/item/weapon/storage/box/medipens/surival_box, 3000),
)
/datum/data/mining_equipment
+2 -2
View File
@@ -8,7 +8,7 @@
icon = 'icons/mob/aibots.dmi'
icon_state = "mining_drone"
icon_living = "mining_drone"
status_flags = CANSTUN|CANWEAKEN|CANPUSH
status_flags = CANSTUN|CANKNOCKDOWN|CANPUSH
mouse_opacity = 1
faction = list("neutral")
a_intent = INTENT_HARM
@@ -34,7 +34,7 @@
ranged_message = "shoots"
ranged_cooldown_time = 30
projectiletype = /obj/item/projectile/kinetic
projectilesound = 'sound/weapons/Gunshot4.ogg'
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,
+408 -408
View File
@@ -3,270 +3,270 @@
#define GIBTONITE_QUALITY_MEDIUM 2
#define GIBTONITE_QUALITY_LOW 1
/**********************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())
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
..()
/obj/item/weapon/ore/Crossed(atom/movable/AM)
var/obj/item/weapon/storage/bag/ore/OB
if(istype(loc, /turf/open/floor/plating/asteroid))
var/turf/open/floor/plating/asteroid/F = loc
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
for(var/thing in H.get_storage_slots())
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
for(var/thing in H.held_items)
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
/**********************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())
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
..()
/obj/item/weapon/ore/Crossed(atom/movable/AM)
var/obj/item/weapon/storage/bag/ore/OB
if(istype(loc, /turf/open/floor/plating/asteroid))
var/turf/open/floor/plating/asteroid/F = loc
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
for(var/thing in H.get_storage_slots())
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
for(var/thing in H.held_items)
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
else if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
for(var/thing in R.module_active)
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
if(OB)
F.attackby(OB, AM)
// Then, if the user is dragging an ore box, empty the satchel
// into the box.
var/mob/living/L = AM
if(istype(L.pulling, /obj/structure/ore_box))
var/obj/structure/ore_box/box = L.pulling
box.attackby(OB, AM)
return ..()
/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 = WEIGHT_CLASS_TINY
/obj/item/weapon/ore/glass/attack_self(mob/living/user)
to_chat(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
to_chat(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)
to_chat(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/titanium
name = "titanium ore"
icon_state = "Titanium ore"
origin_tech = "materials=4"
points = 50
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
/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 = WEIGHT_CLASS_BULKY
throw_range = 0
var/mob/living/silicon/robot/R = AM
for(var/thing in R.module_active)
if(istype(thing, /obj/item/weapon/storage/bag/ore))
OB = thing
break
if(OB)
F.attackby(OB, AM)
// Then, if the user is dragging an ore box, empty the satchel
// into the box.
var/mob/living/L = AM
if(istype(L.pulling, /obj/structure/ore_box))
var/obj/structure/ore_box/box = L.pulling
box.attackby(OB, AM)
return ..()
/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 = WEIGHT_CLASS_TINY
/obj/item/weapon/ore/glass/attack_self(mob/living/user)
to_chat(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
to_chat(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)
to_chat(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/titanium
name = "titanium ore"
icon_state = "Titanium ore"
origin_tech = "materials=4"
points = 50
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
/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 = WEIGHT_CLASS_BULKY
throw_range = 0
var/primed = FALSE
var/det_time = 100
var/det_time = 100
var/quality = GIBTONITE_QUALITY_LOW //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"
var/attacher = "UNKNOWN"
var/det_timer
/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))
/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 = FALSE
if(det_timer)
deltimer(det_timer)
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"
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 = GIBTONITE_QUALITY_LOW
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)
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)
primed = TRUE
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,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)
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,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 [ADMIN_COORDJMP(bombturf)].")
else if(triggered_by == 2)
else if(triggered_by == 2)
message_admins("A signal has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)]. Igniter attacher: [ADMIN_LOOKUPFLW(attacher)]")
else
else
message_admins("[ADMIN_LOOKUPFLW(attacher)] has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)].")
if(triggered_by == 1)
if(triggered_by == 1)
log_game("An explosion has primed a [name] for detonation at [A][COORD(bombturf)]")
else if(triggered_by == 2)
else if(triggered_by == 2)
log_game("A signal has primed a [name] for detonation at [A][COORD(bombturf)]. 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>")
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][COORD(bombturf)]")
det_timer = addtimer(CALLBACK(src, .proc/detonate, notify_admins), det_time, TIMER_STOPPABLE)
@@ -280,162 +280,162 @@
if(GIBTONITE_QUALITY_LOW)
explosion(src,0,1,3,adminlog = notify_admins)
qdel(src)
/obj/item/weapon/ore/Initialize()
..()
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 = WEIGHT_CLASS_TINY
var/string_attached
var/list/sideslist = list("heads","tails")
var/cmineral = null
var/cooldown = 0
var/value = 1
/obj/item/weapon/coin/Initialize()
..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/weapon/coin/examine(mob/user)
..()
if(value)
to_chat(user, "<span class='info'>It's worth [value] credit\s.</span>")
/obj/item/weapon/coin/gold
name = "gold coin"
cmineral = "gold"
icon_state = "coin_gold_heads"
value = 50
materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/silver
name = "silver coin"
cmineral = "silver"
icon_state = "coin_silver_heads"
value = 20
materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/diamond
name = "diamond coin"
cmineral = "diamond"
icon_state = "coin_diamond_heads"
value = 500
materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/iron
name = "iron coin"
cmineral = "iron"
icon_state = "coin_iron_heads"
value = 1
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/plasma
name = "plasma coin"
cmineral = "plasma"
icon_state = "coin_plasma_heads"
value = 100
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/uranium
name = "uranium coin"
cmineral = "uranium"
icon_state = "coin_uranium_heads"
value = 80
materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/clown
name = "bananium coin"
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
name = "adamantine coin"
cmineral = "adamantine"
icon_state = "coin_adamantine_heads"
value = 1500
/obj/item/weapon/coin/mythril
name = "mythril coin"
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/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)
to_chat(user, "<span class='warning'>There already is a string attached to this coin!</span>")
return
if (CC.use(1))
/obj/item/weapon/ore/Initialize()
..()
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 = WEIGHT_CLASS_TINY
var/string_attached
var/list/sideslist = list("heads","tails")
var/cmineral = null
var/cooldown = 0
var/value = 1
/obj/item/weapon/coin/Initialize()
..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/weapon/coin/examine(mob/user)
..()
if(value)
to_chat(user, "<span class='info'>It's worth [value] credit\s.</span>")
/obj/item/weapon/coin/gold
name = "gold coin"
cmineral = "gold"
icon_state = "coin_gold_heads"
value = 50
materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/silver
name = "silver coin"
cmineral = "silver"
icon_state = "coin_silver_heads"
value = 20
materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/diamond
name = "diamond coin"
cmineral = "diamond"
icon_state = "coin_diamond_heads"
value = 500
materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/iron
name = "iron coin"
cmineral = "iron"
icon_state = "coin_iron_heads"
value = 1
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/plasma
name = "plasma coin"
cmineral = "plasma"
icon_state = "coin_plasma_heads"
value = 100
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/uranium
name = "uranium coin"
cmineral = "uranium"
icon_state = "coin_uranium_heads"
value = 80
materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
/obj/item/weapon/coin/clown
name = "bananium coin"
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
name = "adamantine coin"
cmineral = "adamantine"
icon_state = "coin_adamantine_heads"
value = 1500
/obj/item/weapon/coin/mythril
name = "mythril coin"
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/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)
to_chat(user, "<span class='warning'>There already is a string attached to this coin!</span>")
return
if (CC.use(1))
add_overlay("coin_string_overlay")
string_attached = 1
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
else
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin!</span>")
return
else if(istype(W,/obj/item/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
to_chat(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)
if(string_attached) //does the coin have a wire attached
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
return //do not flip the coin
var/coinflip = pick(sideslist)
cooldown = world.time + 15
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>")
string_attached = 1
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
else
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin!</span>")
return
else if(istype(W,/obj/item/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
to_chat(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)
if(string_attached) //does the coin have a wire attached
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
return //do not flip the coin
var/coinflip = pick(sideslist)
cooldown = world.time + 15
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>")
+73 -73
View File
@@ -1,78 +1,78 @@
/**********************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.forceMove(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
to_chat(user, "<span class='notice'>You empty the ore in [S] into \the [src].</span>")
else if(istype(W, /obj/item/weapon/crowbar))
playsound(loc, W.usesound, 50, 1)
var/obj/item/weapon/crowbar/C = W
if(do_after(user, 50*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>")
deconstruct(TRUE, user)
else
return ..()
/**********************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.forceMove(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
to_chat(user, "<span class='notice'>You empty the ore in [S] into \the [src].</span>")
else if(istype(W, /obj/item/weapon/crowbar))
playsound(loc, W.usesound, 50, 1)
var/obj/item/weapon/crowbar/C = W
if(do_after(user, 50*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>")
deconstruct(TRUE, user)
else
return ..()
/obj/structure/ore_box/examine(mob/living/user)
if(Adjacent(user) && istype(user))
show_contents(user)
. = ..()
/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/dat = text("<b>The contents of the ore box reveal...</b><br>")
var/list/oretypes = list()
for(var/obj/item/weapon/ore/O in contents)
oretypes |= O.type
for(var/i in oretypes)
var/obj/item/weapon/ore/T = locate(i) in contents
dat += "[capitalize(T.name)]: [count_by_type(contents, T.type)]<br>"
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse(dat, "window=orebox")
/obj/structure/ore_box/proc/dump_box_contents()
for(var/obj/item/weapon/ore/O in contents)
O.forceMove(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_box_contents()
to_chat(usr, "<span class='notice'>You empty the box.</span>")
updateUsrDialog()
/obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user)
var/obj/item/stack/sheet/mineral/wood/WD = new (loc, 4)
if(user)
WD.add_fingerprint(user)
dump_box_contents()
qdel(src)
/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/dat = text("<b>The contents of the ore box reveal...</b><br>")
var/list/oretypes = list()
for(var/obj/item/weapon/ore/O in contents)
oretypes |= O.type
for(var/i in oretypes)
var/obj/item/weapon/ore/T = locate(i) in contents
dat += "[capitalize(T.name)]: [count_by_type(contents, T.type)]<br>"
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse(dat, "window=orebox")
/obj/structure/ore_box/proc/dump_box_contents()
for(var/obj/item/weapon/ore/O in contents)
O.forceMove(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_box_contents()
to_chat(usr, "<span class='notice'>You empty the box.</span>")
updateUsrDialog()
/obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user)
var/obj/item/stack/sheet/mineral/wood/WD = new (loc, 4)
if(user)
WD.add_fingerprint(user)
dump_box_contents()
qdel(src)