mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 12:36:22 +01:00
Merge pull request #8946 from Zuhayr/miningstuff
Wall refactor/mining changes.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100)
|
||||
throwforce = 2
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "igniter"
|
||||
desc = "A small electronic device able to ignite combustable substances."
|
||||
icon_state = "igniter"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
secured = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared"
|
||||
matter = list("metal" = 1000, "glass" = 500, "waste" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "waste" = 100)
|
||||
origin_tech = "magnets=2"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
matter = list("metal" = 100, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 10)
|
||||
origin_tech = "combat=1"
|
||||
var/armed = 0
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "proximity sensor"
|
||||
desc = "Used for scanning and alerting when someone enters a certain proximity."
|
||||
icon_state = "prox"
|
||||
matter = list("metal" = 800, "glass" = 200, "waste" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Used to remotely activate devices."
|
||||
icon_state = "signaller"
|
||||
item_state = "signaler"
|
||||
matter = list("metal" = 1000, "glass" = 200, "waste" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 200, "waste" = 100)
|
||||
origin_tech = "magnets=1"
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "timer"
|
||||
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
|
||||
icon_state = "timer"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
wires = WIRE_PULSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "voice analyzer"
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 50, "waste" = 10)
|
||||
origin_tech = "magnets=1"
|
||||
var/listening = 0
|
||||
var/recorded //the activation message
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
icon_state = "welding"
|
||||
flags = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
item_state = "welding"
|
||||
matter = list("metal" = 3000, "glass" = 1000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000)
|
||||
var/up = 0
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
desc = "It looks pretty sciency."
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
icon_state = "module"
|
||||
matter = list("metal" = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
|
||||
var/damage = 0
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
//Hatchets and things to kill kudzu
|
||||
@@ -232,7 +232,7 @@
|
||||
throw_range = 4
|
||||
sharp = 1
|
||||
edge = 1
|
||||
matter = list("metal" = 15000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
@@ -277,4 +277,4 @@
|
||||
for(var/obj/effect/plant/B in orange(A,1))
|
||||
if(prob(80))
|
||||
B.die_off(1)
|
||||
qdel(A)
|
||||
qdel(A)
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
var/list/name_to_material
|
||||
|
||||
/proc/populate_material_list()
|
||||
name_to_material = list()
|
||||
for(var/type in typesof(/material) - /material)
|
||||
var/material/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_material[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
/*
|
||||
Valid sprite masks:
|
||||
stone
|
||||
metal
|
||||
solid
|
||||
cult
|
||||
*/
|
||||
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name
|
||||
var/icon_base = "metal"
|
||||
var/icon_colour
|
||||
var/icon_reinf = "reinf_metal"
|
||||
var/stack_type
|
||||
var/unmeltable
|
||||
var/cut_delay = 0
|
||||
var/radioactivity
|
||||
var/ignition_point
|
||||
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
|
||||
var/integrity = 150 // Damage before wall falls apart, essentially.
|
||||
var/hardness = 60 // Used to determine if a hulk can punch through this wall.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
var/opacity = 1
|
||||
var/explosion_resistance = 5
|
||||
|
||||
/material/New()
|
||||
..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/material/proc/place_dismantled_girder(var/turf/target, var/material/reinf_material)
|
||||
var/obj/structure/girder/G = new(target)
|
||||
if(reinf_material)
|
||||
G.reinf_material = reinf_material
|
||||
G.reinforce_girder()
|
||||
|
||||
/material/proc/place_dismantled_product(var/turf/target,var/is_devastated)
|
||||
for(var/x=1;x<(is_devastated?2:3);x++)
|
||||
place_sheet(target)
|
||||
|
||||
/material/proc/place_sheet(var/turf/target)
|
||||
if(stack_type)
|
||||
new stack_type(target)
|
||||
|
||||
/material/uranium
|
||||
name = "uranium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/uranium
|
||||
radioactivity = 12
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#007A00"
|
||||
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
unmeltable = 1
|
||||
cut_delay = 60
|
||||
icon_colour = "#00FFE1"
|
||||
opacity = 0.4
|
||||
|
||||
/material/gold
|
||||
name = "gold"
|
||||
stack_type = /obj/item/stack/sheet/mineral/gold
|
||||
icon_colour = "#EDD12F"
|
||||
|
||||
/material/silver
|
||||
name = "silver"
|
||||
stack_type = /obj/item/stack/sheet/mineral/silver
|
||||
icon_colour = "#D1E6E3"
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/phoron
|
||||
ignition_point = 300
|
||||
icon_base = "stone"
|
||||
icon_colour = "#FC2BC5"
|
||||
|
||||
/material/sandstone
|
||||
name = "sandstone"
|
||||
stack_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#D9C179"
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/sheet/metal
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
|
||||
/material/plasteel
|
||||
name = "plasteel"
|
||||
stack_type = /obj/item/stack/sheet/plasteel
|
||||
integrity = 800
|
||||
melting_point = 6000
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#777777"
|
||||
explosion_resistance = 25
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
stack_type = /obj/item/stack/sheet/glass
|
||||
icon_colour = "#00E1FF"
|
||||
opacity = 0.3
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
stack_type = /obj/item/stack/sheet/mineral/plastic
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#CCCCCC"
|
||||
|
||||
/material/osmium
|
||||
name = "osmium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/osmium
|
||||
icon_colour = "#9999FF"
|
||||
|
||||
/material/tritium
|
||||
name = "tritium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/tritium
|
||||
icon_colour = "#777777"
|
||||
|
||||
/material/mhydrogen
|
||||
name = "mhydrogen"
|
||||
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
icon_colour = "#E6C5DE"
|
||||
|
||||
/material/platinum
|
||||
name = "platinum"
|
||||
stack_type = /obj/item/stack/sheet/mineral/platinum
|
||||
icon_colour = "#9999FF"
|
||||
|
||||
/material/iron
|
||||
name = "iron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/iron
|
||||
icon_colour = "#5C5454"
|
||||
|
||||
/material/cult
|
||||
name = "cult"
|
||||
display_name = "disturbing stone"
|
||||
icon_base = "cult"
|
||||
icon_colour = "#402821"
|
||||
icon_reinf = "reinf_cult"
|
||||
|
||||
/material/cult/place_dismantled_girder(var/turf/target)
|
||||
new /obj/structure/girder/cult(target)
|
||||
|
||||
/material/cult/place_dismantled_product(var/turf/target)
|
||||
new /obj/effect/decal/cleanable/blood(target)
|
||||
|
||||
/material/cult/reinf
|
||||
name = "cult2"
|
||||
display_name = "human remains"
|
||||
|
||||
/material/cult/reinf/place_dismantled_product(var/turf/target)
|
||||
new /obj/effect/decal/remains/human(target)
|
||||
@@ -19,7 +19,7 @@
|
||||
product = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/datum/alloy/steel
|
||||
metaltag = "steel"
|
||||
metaltag = DEFAULT_WALL_MATERIAL
|
||||
requires = list(
|
||||
"coal" = 1,
|
||||
"hematite" = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
matter = list("metal" = 150)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
for(var/ore in machine.ores_processing)
|
||||
|
||||
if(!machine.ores_stored[ore] && !show_all_ores) continue
|
||||
|
||||
dat += "<tr><td width = 40><b>[capitalize(ore)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
var/ore/O = ore_data[ore]
|
||||
if(!O) continue
|
||||
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
if(machine.ores_processing[ore])
|
||||
switch(machine.ores_processing[ore])
|
||||
if(0)
|
||||
@@ -111,7 +112,6 @@
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/list/ore_data[0]
|
||||
var/list/alloy_data[0]
|
||||
var/active = 0
|
||||
|
||||
@@ -123,11 +123,12 @@
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
for(var/oretype in typesof(/datum/ore)-/datum/ore)
|
||||
var/datum/ore/OD = new oretype()
|
||||
ore_data[OD.oretag] = OD
|
||||
ores_processing[OD.oretag] = 0
|
||||
ores_stored[OD.oretag] = 0
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
var/ore/OD = new oretype()
|
||||
ore_data[OD.name] = OD
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
//Locate our output and input machinery.
|
||||
spawn(5)
|
||||
@@ -150,8 +151,10 @@
|
||||
for(var/i = 0,i<sheets_per_tick,i++)
|
||||
var/obj/item/weapon/ore/O = locate() in input.loc
|
||||
if(!O) break
|
||||
if(!isnull(ores_stored[O.oretag])) ores_stored[O.oretag]++
|
||||
O.loc = null
|
||||
if(!isnull(ores_stored[O.material]))
|
||||
ores_stored[O.material]++
|
||||
|
||||
qdel(O)
|
||||
|
||||
if(!active)
|
||||
return
|
||||
@@ -164,7 +167,7 @@
|
||||
|
||||
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
|
||||
|
||||
var/datum/ore/O = ore_data[metal]
|
||||
var/ore/O = ore_data[metal]
|
||||
|
||||
if(!O) continue
|
||||
|
||||
@@ -206,24 +209,28 @@
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
var/material/M = name_to_material[O.compresses_to]
|
||||
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i+=2)
|
||||
ores_stored[metal]-=2
|
||||
sheets+=2
|
||||
new O.compresses_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
|
||||
else if(ores_processing[metal] == 1 && O.smelts_to) //Smelting.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
|
||||
var/material/M = name_to_material[O.smelts_to]
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i++)
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
new O.smelts_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
else
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/sheet/glass
|
||||
stack_storage["metal"] = 0
|
||||
stack_paths["metal"] = /obj/item/stack/sheet/metal
|
||||
stack_storage[DEFAULT_WALL_MATERIAL] = 0
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/sheet/metal
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/sheet/plasteel
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/**********************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
|
||||
light_range = 8
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
/obj/structure/closet/secure_closet/miner
|
||||
@@ -35,8 +26,7 @@
|
||||
new /obj/item/device/flashlight/lantern(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
|
||||
new /obj/item/clothing/glasses/material(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
@@ -59,7 +49,7 @@
|
||||
icon_state = "pickaxe"
|
||||
item_state = "jackhammer"
|
||||
w_class = 4.0
|
||||
matter = list("metal" = 3750)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
@@ -119,6 +109,7 @@
|
||||
origin_tech = "materials=4;phorontech=3;engineering=3"
|
||||
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
drill_verb = "cutting"
|
||||
drill_sound = 'sound/items/Welder.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
@@ -161,7 +152,7 @@
|
||||
throwforce = 4.0
|
||||
item_state = "shovel"
|
||||
w_class = 3.0
|
||||
matter = list("metal" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
temperature = T0C
|
||||
var/mineral/mineral
|
||||
var/ore/mineral
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||
@@ -95,13 +95,13 @@
|
||||
|
||||
|
||||
/turf/simulated/mineral/proc/UpdateMineral()
|
||||
clear_ore_effects()
|
||||
if(!mineral)
|
||||
name = "\improper Rock"
|
||||
icon_state = "rock"
|
||||
return
|
||||
name = "\improper [mineral.display_name] deposit"
|
||||
overlays.Cut()
|
||||
overlays += "rock_[mineral.name]"
|
||||
new /obj/effect/mineral(src, mineral)
|
||||
|
||||
//Not even going to touch this pile of spaghetti
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -234,10 +234,15 @@
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/turf/simulated/mineral/proc/clear_ore_effects()
|
||||
for(var/obj/effect/mineral/M in contents)
|
||||
qdel(M)
|
||||
|
||||
/turf/simulated/mineral/proc/DropMineral()
|
||||
if(!mineral)
|
||||
return
|
||||
|
||||
clear_ore_effects()
|
||||
var/obj/item/weapon/ore/O = new mineral.ore (src)
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
@@ -274,6 +279,7 @@
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
|
||||
//Add some rubble, you did just clear out a big chunk of rock.
|
||||
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
N.overlay_detail = "asteroid[rand(0,9)]"
|
||||
|
||||
@@ -369,12 +375,9 @@
|
||||
/turf/simulated/mineral/random/New()
|
||||
if (prob(mineralChance) && !mineral)
|
||||
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
|
||||
|
||||
if(!name_to_mineral)
|
||||
SetupMinerals()
|
||||
|
||||
if (mineral_name && mineral_name in name_to_mineral)
|
||||
mineral = name_to_mineral[mineral_name]
|
||||
mineral_name = lowertext(mineral_name)
|
||||
if (mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
UpdateMineral()
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/obj/effect/mineral
|
||||
name = "mineral vein"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Shiny."
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/ore_key
|
||||
var/image/scanner_image
|
||||
|
||||
/obj/effect/mineral/New(var/newloc, var/ore/M)
|
||||
..(newloc)
|
||||
name = "[M.display_name] deposit"
|
||||
ore_key = M.name
|
||||
icon_state = "rock_[ore_key]"
|
||||
var/turf/T = get_turf(src)
|
||||
layer = T.layer+0.1
|
||||
|
||||
/obj/effect/mineral/proc/get_scan_overlay()
|
||||
if(!scanner_image)
|
||||
var/ore/O = ore_data[ore_key]
|
||||
if(O)
|
||||
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
|
||||
else
|
||||
world << "No ore data for [src]!"
|
||||
return scanner_image
|
||||
@@ -1,72 +0,0 @@
|
||||
var/list/name_to_mineral
|
||||
|
||||
/proc/SetupMinerals()
|
||||
name_to_mineral = list()
|
||||
for(var/type in typesof(/mineral) - /mineral)
|
||||
var/mineral/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_mineral[new_mineral.name] = new_mineral
|
||||
return 1
|
||||
|
||||
/mineral
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name // What am I called?
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
|
||||
|
||||
/mineral/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/mineral/uranium
|
||||
name = "Uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
|
||||
/mineral/platinum
|
||||
name = "Platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
|
||||
/mineral/iron
|
||||
name = "Iron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
|
||||
/mineral/coal
|
||||
name = "Coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
|
||||
/mineral/diamond
|
||||
name = "Diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
|
||||
/mineral/gold
|
||||
name = "Gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
|
||||
/mineral/silver
|
||||
name = "Silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
|
||||
/mineral/phoron
|
||||
name = "Phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
@@ -17,7 +17,7 @@
|
||||
var/amt_uranium = 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/chosen = DEFAULT_WALL_MATERIAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=silver'>Choose</A>")
|
||||
dat += text("<br><font color='#555555'><b>Iron inserted: </b>[amt_iron]</font> ")
|
||||
if (chosen == "metal")
|
||||
if (chosen == DEFAULT_WALL_MATERIAL)
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=metal'>Choose</A>")
|
||||
@@ -133,7 +133,7 @@
|
||||
icon_state = "coinpress1"
|
||||
var/obj/item/weapon/moneybag/M
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
|
||||
+24
-24
@@ -4,71 +4,71 @@
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/oretag
|
||||
var/material
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "pitchblende"
|
||||
icon_state = "Uranium ore"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = "materials=5"
|
||||
oretag = "uranium"
|
||||
material = "uranium"
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "Iron ore"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "hematite"
|
||||
material = "hematite"
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "carbonaceous rock"
|
||||
icon_state = "Coal ore"
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "coal"
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "impure silicates"
|
||||
icon_state = "Glass ore"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "sand"
|
||||
material = "sand"
|
||||
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "Phoron ore"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = "materials=2"
|
||||
oretag = "phoron"
|
||||
material = "phoron"
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "Silver ore"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = "materials=3"
|
||||
oretag = "silver"
|
||||
material = "silver"
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "Gold ore"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = "materials=4"
|
||||
oretag = "gold"
|
||||
material = "gold"
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "Diamond ore"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = "materials=6"
|
||||
oretag = "diamond"
|
||||
material = "diamond"
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
name = "raw platinum"
|
||||
icon_state = "Platinum ore"
|
||||
oretag = "platinum"
|
||||
icon_state = "ore_platinum"
|
||||
material = "platinum"
|
||||
|
||||
/obj/item/weapon/ore/hydrogen
|
||||
name = "raw hydrogen"
|
||||
icon_state = "Phazon"
|
||||
oretag = "hydrogen"
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Completely useless"
|
||||
desc = "Someone screwed up..."
|
||||
icon_state = "slag"
|
||||
oretag = "slag"
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
|
||||
@@ -1,52 +1,133 @@
|
||||
/datum/ore
|
||||
var/oretag
|
||||
var/global/list/ore_data = list()
|
||||
|
||||
/ore
|
||||
var/name
|
||||
var/display_name
|
||||
var/alloy
|
||||
var/smelts_to
|
||||
var/compresses_to
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
var/scan_icon // Overlay for ore scanners.
|
||||
// Xenoarch stuff. No idea what it's for, just refactored it to be less awful.
|
||||
var/list/xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999
|
||||
)
|
||||
var/xarch_source_mineral = "iron"
|
||||
|
||||
/datum/ore/uranium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/uranium
|
||||
oretag = "uranium"
|
||||
/ore/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/datum/ore/iron
|
||||
smelts_to = /obj/item/stack/sheet/mineral/iron
|
||||
/ore/uranium
|
||||
name = "uranium"
|
||||
display_name = "pitchblende"
|
||||
smelts_to = "uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 704
|
||||
)
|
||||
xarch_source_mineral = "potassium"
|
||||
|
||||
/ore/hematite
|
||||
name = "hematite"
|
||||
display_name = "hematite"
|
||||
smelts_to = "iron"
|
||||
alloy = 1
|
||||
oretag = "hematite"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/coal
|
||||
smelts_to = /obj/item/stack/sheet/mineral/plastic
|
||||
/ore/coal
|
||||
name = "carbon"
|
||||
display_name = "raw carbon"
|
||||
smelts_to = "plastic"
|
||||
alloy = 1
|
||||
oretag = "coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/glass
|
||||
smelts_to = /obj/item/stack/sheet/glass
|
||||
compresses_to = /obj/item/stack/sheet/mineral/sandstone
|
||||
oretag = "sand"
|
||||
/ore/glass
|
||||
name = "sand"
|
||||
display_name = "impure silicates"
|
||||
smelts_to = "glass"
|
||||
compresses_to = "sandstone"
|
||||
|
||||
/datum/ore/phoron
|
||||
/ore/phoron
|
||||
name = "phoron"
|
||||
display_name = "phoron crystals"
|
||||
compresses_to = "phoron"
|
||||
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
|
||||
compresses_to = /obj/item/stack/sheet/mineral/phoron
|
||||
oretag = "phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
xarch_source_mineral = "phoron"
|
||||
|
||||
/datum/ore/silver
|
||||
smelts_to = /obj/item/stack/sheet/mineral/silver
|
||||
oretag = "silver"
|
||||
/ore/silver
|
||||
name = "silver"
|
||||
display_name = "native silver"
|
||||
smelts_to = "silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
scan_icon = "mineral_uncommon"
|
||||
|
||||
/datum/ore/gold
|
||||
smelts_to = /obj/item/stack/sheet/mineral/gold
|
||||
oretag = "gold"
|
||||
/ore/gold
|
||||
smelts_to = "gold"
|
||||
name = "gold"
|
||||
display_name = "native gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 4,
|
||||
"billion_lower" = 3
|
||||
)
|
||||
|
||||
/datum/ore/diamond
|
||||
compresses_to = /obj/item/stack/sheet/mineral/diamond
|
||||
oretag = "diamond"
|
||||
/ore/diamond
|
||||
name = "diamond"
|
||||
display_name = "diamond"
|
||||
compresses_to = "diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_source_mineral = "nitrogen"
|
||||
|
||||
/datum/ore/osmium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/platinum
|
||||
compresses_to = /obj/item/stack/sheet/mineral/osmium
|
||||
/ore/platinum
|
||||
name = "platinum"
|
||||
display_name = "raw platinum"
|
||||
smelts_to = "platinum"
|
||||
compresses_to = "osmium"
|
||||
alloy = 1
|
||||
oretag = "platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
/datum/ore/hydrogen
|
||||
smelts_to = /obj/item/stack/sheet/mineral/tritium
|
||||
compresses_to = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
oretag = "hydrogen"
|
||||
/ore/hydrogen
|
||||
name = "mhydrogen"
|
||||
display_name = "metallic hydrogen"
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
@@ -25,7 +25,7 @@
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
var/list/construction_cost = list("metal"=1000,"glass"=500)
|
||||
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=1000,"glass"=500)
|
||||
var/construction_time = 75
|
||||
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = 3
|
||||
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
|
||||
|
||||
construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=500,"silver"=200,"gold"=200,"phoron"=100,"diamond"=10)
|
||||
construction_time = 75
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
|
||||
@@ -134,13 +134,20 @@
|
||||
return
|
||||
|
||||
// OBJ CHECK
|
||||
var/cannot_melt
|
||||
if(isobj(O))
|
||||
var/obj/I = O
|
||||
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
||||
src << "<span class='alium'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
// TURF CHECK
|
||||
else if(istype(O, /turf/simulated/wall/r_wall) || istype(O, /turf/simulated/floor/engine))
|
||||
if(I.unacidable)
|
||||
cannot_melt = 1
|
||||
else
|
||||
if(istype(O, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = O
|
||||
if(W.material.unmeltable)
|
||||
cannot_melt = 1
|
||||
else if(istype(O, /turf/simulated/floor/engine))
|
||||
cannot_melt = 1
|
||||
|
||||
if(cannot_melt)
|
||||
src << "<span class='alium'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/mob/living/carbon/process_resist()
|
||||
|
||||
|
||||
//drop && roll
|
||||
if(on_fire)
|
||||
fire_stacks -= 2 //reduced
|
||||
@@ -18,34 +18,34 @@
|
||||
)
|
||||
ExtinguishMob()
|
||||
return
|
||||
|
||||
|
||||
if(handcuffed)
|
||||
spawn() escape_handcuffs()
|
||||
else if(legcuffed)
|
||||
spawn() escape_legcuffs()
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/proc/escape_handcuffs()
|
||||
if(!(last_special <= world.time)) return
|
||||
|
||||
|
||||
next_move = world.time + 100
|
||||
last_special = world.time + 100
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
break_handcuffs()
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/handcuffs/HC = handcuffed
|
||||
|
||||
|
||||
//A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
|
||||
var/breakouttime = 1200
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
//If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
|
||||
if(istype(HC))
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] attempts to remove \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/mob/living/carbon/proc/escape_legcuffs()
|
||||
if(!(last_special <= world.time)) return
|
||||
|
||||
|
||||
next_move = world.time + 100
|
||||
last_special = world.time + 100
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/weapon/legcuffs/HC = legcuffed
|
||||
|
||||
|
||||
//A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
@@ -79,20 +79,20 @@
|
||||
if(istype(HC))
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[usr] attempts to remove \the [HC]!</span>",
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[usr] attempts to remove \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime))
|
||||
if(!legcuffed || buckled)
|
||||
return
|
||||
return
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to remove \the [legcuffed]!</span>",
|
||||
"<span class='danger'>[src] manages to remove \the [legcuffed]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [legcuffed].</span>"
|
||||
)
|
||||
|
||||
|
||||
drop_from_inventory(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
@@ -106,18 +106,18 @@
|
||||
"<span class='danger'>[src] is trying to break \the [handcuffed]!</span>",
|
||||
"<span class='warning'>You attempt to break your [handcuffed.name]. (This will take around 5 seconds and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
|
||||
if(do_after(src, 50))
|
||||
if(!handcuffed || buckled)
|
||||
return
|
||||
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
|
||||
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
|
||||
"<span class='warning'>You successfully break your [handcuffed.name].</span>"
|
||||
)
|
||||
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
|
||||
del(handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
@@ -131,14 +131,14 @@
|
||||
if(do_after(src, 50))
|
||||
if(!legcuffed || buckled)
|
||||
return
|
||||
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to break the legcuffs!</span>",
|
||||
"<span class='warning'>You successfully break your legcuffs.</span>"
|
||||
)
|
||||
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
|
||||
del(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
w_class = 2.0
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
matter = list("metal" = 500, "glass" = 200)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200)
|
||||
origin_tech = "magnets=2;biotech=1;engineering=2"
|
||||
var/mode = 1;
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
icon = 'icons/obj/robot_component.dmi'
|
||||
icon_state = "working"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=5000)
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=5000)
|
||||
var/brute = 0
|
||||
var/burn = 0
|
||||
var/icon_state_broken = "broken"
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
/obj/item/weapon/airlock_electronics,
|
||||
/obj/item/weapon/module/power_control,
|
||||
/obj/item/weapon/stock_parts,
|
||||
/obj/item/light_fixture_frame,
|
||||
/obj/item/apc_frame,
|
||||
/obj/item/alarm_frame,
|
||||
/obj/item/firealarm_frame,
|
||||
/obj/item/frame,
|
||||
/obj/item/weapon/table_parts,
|
||||
/obj/item/weapon/table_parts/rack,
|
||||
/obj/item/weapon/camera_assembly,
|
||||
|
||||
@@ -137,10 +137,9 @@
|
||||
|
||||
proc/AttemptToEat(var/atom/target)
|
||||
if(istype(target,/turf/simulated/wall))
|
||||
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
|
||||
var/turf/simulated/wall/wall = target
|
||||
wall.ChangeTurf(/turf/simulated/floor)
|
||||
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
|
||||
var/turf/simulated/wall/W = target
|
||||
if((!W.reinf_material && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
|
||||
W.dismantle_wall()
|
||||
return 1
|
||||
else if(istype(target,/atom/movable))
|
||||
if(istype(target,/mob) || eatingDuration >= 50) //5 ticks to eat stuff like airlocks
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
w_class = 1.0
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
matter = list("metal" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10)
|
||||
var/colour = "black" //what colour the ink is!
|
||||
pressure_resistance = 2
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ var/global/photo_count = 0
|
||||
w_class = 2.0
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
var/pictures_max = 10
|
||||
var/pictures_left = 10
|
||||
var/on = 1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
w_class = 1.0
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
matter = list("metal" = 60)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 60)
|
||||
pressure_resistance = 2
|
||||
attack_verb = list("stamped")
|
||||
|
||||
@@ -73,4 +73,4 @@
|
||||
|
||||
if(chosen_stamp)
|
||||
name = chosen_stamp.name
|
||||
icon_state = chosen_stamp.icon_state
|
||||
icon_state = chosen_stamp.icon_state
|
||||
@@ -210,7 +210,7 @@ proc/cardinalrange(var/center)
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
matter = list("metal" = 100, "waste" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 2000)
|
||||
|
||||
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
|
||||
|
||||
@@ -475,7 +475,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
w_class = 2.0
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
matter = list("metal" = 50, "glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 20)
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "coil"
|
||||
|
||||
@@ -8,65 +8,8 @@
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
|
||||
|
||||
/obj/item/light_fixture_frame
|
||||
name = "light fixture frame"
|
||||
desc = "Used for building lights."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "tube-construct-item"
|
||||
flags = CONDUCT
|
||||
var/fixture_type = "tube"
|
||||
var/obj/machinery/light/newlight = null
|
||||
var/sheets_refunded = 2
|
||||
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/light_fixture_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red [src.name] cannot be placed on this spot."
|
||||
return
|
||||
usr << "Attaching [src] to the wall."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
var/constrdir = usr.dir
|
||||
var/constrloc = usr.loc
|
||||
if (!do_after(usr, 30))
|
||||
return
|
||||
switch(fixture_type)
|
||||
if("bulb")
|
||||
newlight = new /obj/machinery/light_construct/small(constrloc)
|
||||
if("tube")
|
||||
newlight = new /obj/machinery/light_construct(constrloc)
|
||||
newlight.dir = constrdir
|
||||
newlight.fingerprints = src.fingerprints
|
||||
newlight.fingerprintshidden = src.fingerprintshidden
|
||||
newlight.fingerprintslast = src.fingerprintslast
|
||||
|
||||
usr.visible_message("[usr.name] attaches [src] to the wall.", \
|
||||
"You attach [src] to the wall.")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/light_fixture_frame/small
|
||||
name = "small light fixture frame"
|
||||
desc = "Used for building small lights."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "bulb-construct-item"
|
||||
flags = CONDUCT
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
|
||||
/obj/machinery/light_construct
|
||||
name = "light fixture frame"
|
||||
desc = "A light fixture under construction."
|
||||
@@ -658,7 +601,7 @@
|
||||
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
|
||||
var/base_state
|
||||
var/switchcount = 0 // number of times switched
|
||||
matter = list("metal" = 60)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 60)
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/brightness_range = 2 //how much light it gives off
|
||||
var/brightness_power = 1
|
||||
|
||||
@@ -1,37 +1,3 @@
|
||||
|
||||
//frame assembly
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame
|
||||
name = "Fuel Assembly Port frame"
|
||||
icon = 'icons/rust.dmi'
|
||||
icon_state = "port2"
|
||||
w_class = 4
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Port cannot be placed on this spot."
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "\red Port cannot be placed in this area."
|
||||
return
|
||||
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
|
||||
qdel(src)
|
||||
|
||||
//construction steps
|
||||
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
@@ -122,7 +88,7 @@
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
new /obj/item/rust_fuel_assembly_port_frame(loc)
|
||||
new /obj/item/frame/rust/assembly(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut away from the wall by [user.name].",\
|
||||
"You detached the port frame.",\
|
||||
|
||||
@@ -1,38 +1,3 @@
|
||||
|
||||
//frame assembly
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame
|
||||
name = "Fuel Compressor frame"
|
||||
icon = 'icons/rust.dmi'
|
||||
icon_state = "fuel_compressor0"
|
||||
w_class = 4
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red Compressor cannot be placed on this spot."
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "\red Compressor cannot be placed in this area."
|
||||
return
|
||||
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
|
||||
qdel(src)
|
||||
|
||||
//construction steps
|
||||
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
|
||||
@@ -149,7 +114,7 @@
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
new /obj/item/rust_fuel_assembly_port_frame(loc)
|
||||
new /obj/item/frame/rust(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut away from the wall by [user.name].",\
|
||||
"You detached the compressor frame.",\
|
||||
|
||||
@@ -108,18 +108,19 @@
|
||||
return 2
|
||||
|
||||
/turf/simulated/wall/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(75))
|
||||
dismantle_wall()
|
||||
return
|
||||
if(current_size == STAGE_FOUR)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/r_wall/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
if(!reinf_material)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(75))
|
||||
dismantle_wall()
|
||||
return
|
||||
if(current_size == STAGE_FOUR)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
else
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/space/singularity_act()
|
||||
return
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "syringe_kit"
|
||||
matter = list("metal" = 500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500)
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
throw_speed = 4
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "T38"
|
||||
caliber = "357"
|
||||
ammo_type = /obj/item/ammo_casing/a357
|
||||
matter = list("metal" = 1260)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1260)
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
name = "speed loader (.38)"
|
||||
icon_state = "38"
|
||||
caliber = "38"
|
||||
matter = list("metal" = 360)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 360)
|
||||
ammo_type = /obj/item/ammo_casing/c38
|
||||
max_ammo = 6
|
||||
multiple_sprites = 1
|
||||
@@ -28,7 +28,7 @@
|
||||
icon_state = "45"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
matter = list("metal" = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 525) //metal costs are very roughly based around 1 .45 casing = 75 metal
|
||||
caliber = ".45"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
@@ -53,7 +53,7 @@
|
||||
icon_state = "9x19p"
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
matter = list("metal" = 600)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 600)
|
||||
caliber = "9mm"
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
max_ammo = 10
|
||||
@@ -69,7 +69,7 @@
|
||||
name = "ammunition Box (9mm)"
|
||||
icon_state = "9mm"
|
||||
origin_tech = "combat=2"
|
||||
matter = list("metal" = 1800)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1800)
|
||||
caliber = "9mm"
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
max_ammo = 30
|
||||
@@ -82,7 +82,7 @@
|
||||
icon_state = "9mmt"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/c9mm
|
||||
matter = list("metal" = 1200)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1200)
|
||||
caliber = "9mm"
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
@@ -103,7 +103,7 @@
|
||||
icon_state = "9mm"
|
||||
origin_tech = "combat=2"
|
||||
caliber = ".45"
|
||||
matter = list("metal" = 2250)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2250)
|
||||
ammo_type = /obj/item/ammo_casing/c45
|
||||
max_ammo = 30
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "12mm"
|
||||
matter = list("metal" = 1500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1500)
|
||||
ammo_type = "/obj/item/ammo_casing/a12mm"
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
@@ -130,7 +130,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a556"
|
||||
matter = list("metal" = 1800)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1800)
|
||||
ammo_type = /obj/item/ammo_casing/a556
|
||||
max_ammo = 10
|
||||
multiple_sprites = 1
|
||||
@@ -148,7 +148,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = ".50"
|
||||
matter = list("metal" = 1260)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1260)
|
||||
ammo_type = /obj/item/ammo_casing/a50
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
@@ -174,7 +174,7 @@
|
||||
origin_tech = "combat=2"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a762"
|
||||
matter = list("metal" = 4500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 4500)
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
max_ammo = 50
|
||||
multiple_sprites = 1
|
||||
@@ -187,7 +187,7 @@
|
||||
icon_state = "c762"
|
||||
mag_type = MAGAZINE
|
||||
caliber = "a762"
|
||||
matter = list("metal" = 1800)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1800)
|
||||
ammo_type = /obj/item/ammo_casing/a762
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
|
||||
@@ -76,21 +76,21 @@
|
||||
icon_state = "slshell"
|
||||
caliber = "shotgun"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun
|
||||
matter = list("metal" = 360)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 360)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/pellet
|
||||
name = "shotgun shell"
|
||||
desc = "A 12 gauge shell."
|
||||
icon_state = "gshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
|
||||
matter = list("metal" = 360)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 360)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/blank
|
||||
name = "shotgun shell"
|
||||
desc = "A blank shell."
|
||||
icon_state = "blshell"
|
||||
projectile_type = /obj/item/projectile/bullet/blank
|
||||
matter = list("metal" = 90)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 90)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/practice
|
||||
name = "shotgun shell"
|
||||
@@ -104,7 +104,7 @@
|
||||
desc = "A beanbag shell."
|
||||
icon_state = "bshell"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
matter = list("metal" = 180)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 180)
|
||||
|
||||
//Can stun in one hit if aimed at the head, but
|
||||
//is blocked by clothing that stops tasers and is vulnerable to EMP
|
||||
@@ -114,7 +114,7 @@
|
||||
icon_state = "stunshell"
|
||||
spent_icon = "stunshell-spent"
|
||||
projectile_type = /obj/item/projectile/energy/electrode/stunshot
|
||||
matter = list("metal" = 360, "glass" = 720)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 360, "glass" = 720)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/stunshell/emp_act(severity)
|
||||
if(prob(100/severity)) BB = null
|
||||
@@ -126,7 +126,7 @@
|
||||
desc = "A chemical shell used to signal distress or provide illumination."
|
||||
icon_state = "fshell"
|
||||
projectile_type = /obj/item/projectile/energy/flash/flare
|
||||
matter = list("metal" = 90, "glass" = 90)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 90, "glass" = 90)
|
||||
|
||||
/obj/item/ammo_casing/a762
|
||||
desc = "A 7.62mm bullet casing."
|
||||
@@ -140,7 +140,7 @@
|
||||
spent_icon = "lcasing-spent"
|
||||
caliber = "14.5mm"
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
matter = list("metal" = 1250)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1250)
|
||||
|
||||
/obj/item/ammo_casing/a556
|
||||
desc = "A 5.56mm bullet casing."
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
item_state = "gun"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
w_class = 3
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
slot_flags = SLOT_BELT|SLOT_BACK
|
||||
w_class = 3
|
||||
force = 10
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
projectile_type = /obj/item/projectile/beam
|
||||
fire_delay = 1 //rapid fire
|
||||
@@ -109,7 +109,7 @@ obj/item/weapon/gun/energy/retro
|
||||
desc = "Standard issue weapon of the Imperial Guard"
|
||||
origin_tech = "combat=1;magnets=2"
|
||||
self_recharge = 1
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
projectile_type = /obj/item/projectile/beam/lastertag/blue
|
||||
var/required_vest
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_state = "crossbow"
|
||||
w_class = 2.0
|
||||
item_state = "crossbow"
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
origin_tech = "combat=2;magnets=2;syndicate=5"
|
||||
slot_flags = SLOT_BELT
|
||||
silenced = 1
|
||||
@@ -54,5 +54,5 @@
|
||||
desc = "A weapon favored by mercenary infiltration teams."
|
||||
w_class = 4
|
||||
force = 10
|
||||
matter = list("metal" = 200000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200000)
|
||||
projectile_type = /obj/item/projectile/energy/bolt/large
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/obj/item/weapon/grenade/chambered
|
||||
var/list/grenades = new/list()
|
||||
var/max_grenades = 5 //holds this + one in the chamber
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
|
||||
//revolves the magazine, allowing players to choose between multiple grenade types
|
||||
/obj/item/weapon/gun/launcher/grenade/proc/pump(mob/M as mob)
|
||||
@@ -80,7 +80,7 @@
|
||||
chambered.det_time = 10
|
||||
chambered.activate(null)
|
||||
return chambered
|
||||
|
||||
|
||||
/obj/item/weapon/gun/launcher/grenade/handle_post_fire(mob/user)
|
||||
message_admins("[key_name_admin(user)] fired a grenade ([chambered.name]) from a grenade launcher ([src.name]).")
|
||||
log_game("[key_name_admin(user)] used a grenade ([chambered.name]).")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "syringe-cartridge"
|
||||
var/icon_flight = "syringe-cartridge-flight" //so it doesn't look so weird when shot
|
||||
matter = list("metal" = 125, "glass" = 375)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 125, "glass" = 375)
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
@@ -53,10 +53,10 @@
|
||||
if(L.can_inject())
|
||||
if(syringe.reagents)
|
||||
syringe.reagents.trans_to(L, 15)
|
||||
|
||||
|
||||
syringe.break_syringe(iscarbon(hit_atom)? hit_atom : null)
|
||||
syringe.update_icon()
|
||||
|
||||
|
||||
icon_state = initial(icon_state) //reset icon state
|
||||
update_icon()
|
||||
|
||||
@@ -67,15 +67,15 @@
|
||||
item_state = "syringegun"
|
||||
w_class = 3
|
||||
force = 7
|
||||
matter = list("metal" = 2000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
|
||||
fire_sound = 'sound/weapons/empty.ogg'
|
||||
fire_sound_text = "a metallic thunk"
|
||||
recoil = 0
|
||||
release_force = 10
|
||||
throw_distance = 10
|
||||
|
||||
|
||||
var/list/darts = list()
|
||||
var/max_darts = 1
|
||||
var/obj/item/weapon/syringe_cartridge/next
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
icon_state = "revolver"
|
||||
origin_tech = "combat=2;materials=2"
|
||||
w_class = 3
|
||||
matter = list("metal" = 1000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000)
|
||||
recoil = 1
|
||||
|
||||
|
||||
var/caliber = "357" //determines which casings will fit
|
||||
var/handle_casings = EJECT_CASINGS //determines how spent casings should be handled
|
||||
var/load_method = SINGLE_CASING|SPEEDLOADER //1 = Single shells, 2 = box or quick loader, 3 = magazine
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//For SINGLE_CASING or SPEEDLOADER guns
|
||||
var/max_shells = 0 //the number of casings that will fit inside
|
||||
var/ammo_type = null //the type of ammo that the gun comes preloaded with
|
||||
var/ammo_type = null //the type of ammo that the gun comes preloaded with
|
||||
var/list/loaded = list() //stored ammo
|
||||
|
||||
//For MAGAZINE guns
|
||||
@@ -50,7 +50,7 @@
|
||||
chambered = ammo_magazine.stored_ammo[1]
|
||||
if(handle_casings != HOLD_CASINGS)
|
||||
ammo_magazine.stored_ammo -= chambered
|
||||
|
||||
|
||||
if (chambered)
|
||||
return chambered.BB
|
||||
return null
|
||||
@@ -186,7 +186,7 @@
|
||||
)
|
||||
if(auto_eject_sound)
|
||||
playsound(user, auto_eject_sound, 40, 1)
|
||||
ammo_magazine.update_icon()
|
||||
ammo_magazine.update_icon()
|
||||
ammo_magazine = null
|
||||
update_icon() //make sure to do this after unsetting ammo_magazine
|
||||
|
||||
@@ -213,8 +213,8 @@
|
||||
set name = "Unload Ammo"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
|
||||
if(usr.stat || usr.restrained()) return
|
||||
|
||||
|
||||
unload_ammo(usr)
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
var/chance = 0
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = A
|
||||
chance = round(damage/W.damage_cap*180)
|
||||
chance = round(damage/W.material.integrity*180)
|
||||
else if(istype(A, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = A
|
||||
chance = round(damage/D.maxhealth*180)
|
||||
if(D.glass) chance *= 2
|
||||
else if(istype(A, /obj/structure/girder) || istype(A, /obj/structure/cultgirder))
|
||||
else if(istype(A, /obj/structure/girder))
|
||||
chance = 100
|
||||
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
|
||||
chance = 25
|
||||
@@ -196,4 +196,4 @@
|
||||
|
||||
/obj/item/projectile/bullet/shotgun/practice
|
||||
name = "practice"
|
||||
damage = 5
|
||||
damage = 5
|
||||
|
||||
@@ -194,12 +194,10 @@
|
||||
/datum/reagent/toxin/plantbgone/reaction_turf(var/turf/T, var/volume)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
if(W.rotting)
|
||||
W.rotting = 0
|
||||
for(var/obj/effect/E in W) if(E.name == "Wallrot") qdel(E)
|
||||
|
||||
for(var/mob/O in viewers(W, null))
|
||||
O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1)
|
||||
if(locate(/obj/effect/overlay/wallrot) in W)
|
||||
for(var/obj/effect/overlay/wallrot/E in W)
|
||||
qdel(E)
|
||||
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!")
|
||||
|
||||
/datum/reagent/toxin/plantbgone/reaction_obj(var/obj/O, var/volume)
|
||||
if(istype(O,/obj/effect/alien/weeds/))
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
matter = list("metal" = 200)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200)
|
||||
w_class = 3.0
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(10,20,30,60,120)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
anchored = 0
|
||||
density = 0
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
matter = list("metal" = 1850)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1850)
|
||||
level = 2
|
||||
var/ptype = 0
|
||||
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet
|
||||
|
||||
@@ -67,8 +67,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if (copytext(ID, 1, 2) == "$")
|
||||
return_name = copytext(ID, 2)
|
||||
switch(return_name)
|
||||
if("metal")
|
||||
return_name = "Metal"
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
return_name = "Steel"
|
||||
if("glass")
|
||||
return_name = "Glass"
|
||||
if("gold")
|
||||
@@ -263,7 +263,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
|
||||
files.UpdateDesign(linked_destroy.loaded_item.type)
|
||||
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter[DEFAULT_WALL_MATERIAL]*linked_destroy.decon_mod))
|
||||
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
|
||||
linked_destroy.loaded_item = null
|
||||
for(var/obj/I in linked_destroy.contents)
|
||||
@@ -439,27 +439,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
||||
var/desired_num_sheets = text2num(href_list["amount"])
|
||||
var/res_amount, type
|
||||
switch(href_list["lathe_ejectsheet"])
|
||||
if("metal")
|
||||
type = /obj/item/stack/sheet/metal
|
||||
var/material/M = name_to_material[href_list["lathe_ejectsheet"]]
|
||||
if(istype(M))
|
||||
type = M.stack_type
|
||||
|
||||
switch(name_to_material[href_list["lathe_ejectsheet"]])
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
res_amount = "m_amount"
|
||||
if("glass")
|
||||
type = /obj/item/stack/sheet/glass
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
res_amount = "gold_amount"
|
||||
if("silver")
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
res_amount = "silver_amount"
|
||||
if("phoron")
|
||||
type = /obj/item/stack/sheet/mineral/phoron
|
||||
res_amount = "phoron_amount"
|
||||
if("uranium")
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
res_amount = "uranium_amount"
|
||||
if("diamond")
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
res_amount = "diamond_amount"
|
||||
|
||||
if(ispath(type) && hasvar(linked_lathe, res_amount))
|
||||
@@ -818,11 +815,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
||||
dat += "Material Storage<BR><HR>"
|
||||
dat += "<UL>"
|
||||
for(var/M in list("metal", "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||
for(var/M in list(DEFAULT_WALL_MATERIAL, "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||
var/amount
|
||||
var/sheetsize = 2000
|
||||
switch(M)
|
||||
if("metal")
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
amount = linked_lathe.m_amount
|
||||
sheetsize = 3750
|
||||
if("glass")
|
||||
|
||||
@@ -269,7 +269,7 @@ datum/tech/robotics
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 30, "glass" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10)
|
||||
var/datum/tech/stored
|
||||
|
||||
/obj/item/weapon/disk/tech_disk/New()
|
||||
@@ -283,7 +283,7 @@ datum/tech/robotics
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 2.0
|
||||
matter = list("metal" = 30,"glass" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
|
||||
var/datum/design/blueprint
|
||||
|
||||
/obj/item/weapon/disk/design_disk/New()
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
var/apply_prefix = 1
|
||||
if(prob(40))
|
||||
material_descriptor = pick("rusted ","dusty ","archaic ","fragile ")
|
||||
source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
|
||||
var/talkative = 0
|
||||
if(prob(5))
|
||||
@@ -490,7 +490,7 @@
|
||||
new_item = new /obj/item/clothing/mask/gas(src.loc)
|
||||
var/decorations = ""
|
||||
if(apply_material_decorations)
|
||||
source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
desc = "A [material_descriptor ? "[material_descriptor] " : ""][item_type] made of [source_material], all craftsmanship is of [pick("the lowest","low","average","high","the highest")] quality."
|
||||
|
||||
var/list/descriptors = list()
|
||||
|
||||
@@ -61,44 +61,19 @@
|
||||
age = rand(1,999)
|
||||
|
||||
if(container.mineral)
|
||||
switch(container.mineral.name)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Phoron")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["phoron"] = rand(1,1000) / 100
|
||||
source_mineral = "phoron"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["phoron"] = rand(1,1000) / 100
|
||||
source_mineral = "phoron"
|
||||
if(islist(container.mineral.xarch_ages))
|
||||
var/list/ages = container.mineral.xarch_ages
|
||||
if(ages["thousand"])
|
||||
age_thousand = rand(1,ages["thousand"])
|
||||
if(ages["million"])
|
||||
age_million = rand(1,ages["million"])
|
||||
if(ages["billion"])
|
||||
if(ages["billion_lower"])
|
||||
age_billion = rand(ages["billion_lower"],ages["billion"])
|
||||
else
|
||||
age_billion = rand(1,ages["billion"])
|
||||
if(container.mineral.xarch_source_mineral)
|
||||
source_mineral = container.mineral.xarch_source_mineral
|
||||
|
||||
if(prob(75))
|
||||
find_presence["phosphorus"] = rand(1,500) / 100
|
||||
|
||||
Reference in New Issue
Block a user