Skip to content

Commit

Permalink
Merge pull request tgstation#128 from rainbowjose/master
Browse files Browse the repository at this point in the history
upd
  • Loading branch information
rainbowjose authored Feb 11, 2017
2 parents c647cec + 3eb0321 commit dfeca36
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 173 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ There are two key points here:
Remember, this tradeoff makes sense in many cases but not all, you should think carefully about your implementation before deciding if this is an appropriate thing to do

###Prefer `Initialize` over `New` for atoms
Our game controller is pretty good at handling long operations and lag. But, it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`, and only use `New` if you need to pass arguments other than `loc` on construction. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/master/code/game/atoms.dm#L438
Our game controller is pretty good at handling long operations and lag. But, it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`, and only use `New` if you need to pass arguments other than `loc` on construction. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/master/code/game/atoms.dm#L49

###No magic numbers or strings
Make these #defines with a name that more clearly states what it's for.
Expand Down
211 changes: 91 additions & 120 deletions _maps/map_files/Deltastation/DeltaStation2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -20993,6 +20993,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 5
},
/obj/structure/chair/stool,
/turf/open/floor/plasteel/redyellow,
/area/crew_quarters/bar/atrium)
"aMI" = (
Expand Down Expand Up @@ -24027,6 +24028,7 @@
/area/crew_quarters/bar/atrium)
"aRI" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/structure/chair/stool,
/turf/open/floor/plasteel/redyellow,
/area/crew_quarters/bar/atrium)
"aRJ" = (
Expand Down Expand Up @@ -78208,7 +78210,7 @@
/turf/closed/wall,
/area/maintenance/electrical)
"cHL" = (
/obj/machinery/atmospherics/pipe/manifold/supply/visible{
/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
tag = "icon-manifold (NORTH)";
icon_state = "manifold";
dir = 1
Expand Down Expand Up @@ -107878,15 +107880,6 @@
pixel_y = 3
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/doorButtons/access_button{
dir = 1;
idDoor = "virology_airlock_exterior";
idSelf = "virology_airlock_control";
name = "Virology Access Button";
pixel_x = 0;
pixel_y = -24;
req_access_txt = "39"
},
/turf/open/floor/plasteel/whitegreen/corner{
dir = 8
},
Expand Down Expand Up @@ -108190,6 +108183,15 @@
name = "Virology Exterior Airlock";
req_access_txt = "39"
},
/obj/machinery/doorButtons/access_button{
dir = 1;
idDoor = "virology_airlock_exterior";
idSelf = "virology_airlock_control";
name = "Virology Access Button";
pixel_x = -24;
pixel_y = -2;
req_access_txt = "39"
},
/turf/open/floor/plasteel{
tag = "icon-plasteel_warn_side (EAST)"
},
Expand Down Expand Up @@ -108660,6 +108662,12 @@
/turf/open/floor/plating,
/area/medical/virology)
"dKi" = (
/obj/item/weapon/twohanded/required/kirbyplants{
icon_state = "plant-21";
layer = 4.1;
pixel_x = -3;
pixel_y = 3
},
/turf/open/floor/plasteel/whitegreen/corner{
dir = 1
},
Expand Down Expand Up @@ -109068,6 +109076,14 @@
name = "Virology Interior Airlock";
req_access_txt = "39"
},
/obj/machinery/doorButtons/access_button{
idDoor = "virology_airlock_interior";
idSelf = "virology_airlock_control";
name = "Virology Access Button";
pixel_x = 0;
pixel_y = 22;
req_access_txt = "39"
},
/turf/open/floor/plasteel,
/area/medical/virology)
"dKZ" = (
Expand Down Expand Up @@ -118113,8 +118129,8 @@
},
/area/crew_quarters/electronic_marketing_den)
"ecc" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/closed/wall,
/obj/structure/closet/wardrobe/grey,
/turf/open/floor/plasteel/neutral,
/area/crew_quarters/electronic_marketing_den)
"ecd" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
Expand Down Expand Up @@ -118148,23 +118164,29 @@
/turf/open/floor/plasteel,
/area/hydroponics/Abandoned_Garden)
"ech" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/unary/vent_scrubber{
dir = 4;
on = 1;
scrub_Toxins = 0
/obj/machinery/button/door{
id = "Dorm2";
name = "Dormitory Door Lock";
normaldoorcontrol = 1;
pixel_x = -26;
pixel_y = 7;
req_access_txt = "0";
specialfunctions = 4
},
/turf/open/floor/plasteel/hydrofloor,
/area/hydroponics/Abandoned_Garden)
/turf/open/floor/wood,
/area/crew_quarters/sleep)
"eci" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
tag = "icon-manifold (EAST)";
icon_state = "manifold";
dir = 4
/obj/machinery/button/door{
id = "Dorm4";
name = "Dormitory Door Lock";
normaldoorcontrol = 1;
pixel_x = -26;
pixel_y = 7;
req_access_txt = "0";
specialfunctions = 4
},
/turf/open/floor/plasteel/hydrofloor,
/area/hydroponics/Abandoned_Garden)
/turf/open/floor/wood,
/area/crew_quarters/sleep)
"ecj" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/hydrofloor,
Expand Down Expand Up @@ -118500,102 +118522,51 @@
/obj/machinery/deepfryer,
/turf/open/floor/plasteel/red,
/area/crew_quarters/kitchen)
"ecc" = (
/obj/structure/closet/wardrobe/green,
/turf/open/floor/plasteel/neutral/side,
/area/shuttle/arrival)
"ecd" = (
/obj/machinery/doorButtons/access_button{
"edc" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/closed/wall,
/area/crew_quarters/electronic_marketing_den)
"edd" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/unary/vent_scrubber{
dir = 4;
idDoor = "virology_airlock_interior";
idSelf = "virology_airlock_control";
name = "Virology Access Button";
pixel_x = -10;
pixel_y = 0;
req_access_txt = "39"
},
/turf/closed/wall/r_wall,
/area/medical/virology)
"ece" = (
/obj/structure/cable/white{
d2 = 2;
icon_state = "0-2";
tag = "icon-0-2"
},
/turf/closed/wall/r_wall,
/area/medical/virology)
"ecf" = (
/obj/structure/cable/white{
tag = "icon-4-8";
icon_state = "4-8"
},
/obj/structure/cable/white{
tag = "icon-2-4";
icon_state = "2-4"
},
/obj/structure/cable/white{
tag = "icon-1-4";
icon_state = "1-4"
on = 1;
scrub_Toxins = 0
},
/obj/effect/turf_decal/stripes/line{
dir = 2
/turf/open/floor/plasteel/hydrofloor,
/area/hydroponics/Abandoned_Garden)
"ede" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
tag = "icon-manifold (EAST)";
icon_state = "manifold";
dir = 4
},
/turf/open/floor/plasteel/hydrofloor,
/area/hydroponics/Abandoned_Garden)
"edf" = (
/obj/structure/table/wood,
/obj/item/clothing/head/hardhat/cakehat,
/turf/open/floor/plasteel/redyellow,
/area/crew_quarters/bar/atrium)
"edg" = (
/obj/machinery/doorButtons/airlock_controller{
idExterior = "virology_airlock_exterior";
idInterior = "virology_airlock_interior";
idSelf = "virology_airlock_control";
name = "Virology Access Console";
pixel_x = 0;
pixel_y = 22;
pixel_x = -10;
pixel_y = 24;
req_access_txt = "39"
},
/obj/structure/cable/white{
tag = "icon-4-8";
icon_state = "4-8"
},
/turf/open/floor/plasteel{
tag = "icon-plasteel_warn_side (WEST)"
},
/area/medical/virology)
"ecg" = (
/obj/structure/cable/white,
/turf/closed/wall/r_wall,
/area/medical/virology)
"ech" = (
/obj/machinery/button/door{
id = "Dorm2";
name = "Dormitory Door Lock";
normaldoorcontrol = 1;
pixel_x = -26;
pixel_y = 7;
req_access_txt = "0";
specialfunctions = 4
},
/turf/open/floor/wood,
/area/crew_quarters/sleep)
"eci" = (
/obj/machinery/button/door{
id = "Dorm4";
name = "Dormitory Door Lock";
normaldoorcontrol = 1;
pixel_x = -26;
pixel_y = 7;
req_access_txt = "0";
specialfunctions = 4
},
/turf/open/floor/wood,
/area/crew_quarters/sleep)
"ecj" = (
/obj/item/weapon/reagent_containers/food/condiment/saltshaker{
pixel_x = -8;
pixel_y = 5
},
/obj/item/weapon/reagent_containers/food/condiment/peppermill{
pixel_x = -8
},
/obj/structure/table/wood,
/obj/item/clothing/head/hardhat/cakehat{
pixel_x = 4;
pixel_y = 3
},
/turf/open/floor/plasteel/redyellow,
/area/crew_quarters/bar/atrium)

