mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
Materials subsystem, material defines instead of strings, structure materials. (#8447)
The shitcode crusade begins.
This commit is contained in:
@@ -11,6 +11,6 @@
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
||||
@@ -11,7 +11,7 @@
|
||||
uv_intensity = 50
|
||||
light_wedge = LIGHT_WIDE
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20)
|
||||
|
||||
action_button_name = "Toggle Flashlight"
|
||||
var/on = 0
|
||||
@@ -126,7 +126,7 @@
|
||||
brightness_on = 4
|
||||
w_class = 3
|
||||
uv_intensity = 60
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 70)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, MATERIAL_GLASS = 70)
|
||||
light_wedge = LIGHT_SEMI
|
||||
|
||||
/obj/item/device/flashlight/maglight
|
||||
@@ -139,7 +139,7 @@
|
||||
w_class = 3
|
||||
uv_intensity = 70
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200,"glass" = 100)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200, MATERIAL_GLASS = 100)
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
light_wedge = LIGHT_NARROW
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20)
|
||||
var/low = 0
|
||||
var/high = 1
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 750,"waste" = 750)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 750)
|
||||
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ILLEGAL = 5)
|
||||
var/drain_rate = 1500000 // amount of power to drain per tick
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 5.0
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000,"glass" = 2500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000, MATERIAL_GLASS = 2500)
|
||||
|
||||
var/code = 2
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/global/list/default_medbay_channels = list(
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2
|
||||
matter = list("glass" = 25,DEFAULT_WALL_MATERIAL = 75)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 75, MATERIAL_GLASS = 25)
|
||||
var/const/FREQ_LISTENING = 1
|
||||
var/list/internal_channels
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ BREATH ANALYZER
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
||||
|
||||
@@ -365,7 +365,7 @@ BREATH ANALYZER
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
var/details = 0
|
||||
@@ -426,7 +426,7 @@ BREATH ANALYZER
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
var/details = 0
|
||||
@@ -474,7 +474,7 @@ BREATH ANALYZER
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M, mob/living/user)
|
||||
if(!isslime(M))
|
||||
@@ -516,7 +516,7 @@ BREATH ANALYZER
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 25, "glass" = 25)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 25, MATERIAL_GLASS = 25)
|
||||
|
||||
/obj/item/device/price_scanner/afterattack(atom/movable/target, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
@@ -537,7 +537,7 @@ BREATH ANALYZER
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
|
||||
/obj/item/device/breath_analyzer/attack(mob/living/carbon/human/H, mob/living/user as mob)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
var/celltype = /obj/item/cell/high
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 25000, "glass" = 3500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 25000, MATERIAL_GLASS = 3500)
|
||||
var/on = 0 //is it turned on?
|
||||
var/cover_open = 0 //is the cover open?
|
||||
var/obj/item/cell/cell
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throw_speed = 3
|
||||
var/animaltag = null
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20)
|
||||
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 1)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "analyzer"
|
||||
w_class = 2.0
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 60,"glass" = 30)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 60, MATERIAL_GLASS = 30)
|
||||
|
||||
var/emagged = 0.0
|
||||
var/recording = 0.0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "jar_lid"
|
||||
w_class = 2
|
||||
matter = list("glass" = 200)
|
||||
matter = list(MATERIAL_GLASS = 200)
|
||||
flags = NOBLUDGEON
|
||||
var/list/accept_mobs = list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/rat)
|
||||
var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
/obj/item/borg/upgrade/combat
|
||||
name = "combat cyborg module"
|
||||
desc = "Unlocks the combat cyborg module"
|
||||
// construction_cost = list(DEFAULT_WALL_MATERIAL=10000,"glass"=15000,"gold"= 5000,"diamond" = 1000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 0
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/skrell_items.dmi'
|
||||
icon_state = "starscope"
|
||||
w_class = 1
|
||||
matter = list("glass" = 200)
|
||||
matter = list(MATERIAL_GLASS = 200)
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
var/list/constellations = list("Island", "Hatching Egg", "Star Chanter", "Jiu'x'klua", "Stormcloud", "Gnarled Tree", "Poet", "Bloated Toad", "Qu'Poxiii", "Fisher")
|
||||
var/selected_constellation
|
||||
@@ -76,7 +76,7 @@
|
||||
icon = 'icons/obj/skrell_items.dmi'
|
||||
icon_state = "projector"
|
||||
w_class = 1
|
||||
matter = list("glass" = 200)
|
||||
matter = list(MATERIAL_GLASS = 200)
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
var/list/worlds_selection = list("Xrim", "Kal'lo", "Nralakk")
|
||||
var/selected_world
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
amount = 10
|
||||
|
||||
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000)
|
||||
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL = 7000, MATERIAL_GLASS = 7000)
|
||||
|
||||
/obj/item/stack/nanopaste/update_icon()
|
||||
var/amount = round(get_amount() / 2)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
throw_range = 20
|
||||
flags = 0
|
||||
drop_sound = 'sound/items/drop/clothing.ogg'
|
||||
matter = list("plastic" = 937.5)
|
||||
matter = list(MATERIAL_PLASTIC = 937.5)
|
||||
|
||||
/obj/item/stack/tile/lino_grey
|
||||
name = "linoleum"
|
||||
@@ -114,7 +114,7 @@
|
||||
throw_range = 20
|
||||
flags = 0
|
||||
drop_sound = 'sound/items/drop/clothing.ogg'
|
||||
matter = list("plastic" = 937.5)
|
||||
matter = list(MATERIAL_PLASTIC = 937.5)
|
||||
|
||||
/*
|
||||
* Circuits
|
||||
@@ -126,7 +126,7 @@
|
||||
desc = "An advanced tile covered in various circuitry and wiring."
|
||||
icon_state = "tile_bcircuit"
|
||||
force = 6.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5,"glass" = 937.5)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5, MATERIAL_GLASS = 937.5)
|
||||
throwforce = 15.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
@@ -138,7 +138,7 @@
|
||||
desc = "An advanced tile covered in various circuitry and wiring."
|
||||
icon_state = "tile_gcircuit"
|
||||
force = 6.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5,"glass" = 937.5)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5, MATERIAL_GLASS = 937.5)
|
||||
throwforce = 15.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
@@ -170,13 +170,13 @@
|
||||
name = "steel floor tile"
|
||||
singular_name = "steel floor tile"
|
||||
icon_state = "tile_steel"
|
||||
matter = list("plasteel" = 937.5)
|
||||
matter = list(MATERIAL_PLASTEEL = 937.5)
|
||||
|
||||
/obj/item/stack/tile/floor_white
|
||||
name = "white floor tile"
|
||||
singular_name = "white floor tile"
|
||||
icon_state = "tile_white"
|
||||
matter = list("plastic" = 937.5)
|
||||
matter = list(MATERIAL_PLASTIC = 937.5)
|
||||
|
||||
/obj/item/stack/tile/floor_yellow
|
||||
name = "yellow floor tile"
|
||||
@@ -188,43 +188,43 @@
|
||||
name = "dark floor tile"
|
||||
singular_name = "dark floor tile"
|
||||
icon_state = "fr_tile"
|
||||
matter = list("plasteel" = 937.5)
|
||||
matter = list(MATERIAL_PLASTEEL = 937.5)
|
||||
|
||||
/obj/item/stack/tile/floor_freezer
|
||||
name = "freezer floor tile"
|
||||
singular_name = "freezer floor tile"
|
||||
icon_state = "tile_freezer"
|
||||
matter = list("plastic" = 937.5)
|
||||
matter = list(MATERIAL_PLASTIC = 937.5)
|
||||
|
||||
/obj/item/stack/tile/silver
|
||||
name = "silver floor tile"
|
||||
singular_name = "silver floor tile"
|
||||
icon_state = "tile_silver"
|
||||
matter = list("silver" = 937.5)
|
||||
matter = list(MATERIAL_SILVER = 937.5)
|
||||
|
||||
/obj/item/stack/tile/gold
|
||||
name = "golden floor tile"
|
||||
singular_name = "golden floor tile"
|
||||
icon_state = "tile_gold"
|
||||
matter = list("gold" = 937.5)
|
||||
matter = list(MATERIAL_GOLD = 937.5)
|
||||
|
||||
/obj/item/stack/tile/uranium
|
||||
name = "uranium floor tile"
|
||||
singular_name = "uranium floor tile"
|
||||
icon_state = "tile_uranium"
|
||||
matter = list("uranium" = 937.5)
|
||||
matter = list(MATERIAL_URANIUM = 937.5)
|
||||
|
||||
/obj/item/stack/tile/phoron
|
||||
name = "phoron floor tile"
|
||||
singular_name = "phoron floor tile"
|
||||
icon_state = "tile_plasma"
|
||||
matter = list("phoron" = 937.5)
|
||||
matter = list(MATERIAL_PHORON = 937.5)
|
||||
|
||||
/obj/item/stack/tile/diamond
|
||||
name = "diamond floor tile"
|
||||
singular_name = "diamond floor tile"
|
||||
icon_state = "tile_diamond"
|
||||
matter = list("diamond" = 937.5)
|
||||
matter = list(MATERIAL_DIAMOND = 937.5)
|
||||
|
||||
/*
|
||||
* Cyborg modules
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
item_state = "rfdammo"
|
||||
w_class = 2
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30000,"glass" = 15000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30000, MATERIAL_GLASS = 15000)
|
||||
|
||||
/*
|
||||
RFD Construction-Class
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 320, "glass" = 800)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 320, MATERIAL_GLASS = 800)
|
||||
var/obj/item/implant/imp = null
|
||||
|
||||
/obj/item/implanter/attack_self(var/mob/user)
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/material/ashtray/plastic/New(var/newloc)
|
||||
..(newloc, "plastic")
|
||||
..(newloc, MATERIAL_PLASTIC)
|
||||
|
||||
/obj/item/material/ashtray/bronze/New(var/newloc)
|
||||
..(newloc, "bronze")
|
||||
..(newloc, MATERIAL_BRONZE)
|
||||
|
||||
/obj/item/material/ashtray/glass/New(var/newloc)
|
||||
..(newloc, "glass")
|
||||
..(newloc, MATERIAL_GLASS)
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
|
||||
//Predefined materials go here.
|
||||
/obj/item/material/twohanded/baseballbat/metal/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
..(newloc, MATERIAL_STEEL)
|
||||
|
||||
/obj/item/material/twohanded/baseballbat/uranium/New(var/newloc)
|
||||
..(newloc,"uranium")
|
||||
..(newloc, MATERIAL_URANIUM)
|
||||
|
||||
/obj/item/material/twohanded/baseballbat/gold/New(var/newloc)
|
||||
..(newloc,"gold")
|
||||
..(newloc, MATERIAL_GOLD)
|
||||
|
||||
/obj/item/material/twohanded/baseballbat/platinum/New(var/newloc)
|
||||
..(newloc,"platinum")
|
||||
..(newloc, MATERIAL_PLATINUM)
|
||||
|
||||
/obj/item/material/twohanded/baseballbat/diamond/New(var/newloc)
|
||||
..(newloc,"diamond")
|
||||
..(newloc, MATERIAL_DIAMOND)
|
||||
@@ -72,7 +72,7 @@
|
||||
sharp = TRUE
|
||||
|
||||
/obj/item/material/kitchen/utensil/fork/plastic
|
||||
default_material = "plastic"
|
||||
default_material = MATERIAL_PLASTIC
|
||||
|
||||
/obj/item/material/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
@@ -82,7 +82,7 @@
|
||||
force_divisor = 0.1 //2 when wielded with weight 20 (steel)
|
||||
|
||||
/obj/item/material/kitchen/utensil/spoon/plastic
|
||||
default_material = "plastic"
|
||||
default_material = MATERIAL_PLASTIC
|
||||
|
||||
/*
|
||||
* Knives
|
||||
@@ -115,7 +115,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/material/kitchen/utensil/knife/plastic
|
||||
default_material = "plastic"
|
||||
default_material = MATERIAL_PLASTIC
|
||||
|
||||
/*
|
||||
* Rolling Pins
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
||||
|
||||
/obj/item/material/proc/set_material(var/new_material)
|
||||
material = get_material_by_name(new_material)
|
||||
material = SSmaterials.get_material_by_name(new_material)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -93,13 +93,13 @@
|
||||
|
||||
// Preset types - left here for the code that uses them
|
||||
/obj/item/material/shard/shrapnel/New(loc)
|
||||
..(loc, "steel")
|
||||
..(loc, MATERIAL_STEEL)
|
||||
|
||||
/obj/item/material/shard/shrapnel/flechette/New(loc)
|
||||
..(loc, "titanium")
|
||||
..(loc, MATERIAL_TITANIUM)
|
||||
|
||||
/obj/item/material/shard/phoron/New(loc)
|
||||
..(loc, "borosilicate glass")
|
||||
..(loc, MATERIAL_GLASS_PHORON)
|
||||
|
||||
/obj/item/material/shard/wood/New(loc)
|
||||
..(loc, "wood")
|
||||
..(loc, MATERIAL_WOOD)
|
||||
|
||||
@@ -293,13 +293,13 @@
|
||||
|
||||
//predefined materials for spears
|
||||
/obj/item/material/twohanded/spear/steel/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
..(newloc, MATERIAL_STEEL)
|
||||
|
||||
/obj/item/material/twohanded/spear/plasteel/New(var/newloc)
|
||||
..(newloc,"plasteel")
|
||||
..(newloc, MATERIAL_PLASTEEL)
|
||||
|
||||
/obj/item/material/twohanded/spear/diamond/New(var/newloc)
|
||||
..(newloc,"diamond")
|
||||
..(newloc, MATERIAL_DIAMOND)
|
||||
|
||||
/obj/structure/headspear
|
||||
name = "head on a spear"
|
||||
@@ -307,7 +307,6 @@
|
||||
icon_state = "headspear"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/material = "glass"
|
||||
|
||||
/obj/structure/headspear/attack_hand(mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] kicks over \the [src]!</span>", "<span class='danger'>You kick down \the [src]!</span>")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/maxcharge = 1000
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 50)
|
||||
|
||||
//currently only used by energy-type guns, that may change in the future.
|
||||
/obj/item/cell/device
|
||||
@@ -26,7 +26,7 @@
|
||||
throw_speed = 5
|
||||
throw_range = 7
|
||||
maxcharge = 1000
|
||||
matter = list("metal" = 350, "glass" = 50)
|
||||
matter = list(MATERIAL_STEEL = 350, MATERIAL_GLASS = 50)
|
||||
|
||||
/obj/item/cell/device/variable/New(newloc, charge_amount)
|
||||
..(newloc)
|
||||
@@ -38,7 +38,7 @@
|
||||
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
|
||||
origin_tech = list(TECH_POWER = 0)
|
||||
maxcharge = 500
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 40)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 40)
|
||||
|
||||
/obj/item/cell/crap/empty/Initialize()
|
||||
. = ..()
|
||||
@@ -48,7 +48,7 @@
|
||||
name = "security borg rechargable D battery"
|
||||
origin_tech = list(TECH_POWER = 0)
|
||||
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 40)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 40)
|
||||
|
||||
/obj/item/cell/secborg/empty/Initialize()
|
||||
. = ..()
|
||||
@@ -58,21 +58,21 @@
|
||||
name = "heavy-duty power cell"
|
||||
origin_tech = list(TECH_POWER = 1)
|
||||
maxcharge = 5000
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 50)
|
||||
|
||||
/obj/item/cell/high
|
||||
name = "high-capacity power cell"
|
||||
origin_tech = list(TECH_POWER = 2)
|
||||
icon_state = "hcell"
|
||||
maxcharge = 10000
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 60)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 60)
|
||||
|
||||
/obj/item/cell/mecha
|
||||
name = "exosuit-grade power cell"
|
||||
origin_tech = list(TECH_POWER = 3)
|
||||
icon_state = "hcell"
|
||||
maxcharge = 15000
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 70)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 70)
|
||||
|
||||
/obj/item/cell/high/empty/Initialize()
|
||||
. = ..()
|
||||
@@ -83,7 +83,7 @@
|
||||
origin_tech = list(TECH_POWER = 5)
|
||||
icon_state = "scell"
|
||||
maxcharge = 20000
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 70)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 70)
|
||||
|
||||
/obj/item/cell/super/empty/Initialize()
|
||||
. = ..()
|
||||
@@ -94,7 +94,7 @@
|
||||
origin_tech = list(TECH_POWER = 6)
|
||||
icon_state = "hpcell"
|
||||
maxcharge = 30000
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 80)
|
||||
|
||||
/obj/item/cell/hyper/empty/Initialize()
|
||||
. = ..()
|
||||
@@ -105,7 +105,7 @@
|
||||
icon_state = "icell"
|
||||
origin_tech = null
|
||||
maxcharge = 30000 //determines how badly mobs get shocked
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 80)
|
||||
|
||||
check_charge()
|
||||
return 1
|
||||
@@ -138,7 +138,7 @@
|
||||
desc = "A small power cell intended for use with emergency lighting."
|
||||
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
|
||||
w_class = ITEMSIZE_TINY
|
||||
matter = list("glass" = 20)
|
||||
matter = list(MATERIAL_GLASS = 20)
|
||||
|
||||
/obj/item/cell/device/emergency_light/empty/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
throw_range = 4
|
||||
w_class = 4.0
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
matter = list("glass" = 7500, DEFAULT_WALL_MATERIAL = 1000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1000, MATERIAL_GLASS = 7500)
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
desc = "Retracts stuff."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "retractor"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 5000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000, MATERIAL_GLASS = 5000)
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
@@ -31,7 +31,7 @@
|
||||
desc = "You think you have seen this before."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "hemostat"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 2500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
@@ -46,7 +46,7 @@
|
||||
desc = "This stops bleeding."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "cautery"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 2500)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
|
||||
flags = CONDUCT
|
||||
w_class = 2.0
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
@@ -62,7 +62,7 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "drill"
|
||||
hitsound = 'sound/weapons/saw/circsawhit.ogg'
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 10000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 15000, MATERIAL_GLASS = 10000)
|
||||
flags = CONDUCT
|
||||
force = 15.0
|
||||
w_class = 3
|
||||
@@ -88,7 +88,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 5000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000, MATERIAL_GLASS = 5000)
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 20000,"glass" = 10000)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000)
|
||||
attack_verb = list("attacked", "slashed", "sawed", "cut")
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
//Cost to make in the autolathe
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 70, MATERIAL_GLASS = 30)
|
||||
|
||||
//R&D tech level
|
||||
origin_tech = list(TECH_ENGINEERING = 1)
|
||||
@@ -184,7 +184,7 @@
|
||||
name = "industrial welding tool"
|
||||
desc = "A welding tool with an extended-capacity built-in fuel tank, standard issue for engineers."
|
||||
max_fuel = 40
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "glass" = 60)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, MATERIAL_GLASS = 60)
|
||||
base_iconstate = "ind_welder"
|
||||
origin_tech = list(TECH_ENGINEERING = 2)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
name = "advanced welding tool"
|
||||
desc = "A rare and powerful welding tool with a super-extended fuel tank."
|
||||
max_fuel = 80
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200, "glass" = 120)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200, MATERIAL_GLASS = 120)
|
||||
base_iconstate = "adv_welder"
|
||||
origin_tech = list(TECH_ENGINEERING = 3)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
name = "experimental welding tool"
|
||||
desc = "A scientifically-enhanced welding tool that uses fuel-producing microbes to gradually replenish its fuel supply."
|
||||
max_fuel = 40
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, "glass" = 120)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, MATERIAL_GLASS = 120)
|
||||
base_iconstate = "exp_welder"
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_BIO = 4)
|
||||
base_itemstate = "exp_welder"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/parts
|
||||
var/list/climbers
|
||||
var/list/footstep_sound //footstep sounds when stepped on
|
||||
var/material/material
|
||||
|
||||
/obj/structure/Destroy()
|
||||
if(parts)
|
||||
@@ -187,5 +188,9 @@
|
||||
return 0
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
||||
user.do_attack_animation(src)
|
||||
spawn(1) qdel(src)
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/get_material()
|
||||
return material
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(2))
|
||||
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
|
||||
to_chat(user, "<span class='notice'>You installed [SSmaterials.material_display_name(material_name)] plating into the airlock assembly.</span>")
|
||||
glass = material_name
|
||||
|
||||
else if(W.isscrewdriver() && state == 2 )
|
||||
|
||||
@@ -136,13 +136,15 @@
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now unsecuring support struts...</span>")
|
||||
if(do_after(user,40/W.toolspeed))
|
||||
if(!src) return
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
|
||||
state = 1
|
||||
else if(anchored && !reinf_material)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
reinforcing = !reinforcing
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
|
||||
return
|
||||
|
||||
else if(W.iswirecutter() && state == 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
@@ -198,7 +200,7 @@
|
||||
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
|
||||
return 0
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/material/M = SSmaterials.get_material_by_name(S.default_type)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
|
||||
@@ -239,7 +241,7 @@
|
||||
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
|
||||
return 0
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/material/M = SSmaterials.get_material_by_name(S.default_type)
|
||||
if(!istype(M) || M.integrity < 50)
|
||||
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
|
||||
return 0
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon = 'icons/obj/doors/material_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/material/material
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/oreAmount = 7
|
||||
@@ -26,7 +25,7 @@
|
||||
..()
|
||||
if(!material_name)
|
||||
material_name = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(material_name)
|
||||
material = SSmaterials.get_material_by_name(material_name)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -63,9 +62,6 @@
|
||||
if(lock)
|
||||
to_chat(user, "<span class='notice'>It appears to have a lock.</span>")
|
||||
|
||||
/obj/structure/simple_door/get_material()
|
||||
return material
|
||||
|
||||
/obj/structure/simple_door/CollidedWith(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
@@ -222,32 +218,32 @@
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "iron", complexity)
|
||||
..(newloc, MATERIAL_IRON, complexity)
|
||||
|
||||
/obj/structure/simple_door/silver/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "silver", complexity)
|
||||
..(newloc, MATERIAL_SILVER, complexity)
|
||||
|
||||
/obj/structure/simple_door/gold/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "gold", complexity)
|
||||
..(newloc, MATERIAL_GOLD, complexity)
|
||||
|
||||
/obj/structure/simple_door/uranium/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "uranium", complexity)
|
||||
..(newloc, MATERIAL_URANIUM, complexity)
|
||||
|
||||
/obj/structure/simple_door/sandstone/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "sandstone", complexity)
|
||||
..(newloc, MATERIAL_SANDSTONE, complexity)
|
||||
|
||||
/obj/structure/simple_door/phoron/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "phoron", complexity)
|
||||
..(newloc, MATERIAL_PHORON, complexity)
|
||||
|
||||
/obj/structure/simple_door/diamond/New(var/newloc,var/material_name, var/complexity)
|
||||
..(newloc, "diamond", complexity)
|
||||
..(newloc, MATERIAL_DIAMOND, complexity)
|
||||
|
||||
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
|
||||
..(newloc, "wood")
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
|
||||
..(newloc, "resin")
|
||||
..(newloc, MATERIAL_RESIN)
|
||||
|
||||
/obj/structure/simple_door/cult/New(var/newloc, var/material_name)
|
||||
..(newloc, "cult")
|
||||
..(newloc, MATERIAL_CULT)
|
||||
color = COLOR_CULT_DOOR // looks better than the standard cult colours
|
||||
@@ -16,7 +16,6 @@
|
||||
can_buckle = 1
|
||||
buckle_dir = SOUTH
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
var/base_icon = "bed"
|
||||
var/can_dismantle = 1
|
||||
@@ -30,17 +29,14 @@
|
||||
color = null
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
material = SSmaterials.get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
padding_material = SSmaterials.get_material_by_name(new_padding_material)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/get_material()
|
||||
return material
|
||||
|
||||
/obj/structure/bed/buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
if(. && buckle_sound)
|
||||
@@ -163,7 +159,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/proc/add_padding(var/padding_type)
|
||||
padding_material = get_material_by_name(padding_type)
|
||||
padding_material = SSmaterials.get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/proc/dismantle()
|
||||
@@ -178,10 +174,10 @@
|
||||
base_icon = "psychbed"
|
||||
|
||||
/obj/structure/bed/psych/New(var/newloc)
|
||||
..(newloc,"wood","leather")
|
||||
..(newloc, MATERIAL_WOOD, MATERIAL_LEATHER)
|
||||
|
||||
/obj/structure/bed/padded/New(var/newloc)
|
||||
..(newloc,"plastic","cotton")
|
||||
..(newloc, MATERIAL_PLASTIC, MATERIAL_COTTON)
|
||||
|
||||
/obj/structure/bed/aqua
|
||||
name = "aquabed"
|
||||
|
||||
@@ -77,31 +77,31 @@
|
||||
icon_state = "comfychair_preview"
|
||||
|
||||
/obj/structure/bed/chair/comfy/brown/Initialize(mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","leather")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_LEATHER)
|
||||
|
||||
/obj/structure/bed/chair/comfy/red/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","carpet")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/structure/bed/chair/comfy/teal/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","teal")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
|
||||
|
||||
/obj/structure/bed/chair/comfy/black/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","black")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
|
||||
|
||||
/obj/structure/bed/chair/comfy/green/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","green")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
|
||||
|
||||
/obj/structure/bed/chair/comfy/purp/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","purple")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/blue/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","blue")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/beige/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","beige")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
|
||||
|
||||
/obj/structure/bed/chair/comfy/lime/Initialize(var/mapload,var/newmaterial)
|
||||
. = ..(mapload,"steel","lime")
|
||||
. = ..(mapload, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
|
||||
|
||||
/obj/structure/bed/chair/office
|
||||
anchored = 0
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
material = SSmaterials.get_material_by_name(new_material)
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
padding_material = SSmaterials.get_material_by_name(new_padding_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
@@ -35,10 +35,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/padded/New(var/newloc, var/new_material)
|
||||
..(newloc, "steel", "carpet")
|
||||
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
|
||||
|
||||
/obj/item/stool/wood/New(var/newloc, var/new_material)
|
||||
..(newloc, "wood")
|
||||
..(newloc, MATERIAL_WOOD)
|
||||
|
||||
/obj/item/stool/hover
|
||||
name = "hoverstool"
|
||||
@@ -47,7 +47,7 @@
|
||||
item_state_slots = null
|
||||
|
||||
/obj/item/stool/hover/New(var/newloc, var/new_material)
|
||||
..(newloc, "skrell")
|
||||
..(newloc, MATERIAL_SHUTTLE_SKRELL)
|
||||
|
||||
/obj/item/stool/hover/Initialize()
|
||||
.=..()
|
||||
@@ -85,7 +85,7 @@
|
||||
desc = "A stool. Apply butt with care. It's made of [material.use_name]."
|
||||
|
||||
/obj/item/stool/proc/add_padding(var/padding_type)
|
||||
padding_material = get_material_by_name(padding_type)
|
||||
padding_material = SSmaterials.get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/item/stool/proc/remove_padding()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pocketwatch"
|
||||
drop_sound = 'sound/items/drop/accessory.ogg'
|
||||
matter = list("glass" = 150, "gold" = 50)
|
||||
matter = list(MATERIAL_GLASS = 150, MATERIAL_GOLD = 50)
|
||||
w_class = 1
|
||||
var/closed = FALSE
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pocketwatch"
|
||||
drop_sound = 'sound/items/drop/accessory.ogg'
|
||||
matter = list("glass" = 150, "gold" = 50)
|
||||
matter = list(MATERIAL_GLASS = 150, MATERIAL_GOLD = 50)
|
||||
w_class = 1
|
||||
var/datum/weakref/thrall = null
|
||||
var/time_counter = 0
|
||||
|
||||
Reference in New Issue
Block a user