The rest of the junk

This commit is contained in:
Lo6a4evskiy
2014-09-05 18:14:02 +04:00
parent a1fe0c03a2
commit eae6cdbe96
1277 changed files with 22563 additions and 21413 deletions
+11 -11
View File
@@ -34,7 +34,7 @@
"aH" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor/carpet,/area/awaymission/academy/headmaster)
"aI" = (/obj/structure/cult/tome,/obj/item/weapon/staff,/turf/simulated/floor/wood,/area/awaymission/academy/headmaster)
"aJ" = (/obj/structure/stool/bed/chair/wood/wings{dir = 8},/turf/simulated/floor/wood,/area/awaymission/academy/headmaster)
"aK" = (/obj/item/clothing/suit/space/rig/wizard,/obj/item/clothing/head/helmet/space/rig/wizard,/obj/structure/table/woodentable,/turf/simulated/floor/wood,/area/awaymission/academy/headmaster)
"aK" = (/obj/item/clothing/suit/space/hardsuit/wizard,/obj/item/clothing/head/helmet/space/hardsuit/wizard,/obj/structure/table/woodentable,/turf/simulated/floor/wood,/area/awaymission/academy/headmaster)
"aL" = (/obj/structure/table/reinforced,/obj/item/weapon/storage/briefcase,/turf/simulated/floor/carpet,/area/awaymission/academy/headmaster)
"aM" = (/obj/structure/table/reinforced,/obj/item/weapon/coin/plasma,/turf/simulated/floor/carpet,/area/awaymission/academy/headmaster)
"aN" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor/carpet,/area/awaymission/academy/headmaster)
@@ -126,7 +126,7 @@
"cv" = (/turf/simulated/floor/plating,/area/awaymission/academy/headmaster)
"cw" = (/obj/machinery/door/window{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/turf/simulated/floor/plating,/area/awaymission/academy/headmaster)
"cx" = (/obj/structure/table,/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/academy/headmaster)
"cy" = (/obj/structure/table,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/item/weapon/cable_coil/random,/turf/simulated/floor,/area/awaymission/academy/classrooms)
"cy" = (/obj/structure/table,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/item/stack/cable_coil/random,/turf/simulated/floor,/area/awaymission/academy/classrooms)
"cz" = (/turf/simulated/floor{icon_state = "red"; dir = 8},/area/awaymission/academy/classrooms)
"cA" = (/obj/item/target,/turf/simulated/floor/engine,/area/awaymission/academy/classrooms)
"cB" = (/turf/simulated/floor{icon_state = "red"; dir = 4},/area/awaymission/academy/classrooms)
@@ -255,7 +255,7 @@
"eU" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/turf/simulated/floor{dir = 8; icon_state = "chapel"},/area/awaymission/academy/classrooms)
"eV" = (/obj/structure/mineral_door/wood,/turf/simulated/floor{icon_state = "bar"},/area/awaymission/academy/classrooms)
"eW" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor{icon_state = "escape"; dir = 6},/area/awaymission/academy/classrooms)
"eX" = (/obj/structure/table,/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/item/weapon/reagent_containers/food/snacks/spellburger,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/awaymission/academy/classrooms)
"eX" = (/obj/structure/table,/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/item/weapon/reagent_containers/food/snacks/burger/spell,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/awaymission/academy/classrooms)
"eY" = (/turf/simulated/floor/plating{tag = "icon-warnplate (SOUTHWEST)"; icon_state = "warnplate"; dir = 10},/area/awaymission/academy)
"eZ" = (/obj/structure/window/reinforced,/turf/simulated/floor,/area/awaymission/academy/classrooms)
"fa" = (/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/carpet,/area/awaymission/academy/classrooms)
@@ -313,7 +313,7 @@
"ga" = (/obj/structure/table,/obj/item/weapon/pen/red,/turf/simulated/floor,/area/awaymission/academy/classrooms)
"gb" = (/obj/structure/table,/obj/item/weapon/scalpel,/turf/simulated/floor{icon_state = "whitehall"; dir = 4},/area/awaymission/academy/classrooms)
"gc" = (/obj/structure/stool/bed/chair/wood/normal,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gd" = (/obj/structure/bookcase,/obj/item/weapon/book/manual/engineering_hacking,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gd" = (/obj/structure/bookcase,/obj/item/weapon/book/manual/wiki/engineering_hacking,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"ge" = (/obj/structure/bookcase,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gf" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = ""},/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/academy/academyaft)
"gg" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/carpet,/area/awaymission/academy/academyaft)
@@ -344,7 +344,7 @@
"gF" = (/obj/structure/window/reinforced,/obj/item/ammo_casing,/turf/simulated/floor{icon_state = "delivery"; name = "floor"},/area/awaymission/academy/classrooms)
"gG" = (/mob/living/simple_animal/hostile/bear,/turf/simulated/floor/plating,/area/awaymission/academy/classrooms)
"gH" = (/obj/structure/bookcase,/obj/item/weapon/book/manual/hydroponics_pod_people,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gI" = (/obj/structure/bookcase,/obj/item/weapon/book/manual/barman_recipes,/obj/item/weapon/book/manual/security_space_law,/obj/item/weapon/book/manual/security_space_law,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gI" = (/obj/structure/bookcase,/obj/item/weapon/book/manual/barman_recipes,/obj/item/weapon/book/manual/wiki/security_space_law,/obj/item/weapon/book/manual/wiki/security_space_law,/turf/simulated/floor/wood,/area/awaymission/academy/classrooms)
"gJ" = (/obj/structure/stool,/turf/simulated/floor{tag = "icon-vault (NORTHEAST)"; icon_state = "vault"; dir = 5},/area/awaymission/academy/classrooms)
"gK" = (/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/awaymission/academy/classrooms)
"gL" = (/obj/machinery/light/small{dir = 8},/mob/living/simple_animal/hostile/bear,/turf/simulated/floor/plating,/area/awaymission/academy/classrooms)
@@ -403,18 +403,18 @@
"hM" = (/obj/structure/closet,/obj/item/candle,/obj/item/candle,/obj/item/weapon/storage/box/matches,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hN" = (/obj/structure/closet,/obj/item/weapon/storage/belt/soulstone,/obj/item/clothing/under/schoolgirl,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hO" = (/obj/structure/closet,/obj/item/clothing/under/blackskirt,/obj/item/clothing/glasses/regular,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hP" = (/obj/structure/closet,/obj/item/clothing/under/lightpurple,/obj/item/clothing/shoes/sandal,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hP" = (/obj/structure/closet,/obj/item/clothing/under/color/lightpurple,/obj/item/clothing/shoes/sandal,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hQ" = (/obj/structure/closet,/obj/item/weapon/lipstick/random,/obj/item/clothing/under/schoolgirl,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hR" = (/turf/simulated/floor/wood,/area/awaymission/academy/academyaft)
"hS" = (/obj/structure/closet,/obj/item/clothing/under/lightpurple,/obj/item/weapon/staff,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hS" = (/obj/structure/closet,/obj/item/clothing/under/color/lightpurple,/obj/item/weapon/staff,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hT" = (/obj/structure/closet,/obj/item/weapon/storage/wallet/random,/obj/item/clothing/glasses/regular/hipster,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hU" = (/obj/structure/closet,/obj/item/clothing/head/wizard/fake,/obj/item/clothing/suit/wizrobe/fake,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hV" = (/obj/structure/closet,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/clothing/under/purple,/obj/item/weapon/contraband/poster,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hV" = (/obj/structure/closet,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/clothing/under/color/purple,/obj/item/weapon/contraband/poster,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hW" = (/obj/structure/closet,/obj/item/weapon/storage/box/snappops,/obj/item/weapon/storage/backpack,/obj/item/weapon/paper{info = "Current Grade: F. Educator's Notes: No improvement shown despite multiple private lessons. Suggest additional tutilage."; name = "Pyromancy Evaluation"},/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hX" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
"hY" = (/obj/effect/decal/cleanable/oil,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"hZ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor,/area/awaymission/academy/academyaft)
"ia" = (/obj/item/weapon/cable_coil/random,/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
"ia" = (/obj/item/stack/cable_coil/random,/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
"ib" = (/obj/structure/rack,/obj/item/stack/sheet/mineral/plasma{amount = 50},/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
"ic" = (/turf/simulated/floor/grass,/area/awaymission/academy/academyaft)
"id" = (/obj/structure/rack,/obj/item/weapon/circuitboard/telecomms/broadcaster,/obj/item/weapon/circuitboard/telecomms/receiver,/obj/item/weapon/circuitboard/telecomms/relay,/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
@@ -442,7 +442,7 @@
"iz" = (/obj/machinery/power/port_gen/pacman,/turf/simulated/floor{icon_state = "hydrofloor"},/area/awaymission/academy/academyaft)
"iA" = (/obj/structure/toilet{dir = 8},/obj/machinery/light/small{dir = 1},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/awaymission/academy/academyaft)
"iB" = (/obj/item/weapon/paper,/turf/simulated/floor/wood,/area/awaymission/academy/academyaft)
"iC" = (/obj/item/weapon/cable_coil/random,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"iC" = (/obj/item/stack/cable_coil/random,/turf/simulated/floor,/area/awaymission/academy/academyaft)
"iD" = (/obj/machinery/door/airlock/maintenance_hatch,/turf/simulated/floor/plating,/area/awaymission/academy/academyaft)
"iE" = (/obj/item/device/multitool,/turf/simulated/floor/engine,/area/awaymission/academy/academyaft)
"iF" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor/engine,/area/awaymission/academy/academyaft)
@@ -517,7 +517,7 @@
"jW" = (/turf/simulated/floor/plating,/area/awaymission/academy/academygate)
"jX" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/carpet,/area/awaymission/academy/academygate)
"jY" = (/obj/machinery/power/apc{dir = 1; environ = 3; equipment = 3; locked = 0; req_access = ""},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/turf/simulated/floor/carpet,/area/awaymission/academy/academygate)
"jZ" = (/obj/item/weapon/cable_coil/random,/turf/simulated/floor/plating,/area/awaymission/academy/academygate)
"jZ" = (/obj/item/stack/cable_coil/random,/turf/simulated/floor/plating,/area/awaymission/academy/academygate)
"ka" = (/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/turf/simulated/floor/plating,/area/awaymission/academy/academygate)
"kb" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/plating,/area/awaymission/academy/academygate)
"kc" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/carpet,/area/awaymission/academy/academygate)
+5 -5
View File
@@ -291,7 +291,7 @@
"fE" = (/turf/simulated/floor{icon_state = "bar"},/area/awaymission/BMPship/Aft)
"fF" = (/obj/structure/window/reinforced{dir = 8},/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"fG" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"},/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"fH" = (/obj/structure/rack,/obj/item/weapon/cell/high,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/awaymission/BMPship/Aft)
"fH" = (/obj/structure/rack,/obj/item/weapon/stock_parts/cell/high,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/awaymission/BMPship/Aft)
"fI" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/awaymission/BMPship/Aft)
"fJ" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/BMPship/Fore)
"fK" = (/turf/simulated/floor{tag = "icon-carpetside (SOUTHWEST)"; icon_state = "carpetside"; dir = 10},/area/awaymission/BMPship/Fore)
@@ -320,7 +320,7 @@
"gh" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "bar"},/area/awaymission/BMPship/Aft)
"gi" = (/obj/structure/mopbucket,/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"gj" = (/obj/structure/window/reinforced{dir = 4},/obj/item/weapon/kitchenknife,/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"gk" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/item/weapon/cell/high,/turf/simulated/floor,/area/awaymission/BMPship/Aft)
"gk" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/item/weapon/stock_parts/cell/high,/turf/simulated/floor,/area/awaymission/BMPship/Aft)
"gl" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s5"; icon_state = "swall_s5"; dir = 2},/area/awaymission/BMPship/Fore)
"gm" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/floor{tag = "icon-carpetside"; icon_state = "carpetside"},/area/awaymission/BMPship/Fore)
"gn" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/door/unpowered/shuttle,/turf/simulated/floor{tag = "icon-carpetside"; icon_state = "carpetside"},/area/awaymission/BMPship/Fore)
@@ -335,7 +335,7 @@
"gw" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"gx" = (/obj/structure/window/reinforced,/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"gy" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/turf/simulated/shuttle/plating,/area/awaymission/BMPship/Aft)
"gz" = (/obj/item/weapon/cable_coil,/turf/simulated/floor/plating,/area/awaymission/BMPship/Aft)
"gz" = (/obj/item/stack/cable_coil,/turf/simulated/floor/plating,/area/awaymission/BMPship/Aft)
"gA" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/awaymission/BMPship/Aft)
"gB" = (/obj/item/stack/sheet/mineral/uranium{amount = 50},/turf/simulated/floor/engine,/area/awaymission/BMPship/Aft)
"gC" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s5"; icon_state = "swall_s5"; dir = 2},/area/space)
@@ -357,7 +357,7 @@
"gS" = (/turf/simulated/floor/plating/airless{tag = "icon-platingdmg2"; icon_state = "platingdmg2"},/area/awaymission/BMPship/Fore)
"gT" = (/obj/item/weapon/shard,/turf/simulated/floor/plating/airless{tag = "icon-platingdmg1"; icon_state = "platingdmg1"},/area/awaymission/BMPship/Fore)
"gU" = (/obj/structure/stool,/turf/simulated/floor/plating/airless{tag = "icon-platingdmg3"; icon_state = "platingdmg3"},/area/awaymission/BMPship/Fore)
"gV" = (/obj/item/weapon/cable_coil{amount = 5},/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Fore)
"gV" = (/obj/item/stack/cable_coil{amount = 5},/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Fore)
"gW" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Fore)
"gX" = (/turf/simulated/floor{tag = "icon-plating"; icon_state = "plating"},/area/awaymission/BMPship/Midship)
"gY" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor{icon_state = "bar"},/area/awaymission/BMPship/Midship)
@@ -405,7 +405,7 @@
"hO" = (/turf/simulated/floor/plating{tag = "icon-platingdmg3"; icon_state = "platingdmg3"},/area/awaymission)
"hP" = (/obj/item/apc_frame,/turf/simulated/floor/plating/airless,/area/awaymission)
"hQ" = (/obj/structure/ore_box,/obj/machinery/light/small{dir = 1},/turf/simulated/floor/plating/airless,/area/awaymission)
"hR" = (/obj/item/weapon/cable_coil{amount = 5},/turf/simulated/floor/plating/airless,/area/awaymission)
"hR" = (/obj/item/stack/cable_coil{amount = 5},/turf/simulated/floor/plating/airless,/area/awaymission)
"hS" = (/obj/structure/ore_box,/turf/simulated/floor/plating/airless,/area/awaymission)
"hT" = (/obj/machinery/computer/arcade,/turf/simulated/floor,/area/awaymission/BMPship/Aft)
"hU" = (/obj/effect/decal/remains/human,/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor,/area/awaymission/BMPship/Aft)
+2 -2
View File
@@ -602,12 +602,12 @@
"lD" = (/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/obj/structure/mirror{pixel_x = -28},/turf/simulated/floor{icon_state = "white"},/area/awaymission/centcomAway/thunderdome)
"lE" = (/turf/simulated/floor{icon_state = "white"},/area/awaymission/centcomAway/thunderdome)
"lF" = (/obj/structure/closet/secure_closet/personal,/turf/simulated/floor{icon_state = "white"},/area/awaymission/centcomAway/thunderdome)
"lG" = (/obj/structure/rack,/obj/item/clothing/under/color/red,/obj/item/clothing/shoes/brown,/obj/item/clothing/suit/armor/tdome/red,/obj/item/clothing/head/helmet/thunderdome,/obj/item/weapon/hatchet,/obj/item/weapon/shield/riot,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome)
"lG" = (/obj/structure/rack,/obj/item/clothing/under/color/red,/obj/item/clothing/shoes/sneakers/brown,/obj/item/clothing/suit/armor/tdome/red,/obj/item/clothing/head/helmet/thunderdome,/obj/item/weapon/hatchet,/obj/item/weapon/shield/riot,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome)
"lH" = (/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome)
"lI" = (/obj/machinery/recharger{pixel_y = 4},/turf/simulated/floor/plating,/area/awaymission/centcomAway/thunderdome)
"lJ" = (/obj/machinery/door/poddoor{id = "XCCtdome"; name = "XCC Thunderdome"},/turf/simulated/floor{icon_state = "delivery"},/area/awaymission/centcomAway/thunderdome)
"lK" = (/obj/machinery/igniter,/turf/simulated/floor{icon_state = "floor"},/area/awaymission/centcomAway/thunderdome)
"lL" = (/obj/structure/rack,/obj/item/clothing/under/color/green,/obj/item/clothing/shoes/brown,/obj/item/clothing/suit/armor/tdome/green,/obj/item/clothing/head/helmet/thunderdome,/obj/item/weapon/hatchet,/obj/item/weapon/shield/riot,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome)
"lL" = (/obj/structure/rack,/obj/item/clothing/under/color/green,/obj/item/clothing/shoes/sneakers/brown,/obj/item/clothing/suit/armor/tdome/green,/obj/item/clothing/head/helmet/thunderdome,/obj/item/weapon/hatchet,/obj/item/weapon/shield/riot,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome)
"lM" = (/obj/structure/table/reinforced,/obj/item/device/taperecorder,/obj/item/device/tape/random,/turf/simulated/floor{icon_state = "floor"},/area/awaymission/centcomAway/general)
"lN" = (/obj/structure/mirror{pixel_x = 28},/obj/structure/sink{dir = 4; icon_state = "sink"; pixel_x = 11; pixel_y = 0},/turf/simulated/floor{icon_state = "white"},/area/awaymission/centcomAway/thunderdome)
"lO" = (/obj/machinery/door/airlock/centcom{name = "Centcom Security"; opacity = 1; req_access_txt = "101"},/turf/simulated/floor{icon_state = "white"},/area/awaymission/centcomAway/courtroom)
+2 -2
View File
@@ -102,7 +102,7 @@
"bX" = (/obj/machinery/door_control{id = "challenge"; name = "Gateway Lockdown"; pixel_x = -4; pixel_y = 26; req_access_txt = "0"},/turf/simulated/floor/carpet,/area/awaymission/challenge/end)
"bY" = (/turf/simulated/floor/carpet,/area/awaymission/challenge/end)
"bZ" = (/obj/structure/mirror{pixel_y = 28},/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"ca" = (/obj/machinery/light{dir = 1},/obj/structure/rack,/obj/item/clothing/suit/armor/swat,/obj/item/clothing/head/helmet/space/deathsquad,/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"ca" = (/obj/machinery/light{dir = 1},/obj/structure/rack,/obj/item/clothing/suit/armor/heavy,/obj/item/clothing/head/helmet/space/deathsquad,/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"cb" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/challenge/end)
"cc" = (/obj/structure/stool/bed/chair{dir = 1},/obj/item/device/radio/intercom{dir = 0; name = "Station Intercom (General)"; pixel_x = 0; pixel_y = 28},/turf/simulated/floor{icon_state = "dark"},/area/awaymission/challenge/end)
"cd" = (/turf/simulated/floor{icon_state = "dark"},/area/awaymission/challenge/end)
@@ -121,7 +121,7 @@
"cq" = (/obj/structure/table/woodentable,/obj/item/weapon/melee/chainofcommand,/obj/item/weapon/stamp,/turf/simulated/floor/carpet,/area/awaymission/challenge/end)
"cr" = (/obj/structure/table/woodentable,/obj/item/weapon/paper{info = "Congratulations,<br><br>Your station has been selected to carry out the Gateway Project.<br><br>The equipment will be shipped to you at the start of the next quarter.<br> You are to prepare a secure location to house the equipment as outlined in the attached documents.<br><br>--Nanotrasen Blue Space Research"; name = "Confidential Correspondence, Pg 1"; pixel_x = 0; pixel_y = 0},/obj/item/weapon/folder/blue,/turf/simulated/floor/carpet,/area/awaymission/challenge/end)
"cs" = (/obj/structure/table/woodentable,/obj/item/device/flashlight/lamp/green{pixel_x = 1; pixel_y = 5},/turf/simulated/floor/carpet,/area/awaymission/challenge/end)
"ct" = (/obj/structure/rack,/obj/item/weapon/gun/projectile/automatic/silenced,/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"ct" = (/obj/structure/rack,/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced,/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"cu" = (/mob/living/simple_animal/hostile/syndicate/melee,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/challenge/end)
"cv" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor/wood,/area/awaymission/challenge/end)
"cw" = (/obj/structure/rack,/obj/item/weapon/gun/projectile/automatic/l6_saw,/turf/simulated/floor/wood,/area/awaymission/challenge/end)
+3 -3
View File
@@ -89,7 +89,7 @@
"bK" = (/obj/structure/stool/bed/chair/wood/normal{tag = "icon-wooden_chair (EAST)"; icon_state = "wooden_chair"; dir = 4},/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bL" = (/obj/structure/table/woodentable,/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bM" = (/obj/structure/stool/bed/chair/wood/normal{tag = "icon-wooden_chair (WEST)"; icon_state = "wooden_chair"; dir = 8},/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bN" = (/obj/structure/bookcase{density = 0; pixel_y = 32},/obj/item/weapon/book/manual/security_space_law,/obj/item/weapon/book/manual/security_space_law,/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bN" = (/obj/structure/bookcase{density = 0; pixel_y = 32},/obj/item/weapon/book/manual/wiki/security_space_law,/obj/item/weapon/book/manual/wiki/security_space_law,/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bO" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/drinks/bottle/wine,/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bP" = (/obj/structure/stool/bed/chair/wood/normal{tag = "icon-wooden_chair (NORTH)"; icon_state = "wooden_chair"; dir = 1},/turf/simulated/floor{icon_state = "bar"},/area/awaymission/example)
"bQ" = (/obj/machinery/vending/snack,/turf/simulated/floor,/area/awaymission/example)
@@ -101,7 +101,7 @@
"bW" = (/obj/structure/table,/obj/item/device/analyzer,/turf/simulated/floor,/area/awaymission/example)
"bX" = (/obj/structure/table,/obj/item/weapon/rack_parts,/turf/simulated/floor,/area/awaymission/example)
"bY" = (/obj/structure/table,/obj/item/device/toner,/turf/simulated/floor,/area/awaymission/example)
"bZ" = (/obj/structure/table,/obj/item/weapon/wirecutters,/obj/item/weapon/cable_coil/yellow,/turf/simulated/floor,/area/awaymission/example)
"bZ" = (/obj/structure/table,/obj/item/weapon/wirecutters,/obj/item/stack/cable_coil/yellow,/turf/simulated/floor,/area/awaymission/example)
"ca" = (/obj/structure/table,/obj/item/weapon/wrench,/turf/simulated/floor,/area/awaymission/example)
"cb" = (/obj/machinery/vending/assist,/turf/simulated/floor,/area/awaymission/example)
"cc" = (/obj/structure/ladder{id = "example"},/turf/simulated/floor/plating,/area/awaymission/example)
@@ -123,7 +123,7 @@
"cs" = (/obj/effect/landmark{name = "awaystart"},/obj/machinery/light_construct/small{tag = "icon-bulb-construct-stage1 (WEST)"; icon_state = "bulb-construct-stage1"; dir = 8},/turf/simulated/floor,/area/awaymission/example)
"ct" = (/obj/effect/landmark{name = "awaystart"},/obj/item/weapon/mop,/turf/simulated/floor,/area/awaymission/example)
"cu" = (/obj/structure/closet,/turf/simulated/floor,/area/awaymission/example)
"cv" = (/obj/structure/table,/obj/item/weapon/cell/high,/turf/simulated/floor,/area/awaymission/example)
"cv" = (/obj/structure/table,/obj/item/weapon/stock_parts/cell/high,/turf/simulated/floor,/area/awaymission/example)
"cw" = (/obj/structure/stool,/obj/effect/landmark{name = "awaystart"},/turf/simulated/floor,/area/awaymission/example)
"cx" = (/obj/structure/mopbucket,/obj/machinery/light_construct/small{dir = 4},/turf/simulated/floor,/area/awaymission/example)
+1 -1
View File
@@ -15,7 +15,7 @@
"o" = (/obj/structure/table,/obj/item/weapon/paper{info = "Nothing of interest to report."; name = "november report"},/obj/item/weapon/pen,/turf/simulated/floor,/area/awaymission/listeningpost)
"p" = (/obj/item/device/radio/intercom{desc = "Talk through this. Evilly"; freerange = 1; frequency = 1213; name = "Syndicate Intercom"; pixel_x = 32; subspace_transmission = 1; syndie = 1},/turf/simulated/floor,/area/awaymission/listeningpost)
"q" = (/obj/structure/rack,/obj/item/clothing/suit/space/syndicate,/obj/item/clothing/mask/gas,/obj/item/clothing/head/helmet/space/syndicate,/turf/simulated/floor,/area/awaymission/listeningpost)
"r" = (/obj/machinery/door/airlock,/obj/structure/safe/floor,/obj/item/weapon/paper{info = "I wonder how much longer they will accept my empty reports. They will cancel the case soon without results. When the pickup comes, I will tell them I have lost faith in our cause, and beg them to consider a diplomatic solution. How many nuclear teams have been dispatched with those nukes? I must try and prevent more from ever being sent. If they will not listen to reason, I will detonate the warehouse myself. Maybe some day in the immediate future, space will be peaceful, though I don't intend to live to see it. And that is why I write this down- it is my sacrifice that stabilised your worlds, traveller. Spare a thought for me, and please attempt to prevent nuclear proliferation, should it ever rear it's ugly head again. -Donk Co. Operative #451"; name = "odd report"},/obj/item/weapon/gun/projectile/automatic/silenced,/obj/item/weapon/silencer,/turf/simulated/floor,/area/awaymission/listeningpost)
"r" = (/obj/machinery/door/airlock,/obj/structure/safe/floor,/obj/item/weapon/paper{info = "I wonder how much longer they will accept my empty reports. They will cancel the case soon without results. When the pickup comes, I will tell them I have lost faith in our cause, and beg them to consider a diplomatic solution. How many nuclear teams have been dispatched with those nukes? I must try and prevent more from ever being sent. If they will not listen to reason, I will detonate the warehouse myself. Maybe some day in the immediate future, space will be peaceful, though I don't intend to live to see it. And that is why I write this down- it is my sacrifice that stabilised your worlds, traveller. Spare a thought for me, and please attempt to prevent nuclear proliferation, should it ever rear it's ugly head again. -Donk Co. Operative #451"; name = "odd report"},/obj/item/weapon/gun/projectile/automatic/pistol,/turf/simulated/floor,/area/awaymission/listeningpost)
"s" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/turf/simulated/mineral,/area/mine/unexplored)
"t" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/mineral,/area/mine/unexplored)
"u" = (/obj/structure/disposaloutlet{dir = 4},/obj/structure/disposalpipe/trunk{dir = 8},/turf/simulated/floor/plating/airless,/area/space)
+21 -21
View File
@@ -10,21 +10,21 @@
"aj" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"ak" = (/obj/machinery/door/airlock/external,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"al" = (/mob/living/simple_animal/hostile/syndicate/ranged,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"am" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/rig/syndi,/obj/item/clothing/head/helmet/space/rig/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"am" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/hardsuit/syndi,/obj/item/clothing/head/helmet/space/hardsuit/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"an" = (/obj/structure/table/reinforced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"ao" = (/obj/machinery/sleeper,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"ap" = (/obj/effect/landmark{name = "awaystart"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"aq" = (/mob/living/simple_animal/hostile/syndicate/melee,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"ar" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"as" = (/obj/structure/table/reinforced,/obj/item/weapon/grenade/empgrenade,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"at" = (/obj/structure/table/reinforced,/obj/item/ammo_casing/a12mm,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"at" = (/obj/structure/table/reinforced,/obj/item/ammo_casing/c10mm,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"au" = (/obj/structure/table/reinforced,/obj/item/weapon/gun/projectile/automatic/c20r,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"av" = (/turf/space,/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate3)
"aw" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_r (NORTH)"; icon_state = "propulsion_r"; dir = 1},/turf/space,/area/awaymission/spacebattle/syndicate3)
"ax" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion (NORTH)"; icon_state = "propulsion"; dir = 1},/turf/space,/area/awaymission/spacebattle/syndicate3)
"ay" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_l (NORTH)"; icon_state = "propulsion_l"; dir = 1},/turf/space,/area/awaymission/spacebattle/syndicate3)
"az" = (/turf/space,/turf/simulated/shuttle/wall{dir = 1; icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate3)
"aA" = (/obj/structure/table/reinforced,/obj/item/weapon/gun/projectile/automatic/silenced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"aA" = (/obj/structure/table/reinforced,/obj/item/weapon/gun/projectile/automatic/pistol,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"aB" = (/turf/simulated/shuttle/wall{icon_state = "wall3"},/area/awaymission/spacebattle/syndicate3)
"aC" = (/obj/structure/shuttle/engine/heater{tag = "icon-heater (NORTH)"; icon_state = "heater"; dir = 1},/obj/structure/window/reinforced,/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/syndicate3)
"aD" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
@@ -33,7 +33,7 @@
"aG" = (/turf/space,/turf/simulated/shuttle/wall{icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate2)
"aH" = (/obj/structure/stool/bed/chair,/mob/living/simple_animal/hostile/syndicate,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
"aI" = (/turf/space,/turf/simulated/shuttle/wall{dir = 4; icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate2)
"aJ" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/rig/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
"aJ" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/hardsuit/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
"aK" = (/obj/structure/table/reinforced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
"aL" = (/obj/structure/table/reinforced,/obj/item/weapon/gun/projectile/automatic/deagle,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
"aM" = (/obj/machinery/computer/shuttle,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate2)
@@ -57,7 +57,7 @@
"be" = (/obj/effect/landmark{name = "awaystart"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
"bf" = (/obj/machinery/porta_turret{dir = 8; emagged = 1; installation = /obj/item/weapon/gun/energy/lasercannon},/turf/simulated/floor/plating,/area/awaymission/spacebattle/syndicate2)
"bg" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate3)
"bh" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/rig/syndi,/obj/item/clothing/head/helmet/space/rig/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
"bh" = (/obj/structure/table/reinforced,/obj/item/clothing/suit/space/hardsuit/syndi,/obj/item/clothing/head/helmet/space/hardsuit/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
"bi" = (/obj/structure/table/reinforced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
"bj" = (/obj/structure/table/reinforced,/obj/item/clothing/gloves/combat,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
"bk" = (/obj/machinery/sleeper,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/spacebattle/syndicate1)
@@ -126,9 +126,9 @@
"cv" = (/turf/simulated/shuttle/wall{tag = "icon-swallc1"; icon_state = "swallc1"},/area/awaymission/spacebattle/cruiser)
"cw" = (/turf/simulated/shuttle/wall{tag = "icon-swallc2"; icon_state = "swallc2"},/area/awaymission/spacebattle/cruiser)
"cx" = (/obj/machinery/power/smes/magical{desc = "A high-capacity superconducting magnetic energy storage (SMES) unit."; name = "power storage unit"},/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cy" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor{tag = "icon-damaged2"; icon_state = "damaged2"},/area/awaymission/spacebattle/cruiser)
"cz" = (/obj/item/stack/sheet/metal,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cA" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cy" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor{tag = "icon-damaged2"; icon_state = "damaged2"},/area/awaymission/spacebattle/cruiser)
"cz" = (/obj/item/stack/sheet/metal,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cA" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cB" = (/obj/structure/closet/cabinet,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cC" = (/obj/structure/stool/bed,/obj/item/weapon/bedsheet,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cD" = (/obj/machinery/vending/cigarette,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
@@ -141,8 +141,8 @@
"cK" = (/obj/structure/table/reinforced,/obj/machinery/microwave,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/awaymission/spacebattle/cruiser)
"cL" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"cM" = (/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"cN" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cO" = (/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cN" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cO" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cP" = (/turf/simulated/floor{tag = "icon-damaged2"; icon_state = "damaged2"},/area/awaymission/spacebattle/cruiser)
"cQ" = (/obj/effect/landmark{name = "awaystart"},/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"cR" = (/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/awaymission/spacebattle/cruiser)
@@ -276,9 +276,9 @@
"fp" = (/obj/structure/closet/crate,/obj/item/clothing/glasses/material,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"fq" = (/obj/structure/closet/crate,/obj/item/weapon/light/tube,/obj/item/weapon/light/tube,/obj/item/weapon/light/tube,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"fr" = (/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fs" = (/obj/effect/landmark/corpse/syndicatesoldier,/obj/item/weapon/gun/projectile/automatic/c20r,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"ft" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fu" = (/obj/effect/landmark/corpse/bridgeofficer{mobname = "Walter Strider"; name = "Walter Strider"},/obj/item/weapon/gun/projectile/shotgun/combat,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fs" = (/obj/effect/landmark/corpse/syndicatesoldier,/obj/item/weapon/gun/projectile/automatic/c20r,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"ft" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fu" = (/obj/effect/landmark/corpse/bridgeofficer{mobname = "Walter Strider"; name = "Walter Strider"},/obj/item/weapon/gun/projectile/shotgun/combat,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fv" = (/obj/item/ammo_casing/shotgun,/turf/simulated/floor{dir = 1; icon_state = "bluecorner"},/area/awaymission/spacebattle/cruiser)
"fw" = (/obj/item/ammo_casing/a357,/obj/item/ammo_casing/a357,/obj/item/weapon/gun/projectile/revolver/mateba,/obj/effect/landmark/corpse/commander{mobname = "Aaron Bowden"; name = "Aaron Bowden"},/obj/effect/decal/cleanable/blood,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"fx" = (/obj/structure/stool/bed/chair{dir = 4},/obj/effect/decal/cleanable/blood,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
@@ -297,11 +297,11 @@
"fK" = (/obj/structure/artilleryplaceholder{tag = "icon-12"; icon_state = "12"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser)
"fL" = (/obj/structure/closet/crate/internals,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/firstaid/o2,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"fM" = (/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fN" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fO" = (/obj/item/ammo_casing/shotgun,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fN" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fO" = (/obj/item/ammo_casing/shotgun,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fP" = (/obj/item/ammo_casing/shotgun,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fQ" = (/obj/effect/landmark/corpse/syndicatesoldier,/obj/item/weapon/gun/projectile/automatic/c20r,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fR" = (/obj/item/ammo_casing/a12mm,/turf/simulated/floor{dir = 8; icon_state = "bluecorner"},/area/awaymission/spacebattle/cruiser)
"fQ" = (/obj/effect/landmark/corpse/syndicatesoldier,/obj/item/weapon/gun/projectile/automatic/c20r,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser)
"fR" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor{dir = 8; icon_state = "bluecorner"},/area/awaymission/spacebattle/cruiser)
"fS" = (/obj/machinery/computer/communications,/turf/simulated/floor{tag = "icon-bluefull"; icon_state = "bluefull"},/area/awaymission/spacebattle/cruiser)
"fT" = (/obj/structure/artilleryplaceholder{tag = "icon-13"; icon_state = "13"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser)
"fU" = (/obj/structure/artilleryplaceholder{tag = "icon-14"; icon_state = "14"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser)
@@ -382,7 +382,7 @@
"hr" = (/obj/structure/largecrate,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hs" = (/obj/structure/closet/crate/secure/plasma,/obj/item/weapon/tank/plasma,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"ht" = (/obj/structure/closet/crate/medical,/obj/item/weapon/storage/firstaid/fire,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hu" = (/obj/structure/rack,/obj/item/clothing/suit/space/rig,/obj/item/clothing/head/helmet/space/rig,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"hu" = (/obj/structure/rack,/obj/item/clothing/suit/space/hardsuit,/obj/item/clothing/head/helmet/space/hardsuit,/turf/simulated/floor,/area/awaymission/spacebattle/cruiser)
"hv" = (/obj/machinery/portable_atmospherics/canister/oxygen,/turf/simulated/floor{dir = 5; icon_state = "warning"},/area/awaymission/spacebattle/cruiser)
"hw" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/engine,/area/awaymission/spacebattle/cruiser)
"hx" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/engine,/area/awaymission/spacebattle/cruiser)
@@ -390,7 +390,7 @@
"hz" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_l (WEST)"; icon_state = "propulsion_l"; dir = 8},/turf/space,/area/awaymission/spacebattle/syndicate7)
"hA" = (/obj/structure/largecrate,/mob/living/simple_animal/corgi/puppy,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hB" = (/obj/structure/closet/crate,/obj/item/weapon/paint/anycolor,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hC" = (/obj/structure/closet/crate,/obj/item/weapon/cell/high,/obj/item/weapon/cell/high,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hC" = (/obj/structure/closet/crate,/obj/item/weapon/stock_parts/cell/high,/obj/item/weapon/stock_parts/cell/high,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hD" = (/obj/structure/closet/crate/medical,/obj/item/weapon/storage/firstaid/regular,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hE" = (/obj/structure/closet/crate/medical,/obj/item/weapon/tank/anesthetic,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
"hF" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/floor{icon_state = "white"},/area/awaymission/spacebattle/cruiser)
@@ -428,7 +428,7 @@
"il" = (/mob/living/simple_animal/hostile/syndicate/ranged/space,/turf/simulated/floor{icon_state = "freezerfloor"},/area/awaymission/spacebattle/cruiser)
"im" = (/obj/effect/landmark/corpse/doctor{mobname = "Herbert West"; name = "Herbert West"},/obj/effect/decal/cleanable/blood,/turf/simulated/floor{icon_state = "white"},/area/awaymission/spacebattle/cruiser)
"in" = (/obj/effect/landmark/corpse/engineer{mobname = "Carth Robinson"; name = "Carth Robinson"},/obj/effect/decal/cleanable/blood,/turf/simulated/floor{icon_state = "freezerfloor"},/area/awaymission/spacebattle/cruiser)
"io" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor{icon_state = "freezerfloor"},/area/awaymission/spacebattle/cruiser)
"io" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor{icon_state = "freezerfloor"},/area/awaymission/spacebattle/cruiser)
"ip" = (/obj/machinery/sleeper,/turf/simulated/floor{icon_state = "white"},/area/awaymission/spacebattle/cruiser)
"iq" = (/obj/machinery/sleep_console,/turf/simulated/floor{icon_state = "white"},/area/awaymission/spacebattle/cruiser)
"ir" = (/turf/space,/turf/simulated/shuttle/wall{icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate7)
@@ -484,7 +484,7 @@
"jp" = (/turf/simulated/wall/mineral/plasma,/area/awaymission/spacebattle/secret)
"jq" = (/turf/simulated/floor{tag = "icon-alienvault"; icon_state = "alienvault"},/area/awaymission/spacebattle/secret)
"jr" = (/obj/machinery/door/airlock/plasma,/turf/simulated/wall/mineral/plasma,/area/awaymission/spacebattle/secret)
"js" = (/obj/item/clothing/suit/space/rig/wizard,/obj/item/clothing/head/helmet/space/rig/wizard,/turf/simulated/floor{tag = "icon-alienvault"; icon_state = "alienvault"},/area/awaymission/spacebattle/secret)
"js" = (/obj/item/clothing/suit/space/hardsuit/wizard,/obj/item/clothing/head/helmet/space/hardsuit/wizard,/turf/simulated/floor{tag = "icon-alienvault"; icon_state = "alienvault"},/area/awaymission/spacebattle/secret)
(1,1,1) = {"
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabababababababababababababababababababababababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+2 -2
View File
@@ -5,7 +5,7 @@
"ae" = (/obj/machinery/power/apc{step_y = 0},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/turf/unsimulated/wall,/area/awaymission)
"af" = (/obj/machinery/power/terminal,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating,/area/awaymission)
"ag" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plating,/area/awaymission)
"ah" = (/obj/item/weapon/cable_coil/random,/obj/effect/decal/remains/human,/turf/simulated/floor/plating,/area/awaymission)
"ah" = (/obj/item/stack/cable_coil/random,/obj/effect/decal/remains/human,/turf/simulated/floor/plating,/area/awaymission)
"ai" = (/turf/simulated/floor/plating,/area/awaymission)
"aj" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plating,/area/awaymission)
"ak" = (/obj/machinery/power/smes/magical,/turf/simulated/shuttle/plating,/area/awaymission)
@@ -188,7 +188,7 @@
"dF" = (/obj/structure/closet/secure_closet/freezer/fridge,/turf/simulated/floor,/area/awaymission)
"dG" = (/obj/structure/kitchenspike,/obj/effect/decal/cleanable/blood,/turf/simulated/floor,/area/awaymission)
"dH" = (/obj/machinery/door/airlock,/obj/effect/decal/cleanable/blood/old,/turf/simulated/floor,/area/awaymission)
"dI" = (/obj/item/weapon/bananapeel,/obj/item/toy/spinningtoy,/turf/simulated/floor/carpet,/area/awaymission)
"dI" = (/obj/item/weapon/grown/bananapeel,/obj/item/toy/spinningtoy,/turf/simulated/floor/carpet,/area/awaymission)
"dJ" = (/obj/structure/barricade/wooden,/turf/simulated/floor/carpet,/area/awaymission)
"dK" = (/obj/item/target/syndicate,/turf/simulated/floor/carpet,/area/awaymission)
"dL" = (/obj/item/trash/candy,/turf/simulated/floor/carpet,/area/awaymission)
+25 -25
View File
@@ -61,7 +61,7 @@
"bi" = (/obj/machinery/vending/cola,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bj" = (/obj/machinery/vending/cigarette,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bk" = (/obj/machinery/vending/coffee,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bl" = (/obj/structure/closet/syndicate,/obj/item/clothing/suit/space/rig/syndi,/obj/item/clothing/head/helmet/space/rig/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bl" = (/obj/structure/closet/syndicate,/obj/item/clothing/suit/space/hardsuit/syndi,/obj/item/clothing/head/helmet/space/hardsuit/syndi,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bm" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bn" = (/obj/structure/closet/syndicate,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/awaymission/syndishuttle)
"bo" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion (EAST)"; icon_state = "propulsion"; dir = 4},/turf/simulated/shuttle/wall{icon_state = "wall3"},/area/awaymission/syndishuttle)
@@ -290,7 +290,7 @@
"fD" = (/obj/structure/table/holotable,/obj/item/weapon/gun/energy/floragun{pixel_x = 2; pixel_y = 3},/obj/machinery/light,/obj/item/weapon/gun/energy/taser{pixel_x = -2; pixel_y = -2},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"fE" = (/obj/structure/target_stake,/obj/item/weapon/grown/sunflower,/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"fF" = (/obj/item/ammo_casing/c45,/obj/item/ammo_casing/c45{pixel_x = 7},/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/northblock)
"fG" = (/obj/item/clothing/suit/space/syndicate,/obj/item/clothing/under/syndicate,/obj/item/clothing/head/helmet/space/syndicate,/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/clothing/shoes/syndigaloshes,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/silenced/sc_silenced,/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/northblock)
"fG" = (/obj/item/clothing/suit/space/syndicate,/obj/item/clothing/under/syndicate,/obj/item/clothing/head/helmet/space/syndicate,/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/clothing/shoes/syndigaloshes,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/pistol,/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/northblock)
"fH" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor/airless,/area/awaymission/midblock)
"fI" = (/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/awaymission/midblock)
"fJ" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless{icon_state = "damaged5"},/area/awaymission/midblock)
@@ -390,7 +390,7 @@
"hz" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/item/clothing/suit/space/syndicate,/obj/item/weapon/paper/sc_safehint_paper_prison,/obj/item/weapon/gun/projectile/shotgun/sc_pump,/turf/simulated/floor,/area/awaymission/arrivalblock)
"hA" = (/obj/structure/window/reinforced,/turf/simulated/floor,/area/awaymission/arrivalblock)
"hB" = (/obj/machinery/door/window/southleft{name = "Windoor"},/turf/simulated/floor{icon_state = "red"; dir = 4},/area/awaymission/arrivalblock)
"hC" = (/obj/item/ammo_casing/a12mm{pixel_x = 2; pixel_y = 5},/obj/item/ammo_casing/a12mm{pixel_x = -4; pixel_y = -5},/obj/item/ammo_casing/a12mm,/turf/simulated/floor/airless,/area/awaymission/midblock)
"hC" = (/obj/item/ammo_casing/c10mm{pixel_x = 2; pixel_y = 5},/obj/item/ammo_casing/c10mm{pixel_x = -4; pixel_y = -5},/obj/item/ammo_casing/c10mm,/turf/simulated/floor/airless,/area/awaymission/midblock)
"hD" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless,/area/awaymission/midblock)
"hE" = (/obj/structure/sink/kitchen{pixel_y = 32},/turf/simulated/floor,/area/awaymission/midblock)
"hF" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/condiment/enzyme,/obj/item/weapon/reagent_containers/food/condiment/peppermill,/obj/item/weapon/reagent_containers/food/condiment/saltshaker{pixel_x = 4; pixel_y = 4},/turf/simulated/floor,/area/awaymission/midblock)
@@ -409,12 +409,12 @@
"hS" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"hT" = (/obj/effect/decal/remains/human,/obj/item/weapon/butch,/obj/item/weapon/kitchenknife,/obj/item/clothing/head/chefhat,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"hU" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"hV" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/a12mm,/obj/item/weapon/paper/sc_safehint_paper_caf,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"hV" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/weapon/paper/sc_safehint_paper_caf,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"hW" = (/obj/machinery/light/small,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/midblock)
"hX" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/midblock)
"hY" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/midblock)
"hZ" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
"ia" = (/obj/effect/decal/cleanable/blood/splatter,/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"ia" = (/obj/effect/decal/cleanable/blood/splatter,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"ib" = (/obj/machinery/power/apc{cell_type = 7500; dir = 8; name = "Arrivals Block APC"; pixel_x = -28},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor{icon_state = "red"; dir = 8},/area/awaymission/arrivalblock)
"ic" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor,/area/awaymission/arrivalblock)
"id" = (/obj/structure/stool/bed/chair{dir = 1},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor,/area/awaymission/arrivalblock)
@@ -423,13 +423,13 @@
"ig" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless,/area/awaymission/midblock)
"ih" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/awaymission/midblock)
"ii" = (/obj/machinery/microwave{pixel_x = -2; pixel_y = 7},/obj/structure/table,/turf/simulated/floor,/area/awaymission/midblock)
"ij" = (/obj/structure/stool,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/midblock)
"ik" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"il" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/a12mm,/obj/item/clothing/under/syndicate,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"im" = (/obj/structure/stool/bed/chair{dir = 4},/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"in" = (/obj/structure/table,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/midblock)
"io" = (/obj/structure/stool/bed/chair{dir = 8},/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"ip" = (/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"ij" = (/obj/structure/stool,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/midblock)
"ik" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"il" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/clothing/under/syndicate,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"im" = (/obj/structure/stool/bed/chair{dir = 4},/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"in" = (/obj/structure/table,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/midblock)
"io" = (/obj/structure/stool/bed/chair{dir = 8},/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"ip" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"iq" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor,/area/awaymission/arrivalblock)
"ir" = (/turf/simulated/floor{icon_state = "red"; dir = 10},/area/awaymission/arrivalblock)
"is" = (/turf/simulated/floor{icon_state = "red"},/area/awaymission/arrivalblock)
@@ -440,14 +440,14 @@
"ix" = (/obj/structure/closet/secure_closet/freezer/fridge,/obj/machinery/light,/turf/simulated/floor,/area/awaymission/midblock)
"iy" = (/obj/structure/closet/secure_closet/freezer/kitchen,/turf/simulated/floor,/area/awaymission/midblock)
"iz" = (/obj/machinery/door/window/eastright{name = "Windoor"},/turf/simulated/floor,/area/awaymission/midblock)
"iA" = (/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/midblock)
"iB" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"iC" = (/obj/item/ammo_casing/a12mm,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"iD" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/a12mm,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"iE" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/midblock)
"iA" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/midblock)
"iB" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"iC" = (/obj/item/ammo_casing/c10mm,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/midblock)
"iD" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/obj/item/ammo_casing/c10mm,/obj/item/clothing/under/syndicate,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/projectile/automatic/c20r/sc_c20r,/turf/simulated/floor,/area/awaymission/midblock)
"iE" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/midblock)
"iF" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor,/area/awaymission/midblock)
"iG" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/item/weapon/shard{icon_state = "medium"},/obj/item/stack/rods,/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
"iH" = (/obj/effect/decal/remains/human,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"iH" = (/obj/effect/decal/remains/human,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"iI" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
"iJ" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
"iK" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
@@ -464,8 +464,8 @@
"iV" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor/airless,/area/awaymission/southblock)
"iW" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"iX" = (/turf/simulated/floor/airless,/area/awaymission/southblock)
"iY" = (/obj/item/ammo_casing/a12mm,/turf/simulated/floor/airless,/area/awaymission/southblock)
"iZ" = (/obj/item/ammo_casing/a12mm{pixel_x = -4; pixel_y = 3},/turf/simulated/floor/airless,/area/awaymission/southblock)
"iY" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor/airless,/area/awaymission/southblock)
"iZ" = (/obj/item/ammo_casing/c10mm{pixel_x = -4; pixel_y = 3},/turf/simulated/floor/airless,/area/awaymission/southblock)
"ja" = (/obj/machinery/light{dir = 1},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jb" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jc" = (/turf/simulated/wall,/area/awaymission/southblock)
@@ -479,7 +479,7 @@
"jk" = (/turf/simulated/floor/airless{icon_state = "damaged4"},/area/awaymission/southblock)
"jl" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jm" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jn" = (/obj/item/ammo_casing/a12mm{pixel_y = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jn" = (/obj/item/ammo_casing/c10mm{pixel_y = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jo" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jp" = (/obj/structure/sign/bluecross{pixel_y = -32},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
"jq" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/airless,/area/awaymission/southblock)
@@ -495,10 +495,10 @@
"jA" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/southblock)
"jB" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/southblock)
"jC" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/southblock)
"jD" = (/obj/item/ammo_casing/a12mm,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"jD" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"jE" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/arrivalblock)
"jF" = (/obj/effect/decal/remains/human{desc = "This guy seemed to have died in terrible way! Half his remains are dust."; icon_state = "remains"; name = "Syndicate agent remains"},/turf/simulated/floor,/area/awaymission/arrivalblock)
"jG" = (/obj/machinery/light{dir = 1},/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"jG" = (/obj/machinery/light{dir = 1},/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"jH" = (/obj/structure/sign/vacuum{pixel_y = 32},/turf/simulated/floor,/area/awaymission/arrivalblock)
"jI" = (/obj/structure/closet/toolcloset,/turf/simulated/floor,/area/awaymission/southblock)
"jJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor,/area/awaymission/southblock)
@@ -519,7 +519,7 @@
"jY" = (/obj/structure/table/woodentable,/turf/simulated/floor/wood,/area/awaymission/southblock)
"jZ" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/southblock)
"ka" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating,/area/awaymission/arrivalblock)
"kb" = (/obj/effect/decal/cleanable/blood/splatter,/obj/item/ammo_casing/a12mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"kb" = (/obj/effect/decal/cleanable/blood/splatter,/obj/item/ammo_casing/c10mm,/turf/simulated/floor,/area/awaymission/arrivalblock)
"kc" = (/obj/structure/sign/pods{pixel_y = -32},/turf/simulated/floor,/area/awaymission/arrivalblock)
"kd" = (/obj/structure/sign/vacuum{pixel_y = -32},/turf/simulated/floor,/area/awaymission/arrivalblock)
"ke" = (/obj/machinery/portable_atmospherics/scrubber,/turf/simulated/floor,/area/awaymission/southblock)
@@ -586,7 +586,7 @@
"ln" = (/obj/machinery/light/small,/turf/simulated/floor/wood,/area/awaymission/southblock)
"lo" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor,/area/awaymission/arrivalblock)
"lp" = (/obj/structure/table,/obj/item/weapon/book/manual/hydroponics_pod_people,/turf/simulated/floor,/area/awaymission/arrivalblock)
"lq" = (/obj/item/weapon/grown/deathnettle,/obj/item/clothing/shoes/brown,/obj/item/clothing/under/rank/hydroponics,/obj/effect/decal/remains/human,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/arrivalblock)
"lq" = (/obj/item/weapon/grown/nettle/death,/obj/item/clothing/shoes/sneakers/brown,/obj/item/clothing/under/rank/hydroponics,/obj/effect/decal/remains/human,/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor,/area/awaymission/arrivalblock)
"lr" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor{tag = "icon-whitehall (WEST)"; icon_state = "whitehall"; dir = 8},/area/awaymission/southblock)
"ls" = (/obj/structure/window/reinforced/tinted{dir = 8; icon_state = "twindow"; tag = ""},/turf/simulated/floor,/area/awaymission/southblock)
"lt" = (/obj/structure/stool/bed,/obj/structure/window/reinforced/tinted,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor{icon_state = "whitehall"; dir = 4},/area/awaymission/southblock)
+9 -9
View File
@@ -50,11 +50,11 @@
"aX" = (/obj/effect/forcefield{desc = "You can't get in. Heh."; layer = 1; name = "Blocker"},/turf/simulated/wall/mineral/sandstone,/area/awaymission/wwmines)
"aY" = (/obj/effect/decal/cleanable/blood/gibs/body{tag = "icon-gibup1"; icon_state = "gibup1"},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"aZ" = (/obj/effect/mine/dnascramble,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"ba" = (/obj/effect/mine/dnascramble,/obj/item/ammo_box/a12mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"ba" = (/obj/effect/mine/dnascramble,/obj/item/ammo_box/c10mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"bb" = (/obj/effect/decal/cleanable/cobweb,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
"bc" = (/turf/simulated/floor/plating,/area/awaymission/wwrefine)
"bd" = (/obj/machinery/door/airlock/sandstone,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
"be" = (/obj/item/ammo_box/a12mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"be" = (/obj/item/ammo_box/c10mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"bf" = (/mob/living/simple_animal/hostile/syndicate/ranged,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"bg" = (/turf/simulated/wall/mineral/sandstone,/area/space)
"bh" = (/obj/structure/largecrate,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
@@ -68,7 +68,7 @@
"bp" = (/obj/effect/decal/cleanable/blood/gibs/body,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"bq" = (/obj/effect/landmark/corpse/miner/rig,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
"br" = (/obj/structure/lattice,/turf/space,/area/space)
"bs" = (/obj/effect/mine/dnascramble,/obj/item/ammo_box/a12mm,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"bs" = (/obj/effect/mine/dnascramble,/obj/item/ammo_box/c10mm,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"bt" = (/obj/structure/closet/crate,/obj/effect/decal/cleanable/cobweb,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
"bu" = (/turf/simulated/wall/mineral/sandstone,/area/awaymission/wwmines)
"bv" = (/obj/structure/window/reinforced{tag = "icon-fwindow"; icon_state = "fwindow"},/turf/space,/area/space)
@@ -112,7 +112,7 @@
"ch" = (/obj/structure/table/woodentable,/obj/item/weapon/gun/projectile,/turf/simulated/floor{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/awaymission/wwmines)
"ci" = (/obj/structure/mineral_door/wood{tag = "icon-woodopening"; icon_state = "woodopening"},/turf/simulated/floor/wood,/area/awaymission/wwmines)
"cj" = (/obj/structure/stool,/turf/simulated/floor/carpet,/area/awaymission/wwmines)
"ck" = (/obj/item/ammo_box/a12mm,/turf/simulated/floor/carpet,/area/awaymission/wwmines)
"ck" = (/obj/item/ammo_box/c10mm,/turf/simulated/floor/carpet,/area/awaymission/wwmines)
"cl" = (/obj/structure/stool,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"cm" = (/obj/structure/bookcase{tag = "icon-book-5"; icon_state = "book-5"},/turf/simulated/floor/wood,/area/awaymission/wwgov)
"cn" = (/turf/simulated/floor/wood,/area/awaymission/wwgov)
@@ -129,7 +129,7 @@
"cy" = (/obj/structure/stool/bed/chair/wood/wings,/turf/simulated/floor/wood,/area/awaymission/wwgov)
"cz" = (/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"cA" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"cB" = (/obj/effect/mine/plasma,/obj/item/ammo_box/a12mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"cB" = (/obj/effect/mine/plasma,/obj/item/ammo_box/c10mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"cC" = (/obj/structure/table/woodentable,/obj/item/weapon/storage/toolbox/electrical,/turf/simulated/floor/wood,/area/awaymission/wwgov)
"cD" = (/obj/structure/table/woodentable,/obj/item/clothing/gloves/yellow,/obj/item/device/multitool,/turf/simulated/floor/wood,/area/awaymission/wwgov)
"cE" = (/obj/structure/stool/bed/chair/wood/normal{dir = 4},/turf/simulated/floor/wood,/area/awaymission/wwgov)
@@ -157,9 +157,9 @@
"da" = (/obj/structure/stool/bed/chair/wood/normal{dir = 4},/turf/simulated/floor/wood,/area/awaymission/wwmines)
"db" = (/obj/structure/stool/bed/chair/wood/normal{dir = 8},/turf/simulated/floor/wood,/area/awaymission/wwmines)
"dc" = (/obj/structure/window/reinforced{tag = "icon-fwindow (WEST)"; icon_state = "fwindow"; dir = 8},/obj/structure/window/reinforced{tag = "icon-fwindow (EAST)"; icon_state = "fwindow"; dir = 4},/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwgov)
"dd" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"dd" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/snacks/sliceable/store/creamcheesebread,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"de" = (/obj/structure/table/woodentable,/obj/item/weapon/kitchen/rollingpin,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"df" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"df" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lemon,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"dg" = (/obj/structure/window/reinforced{tag = "icon-fwindow (EAST)"; icon_state = "fwindow"; dir = 4},/obj/structure/window/reinforced{tag = "icon-fwindow (WEST)"; icon_state = "fwindow"; dir = 8},/obj/structure/grille,/obj/structure/window/reinforced{tag = "icon-fwindow (NORTH)"; icon_state = "fwindow"; dir = 1},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwgov)
"dh" = (/obj/effect/landmark/corpse/syndicatecommando{mobname = "Syndicate Commando"},/turf/simulated/floor/carpet,/area/awaymission/wwgov)
"di" = (/obj/machinery/mineral/mint,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
@@ -175,7 +175,7 @@
"ds" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,/turf/simulated/floor{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov)
"dt" = (/obj/effect/decal/cleanable/blood/tracks,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"du" = (/obj/effect/decal/cleanable/blood/tracks,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"dv" = (/obj/effect/mine/plasma,/obj/item/ammo_box/a12mm,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"dv" = (/obj/effect/mine/plasma,/obj/item/ammo_box/c10mm,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"dw" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"dx" = (/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand4"; icon_state = "ironsand4"},/area/awaymission/wwgov)
"dy" = (/obj/effect/landmark/corpse/miner/rig,/turf/simulated/floor/wood,/area/awaymission/wwmines)
@@ -332,7 +332,7 @@
"gt" = (/obj/machinery/washing_machine,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"gu" = (/obj/effect/decal/cleanable/blood/gibs/body{tag = "icon-gibup1"; icon_state = "gibup1"},/obj/structure/stool/bed/chair/wood/normal,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/awaymission/wwmines)
"gv" = (/obj/item/weapon/hatchet,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"gw" = (/obj/item/weapon/gun/projectile/automatic/silenced,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"gw" = (/obj/item/weapon/gun/projectile/automatic/pistol,/turf/simulated/floor/wood,/area/awaymission/wwmines)
"gx" = (/obj/item/weapon/gun/projectile/shotgun,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"gy" = (/obj/effect/landmark/corpse/syndicatecommando{mobname = "Syndicate Commando"},/turf/simulated/floor/grass,/area/awaymission/wwgov)
"gz" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{tag = "icon-fwindow (NORTH)"; icon_state = "fwindow"; dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{tag = "icon-fwindow (WEST)"; icon_state = "fwindow"; dir = 8},/turf/simulated/floor,/area/awaymission/wwrefine)
+1 -1
View File
@@ -1808,7 +1808,7 @@
"aIN" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/circuitboard/borgupload{pixel_x = -1; pixel_y = 1},/obj/item/weapon/circuitboard/aiupload{pixel_x = 2; pixel_y = -2},/turf/simulated/floor{icon_state = "vault"; dir = 4},/area/storage/tech)
"aIO" = (/obj/structure/disposalpipe/segment,/obj/machinery/hologram/holopad,/turf/simulated/floor{dir = 2; icon_state = "brown"},/area/quartermaster/office{name = "\improper Cargo Office"})
"aIP" = (/obj/item/weapon/storage/box/lights/mixed,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/plating,/area/hallway/primary/central)
"aIQ" = (/obj/structure/closet{name = "Contraband Locker"},/obj/item/weapon/contraband/poster,/obj/item/weapon/contraband/poster,/obj/item/weapon/contraband/poster,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi,/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom,/obj/item/weapon/suppressor,/obj/effect/spawner/lootdrop{loot = list("/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/automatic/pistol","/obj/item/weapon/gun/projectile/shotgun/combat","/obj/item/weapon/gun/projectile/shotgun/combat","/obj/item/weapon/gun/projectile/shotgun/combat","/obj/item/weapon/gun/projectile/shotgun/combat","/obj/item/weapon/gun/projectile/shotgun/combat","/obj/item/weapon/gun/projectile/revolver/mateba","/obj/item/weapon/gun/projectile/automatic/deagle"); name = "armory contraband gun spawner"},/turf/simulated/floor{tag = "icon-vault (WEST)"; icon_state = "vault"; dir = 8},/area/security/warden)
"aIQ" = (/obj/structure/closet{name = "Contraband Locker"},/obj/item/weapon/contraband/poster,/obj/item/weapon/contraband/poster,/obj/item/weapon/contraband/poster,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi,/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom,/obj/item/weapon/suppressor,/obj/effect/spawner/lootdrop/armory_contraband,/turf/simulated/floor{tag = "icon-vault (WEST)"; icon_state = "vault"; dir = 8},/area/security/warden)
"aIR" = (/obj/structure/table,/obj/item/weapon/wrapping_paper,/obj/item/weapon/wrapping_paper,/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_y = -30},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/obj/item/weapon/packageWrap{pixel_x = 2; pixel_y = -3},/turf/simulated/floor{dir = 2; icon_state = "arrival"},/area/quartermaster/office{name = "\improper Cargo Office"})
"aIS" = (/obj/item/weapon/storage/box,/obj/structure/table,/obj/item/weapon/storage/box,/obj/item/weapon/storage/box,/obj/machinery/alarm{dir = 1; pixel_y = -22},/obj/item/weapon/hand_labeler,/turf/simulated/floor{icon_state = "arrival"; dir = 6},/area/quartermaster/office{name = "\improper Cargo Office"})
"aIT" = (/obj/structure/cable/yellow{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable/yellow{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "L10"},/area/hallway/primary/central)
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -10,7 +10,7 @@ Pipelines + Other Objects -> Pipe network
*/
obj/machinery/atmospherics
/obj/machinery/atmospherics
anchored = 1
idle_power_usage = 0
active_power_usage = 0
@@ -20,64 +20,64 @@ obj/machinery/atmospherics
obj/machinery/atmospherics/var/initialize_directions = 0
obj/machinery/atmospherics/var/pipe_color
/obj/machinery/atmospherics/var/initialize_directions = 0
/obj/machinery/atmospherics/var/pipe_color
obj/machinery/atmospherics/process()
/obj/machinery/atmospherics/process()
if(gc_destroyed) //comments on /vg/ imply that GC'd pipes still process
return PROCESS_KILL
build_network()
obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
/obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
// Check to see if should be added to network. Add self if so and adjust variables appropriately.
// Note don't forget to have neighbors look as well!
return null
obj/machinery/atmospherics/proc/build_network()
/obj/machinery/atmospherics/proc/build_network()
// Called to build a network from this node
return null
obj/machinery/atmospherics/proc/return_network(obj/machinery/atmospherics/reference)
/obj/machinery/atmospherics/proc/return_network(obj/machinery/atmospherics/reference)
// Returns pipe_network associated with connection to reference
// Notes: should create network if necessary
// Should never return null
return null
obj/machinery/atmospherics/proc/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
/obj/machinery/atmospherics/proc/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
// Used when two pipe_networks are combining
obj/machinery/atmospherics/proc/return_network_air(datum/network/reference)
/obj/machinery/atmospherics/proc/return_network_air(datum/network/reference)
// Return a list of gas_mixture(s) in the object
// associated with reference pipe_network for use in rebuilding the networks gases list
// Is permitted to return null
obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
/obj/machinery/atmospherics/proc/disconnect(obj/machinery/atmospherics/reference)
obj/machinery/atmospherics/update_icon()
/obj/machinery/atmospherics/update_icon()
return null
obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
user << "\red You must remove the plating first."
user << "<span class='danger'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it is too exerted due to internal pressure."
user << "<span class='danger'>You cannot unwrench this [src], it is too exerted due to internal pressure.</span>"
add_fingerprint(user)
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
add_fingerprint(user)
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"<span class='notice'>You have unfastened \the [src].</span>", \
"You hear ratchet.")
var/obj/item/pipe/newpipe = new(loc, make_from=src)
transfer_fingerprints_to(newpipe)
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/binary
/obj/machinery/atmospherics/binary
dir = SOUTH
initialize_directions = SOUTH|NORTH
use_power = 1
@@ -12,119 +12,119 @@ obj/machinery/atmospherics/binary
var/datum/pipe_network/network1
var/datum/pipe_network/network2
New()
..()
switch(dir)
if(NORTH)
initialize_directions = NORTH|SOUTH
if(SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST)
initialize_directions = EAST|WEST
if(WEST)
initialize_directions = EAST|WEST
air1 = new
air2 = new
/obj/machinery/atmospherics/binary/New()
..()
switch(dir)
if(NORTH)
initialize_directions = NORTH|SOUTH
if(SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST)
initialize_directions = EAST|WEST
if(WEST)
initialize_directions = EAST|WEST
air1 = new
air2 = new
air1.volume = 200
air2.volume = 200
air1.volume = 200
air2.volume = 200
// Housekeeping and pipe network stuff below
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network1 = new_network
/obj/machinery/atmospherics/binary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network1 = new_network
else if(reference == node2)
network2 = new_network
else if(reference == node2)
network2 = new_network
if(new_network.normal_members.Find(src))
return 0
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
new_network.normal_members += src
return null
return null
Destroy()
loc = null
/obj/machinery/atmospherics/binary/Destroy()
loc = null
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
node1 = null
node2 = null
..()
/obj/machinery/atmospherics/binary/initialize()
src.disconnect(src)
var/node2_connect = dir
var/node1_connect = turn(dir, 180)
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
update_icon()
/obj/machinery/atmospherics/binary/build_network()
if(!network1 && node1)
network1 = new /datum/pipe_network()
network1.normal_members += src
network1.build_network(node1, src)
if(!network2 && node2)
network2 = new /datum/pipe_network()
network2.normal_members += src
network2.build_network(node2, src)
/obj/machinery/atmospherics/binary/return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node1)
return network1
if(reference==node2)
return network2
return null
/obj/machinery/atmospherics/binary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network1 == old_network)
network1 = new_network
if(network2 == old_network)
network2 = new_network
return 1
/obj/machinery/atmospherics/binary/return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network1 == reference)
results += air1
if(network2 == reference)
results += air2
return results
/obj/machinery/atmospherics/binary/disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network1)
node1 = null
else if(reference==node2)
del(network2)
node2 = null
..()
initialize()
src.disconnect(src)
var/node2_connect = dir
var/node1_connect = turn(dir, 180)
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
update_icon()
build_network()
if(!network1 && node1)
network1 = new /datum/pipe_network()
network1.normal_members += src
network1.build_network(node1, src)
if(!network2 && node2)
network2 = new /datum/pipe_network()
network2.normal_members += src
network2.build_network(node2, src)
return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node1)
return network1
if(reference==node2)
return network2
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network1 == old_network)
network1 = new_network
if(network2 == old_network)
network2 = new_network
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network1 == reference)
results += air1
if(network2 == reference)
results += air2
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network1)
node1 = null
else if(reference==node2)
del(network2)
node2 = null
return null
return null
@@ -17,54 +17,54 @@
density = 1
proc/return_transfer_air()
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
var/output_starting_pressure = air1.return_pressure()
var/input_starting_pressure = air2.return_pressure()
var/output_starting_pressure = air1.return_pressure()
var/input_starting_pressure = air2.return_pressure()
if(output_starting_pressure >= input_starting_pressure-10)
//Need at least 10 KPa difference to overcome friction in the mechanism
last_pressure_delta = 0
return null
if(output_starting_pressure >= input_starting_pressure-10)
//Need at least 10 KPa difference to overcome friction in the mechanism
last_pressure_delta = 0
return null
//Calculate necessary moles to transfer using PV = nRT
if(air2.temperature>0)
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
//Calculate necessary moles to transfer using PV = nRT
if(air2.temperature>0)
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
var/transfer_moles = pressure_delta*air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = pressure_delta*air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
last_pressure_delta = pressure_delta
last_pressure_delta = pressure_delta
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
//Actually transfer the gas
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
//Actually transfer the gas
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
if(network1)
network1.update = 1
if(network1)
network1.update = 1
if(network2)
network2.update = 1
if(network2)
network2.update = 1
return removed
return removed
else
last_pressure_delta = 0
process()
..()
update_icon()
else
last_pressure_delta = 0
/obj/machinery/atmospherics/binary/circulator/process()
..()
update_icon()
if(stat & (BROKEN|NOPOWER))
icon_state = "circ[side]-p"
else if(last_pressure_delta > 0)
if(last_pressure_delta > ONE_ATMOSPHERE)
icon_state = "circ[side]-run"
else
icon_state = "circ[side]-slow"
else
icon_state = "circ[side]-off"
return 1
/obj/machinery/atmospherics/binary/circulator/update_icon()
if(stat & (BROKEN|NOPOWER))
icon_state = "circ[side]-p"
else if(last_pressure_delta > 0)
if(last_pressure_delta > ONE_ATMOSPHERE)
icon_state = "circ[side]-run"
else
icon_state = "circ[side]-slow"
else
icon_state = "circ[side]-off"
return 1
@@ -9,191 +9,189 @@
desc = "Has a valve and pump attached to it. There are two ports."
level = 1
high_volume
name = "large dual-port air vent"
New()
..()
air1.volume = 1000
air2.volume = 1000
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
var/external_pressure_bound = ONE_ATMOSPHERE
var/input_pressure_min = 0
var/output_pressure_max = 0
var/pressure_checks = 1
//1: Do not pass external_pressure_bound
//2: Do not pass input_pressure_min
//4: Do not pass output_pressure_max
update_icon()
if(on)
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(on)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
process()
..()
if(!on)
return 0
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //input -> external
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air1.return_pressure() - input_pressure_min))
if(pressure_delta > 0)
if(air1.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
loc.assume_air(removed)
if(network1)
network1.update = 1
else //external -> output
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&4)
pressure_delta = min(pressure_delta, (output_pressure_max - air2.return_pressure()))
if(pressure_delta > 0)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air2.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
air2.merge(removed)
if(network2)
network2.update = 1
return 1
//Radio remote control
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "ADVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"input" = input_pressure_min,
"output" = output_pressure_max,
"external" = external_pressure_bound,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
return 1
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
initialize()
..()
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
receive_signal(datum/signal/signal)
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume/New()
..()
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
air1.volume = 1000
air2.volume = 1000
if("power_toggle" in signal.data)
on = !on
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
if("set_direction" in signal.data)
pump_direction = text2num(signal.data["set_direction"])
var/external_pressure_bound = ONE_ATMOSPHERE
var/input_pressure_min = 0
var/output_pressure_max = 0
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
var/pressure_checks = 1
//1: Do not pass external_pressure_bound
//2: Do not pass input_pressure_min
//4: Do not pass output_pressure_max
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon()
if(on)
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
if("stabalize" in signal.data)
pressure_checks |= 1
pump_direction = 1
return
if("set_input_pressure" in signal.data)
input_pressure_min = Clamp(
text2num(signal.data["set_input_pressure"]),
0,
ONE_ATMOSPHERE*50
)
/obj/machinery/atmospherics/binary/dp_vent_pump/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(on)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
if("set_output_pressure" in signal.data)
output_pressure_max = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
/obj/machinery/atmospherics/binary/dp_vent_pump/process()
..()
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if(!on)
return 0
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
//if(signal.data["tag"])
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //input -> external
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air1.return_pressure() - input_pressure_min))
if(pressure_delta > 0)
if(air1.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
loc.assume_air(removed)
if(network1)
network1.update = 1
else //external -> output
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&4)
pressure_delta = min(pressure_delta, (output_pressure_max - air2.return_pressure()))
if(pressure_delta > 0)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air2.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
air2.merge(removed)
if(network2)
network2.update = 1
return 1
//Radio remote control
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "ADVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"input" = input_pressure_min,
"output" = output_pressure_max,
"external" = external_pressure_bound,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
return 1
/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
..()
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("set_direction" in signal.data)
pump_direction = text2num(signal.data["set_direction"])
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
if("stabalize" in signal.data)
pressure_checks |= 1
pump_direction = 1
if("set_input_pressure" in signal.data)
input_pressure_min = Clamp(
text2num(signal.data["set_input_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_output_pressure" in signal.data)
output_pressure_max = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return //do not update_icon
//if(signal.data["tag"])
spawn(2)
broadcast_status()
update_icon()
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/binary/passive_gate
/obj/machinery/atmospherics/binary/passive_gate
//Tries to achieve target pressure at output (like a normal pump) except
// Uses no power but can not transfer gases from a low pressure area to a high pressure area
icon = 'icons/obj/atmospherics/passive_gate.dmi'
@@ -16,156 +16,155 @@ obj/machinery/atmospherics/binary/passive_gate
var/id = null
var/datum/radio_frequency/radio_connection
update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
icon_state = "exposed_3_off"
return
icon_state = "exposed_3_off"
return
process()
..()
if(!on)
return 0
/obj/machinery/atmospherics/binary/passive_gate/process()
..()
if(!on)
return 0
var/output_starting_pressure = air2.return_pressure()
var/input_starting_pressure = air1.return_pressure()
var/output_starting_pressure = air2.return_pressure()
var/input_starting_pressure = air1.return_pressure()
if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
//No need to pump gas if target is already reached or input pressure is too low
//Need at least 10 KPa difference to overcome friction in the mechanism
return 1
if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
//No need to pump gas if target is already reached or input pressure is too low
//Need at least 10 KPa difference to overcome friction in the mechanism
return 1
//Calculate necessary moles to transfer using PV = nRT
if((air1.total_moles() > 0) && (air1.temperature>0))
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
//Can not have a pressure delta that would cause output_pressure > input_pressure
//Calculate necessary moles to transfer using PV = nRT
if((air1.total_moles() > 0) && (air1.temperature>0))
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
//Can not have a pressure delta that would cause output_pressure > input_pressure
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
air2.merge(removed)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
air2.merge(removed)
if(network1)
network1.update = 1
if(network1)
network1.update = 1
if(network2)
network2.update = 1
if(network2)
network2.update = 1
//Radio remote control
//Radio remote control
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
broadcast_status()
if(!radio_connection)
return 0
/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"target_output" = target_pressure,
"sigtype" = "status"
)
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"target_output" = target_pressure,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
return 1
return 1
interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
"}
/obj/machinery/atmospherics/binary/passive_gate/interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
"}
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
initialize()
..()
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/passive_gate/initialize()
..()
if(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
/obj/machinery/atmospherics/binary/passive_gate/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("power_toggle" in signal.data)
on = !on
if("set_output_pressure" in signal.data)
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
if("set_output_pressure" in signal.data)
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return //do not update_icon
spawn(2)
broadcast_status()
update_icon()
return
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
if(..())
return
attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "\red Access denied."
return
usr.set_machine(src)
interact(user)
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
return
usr.set_machine(src)
interact(user)
return
Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
/obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
power_change()
..()
update_icon()
/obj/machinery/atmospherics/binary/passive_gate/power_change()
..()
update_icon()
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
return ..()
@@ -12,7 +12,7 @@ Thus, the two variables affect pump operation are set in New():
but overall network volume is also increased as this increases...
*/
obj/machinery/atmospherics/binary/pump
/obj/machinery/atmospherics/binary/pump
icon = 'icons/obj/atmospherics/pump.dmi'
icon_state = "intact_off"
@@ -28,157 +28,156 @@ obj/machinery/atmospherics/binary/pump
var/id = null
var/datum/radio_frequency/radio_connection
on
on = 1
icon_state = "intact_on"
/obj/machinery/atmospherics/binary/pump/on
on = 1
icon_state = "intact_on"
update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
/obj/machinery/atmospherics/binary/pump/update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
icon_state = "exposed_3_off"
icon_state = "exposed_3_off"
return
/obj/machinery/atmospherics/binary/pump/process()
// ..()
if(stat & (NOPOWER|BROKEN))
return
if(!on)
return 0
process()
// ..()
if(stat & (NOPOWER|BROKEN))
return
if(!on)
return 0
var/output_starting_pressure = air2.return_pressure()
if( (target_pressure - output_starting_pressure) < 0.01)
//No need to pump gas if target is already reached!
return 1
//Calculate necessary moles to transfer using PV=nRT
if((air1.total_moles() > 0) && (air1.temperature>0))
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
air2.merge(removed)
if(network1)
network1.update = 1
if(network2)
network2.update = 1
var/output_starting_pressure = air2.return_pressure()
if( (target_pressure - output_starting_pressure) < 0.01)
//No need to pump gas if target is already reached!
return 1
//Calculate necessary moles to transfer using PV=nRT
if((air1.total_moles() > 0) && (air1.temperature>0))
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
air2.merge(removed)
if(network1)
network1.update = 1
if(network2)
network2.update = 1
return 1
//Radio remote control
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
broadcast_status()
if(!radio_connection)
return 0
/obj/machinery/atmospherics/binary/pump/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"target_output" = target_pressure,
"sigtype" = "status"
)
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"target_output" = target_pressure,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
return 1
return 1
interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
"}
/obj/machinery/atmospherics/binary/pump/interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
"}
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
initialize()
..()
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/pump/initialize()
..()
if(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
/obj/machinery/atmospherics/binary/pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("power_toggle" in signal.data)
on = !on
if("set_output_pressure" in signal.data)
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
if("set_output_pressure" in signal.data)
target_pressure = Clamp(
text2num(signal.data["set_output_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return //do not update_icon
spawn(2)
broadcast_status()
update_icon()
return
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
if(..())
return
attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "\red Access denied."
return
usr.set_machine(src)
interact(user)
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
return
usr.set_machine(src)
interact(user)
return
Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
/obj/machinery/atmospherics/binary/pump/Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
power_change()
..()
update_icon()
/obj/machinery/atmospherics/binary/pump/power_change()
..()
update_icon()
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
return ..()
@@ -12,7 +12,7 @@ Thus, the two variables affect pump operation are set in New():
but overall network volume is also increased as this increases...
*/
obj/machinery/atmospherics/binary/volume_pump
/obj/machinery/atmospherics/binary/volume_pump
icon = 'icons/obj/atmospherics/volume_pump.dmi'
icon_state = "intact_off"
@@ -28,155 +28,154 @@ obj/machinery/atmospherics/binary/volume_pump
var/id = null
var/datum/radio_frequency/radio_connection
on
on = 1
icon_state = "intact_on"
/obj/machinery/atmospherics/binary/volume_pump/on
on = 1
icon_state = "intact_on"
update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
if(node1)
icon_state = "exposed_1_off"
else if(node2)
icon_state = "exposed_2_off"
else
icon_state = "exposed_3_off"
return
icon_state = "exposed_3_off"
return
process()
// ..()
if(stat & (NOPOWER|BROKEN))
return
if(!on)
return 0
/obj/machinery/atmospherics/binary/volume_pump/process()
// ..()
if(stat & (NOPOWER|BROKEN))
return
if(!on)
return 0
// Pump mechanism just won't do anything if the pressure is too high/too low
var/input_starting_pressure = air1.return_pressure()
var/output_starting_pressure = air2.return_pressure()
if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
return 1
var/transfer_ratio = max(1, transfer_rate/air1.volume)
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
air2.merge(removed)
if(network1)
network1.update = 1
if(network2)
network2.update = 1
var/input_starting_pressure = air1.return_pressure()
var/output_starting_pressure = air2.return_pressure()
if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
return 1
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
var/transfer_ratio = max(1, transfer_rate/air1.volume)
broadcast_status()
if(!radio_connection)
return 0
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
air2.merge(removed)
signal.data = list(
"tag" = id,
"device" = "APV",
"power" = on,
"transfer_rate" = transfer_rate,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal)
if(network1)
network1.update = 1
return 1
if(network2)
network2.update = 1
interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output flow: </b>
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
"}
return 1
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
/obj/machinery/atmospherics/binary/volume_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
/obj/machinery/atmospherics/binary/volume_pump/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "APV",
"power" = on,
"transfer_rate" = transfer_rate,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal)
return 1
/obj/machinery/atmospherics/binary/volume_pump/interact(mob/user as mob)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output flow: </b>
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
"}
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
onclose(user, "atmo_pump")
initialize()
..()
/obj/machinery/atmospherics/binary/volume_pump/initialize()
..()
set_frequency(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
/obj/machinery/atmospherics/binary/volume_pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("power_toggle" in signal.data)
on = !on
if("set_transfer_rate" in signal.data)
transfer_rate = Clamp(
text2num(signal.data["set_transfer_rate"]),
0,
air1.volume
)
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
if("set_transfer_rate" in signal.data)
transfer_rate = Clamp(
text2num(signal.data["set_transfer_rate"]),
0,
air1.volume
)
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return //do not update_icon
spawn(2)
broadcast_status()
update_icon()
attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "\red Access denied."
return
usr.set_machine(src)
interact(user)
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(user as mob)
if(..())
return
Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_transfer_rate"])
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
src.transfer_rate = max(0, min(200, new_transfer_rate))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
return
usr.set_machine(src)
interact(user)
return
power_change()
..()
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_transfer_rate"])
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
src.transfer_rate = max(0, min(200, new_transfer_rate))
usr.set_machine(src)
src.update_icon()
src.updateUsrDialog()
return
/obj/machinery/atmospherics/binary/volume_pump/power_change()
..()
update_icon()
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
return ..()
@@ -21,117 +21,117 @@
level = 0
New()
initialize_directions = dir
..()
/obj/machinery/atmospherics/portables_connector/New()
initialize_directions = dir
..()
update_icon()
if(node)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node)
else
icon_state = "exposed"
/obj/machinery/atmospherics/portables_connector/update_icon()
if(node)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node)
else
icon_state = "exposed"
return
/obj/machinery/atmospherics/portables_connector/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node)
else
icon_state = "exposed"
/obj/machinery/atmospherics/portables_connector/process()
..()
if(!on)
return
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node)
else
icon_state = "exposed"
process()
..()
if(!on)
return
if(!connected_device)
on = 0
return
if(network)
network.update = 1
return 1
if(!connected_device)
on = 0
return
if(network)
network.update = 1
return 1
// Housekeeping and pipe network stuff below
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node)
network = new_network
/obj/machinery/atmospherics/portables_connector/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node)
network = new_network
if(new_network.normal_members.Find(src))
return 0
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
new_network.normal_members += src
return null
return null
Destroy()
if(connected_device)
connected_device.disconnect()
/obj/machinery/atmospherics/portables_connector/Destroy()
if(connected_device)
connected_device.disconnect()
if(node)
node.disconnect(src)
del(network)
if(node)
node.disconnect(src)
del(network)
node = null
..()
/obj/machinery/atmospherics/portables_connector/initialize()
src.disconnect(src)
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
/obj/machinery/atmospherics/portables_connector/build_network()
if(!network && node)
network = new /datum/pipe_network()
network.normal_members += src
network.build_network(node, src)
/obj/machinery/atmospherics/portables_connector/return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node)
return network
if(reference==connected_device)
return network
return null
/obj/machinery/atmospherics/portables_connector/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network == old_network)
network = new_network
return 1
/obj/machinery/atmospherics/portables_connector/return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(connected_device)
results += connected_device.air_contents
return results
/obj/machinery/atmospherics/portables_connector/disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
del(network)
node = null
..()
initialize()
src.disconnect(src)
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
build_network()
if(!network && node)
network = new /datum/pipe_network()
network.normal_members += src
network.build_network(node, src)
return null
return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node)
return network
if(reference==connected_device)
return network
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network == old_network)
network = new_network
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (connected_device)
user << "<span class='danger'>You cannot unwrench this [src], dettach [connected_device] first.</span>"
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(connected_device)
results += connected_device.air_contents
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
del(network)
node = null
return null
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (connected_device)
user << "\red You cannot unwrench this [src], dettach [connected_device] first."
return 1
return ..()
return ..()
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/trinary/filter
/obj/machinery/atmospherics/trinary/filter
icon = 'icons/obj/atmospherics/filter.dmi'
icon_state = "intact_off"
density = 1
@@ -28,122 +28,121 @@ Filter types:
var/frequency = 0
var/datum/radio_frequency/radio_connection
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/filter/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
New()
..()
if(radio_controller)
initialize()
/obj/machinery/atmospherics/trinary/filter/New()
..()
if(radio_controller)
initialize()
update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "intact_off"
on = 0
/obj/machinery/atmospherics/trinary/filter/update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "intact_off"
on = 0
return
return
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/trinary/filter/power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
process()
..()
if(!on)
return 0
/obj/machinery/atmospherics/trinary/filter/process()
..()
if(!on)
return 0
var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure)
//No need to mix if target is already full!
return 1
//Calculate necessary moles to transfer using PV=nRT
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles
if(air1.temperature > 0)
transfer_moles = pressure_delta*air3.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
if(transfer_moles > 0)
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
if(!removed)
return
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
switch(filter_type)
if(0) //removing plasma
filtered_out.toxins = removed.toxins
removed.toxins = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
if(1) //removing O2
filtered_out.oxygen = removed.oxygen
removed.oxygen = 0
if(2) //removing N2
filtered_out.nitrogen = removed.nitrogen
removed.nitrogen = 0
if(3) //removing CO2
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
if(4)//removing N2O
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/sleeping_agent))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
else
filtered_out = null
air2.merge(filtered_out)
air3.merge(removed)
if(network2)
network2.update = 1
if(network3)
network3.update = 1
if(network1)
network1.update = 1
var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure)
//No need to mix if target is already full!
return 1
initialize()
set_frequency(frequency)
return ..()
//Calculate necessary moles to transfer using PV=nRT
obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob)
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles
if(air1.temperature > 0)
transfer_moles = pressure_delta*air3.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
if(transfer_moles > 0)
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
if(!removed)
return
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
switch(filter_type)
if(0) //removing plasma
filtered_out.toxins = removed.toxins
removed.toxins = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
if(1) //removing O2
filtered_out.oxygen = removed.oxygen
removed.oxygen = 0
if(2) //removing N2
filtered_out.nitrogen = removed.nitrogen
removed.nitrogen = 0
if(3) //removing CO2
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
if(4)//removing N2O
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/sleeping_agent))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
else
filtered_out = null
air2.merge(filtered_out)
air3.merge(removed)
if(network2)
network2.update = 1
if(network3)
network3.update = 1
if(network1)
network1.update = 1
return 1
/obj/machinery/atmospherics/trinary/filter/initialize()
set_frequency(frequency)
return ..()
/obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob)
if(..())
return
if(!src.allowed(user))
user << "\red Access denied."
user << "<span class='danger'>Access denied.</span>"
return
var/dat
@@ -191,7 +190,7 @@ obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob)
onclose(user, "atmo_filter")
return
obj/machinery/atmospherics/trinary/filter/Topic(href, href_list)
/obj/machinery/atmospherics/trinary/filter/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/trinary/mixer
/obj/machinery/atmospherics/trinary/mixer
icon = 'icons/obj/atmospherics/mixer.dmi'
icon_state = "intact_off"
density = 1
@@ -17,132 +17,132 @@ obj/machinery/atmospherics/trinary/mixer
//node 3 is the outlet, nodes 1 & 2 are intakes
update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "intact_off"
on = 0
/obj/machinery/atmospherics/trinary/mixer/update_icon()
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "intact_off"
on = 0
return
return
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/trinary/mixer/power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
New()
..()
air3.volume = 300
/obj/machinery/atmospherics/trinary/mixer/New()
..()
air3.volume = 300
process()
..()
if(!on)
return 0
/obj/machinery/atmospherics/trinary/mixer/process()
..()
if(!on)
return 0
var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure)
//No need to mix if target is already full!
return 1
//Calculate necessary moles to transfer using PV=nRT
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles1 = 0
var/transfer_moles2 = 0
if(air1.temperature > 0)
transfer_moles1 = (node1_concentration*pressure_delta)*air3.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
if(air2.temperature > 0)
transfer_moles2 = (node2_concentration*pressure_delta)*air3.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
var/air1_moles = air1.total_moles()
var/air2_moles = air2.total_moles()
if((air1_moles < transfer_moles1) || (air2_moles < transfer_moles2))
var/ratio = 0
if (( transfer_moles1 > 0 ) && (transfer_moles2 >0 ))
ratio = min(air1_moles/transfer_moles1, air2_moles/transfer_moles2)
if (( transfer_moles2 == 0 ) && ( transfer_moles1 > 0 ))
ratio = air1_moles/transfer_moles1
if (( transfer_moles1 == 0 ) && ( transfer_moles2 > 0 ))
ratio = air2_moles/transfer_moles2
transfer_moles1 *= ratio
transfer_moles2 *= ratio
//Actually transfer the gas
if(transfer_moles1 > 0)
var/datum/gas_mixture/removed1 = air1.remove(transfer_moles1)
air3.merge(removed1)
if(transfer_moles2 > 0)
var/datum/gas_mixture/removed2 = air2.remove(transfer_moles2)
air3.merge(removed2)
if(network1 && transfer_moles1)
network1.update = 1
if(network2 && transfer_moles2)
network2.update = 1
if(network3)
network3.update = 1
var/output_starting_pressure = air3.return_pressure()
if(output_starting_pressure >= target_pressure)
//No need to mix if target is already full!
return 1
attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "\red Access denied."
return
usr.set_machine(src)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[target_pressure]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
<br>
<b>Node 1 Concentration:</b>
<a href='?src=\ref[src];node1_c=-0.1'><b>-</b></a>
<a href='?src=\ref[src];node1_c=-0.01'>-</a>
[node1_concentration]([node1_concentration*100]%)
<a href='?src=\ref[src];node1_c=0.01'><b>+</b></a>
<a href='?src=\ref[src];node1_c=0.1'>+</a>
<br>
<b>Node 2 Concentration:</b>
<a href='?src=\ref[src];node2_c=-0.1'><b>-</b></a>
<a href='?src=\ref[src];node2_c=-0.01'>-</a>
[node2_concentration]([node2_concentration*100]%)
<a href='?src=\ref[src];node2_c=0.01'><b>+</b></a>
<a href='?src=\ref[src];node2_c=0.1'>+</a>
"}
//Calculate necessary moles to transfer using PV=nRT
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_mixer")
onclose(user, "atmo_mixer")
return
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles1 = 0
var/transfer_moles2 = 0
Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
if(href_list["node1_c"])
var/value = text2num(href_list["node1_c"])
src.node1_concentration = max(0, min(1, src.node1_concentration + value))
src.node2_concentration = max(0, min(1, src.node2_concentration - value))
if(href_list["node2_c"])
var/value = text2num(href_list["node2_c"])
src.node2_concentration = max(0, min(1, src.node2_concentration + value))
src.node1_concentration = max(0, min(1, src.node1_concentration - value))
src.update_icon()
src.updateUsrDialog()
if(air1.temperature > 0)
transfer_moles1 = (node1_concentration*pressure_delta)*air3.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
if(air2.temperature > 0)
transfer_moles2 = (node2_concentration*pressure_delta)*air3.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
var/air1_moles = air1.total_moles()
var/air2_moles = air2.total_moles()
if((air1_moles < transfer_moles1) || (air2_moles < transfer_moles2))
var/ratio = 0
if (( transfer_moles1 > 0 ) && (transfer_moles2 >0 ))
ratio = min(air1_moles/transfer_moles1, air2_moles/transfer_moles2)
if (( transfer_moles2 == 0 ) && ( transfer_moles1 > 0 ))
ratio = air1_moles/transfer_moles1
if (( transfer_moles1 == 0 ) && ( transfer_moles2 > 0 ))
ratio = air2_moles/transfer_moles2
transfer_moles1 *= ratio
transfer_moles2 *= ratio
//Actually transfer the gas
if(transfer_moles1 > 0)
var/datum/gas_mixture/removed1 = air1.remove(transfer_moles1)
air3.merge(removed1)
if(transfer_moles2 > 0)
var/datum/gas_mixture/removed2 = air2.remove(transfer_moles2)
air3.merge(removed2)
if(network1 && transfer_moles1)
network1.update = 1
if(network2 && transfer_moles2)
network2.update = 1
if(network3)
network3.update = 1
return 1
/obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob)
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
return
usr.set_machine(src)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Desirable output pressure: </b>
[target_pressure]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
<br>
<b>Node 1 Concentration:</b>
<a href='?src=\ref[src];node1_c=-0.1'><b>-</b></a>
<a href='?src=\ref[src];node1_c=-0.01'>-</a>
[node1_concentration]([node1_concentration*100]%)
<a href='?src=\ref[src];node1_c=0.01'><b>+</b></a>
<a href='?src=\ref[src];node1_c=0.1'>+</a>
<br>
<b>Node 2 Concentration:</b>
<a href='?src=\ref[src];node2_c=-0.1'><b>-</b></a>
<a href='?src=\ref[src];node2_c=-0.01'>-</a>
[node2_concentration]([node2_concentration*100]%)
<a href='?src=\ref[src];node2_c=0.01'><b>+</b></a>
<a href='?src=\ref[src];node2_c=0.1'>+</a>
"}
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_mixer")
onclose(user, "atmo_mixer")
return
/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
if(href_list["node1_c"])
var/value = text2num(href_list["node1_c"])
src.node1_concentration = max(0, min(1, src.node1_concentration + value))
src.node2_concentration = max(0, min(1, src.node2_concentration - value))
if(href_list["node2_c"])
var/value = text2num(href_list["node2_c"])
src.node2_concentration = max(0, min(1, src.node2_concentration + value))
src.node1_concentration = max(0, min(1, src.node1_concentration - value))
src.update_icon()
src.updateUsrDialog()
return
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/trinary
/obj/machinery/atmospherics/trinary
dir = SOUTH
initialize_directions = SOUTH|NORTH|WEST
use_power = 1
@@ -15,148 +15,148 @@ obj/machinery/atmospherics/trinary
var/datum/pipe_network/network2
var/datum/pipe_network/network3
New()
..()
switch(dir)
if(NORTH)
initialize_directions = EAST|NORTH|SOUTH
if(SOUTH)
initialize_directions = SOUTH|WEST|NORTH
if(EAST)
initialize_directions = EAST|WEST|SOUTH
if(WEST)
initialize_directions = WEST|NORTH|EAST
air1 = new
air2 = new
air3 = new
/obj/machinery/atmospherics/trinary/New()
..()
switch(dir)
if(NORTH)
initialize_directions = EAST|NORTH|SOUTH
if(SOUTH)
initialize_directions = SOUTH|WEST|NORTH
if(EAST)
initialize_directions = EAST|WEST|SOUTH
if(WEST)
initialize_directions = WEST|NORTH|EAST
air1 = new
air2 = new
air3 = new
air1.volume = 200
air2.volume = 200
air3.volume = 200
air1.volume = 200
air2.volume = 200
air3.volume = 200
// Housekeeping and pipe network stuff below
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network1 = new_network
/obj/machinery/atmospherics/trinary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network1 = new_network
else if(reference == node2)
network2 = new_network
else if(reference == node2)
network2 = new_network
else if (reference == node3)
network3 = new_network
else if (reference == node3)
network3 = new_network
if(new_network.normal_members.Find(src))
return 0
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
new_network.normal_members += src
return null
return null
Destroy()
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
if(node3)
node3.disconnect(src)
del(network3)
/obj/machinery/atmospherics/trinary/Destroy()
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
if(node3)
node3.disconnect(src)
del(network3)
node1 = null
node2 = null
node3 = null
..()
/obj/machinery/atmospherics/trinary/initialize()
src.disconnect(src)
var/node1_connect = turn(dir, -180)
var/node2_connect = turn(dir, -90)
var/node3_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
node3 = target
break
update_icon()
/obj/machinery/atmospherics/trinary/build_network()
if(!network1 && node1)
network1 = new /datum/pipe_network()
network1.normal_members += src
network1.build_network(node1, src)
if(!network2 && node2)
network2 = new /datum/pipe_network()
network2.normal_members += src
network2.build_network(node2, src)
if(!network3 && node3)
network3 = new /datum/pipe_network()
network3.normal_members += src
network3.build_network(node3, src)
/obj/machinery/atmospherics/trinary/return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node1)
return network1
if(reference==node2)
return network2
if(reference==node3)
return network3
return null
/obj/machinery/atmospherics/trinary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network1 == old_network)
network1 = new_network
if(network2 == old_network)
network2 = new_network
if(network3 == old_network)
network3 = new_network
return 1
/obj/machinery/atmospherics/trinary/return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network1 == reference)
results += air1
if(network2 == reference)
results += air2
if(network3 == reference)
results += air3
return results
/obj/machinery/atmospherics/trinary/disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network1)
node1 = null
else if(reference==node2)
del(network2)
node2 = null
else if(reference==node3)
del(network3)
node3 = null
..()
initialize()
src.disconnect(src)
var/node1_connect = turn(dir, -180)
var/node2_connect = turn(dir, -90)
var/node3_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
node3 = target
break
update_icon()
build_network()
if(!network1 && node1)
network1 = new /datum/pipe_network()
network1.normal_members += src
network1.build_network(node1, src)
if(!network2 && node2)
network2 = new /datum/pipe_network()
network2.normal_members += src
network2.build_network(node2, src)
if(!network3 && node3)
network3 = new /datum/pipe_network()
network3.normal_members += src
network3.build_network(node3, src)
return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node1)
return network1
if(reference==node2)
return network2
if(reference==node3)
return network3
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network1 == old_network)
network1 = new_network
if(network2 == old_network)
network2 = new_network
if(network3 == old_network)
network3 = new_network
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network1 == reference)
results += air1
if(network2 == reference)
results += air2
if(network3 == reference)
results += air3
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network1)
node1 = null
else if(reference==node2)
del(network2)
node2 = null
else if(reference==node3)
del(network3)
node3 = null
return null
return null
+21 -21
View File
@@ -12,30 +12,30 @@
var/current_temperature = T20C
var/current_heat_capacity = 50000 //totally random
update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed"
/obj/machinery/atmospherics/unary/cold_sink/update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed"
on = 0
on = 0
return
return
process()
..()
if(!on || !network)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
/obj/machinery/atmospherics/unary/cold_sink/process()
..()
if(!on || !network)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
if(combined_heat_capacity > 0)
var/combined_energy = current_temperature*current_heat_capacity + air_heat_capacity*air_contents.temperature
air_contents.temperature = combined_energy/combined_heat_capacity
if(combined_heat_capacity > 0)
var/combined_energy = current_temperature*current_heat_capacity + air_heat_capacity*air_contents.temperature
air_contents.temperature = combined_energy/combined_heat_capacity
//todo: have current temperature affected. require power to bring down current temperature again
//todo: have current temperature affected. require power to bring down current temperature again
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
return 1
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
return 1
@@ -8,14 +8,13 @@
var/update_cycle
update_icon()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
/obj/machinery/atmospherics/unary/generator_input/update_icon()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
return
return
proc
return_exchange_air()
return air_contents
/obj/machinery/atmospherics/unary/generator_input/proc/return_exchange_air()
return air_contents
@@ -12,57 +12,57 @@
var/obj/machinery/atmospherics/unary/heat_exchanger/partner = null
var/update_cycle
update_icon()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
/obj/machinery/atmospherics/unary/heat_exchanger/update_icon()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
return
return
initialize()
if(!partner)
var/partner_connect = turn(dir,180)
/obj/machinery/atmospherics/unary/heat_exchanger/initialize()
if(!partner)
var/partner_connect = turn(dir,180)
for(var/obj/machinery/atmospherics/unary/heat_exchanger/target in get_step(src,partner_connect))
if(target.dir & get_dir(src,target))
partner = target
partner.partner = src
break
for(var/obj/machinery/atmospherics/unary/heat_exchanger/target in get_step(src,partner_connect))
if(target.dir & get_dir(src,target))
partner = target
partner.partner = src
break
..()
..()
process()
..()
if(!partner)
return 0
/obj/machinery/atmospherics/unary/heat_exchanger/process()
..()
if(!partner)
return 0
if(!air_master || air_master.current_cycle <= update_cycle)
return 0
if(!air_master || air_master.current_cycle <= update_cycle)
return 0
update_cycle = air_master.current_cycle
partner.update_cycle = air_master.current_cycle
update_cycle = air_master.current_cycle
partner.update_cycle = air_master.current_cycle
var/air_heat_capacity = air_contents.heat_capacity()
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
var/combined_heat_capacity = other_air_heat_capacity + air_heat_capacity
var/air_heat_capacity = air_contents.heat_capacity()
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
var/combined_heat_capacity = other_air_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
var/other_old_temperature = partner.air_contents.temperature
var/old_temperature = air_contents.temperature
var/other_old_temperature = partner.air_contents.temperature
if(combined_heat_capacity > 0)
var/combined_energy = partner.air_contents.temperature*other_air_heat_capacity + air_heat_capacity*air_contents.temperature
if(combined_heat_capacity > 0)
var/combined_energy = partner.air_contents.temperature*other_air_heat_capacity + air_heat_capacity*air_contents.temperature
var/new_temperature = combined_energy/combined_heat_capacity
air_contents.temperature = new_temperature
partner.air_contents.temperature = new_temperature
var/new_temperature = combined_energy/combined_heat_capacity
air_contents.temperature = new_temperature
partner.air_contents.temperature = new_temperature
if(network)
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
if(network)
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
if(partner.network)
if(abs(other_old_temperature-partner.air_contents.temperature) > 1)
partner.network.update = 1
if(partner.network)
if(abs(other_old_temperature-partner.air_contents.temperature) > 1)
partner.network.update = 1
return 1
return 1
@@ -14,30 +14,30 @@
var/current_temperature = T20C
var/current_heat_capacity = 50000 //totally random
update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed"
/obj/machinery/atmospherics/unary/heat_reservoir/update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed"
on = 0
on = 0
return
return
process()
..()
if(!on)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
/obj/machinery/atmospherics/unary/heat_reservoir/process()
..()
if(!on)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
var/old_temperature = air_contents.temperature
if(combined_heat_capacity > 0)
var/combined_energy = current_temperature*current_heat_capacity + air_heat_capacity*air_contents.temperature
air_contents.temperature = combined_energy/combined_heat_capacity
if(combined_heat_capacity > 0)
var/combined_energy = current_temperature*current_heat_capacity + air_heat_capacity*air_contents.temperature
air_contents.temperature = combined_energy/combined_heat_capacity
//todo: have current temperature affected. require power to bring up current temperature again
//todo: have current temperature affected. require power to bring up current temperature again
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
return 1
if(abs(old_temperature-air_contents.temperature) > 1)
network.update = 1
return 1
@@ -3,7 +3,7 @@
icon_state = "off"
use_power = 1
name = "air injector"
name = "Air Injector"
desc = "Has a valve and pump attached to it"
var/on = 0
@@ -17,134 +17,133 @@
level = 1
update_icon()
if(node)
if(on && !(stat & NOPOWER))
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
if(node)
if(on && !(stat & NOPOWER))
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "exposed"
on = 0
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
else
icon_state = "exposed"
on = 0
return
return
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
process()
..()
injecting = 0
if(!on || stat & NOPOWER)
return 0
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
return 1
proc/inject()
if(on || injecting)
return 0
injecting = 1
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
if(network)
network.update = 1
flick("inject", src)
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "AO",
"power" = on,
"volume_rate" = volume_rate,
//"timestamp" = world.time,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal)
return 1
initialize()
..()
set_frequency(frequency)
spawn(rand(25,50))
broadcast_status()
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("inject" in signal.data)
spawn inject()
return
if("set_volume_rate" in signal.data)
var/number = text2num(signal.data["set_volume_rate"])
volume_rate = Clamp(number, 0, air_contents.volume)
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
//log_admin("DEBUG \[[world.timeofday]\]: outlet_injector/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
//return
spawn(2)
broadcast_status()
/obj/machinery/atmospherics/unary/outlet_injector/power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node)
if(on)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
/obj/machinery/atmospherics/unary/outlet_injector/process()
..()
injecting = 0
if(!on || stat & NOPOWER)
return 0
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
return 1
/obj/machinery/atmospherics/unary/outlet_injector/proc/inject()
if(on || injecting)
return 0
injecting = 1
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
if(network)
network.update = 1
flick("inject", src)
/obj/machinery/atmospherics/unary/outlet_injector/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"tag" = id,
"device" = "AO",
"power" = on,
"volume_rate" = volume_rate,
//"timestamp" = world.time,
"sigtype" = "status"
)
radio_connection.post_signal(src, signal)
return 1
/obj/machinery/atmospherics/unary/outlet_injector/initialize()
..()
set_frequency(frequency)
spawn(rand(25,50))
broadcast_status()
/obj/machinery/atmospherics/unary/outlet_injector/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("inject" in signal.data)
spawn inject()
return
if("set_volume_rate" in signal.data)
var/number = text2num(signal.data["set_volume_rate"])
volume_rate = Clamp(number, 0, air_contents.volume)
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
//log_admin("DEBUG \[[world.timeofday]\]: outlet_injector/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
//return
spawn(2)
broadcast_status()
update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node)
if(on)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]exposed"
on = 0
return
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]exposed"
on = 0
return
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/unary/oxygen_generator
/obj/machinery/atmospherics/unary/oxygen_generator
icon = 'icons/obj/atmospherics/oxygen_generator.dmi'
icon_state = "intact_off"
density = 1
@@ -13,37 +13,37 @@ obj/machinery/atmospherics/unary/oxygen_generator
var/oxygen_content = 10
update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed_off"
/obj/machinery/atmospherics/unary/oxygen_generator/update_icon()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "exposed_off"
on = 0
on = 0
return
return
New()
..()
/obj/machinery/atmospherics/unary/oxygen_generator/New()
..()
air_contents.volume = 50
air_contents.volume = 50
process()
..()
if(!on)
return 0
/obj/machinery/atmospherics/unary/oxygen_generator/process()
..()
if(!on)
return 0
var/total_moles = air_contents.total_moles()
var/total_moles = air_contents.total_moles()
if(total_moles < oxygen_content)
var/current_heat_capacity = air_contents.heat_capacity()
if(total_moles < oxygen_content)
var/current_heat_capacity = air_contents.heat_capacity()
var/added_oxygen = oxygen_content - total_moles
var/added_oxygen = oxygen_content - total_moles
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
air_contents.oxygen += added_oxygen
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
air_contents.oxygen += added_oxygen
if(network)
network.update = 1
if(network)
network.update = 1
return 1
return 1
@@ -9,91 +9,91 @@
var/datum/pipe_network/network
New()
..()
initialize_directions = dir
air_contents = new
/obj/machinery/atmospherics/unary/New()
..()
initialize_directions = dir
air_contents = new
air_contents.volume = 200
air_contents.volume = 200
// Housekeeping and pipe network stuff below
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node)
network = new_network
/obj/machinery/atmospherics/unary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node)
network = new_network
if(new_network.normal_members.Find(src))
return 0
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
new_network.normal_members += src
return null
return null
Destroy()
if(node)
node.disconnect(src)
del(network)
/obj/machinery/atmospherics/unary/Destroy()
if(node)
node.disconnect(src)
del(network)
node = null
node = null
..()
..()
initialize(infiniteloop = 0)
if(!infiniteloop)
src.disconnect(src)
/obj/machinery/atmospherics/unary/initialize(infiniteloop = 0)
if(!infiniteloop)
src.disconnect(src)
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
if(!infiniteloop)
target.initialize(1)
break
build_network()
update_icon()
default_change_direction_wrench(mob/user, obj/item/weapon/wrench/W)
if(..())
initialize_directions = dir
if(node)
disconnect(node)
initialize()
. = 1
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
if(!infiniteloop)
target.initialize(1)
break
build_network()
if(!network && node)
network = new /datum/pipe_network()
network.normal_members += src
network.build_network(node, src)
update_icon()
/obj/machinery/atmospherics/unary/default_change_direction_wrench(mob/user, obj/item/weapon/wrench/W)
if(..())
initialize_directions = dir
if(node)
disconnect(node)
initialize()
. = 1
/obj/machinery/atmospherics/unary/build_network()
if(!network && node)
network = new /datum/pipe_network()
network.normal_members += src
network.build_network(node, src)
return_network(obj/machinery/atmospherics/reference)
build_network()
/obj/machinery/atmospherics/unary/return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node)
return network
if(reference==node)
return network
return null
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network == old_network)
network = new_network
/obj/machinery/atmospherics/unary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network == old_network)
network = new_network
return 1
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
/obj/machinery/atmospherics/unary/return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network == reference)
results += air_contents
if(network == reference)
results += air_contents
return results
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
node = null
reference.disconnect(src)
del(network)
/obj/machinery/atmospherics/unary/disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
node = null
reference.disconnect(src)
del(network)
return null
return null
+261 -261
View File
@@ -32,286 +32,286 @@
var/radio_filter_out
var/radio_filter_in
on
on = 1
icon_state = "out"
/obj/machinery/atmospherics/unary/vent_pump/on
on = 1
icon_state = "out"
siphon
pump_direction = 0
icon_state = "off"
/obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0
icon_state = "off"
on
on = 1
icon_state = "in"
/obj/machinery/atmospherics/unary/vent_pump/siphon/on
on = 1
icon_state = "in"
New()
..()
initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/New()
..()
initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
high_volume
name = "large air vent"
power_channel = EQUIP
New()
..()
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "large air vent"
power_channel = EQUIP
update_icon()
if(welded)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
/obj/machinery/atmospherics/unary/vent_pump/high_volume/New()
..()
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/update_icon()
if(welded)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
return
/obj/machinery/atmospherics/unary/vent_pump/process()
..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
if(!on)
return 0
if(welded)
return 0
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //internal -> external
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
if(pressure_delta > 0)
if(air_contents.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
else //external -> internal
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
if(pressure_delta > 0)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
return 1
//Radio remote control
/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"area" = src.area_uid,
"tag" = src.id_tag,
"device" = "AVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"internal" = internal_pressure_bound,
"external" = external_pressure_bound,
"timestamp" = world.time,
"sigtype" = "status"
)
if(!initial_loc.air_vent_names[id_tag])
var/new_name = "\improper [initial_loc.name] vent pump #[initial_loc.air_vent_names.len+1]"
initial_loc.air_vent_names[id_tag] = new_name
src.name = new_name
initial_loc.air_vent_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
/obj/machinery/atmospherics/unary/vent_pump/initialize()
..()
//some vents work his own spesial way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
if("stabalize" in signal.data)
pressure_checks |= 1
pump_direction = 1
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
if("checks_toggle" in signal.data)
pressure_checks = (pressure_checks?0:3)
if("direction" in signal.data)
pump_direction = text2num(signal.data["direction"])
if("set_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
text2num(signal.data["set_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_external_pressure" in signal.data)
external_pressure_bound = Clamp(
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("init" in signal.data)
name = signal.data["init"]
return
process()
..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
if(!on)
return 0
if(welded)
return 0
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //internal -> external
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
if(pressure_delta > 0)
if(air_contents.temperature > 0)
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
else //external -> internal
var/pressure_delta = 10000
if(pressure_checks&1)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
if(pressure_checks&2)
pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
if(pressure_delta > 0)
if(environment.temperature > 0)
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
return 1
//Radio remote control
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"area" = src.area_uid,
"tag" = src.id_tag,
"device" = "AVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"internal" = internal_pressure_bound,
"external" = external_pressure_bound,
"timestamp" = world.time,
"sigtype" = "status"
)
if(!initial_loc.air_vent_names[id_tag])
var/new_name = "\improper [initial_loc.name] vent pump #[initial_loc.air_vent_names.len+1]"
initial_loc.air_vent_names[id_tag] = new_name
src.name = new_name
initial_loc.air_vent_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
initialize()
..()
//some vents work his own spesial way
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if("purge" in signal.data)
pressure_checks &= ~1
pump_direction = 0
if("stabalize" in signal.data)
pressure_checks |= 1
pump_direction = 1
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
if("checks_toggle" in signal.data)
pressure_checks = (pressure_checks?0:3)
if("direction" in signal.data)
pump_direction = text2num(signal.data["direction"])
if("set_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
text2num(signal.data["set_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("set_external_pressure" in signal.data)
external_pressure_bound = Clamp(
text2num(signal.data["set_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_internal_pressure" in signal.data)
internal_pressure_bound = Clamp(
internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("adjust_external_pressure" in signal.data)
external_pressure_bound = Clamp(
external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),
0,
ONE_ATMOSPHERE*50
)
if("init" in signal.data)
name = signal.data["init"]
return
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
//log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
if("status" in signal.data)
spawn(2)
broadcast_status()
update_icon()
return
return //do not update_icon
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(welded)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on&&node)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
//log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()
return
/obj/machinery/atmospherics/unary/vent_pump/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(welded)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]weld"
return
if(on&&node)
if(pump_direction)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/weapon/wrench)&& !(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "\blue Now welding the vent."
if(do_after(user, 20))
if(!src || !WT.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
update_icon()
else
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/weapon/wrench)&& !(stat & NOPOWER) && on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "<span class='notice'>Now welding the vent.</span>"
if(do_after(user, 20))
if(!src || !WT.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
update_icon()
else
user << "\blue The welding tool needs to be on to start this task."
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
else
user << "\blue You need more welding fuel to complete this task."
return 1
user << "<span class='notice'>The welding tool needs to be on to start this task.</span>"
else
return ..()
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return 1
else
return ..()
examine()
set src in oview(1)
..()
if(welded)
usr << "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/examine()
set src in oview(1)
..()
if(welded)
usr << "It seems welded shut."
power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
/obj/machinery/atmospherics/unary/vent_pump/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
@@ -28,229 +28,228 @@
var/radio_filter_out
var/radio_filter_in
New()
..()
initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
update_icon()
if(node && on && !(stat & (NOPOWER|BROKEN)))
if(scrubbing)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
return
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, radio_filter_in)
broadcast_status()
if(!radio_connection)
return 0
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"area" = area_uid,
"tag" = id_tag,
"device" = "AScr",
"timestamp" = world.time,
"power" = on,
"scrubbing" = scrubbing,
"panic" = panic,
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
var/new_name = "\improper [initial_loc.name] air scrubber #[initial_loc.air_scrub_names.len+1]"
initial_loc.air_scrub_names[id_tag] = new_name
src.name = new_name
initial_loc.air_scrub_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
initialize()
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
set_frequency(frequency)
process()
..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
//broadcast_status()
if(!on)
return 0
var/datum/gas_mixture/environment = loc.return_air()
/obj/machinery/atmospherics/unary/vent_scrubber/New()
..()
initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
if(ticker && ticker.current_state == 3)//if the game is running
src.initialize()
src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon()
if(node && on && !(stat & (NOPOWER|BROKEN)))
if(scrubbing)
if((environment.toxins>0) || (environment.carbon_dioxide>0) || (environment.trace_gases.len>0))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
return
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, radio_filter_in)
//Filter it
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
if(scrub_Toxins)
filtered_out.toxins = removed.toxins
removed.toxins = 0
if(scrub_CO2)
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
/obj/machinery/atmospherics/unary/vent_scrubber/proc/broadcast_status()
if(!radio_connection)
return 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
else if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O)
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data = list(
"area" = area_uid,
"tag" = id_tag,
"device" = "AScr",
"timestamp" = world.time,
"power" = on,
"scrubbing" = scrubbing,
"panic" = panic,
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
var/new_name = "\improper [initial_loc.name] air scrubber #[initial_loc.air_scrub_names.len+1]"
initial_loc.air_scrub_names[id_tag] = new_name
src.name = new_name
initial_loc.air_scrub_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/unary/vent_scrubber/process()
..()
if(stat & (NOPOWER|BROKEN))
return
if (!node)
on = 0
//broadcast_status()
if(!on)
return 0
//Remix the resulting gases
air_contents.merge(filtered_out)
var/datum/gas_mixture/environment = loc.return_air()
loc.assume_air(removed)
air_update_turf()
if(scrubbing)
if((environment.toxins>0) || (environment.carbon_dioxide>0) || (environment.trace_gases.len>0))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
if(network)
network.update = 1
else //Just siphoning all air
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if (isnull(removed)) //in space
return
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
//Filter it
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
if(scrub_Toxins)
filtered_out.toxins = removed.toxins
removed.toxins = 0
if(scrub_CO2)
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
else if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O)
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
air_contents.merge(removed)
//Remix the resulting gases
air_contents.merge(filtered_out)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
return 1
else //Just siphoning all air
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
return
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
return 1
/* //unused piece of code
hide(var/i) //to make the little pipe section invisible, the icon changes.
if(on&&node)
if(scrubbing)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
/obj/machinery/atmospherics/unary/vent_scrubber/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(on&&node)
if(scrubbing)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
on = 0
return
*/
receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
/obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("power" in signal.data)
on = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
if("panic_siphon" in signal.data) //must be before if("scrubbing" thing
panic = text2num(signal.data["panic_siphon"])
if(panic)
on = 1
scrubbing = 0
volume_rate = 2000
else
scrubbing = 1
volume_rate = initial(volume_rate)
if("toggle_panic_siphon" in signal.data)
panic = !panic
if(panic)
on = 1
scrubbing = 0
volume_rate = 2000
else
scrubbing = 1
volume_rate = initial(volume_rate)
if("panic_siphon" in signal.data) //must be before if("scrubbing" thing
panic = text2num(signal.data["panic_siphon"])
if(panic)
on = 1
scrubbing = 0
volume_rate = 2000
else
scrubbing = 1
volume_rate = initial(volume_rate)
if("toggle_panic_siphon" in signal.data)
panic = !panic
if(panic)
on = 1
scrubbing = 0
volume_rate = 2000
else
scrubbing = 1
volume_rate = initial(volume_rate)
if("scrubbing" in signal.data)
scrubbing = text2num(signal.data["scrubbing"])
if("toggle_scrubbing" in signal.data)
scrubbing = !scrubbing
if("scrubbing" in signal.data)
scrubbing = text2num(signal.data["scrubbing"])
if("toggle_scrubbing" in signal.data)
scrubbing = !scrubbing
if("co2_scrub" in signal.data)
scrub_CO2 = text2num(signal.data["co2_scrub"])
if("toggle_co2_scrub" in signal.data)
scrub_CO2 = !scrub_CO2
if("co2_scrub" in signal.data)
scrub_CO2 = text2num(signal.data["co2_scrub"])
if("toggle_co2_scrub" in signal.data)
scrub_CO2 = !scrub_CO2
if("tox_scrub" in signal.data)
scrub_Toxins = text2num(signal.data["tox_scrub"])
if("toggle_tox_scrub" in signal.data)
scrub_Toxins = !scrub_Toxins
if("tox_scrub" in signal.data)
scrub_Toxins = text2num(signal.data["tox_scrub"])
if("toggle_tox_scrub" in signal.data)
scrub_Toxins = !scrub_Toxins
if("n2o_scrub" in signal.data)
scrub_N2O = text2num(signal.data["n2o_scrub"])
if("toggle_n2o_scrub" in signal.data)
scrub_N2O = !scrub_N2O
if("n2o_scrub" in signal.data)
scrub_N2O = text2num(signal.data["n2o_scrub"])
if("toggle_n2o_scrub" in signal.data)
scrub_N2O = !scrub_N2O
if("init" in signal.data)
name = signal.data["init"]
return
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
// log_admin("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()
if("init" in signal.data)
name = signal.data["init"]
return
power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()
if("status" in signal.data)
spawn(2)
broadcast_status()
return //do not update_icon
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
// log_admin("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()
return
/obj/machinery/atmospherics/unary/vent_scrubber/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
else
stat |= NOPOWER
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='danger'>You cannot unwrench this [src], turn it off first.</span>"
return 1
return ..()
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
if(initial_loc)
+228 -229
View File
@@ -1,4 +1,4 @@
obj/machinery/atmospherics/valve
/obj/machinery/atmospherics/valve
icon = 'icons/obj/atmospherics/valve.dmi'
icon_state = "valve0"
@@ -18,295 +18,294 @@ obj/machinery/atmospherics/valve
var/datum/pipe_network/network_node1
var/datum/pipe_network/network_node2
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
open
open = 1
icon_state = "valve1"
/obj/machinery/atmospherics/valve/open
open = 1
icon_state = "valve1"
update_icon(animation)
if(animation)
flick("valve[src.open][!src.open]",src)
else
icon_state = "valve[open]"
/obj/machinery/atmospherics/valve/update_icon(animation)
if(animation)
flick("valve[src.open][!src.open]",src)
else
icon_state = "valve[open]"
New()
..()
switch(dir)
if(NORTH || SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST || WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/valve/New()
..()
switch(dir)
if(NORTH || SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST || WEST)
initialize_directions = EAST|WEST
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
/obj/machinery/atmospherics/valve/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network_node1 = new_network
if(open)
network_node2 = new_network
else if(reference == node2)
network_node2 = new_network
if(open)
network_node1 = new_network
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
if(reference == node1)
network_node1 = new_network
if(open)
if(reference == node1)
if(node2)
return node2.network_expand(new_network, src)
else if(reference == node2)
if(node1)
return node1.network_expand(new_network, src)
network_node2 = new_network
else if(reference == node2)
network_node2 = new_network
if(open)
network_node1 = new_network
return null
if(new_network.normal_members.Find(src))
return 0
Destroy()
if(node1)
node1.disconnect(src)
del(network_node1)
if(node2)
node2.disconnect(src)
del(network_node2)
new_network.normal_members += src
node1 = null
node2 = null
if(open)
if(reference == node1)
if(node2)
return node2.network_expand(new_network, src)
else if(reference == node2)
if(node1)
return node1.network_expand(new_network, src)
..()
return null
proc/open()
/obj/machinery/atmospherics/valve/Destroy()
if(node1)
node1.disconnect(src)
del(network_node1)
if(node2)
node2.disconnect(src)
del(network_node2)
if(open) return 0
node1 = null
node2 = null
open = 1
update_icon()
..()
if(network_node1&&network_node2)
network_node1.merge(network_node2)
network_node2 = network_node1
/obj/machinery/atmospherics/valve/proc/open()
if(network_node1)
network_node1.update = 1
else if(network_node2)
network_node2.update = 1
if(open) return 0
return 1
open = 1
update_icon()
proc/close()
if(network_node1&&network_node2)
network_node1.merge(network_node2)
network_node2 = network_node1
if(!open)
return 0
if(network_node1)
network_node1.update = 1
else if(network_node2)
network_node2.update = 1
open = 0
update_icon()
return 1
if(network_node1)
del(network_node1)
if(network_node2)
del(network_node2)
/obj/machinery/atmospherics/valve/proc/close()
build_network()
if(!open)
return 0
return 1
open = 0
update_icon()
proc/normalize_dir()
if(dir==3)
dir = 1
else if(dir==12)
dir = 4
if(network_node1)
del(network_node1)
if(network_node2)
del(network_node2)
attack_ai(mob/user as mob)
return
build_network()
attack_paw(mob/user as mob)
return attack_hand(user)
return 1
attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
sleep(10)
if (src.open)
src.close()
else
src.open()
/obj/machinery/atmospherics/valve/proc/normalize_dir()
if(dir==3)
dir = 1
else if(dir==12)
dir = 4
process()
..()
. = PROCESS_KILL
/obj/machinery/atmospherics/valve/attack_ai(mob/user as mob)
return
/* if(open && (!node1 || !node2))
close()
if(!node1)
if(!nodealert)
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
nodealert = 1
else if (!node2)
if(!nodealert)
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
nodealert = 1
else if (nodealert)
nodealert = 0
/obj/machinery/atmospherics/valve/attack_paw(mob/user as mob)
return attack_hand(user)
obj/machinery/atmospherics/valve/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
sleep(10)
if (src.open)
src.close()
else
src.open()
/obj/machinery/atmospherics/valve/process()
..()
. = PROCESS_KILL
/* if(open && (!node1 || !node2))
close()
if(!node1)
if(!nodealert)
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
nodealert = 1
else if (!node2)
if(!nodealert)
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
nodealert = 1
else if (nodealert)
nodealert = 0
*/
return
return
initialize()
normalize_dir()
/obj/machinery/atmospherics/valve/initialize()
normalize_dir()
var/node1_dir
var/node2_dir
var/node1_dir
var/node2_dir
for(var/direction in cardinal)
if(direction&initialize_directions)
if (!node1_dir)
node1_dir = direction
else if (!node2_dir)
node2_dir = direction
for(var/direction in cardinal)
if(direction&initialize_directions)
if (!node1_dir)
node1_dir = direction
else if (!node2_dir)
node2_dir = direction
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
build_network()
build_network()
if(openDuringInit)
close()
open()
openDuringInit = 0
if(openDuringInit)
close()
open()
openDuringInit = 0
/*
var/connect_directions
switch(dir)
if(NORTH)
connect_directions = NORTH|SOUTH
if(SOUTH)
connect_directions = NORTH|SOUTH
if(EAST)
connect_directions = EAST|WEST
if(WEST)
connect_directions = EAST|WEST
else
connect_directions = dir
var/connect_directions
switch(dir)
if(NORTH)
connect_directions = NORTH|SOUTH
if(SOUTH)
connect_directions = NORTH|SOUTH
if(EAST)
connect_directions = EAST|WEST
if(WEST)
connect_directions = EAST|WEST
else
connect_directions = dir
for(var/direction in cardinal)
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
connect_directions &= ~direction
node1 = target
break
if(node1)
for(var/direction in cardinal)
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
connect_directions &= ~direction
node1 = target
break
if(node1)
break
for(var/direction in cardinal)
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
if(node1)
for(var/direction in cardinal)
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
if(node1)
break
*/
/obj/machinery/atmospherics/valve/build_network()
if(!network_node1 && node1)
network_node1 = new /datum/pipe_network()
network_node1.normal_members += src
network_node1.build_network(node1, src)
if(!network_node2 && node2)
network_node2 = new /datum/pipe_network()
network_node2.normal_members += src
network_node2.build_network(node2, src)
/obj/machinery/atmospherics/valve/return_network(obj/machinery/atmospherics/reference)
build_network()
if(!network_node1 && node1)
network_node1 = new /datum/pipe_network()
network_node1.normal_members += src
network_node1.build_network(node1, src)
if(!network_node2 && node2)
network_node2 = new /datum/pipe_network()
network_node2.normal_members += src
network_node2.build_network(node2, src)
if(reference==node1)
return network_node1
if(reference==node2)
return network_node2
return_network(obj/machinery/atmospherics/reference)
build_network()
return null
if(reference==node1)
return network_node1
/obj/machinery/atmospherics/valve/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network_node1 == old_network)
network_node1 = new_network
if(network_node2 == old_network)
network_node2 = new_network
if(reference==node2)
return network_node2
return 1
return null
/obj/machinery/atmospherics/valve/return_network_air(datum/network/reference)
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network_node1 == old_network)
network_node1 = new_network
if(network_node2 == old_network)
network_node2 = new_network
/obj/machinery/atmospherics/valve/disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network_node1)
node1 = null
return 1
else if(reference==node2)
del(network_node2)
node2 = null
return_network_air(datum/network/reference)
return null
return null
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network_node1)
node1 = null
/obj/machinery/atmospherics/valve/digital // can be controlled by AI
name = "digital valve"
desc = "A digitally controlled valve."
icon = 'icons/obj/atmospherics/digital_valve.dmi'
else if(reference==node2)
del(network_node2)
node2 = null
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
return src.attack_hand(user)
return null
/obj/machinery/atmospherics/valve/digital/attack_hand(mob/user as mob)
if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
return
..()
digital // can be controlled by AI
name = "digital valve"
desc = "A digitally controlled valve."
icon = 'icons/obj/atmospherics/digital_valve.dmi'
//Radio remote control
attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/valve/digital/proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
attack_hand(mob/user as mob)
if(!src.allowed(user))
user << "\red Access denied."
return
..()
/obj/machinery/atmospherics/valve/digital/initialize()
..()
if(frequency)
set_frequency(frequency)
//Radio remote control
/obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id))
return 0
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
switch(signal.data["command"])
if("valve_open")
if(!open)
open()
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
if("valve_close")
if(open)
close()
initialize()
..()
if(frequency)
set_frequency(frequency)
receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id))
return 0
switch(signal.data["command"])
if("valve_open")
if(!open)
open()
if("valve_close")
if(open)
close()
if("valve_toggle")
if(open)
close()
else
open()
if("valve_toggle")
if(open)
close()
else
open()
+114 -114
View File
@@ -1,6 +1,6 @@
var/global/list/datum/pipe_network/pipe_networks = list()
datum/pipe_network
/datum/pipe_network
var/list/datum/gas_mixture/gases = list() //All of the gas_mixtures continuously connected in this network
var/list/obj/machinery/atmospherics/normal_members = list()
@@ -10,135 +10,135 @@ datum/pipe_network
var/update = 1
var/datum/gas_mixture/air_transient = null
New()
air_transient = new()
/datum/pipe_network/New()
air_transient = new()
..()
..()
proc/process()
//Equalize gases amongst pipe if called for
if(update)
update = 0
reconcile_air() //equalize_gases(gases)
/datum/pipe_network/proc/process()
//Equalize gases amongst pipe if called for
if(update)
update = 0
reconcile_air() //equalize_gases(gases)
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
//for(var/datum/pipeline/line_member in line_members)
// line_member.process()
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
//for(var/datum/pipeline/line_member in line_members)
// line_member.process()
proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
//Purpose: Generate membership roster
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
/datum/pipe_network/proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
//Purpose: Generate membership roster
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
if(!start_normal)
del(src)
if(!start_normal)
del(src)
start_normal.network_expand(src, reference)
start_normal.network_expand(src, reference)
update_network_gases()
update_network_gases()
if((normal_members.len>0)||(line_members.len>0))
pipe_networks += src
else
del(src)
/datum/pipe_network/proc/merge(datum/pipe_network/giver)
if(giver==src) return 0
normal_members -= giver.normal_members
normal_members += giver.normal_members
line_members -= giver.line_members
line_members += giver.line_members
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
normal_member.reassign_network(giver, src)
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
del(giver)
update_network_gases()
return 1
/datum/pipe_network/proc/update_network_gases()
//Go through membership roster and make sure gases is up to date
gases = list()
for(var/obj/machinery/atmospherics/normal_member in normal_members)
var/result = normal_member.return_network_air(src)
if(result) gases += result
for(var/datum/pipeline/line_member in line_members)
gases += line_member.air
/datum/pipe_network/proc/reconcile_air()
//Perfectly equalize all gases members instantly
//Calculate totals from individual components
var/total_thermal_energy = 0
var/total_heat_capacity = 0
air_transient.volume = 0
air_transient.oxygen = 0
air_transient.nitrogen = 0
air_transient.toxins = 0
air_transient.carbon_dioxide = 0
air_transient.trace_gases = list()
for(var/datum/gas_mixture/gas in gases)
air_transient.volume += gas.volume
total_thermal_energy += gas.thermal_energy()
total_heat_capacity += gas.heat_capacity()
air_transient.oxygen += gas.oxygen
air_transient.nitrogen += gas.nitrogen
air_transient.toxins += gas.toxins
air_transient.carbon_dioxide += gas.carbon_dioxide
if(gas.trace_gases.len)
for(var/datum/gas/trace_gas in gas.trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in air_transient.trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
air_transient.trace_gases += corresponding
corresponding.moles += trace_gas.moles
if(air_transient.volume > 0)
if(total_heat_capacity > 0)
air_transient.temperature = total_thermal_energy/total_heat_capacity
//Allow air mixture to react
if(air_transient.react())
update = 1
if((normal_members.len>0)||(line_members.len>0))
pipe_networks += src
else
del(src)
proc/merge(datum/pipe_network/giver)
if(giver==src) return 0
normal_members -= giver.normal_members
normal_members += giver.normal_members
line_members -= giver.line_members
line_members += giver.line_members
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
normal_member.reassign_network(giver, src)
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
del(giver)
update_network_gases()
return 1
proc/update_network_gases()
//Go through membership roster and make sure gases is up to date
gases = list()
for(var/obj/machinery/atmospherics/normal_member in normal_members)
var/result = normal_member.return_network_air(src)
if(result) gases += result
for(var/datum/pipeline/line_member in line_members)
gases += line_member.air
proc/reconcile_air()
//Perfectly equalize all gases members instantly
//Calculate totals from individual components
var/total_thermal_energy = 0
var/total_heat_capacity = 0
air_transient.volume = 0
air_transient.oxygen = 0
air_transient.nitrogen = 0
air_transient.toxins = 0
air_transient.carbon_dioxide = 0
air_transient.trace_gases = list()
air_transient.temperature = 0
//Update individual gas_mixtures by volume ratio
for(var/datum/gas_mixture/gas in gases)
air_transient.volume += gas.volume
total_thermal_energy += gas.thermal_energy()
total_heat_capacity += gas.heat_capacity()
gas.oxygen = air_transient.oxygen*gas.volume/air_transient.volume
gas.nitrogen = air_transient.nitrogen*gas.volume/air_transient.volume
gas.toxins = air_transient.toxins*gas.volume/air_transient.volume
gas.carbon_dioxide = air_transient.carbon_dioxide*gas.volume/air_transient.volume
air_transient.oxygen += gas.oxygen
air_transient.nitrogen += gas.nitrogen
air_transient.toxins += gas.toxins
air_transient.carbon_dioxide += gas.carbon_dioxide
gas.temperature = air_transient.temperature
if(gas.trace_gases.len)
for(var/datum/gas/trace_gas in gas.trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in air_transient.trace_gases
if(air_transient.trace_gases.len)
for(var/datum/gas/trace_gas in air_transient.trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in gas.trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
air_transient.trace_gases += corresponding
gas.trace_gases += corresponding
corresponding.moles += trace_gas.moles
if(air_transient.volume > 0)
if(total_heat_capacity > 0)
air_transient.temperature = total_thermal_energy/total_heat_capacity
//Allow air mixture to react
if(air_transient.react())
update = 1
else
air_transient.temperature = 0
//Update individual gas_mixtures by volume ratio
for(var/datum/gas_mixture/gas in gases)
gas.oxygen = air_transient.oxygen*gas.volume/air_transient.volume
gas.nitrogen = air_transient.nitrogen*gas.volume/air_transient.volume
gas.toxins = air_transient.toxins*gas.volume/air_transient.volume
gas.carbon_dioxide = air_transient.carbon_dioxide*gas.volume/air_transient.volume
gas.temperature = air_transient.temperature
if(air_transient.trace_gases.len)
for(var/datum/gas/trace_gas in air_transient.trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in gas.trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
gas.trace_gases += corresponding
corresponding.moles = trace_gas.moles*gas.volume/air_transient.volume
return 1
corresponding.moles = trace_gas.moles*gas.volume/air_transient.volume
return 1
proc/equalize_gases(datum/gas_mixture/list/gases)
//Perfectly equalize all gases members instantly
+144 -144
View File
@@ -1,4 +1,4 @@
datum/pipeline
/datum/pipeline
var/datum/gas_mixture/air
var/list/obj/machinery/atmospherics/pipe/members
@@ -8,187 +8,187 @@ datum/pipeline
var/alert_pressure = 0
Del()
if(network)
del(network)
/datum/pipeline/Del()
if(network)
del(network)
if(air && air.volume)
temporarily_store_air()
del(air)
if(air && air.volume)
temporarily_store_air()
del(air)
..()
..()
proc/process()//This use to be called called from the pipe networks
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
if(pressure > alert_pressure)
for(var/obj/machinery/atmospherics/pipe/member in members)
if(!member.check_pressure(pressure))
break //Only delete 1 pipe per process
//Allow for reactions
//air.react() //Should be handled by pipe_network now
proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio
/datum/pipeline/proc/process()//This use to be called called from the pipe networks
//Check to see if pressure is within acceptable limits
var/pressure = air.return_pressure()
if(pressure > alert_pressure)
for(var/obj/machinery/atmospherics/pipe/member in members)
member.air_temporary = new
member.air_temporary.volume = member.volume
if(!member.check_pressure(pressure))
break //Only delete 1 pipe per process
member.air_temporary.oxygen = air.oxygen*member.volume/air.volume
member.air_temporary.nitrogen = air.nitrogen*member.volume/air.volume
member.air_temporary.toxins = air.toxins*member.volume/air.volume
member.air_temporary.carbon_dioxide = air.carbon_dioxide*member.volume/air.volume
//Allow for reactions
//air.react() //Should be handled by pipe_network now
member.air_temporary.temperature = air.temperature
/datum/pipeline/proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio
if(air.trace_gases.len)
for(var/datum/gas/trace_gas in air.trace_gases)
var/datum/gas/corresponding = new trace_gas.type()
member.air_temporary.trace_gases += corresponding
for(var/obj/machinery/atmospherics/pipe/member in members)
member.air_temporary = new
member.air_temporary.volume = member.volume
corresponding.moles = trace_gas.moles*member.volume/air.volume
member.air_temporary.oxygen = air.oxygen*member.volume/air.volume
member.air_temporary.nitrogen = air.nitrogen*member.volume/air.volume
member.air_temporary.toxins = air.toxins*member.volume/air.volume
member.air_temporary.carbon_dioxide = air.carbon_dioxide*member.volume/air.volume
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
member.air_temporary.temperature = air.temperature
if(air.trace_gases.len)
for(var/datum/gas/trace_gas in air.trace_gases)
var/datum/gas/corresponding = new trace_gas.type()
member.air_temporary.trace_gases += corresponding
corresponding.moles = trace_gas.moles*member.volume/air.volume
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
air = new
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
var/volume = base.volume
base.parent = src
alert_pressure = base.alert_pressure
if(base.air_temporary)
air = base.air_temporary
base.air_temporary = null
else
air = new
var/list/possible_expansions = list(base)
members = list(base)
edges = list()
while(possible_expansions.len>0)
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
var/volume = base.volume
base.parent = src
alert_pressure = base.alert_pressure
var/list/result = borderline.pipeline_expansion()
var/edge_check = result.len
if(base.air_temporary)
air = base.air_temporary
base.air_temporary = null
else
air = new
if(result.len>0)
for(var/obj/machinery/atmospherics/pipe/item in result)
if(!members.Find(item))
members += item
possible_expansions += item
while(possible_expansions.len>0)
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
volume += item.volume
item.parent = src
var/list/result = borderline.pipeline_expansion()
var/edge_check = result.len
alert_pressure = min(alert_pressure, item.alert_pressure)
if(result.len>0)
for(var/obj/machinery/atmospherics/pipe/item in result)
if(!members.Find(item))
members += item
possible_expansions += item
if(item.air_temporary)
air.merge(item.air_temporary)
volume += item.volume
item.parent = src
edge_check--
alert_pressure = min(alert_pressure, item.alert_pressure)
if(edge_check>0)
edges += borderline
if(item.air_temporary)
air.merge(item.air_temporary)
possible_expansions -= borderline
edge_check--
air.volume = volume
if(edge_check>0)
edges += borderline
/datum/pipeline/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
possible_expansions -= borderline
if(new_network.line_members.Find(src))
return 0
air.volume = volume
new_network.line_members += src
proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
network = new_network
if(new_network.line_members.Find(src))
return 0
for(var/obj/machinery/atmospherics/pipe/edge in edges)
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
result.network_expand(new_network, edge)
new_network.line_members += src
return 1
network = new_network
/datum/pipeline/proc/return_network(obj/machinery/atmospherics/reference)
if(!network)
network = new /datum/pipe_network()
network.build_network(src, null)
//technically passing these parameters should not be allowed
//however pipe_network.build_network(..) and pipeline.network_extend(...)
// were setup to properly handle this case
for(var/obj/machinery/atmospherics/pipe/edge in edges)
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
result.network_expand(new_network, edge)
return network
return 1
/datum/pipeline/proc/mingle_with_turf(turf/simulated/target, mingle_volume)
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
proc/return_network(obj/machinery/atmospherics/reference)
if(!network)
network = new /datum/pipe_network()
network.build_network(src, null)
//technically passing these parameters should not be allowed
//however pipe_network.build_network(..) and pipeline.network_extend(...)
// were setup to properly handle this case
var/datum/gas_mixture/turf_air = target.return_air()
return network
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
proc/mingle_with_turf(turf/simulated/target, mingle_volume)
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
if(istype(target))
if(target.air)
if(target.air.check_tile_graphic())
target.update_visuals(target.air)
if(network)
network.update = 1
var/datum/gas_mixture/turf_air = target.return_air()
/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
if(istype(target, /turf/simulated))
var/turf/simulated/modeled_location = target
if(istype(target))
if(target.air)
if(target.air.check_tile_graphic())
target.update_visuals(target.air)
if(network)
network.update = 1
if(modeled_location.blocks_air)
proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
if(istype(target, /turf/simulated))
var/turf/simulated/modeled_location = target
if(modeled_location.blocks_air)
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - modeled_location.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
air.temperature -= heat/total_heat_capacity
modeled_location.temperature += heat/modeled_location.heat_capacity
else
var/delta_temperature = 0
var/sharer_heat_capacity = 0
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
self_temperature_delta = -heat/total_heat_capacity
sharer_temperature_delta = heat/sharer_heat_capacity
else
return 1
air.temperature += self_temperature_delta
modeled_location.air.temperature += sharer_temperature_delta
else
if((target.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - target.temperature
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - modeled_location.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
modeled_location.temperature += heat/modeled_location.heat_capacity
else
var/delta_temperature = 0
var/sharer_heat_capacity = 0
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
self_temperature_delta = -heat/total_heat_capacity
sharer_temperature_delta = heat/sharer_heat_capacity
else
return 1
air.temperature += self_temperature_delta
modeled_location.air.temperature += sharer_temperature_delta
else
if((target.heat_capacity>0) && (partial_heat_capacity>0))
var/delta_temperature = air.temperature - target.temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
+84 -84
View File
@@ -1,5 +1,5 @@
obj/machinery/atmospherics/pipe/simple/heat_exchanging
/obj/machinery/atmospherics/pipe/simple/heat_exchanging
icon = 'icons/obj/pipes/heat.dmi'
icon_state = "intact"
level = 2
@@ -8,99 +8,99 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
minimum_temperature_difference = 20
thermal_conductivity = WINDOW_HEAT_TRANSFER_COEFFICIENT
// BubbleWrap
New()
// BubbleWrap
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/New()
..()
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
// BubbleWrap END
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize()
normalize_dir()
var/node1_dir
var/node2_dir
for(var/direction in cardinal)
if(direction&initialize_directions_he)
if (!node1_dir)
node1_dir = direction
else if (!node2_dir)
node2_dir = direction
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir))
if(target.initialize_directions_he & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir))
if(target.initialize_directions_he & get_dir(target,src))
node2 = target
break
update_icon()
return
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
if(!parent)
..()
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
// BubbleWrap END
initialize()
normalize_dir()
var/node1_dir
var/node2_dir
for(var/direction in cardinal)
if(direction&initialize_directions_he)
if (!node1_dir)
node1_dir = direction
else if (!node2_dir)
node2_dir = direction
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir))
if(target.initialize_directions_he & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir))
if(target.initialize_directions_he & get_dir(target,src))
node2 = target
break
update_icon()
return
process()
if(!parent)
..()
else
var/environment_temperature = 0
if(istype(loc, /turf/simulated/))
if(loc:blocks_air)
environment_temperature = loc:temperature
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
else
else
var/environment_temperature = 0
if(istype(loc, /turf/simulated/))
if(loc:blocks_air)
environment_temperature = loc:temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
else
environment_temperature = loc:temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
icon = 'icons/obj/pipes/junction.dmi'
icon_state = "intact"
level = 2
minimum_temperature_difference = 300
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
// BubbleWrap
New()
.. ()
switch ( dir )
if ( SOUTH )
initialize_directions = NORTH
initialize_directions_he = SOUTH
if ( NORTH )
initialize_directions = SOUTH
initialize_directions_he = NORTH
if ( EAST )
initialize_directions = WEST
initialize_directions_he = EAST
if ( WEST )
initialize_directions = EAST
initialize_directions_he = WEST
// BubbleWrap END
// BubbleWrap
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/New()
.. ()
switch ( dir )
if ( SOUTH )
initialize_directions = NORTH
initialize_directions_he = SOUTH
if ( NORTH )
initialize_directions = SOUTH
initialize_directions_he = NORTH
if ( EAST )
initialize_directions = WEST
initialize_directions_he = EAST
if ( WEST )
initialize_directions = EAST
initialize_directions_he = WEST
// BubbleWrap END
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/update_icon()
if(node1&&node2)
icon_state = "intact"
else
var/have_node1 = node1?1:0
var/have_node2 = node2?1:0
icon_state = "exposed[have_node1][have_node2]"
if(!node1&&!node2)
qdel(src)
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
if(target.initialize_directions_he & get_dir(target,src))
node2 = target
break
update_icon()
if(node1&&node2)
icon_state = "intact"
else
var/have_node1 = node1?1:0
var/have_node2 = node2?1:0
icon_state = "exposed[have_node1][have_node2]"
if(!node1&&!node2)
qdel(src)
initialize()
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
if(target.initialize_directions_he & get_dir(target,src))
node2 = target
break
update_icon()
return
return
+751 -750
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -144,9 +144,9 @@
/obj/effect/hotspot/proc/Kill()
air_master.hotspots -= src
DestroyTurf()
garbage_collect()
qdel(src)
/obj/effect/hotspot/proc/garbage_collect()
/obj/effect/hotspot/Destroy()
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
if(T.active_hotspot == src)
+2 -2
View File
@@ -17,7 +17,7 @@ datum/controller/air_system
/datum/controller/air_system/proc/setup()
set background = BACKGROUND_ENABLED
world << "\red \b Processing Geometry..."
world << "<span class='userdanger'>Processing Geometry...</span>"
sleep(1)
var/start_time = world.timeofday
@@ -26,7 +26,7 @@ datum/controller/air_system
global_activeturfs = active_turfs.len
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
world << "<span class='userdanger'>Geometry processed in [(world.timeofday-start_time)/10] seconds!</span>"
/datum/controller/air_system/proc/process()
if(kill_air)
+1 -1
View File
@@ -66,7 +66,7 @@ turf/simulated/New()
turf/simulated/Del()
if(active_hotspot)
active_hotspot.garbage_collect()
qdel(active_hotspot)
..()
turf/simulated/assume_air(datum/gas_mixture/giver)
+97 -95
View File
@@ -46,65 +46,67 @@
/obj/effect/bmode/builddir
icon_state = "build"
screen_loc = "NORTH,WEST"
Click()
switch(dir)
if(NORTH)
dir = EAST
if(EAST)
dir = SOUTH
if(SOUTH)
dir = WEST
if(WEST)
dir = NORTHWEST
if(NORTHWEST)
dir = NORTH
return 1
/obj/effect/bmode/builddir/Click()
switch(dir)
if(NORTH)
dir = EAST
if(EAST)
dir = SOUTH
if(SOUTH)
dir = WEST
if(WEST)
dir = NORTHWEST
if(NORTHWEST)
dir = NORTH
return 1
/obj/effect/bmode/buildhelp
icon = 'icons/misc/buildmode.dmi'
icon_state = "buildhelp"
screen_loc = "NORTH,WEST+1"
Click()
switch(master.cl.buildmode)
if(1)
usr << "\blue ***********************************************************"
usr << "\blue Left Mouse Button = Construct / Upgrade"
usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade"
usr << "\blue Left Mouse Button + ctrl = R-Window"
usr << "\blue Left Mouse Button + alt = Airlock"
usr << ""
usr << "\blue Use the button in the upper left corner to"
usr << "\blue change the direction of built objects."
usr << "\blue ***********************************************************"
if(2)
usr << "\blue ***********************************************************"
usr << "\blue Right Mouse Button on buildmode button = Set object type"
usr << "\blue Left Mouse Button on turf/obj = Place objects"
usr << "\blue Right Mouse Button = Delete objects"
usr << ""
usr << "\blue Use the button in the upper left corner to"
usr << "\blue change the direction of built objects."
usr << "\blue ***********************************************************"
if(3)
usr << "\blue ***********************************************************"
usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value"
usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value"
usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value"
usr << "\blue ***********************************************************"
if(4)
usr << "\blue ***********************************************************"
usr << "\blue Left Mouse Button on turf/obj/mob = Throw"
usr << "\blue Right Mouse Button on turf/obj/mob = Select"
usr << "\blue ***********************************************************"
return 1
/obj/effect/bmode/buildhelp/Click()
switch(master.cl.buildmode)
if(1)
usr << "\blue ***********************************************************"
usr << "\blue Left Mouse Button = Construct / Upgrade"
usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade"
usr << "\blue Left Mouse Button + ctrl = R-Window"
usr << "\blue Left Mouse Button + alt = Airlock"
usr << ""
usr << "\blue Use the button in the upper left corner to"
usr << "\blue change the direction of built objects."
usr << "\blue ***********************************************************"
if(2)
usr << "\blue ***********************************************************"
usr << "\blue Right Mouse Button on buildmode button = Set object type"
usr << "\blue Left Mouse Button on turf/obj = Place objects"
usr << "\blue Right Mouse Button = Delete objects"
usr << ""
usr << "\blue Use the button in the upper left corner to"
usr << "\blue change the direction of built objects."
usr << "\blue ***********************************************************"
if(3)
usr << "\blue ***********************************************************"
usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value"
usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value"
usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value"
usr << "\blue ***********************************************************"
if(4)
usr << "\blue ***********************************************************"
usr << "\blue Left Mouse Button on turf/obj/mob = Throw"
usr << "\blue Right Mouse Button on turf/obj/mob = Select"
usr << "\blue ***********************************************************"
return 1
/obj/effect/bmode/buildquit
icon_state = "buildquit"
screen_loc = "NORTH,WEST+3"
Click()
togglebuildmode(master.cl.mob)
return 1
/obj/effect/bmode/buildquit/Click()
togglebuildmode(master.cl.mob)
return 1
/obj/effect/bmode/buildholder
density = 0
@@ -123,56 +125,56 @@
var/valueholder = "derp"
var/objholder = /obj/structure/closet
Click(location, control, params)
var/list/pa = params2list(params)
/obj/effect/bmode/buildmode/Click(location, control, params)
var/list/pa = params2list(params)
if(pa.Find("left"))
switch(master.cl.buildmode)
if(1)
master.cl.buildmode = 2
src.icon_state = "buildmode2"
if(2)
master.cl.buildmode = 3
src.icon_state = "buildmode3"
if(3)
master.cl.buildmode = 4
src.icon_state = "buildmode4"
if(4)
master.cl.buildmode = 1
src.icon_state = "buildmode1"
if(pa.Find("left"))
switch(master.cl.buildmode)
if(1)
master.cl.buildmode = 2
src.icon_state = "buildmode2"
if(2)
master.cl.buildmode = 3
src.icon_state = "buildmode3"
if(3)
master.cl.buildmode = 4
src.icon_state = "buildmode4"
if(4)
master.cl.buildmode = 1
src.icon_state = "buildmode1"
else if(pa.Find("right"))
switch(master.cl.buildmode)
if(1)
return 1
if(2)
objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
if(!ispath(objholder))
else if(pa.Find("right"))
switch(master.cl.buildmode)
if(1)
return 1
if(2)
objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
if(!ispath(objholder))
objholder = /obj/structure/closet
alert("That path is not allowed.")
else
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
alert("That path is not allowed.")
else
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return 1
switch(thetype)
if("text")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
if("number")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
if("mob-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
if("obj-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
return 1
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return 1
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
if(!thetype) return 1
switch(thetype)
if("text")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
if("number")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
if("mob-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
if("obj-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
return 1
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
+23 -11
View File
@@ -1,20 +1,22 @@
/*
These defines are specific to the atom/flags bitmask
*/
#define ALL ~0 //For convenience.
#define NONE 0
//FLAGS BITMASK
#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
#define NODROP 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS 8 // mask allows internals
//#define SUITSPACE 8 // suit protects against space
//#define USEDELAY 16 // For adding extra delay to heavy items, not currently used
#define NOSHIELD 32 // weapon not affected by shield
#define CONDUCT 64 // conducts electricity (metal etc.)
#define ABSTRACT 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define FPRINT 256 // takes a fingerprint
#define ON_BORDER 512 // item has priority to check when entering or leaving
#define NODROP 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS 8 // mask allows internals
#define HEAR 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
#define NOSHIELD 32 // weapon not affected by shield
#define CONDUCT 64 // conducts electricity (metal etc.)
#define ABSTRACT 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define FPRINT 256 // takes a fingerprint
#define ON_BORDER 512 // item has priority to check when entering or leaving
#define GLASSESCOVERSEYES 1024
@@ -61,4 +63,14 @@
#define NOBREATH 256
#define NOGUNS 512
#define NOBLOOD 1024
#define NOFIRE 2048
#define NOFIRE 2048
/*
These defines are used specifically with the atom/movable/languages bitmask.
They are used in atom/movable/Hear() and atom/movable/say() to determine whether hearers can understand a message.
*/
#define HUMAN 1
#define MONKEY 2
#define ALIEN 4
#define ROBOT 8
#define SLIME 16
+6 -1
View File
@@ -34,4 +34,9 @@
#define CLICK_CD_MELEE 8
#define CLICK_CD_RANGE 4
//click cooldowns, in tenths of a second
//click cooldowns, in tenths of a second
#define BE_CLOSE 1 //in the case of a silicon, to select if they need to be next to the atom
#define NO_DEXTERY 1 //if other mobs (monkeys, aliens, etc) can use this
//used by canUseTopic()
+2 -1
View File
@@ -12,8 +12,9 @@
#define CHAT_RADIO 512
#define MEMBER_PUBLIC 1024
#define CHAT_PULLR 2048
#define INTENT_STYLE 4096
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|MEMBER_PUBLIC|CHAT_PULLR)
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|MEMBER_PUBLIC|CHAT_PULLR|INTENT_STYLE)
#define BE_TRAITOR 1
#define BE_OPERATIVE 2
+57 -42
View File
@@ -32,7 +32,7 @@
// Like view but bypasses luminosity check
/proc/hear(var/range, var/atom/source)
/proc/get_hear(var/range, var/atom/source)
var/lum = source.luminosity
source.luminosity = 6
@@ -131,14 +131,30 @@
return turfs
//This is the new version of recursive_mob_check, used for say().
//The other proc was left intact because morgue trays use it.
/proc/recursive_hear_check(var/atom/O)
var/list/processing_list = list(O)
var/list/processed_list = list()
var/list/found_mobs = list()
//var/debug_mob = 0
while(processing_list.len)
var/atom/A = processing_list[1]
if(A.flags & HEAR)
found_mobs |= A
for(var/atom/B in A)
if(!processed_list[B])
processing_list |= B
processing_list.Cut(1, 2)
processed_list[A] = A
return found_mobs
// Better recursive loop, technically sort of not actually recursive cause that shit is retarded, enjoy.
//No need for a recursive limit either
proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/include_radio=1)
//No need for a recursive limit either
/proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/include_radio=1)
var/list/processing_list = list(O)
var/list/processed_list = list()
@@ -177,25 +193,22 @@ proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/inc
return found_mobs
proc/get_mobs_in_view(var/R, var/atom/source)
// Returns a list of mobs in range of R from source. Used in radio and say code.
/proc/get_hearers_in_view(var/R, var/atom/source)
// Returns a list of hearers in range of R from source. Used in saycode.
var/turf/T = get_turf(source)
var/list/hear = list()
if(!T)
return hear
var/list/range = hear(R, T)
var/list/range = get_hear(R, T)
for(var/atom/movable/A in range)
hear |= recursive_mob_check(A, 1, 0, 1)
hear |= recursive_hear_check(A)
return hear
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
set background = BACKGROUND_ENABLED
@@ -208,7 +221,7 @@ proc/get_mobs_in_view(var/R, var/atom/source)
if(R)
var/turf/speaker = get_turf(R)
if(speaker)
for(var/turf/T in hear(R.canhear_range,speaker))
for(var/turf/T in get_hear(R.canhear_range,speaker))
speaker_coverage[T] = T
@@ -222,41 +235,42 @@ proc/get_mobs_in_view(var/R, var/atom/source)
. |= M
return .
#define SIGN(X) ((X<0)?-1:1)
proc
inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
var/turf/T
if(X1==X2)
if(Y1==Y2)
return 1 //Light cannot be blocked on same tile
else
var/s = SIGN(Y2-Y1)
Y1+=s
while(Y1!=Y2)
T=locate(X1,Y1,Z)
if(T.opacity)
return 0
Y1+=s
/proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
var/turf/T
if(X1==X2)
if(Y1==Y2)
return 1 //Light cannot be blocked on same tile
else
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
var/signX = SIGN(X2-X1)
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
if(round(m*X1+b-Y1))
Y1+=signY //Line exits tile vertically
else
X1+=signX //Line exits tile horizontally
var/s = SIGN(Y2-Y1)
Y1+=s
while(Y1!=Y2)
T=locate(X1,Y1,Z)
if(T.opacity)
return 0
return 1
Y1+=s
else
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
var/signX = SIGN(X2-X1)
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
if(round(m*X1+b-Y1))
Y1+=signY //Line exits tile vertically
else
X1+=signX //Line exits tile horizontally
T=locate(X1,Y1,Z)
if(T.opacity)
return 0
return 1
#undef SIGN
proc/isInSight(var/atom/A, var/atom/B)
/proc/isInSight(var/atom/A, var/atom/B)
var/turf/Aturf = get_turf(A)
var/turf/Bturf = get_turf(B)
@@ -269,6 +283,7 @@ proc/isInSight(var/atom/A, var/atom/B)
else
return 0
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
//returns only NORTH, SOUTH, EAST, or WEST
var/dx = finish.x - start.x
+193 -193
View File
@@ -215,75 +215,75 @@ world
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
icon
// Multiply all alpha values by this float
proc/ChangeOpacity(opacity = 1.0)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
/icon/proc/ChangeOpacity(opacity = 1.0)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
// Convert to grayscale
proc/GrayScale()
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
// Convert to grayscale
/icon/proc/GrayScale()
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
proc/ColorTone(tone)
GrayScale()
/icon/proc/ColorTone(tone)
GrayScale()
var/list/TONE = ReadRGB(tone)
var/gray = round(TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11, 1)
var/list/TONE = ReadRGB(tone)
var/gray = round(TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11, 1)
var/icon/upper = (255-gray) ? new(src) : null
var/icon/upper = (255-gray) ? new(src) : null
if(gray)
MapColors(255/gray,0,0, 0,255/gray,0, 0,0,255/gray, 0,0,0)
Blend(tone, ICON_MULTIPLY)
else SetIntensity(0)
if(255-gray)
upper.Blend(rgb(gray,gray,gray), ICON_SUBTRACT)
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
Blend(upper, ICON_ADD)
if(gray)
MapColors(255/gray,0,0, 0,255/gray,0, 0,0,255/gray, 0,0,0)
Blend(tone, ICON_MULTIPLY)
else SetIntensity(0)
if(255-gray)
upper.Blend(rgb(gray,gray,gray), ICON_SUBTRACT)
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
Blend(upper, ICON_ADD)
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
proc/MinColors(icon)
var/icon/I = new(src)
I.Opaque()
I.Blend(icon, ICON_SUBTRACT)
Blend(I, ICON_SUBTRACT)
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
/icon/proc/MinColors(icon)
var/icon/I = new(src)
I.Opaque()
I.Blend(icon, ICON_SUBTRACT)
Blend(I, ICON_SUBTRACT)
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
proc/MaxColors(icon)
var/icon/I
if(isicon(icon))
I = new(icon)
else
// solid color
I = new(src)
I.Blend("#000000", ICON_OVERLAY)
I.SwapColor("#000000", null)
I.Blend(icon, ICON_OVERLAY)
var/icon/J = new(src)
J.Opaque()
I.Blend(J, ICON_SUBTRACT)
Blend(I, ICON_OR)
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
/icon/proc/MaxColors(icon)
var/icon/I
if(isicon(icon))
I = new(icon)
else
// solid color
I = new(src)
I.Blend("#000000", ICON_OVERLAY)
I.SwapColor("#000000", null)
I.Blend(icon, ICON_OVERLAY)
var/icon/J = new(src)
J.Opaque()
I.Blend(J, ICON_SUBTRACT)
Blend(I, ICON_OR)
// make this icon fully opaque--transparent pixels become black
proc/Opaque(background = "#000000")
SwapColor(null, background)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
// make this icon fully opaque--transparent pixels become black
/icon/proc/Opaque(background = "#000000")
SwapColor(null, background)
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
// Change a grayscale icon into a white icon where the original color becomes the alpha
// I.e., black -> transparent, gray -> translucent white, white -> solid white
proc/BecomeAlphaMask()
SwapColor(null, "#000000ff") // don't let transparent become gray
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
// Change a grayscale icon into a white icon where the original color becomes the alpha
// I.e., black -> transparent, gray -> translucent white, white -> solid white
/icon/proc/BecomeAlphaMask()
SwapColor(null, "#000000ff") // don't let transparent become gray
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
proc/UseAlphaMask(mask)
Opaque()
AddAlphaMask(mask)
/icon/proc/UseAlphaMask(mask)
Opaque()
AddAlphaMask(mask)
proc/AddAlphaMask(mask)
var/icon/M = new(mask)
M.Blend("#ffffff", ICON_SUBTRACT)
// apply mask
Blend(M, ICON_ADD)
/icon/proc/AddAlphaMask(mask)
var/icon/M = new(mask)
M.Blend("#ffffff", ICON_SUBTRACT)
// apply mask
Blend(M, ICON_ADD)
/*
HSV format is represented as "#hhhssvv" or "#hhhssvvaa"
@@ -307,7 +307,7 @@ icon
Higher value means brighter color
*/
proc/ReadRGB(rgb)
/proc/ReadRGB(rgb)
if(!rgb) return
// interpret the HSV or HSVA value
@@ -357,7 +357,7 @@ proc/ReadRGB(rgb)
. = list(r, g, b)
if(usealpha) . += alpha
proc/ReadHSV(hsv)
/proc/ReadHSV(hsv)
if(!hsv) return
// interpret the HSV or HSVA value
@@ -396,7 +396,7 @@ proc/ReadHSV(hsv)
. = list(hue, sat, val)
if(usealpha) . += alpha
proc/HSVtoRGB(hsv)
/proc/HSVtoRGB(hsv)
if(!hsv) return "#000000"
var/list/HSV = ReadHSV(hsv)
if(!HSV) return "#000000"
@@ -424,7 +424,7 @@ proc/HSVtoRGB(hsv)
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
proc/RGBtoHSV(rgb)
/proc/RGBtoHSV(rgb)
if(!rgb) return "#0000000"
var/list/RGB = ReadRGB(rgb)
if(!RGB) return "#0000000"
@@ -455,7 +455,7 @@ proc/RGBtoHSV(rgb)
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
proc/hsv(hue, sat, val, alpha)
/proc/hsv(hue, sat, val, alpha)
if(hue < 0 || hue >= 1536) hue %= 1536
if(hue < 0) hue += 1536
if((hue & 0xFF) == 0xFF)
@@ -488,7 +488,7 @@ proc/hsv(hue, sat, val, alpha)
amount<0 or amount>1 are allowed
*/
proc/BlendHSV(hsv1, hsv2, amount)
/proc/BlendHSV(hsv1, hsv2, amount)
var/list/HSV1 = ReadHSV(hsv1)
var/list/HSV2 = ReadHSV(hsv2)
@@ -542,7 +542,7 @@ proc/BlendHSV(hsv1, hsv2, amount)
amount<0 or amount>1 are allowed
*/
proc/BlendRGB(rgb1, rgb2, amount)
/proc/BlendRGB(rgb1, rgb2, amount)
var/list/RGB1 = ReadRGB(rgb1)
var/list/RGB2 = ReadRGB(rgb2)
@@ -558,10 +558,10 @@ proc/BlendRGB(rgb1, rgb2, amount)
return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha)
proc/BlendRGBasHSV(rgb1, rgb2, amount)
/proc/BlendRGBasHSV(rgb1, rgb2, amount)
return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount)
proc/HueToAngle(hue)
/proc/HueToAngle(hue)
// normalize hsv in case anything is screwy
if(hue < 0 || hue >= 1536) hue %= 1536
if(hue < 0) hue += 1536
@@ -569,7 +569,7 @@ proc/HueToAngle(hue)
hue -= hue >> 8
return hue / (1530/360)
proc/AngleToHue(angle)
/proc/AngleToHue(angle)
// normalize hsv in case anything is screwy
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
var/hue = angle * (1530/360)
@@ -579,7 +579,7 @@ proc/AngleToHue(angle)
// positive angle rotates forward through red->green->blue
proc/RotateHue(hsv, angle)
/proc/RotateHue(hsv, angle)
var/list/HSV = ReadHSV(hsv)
// normalize hsv in case anything is screwy
@@ -601,13 +601,13 @@ proc/RotateHue(hsv, angle)
return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null))
// Convert an rgb color to grayscale
proc/GrayScale(rgb)
/proc/GrayScale(rgb)
var/list/RGB = ReadRGB(rgb)
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray)
// Change grayscale color to black->tone->white range
proc/ColorTone(rgb, tone)
/proc/ColorTone(rgb, tone)
var/list/RGB = ReadRGB(rgb)
var/list/TONE = ReadRGB(tone)
@@ -624,148 +624,148 @@ as a single icon. Useful for when you want to manipulate an icon via the above a
The _flatIcons list is a cache for generated icon files.
*/
proc // Creates a single icon from a given /atom or /image. Only the first argument is required.
getFlatIcon(image/A, defdir=A.dir, deficon=A.icon, defstate=A.icon_state, defblend=A.blend_mode)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "nothing") // Final flattened icon
if(!A)
return flat
if(A.alpha <= 0)
return flat
var/noIcon = FALSE
// Creates a single icon from a given /atom or /image. Only the first argument is required.
/proc/getFlatIcon(image/A, defdir=A.dir, deficon=A.icon, defstate=A.icon_state, defblend=A.blend_mode)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "nothing") // Final flattened icon
if(!A)
return flat
if(A.alpha <= 0)
return flat
var/noIcon = FALSE
var/curicon
if(A.icon)
curicon = A.icon
var/curicon
if(A.icon)
curicon = A.icon
else
curicon = deficon
if(!curicon)
noIcon = TRUE // Do not render this object.
var/curstate
if(A.icon_state)
curstate = A.icon_state
else
curstate = defstate
if(!noIcon && !(curstate in icon_states(curicon)))
if("" in icon_states(curicon))
curstate = ""
else
curicon = deficon
if(!curicon)
noIcon = TRUE // Do not render this object.
var/curstate
if(A.icon_state)
curstate = A.icon_state
else
curstate = defstate
var/curdir
if(A.dir != 2)
curdir = A.dir
else
curdir = defdir
if(!noIcon && !(curstate in icon_states(curicon)))
if("" in icon_states(curicon))
curstate = ""
else
noIcon = TRUE // Do not render this object.
var/curblend
if(A.blend_mode == BLEND_DEFAULT)
curblend = defblend
else
curblend = A.blend_mode
var/curdir
if(A.dir != 2)
curdir = A.dir
else
curdir = defdir
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
var/curblend
if(A.blend_mode == BLEND_DEFAULT)
curblend = defblend
else
curblend = A.blend_mode
// Loop through the underlays, then overlays, sorting them into the layers list
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
if(!current) continue
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
currentLayer = A.layer+(1000+currentLayer)/1000
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
// Loop through the underlays, then overlays, sorting them into the layers list
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
if(!current) continue
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
currentLayer = A.layer+(1000+currentLayer)/1000
// Sort add into layers list
for(cmpIndex=1,cmpIndex<=layers.len,cmpIndex++)
compare = layers[cmpIndex]
if(currentLayer < layers[compare]) // Associated value is the calculated layer
layers.Insert(cmpIndex,current)
layers[current] = currentLayer
break
if(cmpIndex>layers.len) // Reached end of list without inserting
layers[current]=currentLayer // Place at end
curIndex++
if(curIndex>process.len)
if(pSet == 0) // Switch to overlays
curIndex = 1
pSet = 1
process = A.overlays
else // All done
// Sort add into layers list
for(cmpIndex=1,cmpIndex<=layers.len,cmpIndex++)
compare = layers[cmpIndex]
if(currentLayer < layers[compare]) // Associated value is the calculated layer
layers.Insert(cmpIndex,current)
layers[current] = currentLayer
break
if(cmpIndex>layers.len) // Reached end of list without inserting
layers[current]=currentLayer // Place at end
var/icon/add // Icon of overlay being added
curIndex++
// Current dimensions of flattened icon
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
// Dimensions of overlay being added
var/{addX1;addX2;addY1;addY2}
if(curIndex>process.len)
if(pSet == 0) // Switch to overlays
curIndex = 1
pSet = 1
process = A.overlays
else // All done
break
for(var/I in layers)
var/icon/add // Icon of overlay being added
if(I:alpha == 0)
continue
// Current dimensions of flattened icon
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
// Dimensions of overlay being added
var/{addX1;addX2;addY1;addY2}
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I:icon, I:icon_state, I:dir)
else // 'I' is an appearance object.
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
for(var/I in layers)
// Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, I:pixel_x+1)
addX2 = max(flatX2, I:pixel_x+add.Width())
addY1 = min(flatY1, I:pixel_y+1)
addY2 = max(flatY2, I:pixel_y+add.Height())
if(I:alpha == 0)
continue
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
// Resize the flattened icon so the new icon fits
flat.Crop(addX1-flatX1+1, addY1-flatY1+1, addX2-flatX1+1, addY2-flatY1+1)
flatX1=addX1;flatX2=addX2
flatY1=addY1;flatY2=addY2
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I:icon, I:icon_state, I:dir)
else // 'I' is an appearance object.
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
// Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, I:pixel_x+1)
addX2 = max(flatX2, I:pixel_x+add.Width())
addY1 = min(flatY1, I:pixel_y+1)
addY2 = max(flatY2, I:pixel_y+add.Height())
if(A.color)
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
// Resize the flattened icon so the new icon fits
flat.Crop(addX1-flatX1+1, addY1-flatY1+1, addX2-flatX1+1, addY2-flatY1+1)
flatX1=addX1;flatX2=addX2
flatY1=addY1;flatY2=addY2
return icon(flat, "", SOUTH)
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
for(var/I in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
if(I:layer>A.layer) continue//If layer is greater than what we need, skip it.
var/icon/image_overlay = new(I:icon,I:icon_state)//Blend only works with icon objects.
//Also, icons cannot directly set icon_state. Slower than changing variables but whatever.
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
return alpha_mask//And now return the mask.
if(A.color)
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
return icon(flat, "", SOUTH)
/proc/getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
for(var/I in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
if(I:layer>A.layer) continue//If layer is greater than what we need, skip it.
var/icon/image_overlay = new(I:icon,I:icon_state)//Blend only works with icon objects.
//Also, icons cannot directly set icon_state. Slower than changing variables but whatever.
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
return alpha_mask//And now return the mask.
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
@@ -797,4 +797,4 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu
for(var/O in A.overlays)
var/image/I = O
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
return composite
+26 -6
View File
@@ -31,7 +31,7 @@
return "[output][and_text][input[index]]"
//Returns list element or null. Should prevent "index out of bounds" error.
proc/listgetindex(list/L, index)
/proc/listgetindex(list/L, index)
if(istype(L))
if(isnum(index))
if(IsInRange(index,1,L.len))
@@ -40,18 +40,18 @@ proc/listgetindex(list/L, index)
return L[index]
return
proc/islist(list/L)
/proc/islist(list/L)
if(istype(L))
return 1
return 0
//Return either pick(list) or null if list is not of type /list or is empty
proc/safepick(list/L)
/proc/safepick(list/L)
if(istype(L) && L.len)
return pick(L)
//Checks if the list is empty
proc/isemptylist(list/L)
/proc/isemptylist(list/L)
if(!L.len)
return 1
return 0
@@ -64,13 +64,13 @@ proc/isemptylist(list/L)
return 0
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
proc/clearlist(list/list)
/proc/clearlist(list/list)
if(istype(list))
list.len = 0
return
//Removes any null entries from the list
proc/listclearnulls(list/list)
/proc/listclearnulls(list/list)
if(istype(list))
while(null in list)
list -= null
@@ -144,6 +144,26 @@ proc/listclearnulls(list/list)
pos--
L.Insert(pos+1, thing)
// Returns the next item in a list
/proc/next_list_item(var/item, var/list/L)
var/i
i = L.Find(item)
if(i == L.len)
i = 1
else
i++
return L[i]
// Returns the previous item in a list
/proc/previous_list_item(var/item, var/list/L)
var/i
i = L.Find(item)
if(i == 1)
i = L.len
else
i--
return L[i]
/*
* Sorting
*/
+6 -6
View File
@@ -18,19 +18,19 @@
if(FEMALE) return pick(underwear_f)
else return pick(underwear_all)
proc/random_hair_style(gender)
/proc/random_hair_style(gender)
switch(gender)
if(MALE) return pick(hair_styles_male_list)
if(FEMALE) return pick(hair_styles_female_list)
else return pick(hair_styles_list)
proc/random_facial_hair_style(gender)
/proc/random_facial_hair_style(gender)
switch(gender)
if(MALE) return pick(facial_hair_styles_male_list)
if(FEMALE) return pick(facial_hair_styles_female_list)
else return pick(facial_hair_styles_list)
proc/random_name(gender, attempts_to_find_unique_name=10)
/proc/random_name(gender, attempts_to_find_unique_name=10)
for(var/i=1, i<=attempts_to_find_unique_name, i++)
if(gender==FEMALE) . = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else . = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
@@ -38,7 +38,7 @@ proc/random_name(gender, attempts_to_find_unique_name=10)
if(i != attempts_to_find_unique_name && !findname(.))
break
proc/random_skin_tone()
/proc/random_skin_tone()
return pick(skin_tones)
var/list/skin_tones = list(
@@ -59,7 +59,7 @@ var/list/skin_tones = list(
var/global/list/species_list[0]
var/global/list/roundstart_species[0]
proc/age2agedescription(age)
/proc/age2agedescription(age)
switch(age)
if(0 to 1) return "infant"
if(1 to 3) return "toddler"
@@ -82,7 +82,7 @@ Proc for attack log creation, because really why not
6 is additional information, anything that needs to be added
*/
proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
/proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
if(user && ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(target && ismob(target))
+5 -15
View File
@@ -48,12 +48,13 @@ var/religion_name = null
return station_name
if(events)
var/short_name = pick("Station", "Fortress", "Frontier", "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp")
station_name = new_station_name()
if (config && config.station_name)
station_name = config.station_name
else
station_name = new_station_name()
if (config && config.server_name)
world.name = "[config.server_name]: [short_name]"
world.name = "[config.server_name][config.server_name==station_name ? "" : ": [station_name]"]"
else
world.name = station_name
@@ -108,17 +109,6 @@ var/religion_name = null
new_station_name += pick("13","XIII","Thirteen")
return new_station_name
/proc/world_name(var/name)
station_name = name
if (config && config.server_name)
world.name = "[config.server_name]: [name]"
else
world.name = name
return name
var/syndicate_name = null
/proc/syndicate_name()
if (syndicate_name)
+2 -2
View File
@@ -16,7 +16,7 @@
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(var/t as text)
var/sqltext = dbcon.Quote(t);
return copytext(sqltext, 2, lentext(sqltext)-1);//Quote() adds quotes around input, we already do that
return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that
/*
* Text sanitization
@@ -359,4 +359,4 @@ var/list/binary = list("0","1")
for(var/i=1, i<=len, i++)
temp = findtextEx(haystack, ascii2text(text2ascii(needles,i)), start, end) //Note: ascii2text(text2ascii) is faster than copytext()
if(temp) end = temp
return end
return end
+4 -4
View File
@@ -1,11 +1,11 @@
//Returns the world time in english
proc/worldtime2text()
/proc/worldtime2text()
return gameTimestamp("hh:mm")
proc/time_stamp(var/format = "hh:mm:ss")
/proc/time_stamp(var/format = "hh:mm:ss")
return time2text(world.timeofday, format)
proc/gameTimestamp(var/format = "hh:mm:ss") // Get the game time in text
/proc/gameTimestamp(var/format = "hh:mm:ss") // Get the game time in text
return time2text(world.time - timezoneOffset + 432000, format)
/* Preserving this so future generations can see how fucking retarded some people are
@@ -23,7 +23,7 @@ proc/time_stamp()
*/
/* Returns 1 if it is the selected month and day */
proc/isDay(var/month, var/day)
/proc/isDay(var/month, var/day)
if(isnum(month) && isnum(day))
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
+26 -22
View File
@@ -283,6 +283,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Turns 1479 into 147.9
/proc/format_frequency(var/f)
f = text2num(f)
return "[round(f / 10)].[f % 10]"
@@ -418,13 +419,16 @@ Turf and target are seperate in case you want to teleport some distance from a t
. += R
//Returns a list of AI's
/proc/active_ais()
/proc/active_ais(var/check_mind=0)
. = list()
for(var/mob/living/silicon/ai/A in living_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
continue
if(check_mind)
if(!A.mind)
continue
. += A
return .
@@ -433,7 +437,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
for(var/mob/living/silicon/ai/A in active)
if(!selected || (selected.connected_robots > A.connected_robots))
if(!selected || (selected.connected_robots.len > A.connected_robots.len))
selected = A
return selected
@@ -645,12 +649,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
proc/arctan(x)
/proc/arctan(x)
var/y=arcsin(x/sqrt(1+x*x))
return y
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
//This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough.
var/atom/movable/overlay/animation = new(location)
@@ -668,7 +672,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
qdel(animation)
atom/proc/GetAllContents()
/atom/proc/GetAllContents()
var/list/processing_list = list(src)
var/list/assembled = list()
@@ -685,7 +689,7 @@ atom/proc/GetAllContents()
return assembled
atom/proc/GetTypeInAllContents(typepath)
/atom/proc/GetTypeInAllContents(typepath)
var/list/processing_list = list(src)
var/list/processed = list()
@@ -1012,7 +1016,7 @@ atom/proc/GetTypeInAllContents(typepath)
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(!original)
return null
@@ -1160,16 +1164,16 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
proc/get_cardinal_dir(atom/A, atom/B)
/proc/get_cardinal_dir(atom/A, atom/B)
var/dx = abs(B.x - A.x)
var/dy = abs(B.y - A.y)
return get_dir(A, B) & (rand() * (dx+dy) < dy ? 3 : 12)
//chances are 1:value. anyprob(1) will always return true
proc/anyprob(value)
/proc/anyprob(value)
return (rand(1,value)==value)
proc/view_or_range(distance = world.view , center = usr , type)
/proc/view_or_range(distance = world.view , center = usr , type)
switch(type)
if("view")
. = view(distance,center)
@@ -1177,7 +1181,7 @@ proc/view_or_range(distance = world.view , center = usr , type)
. = range(distance,center)
return
proc/oview_or_orange(distance = world.view , center = usr , type)
/proc/oview_or_orange(distance = world.view , center = usr , type)
switch(type)
if("view")
. = oview(distance,center)
@@ -1225,7 +1229,7 @@ var/global/list/common_tools = list(
return 1
return 0
proc/is_hot(obj/item/W as obj)
/proc/is_hot(obj/item/W as obj)
switch(W.type)
if(/obj/item/weapon/weldingtool)
var/obj/item/weapon/weldingtool/WT = W
@@ -1331,11 +1335,11 @@ var/list/WALLITEMS = list(
/obj/proc/atmosanalyzer_scan(var/datum/gas_mixture/air_contents, mob/user, var/obj/target = src)
var/obj/icon = target
user.visible_message("\red [user] has used the analyzer on \icon[icon] [target].</span>")
user.visible_message("<span class='danger'>[user] has used the analyzer on \icon[icon] [target].</span>")
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon] [target]."
user << "<span class='notice'>Results of analysis of \icon[icon] [target].</span>"
if(total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
@@ -1344,16 +1348,16 @@ var/list/WALLITEMS = list(
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
user << "<span class='notice'>Nitrogen: [round(n2_concentration*100)]</span>%"
user << "<span class='notice'>Oxygen: [round(o2_concentration*100)]%</span>"
user << "<span class='notice'>CO2: [round(co2_concentration*100)]%</span>"
user << "<span class='notice'>Plasma: [round(plasma_concentration*100)]%</span>"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
user << "<span class='danger'>Unknown: [round(unknown_concentration*100)]%</span>"
user << "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)]&deg;C</span>"
else
user << "\blue [target] is empty!"
user << "<span class='notice'>[target] is empty!</span>"
return
/proc/check_target_facings(mob/living/initator, mob/living/target)
+1 -1
View File
@@ -3,4 +3,4 @@ var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
var/wavesecret = 0 // meteor mode, delays wave progression, terrible name
var/datum/station_state/start_state = null // Used in blob mode
var/datum/station_state/start_state = null // Used in round-end report
+1
View File
@@ -38,6 +38,7 @@ var/list/prisonsecuritywarp = list() //prison security goes to these
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
var/list/secequipment = list()
var/list/deathsquadspawn = list()
var/list/global_activeturfs
//away missions
+3
View File
@@ -138,10 +138,12 @@
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
toggle_breaker()
add_fingerprint(usr)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
src.enabled = !src.enabled
src.updateTurrets()
add_fingerprint(usr)
/atom/proc/AIAltClick(var/mob/living/silicon/ai/user)
@@ -162,6 +164,7 @@
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
src.lethal = !src.lethal
src.updateTurrets()
add_fingerprint(usr)
//
// Override TurfAdjacent for AltClicking
+1 -1
View File
@@ -285,7 +285,7 @@
nutrition = max(nutrition - rand(1,5),0)
handle_regular_hud_updates()
else
src << "\red You're out of energy! You need food!"
src << "<span class='danger'>You're out of energy! You need food!</span>"
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
+4
View File
@@ -46,6 +46,10 @@
RestrainedClickOn(A)
return
*/
if(aicamera.in_camera_mode) //Cyborg picture taking
aicamera.camera_mode_off()
aicamera.captureimage(A, usr)
return
var/obj/item/W = get_active_hand()
+3
View File
@@ -50,6 +50,9 @@
#define ui_borg_module "CENTER+1:16,SOUTH:5"
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
#define ui_monkey_mask "CENTER-3:14,SOUTH:5" //monkey
#define ui_monkey_back "CENTER-2:15,SOUTH:5" //monkey
+18
View File
@@ -45,6 +45,24 @@
//End of module select
//Photography stuff
using = new /obj/screen()
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "take_picture"
using.name = "Take Image"
using.screen_loc = ui_borg_camera
using.layer = 20
adding += using
using = new /obj/screen()
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "view_images"
using.name = "View Images"
using.screen_loc = ui_borg_album
using.layer = 20
adding += using
//Intent
using = new /obj/screen()
using.name = "act_intent"
+29 -4
View File
@@ -247,8 +247,28 @@
C.internals.icon_state = "internal1"
else
C << "<span class='notice'>You don't have an oxygen tank.</span>"
if("act_intent")
usr.a_intent_change("right")
if(ishuman(usr) && (usr.client.prefs.toggles & INTENT_STYLE))
var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"])
if(_x<=16 && _y<=16)
usr.a_intent_change("harm")
else if(_x<=16 && _y>=17)
usr.a_intent_change("help")
else if(_x>=17 && _y<=16)
usr.a_intent_change("grab")
else if(_x>=17 && _y>=17)
usr.a_intent_change("disarm")
else
usr.a_intent_change("right")
if("pull")
usr.stop_pulling()
if("throw/catch")
@@ -314,7 +334,7 @@
if("Crew Monitorting")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
crewmonitor(AI)
crewmonitor(AI,AI)
if("Show Crew Manifest")
if(isAI(usr))
@@ -355,11 +375,17 @@
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aicamera.toggle_camera_mode()
else if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.aicamera.toggle_camera_mode()
if("View Images")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aicamera.viewpictures()
else if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.aicamera.viewpictures()
else
return 0
@@ -392,5 +418,4 @@
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand(0)
usr.update_inv_r_hand(0)
return 1
return 1
+2 -2
View File
@@ -6,9 +6,9 @@
if(!client) return
client.inquisitive_ghost = !client.inquisitive_ghost
if(client.inquisitive_ghost)
src << "\blue You will now examine everything you click on."
src << "<span class='notice'>You will now examine everything you click on.</span>"
else
src << "\blue You will no longer examine things you click on."
src << "<span class='notice'>You will no longer examine things you click on.</span>"
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
if(client.buildmode)
+1 -1
View File
@@ -84,7 +84,7 @@
ML.contract_disease(D,1,0)
else
for(var/mob/O in viewers(ML, null))
O.show_message("\red <B>[src] has attempted to bite [ML]!</B>", 1)
O.show_message("<span class='userdanger'>[src] has attempted to bite [ML]!</span>", 1)
/*
Aliens
+95 -95
View File
@@ -75,116 +75,116 @@ var/const/tk_maxrange = 15
var/mob/living/host = null
dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
/obj/item/tk_grab/dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
/obj/item/tk_grab/equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
qdel(src)
return
/obj/item/tk_grab/attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
/obj/item/tk_grab/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
if(!(TK in host.mutations))
qdel(src)
return
attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
if(!(TK in host.mutations))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
var/d = get_dist(user, target)
if(focus)
d = max(d,get_dist(user,focus)) // whichever is further
if(d > tk_maxrange)
user << "<span class ='warning'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
return
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
else
apply_focus_overlay()
focus.throw_at(target, 10, 1)
last_throw = world.time
if(isobj(target) && !isturf(target.loc))
return
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
var/d = get_dist(user, target)
if(focus)
d = max(d,get_dist(user,focus)) // whichever is further
if(d > tk_maxrange)
user << "<span class ='warning'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
return
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
return
focus = target
update_icon()
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
else
apply_focus_overlay()
focus.throw_at(target, 10, 1)
last_throw = world.time
return
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
return
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
return
proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
O.delete()
return
focus = target
update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
apply_focus_overlay()
return
/obj/item/tk_grab/proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
O.delete()
return
/obj/item/tk_grab/update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
/obj/item/tk_grab/proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
+108 -108
View File
@@ -33,7 +33,7 @@
#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha6.dmi' //Icon used for lighting shading effects
datum/light_source
/datum/light_source
var/atom/owner
var/changed = 1
var/list/effect = list()
@@ -41,76 +41,76 @@ datum/light_source
var/__y = 0 //y coordinate at last update
New(atom/A)
if(!istype(A))
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
..()
owner = A
/datum/light_source/New(atom/A)
if(!istype(A))
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
..()
owner = A
__x = owner.x
__y = owner.y
// the lighting object maintains a list of all light sources
lighting_controller.lights += src
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
/datum/light_source/proc/check()
if(!owner)
remove_effect()
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
// check to see if we've moved since last update
if(owner.x != __x || owner.y != __y)
__x = owner.x
__y = owner.y
// the lighting object maintains a list of all light sources
lighting_controller.lights += src
changed = 1
if(changed)
changed = 0
remove_effect()
return add_effect()
return 0
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
proc/check()
if(!owner)
remove_effect()
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
/datum/light_source/proc/remove_effect()
// before we apply the effect we remove the light's current effect.
for(var/turf/T in effect) // negate the effect of this light source
T.update_lumcount(-effect[T])
effect.Cut() // clear the effect list
// check to see if we've moved since last update
if(owner.x != __x || owner.y != __y)
__x = owner.x
__y = owner.y
changed = 1
/datum/light_source/proc/add_effect()
// only do this if the light is turned on and is on the map
if(owner.loc && owner.luminosity > 0)
effect = list()
for(var/turf/T in view(owner.get_light_range(),owner))
var/delta_lumen = lum(T)
if(delta_lumen > 0)
effect[T] = delta_lumen
T.update_lumcount(delta_lumen)
if(changed)
changed = 0
remove_effect()
return add_effect()
return 0
else
owner.light = null
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
//longer referenced by the queue
proc/remove_effect()
// before we apply the effect we remove the light's current effect.
for(var/turf/T in effect) // negate the effect of this light source
T.update_lumcount(-effect[T])
effect.Cut() // clear the effect list
proc/add_effect()
// only do this if the light is turned on and is on the map
if(owner.loc && owner.luminosity > 0)
effect = list()
for(var/turf/T in view(owner.get_light_range(),owner))
var/delta_lumen = lum(T)
if(delta_lumen > 0)
effect[T] = delta_lumen
T.update_lumcount(delta_lumen)
return 0
else
owner.light = null
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
//longer referenced by the queue
proc/lum(turf/A)
if (owner.trueLuminosity < 1)
return 0
var/dist
if(!A)
dist = 0
else
/datum/light_source/proc/lum(turf/A)
if (owner.trueLuminosity < 1)
return 0
var/dist
if(!A)
dist = 0
else
#ifdef LIGHTING_CIRCULAR
dist = cheap_hypotenuse(A.x, A.y, __x, __y)
dist = cheap_hypotenuse(A.x, A.y, __x, __y)
#else
dist = max(abs(A.x - __x), abs(A.y - __y))
dist = max(abs(A.x - __x), abs(A.y - __y))
#endif
if (owner.trueLuminosity > 100) // This will never happen... right?
return sqrt(owner.trueLuminosity) - dist
else
return sqrtTable[owner.trueLuminosity] - dist
if (owner.trueLuminosity > 100) // This will never happen... right?
return sqrt(owner.trueLuminosity) - dist
else
return sqrtTable[owner.trueLuminosity] - dist
atom
/atom
var/datum/light_source/light
var/trueLuminosity = 0 // Typically 'luminosity' squared. The builtin luminosity must remain linear.
// We may read it, but NEVER set it directly.
@@ -118,7 +118,7 @@ atom
//Turfs with opacity when they are constructed will trigger nearby lights to update
//Turfs and atoms with luminosity when they are constructed will create a light_source automatically
turf/New()
/turf/New()
..()
if(luminosity)
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
@@ -127,7 +127,7 @@ turf/New()
//Movable atoms with opacity when they are constructed will trigger nearby lights to update
//Movable atoms with luminosity when they are constructed will create a light_source automatically
atom/movable/New()
/atom/movable/New()
..()
if(opacity)
if(isturf(loc))
@@ -139,7 +139,7 @@ atom/movable/New()
light = new(src)
//Objects with opacity will trigger nearby lights to update at next lighting process.
atom/movable/Destroy()
/atom/movable/Destroy()
if(opacity)
if(isturf(loc))
if(loc:lighting_lumcount > 1)
@@ -151,7 +151,7 @@ atom/movable/Destroy()
//If we are setting luminosity to 0 the light will be cleaned up by the controller and garbage collected once all its
//queues are complete.
//if we have a light already it is merely updated, rather than making a new one.
atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
/atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
if(new_luminosity < 0)
new_luminosity = 0
if(!trueLum)
@@ -170,19 +170,19 @@ atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
else
luminosity = sqrt(trueLuminosity)
atom/proc/AddLuminosity(delta_luminosity)
/atom/proc/AddLuminosity(delta_luminosity)
if(delta_luminosity > 0)
SetLuminosity(trueLuminosity + delta_luminosity*delta_luminosity, TRUE)
else if(delta_luminosity < 0)
SetLuminosity(trueLuminosity - delta_luminosity*delta_luminosity, TRUE)
area/SetLuminosity(new_luminosity) //we don't want dynamic lighting for areas
/area/SetLuminosity(new_luminosity) //we don't want dynamic lighting for areas
luminosity = !!new_luminosity
trueLuminosity = luminosity
//change our opacity (defaults to toggle), and then update all lights that affect us.
atom/proc/SetOpacity(new_opacity)
/atom/proc/SetOpacity(new_opacity)
if(new_opacity == null)
new_opacity = !opacity //default = toggle opacity
else if(opacity == new_opacity)
@@ -190,7 +190,7 @@ atom/proc/SetOpacity(new_opacity)
opacity = new_opacity //update opacity, the below procs now call light updates.
return 1
turf/SetOpacity(new_opacity)
/turf/SetOpacity(new_opacity)
if(..()==1) //only bother if opacity changed
if(lighting_lumcount) //only bother with an update if our turf is currently affected by a light
UpdateAffectingLights()
@@ -203,24 +203,24 @@ turf/SetOpacity(new_opacity)
UpdateAffectingLights()
turf
/turf
var/lighting_lumcount = 0
var/lighting_changed = 0
turf/space
/turf/space
lighting_lumcount = 4 //starlight
turf/proc/update_lumcount(amount)
/turf/proc/update_lumcount(amount)
lighting_lumcount += amount
if(!lighting_changed)
lighting_controller.changed_turfs += src
lighting_changed = 1
turf/proc/lighting_tag(var/level)
/turf/proc/lighting_tag(var/level)
var/area/A = loc
return A.tagbase + "sd_L[level]"
turf/proc/build_lighting_area(var/tag, var/level)
/turf/proc/build_lighting_area(var/tag, var/level)
var/area/Area = loc
var/area/A = new Area.type() // create area if it wasn't found
// replicate vars
@@ -238,7 +238,7 @@ turf/proc/build_lighting_area(var/tag, var/level)
Area.related += A
return A
turf/proc/shift_to_subarea()
/turf/proc/shift_to_subarea()
lighting_changed = 0
var/area/Area = loc
@@ -257,54 +257,54 @@ turf/proc/shift_to_subarea()
// Dedicated lighting sublevel for space turfs
// helps us depower things in space, remove space fire alarms,
// and evens out space lighting
turf/space/lighting_tag(var/level)
/turf/space/lighting_tag(var/level)
var/area/A = loc
return A.tagbase + "sd_L_space"
turf/space/build_lighting_area(var/tag,var/level)
/turf/space/build_lighting_area(var/tag,var/level)
var/area/A = ..(tag,4)
A.lighting_space = 1
A.SetLightLevel(4)
A.icon_state = null
return A
area
/area
var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
var/image/lighting_overlay //tracks the darkness image of the area for easy removal
var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
var/lighting_space = 0 // true for space-only lighting subareas
var/tagbase
proc/SetLightLevel(light)
if(!src) return
if(light <= 0)
light = 0
luminosity = 0
else
if(light > lighting_controller.lighting_states)
light = lighting_controller.lighting_states
luminosity = 1
/area/proc/SetLightLevel(light)
if(!src) return
if(light <= 0)
light = 0
luminosity = 0
else
if(light > lighting_controller.lighting_states)
light = lighting_controller.lighting_states
luminosity = 1
if(lighting_overlay)
overlays -= lighting_overlay
lighting_overlay.icon_state = "[light]"
else
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
if(lighting_overlay)
overlays -= lighting_overlay
lighting_overlay.icon_state = "[light]"
else
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
overlays += lighting_overlay
overlays += lighting_overlay
proc/SetDynamicLighting()
/area/proc/SetDynamicLighting()
src.lighting_use_dynamic = 1
for(var/turf/T in src.contents)
T.update_lumcount(0)
src.lighting_use_dynamic = 1
for(var/turf/T in src.contents)
T.update_lumcount(0)
proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
tagbase = "[type]"
if(!tag) tag = tagbase
if(!lighting_use_dynamic)
if(!lighting_subarea) // see if this is a lighting subarea already
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
/area/proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
tagbase = "[type]"
if(!tag) tag = tagbase
if(!lighting_use_dynamic)
if(!lighting_subarea) // see if this is a lighting subarea already
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
#undef LIGHTING_LAYER
#undef LIGHTING_CIRCULAR
@@ -316,24 +316,24 @@ area
//set the changed status of all lights which could have possibly lit this atom.
//We don't need to worry about lights which lit us but moved away, since they will have change status set already
//This proc can cause lots of lights to be updated. :(
atom/proc/UpdateAffectingLights()
/atom/proc/UpdateAffectingLights()
for(var/atom/A in oview(LIGHTING_MAX_LUMINOSITY_STATIC-1,src))
if(A.light)
A.light.changed = 1 //force it to update at next process()
//caps luminosity effects max-range based on what type the light's owner is.
atom/proc/get_light_range()
/atom/proc/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
atom/movable/get_light_range()
/atom/movable/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_MOBILE)
obj/machinery/light/get_light_range()
/obj/machinery/light/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
turf/get_light_range()
/turf/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_TURF)
#undef LIGHTING_MAX_LUMINOSITY_STATIC
#undef LIGHTING_MAX_LUMINOSITY_MOBILE
#undef LIGHTING_MAX_LUMINOSITY_TURF
#undef LIGHTING_MAX_LUMINOSITY_TURF
+4 -1
View File
@@ -6,7 +6,8 @@
#define EVERYONE_HAS_MAINT_ACCESS 4
/datum/configuration
var/server_name = null // server name (for world name / status)
var/server_name = null // server name (the name of the game window)
var/station_name = null // station name (the name of the station in-game)
var/server_suffix = 0 // generate numeric suffix based on server port
var/lobby_countdown = 120 // In between round countdown.
@@ -234,6 +235,8 @@
config.respawn = 0
if("servername")
config.server_name = value
if("stationname")
config.station_name = value
if("serversuffix")
config.server_suffix = 1
if("hostedby")
+5 -5
View File
@@ -1,6 +1,6 @@
var/datum/controller/lighting/lighting_controller = new ()
datum/controller/lighting
/datum/controller/lighting
var/processing = 0
var/processing_interval = 5 //setting this too low will probably kill the server. Don't be silly with it!
var/process_cost = 0
@@ -17,7 +17,7 @@ datum/controller/lighting
var/list/changed_turfs = list()
var/changed_turfs_workload_max = 0
datum/controller/lighting/New()
/datum/controller/lighting/New()
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
if(lighting_controller != src)
if(istype(lighting_controller,/datum/controller/lighting))
@@ -31,7 +31,7 @@ datum/controller/lighting/New()
//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
//than deleting them). Processing interval should be roughly half a second for best results.
//By using queues we are ensuring we don't perform more updates than are necessary
datum/controller/lighting/proc/process()
/datum/controller/lighting/proc/process()
processing = 1
spawn(0)
set background = BACKGROUND_ENABLED
@@ -65,7 +65,7 @@ datum/controller/lighting/proc/process()
//Does not loop. Should be run prior to process() being called for the first time.
//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
//z-levels with the z_level argument
datum/controller/lighting/proc/Initialize(var/z_level)
/datum/controller/lighting/proc/Initialize(var/z_level)
processing = 0
spawn(-1)
set background = BACKGROUND_ENABLED
@@ -95,7 +95,7 @@ datum/controller/lighting/proc/Initialize(var/z_level)
//Used to strip valid information from an existing controller and transfer it to a replacement
//It works by using spawn(-1) to transfer the data, if there is a runtime the data does not get transfered but the loop
//does not crash
datum/controller/lighting/proc/Recover()
/datum/controller/lighting/proc/Recover()
if(!istype(lighting_controller.changed_turfs,/list))
lighting_controller.changed_turfs = list()
if(!istype(lighting_controller.lights,/list))
+20 -20
View File
@@ -11,7 +11,7 @@ var/global/last_tick_duration = 0
var/global/air_processing_killed = 0
var/global/pipe_processing_killed = 0
datum/controller/game_controller
/datum/controller/game_controller
var/processing = 0
var/breather_ticks = 2 //a somewhat crude attempt to iron over the 'bumps' caused by high-cpu use by letting the MC have a breather for this many ticks after every loop
var/minimum_ticks = 20 //The minimum length of time between MC ticks
@@ -37,7 +37,7 @@ datum/controller/game_controller
var/last_thing_processed
datum/controller/game_controller/New()
/datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
if(master_controller != src)
if(istype(master_controller))
@@ -61,7 +61,7 @@ datum/controller/game_controller/New()
job_master = new /datum/controller/occupations()
job_master.SetupOccupations()
job_master.LoadJobs("config/jobs.txt")
world << "\red \b Job setup complete"
world << "<span class='userdanger'>Job setup complete</span>"
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
@@ -69,7 +69,7 @@ datum/controller/game_controller/New()
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(!supply_shuttle) supply_shuttle = new /datum/controller/supply_shuttle()
datum/controller/game_controller/proc/setup()
/datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
setup_objects()
@@ -80,18 +80,18 @@ datum/controller/game_controller/proc/setup()
if(ticker)
ticker.pregame()
datum/controller/game_controller/proc/setup_objects()
world << "\red \b Initializing objects..."
/datum/controller/game_controller/proc/setup_objects()
world << "<span class='userdanger'>Initializing objects...</span>"
sleep(-1)
for(var/atom/movable/object in world)
object.initialize()
world << "\red \b Initializing pipe networks..."
world << "<span class='userdanger'>Initializing pipe networks...</span>"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
world << "\red \b Initializing atmos machinery..."
world << "<span class='userdanger'>Initializing atmos machinery...</span>"
sleep(-1)
for(var/obj/machinery/atmospherics/unary/U in world)
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
@@ -101,16 +101,16 @@ datum/controller/game_controller/proc/setup_objects()
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
world << "\red \b Making a mess..."
world << "<span class='userdanger'>Making a mess...</span>"
sleep(-1)
for(var/turf/simulated/floor/F in world)
F.MakeDirty()
world << "\red \b Initializations complete."
world << "<span class='userdanger'>Initializations complete.</span>"
sleep(-1)
datum/controller/game_controller/proc/process()
/datum/controller/game_controller/proc/process()
processing = 1
spawn(0)
set background = BACKGROUND_ENABLED
@@ -223,7 +223,7 @@ datum/controller/game_controller/proc/process()
sleep(10)
/*
datum/controller/game_controller/proc/process_liquid()
/datum/controller/game_controller/proc/process_liquid()
last_thing_processed = /datum/puddle
var/i = 1
while(i<=puddles.len)
@@ -235,7 +235,7 @@ datum/controller/game_controller/proc/process_liquid()
puddles.Cut(i,i+1)
*/
datum/controller/game_controller/proc/process_mobs()
/datum/controller/game_controller/proc/process_mobs()
var/i = 1
while(i<=mob_list.len)
var/mob/M = mob_list[i]
@@ -246,7 +246,7 @@ datum/controller/game_controller/proc/process_mobs()
continue
mob_list.Cut(i,i+1)
datum/controller/game_controller/proc/process_diseases()
/datum/controller/game_controller/proc/process_diseases()
var/i = 1
while(i<=active_diseases.len)
var/datum/disease/Disease = active_diseases[i]
@@ -257,7 +257,7 @@ datum/controller/game_controller/proc/process_diseases()
continue
active_diseases.Cut(i,i+1)
datum/controller/game_controller/proc/process_machines()
/datum/controller/game_controller/proc/process_machines()
var/i = 1
while(i<=machines.len)
var/obj/machinery/Machine = machines[i]
@@ -271,7 +271,7 @@ datum/controller/game_controller/proc/process_machines()
continue
machines.Cut(i,i+1)
datum/controller/game_controller/proc/process_objects()
/datum/controller/game_controller/proc/process_objects()
var/i = 1
while(i<=processing_objects.len)
var/obj/Object = processing_objects[i]
@@ -282,7 +282,7 @@ datum/controller/game_controller/proc/process_objects()
continue
processing_objects.Cut(i,i+1)
datum/controller/game_controller/proc/process_pipenets()
/datum/controller/game_controller/proc/process_pipenets()
last_thing_processed = /datum/pipe_network
var/i = 1
while(i<=pipe_networks.len)
@@ -293,7 +293,7 @@ datum/controller/game_controller/proc/process_pipenets()
continue
pipe_networks.Cut(i,i+1)
datum/controller/game_controller/proc/process_powernets()
/datum/controller/game_controller/proc/process_powernets()
last_thing_processed = /datum/powernet
var/i = 1
while(i<=powernets.len)
@@ -304,7 +304,7 @@ datum/controller/game_controller/proc/process_powernets()
continue
powernets.Cut(i,i+1)
datum/controller/game_controller/proc/process_nano()
/datum/controller/game_controller/proc/process_nano()
var/i = 1
while(i<=nanomanager.processing_uis.len)
var/datum/nanoui/ui = nanomanager.processing_uis[i]
@@ -314,7 +314,7 @@ datum/controller/game_controller/proc/process_nano()
continue
nanomanager.processing_uis.Cut(i,i+1)
datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
/datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
var/msg = "## DEBUG: [time2text(world.timeofday)] MC restarted. Reports:\n"
for(var/varname in master_controller.vars)
switch(varname)
+157 -158
View File
@@ -18,7 +18,7 @@
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
/datum/shuttle_controller
var/location = UNDOCKED //
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13. Only important for recalling
@@ -37,150 +37,149 @@ datum/shuttle_controller
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
proc/incall(coeff = 1, var/signal_origin)
/datum/shuttle_controller/proc/incall(coeff = 1, var/signal_origin)
if(endtime)
if(direction == -1)
setdirection(1)
if(endtime)
if(direction == -1)
setdirection(1)
else
if(signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
else
if(signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
last_call_loc = null
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
if(always_fake_recall)
if ((seclevel2num(get_security_level()) == SEC_LEVEL_RED))
fake_recall = rand(SHUTTLEARRIVETIME / 4, SHUTTLEARRIVETIME - 100 / 2)
else
last_call_loc = null
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
if(always_fake_recall)
fake_recall = rand(SHUTTLEARRIVETIME / 2, SHUTTLEARRIVETIME - 100)
if ((seclevel2num(get_security_level()) == SEC_LEVEL_RED))
fake_recall = rand(SHUTTLEARRIVETIME / 4, SHUTTLEARRIVETIME - 100 / 2)
else
fake_recall = rand(SHUTTLEARRIVETIME / 2, SHUTTLEARRIVETIME - 100)
/datum/shuttle_controller/proc/recall(var/signal_origin)
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= SHUTTLEARRIVETIME)
online = 0
direction = 1
endtime = null
return
proc/recall(var/signal_origin)
recall_count ++
if(recall_count > 2 && signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
else
last_call_loc = null
if(recall_count == 2)
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace all future calls and recalls to their source. Tracing results can be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
else
priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
setdirection(-1)
online = 1
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
/datum/shuttle_controller/proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(timeleft > (MIDNIGHT_ROLLOVER/10)) // midnight rollover protection
endtime -= MIDNIGHT_ROLLOVER // subtract 24 hours from endtime
timeleft = round((endtime - world.timeofday)/10 ,1) // recalculate timeleft
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= SHUTTLEARRIVETIME)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
else
return SHUTTLEARRIVETIME
// sets the time left to a given delay (in seconds)
/datum/shuttle_controller/proc/settimeleft(var/delay)
endtime = world.timeofday + delay * 10
timelimit = delay
// sets the shuttle direction
// 1 = towards SS13, -1 = back to centcom
/datum/shuttle_controller/proc/setdirection(var/dirn)
if(direction == dirn)
return
direction = dirn
// if changing direction, flip the timeleft by SHUTTLEARRIVETIME
var/ticksleft = endtime - world.timeofday
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
return
//calls the shuttle if there's no live active AI or powered non broken comms console,
/datum/shuttle_controller/proc/autoshuttlecall()
var/callshuttle = 1
for(var/SC in shuttle_caller_list)
if(istype(SC,/mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = SC
if(AI.stat || !AI.client)
continue
if(istype(SC,/obj/machinery/computer/communications))
var/obj/machinery/computer/communications/C = SC
if(C.stat & BROKEN)
continue
var/turf/T = get_turf(SC)
if(T && T.z == 1)
callshuttle = 0 //if there's an alive AI or a powered non broken communication console on the station z level, we don't call the shuttle
break
if(callshuttle)
if(!online && direction == 1) //we don't call the shuttle if it's already coming
incall(SHUTTLEAUTOCALLTIMER) //X minutes! If they want to recall, they have X-(X-5) minutes to do so
log_game("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.", 1)
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
/datum/shuttle_controller/proc/move_shuttles()
var/datum/shuttle_manager/s
for(var/t in pods)
s = shuttles[t]
s.move_shuttle()
/datum/shuttle_controller/proc/process()
/datum/shuttle_controller/emergency_shuttle/process()
if(!online)
return
var/timeleft = timeleft()
if(location == UNDOCKED)
if(direction == -1)
if(timeleft >= timelimit) // Shuttle reaches CentCom after being recalled.
online = 0
direction = 1
endtime = null
return
recall_count ++
if(recall_count > 2 && signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
else
last_call_loc = null
if(recall_count == 2)
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace all future calls and recalls to their source. Tracing results can be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
else
priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
setdirection(-1)
online = 1
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(timeleft > (MIDNIGHT_ROLLOVER/10)) // midnight rollover protection
endtime -= MIDNIGHT_ROLLOVER // subtract 24 hours from endtime
timeleft = round((endtime - world.timeofday)/10 ,1) // recalculate timeleft
if(direction == 1)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
else
return SHUTTLEARRIVETIME
// sets the time left to a given delay (in seconds)
proc/settimeleft(var/delay)
endtime = world.timeofday + delay * 10
timelimit = delay
// sets the shuttle direction
// 1 = towards SS13, -1 = back to centcom
proc/setdirection(var/dirn)
if(direction == dirn)
return
direction = dirn
// if changing direction, flip the timeleft by SHUTTLEARRIVETIME
var/ticksleft = endtime - world.timeofday
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
return
//calls the shuttle if there's no live active AI or powered non broken comms console,
proc/autoshuttlecall()
var/callshuttle = 1
for(var/SC in shuttle_caller_list)
if(istype(SC,/mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = SC
if(AI.stat || !AI.client)
continue
if(istype(SC,/obj/machinery/computer/communications))
var/obj/machinery/computer/communications/C = SC
if(C.stat & BROKEN)
continue
var/turf/T = get_turf(SC)
if(T && T.z == 1)
callshuttle = 0 //if there's an alive AI or a powered non broken communication console on the station z level, we don't call the shuttle
break
if(callshuttle)
if(!online && direction == 1) //we don't call the shuttle if it's already coming
incall(SHUTTLEAUTOCALLTIMER) //X minutes! If they want to recall, they have X-(X-5) minutes to do so
log_game("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.", 1)
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
proc/move_shuttles()
var/datum/shuttle_manager/s
for(var/t in pods)
s = shuttles[t]
s.move_shuttle()
proc/process()
emergency_shuttle
process()
if(!online)
return
var/timeleft = timeleft()
if(location == UNDOCKED)
if(direction == -1)
if(timeleft >= timelimit) // Shuttle reaches CentCom after being recalled.
online = 0
direction = 1
endtime = null
return 0
else if(fake_recall && (timeleft <= fake_recall))
recall()
fake_recall = 0
return 0
else if(timeleft <= 0)
var/datum/shuttle_manager/s = shuttles["escape"]
s.move_shuttle()
location = DOCKED
settimeleft(SHUTTLELEAVETIME)
send2irc("Server", "The Emergency Shuttle has docked with the station.")
priority_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
else if(timeleft <= 0) //Nothing happens if time's not up and the ship's docked or later
if(location == DOCKED)
move_shuttles()
location = TRANSIT
settimeleft(SHUTTLETRANSITTIME)
priority_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
else if(location == TRANSIT)
move_shuttles()
//message_admins("Shuttles have attempted to move to Centcom")
location = ENDGAME
online = 0
endtime = null
return 1
return 0
else if(fake_recall && (timeleft <= fake_recall))
recall()
fake_recall = 0
return 0
else if(timeleft <= 0)
var/datum/shuttle_manager/s = shuttles["escape"]
s.move_shuttle()
location = DOCKED
settimeleft(SHUTTLELEAVETIME)
send2irc("Server", "The Emergency Shuttle has docked with the station.")
priority_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
else if(timeleft <= 0) //Nothing happens if time's not up and the ship's docked or later
if(location == DOCKED)
move_shuttles()
location = TRANSIT
settimeleft(SHUTTLETRANSITTIME)
priority_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
else if(location == TRANSIT)
move_shuttles()
//message_admins("Shuttles have attempted to move to Centcom")
location = ENDGAME
online = 0
endtime = null
return 1
return 0
/*
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
@@ -194,23 +193,23 @@ datum/shuttle_controller
var/direction = SOUTH
layer = 2 // TURF_LAYER
New()
..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
/obj/effect/bgstar/New()
..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
icon_state = "star"+starnum
icon_state = "star"+starnum
speed = rand(2, 5)
speed = rand(2, 5)
proc/startmove()
/obj/effect/bgstar/proc/startmove()
while(src)
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
qdel(src)
while(src)
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
qdel(src)
/obj/effect/starender
@@ -221,17 +220,17 @@ datum/shuttle_controller
var/spawndir = SOUTH
var/spawning = 0
West
spawndir = WEST
/obj/effect/starspawner/West
spawndir = WEST
proc/startspawn()
spawning = 1
while(spawning)
sleep(rand(2, 30))
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
S.direction = spawndir
spawn()
S.startmove()
/obj/effect/starspawner/proc/startspawn()
spawning = 1
while(spawning)
sleep(rand(2, 30))
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
S.direction = spawndir
spawn()
S.startmove()
/proc/push_mob_back(var/mob/living/L, var/dir)
+225 -225
View File
@@ -61,18 +61,18 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps."
New() //set the turf below the flaps to block air
var/turf/T = get_turf(loc)
if(T)
T.blocks_air = 1
..()
/obj/structure/plasticflaps/mining/New() //set the turf below the flaps to block air
var/turf/T = get_turf(loc)
if(T)
T.blocks_air = 1
..()
Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor //wow this is terrible
var/turf/T = get_turf(loc)
if(T)
if(istype(T, /turf/simulated/floor))
T.blocks_air = 0
..()
/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor //wow this is terrible
var/turf/T = get_turf(loc)
if(T)
if(istype(T, /turf/simulated/floor))
T.blocks_air = 0
..()
/obj/machinery/computer/supplycomp
name = "supply shuttle console"
@@ -140,269 +140,269 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
//shuttle loan
var/datum/round_event/shuttle_loan/shuttle_loan
New()
ordernum = rand(1,9000)
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
if(P.name == "HEADER") continue // To filter out group headers
supply_packs[P.name] = P
/datum/controller/supply_shuttle/New()
ordernum = rand(1,9000)
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
if(P.name == "HEADER") continue // To filter out group headers
supply_packs[P.name] = P
//Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcom and the station
proc/process()
//Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcom and the station
/datum/controller/supply_shuttle/proc/process()
spawn(0)
set background = BACKGROUND_ENABLED
while(1)
if(processing)
iteration++
points += points_per_process
spawn(0)
set background = BACKGROUND_ENABLED
while(1)
if(processing)
iteration++
points += points_per_process
if(moving == 1)
var/ticksleft = (eta_timeofday - world.timeofday)
if(ticksleft > 0)
eta = round(ticksleft/600,1)
else
eta = 0
send()
if(moving == 1)
var/ticksleft = (eta_timeofday - world.timeofday)
if(ticksleft > 0)
eta = round(ticksleft/600,1)
else
eta = 0
send()
sleep(processing_interval)
sleep(processing_interval)
proc/send()
var/area/from
var/area/dest
switch(at_station)
if(1)
from = locate(SUPPLY_STATION_AREATYPE)
dest = locate(SUPPLY_DOCK_AREATYPE)
at_station = 0
if(0)
from = locate(SUPPLY_DOCK_AREATYPE)
dest = locate(SUPPLY_STATION_AREATYPE)
at_station = 1
dest.clear_docking_area()
moving = 0
/datum/controller/supply_shuttle/proc/send()
var/area/from
var/area/dest
switch(at_station)
if(1)
from = locate(SUPPLY_STATION_AREATYPE)
dest = locate(SUPPLY_DOCK_AREATYPE)
at_station = 0
if(0)
from = locate(SUPPLY_DOCK_AREATYPE)
dest = locate(SUPPLY_STATION_AREATYPE)
at_station = 1
dest.clear_docking_area()
moving = 0
from.move_contents_to(dest)
from.move_contents_to(dest)
//Check whether the shuttle is allowed to move
proc/can_move()
if(moving) return 0
//Check whether the shuttle is allowed to move
/datum/controller/supply_shuttle/proc/can_move()
if(moving) return 0
var/area/shuttle = locate(/area/supply/station)
if(!shuttle) return 0
var/area/shuttle = locate(/area/supply/station)
if(!shuttle) return 0
if(forbidden_atoms_check(shuttle))
return 0
if(forbidden_atoms_check(shuttle))
return 0
return 1
//To stop things being sent to centcom which should not be sent to centcom Recursively checks for these types.
/datum/controller/supply_shuttle/proc/forbidden_atoms_check(atom/A)
if(istype(A,/mob/living))
return 1
if(istype(A,/obj/item/weapon/disk/nuclear))
return 1
if(istype(A,/obj/machinery/nuclearbomb))
return 1
if(istype(A,/obj/item/device/radio/beacon))
return 1
if(istype(A,/obj/effect/blob))
return 1
if(istype(A,/obj/effect/spider/spiderling))
return 1
//To stop things being sent to centcom which should not be sent to centcom Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
if(istype(A,/mob/living))
return 1
if(istype(A,/obj/item/weapon/disk/nuclear))
return 1
if(istype(A,/obj/machinery/nuclearbomb))
return 1
if(istype(A,/obj/item/device/radio/beacon))
return 1
if(istype(A,/obj/effect/blob))
return 1
if(istype(A,/obj/effect/spider/spiderling))
for(var/i=1, i<=A.contents.len, i++)
var/atom/B = A.contents[i]
if(.(B))
return 1
for(var/i=1, i<=A.contents.len, i++)
var/atom/B = A.contents[i]
if(.(B))
return 1
//Sellin
/datum/controller/supply_shuttle/proc/sell()
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
//Sellin
proc/sell()
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/plasma_count = 0
var/intel_count = 0
var/crate_count = 0
var/plasma_count = 0
var/intel_count = 0
var/crate_count = 0
centcom_message = ""
centcom_message = ""
for(var/atom/movable/MA in shuttle)
if(MA.anchored) continue
for(var/atom/movable/MA in shuttle)
if(MA.anchored) continue
// Must be in a crate (or a critter crate)!
if(istype(MA,/obj/structure/closet/crate) || istype(MA,/obj/structure/closet/critter))
crate_count++
var/find_slip = 1
// Must be in a crate (or a critter crate)!
if(istype(MA,/obj/structure/closet/crate) || istype(MA,/obj/structure/closet/critter))
crate_count++
var/find_slip = 1
for(var/atom in MA)
// Sell manifests
var/atom/A = atom
if(find_slip && istype(A,/obj/item/weapon/paper/manifest))
var/obj/item/weapon/paper/manifest/slip = A
// TODO: Check for a signature, too.
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
// Did they mark it as erroneous?
var/denied = 0
for(var/i=1,i<=slip.stamped.len,i++)
if(slip.stamped[i] == /obj/item/weapon/stamp/denied)
denied = 1
if(slip.erroneous && denied) // Caught a mistake by Centcom (IDEA: maybe Centcom rarely gets offended by this)
points += slip.points-points_per_crate // For now, give a full refund for paying attention (minus the crate cost)
centcom_message += "<font color=green>+[slip.points-points_per_crate]</font>: Station correctly denied package [slip.ordernumber]: "
for(var/atom in MA)
// Sell manifests
var/atom/A = atom
if(find_slip && istype(A,/obj/item/weapon/paper/manifest))
var/obj/item/weapon/paper/manifest/slip = A
// TODO: Check for a signature, too.
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
// Did they mark it as erroneous?
var/denied = 0
for(var/i=1,i<=slip.stamped.len,i++)
if(slip.stamped[i] == /obj/item/weapon/stamp/denied)
denied = 1
if(slip.erroneous && denied) // Caught a mistake by Centcom (IDEA: maybe Centcom rarely gets offended by this)
points += slip.points-points_per_crate // For now, give a full refund for paying attention (minus the crate cost)
centcom_message += "<font color=green>+[slip.points-points_per_crate]</font>: Station correctly denied package [slip.ordernumber]: "
if(slip.erroneous & MANIFEST_ERROR_NAME)
centcom_message += "Destination station incorrect. "
else if(slip.erroneous & MANIFEST_ERROR_COUNT)
centcom_message += "Packages incorrectly counted. "
else if(slip.erroneous & MANIFEST_ERROR_ITEM)
centcom_message += "Package incomplete. "
centcom_message += "Points refunded.<BR>"
else if(!slip.erroneous && !denied) // Approving a proper order awards the relatively tiny points_per_slip
points += points_per_slip
centcom_message += "<font color=green>+1</font>: Package [slip.ordernumber] accorded.<BR>"
else // You done goofed.
if(slip.erroneous)
centcom_message += "<font color=red>+0</font>: Station approved package [slip.ordernumber] despite error: "
if(slip.erroneous & MANIFEST_ERROR_NAME)
centcom_message += "Destination station incorrect. "
centcom_message += "Destination station incorrect."
else if(slip.erroneous & MANIFEST_ERROR_COUNT)
centcom_message += "Packages incorrectly counted. "
centcom_message += "Packages incorrectly counted."
else if(slip.erroneous & MANIFEST_ERROR_ITEM)
centcom_message += "Package incomplete. "
centcom_message += "Points refunded.<BR>"
else if(!slip.erroneous && !denied) // Approving a proper order awards the relatively tiny points_per_slip
points += points_per_slip
centcom_message += "<font color=green>+1</font>: Package [slip.ordernumber] accorded.<BR>"
else // You done goofed.
if(slip.erroneous)
centcom_message += "<font color=red>+0</font>: Station approved package [slip.ordernumber] despite error: "
if(slip.erroneous & MANIFEST_ERROR_NAME)
centcom_message += "Destination station incorrect."
else if(slip.erroneous & MANIFEST_ERROR_COUNT)
centcom_message += "Packages incorrectly counted."
else if(slip.erroneous & MANIFEST_ERROR_ITEM)
centcom_message += "We found unshipped items on our dock."
centcom_message += " Be more vigilant.<BR>"
else
points -= slip.points-points_per_crate
centcom_message += "<font color=red>-[slip.points-points_per_crate]</font>: Station denied package [slip.ordernumber]. Our records show no fault on our part.<BR>"
find_slip = 0
continue
centcom_message += "We found unshipped items on our dock."
centcom_message += " Be more vigilant.<BR>"
else
points -= slip.points-points_per_crate
centcom_message += "<font color=red>-[slip.points-points_per_crate]</font>: Station denied package [slip.ordernumber]. Our records show no fault on our part.<BR>"
find_slip = 0
continue
// Sell plasma
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
var/obj/item/stack/sheet/mineral/plasma/P = A
plasma_count += P.amount
// Sell plasma
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
var/obj/item/stack/sheet/mineral/plasma/P = A
plasma_count += P.amount
// Sell syndicate intel
if(istype(A, /obj/item/documents/syndicate))
intel_count += 1
// Sell syndicate intel
if(istype(A, /obj/item/documents/syndicate))
intel_count += 1
if(istype(A, /obj/item/seeds))
var/obj/item/seeds/S = A
if(S.rarity == 0) // Mundane species
centcom_message += "<font color=red>+0</font>: We don't need samples of mundane species \"[capitalize(S.species)]\".<BR>"
else if(discoveredPlants[S.type]) // This species has already been sent to CentComm
var/potDiff = S.potency - discoveredPlants[S.type] // Compare it to the previous best
if(potDiff > 0) // This sample is better
discoveredPlants[S.type] = S.potency
centcom_message += "<font color=green>+[potDiff]</font>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<BR>"
points += potDiff
else // This sample is worthless
centcom_message += "<font color=red>+0</font>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([discoveredPlants[S.type]] potency).<BR>"
else // This is a new discovery!
if(istype(A, /obj/item/seeds))
var/obj/item/seeds/S = A
if(S.rarity == 0) // Mundane species
centcom_message += "<font color=red>+0</font>: We don't need samples of mundane species \"[capitalize(S.species)]\".<BR>"
else if(discoveredPlants[S.type]) // This species has already been sent to CentComm
var/potDiff = S.potency - discoveredPlants[S.type] // Compare it to the previous best
if(potDiff > 0) // This sample is better
discoveredPlants[S.type] = S.potency
centcom_message += "<font color=green>+[S.rarity]</font>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<BR>"
points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
qdel(MA)
centcom_message += "<font color=green>+[potDiff]</font>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<BR>"
points += potDiff
else // This sample is worthless
centcom_message += "<font color=red>+0</font>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([discoveredPlants[S.type]] potency).<BR>"
else // This is a new discovery!
discoveredPlants[S.type] = S.potency
centcom_message += "<font color=green>+[S.rarity]</font>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<BR>"
points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
qdel(MA)
if(plasma_count)
centcom_message += "<font color=green>+[round(plasma_count/plasma_per_point)]</font>: Received [plasma_count] unit(s) of exotic material.<BR>"
points += round(plasma_count / plasma_per_point)
if(plasma_count)
centcom_message += "<font color=green>+[round(plasma_count/plasma_per_point)]</font>: Received [plasma_count] unit(s) of exotic material.<BR>"
points += round(plasma_count / plasma_per_point)
if(intel_count)
centcom_message += "<font color=green>+[round(intel_count*points_per_intel)]</font>: Received [intel_count] article(s) of enemy intelligence.<BR>"
points += round(intel_count*points_per_intel)
if(intel_count)
centcom_message += "<font color=green>+[round(intel_count*points_per_intel)]</font>: Received [intel_count] article(s) of enemy intelligence.<BR>"
points += round(intel_count*points_per_intel)
if(crate_count)
centcom_message += "<font color=green>+[round(crate_count*points_per_crate)]</font>: Received [crate_count] crate(s).<BR>"
points += crate_count * points_per_crate
if(crate_count)
centcom_message += "<font color=green>+[round(crate_count*points_per_crate)]</font>: Received [crate_count] crate(s).<BR>"
points += crate_count * points_per_crate
//Buyin
proc/buy()
if(!shoppinglist.len) return
//Buyin
/datum/controller/supply_shuttle/proc/buy()
if(!shoppinglist.len) return
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/list/clear_turfs = list()
var/list/clear_turfs = list()
for(var/turf/T in shuttle)
if(T.density || T.contents.len) continue
clear_turfs += T
for(var/turf/T in shuttle)
if(T.density || T.contents.len) continue
clear_turfs += T
for(var/S in shoppinglist)
if(!clear_turfs.len) break
var/i = rand(1,clear_turfs.len)
var/turf/pickedloc = clear_turfs[i]
clear_turfs.Cut(i,i+1)
for(var/S in shoppinglist)
if(!clear_turfs.len) break
var/i = rand(1,clear_turfs.len)
var/turf/pickedloc = clear_turfs[i]
clear_turfs.Cut(i,i+1)
var/datum/supply_order/SO = S
var/datum/supply_packs/SP = SO.object
var/datum/supply_order/SO = S
var/datum/supply_packs/SP = SO.object
var/atom/A = new SP.containertype(pickedloc)
A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]"
var/atom/A = new SP.containertype(pickedloc)
A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]"
//supply manifest generation begin
//supply manifest generation begin
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
var printed_station_name = world.name // World name is available in the title bar, station_name can be different based on config.
if(prob(5))
printed_station_name = new_station_name()
slip.erroneous |= MANIFEST_ERROR_NAME // They got our station name wrong. BASTARDS!
// IDEA: Have Centcom accidentally send random low-value crates in large orders, give large bonus for returning them intact.
var printed_packages_amount = supply_shuttle.shoppinglist.len
if(prob(5))
printed_packages_amount += rand(1,2) // I considered rand(-2,2), but that could be zero. Heh.
slip.erroneous |= MANIFEST_ERROR_COUNT // They typoed the number of crates in this shipment. It won't match the other manifests.
var printed_station_name = station_name()
if(prob(5))
printed_station_name = new_station_name()
slip.erroneous |= MANIFEST_ERROR_NAME // They got our station name wrong. BASTARDS!
// IDEA: Have Centcom accidentally send random low-value crates in large orders, give large bonus for returning them intact.
var printed_packages_amount = supply_shuttle.shoppinglist.len
if(prob(5))
printed_packages_amount += rand(1,2) // I considered rand(-2,2), but that could be zero. Heh.
slip.erroneous |= MANIFEST_ERROR_COUNT // They typoed the number of crates in this shipment. It won't match the other manifests.
slip.points = SP.cost
slip.ordernumber = SO.ordernum
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
slip.info +="Order #[SO.ordernum]<br>"
slip.info +="Destination: [printed_station_name]<br>"
slip.info +="[printed_packages_amount] PACKAGES IN THIS SHIPMENT<br>"
slip.info +="CONTENTS:<br><ul>"
slip.points = SP.cost
slip.ordernumber = SO.ordernum
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
slip.info +="Order #[SO.ordernum]<br>"
slip.info +="Destination: [printed_station_name]<br>"
slip.info +="[printed_packages_amount] PACKAGES IN THIS SHIPMENT<br>"
slip.info +="CONTENTS:<br><ul>"
//spawn the stuff, finish generating the manifest while you're at it
if(SP.access)
A:req_access = list()
A:req_access += text2num(SP.access)
//spawn the stuff, finish generating the manifest while you're at it
if(SP.access)
A:req_access = list()
A:req_access += text2num(SP.access)
var/list/contains
if(istype(SP,/datum/supply_packs/misc/randomised))
var/datum/supply_packs/misc/randomised/SPR = SP
contains = list()
if(SPR.contains.len)
for(var/j=1,j<=SPR.num_contained,j++)
contains += pick(SPR.contains)
else
contains = SP.contains
var/list/contains
if(istype(SP,/datum/supply_packs/misc/randomised))
var/datum/supply_packs/misc/randomised/SPR = SP
contains = list()
if(SPR.contains.len)
for(var/j=1,j<=SPR.num_contained,j++)
contains += pick(SPR.contains)
else
contains = SP.contains
for(var/typepath in contains)
if(!typepath) continue
var/atom/B2 = new typepath(A)
if(SP.amount && B2:amount) B2:amount = SP.amount
slip.info += "<li>[B2.name]</li>" //add the item to the manifest (even if it was misplaced)
// If it has multiple items, there's a 1% of each going missing... Not for secure crates or those large wooden ones, though.
if(contains.len > 1 && prob(1) && !findtext(SP.containertype,"/secure/") && !findtext(SP.containertype,"/largecrate/"))
slip.erroneous |= MANIFEST_ERROR_ITEM // This item was not included in the shipment!
qdel(B2) // Lost in space... or the loading dock.
for(var/typepath in contains)
if(!typepath) continue
var/atom/B2 = new typepath(A)
if(SP.amount && B2:amount) B2:amount = SP.amount
slip.info += "<li>[B2.name]</li>" //add the item to the manifest (even if it was misplaced)
// If it has multiple items, there's a 1% of each going missing... Not for secure crates or those large wooden ones, though.
if(contains.len > 1 && prob(1) && !findtext(SP.containertype,"/secure/") && !findtext(SP.containertype,"/largecrate/"))
slip.erroneous |= MANIFEST_ERROR_ITEM // This item was not included in the shipment!
qdel(B2) // Lost in space... or the loading dock.
//manifest finalisation
slip.info += "</ul><br>"
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>" // And now this is actually meaningful.
//manifest finalisation
slip.info += "</ul><br>"
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>" // And now this is actually meaningful.
supply_shuttle.shoppinglist.Cut()
return
supply_shuttle.shoppinglist.Cut()
return
/obj/item/weapon/paper/manifest
name = "supply manifest"
+239 -239
View File
@@ -1,6 +1,6 @@
var/datum/controller/vote/vote = new()
datum/controller/vote
/datum/controller/vote
var/initiator = null
var/started_timeofday = null
var/time_remaining = 0
@@ -10,253 +10,253 @@ datum/controller/vote
var/list/voted = list()
var/list/voting = list()
New()
if(vote != src)
if(istype(vote))
del(vote)
vote = src
/datum/controller/vote/New()
if(vote != src)
if(istype(vote))
del(vote)
vote = src
proc/process() //called by master_controller
if(mode)
time_remaining = started_timeofday + config.vote_period
if(world.timeofday < started_timeofday)
time_remaining -= 864000
time_remaining = round((time_remaining - world.timeofday)/10)
var/i=1
if(time_remaining < 0)
result()
while(i<=voting.len)
var/client/C = voting[i]
if(C)
C << browse(null,"window=vote;can_close=0")
i++
reset()
else
var/datum/browser/client_popup
while(i<=voting.len)
var/client/C = voting[i]
if(C)
//C << browse(vote.interface(C),"window=vote;can_close=0")
client_popup = new(C, "vote", "Voting Panel")
client_popup.set_window_options("can_close=0")
client_popup.set_content(vote.interface(C))
client_popup.open(0)
i++
else
voting.Cut(i,i+1)
proc/reset()
initiator = null
time_remaining = 0
mode = null
question = null
choices.Cut()
voted.Cut()
voting.Cut()
proc/get_result()
//get the highest number of votes
var/greatest_votes = 0
var/total_votes = 0
for(var/option in choices)
var/votes = choices[option]
total_votes += votes
if(votes > greatest_votes)
greatest_votes = votes
//default-vote for everyone who didn't vote
if(!config.vote_no_default && choices.len)
var/non_voters = (clients.len - total_votes)
if(non_voters > 0)
if(mode == "restart")
choices["Continue Playing"] += non_voters
if(choices["Continue Playing"] >= greatest_votes)
greatest_votes = choices["Continue Playing"]
else if(mode == "gamemode")
if(master_mode in choices)
choices[master_mode] += non_voters
if(choices[master_mode] >= greatest_votes)
greatest_votes = choices[master_mode]
//get all options with that many votes and return them in a list
. = list()
if(greatest_votes)
for(var/option in choices)
if(choices[option] == greatest_votes)
. += option
return .
proc/announce_result()
var/list/winners = get_result()
var/text
if(winners.len > 0)
if(question) text += "<b>[question]</b>"
else text += "<b>[capitalize(mode)] Vote</b>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
text += "\n<b>[choices[i]]:</b> [votes]"
if(mode != "custom")
if(winners.len > 1)
text = "\n<b>Vote Tied Between:</b>"
for(var/option in winners)
text += "\n\t[option]"
. = pick(winners)
text += "\n<b>Vote Result: [.]</b>"
else
text += "\n<b>Did not vote:</b> [clients.len-voted.len]"
else
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
log_vote(text)
world << "\n<font color='purple'>[text]</font>"
return .
proc/result()
. = announce_result()
var/restart = 0
if(.)
switch(mode)
if("restart")
if(. == "Restart Round")
restart = 1
if("gamemode")
if(master_mode != .)
world.save_mode(.)
if(ticker && ticker.mode)
restart = 1
else
master_mode = .
if(restart)
world << "World restarting due to vote..."
feedback_set_details("end_error","restart vote")
if(blackbox) blackbox.save_all_data_to_sql()
sleep(50)
log_game("Rebooting due to restart vote")
world.Reboot()
return .
proc/submit_vote(var/vote)
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
if(!(usr.ckey in voted))
if(vote && 1<=vote && vote<=choices.len)
voted += usr.ckey
choices[choices[vote]]++ //check this
return vote
return 0
proc/initiate_vote(var/vote_type, var/initiator_key)
if(!mode)
if(started_timeofday != null)
var/next_allowed_timeofday = (started_timeofday + config.vote_delay)
if(world.timeofday < started_timeofday)
next_allowed_timeofday -= 864000
if(next_allowed_timeofday > world.timeofday)
return 0
/datum/controller/vote/proc/process() //called by master_controller
if(mode)
time_remaining = started_timeofday + config.vote_period
if(world.timeofday < started_timeofday)
time_remaining -= 864000
time_remaining = round((time_remaining - world.timeofday)/10)
var/i=1
if(time_remaining < 0)
result()
while(i<=voting.len)
var/client/C = voting[i]
if(C)
C << browse(null,"window=vote;can_close=0")
i++
reset()
switch(vote_type)
if("restart") choices.Add("Restart Round","Continue Playing")
if("gamemode") choices.Add(config.votable_modes)
if("custom")
question = html_encode(input(usr,"What is the vote for?") as text|null)
if(!question) return 0
for(var/i=1,i<=10,i++)
var/option = capitalize(html_encode(input(usr,"Please enter an option or hit cancel to finish") as text|null))
if(!option || mode || !usr.client) break
choices.Add(option)
else return 0
mode = vote_type
initiator = initiator_key
started_timeofday = world.timeofday
var/text = "[capitalize(mode)] vote started by [initiator]."
if(mode == "custom")
text += "\n[question]"
log_vote(text)
world << "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
time_remaining = round(config.vote_period/10)
return 1
return 0
proc/interface(var/client/C)
if(!C) return
var/admin = 0
var/trialmin = 0
if(C.holder)
admin = 1
if(check_rights_for(C, R_ADMIN))
trialmin = 1
voting |= C
if(mode)
if(question) . += "<h2>Vote: '[question]'</h2>"
else . += "<h2>Vote: [capitalize(mode)]</h2>"
. += "Time Left: [time_remaining] s<hr><ul>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</li>"
. += "</ul><hr>"
if(admin)
. += "(<a href='?src=\ref[src];vote=cancel'>Cancel Vote</a>) "
else
. += "<h2>Start a vote:</h2><hr><ul><li>"
//restart
if(trialmin || config.allow_vote_restart)
. += "<a href='?src=\ref[src];vote=restart'>Restart</a>"
else
. += "<font color='grey'>Restart (Disallowed)</font>"
if(trialmin)
. += "\t(<a href='?src=\ref[src];vote=toggle_restart'>[config.allow_vote_restart?"Allowed":"Disallowed"]</a>)"
. += "</li><li>"
//gamemode
if(trialmin || config.allow_vote_mode)
. += "<a href='?src=\ref[src];vote=gamemode'>GameMode</a>"
else
. += "<font color='grey'>GameMode (Disallowed)</font>"
if(trialmin)
. += "\t(<a href='?src=\ref[src];vote=toggle_gamemode'>[config.allow_vote_mode?"Allowed":"Disallowed"]</a>)"
var/datum/browser/client_popup
while(i<=voting.len)
var/client/C = voting[i]
if(C)
//C << browse(vote.interface(C),"window=vote;can_close=0")
client_popup = new(C, "vote", "Voting Panel")
client_popup.set_window_options("can_close=0")
client_popup.set_content(vote.interface(C))
client_popup.open(0)
. += "</li>"
//custom
if(trialmin)
. += "<li><a href='?src=\ref[src];vote=custom'>Custom</a></li>"
. += "</ul><hr>"
. += "<a href='?src=\ref[src];vote=close' style='position:absolute;right:50px'>Close</a>"
return .
i++
else
voting.Cut(i,i+1)
/datum/controller/vote/proc/reset()
initiator = null
time_remaining = 0
mode = null
question = null
choices.Cut()
voted.Cut()
voting.Cut()
Topic(href,href_list[],hsrc)
if(!usr || !usr.client) return //not necessary but meh...just in-case somebody does something stupid
switch(href_list["vote"])
if("close")
voting -= usr.client
usr << browse(null, "window=vote")
return
if("cancel")
if(usr.client.holder)
reset()
if("toggle_restart")
if(usr.client.holder)
config.allow_vote_restart = !config.allow_vote_restart
if("toggle_gamemode")
if(usr.client.holder)
config.allow_vote_mode = !config.allow_vote_mode
/datum/controller/vote/proc/get_result()
//get the highest number of votes
var/greatest_votes = 0
var/total_votes = 0
for(var/option in choices)
var/votes = choices[option]
total_votes += votes
if(votes > greatest_votes)
greatest_votes = votes
//default-vote for everyone who didn't vote
if(!config.vote_no_default && choices.len)
var/non_voters = (clients.len - total_votes)
if(non_voters > 0)
if(mode == "restart")
choices["Continue Playing"] += non_voters
if(choices["Continue Playing"] >= greatest_votes)
greatest_votes = choices["Continue Playing"]
else if(mode == "gamemode")
if(master_mode in choices)
choices[master_mode] += non_voters
if(choices[master_mode] >= greatest_votes)
greatest_votes = choices[master_mode]
//get all options with that many votes and return them in a list
. = list()
if(greatest_votes)
for(var/option in choices)
if(choices[option] == greatest_votes)
. += option
return .
/datum/controller/vote/proc/announce_result()
var/list/winners = get_result()
var/text
if(winners.len > 0)
if(question) text += "<b>[question]</b>"
else text += "<b>[capitalize(mode)] Vote</b>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
text += "\n<b>[choices[i]]:</b> [votes]"
if(mode != "custom")
if(winners.len > 1)
text = "\n<b>Vote Tied Between:</b>"
for(var/option in winners)
text += "\n\t[option]"
. = pick(winners)
text += "\n<b>Vote Result: [.]</b>"
else
text += "\n<b>Did not vote:</b> [clients.len-voted.len]"
else
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
log_vote(text)
world << "\n<font color='purple'>[text]</font>"
return .
/datum/controller/vote/proc/result()
. = announce_result()
var/restart = 0
if(.)
switch(mode)
if("restart")
if(config.allow_vote_restart || usr.client.holder)
initiate_vote("restart",usr.key)
if(. == "Restart Round")
restart = 1
if("gamemode")
if(config.allow_vote_mode || usr.client.holder)
initiate_vote("gamemode",usr.key)
if(master_mode != .)
world.save_mode(.)
if(ticker && ticker.mode)
restart = 1
else
master_mode = .
if(restart)
world << "World restarting due to vote..."
feedback_set_details("end_error","restart vote")
if(blackbox) blackbox.save_all_data_to_sql()
sleep(50)
log_game("Rebooting due to restart vote")
world.Reboot()
return .
/datum/controller/vote/proc/submit_vote(var/vote)
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
if(!(usr.ckey in voted))
if(vote && 1<=vote && vote<=choices.len)
voted += usr.ckey
choices[choices[vote]]++ //check this
return vote
return 0
/datum/controller/vote/proc/initiate_vote(var/vote_type, var/initiator_key)
if(!mode)
if(started_timeofday != null)
var/next_allowed_timeofday = (started_timeofday + config.vote_delay)
if(world.timeofday < started_timeofday)
next_allowed_timeofday -= 864000
if(next_allowed_timeofday > world.timeofday)
return 0
reset()
switch(vote_type)
if("restart") choices.Add("Restart Round","Continue Playing")
if("gamemode") choices.Add(config.votable_modes)
if("custom")
if(usr.client.holder)
initiate_vote("custom",usr.key)
else
submit_vote(round(text2num(href_list["vote"])))
usr.vote()
question = html_encode(input(usr,"What is the vote for?") as text|null)
if(!question) return 0
for(var/i=1,i<=10,i++)
var/option = capitalize(html_encode(input(usr,"Please enter an option or hit cancel to finish") as text|null))
if(!option || mode || !usr.client) break
choices.Add(option)
else return 0
mode = vote_type
initiator = initiator_key
started_timeofday = world.timeofday
var/text = "[capitalize(mode)] vote started by [initiator]."
if(mode == "custom")
text += "\n[question]"
log_vote(text)
world << "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
time_remaining = round(config.vote_period/10)
return 1
return 0
/datum/controller/vote/proc/interface(var/client/C)
if(!C) return
var/admin = 0
var/trialmin = 0
if(C.holder)
admin = 1
if(check_rights_for(C, R_ADMIN))
trialmin = 1
voting |= C
if(mode)
if(question) . += "<h2>Vote: '[question]'</h2>"
else . += "<h2>Vote: [capitalize(mode)]</h2>"
. += "Time Left: [time_remaining] s<hr><ul>"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes) votes = 0
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</li>"
. += "</ul><hr>"
if(admin)
. += "(<a href='?src=\ref[src];vote=cancel'>Cancel Vote</a>) "
else
. += "<h2>Start a vote:</h2><hr><ul><li>"
//restart
if(trialmin || config.allow_vote_restart)
. += "<a href='?src=\ref[src];vote=restart'>Restart</a>"
else
. += "<font color='grey'>Restart (Disallowed)</font>"
if(trialmin)
. += "\t(<a href='?src=\ref[src];vote=toggle_restart'>[config.allow_vote_restart?"Allowed":"Disallowed"]</a>)"
. += "</li><li>"
//gamemode
if(trialmin || config.allow_vote_mode)
. += "<a href='?src=\ref[src];vote=gamemode'>GameMode</a>"
else
. += "<font color='grey'>GameMode (Disallowed)</font>"
if(trialmin)
. += "\t(<a href='?src=\ref[src];vote=toggle_gamemode'>[config.allow_vote_mode?"Allowed":"Disallowed"]</a>)"
. += "</li>"
//custom
if(trialmin)
. += "<li><a href='?src=\ref[src];vote=custom'>Custom</a></li>"
. += "</ul><hr>"
. += "<a href='?src=\ref[src];vote=close' style='position:absolute;right:50px'>Close</a>"
return .
/datum/controller/vote/Topic(href,href_list[],hsrc)
if(!usr || !usr.client) return //not necessary but meh...just in-case somebody does something stupid
switch(href_list["vote"])
if("close")
voting -= usr.client
usr << browse(null, "window=vote")
return
if("cancel")
if(usr.client.holder)
reset()
if("toggle_restart")
if(usr.client.holder)
config.allow_vote_restart = !config.allow_vote_restart
if("toggle_gamemode")
if(usr.client.holder)
config.allow_vote_mode = !config.allow_vote_mode
if("restart")
if(config.allow_vote_restart || usr.client.holder)
initiate_vote("restart",usr.key)
if("gamemode")
if(config.allow_vote_mode || usr.client.holder)
initiate_vote("gamemode",usr.key)
if("custom")
if(usr.client.holder)
initiate_vote("custom",usr.key)
else
submit_vote(round(text2num(href_list["vote"])))
usr.vote()
/mob/verb/vote()
@@ -268,4 +268,4 @@ datum/controller/vote
var/datum/browser/popup = new(src, "vote", "Voting Panel")
popup.set_window_options("can_close=0")
popup.set_content(vote.interface(client))
popup.open(0)
popup.open(0)
+1 -1
View File
@@ -100,7 +100,7 @@
var/datum/ai_laws/lawtype = pick(typesof(/datum/ai_laws/default) - /datum/ai_laws/default)
var/datum/ai_laws/templaws = new lawtype()
inherent = templaws.inherent
set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*´&110010")
set_zeroth_law("<span class='danger'>ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*´&110010</span>")
/datum/ai_laws/custom/New() //This reads silicon_laws.txt and allows server hosts to set custom AI starting laws.
..()
+380 -381
View File
@@ -1,401 +1,400 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
client
proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
//set src in world
/client/proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
//set src in world
if(!usr.client || !usr.client.holder)
usr << "\red You need to be an administrator to access this."
return
var/title = ""
var/body = ""
if(!D) return
if(istype(D, /atom))
var/atom/A = D
title = "[A.name] (\ref[A]) = [A.type]"
#ifdef VARSICON
if (A.icon)
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
#endif
var/icon/sprite
if(istype(D,/atom))
var/atom/AT = D
if(AT.icon && AT.icon_state)
sprite = new /icon(AT.icon, AT.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
title = "[D] (\ref[D]) = [D.type]"
body += {"<script type="text/javascript">
function updateSearch(){
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
if(event.keyCode == 13){ //Enter / return
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
alist = lis\[i\].getElementsByTagName("a")
if(alist.length > 0){
location.href=alist\[0\].href;
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 38){ //Up arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i-1) >= 0){
var li_new = lis\[i-1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 40){ //Down arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i+1) < lis.length){
var li_new = lis\[i+1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
if(complete_list != null && complete_list != ""){
var vars_ol1 = document.getElementById("vars");
vars_ol1.innerHTML = complete_list
}
if(filter.value == ""){
return;
}else{
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
{
vars_ol.removeChild(li);
i--;
}
}catch(err) { }
}
}
var lis_new = vars_ol.getElementsByTagName("li");
for ( var j = 0; j < lis_new.length; ++j )
{
var li1 = lis\[j\];
if (j == 0){
li1.style.backgroundColor = "#ffee88";
}else{
li1.style.backgroundColor = "white";
}
}
}
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function loadPage(list) {
if(list.options\[list.selectedIndex\].value == ""){
return;
}
location.href=list.options\[list.selectedIndex\].value;
}
</script> "}
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
if(sprite)
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
else
body += "<table align='center' width='100%'><tr><td>"
body += "<div align='center'>"
if(istype(D,/atom))
var/atom/A = D
if(isliving(A))
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
var/mob/living/M = A
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += {"
<br><font size='1'>
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
</font>
"}
else
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
else
body += "<b>[D]</b>"
body += "</div>"
body += "</tr></td></table>"
var/formatted_type = text("[D.type]")
if(length(formatted_type) > 25)
var/middle_point = length(formatted_type) / 2
var/splitpoint = findtext(formatted_type,"/",middle_point)
if(splitpoint)
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
else
formatted_type = "Type too long" //No suitable splitpoint (/) found.
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
body += "</div>"
body += "</div></td>"
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
//if(ismob(D))
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
body += {" <form>
<select name="file" size="1"
onchange="loadPage(this.form.elements\[0\])"
target="_parent._top"
onmouseclick="this.focus()"
style="background-color:#ffffff">
"}
body += {" <option value>Select option</option>
<option value> </option>
"}
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
if(ismob(D))
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
body += "<option value>---</option>"
if(ismob(D))
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
body += "<option value>---</option>"
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
if(isobj(D))
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
if(isobj(D) || ismob(D) || isturf(D))
body += "<option value='?_src_=vars;addreagent=\ref[D]'>Add reagent</option>"
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
body += "</select></form>"
body += "</div></td></tr></table></div><hr>"
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
body += "<b>C</b> - Change, asks you for the var type first.<br>"
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
body += "<ol id='vars'>"
var/list/names = list()
for (var/V in D.vars)
names += V
names = sortList(names)
for (var/V in names)
body += debug_variable(V, D.vars[V], 0, D)
body += "</ol>"
var/html = "<html><head>"
if (title)
html += "<title>[title]</title>"
html += {"<style>
body
{
font-family: Verdana, sans-serif;
font-size: 9pt;
}
.value
{
font-family: "Courier New", monospace;
font-size: 8pt;
}
</style>"}
html += "</head><body>"
html += body
html += {"
<script type='text/javascript'>
var vars_ol = document.getElementById("vars");
var complete_list = vars_ol.innerHTML;
</script>
"}
html += "</body></html>"
usr << browse(html, "window=variables\ref[D];size=475x650")
if(!usr.client || !usr.client.holder)
usr << "<span class='danger'>You need to be an administrator to access this.</span>"
return
proc/debug_variable(name, value, level, var/datum/DA = null)
var/html = ""
if(DA)
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
var/title = ""
var/body = ""
if(!D) return
if(istype(D, /atom))
var/atom/A = D
title = "[A.name] (\ref[A]) = [A.type]"
#ifdef VARSICON
if (A.icon)
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
#endif
var/icon/sprite
if(istype(D,/atom))
var/atom/AT = D
if(AT.icon && AT.icon_state)
sprite = new /icon(AT.icon, AT.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
title = "[D] (\ref[D]) = [D.type]"
body += {"<script type="text/javascript">
function updateSearch(){
var filter_text = document.getElementById('filter');
var filter = filter_text.value.toLowerCase();
if(event.keyCode == 13){ //Enter / return
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
alist = lis\[i\].getElementsByTagName("a")
if(alist.length > 0){
location.href=alist\[0\].href;
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 38){ //Up arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i-1) >= 0){
var li_new = lis\[i-1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
if(event.keyCode == 40){ //Down arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.style.backgroundColor == "#ffee88" )
{
if( (i+1) < lis.length){
var li_new = lis\[i+1\];
li.style.backgroundColor = "white";
li_new.style.backgroundColor = "#ffee88";
return
}
}
}catch(err) { }
}
return
}
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
if(complete_list != null && complete_list != ""){
var vars_ol1 = document.getElementById("vars");
vars_ol1.innerHTML = complete_list
}
if(filter.value == ""){
return;
}else{
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
for ( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
{
vars_ol.removeChild(li);
i--;
}
}catch(err) { }
}
}
var lis_new = vars_ol.getElementsByTagName("li");
for ( var j = 0; j < lis_new.length; ++j )
{
var li1 = lis\[j\];
if (j == 0){
li1.style.backgroundColor = "#ffee88";
}else{
li1.style.backgroundColor = "white";
}
}
}
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function loadPage(list) {
if(list.options\[list.selectedIndex\].value == ""){
return;
}
location.href=list.options\[list.selectedIndex\].value;
}
</script> "}
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
if(sprite)
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
else
body += "<table align='center' width='100%'><tr><td>"
body += "<div align='center'>"
if(istype(D,/atom))
var/atom/A = D
if(isliving(A))
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
var/mob/living/M = A
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += {"
<br><font size='1'>
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
</font>
"}
else
html += "<li>"
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
if(A.dir)
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
else
body += "<b>[D]</b>"
if (isnull(value))
html += "[name] = <span class='value'>null</span>"
body += "</div>"
else if (istext(value))
html += "[name] = <span class='value'>\"[value]\"</span>"
body += "</tr></td></table>"
else if (isicon(value))
#ifdef VARSICON
var/icon/I = new/icon(value)
var/rnd = rand(1,10000)
var/rname = "tmp\ref[I][rnd].png"
usr << browse_rsc(I, rname)
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
#else
html += "[name] = /icon (<span class='value'>[value]</span>)"
#endif
var/formatted_type = text("[D.type]")
if(length(formatted_type) > 25)
var/middle_point = length(formatted_type) / 2
var/splitpoint = findtext(formatted_type,"/",middle_point)
if(splitpoint)
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
else
formatted_type = "Type too long" //No suitable splitpoint (/) found.
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
body += "</div>"
body += "</div></td>"
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
//if(ismob(D))
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
body += {" <form>
<select name="file" size="1"
onchange="loadPage(this.form.elements\[0\])"
target="_parent._top"
onmouseclick="this.focus()"
style="background-color:#ffffff">
"}
body += {" <option value>Select option</option>
<option value> </option>
"}
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
if(ismob(D))
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
body += "<option value>---</option>"
if(ismob(D))
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
body += "<option value>---</option>"
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
if(isobj(D))
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
if(isobj(D) || ismob(D) || isturf(D))
body += "<option value='?_src_=vars;addreagent=\ref[D]'>Add reagent</option>"
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
body += "</select></form>"
body += "</div></td></tr></table></div><hr>"
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
body += "<b>C</b> - Change, asks you for the var type first.<br>"
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
body += "<ol id='vars'>"
var/list/names = list()
for (var/V in D.vars)
names += V
names = sortList(names)
for (var/V in names)
body += debug_variable(V, D.vars[V], 0, D)
body += "</ol>"
var/html = "<html><head>"
if (title)
html += "<title>[title]</title>"
html += {"<style>
body
{
font-family: Verdana, sans-serif;
font-size: 9pt;
}
.value
{
font-family: "Courier New", monospace;
font-size: 8pt;
}
</style>"}
html += "</head><body>"
html += body
html += {"
<script type='text/javascript'>
var vars_ol = document.getElementById("vars");
var complete_list = vars_ol.innerHTML;
</script>
"}
html += "</body></html>"
usr << browse(html, "window=variables\ref[D];size=475x650")
return
/client/proc/debug_variable(name, value, level, var/datum/DA = null)
var/html = ""
if(DA)
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
else
html += "<li>"
if (isnull(value))
html += "[name] = <span class='value'>null</span>"
else if (istext(value))
html += "[name] = <span class='value'>\"[value]\"</span>"
else if (isicon(value))
#ifdef VARSICON
var/icon/I = new/icon(value)
var/rnd = rand(1,10000)
var/rname = "tmp\ref[I][rnd].png"
usr << browse_rsc(I, rname)
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
#else
html += "[name] = /icon (<span class='value'>[value]</span>)"
#endif
/* else if (istype(value, /image))
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
#ifdef VARSICON
var/rnd = rand(1, 10000)
var/image/I = value
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
#else
html += "[name] = /image (<span class='value'>[value]</span>)"
#endif
*/
else if (isfile(value))
html += "[name] = <span class='value'>'[value]'</span>"
else if (isfile(value))
html += "[name] = <span class='value'>'[value]'</span>"
else if (istype(value, /datum))
var/datum/D = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
else if (istype(value, /datum))
var/datum/D = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
else if (istype(value, /client))
var/client/C = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
//
else if (istype(value, /list))
var/list/L = value
html += "[name] = /list ([L.len])"
else if (istype(value, /client))
var/client/C = value
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
//
else if (istype(value, /list))
var/list/L = value
html += "[name] = /list ([L.len])"
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
if(0) //(L.vars.len > 0)
html += "<ol>"
html += "</ol>"
else
html += "<ul>"
var/index = 1
for (var/entry in L)
if(istext(entry))
html += debug_variable(entry, L[entry], level + 1)
//html += debug_variable("[index]", L[index], level + 1)
else
html += debug_variable(index, L[index], level + 1)
index++
html += "</ul>"
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
if(0) //(L.vars.len > 0)
html += "<ol>"
html += "</ol>"
else
html += "<ul>"
var/index = 1
for (var/entry in L)
if(istext(entry))
html += debug_variable(entry, L[entry], level + 1)
//html += debug_variable("[index]", L[index], level + 1)
else
html += debug_variable(index, L[index], level + 1)
index++
html += "</ul>"
else
html += "[name] = <span class='value'>[value]</span>"
else
html += "[name] = <span class='value'>[value]</span>"
html += "</li>"
html += "</li>"
return html
return html
/client/proc/view_var_Topic(href, href_list, hsrc)
//This should all be moved over to datum/admins/Topic() or something ~Carn
@@ -610,7 +609,7 @@ client
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) </span>")
if("Type and subtypes")
var/i = 0
for(var/obj/Obj in world)
@@ -621,7 +620,7 @@ client
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) </span>")
else if(href_list["addreagent"])
if(!check_rights(0)) return
@@ -651,7 +650,7 @@ client
if(amount)
A.reagents.add_reagent(chosen_id, amount)
log_admin("[key_name(usr)] has added [amount] units of [chosen] to \the [A]")
message_admins("\blue [key_name(usr)] has added [amount] units of [chosen] to \the [A]")
message_admins("<span class='notice'>[key_name(usr)] has added [amount] units of [chosen] to \the [A]</span>")
href_list["datumrefresh"] = href_list["addreagent"]
@@ -820,7 +819,7 @@ client
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
message_admins("<span class='notice'>[key_name(usr)] dealt [amount] amount of [Text] damage to [L] </span>")
href_list["datumrefresh"] = href_list["mobToDamage"]
+1 -1
View File
@@ -35,7 +35,7 @@
if(prob(1))
if (affected_mob.nutrition > 100)
affected_mob.Stun(rand(4,6))
affected_mob.visible_message("<span class='warning'>[affected_mob] throws up!</span>")
affected_mob.show_message("<span class='warning'>[affected_mob] throws up!</span>")
playsound(affected_mob.loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = affected_mob.loc
if(istype(location, /turf/simulated))
+4 -4
View File
@@ -24,7 +24,7 @@
if(prob(2))
affected_mob.emote("yawn")
if(prob(2))
affected_mob << "\red Your don't feel like yourself."
affected_mob << "<span class='danger'>Your don't feel like yourself.</span>"
if(prob(5))
affected_mob.adjustBrainLoss(1)
affected_mob.updatehealth()
@@ -37,7 +37,7 @@
affected_mob.adjustBrainLoss(2)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Your try to remember something important...but can't."
affected_mob << "<span class='danger'>Your try to remember something important...but can't.</span>"
if(4)
if(prob(2))
@@ -48,9 +48,9 @@
affected_mob.adjustBrainLoss(3)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "\red Strange buzzing fills your head, removing all thoughts."
affected_mob << "<span class='danger'>Strange buzzing fills your head, removing all thoughts.</span>"
if(prob(3))
affected_mob << "\red You lose consciousness..."
affected_mob << "<span class='danger'>You lose consciousness...</span>"
for(var/mob/O in viewers(affected_mob, null))
O.show_message("[affected_mob] suddenly collapses", 1)
affected_mob.Paralyse(rand(5,10))
+8 -8
View File
@@ -21,11 +21,11 @@
return
*/
if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1) && prob(5))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -33,9 +33,9 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
if(3)
/*
if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
@@ -44,11 +44,11 @@
return
*/
if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1) && prob(1))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -56,9 +56,9 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
if(prob(1) && prob(50))
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
+5 -5
View File
@@ -16,7 +16,7 @@
if(2)
affected_mob.bodytemperature -= 10
if(prob(1) && prob(10))
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))
@@ -24,9 +24,9 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
if(prob(5))
affected_mob << "\red You feel stiff."
affected_mob << "<span class='danger'>You feel stiff.</span>"
if(3)
affected_mob.bodytemperature -= 20
if(prob(1))
@@ -34,6 +34,6 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
if(prob(10))
affected_mob << "\red You feel stiff."
affected_mob << "<span class='danger'>You feel stiff.</span>"
+4 -4
View File
@@ -23,11 +23,11 @@
if(prob(8))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
@@ -42,7 +42,7 @@
src.original_dna["UI"] = affected_mob.dna.uni_identity
src.original_dna["SE"] = affected_mob.dna.struc_enzymes
affected_mob << "\red You don't feel like yourself.."
affected_mob << "<span class='danger'>You don't feel like yourself..</span>"
affected_mob.dna.uni_identity = strain_data["UI"]
updateappearance(affected_mob)
affected_mob.dna.struc_enzymes = strain_data["SE"]
@@ -62,5 +62,5 @@
affected_mob.dna.struc_enzymes = original_dna["SE"]
affected_mob.real_name = original_dna["name"]
affected_mob << "\blue You feel more like yourself."
affected_mob << "<span class='notice'>You feel more like yourself.</span>"
..()
+1 -1
View File
@@ -22,7 +22,7 @@
else if(prob(5))
affected_mob.emote("gasp")
if(prob(10))
affected_mob << "\red You're starting to feel very weak..."
affected_mob << "<span class='danger'>You're starting to feel very weak...</span>"
if(4)
if(prob(10))
affected_mob.emote("cough")
+6 -6
View File
@@ -22,7 +22,7 @@
return
*/
if(affected_mob.lying && prob(20)) //added until sleeping is fixed --Blaank
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
if(prob(1))
@@ -30,11 +30,11 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
@@ -47,7 +47,7 @@
return
*/
if(affected_mob.lying && prob(15)) //added until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
stage--
return
if(prob(1))
@@ -55,11 +55,11 @@
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your muscles ache."
affected_mob << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(1))
affected_mob << "\red Your stomach hurts."
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
+2 -2
View File
@@ -21,7 +21,7 @@
if(prob(5))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red You're burning in your own skin!"
affected_mob << "<span class='danger'>You're burning in your own skin!</span>"
affected_mob.take_organ_damage(0,5)
if(3)
@@ -31,6 +31,6 @@
if(prob(5))
affected_mob.emote("cough")
if(prob(5))
affected_mob << "\red You're burning in your own skin!"
affected_mob << "<span class='danger'>You're burning in your own skin!</span>"
affected_mob.take_organ_damage(0,5)
return
+2 -2
View File
@@ -26,14 +26,14 @@
else if(prob(5))
affected_mob.emote("gasp")
if(prob(10))
affected_mob << "\red You're starting to feel very weak..."
affected_mob << "<span class='danger'>You're starting to feel very weak...</span>"
if(4)
if(prob(10))
affected_mob.emote("cough")
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
affected_mob << "\red Your body feels as if it's trying to rip itself open..."
affected_mob << "<span class='danger'>Your body feels as if it's trying to rip itself open...</span>"
if(prob(50))
affected_mob.gib()
else
+5 -5
View File
@@ -16,7 +16,7 @@
switch(stage)
if(2)
if(prob(2))
affected_mob << "\red You feel a slight shock course through your body."
affected_mob << "<span class='danger'>You feel a slight shock course through your body.</span>"
if(prob(2))
for(var/obj/M in orange(2,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
@@ -36,9 +36,9 @@
*/
if(3)
if(prob(2))
affected_mob << "\red You feel a strong shock course through your body."
affected_mob << "<span class='danger'>You feel a strong shock course through your body.</span>"
if(prob(2))
affected_mob << "\red You feel like clowning around."
affected_mob << "<span class='danger'>You feel like clowning around.</span>"
if(prob(4))
for(var/obj/M in orange(4,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
@@ -64,9 +64,9 @@
*/
if(4)
if(prob(2))
affected_mob << "\red You feel a powerful shock course through your body."
affected_mob << "<span class='danger'>You feel a powerful shock course through your body.</span>"
if(prob(2))
affected_mob << "\red You query upon the nature of miracles."
affected_mob << "<span class='danger'>You query upon the nature of miracles.</span>"
if(prob(8))
for(var/obj/M in orange(6,affected_mob))
if(!M.anchored && (M.flags & CONDUCT))
+3 -3
View File
@@ -16,10 +16,10 @@
..()
switch(stage)
if(1)
if(prob(10)) affected_mob << "\red You feel a little silly."
if(prob(10)) affected_mob << "<span class='danger'>You feel a little silly.</span>"
if(2)
if(prob(10)) affected_mob << "\red You start seeing rainbows."
if(prob(10)) affected_mob << "<span class='danger'>You start seeing rainbows.</span>"
if(3)
if(prob(10)) affected_mob << "\red Your thoughts are interrupted by a loud <b>HONK!</b>"
if(prob(10)) affected_mob << "<span class='danger'>Your thoughts are interrupted by a loud <b>HONK!</b></span>"
if(4)
if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
+10 -10
View File
@@ -38,15 +38,15 @@
return
*/
if(affected_mob.lying && prob(30)) //changed FROM prob(20) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(8))
affected_mob << "\red Your head hurts."
affected_mob << "<span class='danger'>Your head hurts.</span>"
if (prob(9))
affected_mob << "You feel a tingling sensation in your chest."
if (prob(9))
affected_mob << "\red You feel angry."
affected_mob << "<span class='danger'>You feel angry.</span>"
if(2)
if(restcure)
/*
@@ -56,18 +56,18 @@
return
*/
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(8))
affected_mob << "\red Your skin feels loose."
affected_mob << "<span class='danger'>Your skin feels loose.</span>"
if (prob(10))
affected_mob << "You feel very strange."
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head!"
affected_mob << "<span class='danger'>You feel a stabbing pain in your head!</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red Your stomach churns."
affected_mob << "<span class='danger'>Your stomach churns.</span>"
if(3)
if(restcure)
/*
@@ -77,11 +77,11 @@
return
*/
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(10))
affected_mob << "\red Your entire body vibrates."
affected_mob << "<span class='danger'>Your entire body vibrates.</span>"
if (prob(35))
if(prob(50)) scramble_dna(affected_mob, 1, 0, rand(15,45))
@@ -96,7 +96,7 @@
return
*/
if(affected_mob.lying && prob(5)) //changed FROM prob(5) until sleeping is fixed
affected_mob << "\blue You feel better."
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if (prob(60))
+5 -5
View File
@@ -22,29 +22,29 @@
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(prob(1))
affected_mob << "\red You feel strange..."
affected_mob << "<span class='danger'>You feel strange...</span>"
if(3)
if(affected_mob.ckey == "rosham")
src.cure()
if(prob(5))
affected_mob << "\red You feel the urge to dance..."
affected_mob << "<span class='danger'>You feel the urge to dance...</span>"
else if(prob(5))
affected_mob.emote("gasp")
else if(prob(10))
affected_mob << "\red You feel the need to chick chicky boom..."
affected_mob << "<span class='danger'>You feel the need to chick chicky boom...</span>"
if(4)
if(affected_mob.ckey == "rosham")
src.cure()
if(prob(10))
affected_mob.emote("gasp")
affected_mob << "\red You feel a burning beat inside..."
affected_mob << "<span class='danger'>You feel a burning beat inside...</span>"
if(prob(20))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
if(affected_mob.ckey == "rosham")
src.cure()
affected_mob << "\red Your body is unable to contain the Rhumba Beat..."
affected_mob << "<span class='danger'>Your body is unable to contain the Rhumba Beat...</span>"
if(prob(50))
affected_mob.gib()
else
@@ -22,12 +22,12 @@
affected_mob << "Your joints feel stiff."
affected_mob.take_organ_damage(1)
if (prob(9))
affected_mob << "\red Beep...boop.."
affected_mob << "<span class='danger'>Beep...boop..</span>"
if (prob(9))
affected_mob << "\red Bop...beeep..."
affected_mob << "<span class='danger'>Bop...beeep...</span>"
if(3)
if (prob(8))
affected_mob << "\red Your joints feel very stiff."
affected_mob << "<span class='danger'>Your joints feel very stiff.</span>"
affected_mob.take_organ_damage(1)
if (prob(8))
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
@@ -35,20 +35,20 @@
affected_mob << "Your skin feels loose."
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
affected_mob << "<span class='danger'>You feel a stabbing pain in your head.</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
affected_mob << "<span class='danger'>You can feel something move...inside.</span>"
if(4)
if (prob(10))
affected_mob << "\red Your skin feels very loose."
affected_mob << "<span class='danger'>Your skin feels very loose.</span>"
affected_mob.take_organ_damage(8)
if (prob(20))
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
if (prob(8))
affected_mob << "\red You can feel... something...inside you."
affected_mob << "<span class='danger'>You can feel... something...inside you.</span>"
if(5)
affected_mob <<"\red Your skin feels as if it's about to burst off..."
affected_mob <<"<span class='danger'>Your skin feels as if it's about to burst off...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
+14 -15
View File
@@ -58,7 +58,6 @@
var/mob/living/new_mob = new new_form(affected_mob.loc)
if(istype(new_mob))
new_mob.a_intent = "harm"
new_mob.universal_speak = 1
if(affected_mob.mind)
affected_mob.mind.transfer_to(new_mob)
else
@@ -126,10 +125,10 @@
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
hidden = list(0, 0)
stage1 = null
stage2 = list("Your joints feel stiff.", "\red Beep...boop..")
stage3 = list("\red Your joints feel very stiff.", "Your skin feels loose.", "\red You can feel something move...inside.")
stage4 = list("\red Your skin feels very loose.", "\red You can feel... something...inside you.")
stage5 = list("\red Your skin feels as if it's about to burst off!")
stage2 = list("Your joints feel stiff.", "<span class='danger'>Beep...boop..</span>")
stage3 = list("<span class='danger'>Your joints feel very stiff.</span>", "Your skin feels loose.", "<span class='danger'>You can feel something move...inside.</span>")
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
new_form = /mob/living/silicon/robot
/datum/disease/transformation/robot/stage_act()
@@ -155,10 +154,10 @@
agent = "Rip-LEY Alien Microbes"
hidden = list(0, 0)
stage1 = null
stage2 = list("Your throat feels scratchy.", "\red Kill...")
stage3 = list("\red Your throat feels very scratchy.", "Your skin feels tight.", "\red You can feel something move...inside.")
stage4 = list("\red Your skin feels very tight.", "\red Your blood boils!", "\red You can feel... something...inside you.")
stage5 = list("\red Your skin feels as if it's about to burst off!")
stage2 = list("Your throat feels scratchy.", "<span class='danger'>Kill...</span>")
stage3 = list("<span class='danger'>Your throat feels very scratchy.</span>", "Your skin feels tight.", "<span class='danger'>You can feel something move...inside.</span>")
stage4 = list("<span class='danger'>Your skin feels very tight.</span>", "<span class='danger'>Your blood boils!</span>", "<span class='danger'>You can feel... something...inside you.</span>")
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
new_form = /mob/living/carbon/alien/humanoid/hunter
/datum/disease/transformation/xeno/stage_act()
@@ -183,9 +182,9 @@
hidden = list(0, 0)
stage1 = list("You don't feel very well.")
stage2 = list("You are turning a little green.")
stage3 = list("\red Your limbs are getting oozy.", "\red Your skin begins to peel away.")
stage4 = list("\red You are turning into a slime.")
stage5 = list("\red You have become a slime.")
stage3 = list("<span class='danger'>Your limbs are getting oozy.</span>", "<span class='danger'>Your skin begins to peel away.</span>")
stage4 = list("<span class='danger'>You are turning into a slime.</span>")
stage5 = list("<span class='danger'>You have become a slime.</span>")
new_form = /mob/living/carbon/slime
/datum/disease/transformation/slime/stage_act()
@@ -208,9 +207,9 @@
hidden = list(0, 0)
stage1 = list("BARK.")
stage2 = list("You feel the need to wear silly hats.")
stage3 = list("\red Must... eat... chocolate....", "\red YAP")
stage4 = list("\red Visions of washing machines assail your mind!")
stage5 = list("\red AUUUUUU!!!")
stage3 = list("<span class='danger'>Must... eat... chocolate....</span>", "<span class='danger'>YAP</span>")
stage4 = list("<span class='danger'>Visions of washing machines assail your mind!</span>")
stage5 = list("<span class='danger'>AUUUUUU!!!</span>")
new_form = /mob/living/simple_animal/corgi
/datum/disease/transformation/corgi/stage_act()
+3 -3
View File
@@ -32,14 +32,14 @@ STI KALY - blind
if(prob(1)&&prob(50))
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", "Feel the power of the Dark Side!"))
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")]"
affected_mob << "<span class='danger'>You feel [pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")].</span>"
if(3)
if(prob(1)&&prob(50))
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!", "STI KALY!", "TARCOL MINTI ZHERI!"))
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("the magic bubbling in your veins","that this location gives you a +1 to INT","an urge to summon familiar.")]."
affected_mob << "\<span class='danger'>You feel [pick("the magic bubbling in your veins","that this location gives you a +1 to INT","an urge to summon familiar.")].</span>"
if(4)
@@ -47,7 +47,7 @@ STI KALY - blind
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!","STI KALY!","EI NATH!"))
return
if(prob(1)&&prob(50))
affected_mob << "\red You feel [pick("the tidal wave of raw power building inside","that this location gives you a +2 to INT and +1 to WIS","an urge to teleport")]."
affected_mob << "<span class='danger'>You feel [pick("the tidal wave of raw power building inside","that this location gives you a +2 to INT and +1 to WIS","an urge to teleport")].</span>"
spawn_wizard_clothes(50)
if(prob(1)&&prob(1))
teleport()
+8 -8
View File
@@ -20,12 +20,12 @@
affected_mob << "Your throat feels scratchy."
affected_mob.take_organ_damage(1)
if (prob(9))
affected_mob << "\red Kill..."
affected_mob << "<span class='danger'>Kill...</span>"
if (prob(9))
affected_mob << "\red Kill..."
affected_mob << "<span class='danger'>Kill...</span>"
if(3)
if (prob(8))
affected_mob << "\red Your throat feels very scratchy."
affected_mob << "<span class='danger'>Your throat feels very scratchy.</span>"
affected_mob.take_organ_damage(1)
/*
if (prob(8))
@@ -35,20 +35,20 @@
affected_mob << "Your skin feels tight."
affected_mob.take_organ_damage(5)
if (prob(4))
affected_mob << "\red You feel a stabbing pain in your head."
affected_mob << "<span class='danger'>You feel a stabbing pain in your head.</span>"
affected_mob.Paralyse(2)
if (prob(4))
affected_mob << "\red You can feel something move...inside."
affected_mob << "<span class='danger'>You can feel something move...inside.</span>"
if(4)
if (prob(10))
affected_mob << pick("\red Your skin feels very tight.", "\red Your blood boils!")
affected_mob << pick("<span class='danger'>Your skin feels very tight.</span>", "<span class='danger'>Your blood boils!</span>")
affected_mob.take_organ_damage(8)
if (prob(20))
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
if (prob(8))
affected_mob << "\red You can feel... something...inside you."
affected_mob << "<span class='danger'>You can feel... something...inside you.</span>"
if(5)
affected_mob <<"\red Your skin feels impossibly calloused..."
affected_mob <<"<span class='danger'>Your skin feels impossibly calloused...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
+738 -738
View File
File diff suppressed because it is too large Load Diff
+77 -77
View File
@@ -7,97 +7,97 @@
var/result
var/list/steps_desc
New(atom)
..()
holder = atom
if(!holder) //don't want this without a holder
qdel(src)
/datum/construction/New(atom)
..()
holder = atom
if(!holder) //don't want this without a holder
qdel(src)
set_desc(steps.len)
return
/datum/construction/proc/next_step()
steps.len--
if(!steps.len)
spawn_result()
else
set_desc(steps.len)
return
return
proc/next_step()
steps.len--
if(!steps.len)
spawn_result()
else
set_desc(steps.len)
return
/datum/construction/proc/action(atom/used_atom,mob/user as mob)
return
proc/action(atom/used_atom,mob/user as mob)
return
/datum/construction/proc/check_step(atom/used_atom,mob/user as mob) //check last step only
var/valid_step = is_right_key(used_atom)
if(valid_step)
if(custom_action(valid_step, used_atom, user))
next_step()
return 1
return 0
proc/check_step(atom/used_atom,mob/user as mob) //check last step only
var/valid_step = is_right_key(used_atom)
if(valid_step)
if(custom_action(valid_step, used_atom, user))
next_step()
return 1
return 0
/datum/construction/proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
if(istype(used_atom, L["key"]))
return steps.len
return 0
proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
/datum/construction/proc/custom_action(step, used_atom, user)
return 1
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
if(istype(used_atom, L["key"]))
return steps.len
return 0
proc/custom_action(step, used_atom, user)
return 1
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
if(istype(used_atom, L["key"]))
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
listclearnulls(steps);
if(!steps.len)
spawn_result()
return 1
return 0
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
listclearnulls(steps);
if(!steps.len)
spawn_result()
return 1
return 0
proc/spawn_result()
if(result)
new result(get_turf(holder))
qdel(holder)
return
/datum/construction/proc/spawn_result()
if(result)
new result(get_turf(holder))
qdel(holder)
return
proc/set_desc(index as num)
var/list/step = steps[index]
holder.desc = step["desc"]
return
/datum/construction/proc/set_desc(index as num)
var/list/step = steps[index]
holder.desc = step["desc"]
return
/datum/construction/reversible
var/index
New(atom)
..()
index = steps.len
return
/datum/construction/reversible/New(atom)
..()
index = steps.len
return
proc/update_index(diff as num)
index+=diff
if(index==0)
spawn_result()
else
set_desc(index)
return
/datum/construction/reversible/proc/update_index(diff as num)
index+=diff
if(index==0)
spawn_result()
else
set_desc(index)
return
is_right_key(atom/used_atom) // returns index step
var/list/L = steps[index]
if(istype(used_atom, L["key"]))
return FORWARD //to the first step -> forward
else if(L["backkey"] && istype(used_atom, L["backkey"]))
return BACKWARD //to the last step -> backwards
return 0
/datum/construction/reversible/is_right_key(atom/used_atom) // returns index step
var/list/L = steps[index]
if(istype(used_atom, L["key"]))
return FORWARD //to the first step -> forward
else if(L["backkey"] && istype(used_atom, L["backkey"]))
return BACKWARD //to the last step -> backwards
return 0
check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff)
return 1
return 0
/datum/construction/reversible/check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff)
return 1
return 0
custom_action(index, diff, used_atom, user)
return 1
/datum/construction/reversible/custom_action(index, diff, used_atom, user)
return 1
+51 -50
View File
@@ -6,62 +6,63 @@
/datum/events
var/list/events
New()
..()
events = new
/datum/events/New()
..()
events = new
proc/addEventType(event_type as text)
if(!(event_type in events) || !islist(events[event_type]))
events[event_type] = list()
return 1
return
// Arguments: event_type as text, proc_holder as datum, proc_name as text
// Returns: New event, null on error.
proc/addEvent(event_type as text, proc_holder, proc_name as text)
if(!event_type || !proc_holder || !proc_name)
return
addEventType(event_type)
var/list/event = events[event_type]
var/datum/event/E = new /datum/event(proc_holder,proc_name)
event += E
return E
// Arguments: event_type as text, any number of additional arguments to pass to event handler
// Returns: null
proc/fireEvent()
//world << "Events in [args[1]] called"
var/list/event = listgetindex(events,args[1])
if(istype(event))
spawn(-1)
for(var/datum/event/E in event)
if(!E.Fire(arglist(args.Copy(2))))
clearEvent(args[1],E)
return
// Arguments: event_type as text, E as /datum/event
// Returns: 1 if event cleared, null on error
proc/clearEvent(event_type as text, datum/event/E)
if(!event_type || !E)
return
var/list/event = listgetindex(events,event_type)
event -= E
/datum/events/proc/addEventType(event_type as text)
if(!(event_type in events) || !islist(events[event_type]))
events[event_type] = list()
return 1
return
// Arguments: event_type as text, proc_holder as datum, proc_name as text
// Returns: New event, null on error.
/datum/events/proc/addEvent(event_type as text, proc_holder, proc_name as text)
if(!event_type || !proc_holder || !proc_name)
return
addEventType(event_type)
var/list/event = events[event_type]
var/datum/event/E = new /datum/event(proc_holder,proc_name)
event += E
return E
// Arguments: event_type as text, any number of additional arguments to pass to event handler
// Returns: null
/datum/events/proc/fireEvent()
//world << "Events in [args[1]] called"
var/list/event = listgetindex(events,args[1])
if(istype(event))
spawn(-1)
for(var/datum/event/E in event)
if(!E.Fire(arglist(args.Copy(2))))
clearEvent(args[1],E)
return
// Arguments: event_type as text, E as /datum/event
// Returns: 1 if event cleared, null on error
/datum/events/proc/clearEvent(event_type as text, datum/event/E)
if(!event_type || !E)
return
var/list/event = listgetindex(events,event_type)
event -= E
return 1
/datum/event
var/listener
var/proc_name
New(tlistener,tprocname)
listener = tlistener
proc_name = tprocname
return ..()
/datum/event/New(tlistener,tprocname)
listener = tlistener
proc_name = tprocname
return ..()
proc/Fire()
//world << "Event fired"
if(listener)
call(listener,proc_name)(arglist(args))
return 1
return
/datum/event/proc/Fire()
//world << "Event fired"
if(listener)
call(listener,proc_name)(arglist(args))
return 1
return
+85 -85
View File
@@ -57,104 +57,104 @@ Data storage vars:
var/result
var/state = 0
New(list/arguments=null,autostart=1)
delay = delay>0?(delay):1
if(forbid_garbage) //prevents garbage collection with tag != null
tag = "\ref[src]"
set_process_args(arguments)
if(autostart)
start()
return
/datum/global_iterator/New(list/arguments=null,autostart=1)
delay = delay>0?(delay):1
if(forbid_garbage) //prevents garbage collection with tag != null
tag = "\ref[src]"
set_process_args(arguments)
if(autostart)
start()
return
Destroy()
tag = null
arg_list.Cut()
stop()
//Do not call ..()
/datum/global_iterator/Destroy()
tag = null
arg_list.Cut()
stop()
//Do not call ..()
proc/main()
state = 1
while(src && control_switch)
last_exec = world.timeofday
if(check_for_null && has_null_args())
stop()
/datum/global_iterator/proc/main()
state = 1
while(src && control_switch)
last_exec = world.timeofday
if(check_for_null && has_null_args())
stop()
return 0
result = process(arglist(arg_list))
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
if(!control_switch)
return 0
result = process(arglist(arg_list))
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
if(!control_switch)
return 0
sleep(1)
return 0
proc/start(list/arguments=null)
if(active())
return
if(arguments)
if(!set_process_args(arguments))
return 0
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
return
control_switch = 1
spawn()
state = main()
return 1
proc/stop()
if(!active())
return
control_switch = 0
spawn(-1) //report termination error but don't wait for state_check().
state_check()
return 1
proc/state_check()
var/lag = 0
while(state)
sleep(1)
if(++lag>10)
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1
return 0
proc/process()
/datum/global_iterator/proc/start(list/arguments=null)
if(active())
return
if(arguments)
if(!set_process_args(arguments))
return 0
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
return
control_switch = 1
spawn()
state = main()
return 1
proc/active()
return control_switch
/datum/global_iterator/proc/stop()
if(!active())
return
control_switch = 0
spawn(-1) //report termination error but don't wait for state_check().
state_check()
return 1
proc/has_null_args()
if(null in arg_list)
return 1
/datum/global_iterator/proc/state_check()
var/lag = 0
while(state)
sleep(1)
if(++lag>10)
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1
/datum/global_iterator/proc/process()
return
/datum/global_iterator/proc/active()
return control_switch
/datum/global_iterator/proc/has_null_args()
if(null in arg_list)
return 1
return 0
/datum/global_iterator/proc/set_delay(new_delay)
if(isnum(new_delay))
delay = max(1, round(new_delay))
return 1
else
return 0
/datum/global_iterator/proc/get_last_exec_time()
return (last_exec||0)
proc/set_delay(new_delay)
if(isnum(new_delay))
delay = max(1, round(new_delay))
return 1
else
return 0
/datum/global_iterator/proc/get_last_exec_time_as_text()
return (time2text(last_exec)||"Wasn't executed yet")
proc/get_last_exec_time()
return (last_exec||0)
/datum/global_iterator/proc/set_process_args(list/arguments)
if(arguments && istype(arguments, /list) && arguments.len)
arg_list = arguments
return 1
else
// world << "\red Invalid arguments supplied for [src.type], ref = \ref[src]"
return 0
proc/get_last_exec_time_as_text()
return (time2text(last_exec)||"Wasn't executed yet")
/datum/global_iterator/proc/toggle_null_checks()
check_for_null = !check_for_null
return check_for_null
proc/set_process_args(list/arguments)
if(arguments && istype(arguments, /list) && arguments.len)
arg_list = arguments
return 1
else
// world << "\red Invalid arguments supplied for [src.type], ref = \ref[src]"
return 0
proc/toggle_null_checks()
check_for_null = !check_for_null
return check_for_null
proc/toggle()
if(!stop())
start()
return active()
/datum/global_iterator/proc/toggle()
if(!stop())
start()
return active()
+44 -44
View File
@@ -2,59 +2,59 @@
var/href
var/list/href_list
New(thref,list/thref_list)
href = thref
href_list = thref_list.Copy()
return
/datum/topic_input/New(thref,list/thref_list)
href = thref
href_list = thref_list.Copy()
return
proc/get(i)
return listgetindex(href_list,i)
/datum/topic_input/proc/get(i)
return listgetindex(href_list,i)
proc/getAndLocate(i)
var/t = get(i)
if(t)
t = locate(t)
return t || null
/datum/topic_input/proc/getAndLocate(i)
var/t = get(i)
if(t)
t = locate(t)
return t || null
proc/getNum(i)
var/t = get(i)
if(t)
t = text2num(t)
return isnum(t) ? t : null
/datum/topic_input/proc/getNum(i)
var/t = get(i)
if(t)
t = text2num(t)
return isnum(t) ? t : null
proc/getObj(i)
var/t = getAndLocate(i)
return isobj(t) ? t : null
/datum/topic_input/proc/getObj(i)
var/t = getAndLocate(i)
return isobj(t) ? t : null
proc/getMob(i)
var/t = getAndLocate(i)
return ismob(t) ? t : null
/datum/topic_input/proc/getMob(i)
var/t = getAndLocate(i)
return ismob(t) ? t : null
proc/getTurf(i)
var/t = getAndLocate(i)
return isturf(t) ? t : null
/datum/topic_input/proc/getTurf(i)
var/t = getAndLocate(i)
return isturf(t) ? t : null
proc/getAtom(i)
return getType(i,/atom)
/datum/topic_input/proc/getAtom(i)
return getType(i,/atom)
proc/getArea(i)
var/t = getAndLocate(i)
return isarea(t) ? t : null
/datum/topic_input/proc/getArea(i)
var/t = getAndLocate(i)
return isarea(t) ? t : null
proc/getStr(i)//params should always be text, but...
var/t = get(i)
return istext(t) ? t : null
/datum/topic_input/proc/getStr(i)//params should always be text, but...
var/t = get(i)
return istext(t) ? t : null
proc/getType(i,type)
var/t = getAndLocate(i)
return istype(t,type) ? t : null
/datum/topic_input/proc/getType(i,type)
var/t = getAndLocate(i)
return istype(t,type) ? t : null
proc/getPath(i)
var/t = get(i)
if(t)
t = text2path(t)
return ispath(t) ? t : null
/datum/topic_input/proc/getPath(i)
var/t = get(i)
if(t)
t = text2path(t)
return ispath(t) ? t : null
proc/getList(i)
var/t = getAndLocate(i)
return islist(t) ? t : null
/datum/topic_input/proc/getList(i)
var/t = getAndLocate(i)
return islist(t) ? t : null
+978 -972
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -144,7 +144,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells
before_cast(targets)
invocation()
user.attack_log += text("\[[time_stamp()]\] <font color='red'>[user.real_name] ([user.ckey]) cast the spell [name].</font>")
user.attack_log += text("\[[time_stamp()]\] <span class='danger'>[user.real_name] ([user.ckey]) cast the spell [name].</span>")
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
+1 -1
View File
@@ -35,7 +35,7 @@
targets -= spawn_place
if(ispath(summoned_object_type,/turf))
if(istype(get_turf(usr),/turf/simulated/shuttle))
usr << "\red You can't build things on shuttles!"
usr << "<span class='danger'>You can't build things on shuttles!</span>"
break
var/turf/O = spawn_place
var/N = summoned_object_type
+2 -2
View File
@@ -37,7 +37,7 @@
clothes_req = 1
invocation = "BIRUZ BENNAR"
invocation_type = "shout"
message = "\blue You feel strong! You feel a pressure building behind your eyes!"
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
range = -1
include_user = 1
centcom_cancast = 0
@@ -198,7 +198,7 @@
clothes_req = 0
invocation = "STI KALY"
invocation_type = "whisper"
message = "\blue Your eyes cry out in pain!"
message = "<span class='notice'>Your eyes cry out in pain!</span>"
cooldown_min = 50 //12 deciseconds reduction per rank
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind")
+19
View File
@@ -649,6 +649,15 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
access = access_teleporter
/datum/supply_packs/science/transfer_valves
name = "Tank Transfer Valves"
contains = list(/obj/item/device/transfer_valve,
/obj/item/device/transfer_valve)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "transfer valves crate"
access = access_rd
//////////////////////////////////////////////////////////////////////////////
//////////////////////////// Organic /////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -930,6 +939,16 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 40 // it costs so much because the Space Church is ran by Space Jews
containername = "religious supplies crate"
/datum/supply_packs/misc/posters
name = "Corporate Posters Crate"
contains = list(/obj/item/weapon/contraband/poster/legit,
/obj/item/weapon/contraband/poster/legit,
/obj/item/weapon/contraband/poster/legit,
/obj/item/weapon/contraband/poster/legit,
/obj/item/weapon/contraband/poster/legit)
cost = 8
containername = "Corporate Posters Crate"
///////////// Paper Work
+1 -1
View File
@@ -395,7 +395,7 @@ var/list/uplink_items = list()
desc = "The Syndicate Bomb has an adjustable timer with a minimum setting of 60 seconds. Ordering the bomb sends you a small beacon, which will teleport the explosive to your location when you activate it. \
You can wrench the bomb down to prevent removal. The crew may attempt to defuse the bomb."
item = /obj/item/device/sbeacondrop/bomb
cost = 5
cost = 6
excludefrom = list(/datum/game_mode/traitor/double_agents)
/datum/uplink_item/device_tools/rad_laser

Some files were not shown because too many files have changed in this diff Show More