mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Make every obj/.../New() call it's parents
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
read_only = 1
|
||||
|
||||
/obj/item/disk/data/demo/New()
|
||||
initialize()
|
||||
..()
|
||||
buf.types=DNA2_BUF_UE|DNA2_BUF_UI
|
||||
//data = "066000033000000000AF00330660FF4DB002690"
|
||||
//data = "0C80C80C80C80C80C8000000000000161FBDDEF" - Farmer Jeff
|
||||
@@ -145,7 +145,7 @@
|
||||
read_only = 1
|
||||
|
||||
/obj/item/disk/data/monkey/New()
|
||||
initialize()
|
||||
..()
|
||||
buf.types=DNA2_BUF_SE
|
||||
var/list/new_SE=list(0x098,0x3E8,0x403,0x44C,0x39F,0x4B0,0x59D,0x514,0x5FC,0x578,0x5DC,0x640,0x6A4)
|
||||
for(var/i=new_SE.len;i<=DNA_SE_LENGTH;i++)
|
||||
|
||||
@@ -415,9 +415,11 @@
|
||||
var/active = 0
|
||||
|
||||
/obj/item/holo/esword/green/New()
|
||||
..()
|
||||
item_color = "green"
|
||||
|
||||
/obj/item/holo/esword/red/New()
|
||||
..()
|
||||
item_color = "red"
|
||||
|
||||
/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
@@ -426,6 +428,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/holo/esword/New()
|
||||
..()
|
||||
item_color = pick("red","blue","green","purple")
|
||||
|
||||
/obj/item/holo/esword/attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
on = TRUE //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/flashlight/slime/New()
|
||||
..()
|
||||
set_light(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
/obj/item/sensor_device/New()
|
||||
..()
|
||||
crew_monitor = new(src)
|
||||
|
||||
/obj/item/sensor_device/Destroy()
|
||||
|
||||
@@ -15,11 +15,14 @@
|
||||
var/obj/item/tape/mytape
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
var/starts_with_tape = TRUE
|
||||
|
||||
|
||||
/obj/item/taperecorder/New()
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon()
|
||||
..()
|
||||
if(starts_with_tape)
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/taperecorder/Destroy()
|
||||
QDEL_NULL(mytape)
|
||||
@@ -243,8 +246,8 @@
|
||||
canprint = 1
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/taperecorder/empty/New()
|
||||
return
|
||||
/obj/item/taperecorder/empty
|
||||
starts_with_tape = FALSE
|
||||
|
||||
|
||||
/obj/item/tape
|
||||
@@ -317,4 +320,5 @@
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/tape/random/New()
|
||||
..()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
|
||||
/obj/item/thermal_drill/New()
|
||||
..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(1, 0, src)
|
||||
|
||||
@@ -316,6 +316,7 @@ var/list/world_uplinks = list()
|
||||
// implant uplink (not the implant tool) and a preset headset uplink.
|
||||
|
||||
/obj/item/radio/uplink/New()
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
icon_state = "radio"
|
||||
|
||||
@@ -339,6 +340,7 @@ var/list/world_uplinks = list()
|
||||
hidden_uplink.uplink_type = "sst"
|
||||
|
||||
/obj/item/multitool/uplink/New()
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/multitool/uplink/attack_self(mob/user as mob)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
item_state = "balloon-empty"
|
||||
|
||||
/obj/item/toy/balloon/New()
|
||||
..()
|
||||
create_reagents(10)
|
||||
|
||||
/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
@@ -799,6 +800,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/toy/therapy/New()
|
||||
..()
|
||||
if(item_color)
|
||||
name = "[item_color] therapy doll"
|
||||
desc += " This one is [item_color]."
|
||||
|
||||
@@ -18,6 +18,7 @@ RSF
|
||||
var/list/configured_items = list()
|
||||
|
||||
/obj/item/rsf/New()
|
||||
..()
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
|
||||
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
|
||||
@@ -30,7 +31,6 @@ RSF
|
||||
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
|
||||
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
|
||||
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
|
||||
return
|
||||
|
||||
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
@@ -681,6 +681,7 @@
|
||||
|
||||
/obj/item/card/id/prisoner/random
|
||||
/obj/item/card/id/prisoner/random/New()
|
||||
..()
|
||||
var/random_number = "#[rand(0, 99)]-[rand(0, 999)]"
|
||||
name = "Prisoner [random_number]"
|
||||
registered_name = name
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/lipstick/random/New()
|
||||
..()
|
||||
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
|
||||
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
|
||||
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
|
||||
/obj/item/extinguisher/New()
|
||||
..()
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
var/cores = "" // Also for logging
|
||||
|
||||
/obj/item/grenade/chem_grenade/New()
|
||||
..()
|
||||
create_reagents(1000)
|
||||
if(payload_name)
|
||||
payload_name += " " // formatting, ignore me
|
||||
|
||||
@@ -47,4 +47,5 @@
|
||||
hitsound = 'sound/weapons/pierce.ogg'
|
||||
|
||||
/obj/item/embedded/shrapnel/New()
|
||||
..()
|
||||
icon_state = pick("shrapnel1", "shrapnel2", "shrapnel3")
|
||||
|
||||
@@ -556,6 +556,7 @@
|
||||
var/faith = 99 //a conversion requires 100 faith to attempt. faith recharges over time while you are wearing missionary robes that have been linked to the staff.
|
||||
|
||||
/obj/item/nullrod/missionary_staff/New()
|
||||
..()
|
||||
team_color = pick("red", "blue")
|
||||
icon_state = "godstaff-[team_color]"
|
||||
item_state = "godstaff-[team_color]"
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
var/max_contents = 1
|
||||
|
||||
/obj/item/kitchen/utensil/New()
|
||||
..()
|
||||
if(prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
icon_off = "zippo"
|
||||
|
||||
/obj/item/lighter/random/New()
|
||||
var/color = pick("r","c","y","g")
|
||||
icon_on = "lighter-[color]-on"
|
||||
icon_off = "lighter-[color]"
|
||||
icon_state = icon_off
|
||||
..()
|
||||
var/color = pick("r","c","y","g")
|
||||
icon_on = "lighter-[color]-on"
|
||||
icon_off = "lighter-[color]"
|
||||
icon_state = icon_off
|
||||
|
||||
/obj/item/lighter/attack_self(mob/living/user)
|
||||
if(user.r_hand == src || user.l_hand == src || isrobot(user))
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
var/hacked = 0
|
||||
|
||||
/obj/item/melee/energy/sword/New()
|
||||
..()
|
||||
if(item_color == null)
|
||||
item_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
@@ -220,7 +221,7 @@
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/melee/energy/sword/pirate/New()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/melee/energy/blade
|
||||
name = "energy blade"
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
desc = "test lightning"
|
||||
|
||||
/obj/item/lightning/New()
|
||||
icon_state = "1"
|
||||
..()
|
||||
icon_state = "1"
|
||||
|
||||
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
var/angle = get_angle(A, user)
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/item/stock_parts/New()
|
||||
..()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
|
||||
/obj/item/storage/backpack/holding/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/storage/backpack/holding/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
|
||||
@@ -1099,6 +1099,7 @@
|
||||
desc = "Contains a variety of deluxe stock parts."
|
||||
|
||||
/obj/item/storage/box/stockparts/deluxe/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/stock_parts/capacitor/quadratic(src)
|
||||
new /obj/item/stock_parts/scanning_module/triphasic(src)
|
||||
|
||||
@@ -240,6 +240,7 @@
|
||||
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
|
||||
|
||||
/obj/item/twohanded/dualsaber/New()
|
||||
..()
|
||||
if(!blade_color)
|
||||
blade_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
|
||||
@@ -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]'
|
||||
"}
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
var/c = pick("white","blue","red")
|
||||
name = "[c] plastic ring"
|
||||
icon_state = "[c]ring"
|
||||
..()
|
||||
|
||||
// weird
|
||||
/obj/item/clothing/gloves/ring/glass
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -332,6 +332,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)
|
||||
|
||||
@@ -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
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user