Merge pull request #12934 from farie82/Item-armor-fix

Make every obj/.../New() call it's parents, Fixes things not burning on lava and causing runtimes
This commit is contained in:
Fox McCloud
2020-02-24 19:42:19 -05:00
committed by GitHub
39 changed files with 89 additions and 44 deletions
@@ -27,6 +27,7 @@
desc = "A random Nano-Mob Trading Card from a Booster Pack. Wonder what it is?"
/obj/item/nanomob_card/booster/New()
..()
var/datum/mob_hunt/mob_info = pick(subtypesof(/datum/mob_hunt))
mob_data = new mob_info(0,null,1)
update_info()
@@ -105,11 +105,13 @@ var/sc_safecode5 = "[rand(0,9)]"
name = "smudged paper"
/obj/item/paper/sc_safehint_paper_prison/New()
..()
info = "<i>The ink is smudged, you can only make out a couple numbers:</i> '[sc_safecode1]**[sc_safecode4]*'"
/obj/item/paper/sc_safehint_paper_hydro
name = "shredded paper"
/obj/item/paper/sc_safehint_paper_hydro/New()
..()
info = "<i>Although the paper is shredded, you can clearly see the number:</i> '[sc_safecode2]'"
/obj/item/paper/sc_safehint_paper_caf
@@ -120,6 +122,7 @@ var/sc_safecode5 = "[rand(0,9)]"
/obj/item/paper/sc_safehint_paper_bible
name = "hidden paper"
/obj/item/paper/sc_safehint_paper_bible/New()
..()
info = {"<i>It would appear that the pen hidden with the paper had leaked ink over the paper.
However you can make out the last three digits:</i>'[sc_safecode3][sc_safecode4][sc_safecode5]'
"}
+14 -9
View File
@@ -9,16 +9,14 @@
var/fluff_material = FALSE //If true, will ignore the material when examining
var/material = "iron"
var/stud = 0
var/ring_color = "iron"
/obj/item/clothing/gloves/ring/New()
..()
update_icon()
/obj/item/clothing/gloves/ring/update_icon()
if(stud)
icon_state = "d_[initial(icon_state)]"
else
icon_state = initial(icon_state)
icon_state = "[stud ? "d_" : ""][ring_color]ring"
/obj/item/clothing/gloves/ring/examine(mob/user)
. = ..()
@@ -44,6 +42,7 @@
name = "silver ring"
icon_state = "silverring"
material = "silver"
ring_color = "silver"
/obj/item/clothing/gloves/ring/silver/blessed // todo
name = "blessed silver ring"
@@ -52,6 +51,7 @@
name = "gold ring"
icon_state = "goldring"
material = "gold"
ring_color = "gold"
/obj/item/clothing/gloves/ring/gold/blessed
name = "wedding band"
@@ -61,40 +61,45 @@
name = "white plastic ring"
icon_state = "whitering"
material = "plastic"
ring_color = "white"
/obj/item/clothing/gloves/ring/plastic/blue
name = "blue plastic ring"
icon_state = "bluering"
ring_color = "blue"
/obj/item/clothing/gloves/ring/plastic/red
name = "red plastic ring"
icon_state = "redring"
/obj/item/clothing/gloves/ring/plastic/random
ring_color = "red"
/obj/item/clothing/gloves/ring/plastic/random/New()
var/c = pick("white","blue","red")
name = "[c] plastic ring"
icon_state = "[c]ring"
ring_color = pick("white","blue","red")
name = "[ring_color] plastic ring"
..()
// weird
/obj/item/clothing/gloves/ring/glass
name = "glass ring"
icon_state = "whitering"
material = "glass"
ring_color = "white"
/obj/item/clothing/gloves/ring/plasma
name = "plasma ring"
icon_state = "plasmaring"
material = "plasma"
ring_color = "plasma"
/obj/item/clothing/gloves/ring/uranium
name = "uranium ring"
icon_state = "uraniumring"
material = "uranium"
ring_color = "uranium"
// cultish
/obj/item/clothing/gloves/ring/shadow
name = "shadow ring"
icon_state = "shadowring"
material = "shadows"
ring_color = "shadow"
+3 -2
View File
@@ -103,8 +103,8 @@
icon_state = "glofish"
/obj/item/fish/glofish/New()
..()
set_light(2,1,"#99FF66")
..()
set_light(2,1,"#99FF66")
/obj/item/fish/electric_eel
name = "electric eel"
@@ -143,6 +143,7 @@
materials = list()
/obj/item/shard/shark_teeth/New()
..()
src.pixel_x = rand(-5,5)
src.pixel_y = rand(-5,5)
@@ -248,21 +248,26 @@
..()
/obj/item/pizzabox/margherita/New()
..()
pizza = new /obj/item/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
boxtag = "margherita deluxe"
/obj/item/pizzabox/vegetable/New()
..()
pizza = new /obj/item/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
boxtag = "gourmet vegatable"
/obj/item/pizzabox/mushroom/New()
..()
pizza = new /obj/item/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
boxtag = "mushroom special"
/obj/item/pizzabox/meat/New()
..()
pizza = new /obj/item/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
boxtag = "meatlover's supreme"
/obj/item/pizzabox/hawaiian/New()
..()
pizza = new /obj/item/reagent_containers/food/snacks/sliceable/pizza/hawaiianpizza(src)
boxtag = "Hawaiian feast"
@@ -232,6 +232,7 @@ var/list/ingredients_source = list(
bitesize = 3
/obj/item/reagent_containers/food/snacks/icecream/New()
..()
create_reagents(20)
reagents.add_reagent("nutriment", 5)
-3
View File
@@ -33,9 +33,6 @@
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
/obj/item/toy/xmas_cracker/New()
..()
/obj/item/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
target.visible_message("<span class='notice'>[user] and [target] pop \an [src]! *pop*</span>", "<span class='notice'>You pull \an [src] with [target]! *pop*</span>", "<span class='notice'>You hear a *pop*.</span>")
+1
View File
@@ -325,6 +325,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
var/credits = 10
/obj/item/coin/New()
..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
@@ -28,6 +28,7 @@
/obj/item/robot_module/New()
..()
modules += new /obj/item/flash/cyborg(src)
emag = new /obj/item/toy/sword(src)
emag.name = "Placeholder Emag Item"
@@ -505,6 +506,7 @@
)
/obj/item/robot_module/alien/hunter/New()
..()
modules += new /obj/item/melee/energy/alien/claws(src)
modules += new /obj/item/flash/cyborg/alien(src)
var/obj/item/reagent_containers/spray/alien/stun/S = new /obj/item/reagent_containers/spray/alien/stun(src)
@@ -538,6 +540,7 @@
)
/obj/item/robot_module/drone/New()
..()
modules += new /obj/item/weldingtool/largetank/cyborg(src)
modules += new /obj/item/screwdriver/cyborg(src)
modules += new /obj/item/wrench/cyborg(src)
+1
View File
@@ -720,6 +720,7 @@
origin_tech = "combat=4;materials=4;engineering=4;biotech=4"
/obj/item/paper/researchnotes/New()
..()
var/list/possible_techs = list("materials", "engineering", "plasmatech", "powerstorage", "bluespace", "biotech", "combat", "magnets", "programming", "syndicate")
var/mytech = pick(possible_techs)
var/mylevel = rand(7, 9)
+12 -12
View File
@@ -200,16 +200,16 @@
icon_state = "pdabox"
/obj/item/storage/box/PDAs/New()
..()
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/cartridge/head(src)
..()
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/pda(src)
new /obj/item/cartridge/head(src)
var/newcart = pick( /obj/item/cartridge/engineering,
/obj/item/cartridge/security,
/obj/item/cartridge/medical,
/obj/item/cartridge/signal/toxins,
/obj/item/cartridge/quartermaster)
new newcart(src)
var/newcart = pick( /obj/item/cartridge/engineering,
/obj/item/cartridge/security,
/obj/item/cartridge/medical,
/obj/item/cartridge/signal/toxins,
/obj/item/cartridge/quartermaster)
new newcart(src)
@@ -13,6 +13,7 @@
var/brightness = 2
/obj/item/shard/supermatter/New()
..()
src.icon_state = "supermatter" + pick("large", "medium", "small")
switch(src.icon_state)
if("supermattersmall")
+1
View File
@@ -102,6 +102,7 @@
var/list/initial_mats //For calculating refund values.
/obj/item/ammo_box/New()
..()
for(var/i in 1 to max_ammo)
stored_ammo += new ammo_type(src)
update_icon()
@@ -157,6 +157,8 @@
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/New()
..()
stored_ammo.Cut() // We only want 1 bullet in there
stored_ammo += new ammo_type(src)
/obj/item/ammo_box/magazine/internal/boltaction
+1
View File
@@ -618,6 +618,7 @@
var/floof
/obj/item/relic/New()
..()
icon_state = pick("shock_kit","armor-igniter-analyzer","infra-igniter0","infra-igniter1","radio-multitool","prox-radio1","radio-radio","timer-multitool0","radio-igniter-tank")
realName = "[pick("broken","twisted","spun","improved","silly","regular","badly made")] [pick("device","object","toy","suspicious tech","gear")]"
floof = pick(/mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/fox, /mob/living/simple_animal/mouse, /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/lizard, /mob/living/simple_animal/diona, /mob/living/simple_animal/butterfly, /mob/living/carbon/human/monkey)
+1
View File
@@ -345,6 +345,7 @@ datum/tech/robotics
var/default_desc = "A disk for storing technology data for further research."
/obj/item/disk/tech_disk/New()
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)