mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Sideports a couple of init unit tests from Neb.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
name = "Form - Inventory Requisition r10.7.1E"
|
||||
|
||||
/obj/item/weapon/paper/carbon/cursedform/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
info = {"<font face="Comic Sans MS" color=#DA0000><b><center></center><BR><center><I><B>Form - Inventory Requisition r10.7.1E</I></B></center><BR><center><font size="4">General Request Form</font></center><BR><BR><center><B>General</B></center><BR><BR>Name: <span class="paper_field"></span><BR>Department: <span class="paper_field"></span><BR>Departmental Rank: <span class="paper_field"></span><BR>Organization(If not Nanotrasen): <span class="paper_field"></span><BR>Date: <span class="paper_field"></span><BR><BR><BR><BR>Requested Item(s): <span class="paper_field"></span><BR>Quantity: <span class="paper_field"></span><BR>Reason for request: <span class="paper_field"></span><BR>Is this replacement equipment?: <span class="paper_field"></span><BR>If `Yes`; above, specify equiment and reason for replacement: <span class="paper_field"></span><BR><BR><BR><center><B>Authorization</B></center><BR><BR>Authorizing Department: <span class="paper_field"></span><BR>Authorizing Dept. Head: <span class="paper_field"></span><BR><BR><BR><center><B>Contact and Delivery</B></center><BR><BR>EPv2 Address of requesting party(Do not leave blank): <span class="paper_field"></span><BR>Delivery location or department: <span class="paper_field"></span><BR><BR><BR>Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR><U>Signature of Requester and Date</U><BR><BR><span class="paper_field"></span><BR><BR><BR><BR>Authorizor`s Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR><U>Authorizing Signature and Date(Include authorizing department`s stamp below)</U><BR><BR><span class="paper_field"></span><BR><BR><BR><center><B>Shipping Department Only</B></center><BR><center><I>(Do not write below this line)</I></center><BR>Nanotrasen Purchasing Approval Code: <span class="paper_field"></span><BR>Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR>Receiving Shipping Employee: <span class="paper_field"></span><BR><U>Signature and Date</U><BR><BR><span class="paper_field"></span><BR></b></font>"}
|
||||
info_links = {"<font face="Comic Sans MS" color=#FF9300><b><center></center><BR><center><I><B>Form - Inventory Requisition r10.7.1E</I></B></center><BR><center><font size="4">General Request Form</font></center><BR><BR><center><B>General</B></center><BR><BR>Name: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=1'>write</A></font></span><BR>Department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=2'>write</A></font></span><BR>Departmental Rank: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=3'>write</A></font></span><BR>Organization(If not Nanotrasen): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=4'>write</A></font></span><BR>Date: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=5'>write</A></font></span><BR><BR><BR><BR>Requested Item(s): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=6'>write</A></font></span><BR>Quantity: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=7'>write</A></font></span><BR>Reason for request: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=8'>write</A></font></span><BR>Is this replacement equipment?: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=9'>write</A></font></span><BR>If `Yes` above, specify equiment and reason for replacement: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=10'>write</A></font></span><BR><BR><BR><center><B>Authorization</B></center><BR><BR>Authorizing Department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=11'>write</A></font></span><BR>Authorizing Dept. Head: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=12'>write</A></font></span><BR><BR><BR><center><B>Contact and Delivery</B></center><BR><BR>EPv2 Address of requesting party(Do not leave blank): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=13'>write</A></font></span><BR>Delivery location or department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=14'>write</A></font></span><BR><BR><BR>Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=15'>write</A></font></span><BR><U>Signature of Requester and Date</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=16'>write</A></font></span><BR><BR><BR><BR>Authorizor`s Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=17'>write</A></font></span><BR><U>Authorizing Signature and Date(Include authorizing department`s stamp below)</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=18'>write</A></font></span><BR><BR><BR><center><B>Shipping Department Only</B></center><BR><center><I>(Do not write below this line)</I></center><BR>Nanotrasen Purchasing Approval Code: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=19'>write</A></font></span><BR>Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=20'>write</A></font></span><BR>Receiving Shipping Employee: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=21'>write</A></font></span><BR><U>Signature and Date</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=22'>write</A></font></span><BR></b></font><font face="Verdana"><A href='?src=[0x2057e0c];write=end'>write</A></font>"}
|
||||
|
||||
|
||||
@@ -8,18 +8,14 @@
|
||||
/obj/effect/spawner/lootdrop/Initialize()
|
||||
..()
|
||||
var/list/things = params2list(loot)
|
||||
|
||||
if(things && things.len)
|
||||
for(var/i = lootcount, i > 0, i--)
|
||||
if(!things.len)
|
||||
return
|
||||
|
||||
var/loot_spawn = pick(things)
|
||||
var/loot_path = text2path(loot_spawn)
|
||||
|
||||
if(!loot_path || !lootdoubles)
|
||||
things.Remove(loot_spawn)
|
||||
continue
|
||||
|
||||
new loot_path(get_turf(src))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
if( findtext(href,"<script",1,0) )
|
||||
to_world_log("Attempted use of scripts within a topic call, by [src]")
|
||||
message_admins("Attempted use of scripts within a topic call, by [src]")
|
||||
//del(usr)
|
||||
return
|
||||
|
||||
// Tgui Topic middleware
|
||||
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
// Physical traits are what they sound like, and involve the character's physical body, as opposed to their mental state.
|
||||
/datum/trait/modifier/physical
|
||||
<<<<<<< HEAD
|
||||
category = "Physical Quirks" //VOREStation Edit
|
||||
=======
|
||||
name = "Physical"
|
||||
category = "Physical"
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
|
||||
/datum/trait/modifier/physical/flimsy
|
||||
@@ -194,6 +199,7 @@
|
||||
// 'Mental' traits are just those that only sapients can have, for now, and generally involves fears.
|
||||
// So far, all of them are just for fluff/don't have mechanical effects.
|
||||
/datum/trait/modifier/mental
|
||||
name = "Mental"
|
||||
category = "Mental"
|
||||
|
||||
/datum/trait/modifier/mental/test_for_invalidity(var/datum/category_item/player_setup_item/traits/setup)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
return battery
|
||||
|
||||
/obj/item/clothing/gloves/ring/buzzer/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!battery)
|
||||
battery = new battery_type(src)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/hide_on_roll = FALSE
|
||||
|
||||
/obj/item/clothing/accessory/storage/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold = new/obj/item/weapon/storage/internal(src)
|
||||
hold.max_storage_space = slots * 2
|
||||
hold.max_w_class = ITEMSIZE_SMALL
|
||||
@@ -95,7 +95,7 @@
|
||||
slots = 2
|
||||
|
||||
/obj/item/clothing/accessory/storage/knifeharness/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold.max_storage_space = ITEMSIZE_COST_SMALL * 2
|
||||
hold.can_hold = list(/obj/item/weapon/material/knife/machete/hatchet/unathiknife,\
|
||||
/obj/item/weapon/material/knife,\
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
slots = 3
|
||||
|
||||
/obj/item/clothing/accessory/storage/vox/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold.max_storage_space = slots * ITEMSIZE_COST_NORMAL
|
||||
hold.max_w_class = ITEMSIZE_NORMAL
|
||||
@@ -23,7 +23,7 @@
|
||||
var/list/accepted_mobs = list(/mob/living/simple_mob/animal/passive/fish)
|
||||
|
||||
/obj/item/weapon/material/fishing_net/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/fishing_net/afterattack(var/atom/A, var/mob/user, var/proximity)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = base_icon
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/on_reagent_change()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("spacemountainwind", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko
|
||||
@@ -92,7 +92,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_up/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("space_up", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime
|
||||
@@ -103,7 +103,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("lemon_lime", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea
|
||||
@@ -114,7 +114,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("icetea", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice
|
||||
@@ -125,7 +125,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("grapejuice", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
pickup_sound = 'sound/items/pickup/papercup.ogg'
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("hot_coco", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/greentea
|
||||
@@ -298,7 +298,7 @@
|
||||
pickup_sound = 'sound/items/pickup/papercup.ogg'
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/dry_ramen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("dry_ramen", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("space_up", 100)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind
|
||||
@@ -398,7 +398,7 @@
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("spacemountainwind", 100)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine
|
||||
|
||||
@@ -3720,26 +3720,32 @@
|
||||
/obj/item/pizzabox/margherita/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
|
||||
boxtag = "Margherita Deluxe"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/vegetable/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
|
||||
boxtag = "Gourmet Vegatable"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/mushroom/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
|
||||
boxtag = "Mushroom Special"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/meat/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
|
||||
boxtag = "Meatlover's Supreme"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/pineapple/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pineapple(src)
|
||||
boxtag = "Hawaiian Sunrise"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/old/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza(src)
|
||||
boxtag = "Deluxe Gourmet"
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dionaroast
|
||||
name = "roast diona"
|
||||
@@ -4547,7 +4553,7 @@
|
||||
icon_state = "bagelplain"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bageltwo/Initialize()
|
||||
..() //Not returning . because asking to be qdel'd below.
|
||||
..()
|
||||
spawn_bagels()
|
||||
spawn_bagels()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -6261,7 +6267,7 @@
|
||||
nutriment_desc = list("tomato" = 4, "meat" = 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/lasagna/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 2) //For meaty things.
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/gigapuddi
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
volume = 80
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chaoscakeslice/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/i = rand(1,6)
|
||||
icon_state = "chaoscake_slice-[i]"
|
||||
switch(i)
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
item_level = 1
|
||||
|
||||
/obj/machinery/microwave/advanced/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.maximum_volume = 1000
|
||||
|
||||
/datum/recipe/splat // We use this to handle cooking micros (or mice, etc) in a microwave. Janky but it works better than snowflake code to handle the same thing.
|
||||
|
||||
@@ -244,8 +244,8 @@
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
|
||||
/obj/item/stack/material/wax/New()
|
||||
..()
|
||||
/obj/item/stack/material/wax/Initialize()
|
||||
. = ..()
|
||||
recipes = wax_recipes
|
||||
|
||||
/datum/material/wax
|
||||
|
||||
@@ -175,9 +175,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/Initialize()
|
||||
<<<<<<< HEAD
|
||||
. = ..()
|
||||
if(!ov_lowhealth)
|
||||
setup_overlays()
|
||||
=======
|
||||
..()
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
temp_chem_holder = new()
|
||||
temp_chem_holder.create_reagents(10)
|
||||
create_reagents(200)
|
||||
|
||||
@@ -289,7 +289,6 @@
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/transfer(src)
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/converter(src)
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/power(src)
|
||||
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/assembly/electronic_assembly(src)
|
||||
new /obj/item/device/assembly/electronic_assembly(src)
|
||||
|
||||
@@ -356,11 +356,9 @@
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
// Set the pins so when someone sees them, they won't show as null
|
||||
set_pin_data(IC_INPUT, 1, frequency)
|
||||
set_pin_data(IC_INPUT, 2, code)
|
||||
push_data()
|
||||
addtimer(CALLBACK(src, .proc/set_frequency, frequency), 40)
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
@@ -574,7 +572,7 @@
|
||||
)
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/sign/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/lang in readable_langs)
|
||||
var/datum/language/newlang = GLOB.all_languages[lang]
|
||||
my_langs |= newlang
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
var/mob/living/voice/my_voice
|
||||
|
||||
/obj/item/integrated_circuit/output/text_to_speech/advanced/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
my_voice = new (src)
|
||||
mob_list -= my_voice // no life() ticks
|
||||
my_voice.name = "TTS Circuit"
|
||||
|
||||
@@ -139,7 +139,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/static/list/base_genre_books
|
||||
|
||||
/obj/machinery/librarycomp/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!base_genre_books || !base_genre_books.len)
|
||||
base_genre_books = list(
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
var/annihilate = FALSE // If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in.
|
||||
var/fixed_orientation = FALSE // If true, the submap will not be rotated randomly when loaded.
|
||||
|
||||
var/cost = null // The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until \
|
||||
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc. \
|
||||
Set to -1 to force the submap to always be made.
|
||||
var/cost = null /* The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until
|
||||
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc.
|
||||
Set to -1 to force the submap to always be made. */
|
||||
var/allow_duplicates = FALSE // If false, only one map template will be spawned by the game. Doesn't affect admins spawning then manually.
|
||||
var/discard_prob = 0 // If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use.
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/obj/item/stack/material/New()
|
||||
..()
|
||||
/obj/item/stack/material/Initialize()
|
||||
. = ..()
|
||||
|
||||
randpixel_xy()
|
||||
|
||||
if(!default_type)
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name("[default_type]")
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return 0
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
@@ -44,7 +44,6 @@
|
||||
|
||||
matter = material.get_matter()
|
||||
update_strings()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/material/get_material()
|
||||
return material
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
gender = NEUTER
|
||||
matter = null // Don't shove it in the autholathe.
|
||||
|
||||
/obj/item/stack/material/cyborg/New()
|
||||
if(..())
|
||||
name = "[material.display_name] synthesiser"
|
||||
desc = "A device that synthesises [material.display_name]."
|
||||
matter = null
|
||||
/obj/item/stack/material/cyborg/Initialize()
|
||||
. = ..()
|
||||
name = "[material.display_name] synthesiser"
|
||||
desc = "A device that synthesises [material.display_name]."
|
||||
matter = null
|
||||
|
||||
/obj/item/stack/material/cyborg/update_strings()
|
||||
return
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
qdel(S)
|
||||
for(var/stacktype in subtypesof(/obj/item/stack/material))
|
||||
var/obj/item/stack/S = stacktype
|
||||
var/s_name = initial(S.name)
|
||||
stack_storage[s_name] = 0
|
||||
stack_paths[s_name] = stacktype
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/material/glass
|
||||
|
||||
@@ -158,9 +158,10 @@
|
||||
var/upright = 0
|
||||
var/base_state
|
||||
|
||||
/obj/item/stack/flag/New()
|
||||
..()
|
||||
/obj/item/stack/flag/Initialize()
|
||||
. = ..()
|
||||
base_state = icon_state
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/flag/blue
|
||||
name = "blue flags"
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
randpixel_xy()
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
visualnet = cameranet
|
||||
|
||||
/mob/observer/eye/aiEye/Destroy()
|
||||
if(owner)
|
||||
var/mob/living/silicon/ai/ai = owner
|
||||
ai.all_eyes -= src
|
||||
owner = null
|
||||
. = ..()
|
||||
if(owner)
|
||||
var/mob/living/silicon/ai/ai = owner
|
||||
ai.all_eyes -= src
|
||||
owner = null
|
||||
. = ..()
|
||||
|
||||
/mob/observer/eye/aiEye/setLoc(var/T, var/cancel_tracking = 1)
|
||||
if(owner)
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
/obj/effect/Initialize()
|
||||
. = ..()
|
||||
updateVisibility(src)
|
||||
|
||||
// DOORS
|
||||
|
||||
@@ -140,6 +140,6 @@
|
||||
to_wear_r_hand = null
|
||||
|
||||
/mob/living/carbon/human/ai_controlled/replicant/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
name = species.get_random_name(gender)
|
||||
add_modifier(/datum/modifier/homeothermic, 0, null)
|
||||
|
||||
@@ -978,7 +978,7 @@ var/list/ai_verbs_default = list(
|
||||
drop_new_multicam()
|
||||
|
||||
//Special subtype kept around for global announcements
|
||||
/mob/living/silicon/ai/announcer/
|
||||
/mob/living/silicon/ai/announcer
|
||||
is_dummy = 1
|
||||
|
||||
/mob/living/silicon/ai/announcer/Initialize()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
)
|
||||
|
||||
/mob/living/silicon/robot/drone/swarm/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
add_language(LANGUAGE_SWARMBOT, 1)
|
||||
|
||||
|
||||
@@ -158,5 +158,5 @@
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/energy/xray/swarm/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(-1, 1)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
var/dummy_card_type = /obj/item/weapon/card/id/science/roboticist/dummy_cyborg
|
||||
|
||||
/obj/item/weapon/card/robot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
dummy_card = new dummy_card_type(src)
|
||||
|
||||
/obj/item/weapon/card/robot/Destroy()
|
||||
@@ -149,7 +149,7 @@
|
||||
access = list(access_robotics)
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/dummy_cyborg/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
access |= access_robotics
|
||||
|
||||
//A harvest item for serviceborgs.
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/sif_crab)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/crab/sif/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(rand(5,12) / 10)
|
||||
|
||||
// Meat!
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/randomize_location = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!default_pixel_x && randomize_location)
|
||||
default_pixel_x = rand(-12, 12)
|
||||
@@ -174,7 +174,7 @@
|
||||
var/image/belly_image
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/icebass/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
dorsal_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
belly_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
update_icon()
|
||||
@@ -248,7 +248,7 @@
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/rockfish/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
head_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
attack_sharp = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/passive/lizard/large/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(rand(12, 20) / 10)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/lizard/large/defensive
|
||||
|
||||
@@ -81,7 +81,11 @@
|
||||
return 1 // It literally produces a cryogenic mist inside itself. Cold doesn't bother it.
|
||||
|
||||
/mob/living/simple_mob/animal/sif/frostfly/Initialize()
|
||||
<<<<<<< HEAD
|
||||
. = ..() //VOREStation Edit
|
||||
=======
|
||||
. = ..()
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
smoke_special = new
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive/glitterfly
|
||||
|
||||
/mob/living/simple_mob/animal/sif/glitterfly/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/colorlist = list(rgb(rand(100,255), rand(100,255), rand(100,255)) = 10, rgb(rand(5,100), rand(5,100), rand(5,100)) = 2, "#222222" = 1)
|
||||
color = pickweight(colorlist)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
plane = PLANE_LIGHTING_ABOVE
|
||||
|
||||
/mob/living/simple_mob/animal/sif/glitterfly/rare/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/animal/sif/glitterfly/unique_tame_check(var/obj/O, var/mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
instinct = 50
|
||||
|
||||
/mob/living/simple_mob/animal/sif/kururak/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!instinct)
|
||||
if(prob(20))
|
||||
instinct = rand(6, 10)
|
||||
@@ -331,7 +331,7 @@
|
||||
remove_modifiers_of_type(/datum/modifier/ace)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/kururak/hibernate/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
lay_down()
|
||||
instinct = 0
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
emote_hear = list("chitters", "clicks", "gurgles")
|
||||
|
||||
/mob/living/simple_mob/animal/sif/leech/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_mob/animal/sif/tymisian/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
smoke_spore = new
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
icon_state = "[icon_state]_dead"
|
||||
|
||||
/mob/living/simple_mob/animal/space/space_worm/head/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/mob/living/simple_mob/animal/space/space_worm/current = src
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
emote_type = 2 //This lets them emote through containers. The communicator has a image feed of the person calling them so...
|
||||
|
||||
/mob/living/voice/New(loc)
|
||||
/mob/living/voice/Initialize(loc)
|
||||
add_language(LANGUAGE_GALCOM)
|
||||
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
|
||||
|
||||
if(istype(loc, /obj/item/device/communicator))
|
||||
comm = loc
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
// Proc: transfer_identity()
|
||||
// Parameters: 1 (speaker - the mob (usually an observer) to copy information from)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
layer = STAIRS_LAYER
|
||||
|
||||
/obj/structure/stairs/Initialize()
|
||||
. = ..()
|
||||
if(check_integrity())
|
||||
update_icon()
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
// Returns TRUE if the stairs are a complete and connected unit, FALSE if a piece is missing or obstructed
|
||||
// Will attempt to reconnect broken pieces
|
||||
@@ -70,10 +70,10 @@
|
||||
var/obj/structure/stairs/middle/middle = null
|
||||
|
||||
/obj/structure/stairs/bottom/Initialize()
|
||||
. = ..()
|
||||
if(!GetAbove(src))
|
||||
warning("Stair created without level above: ([loc.x], [loc.y], [loc.z])")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
. = ..()
|
||||
|
||||
/obj/structure/stairs/bottom/Destroy()
|
||||
if(top)
|
||||
@@ -160,10 +160,8 @@
|
||||
|
||||
// If the object is pulling or grabbing anything, we'll want to move those too. A grab chain may be disrupted in doing so.
|
||||
if(L.pulling && !L.pulling.anchored)
|
||||
to_world("adding [L.pulling] to pulling")
|
||||
pulling |= L.pulling
|
||||
for(var/obj/item/weapon/grab/G in list(L.l_hand, L.r_hand))
|
||||
to_world("adding [G.affecting] to pulling")
|
||||
pulling |= G.affecting
|
||||
|
||||
// If the stairs aren't broken, go up.
|
||||
@@ -182,7 +180,6 @@
|
||||
|
||||
// Bring the pulled/grabbed object(s) along behind us
|
||||
for(var/atom/movable/P in pulling)
|
||||
to_world("attempting to move [P]")
|
||||
P.forceMove(get_turf(src)) // They will move onto the turf but won't get past the check earlier in crossed. Aligns animation more cleanly
|
||||
switch(src.dir)
|
||||
if(NORTH)
|
||||
@@ -249,10 +246,10 @@
|
||||
var/obj/structure/stairs/bottom/bottom = null
|
||||
|
||||
/obj/structure/stairs/middle/Initialize()
|
||||
. = ..()
|
||||
if(!GetAbove(src))
|
||||
warning("Stair created without level above: ([loc.x], [loc.y], [loc.z])")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
. = ..()
|
||||
|
||||
/obj/structure/stairs/middle/Destroy()
|
||||
if(top)
|
||||
@@ -332,10 +329,10 @@
|
||||
var/obj/structure/stairs/bottom/bottom = null
|
||||
|
||||
/obj/structure/stairs/top/Initialize()
|
||||
. = ..()
|
||||
if(!GetBelow(src))
|
||||
warning("Stair created without level below: ([loc.x], [loc.y], [loc.z])")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
. = ..()
|
||||
|
||||
/obj/structure/stairs/top/Destroy()
|
||||
if(middle)
|
||||
@@ -422,10 +419,8 @@
|
||||
|
||||
// If the object is pulling or grabbing anything, we'll want to move those too. A grab chain may be disrupted in doing so.
|
||||
if(L.pulling && !L.pulling.anchored)
|
||||
to_world("adding [L.pulling] to pulling")
|
||||
pulling |= L.pulling
|
||||
for(var/obj/item/weapon/grab/G in list(L.l_hand, L.r_hand))
|
||||
to_world("adding [G.affecting] to pulling")
|
||||
pulling |= G.affecting
|
||||
|
||||
// If the stairs aren't broken, go up.
|
||||
@@ -444,7 +439,6 @@
|
||||
|
||||
// Bring the pulled/grabbed object(s) along behind us
|
||||
for(var/atom/movable/P in pulling)
|
||||
to_world("attempting to move [P]")
|
||||
P.forceMove(get_turf(src)) // They will move onto the turf but won't get past the check earlier in crossed. Aligns animation more cleanly
|
||||
switch(src.dir)
|
||||
if(NORTH)
|
||||
@@ -505,7 +499,7 @@
|
||||
icon_state = ""
|
||||
|
||||
/obj/structure/stairs/spawner/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
var/turf/B1 = get_step(get_turf(src), turn(dir, 180))
|
||||
var/turf/B2 = get_turf(src)
|
||||
var/turf/T1 = GetAbove(B1)
|
||||
@@ -553,4 +547,4 @@
|
||||
|
||||
/obj/structure/stairs/spawner/west
|
||||
dir = WEST
|
||||
bound_width = 64
|
||||
bound_width = 64
|
||||
|
||||
@@ -0,0 +1,526 @@
|
||||
/**********************************************************
|
||||
NANO UI FRAMEWORK
|
||||
|
||||
nanoui class (or whatever Byond calls classes)
|
||||
|
||||
nanoui is used to open and update nano browser uis
|
||||
**********************************************************/
|
||||
|
||||
/datum/nanoui
|
||||
// the user who opened this ui
|
||||
var/mob/user
|
||||
// the object this ui "belongs" to
|
||||
var/datum/src_object
|
||||
// the title of this ui
|
||||
var/title
|
||||
// the key of this ui, this is to allow multiple (different) uis for each src_object
|
||||
var/ui_key
|
||||
// window_id is used as the window name/identifier for browse and onclose
|
||||
var/window_id
|
||||
// the browser window width
|
||||
var/width = 0
|
||||
// the browser window height
|
||||
var/height = 0
|
||||
// whether to use extra logic when window closes
|
||||
var/on_close_logic = 1
|
||||
// an extra ref to use when the window is closed, usually null
|
||||
var/atom/ref = null
|
||||
// options for modifying window behaviour
|
||||
var/window_options = "focus=0;can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
|
||||
// the list of stylesheets to apply to this ui
|
||||
var/list/stylesheets = list()
|
||||
// the list of javascript scripts to use for this ui
|
||||
var/list/scripts = list()
|
||||
// a list of templates which can be used with this ui
|
||||
var/templates[0]
|
||||
// the layout key for this ui (this is used on the frontend, leave it as "default" unless you know what you're doing)
|
||||
var/layout_key = "default"
|
||||
// this sets whether to re-render the ui layout with each update (default 0, turning on will break the map ui if it's in use)
|
||||
var/auto_update_layout = 0
|
||||
// this sets whether to re-render the ui content with each update (default 1)
|
||||
var/auto_update_content = 1
|
||||
// the default state to use for this ui (this is used on the frontend, leave it as "default" unless you know what you're doing)
|
||||
var/state_key = "default"
|
||||
// show the map ui, this is used by the default layout
|
||||
var/show_map = 0
|
||||
// the map z level to display
|
||||
var/map_z_level = 1
|
||||
// initial data, containing the full data structure, must be sent to the ui (the data structure cannot be extended later on)
|
||||
var/list/initial_data[0]
|
||||
// set to 1 to update the ui automatically every master_controller tick
|
||||
var/is_auto_updating = 0
|
||||
// the current status/visibility of the ui
|
||||
var/status = STATUS_INTERACTIVE
|
||||
|
||||
// Relationship between a master interface and its children. Used in update_status
|
||||
var/datum/nanoui/master_ui
|
||||
var/list/datum/nanoui/children = list()
|
||||
var/datum/topic_state/state = null
|
||||
|
||||
/**
|
||||
* Create a new nanoui instance.
|
||||
*
|
||||
* @param nuser /mob The mob who has opened/owns this ui
|
||||
* @param nsrc_object /obj|/mob The obj or mob which this ui belongs to
|
||||
* @param nui_key string A string key to use for this ui. Allows for multiple unique uis on one src_oject
|
||||
* @param ntemplate string The filename of the template file from /nano/templates (e.g. "my_template.tmpl")
|
||||
* @param ntitle string The title of this ui
|
||||
* @param nwidth int the width of the ui window
|
||||
* @param nheight int the height of the ui window
|
||||
* @param nref /atom A custom ref to use if "on_close_logic" is set to 1
|
||||
*
|
||||
* @return /nanoui new nanoui object
|
||||
*/
|
||||
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate_filename, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null, var/datum/nanoui/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
user = nuser
|
||||
src_object = nsrc_object
|
||||
ui_key = nui_key
|
||||
window_id = "[ui_key]\ref[src_object]"
|
||||
|
||||
src.master_ui = master_ui
|
||||
if(master_ui)
|
||||
master_ui.children += src
|
||||
src.state = state
|
||||
|
||||
// add the passed template filename as the "main" template, this is required
|
||||
add_template("main", ntemplate_filename)
|
||||
|
||||
if (ntitle)
|
||||
title = sanitize(ntitle)
|
||||
if (nwidth)
|
||||
width = nwidth
|
||||
if (nheight)
|
||||
height = nheight
|
||||
if (nref)
|
||||
ref = nref
|
||||
|
||||
add_common_assets()
|
||||
|
||||
/**
|
||||
* Use this proc to add assets which are common to (and required by) all nano uis
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/add_common_assets()
|
||||
add_script("libraries.min.js") // A JS file comprising of jQuery, doT.js and jQuery Timer libraries (compressed together)
|
||||
add_script("nano_utility.js") // The NanoUtility JS, this is used to store utility functions.
|
||||
add_script("nano_template.js") // The NanoTemplate JS, this is used to render templates.
|
||||
add_script("nano_state_manager.js") // The NanoStateManager JS, it handles updates from the server and passes data to the current state
|
||||
add_script("nano_state.js") // The NanoState JS, this is the base state which all states must inherit from
|
||||
add_script("nano_state_default.js") // The NanoStateDefault JS, this is the "default" state (used by all UIs by default), which inherits from NanoState
|
||||
add_script("nano_base_callbacks.js") // The NanoBaseCallbacks JS, this is used to set up (before and after update) callbacks which are common to all UIs
|
||||
add_script("nano_base_helpers.js") // The NanoBaseHelpers JS, this is used to set up template helpers which are common to all UIs
|
||||
add_stylesheet("shared.css") // this CSS sheet is common to all UIs
|
||||
add_stylesheet("icons.css") // this CSS sheet is common to all UIs
|
||||
|
||||
/**
|
||||
* Set the current status (also known as visibility) of this ui.
|
||||
*
|
||||
* @param state int The status to set, see the defines at the top of this file
|
||||
* @param push_update int (bool) Push an update to the ui to update it's status (an update is always sent if the status has changed to red (0))
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_status(state, push_update)
|
||||
if (state != status) // Only update if it is different
|
||||
if (status == STATUS_DISABLED)
|
||||
status = state
|
||||
if (push_update)
|
||||
update()
|
||||
else
|
||||
status = state
|
||||
if (push_update || status == 0)
|
||||
push_data(null, 1) // Update the UI, force the update in case the status is 0, data is null so that previous data is used
|
||||
|
||||
/**
|
||||
* Update the status (visibility) of this ui based on the user's status
|
||||
*
|
||||
* @param push_update int (bool) Push an update to the ui to update it's status. This is set to 0/false if an update is going to be pushed anyway (to avoid unnessary updates)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/update_status(var/push_update = 0)
|
||||
var/obj/host = src_object.nano_host()
|
||||
var/new_status = host.CanUseTopic(user, state)
|
||||
if(master_ui)
|
||||
new_status = min(new_status, master_ui.status)
|
||||
|
||||
set_status(new_status, push_update)
|
||||
if(new_status == STATUS_CLOSE)
|
||||
close()
|
||||
|
||||
/**
|
||||
* Set the ui to auto update (every master_controller tick)
|
||||
*
|
||||
* @param state int (bool) Set auto update to 1 or 0 (true/false)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_auto_update(nstate = 1)
|
||||
is_auto_updating = nstate
|
||||
|
||||
/**
|
||||
* Set the initial data for the ui. This is vital as the data structure set here cannot be changed when pushing new updates.
|
||||
*
|
||||
* @param data /list The list of data for this ui
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_initial_data(list/data)
|
||||
initial_data = data
|
||||
|
||||
/**
|
||||
* Get config data to sent to the ui.
|
||||
*
|
||||
* @return /list config data
|
||||
*/
|
||||
/datum/nanoui/proc/get_config_data()
|
||||
var/name = "[src_object]"
|
||||
name = sanitize(name)
|
||||
var/list/config_data = list(
|
||||
"title" = title,
|
||||
"srcObject" = list("name" = name),
|
||||
"stateKey" = state_key,
|
||||
"status" = status,
|
||||
"autoUpdateLayout" = auto_update_layout,
|
||||
"autoUpdateContent" = auto_update_content,
|
||||
"showMap" = show_map,
|
||||
"mapZLevel" = map_z_level,
|
||||
"user" = list("name" = user.name)
|
||||
)
|
||||
return config_data
|
||||
|
||||
/**
|
||||
* Get data to sent to the ui.
|
||||
*
|
||||
* @param data /list The list of general data for this ui (can be null to use previous data sent)
|
||||
*
|
||||
* @return /list data to send to the ui
|
||||
*/
|
||||
/datum/nanoui/proc/get_send_data(var/list/data)
|
||||
var/list/config_data = get_config_data()
|
||||
|
||||
var/list/send_data = list("config" = config_data)
|
||||
|
||||
if (!isnull(data))
|
||||
send_data["data"] = data
|
||||
|
||||
return send_data
|
||||
|
||||
/**
|
||||
* Set the browser window options for this ui
|
||||
*
|
||||
* @param nwindow_options string The new window options
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_window_options(nwindow_options)
|
||||
window_options = nwindow_options
|
||||
|
||||
/**
|
||||
* Add a CSS stylesheet to this UI
|
||||
* These must be added before the UI has been opened, adding after that will have no effect
|
||||
*
|
||||
* @param file string The name of the CSS file from /nano/css (e.g. "my_style.css")
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/add_stylesheet(file)
|
||||
stylesheets.Add(file)
|
||||
|
||||
/**
|
||||
* Add a JavsScript script to this UI
|
||||
* These must be added before the UI has been opened, adding after that will have no effect
|
||||
*
|
||||
* @param file string The name of the JavaScript file from /nano/js (e.g. "my_script.js")
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/add_script(file)
|
||||
scripts.Add(file)
|
||||
|
||||
/**
|
||||
* Add a template for this UI
|
||||
* Templates are combined with the data sent to the UI to create the rendered view
|
||||
* These must be added before the UI has been opened, adding after that will have no effect
|
||||
*
|
||||
* @param key string The key which is used to reference this template in the frontend
|
||||
* @param filename string The name of the template file from /nano/templates (e.g. "my_template.tmpl")
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/add_template(key, filename)
|
||||
templates[key] = filename
|
||||
|
||||
/**
|
||||
* Set the layout key for use in the frontend Javascript
|
||||
* The layout key is the basic layout key for the page
|
||||
* Two files are loaded on the client based on the layout key varable:
|
||||
* -> a template in /nano/templates with the filename "layout_<layout_key>.tmpl
|
||||
* -> a CSS stylesheet in /nano/css with the filename "layout_<layout_key>.css
|
||||
*
|
||||
* @param nlayout string The layout key to use
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_layout_key(nlayout_key)
|
||||
layout_key = lowertext(nlayout_key)
|
||||
|
||||
/**
|
||||
* Set the ui to update the layout (re-render it) on each update, turning this on will break the map ui (if it's being used)
|
||||
*
|
||||
* @param state int (bool) Set update to 1 or 0 (true/false) (default 0)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_auto_update_layout(nstate)
|
||||
auto_update_layout = nstate
|
||||
|
||||
/**
|
||||
* Set the ui to update the main content (re-render it) on each update
|
||||
*
|
||||
* @param state int (bool) Set update to 1 or 0 (true/false) (default 1)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_auto_update_content(nstate)
|
||||
auto_update_content = nstate
|
||||
|
||||
/**
|
||||
* Set the state key for use in the frontend Javascript
|
||||
*
|
||||
* @param nstate_key string The key of the state to use
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_state_key(nstate_key)
|
||||
state_key = nstate_key
|
||||
|
||||
/**
|
||||
* Toggle showing the map ui
|
||||
*
|
||||
* @param nstate_key boolean 1 to show map, 0 to hide (default is 0)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_show_map(nstate)
|
||||
show_map = nstate
|
||||
|
||||
/**
|
||||
* Toggle showing the map ui
|
||||
*
|
||||
* @param nstate_key boolean 1 to show map, 0 to hide (default is 0)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/set_map_z_level(nz)
|
||||
map_z_level = nz
|
||||
|
||||
/**
|
||||
* Set whether or not to use the "old" on close logic (mainly unset_machine())
|
||||
*
|
||||
* @param state int (bool) Set on_close_logic to 1 or 0 (true/false)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/use_on_close_logic(state)
|
||||
on_close_logic = state
|
||||
|
||||
/**
|
||||
* Return the HTML for this UI
|
||||
*
|
||||
* @return string HTML for the UI
|
||||
*/
|
||||
/datum/nanoui/proc/get_html()
|
||||
|
||||
// before the UI opens, add the layout files based on the layout key
|
||||
add_stylesheet("layout_[layout_key].css")
|
||||
add_template("layout", "layout_[layout_key].tmpl")
|
||||
|
||||
var/head_content = ""
|
||||
|
||||
for (var/filename in scripts)
|
||||
head_content += "<script type='text/javascript' src='[filename]'></script> "
|
||||
|
||||
for (var/filename in stylesheets)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[filename]'> "
|
||||
|
||||
var/template_data_json = "{}" // An empty JSON object
|
||||
if (templates.len > 0)
|
||||
template_data_json = strip_improper(json_encode(templates))
|
||||
|
||||
var/list/send_data = get_send_data(initial_data)
|
||||
var/initial_data_json = replacetext(replacetext(json_encode(send_data), """, "&#34;"), "'", "'")
|
||||
initial_data_json = strip_improper(initial_data_json);
|
||||
|
||||
var/url_parameters_json = json_encode(list("src" = "\ref[src]"))
|
||||
|
||||
return {"
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script type='text/javascript'>
|
||||
function receiveUpdateData(jsonString)
|
||||
{
|
||||
// We need both jQuery and NanoStateManager to be able to recieve data
|
||||
// At the moment any data received before those libraries are loaded will be lost
|
||||
if (typeof NanoStateManager != 'undefined' && typeof jQuery != 'undefined')
|
||||
{
|
||||
NanoStateManager.receiveUpdateData(jsonString);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// alert('browser.recieveUpdateData failed due to jQuery or NanoStateManager being unavailiable.');
|
||||
//}
|
||||
}
|
||||
</script>
|
||||
[head_content]
|
||||
</head>
|
||||
<body scroll=auto data-template-data='[template_data_json]' data-url-parameters='[url_parameters_json]' data-initial-data='[initial_data_json]'>
|
||||
<div id='uiLayout'>
|
||||
</div>
|
||||
<noscript>
|
||||
<div id='uiNoScript'>
|
||||
<h2>JAVASCRIPT REQUIRED</h2>
|
||||
<p>Your Internet Explorer's Javascript is disabled (or broken).<br/>
|
||||
Enable Javascript and then open this UI again.</p>
|
||||
</div>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
|
||||
/**
|
||||
* Open this UI
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/open()
|
||||
if(!user.client)
|
||||
return
|
||||
|
||||
// An attempted fix to UIs sometimes locking up spamming runtime errors due to src_object being null for whatever reason.
|
||||
// This hard-deletes the UI, preventing the device that uses the UI from being locked up permanently.
|
||||
if(!src_object)
|
||||
qdel(src)
|
||||
|
||||
var/window_size = ""
|
||||
if (width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
update_status(0)
|
||||
if(status == STATUS_CLOSE)
|
||||
return
|
||||
|
||||
user << browse(get_html(), "window=[window_id];[window_size][window_options]")
|
||||
winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map
|
||||
on_close_winset()
|
||||
//onclose(user, window_id)
|
||||
SSnanoui.ui_opened(src)
|
||||
|
||||
/**
|
||||
* Reinitialise this UI, potentially with a different template and/or initial data
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/reinitialise(template, new_initial_data)
|
||||
if(template)
|
||||
add_template("main", template)
|
||||
if(new_initial_data)
|
||||
set_initial_data(new_initial_data)
|
||||
open()
|
||||
|
||||
/**
|
||||
* Close this UI
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/close()
|
||||
is_auto_updating = 0
|
||||
SSnanoui.ui_closed(src)
|
||||
user << browse(null, "window=[window_id]")
|
||||
for(var/datum/nanoui/child in children)
|
||||
child.close()
|
||||
children.Cut()
|
||||
state = null
|
||||
master_ui = null
|
||||
|
||||
/**
|
||||
* Set the UI window to call the nanoclose verb when the window is closed
|
||||
* This allows Nano to handle closed windows
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/on_close_winset()
|
||||
if(!user.client)
|
||||
return
|
||||
var/params = "\ref[src]"
|
||||
|
||||
winset(user, window_id, "on-close=\"nanoclose [params]\"")
|
||||
|
||||
/**
|
||||
* Push data to an already open UI window
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/push_data(data, force_push = 0)
|
||||
update_status(0)
|
||||
if (status == STATUS_DISABLED && !force_push)
|
||||
return // Cannot update UI, no visibility
|
||||
|
||||
var/list/send_data = get_send_data(data)
|
||||
|
||||
//to_chat(user,list2json_usecache(send_data)) // used for debugging //NANO DEBUG HOOK
|
||||
user << output(list2params(list(strip_improper(json_encode(send_data)))),"[window_id].browser:receiveUpdateData")
|
||||
|
||||
/**
|
||||
* This Topic() proc is called whenever a user clicks on a link within a Nano UI
|
||||
* If the UI status is currently STATUS_INTERACTIVE then call the src_object Topic()
|
||||
* If the src_object Topic() returns 1 (true) then update all UIs attached to src_object
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/Topic(href, href_list)
|
||||
update_status(0) // update the status
|
||||
if (status != STATUS_INTERACTIVE || user != usr) // If UI is not interactive or usr calling Topic is not the UI user
|
||||
return
|
||||
|
||||
// This is used to toggle the nano map ui
|
||||
var/map_update = 0
|
||||
if(href_list["showMap"])
|
||||
set_show_map(text2num(href_list["showMap"]))
|
||||
map_update = 1
|
||||
|
||||
if(href_list["mapZLevel"])
|
||||
set_map_z_level(text2num(href_list["mapZLevel"]))
|
||||
map_update = 1
|
||||
|
||||
if ((src_object && src_object.Topic(href, href_list, state)) || map_update)
|
||||
SSnanoui.update_uis(src_object) // update all UIs attached to src_object
|
||||
|
||||
/**
|
||||
* Process this UI, updating the entire UI or just the status (aka visibility)
|
||||
* This process proc is called by the master_controller
|
||||
*
|
||||
* @param update string For this UI to update
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/process(update = 0)
|
||||
if (!src_object || !user)
|
||||
close()
|
||||
return
|
||||
|
||||
if (status && (update || is_auto_updating))
|
||||
update() // Update the UI (update_status() is called whenever a UI is updated)
|
||||
else
|
||||
update_status(1) // Not updating UI, so lets check here if status has changed
|
||||
|
||||
/**
|
||||
* Update the UI
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/update(var/force_open = 0)
|
||||
src_object.ui_interact(user, ui_key, src, force_open, master_ui, state)
|
||||
@@ -31,10 +31,8 @@
|
||||
var/last_activate = null
|
||||
|
||||
/obj/item/organ/internal/augment/Initialize()
|
||||
..()
|
||||
|
||||
. ..()
|
||||
setup_radial_icon()
|
||||
|
||||
if(integrated_object_type)
|
||||
integrated_object = new integrated_object_type(src)
|
||||
integrated_object.canremove = FALSE
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
)
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(integrated_object)
|
||||
integrated_tools[integrated_object_type] = integrated_object
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
spleen_efficiency = 0.5
|
||||
|
||||
/obj/item/organ/internal/spleen/skrell/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(0.8,0.7)
|
||||
|
||||
/obj/item/organ/internal/spleen/minor
|
||||
@@ -83,5 +83,5 @@
|
||||
spleen_tick = 15
|
||||
|
||||
/obj/item/organ/internal/spleen/minor/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(0.7)
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
var/deadly_hold = TRUE // Does the stomach do damage to mobs eaten by its owner? Xenos should probably have this FALSE.
|
||||
|
||||
/obj/item/organ/internal/stomach/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
if(reagents)
|
||||
reagents.maximum_volume = 30
|
||||
else
|
||||
|
||||
@@ -115,8 +115,7 @@ var/list/organ_cache = list()
|
||||
handle_organ_mod_special()
|
||||
|
||||
/obj/item/organ/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
if(owner)
|
||||
if(!meat_type)
|
||||
if(owner.isSynthetic())
|
||||
|
||||
@@ -471,7 +471,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\
|
||||
var/species = SPECIES_HUMAN
|
||||
|
||||
/obj/item/weapon/disk/species/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(species)
|
||||
name = "[species] [initial(name)]"
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
vital = TRUE
|
||||
|
||||
/obj/item/organ/internal/brain/cephalon/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
spawn(30 SECONDS) // FBP Dionaea need some way to be disassembled through surgery, if absolutely necessary.
|
||||
if(!owner.isSynthetic())
|
||||
vital = FALSE
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/strain_regen_cooldown = 5 MINUTES
|
||||
|
||||
/obj/item/organ/internal/regennetwork/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = null
|
||||
spawn(15)
|
||||
if(ishuman(owner))
|
||||
|
||||
@@ -10,7 +10,6 @@ var/global/list/map_sectors = list()
|
||||
/turf/unsimulated/map
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "map"
|
||||
initialized = FALSE // TODO - Fix unsimulated turf initialization so this override is not necessary!
|
||||
|
||||
/turf/unsimulated/map/edge
|
||||
opacity = 1
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
var/default_icon_state
|
||||
|
||||
/obj/item/weapon/pen/blade/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
active_icon_state = "[icon_state]-x"
|
||||
default_icon_state = icon_state
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
var/list/command_cartridges = list(
|
||||
/obj/item/weapon/cartridge/captain,
|
||||
/obj/item/weapon/cartridge/hop,
|
||||
@@ -308,3 +309,315 @@ var/list/civilian_cartridges = list(
|
||||
icon_state = "cart"
|
||||
charges = 5
|
||||
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame)
|
||||
=======
|
||||
var/list/command_cartridges = list(
|
||||
/obj/item/weapon/cartridge/captain,
|
||||
/obj/item/weapon/cartridge/hop,
|
||||
/obj/item/weapon/cartridge/hos,
|
||||
/obj/item/weapon/cartridge/ce,
|
||||
/obj/item/weapon/cartridge/rd,
|
||||
/obj/item/weapon/cartridge/cmo,
|
||||
/obj/item/weapon/cartridge/head,
|
||||
/obj/item/weapon/cartridge/lawyer // Internal Affaris,
|
||||
)
|
||||
|
||||
var/list/security_cartridges = list(
|
||||
/obj/item/weapon/cartridge/security,
|
||||
/obj/item/weapon/cartridge/detective,
|
||||
/obj/item/weapon/cartridge/hos
|
||||
)
|
||||
|
||||
var/list/engineering_cartridges = list(
|
||||
/obj/item/weapon/cartridge/engineering,
|
||||
/obj/item/weapon/cartridge/atmos,
|
||||
/obj/item/weapon/cartridge/ce
|
||||
)
|
||||
|
||||
var/list/medical_cartridges = list(
|
||||
/obj/item/weapon/cartridge/medical,
|
||||
/obj/item/weapon/cartridge/chemistry,
|
||||
/obj/item/weapon/cartridge/cmo
|
||||
)
|
||||
|
||||
var/list/research_cartridges = list(
|
||||
/obj/item/weapon/cartridge/signal/science,
|
||||
/obj/item/weapon/cartridge/rd
|
||||
)
|
||||
|
||||
var/list/cargo_cartridges = list(
|
||||
/obj/item/weapon/cartridge/quartermaster, // This also covers cargo-techs, apparently,
|
||||
/obj/item/weapon/cartridge/miner,
|
||||
/obj/item/weapon/cartridge/hop
|
||||
)
|
||||
|
||||
var/list/civilian_cartridges = list(
|
||||
/obj/item/weapon/cartridge/janitor,
|
||||
/obj/item/weapon/cartridge/service,
|
||||
/obj/item/weapon/cartridge/hop
|
||||
)
|
||||
|
||||
/obj/item/weapon/cartridge
|
||||
name = "generic cartridge"
|
||||
desc = "A data cartridge for portable microcomputers."
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "cart"
|
||||
item_state = "electronic"
|
||||
w_class = ITEMSIZE_TINY
|
||||
drop_sound = 'sound/items/drop/component.ogg'
|
||||
pickup_sound = 'sound/items/pickup/component.ogg'
|
||||
|
||||
var/obj/item/radio/integrated/radio = null
|
||||
|
||||
var/charges = 0
|
||||
|
||||
var/list/stored_data = list()
|
||||
var/list/programs = list()
|
||||
var/list/messenger_plugins = list()
|
||||
|
||||
/obj/item/weapon/cartridge/Destroy()
|
||||
QDEL_NULL(radio)
|
||||
QDEL_LIST(programs)
|
||||
QDEL_LIST(messenger_plugins)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/cartridge/proc/update_programs(obj/item/device/pda/pda)
|
||||
for(var/A in programs)
|
||||
var/datum/data/pda/P = A
|
||||
P.pda = pda
|
||||
for(var/A in messenger_plugins)
|
||||
var/datum/data/pda/messenger_plugin/P = A
|
||||
P.pda = pda
|
||||
|
||||
/obj/item/weapon/cartridge/engineering
|
||||
name = "\improper Power-ON cartridge"
|
||||
icon_state = "cart-e"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/power,
|
||||
new/datum/data/pda/utility/scanmode/halogen)
|
||||
|
||||
/obj/item/weapon/cartridge/atmos
|
||||
name = "\improper BreatheDeep cartridge"
|
||||
icon_state = "cart-a"
|
||||
programs = list(new/datum/data/pda/utility/scanmode/gas)
|
||||
|
||||
/obj/item/weapon/cartridge/medical
|
||||
name = "\improper Med-U cartridge"
|
||||
icon_state = "cart-m"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/medical,
|
||||
new/datum/data/pda/utility/scanmode/medical)
|
||||
|
||||
/obj/item/weapon/cartridge/chemistry
|
||||
name = "\improper ChemWhiz cartridge"
|
||||
icon_state = "cart-chem"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/medical,
|
||||
new/datum/data/pda/utility/scanmode/medical,
|
||||
new/datum/data/pda/utility/scanmode/reagent)
|
||||
|
||||
/obj/item/weapon/cartridge/security
|
||||
name = "\improper R.O.B.U.S.T. cartridge"
|
||||
icon_state = "cart-s"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/security)
|
||||
|
||||
/obj/item/weapon/cartridge/detective
|
||||
name = "\improper D.E.T.E.C.T. cartridge"
|
||||
icon_state = "cart-s"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/medical,
|
||||
new/datum/data/pda/utility/scanmode/medical,
|
||||
|
||||
new/datum/data/pda/app/crew_records/security)
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/janitor
|
||||
name = "\improper CustodiPRO cartridge"
|
||||
desc = "The ultimate in clean-room design."
|
||||
icon_state = "cart-j"
|
||||
programs = list(new/datum/data/pda/app/janitor)
|
||||
|
||||
/obj/item/weapon/cartridge/lawyer
|
||||
name = "\improper P.R.O.V.E. cartridge"
|
||||
icon_state = "cart-s"
|
||||
programs = list(new/datum/data/pda/app/crew_records/security)
|
||||
|
||||
/obj/item/weapon/cartridge/clown
|
||||
name = "\improper Honkworks 5.0 cartridge"
|
||||
icon_state = "cart-clown"
|
||||
charges = 5
|
||||
programs = list(new/datum/data/pda/utility/honk)
|
||||
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/clown)
|
||||
|
||||
/obj/item/weapon/cartridge/mime
|
||||
name = "\improper Gestur-O 1000 cartridge"
|
||||
icon_state = "cart-mi"
|
||||
charges = 5
|
||||
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/mime)
|
||||
|
||||
/obj/item/weapon/cartridge/service
|
||||
name = "\improper Serv-U Pro cartridge"
|
||||
desc = "A data cartridge designed to serve YOU!"
|
||||
|
||||
/obj/item/weapon/cartridge/signal
|
||||
name = "generic signaler cartridge"
|
||||
desc = "A data cartridge with an integrated radio signaler module."
|
||||
programs = list(new/datum/data/pda/app/signaller)
|
||||
|
||||
/obj/item/weapon/cartridge/signal/Initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/signal/science
|
||||
name = "\improper Signal Ace 2 cartridge"
|
||||
desc = "Complete with integrated radio signaler!"
|
||||
icon_state = "cart-tox"
|
||||
programs = list(
|
||||
new/datum/data/pda/utility/scanmode/gas,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/reagent,
|
||||
|
||||
new/datum/data/pda/app/signaller)
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster
|
||||
name = "\improper Space Parts & Space Vendors cartridge"
|
||||
desc = "Perfect for the Quartermaster on the go!"
|
||||
icon_state = "cart-q"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/supply)
|
||||
|
||||
/obj/item/weapon/cartridge/miner
|
||||
name = "\improper Drill-Jockey 4.5 cartridge"
|
||||
desc = "It's covered in some sort of sand."
|
||||
icon_state = "cart-q"
|
||||
|
||||
/obj/item/weapon/cartridge/head
|
||||
name = "\improper Easy-Record DELUXE cartridge"
|
||||
icon_state = "cart-h"
|
||||
programs = list(new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/hop
|
||||
name = "\improper HumanResources9001 cartridge"
|
||||
icon_state = "cart-h"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/security,
|
||||
|
||||
new/datum/data/pda/app/janitor,
|
||||
|
||||
new/datum/data/pda/app/supply,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/hos
|
||||
name = "\improper R.O.B.U.S.T. DELUXE cartridge"
|
||||
icon_state = "cart-hos"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/security,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/ce
|
||||
name = "\improper Power-On DELUXE cartridge"
|
||||
icon_state = "cart-ce"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/power,
|
||||
new/datum/data/pda/utility/scanmode/halogen,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/gas,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/cmo
|
||||
name = "\improper Med-U DELUXE cartridge"
|
||||
icon_state = "cart-cmo"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/crew_records/medical,
|
||||
new/datum/data/pda/utility/scanmode/medical,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/reagent,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/rd
|
||||
name = "\improper Signal Ace DELUXE cartridge"
|
||||
icon_state = "cart-rd"
|
||||
programs = list(
|
||||
new/datum/data/pda/utility/scanmode/gas,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/reagent,
|
||||
|
||||
new/datum/data/pda/app/signaller,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/rd/Initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
desc = "Now with 200% more value!"
|
||||
icon_state = "cart-c"
|
||||
programs = list(
|
||||
new/datum/data/pda/app/power,
|
||||
new/datum/data/pda/utility/scanmode/halogen,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/gas,
|
||||
|
||||
new/datum/data/pda/app/crew_records/medical,
|
||||
new/datum/data/pda/utility/scanmode/medical,
|
||||
|
||||
new/datum/data/pda/utility/scanmode/reagent,
|
||||
|
||||
new/datum/data/pda/app/crew_records/security,
|
||||
|
||||
new/datum/data/pda/app/janitor,
|
||||
|
||||
new/datum/data/pda/app/supply,
|
||||
|
||||
new/datum/data/pda/app/status_display)
|
||||
|
||||
/obj/item/weapon/cartridge/syndicate
|
||||
name = "\improper Detomatix cartridge"
|
||||
icon_state = "cart"
|
||||
var/initial_remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
|
||||
charges = 4
|
||||
programs = list(new/datum/data/pda/utility/toggle_door)
|
||||
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/detonate)
|
||||
|
||||
/obj/item/weapon/cartridge/syndicate/New()
|
||||
var/datum/data/pda/utility/toggle_door/D = programs[1]
|
||||
if(istype(D))
|
||||
D.remote_door_id = initial_remote_door_id
|
||||
|
||||
/obj/item/weapon/cartridge/proc/post_status(var/command, var/data1, var/data2)
|
||||
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
|
||||
if(!frequency) return
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.source = src
|
||||
status_signal.transmission_method = TRANSMISSION_RADIO
|
||||
status_signal.data["command"] = command
|
||||
|
||||
switch(command)
|
||||
if("message")
|
||||
status_signal.data["msg1"] = data1
|
||||
status_signal.data["msg2"] = data2
|
||||
if(loc)
|
||||
var/obj/item/PDA = loc
|
||||
var/mob/user = PDA.fingerprintslast
|
||||
log_admin("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
|
||||
message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
|
||||
|
||||
if("alert")
|
||||
status_signal.data["picture_state"] = data1
|
||||
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
/obj/item/weapon/cartridge/frame
|
||||
name = "F.R.A.M.E. cartridge"
|
||||
icon_state = "cart"
|
||||
charges = 5
|
||||
messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame)
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/item/radio/integrated
|
||||
name = "\improper PDA radio module"
|
||||
desc = "An electronic radio system."
|
||||
@@ -136,3 +137,141 @@
|
||||
|
||||
spawn(0)
|
||||
radio_connection.post_signal(src, signal)
|
||||
=======
|
||||
/obj/item/radio/integrated
|
||||
name = "\improper PDA radio module"
|
||||
desc = "An electronic radio system."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
var/obj/item/device/pda/hostpda = null
|
||||
|
||||
var/list/botlist = null // list of bots
|
||||
var/mob/living/bot/active // the active bot; if null, show bot list
|
||||
var/list/botstatus // the status signal sent by the bot
|
||||
|
||||
var/bot_type //The type of bot it is.
|
||||
var/bot_filter //Determines which radio filter to use.
|
||||
|
||||
var/control_freq = BOT_FREQ
|
||||
|
||||
var/on = 0 //Are we currently active??
|
||||
var/menu_message = ""
|
||||
|
||||
/obj/item/radio/integrated/New()
|
||||
..()
|
||||
if(istype(loc.loc, /obj/item/device/pda))
|
||||
hostpda = loc.loc
|
||||
if(bot_filter)
|
||||
spawn(5)
|
||||
add_to_radio(bot_filter)
|
||||
|
||||
/obj/item/radio/integrated/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, control_freq)
|
||||
hostpda = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/proc/post_signal(var/freq, var/key, var/value, var/key2, var/value2, var/key3, var/value3, s_filter)
|
||||
|
||||
//to_world("Post: [freq]: [key]=[value], [key2]=[value2]")
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
|
||||
|
||||
if(!frequency)
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new()
|
||||
signal.source = src
|
||||
signal.transmission_method = TRANSMISSION_RADIO
|
||||
signal.data[key] = value
|
||||
if(key2)
|
||||
signal.data[key2] = value2
|
||||
if(key3)
|
||||
signal.data[key3] = value3
|
||||
|
||||
frequency.post_signal(src, signal, radio_filter = s_filter)
|
||||
|
||||
/obj/item/radio/integrated/Topic(href, href_list)
|
||||
..()
|
||||
switch(href_list["op"])
|
||||
if("control")
|
||||
active = locate(href_list["bot"])
|
||||
spawn(0)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
|
||||
|
||||
if("scanbots") // find all bots
|
||||
botlist = null
|
||||
spawn(0)
|
||||
post_signal(control_freq, "command", "bot_status", s_filter = bot_filter)
|
||||
|
||||
if("botlist")
|
||||
active = null
|
||||
|
||||
if("stop", "go", "home")
|
||||
spawn(0)
|
||||
post_signal(control_freq, "command", href_list["op"], "active", active, s_filter = bot_filter)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
|
||||
|
||||
if("summon")
|
||||
spawn(0)
|
||||
post_signal(control_freq, "command", "summon", "active", active, "target", get_turf(hostpda), "useraccess", hostpda.GetAccess(), "user", usr, s_filter = bot_filter)
|
||||
post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter)
|
||||
|
||||
/obj/item/radio/integrated/receive_signal(datum/signal/signal)
|
||||
if(bot_type && istype(signal.source, /mob/living/bot) && signal.data["type"] == bot_type)
|
||||
if(!botlist)
|
||||
botlist = new()
|
||||
|
||||
botlist |= signal.source
|
||||
|
||||
if(active == signal.source)
|
||||
var/list/b = signal.data
|
||||
botstatus = b.Copy()
|
||||
|
||||
/obj/item/radio/integrated/proc/add_to_radio(bot_filter) //Master filter control for bots. Must be placed in the bot's local New() to support map spawned bots.
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, control_freq, radio_filter = bot_filter)
|
||||
|
||||
/*
|
||||
* Radio Cartridge, essentially a signaler.
|
||||
*/
|
||||
/obj/item/radio/integrated/signal
|
||||
var/frequency = 1457
|
||||
var/code = 30.0
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
. = ..()
|
||||
if(radio_controller)
|
||||
if(src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||
if(last_transmission && world.time < (last_transmission + 5))
|
||||
return
|
||||
last_transmission = world.time
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/turf/T = get_turf(src)
|
||||
lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.source = src
|
||||
signal.encryption = code
|
||||
signal.data["message"] = message
|
||||
|
||||
spawn(0)
|
||||
radio_connection.post_signal(src, signal)
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/list/recipes // The list containing the Particle Smasher's recipes.
|
||||
|
||||
/obj/machinery/particle_smasher/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
storage = list()
|
||||
update_icon()
|
||||
prepare_recipes()
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/turbine_computer/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/computer/turbine_computer/LateInitialize()
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a145
|
||||
|
||||
/obj/item/ammo_casing/a145/spent/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
expend()
|
||||
|
||||
/*
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
setup_repair_needs()
|
||||
|
||||
/obj/item/weapon/broken_gun/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
spawn(30 SECONDS)
|
||||
if(!my_guntype && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/reagent_distillery/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
Reservoir = new (src)
|
||||
Reservoir.Master = src
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/hose_connector/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
create_reagents(100)
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/hose_connector/input/active/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(!isturf(loc))
|
||||
@@ -127,7 +127,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/hose_connector/output/active/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(!isturf(loc))
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
var/obj/item/hose_connector/input/active/InputSocket
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer/hosed/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
InputSocket = new(src)
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
density = FALSE
|
||||
|
||||
/obj/machinery/disposal/wall/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
spawn(1 SECOND) // Fixfix for weird interaction with buildmode or other late-spawning.
|
||||
update()
|
||||
@@ -1394,7 +1394,7 @@
|
||||
var/obj/linked // the linked obj/machinery/disposal or obj/disposaloutlet
|
||||
|
||||
/obj/structure/disposalpipe/trunk/Initialize()
|
||||
..() //Lateload below
|
||||
..()
|
||||
dpdir = dir
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/shuttle_landmark/automatic/clearing/LateInitialize()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/turf/T in range(radius, src))
|
||||
if(T.density)
|
||||
T.ChangeTurf(get_base_turf_by_area(T))
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/turf/simulated/wall/elevator/Initialize(mapload)
|
||||
..(mapload, "elevatorium")
|
||||
. = ..(mapload, "elevatorium")
|
||||
|
||||
Reference in New Issue
Block a user