(1,1,1) = {"
aaa
Expand Down Expand Up @@ -149776,7 +149747,7 @@ aic
awb
awX
ayh
ech
edd
azo
azo
aCw
Expand Down Expand Up @@ -150024,7 +149995,7 @@ alb
amb
anl
aoj
ecc
edc
aUJ
ecd
asz
Expand All @@ -150033,7 +150004,7 @@ auT
awc
ecf
ecg
eci
ede
ecj
eck
aCx
Expand Down Expand Up @@ -155695,7 +155666,7 @@ aEf
aFB
aGX
aGY
aGY
aJA
aKZ
aMI
aGY
Expand Down Expand Up @@ -155950,7 +155921,7 @@ aBF
aCP
aEg
aFC
aGY
aGX
aGY
aJA
aLa
Expand Down Expand Up @@ -156213,9 +156184,9 @@ aJA
aLb
aMK
aGY
ecj
edf
aRH
aGY
aJA
aGY
aGZ
aYv
Expand Down Expand Up @@ -165305,7 +165276,7 @@ dGR
cKs
cKs
dJl
ecd
dJp
dKY
dJp
dJp
Expand Down Expand Up @@ -165562,9 +165533,9 @@ dGS
cDe
aaa
aaa
ece
ecf
ecg
dJp
edg
dJp
aaa
aaa
dJp
Expand Down Expand Up @@ -168866,8 +168837,8 @@ cEq
cGb
cHs
cvP
cCg
eci
cCg
cNS
cxw
cvP
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/TgStation/tgstation.2.1.3.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3623,7 +3623,7 @@
"brI" = (/obj/structure/grille,/obj/structure/window/fulltile,/turf/open/floor/plating,/area/quartermaster/office)
"brJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/turf/open/floor/plasteel,/area/hallway/primary/central)
"brK" = (/turf/open/floor/plasteel/red/corner{dir = 2},/area/hallway/primary/central)
"brL" = (/obj/machinery/button/flasher{id = "hopflash"; pixel_x = 6; pixel_y = 36},/obj/machinery/button/door{id = "hop"; name = "Privacy Shutters Control"; pixel_x = 6; pixel_y = 25; req_access_txt = "28"},/obj/machinery/button/door{id = "hopqueue"; name = "Queue Shutters Control"; pixel_x = -4; pixel_y = 25; req_access_txt = "28"},/obj/machinery/light_switch{pixel_x = -4; pixel_y = 36},/obj/machinery/pdapainter,/turf/open/floor/plasteel/blue/side{dir = 9},/area/crew_quarters/heads)
"brL" = (/obj/machinery/button/flasher{id = "hopflash"; pixel_x = 6; pixel_y = 36},/obj/machinery/button/door{id = "hop"; name = "Privacy Shutters Control"; pixel_x = 6; pixel_y = 25; req_access_txt = "57"},/obj/machinery/button/door{id = "hopqueue"; name = "Queue Shutters Control"; pixel_x = -4; pixel_y = 25; req_access_txt = "57"},/obj/machinery/light_switch{pixel_x = -4; pixel_y = 36},/obj/machinery/pdapainter,/turf/open/floor/plasteel/blue/side{dir = 9},/area/crew_quarters/heads)
"brM" = (/obj/structure/table,/obj/machinery/newscaster/security_unit{pixel_x = 0; pixel_y = 32},/obj/item/weapon/hand_labeler,/obj/item/stack/packageWrap,/turf/open/floor/plasteel,/area/crew_quarters/heads)
"brN" = (/obj/machinery/computer/security/telescreen{desc = "Used for watching Prison Wing holding areas."; name = "Prison Monitor"; network = list("Prison"); pixel_x = 0; pixel_y = 30},/obj/machinery/disposal/bin,/obj/structure/disposalpipe/trunk,/turf/open/floor/plasteel,/area/crew_quarters/heads)
"brO" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/bed/dogbed{anchored = 1; desc = "Ian's bed! Looks comfy."; name = "Ian's bed"},/mob/living/simple_animal/pet/dog/corgi/Ian{dir = 8},/turf/open/floor/plasteel,/area/crew_quarters/heads)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var/datum/subsystem/air/SSair
msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|"
msg += "AT/ms:[round(active_turfs.len/cost,0.1)]"
msg += "AT/MS:[round((cost ? active_turfs.len/cost : 0),0.1)]"
..(msg)


Expand Down
Loading

0 comments on commit dfeca36

Please sign in to comment.