Merge remote-tracking branch 'tgstation/master' into who-named-this-damned-proc

This commit is contained in:
Ryll-Ryll
2020-07-16 21:43:14 -04:00
1630 changed files with 271270 additions and 268777 deletions

View File

@@ -4,6 +4,7 @@ indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.yml]
indent_style = space

47
.gitattributes vendored
View File

@@ -1,6 +1,43 @@
# merger hooks, run tools/hooks/install.bat or install.sh to set up
*.dmm merge=dmm
*.dmi merge=dmi
* text=auto
# force changelog merging to use union
html/changelog.html merge=union
## Enforce text mode and LF line breaks
*.bat text eol=lf
*.css text eol=lf
*.css text eol=lf
*.dm text eol=lf
*.dme text eol=lf
*.dmf text eol=lf
*.htm text eol=lf
*.html text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.jsx text eol=lf
*.md text eol=lf
*.py text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.sql text eol=lf
*.svg text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.txt text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
## Enforce binary mode
*.bmp binary
*.dll binary
*.dmb binary
*.exe binary
*.gif binary
*.jpg binary
*.png binary
*.so binary
## Merger hooks, run tools/hooks/install.bat or install.sh to set up
*.dmm text eol=lf merge=dmm
*.dmi binary merge=dmi
## Force changelog merging to use union
html/changelog.html text eol=lf merge=union

31
.github/CODEOWNERS vendored
View File

@@ -4,18 +4,6 @@
# In the event that multiple org members are to be informed of changes
# to the same file or dir, add them to the end under Multiple Owners
# bobbahbrown
/code/datums/chatmessage.dm @bobbahbrown
# ChangelingRain
/code/__DEFINES/clockcult.dm @ChangelingRain
/code/game/gamemodes/blob/ @ChangelingRain
/code/game/gamemodes/clock_cult/ @ChangelingRain
/code/game/gamemodes/miniantags/revenant/ @ChangelingRain
/code/game/objects/effects/temporary_visuals/ @ChangelingRain
/code/modules/reagents/chemistry/reagents/blob_reagents.dm @ChangelingRain
# Cobby
/code/modules/reagents/ @ExcessiveUseOfCobblestone
/code/modules/research/designs/medical_designs.dm @ExcessiveUseOfCobblestone
@@ -26,9 +14,6 @@
# Cyberboss
/code/__DATASTRUCTURES/globals.dm @Cyberboss
/code/__DEFINES/server_tools.config.dm @Cyberboss
/code/__DEFINES/server_tools.dm @Cyberboss
/code/controllers/subsystem/atoms.dm @Cyberboss
/code/controllers/subsystem/mapping.dm @Cyberboss
/code/controllers/globals.dm @Cyberboss
@@ -38,14 +23,8 @@
/code/datums/holocall.dm @Cyberboss
/code/modules/admin/verbs/adminhelp.dm @Cyberboss
/code/modules/admin/verbs/adminpm.dm @Cyberboss
/code/modules/server_tools/ @Cyberboss
/code/modules/mapping/ @Cyberboss
# duncathan
/code/__DEFINES/atmospherics.dm @duncathan
/code/modules/atmospherics/ @duncathan
# Jordie0608
/SQL/ @Jordie0608
@@ -56,7 +35,6 @@
/SQL/database_changelog.txt @MrStonedOne
/code/__DEFINES/MC.dm @MrStonedOne
/code/__DEFINES/tick.dm @MrStonedOne
/code/controllers/admin.dm @MrStonedOne
/code/controllers/master.dm @MrStonedOne
/code/controllers/failsafe.dm @MrStonedOne
@@ -75,21 +53,16 @@
# ShizCalev
/_maps/ @ShizCalev
/icons/ @ShizCalev
/sound/ @ShizCalev
# stylemistake
/tgui @stylemistake
# Qustinnus
/code/datums/components/mood.dm @Qustinnus
/code/datums/mood_events/ @Qustinnus
/code/__DEFINES/mobs.dm @Qustinnus
# Multiple Owners
/code/controllers/subsystem/air.dm @duncathan @MrStonedOne
/icons/ @Twaticus @ShizCalev
/code/controllers/subsystem/air.dm @MrStonedOne
#SIC SEMPER TYRANNIS
/code/modules/hydroponics/grown/citrus.dm @optimumtact

View File

@@ -8,5 +8,6 @@
"filenamePattern": "*.dmi",
"viewType": "imagePreview.previewEditor"
}
]
],
"files.eol": "\n"
}

View File

@@ -46,8 +46,8 @@ All code before [commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 a
See LICENSE and GPLv3.txt for more details.
The TGS3 API is licensed as a subproject under the MIT license.
The TGS DMAPI API is licensed as a subproject under the MIT license.
See the footers of code/\_\_DEFINES/server\_tools.dm, code/modules/server\_tools/st\_commands.dm, and code/modules/server\_tools/st\_inteface.dm for the MIT license.
See the footer of [code/__DEFINES/tgs.dm](./code/__DEFINES/tgs.dm) and [code/modules/tgs/LICENSE](./code/modules/tgs/LICENSE) for the MIT license.
All assets including icons and sound are under a [Creative Commons 3.0 BY-SA license](https://creativecommons.org/licenses/by-sa/3.0/) unless otherwise indicated.

View File

@@ -20426,7 +20426,7 @@
},
/obj/item/storage/box/shipping{
pixel_x = 4;
pixel_z = 4
pixel_y = 4
},
/turf/open/floor/plasteel,
/area/quartermaster/sorting)
@@ -114937,6 +114937,9 @@
/obj/structure/cable,
/obj/machinery/door/firedoor,
/obj/effect/turf_decal/stripes/line,
/obj/effect/mapping_helpers/airlock/unres{
dir = 1
},
/turf/open/floor/plasteel,
/area/medical/sleeper)
"qKq" = (

View File

@@ -4965,6 +4965,20 @@
},
/turf/open/floor/plasteel/dark,
/area/security/brig)
"akV" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 8
},
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
/obj/machinery/bounty_board{
dir = 1;
pixel_y = -32
},
/turf/open/floor/plasteel,
/area/crew_quarters/dorms)
"akW" = (
/obj/effect/mapping_helpers/airlock/cyclelink_helper,
/obj/machinery/door/airlock/security/glass{
@@ -11088,16 +11102,6 @@
},
/turf/open/floor/plasteel,
/area/quartermaster/miningdock)
"azV" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 8
},
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
/turf/open/floor/plasteel,
/area/crew_quarters/dorms)
"azW" = (
/turf/open/floor/plasteel,
/area/ai_monitored/storage/eva)
@@ -52275,9 +52279,7 @@
/turf/open/floor/plasteel/white,
/area/medical/medbay)
"hnW" = (
/obj/effect/spawner/structure/window/reinforced{
pixel_w = 1
},
/obj/effect/spawner/structure/window/reinforced,
/turf/closed/wall,
/area/maintenance/starboard/aft)
"hox" = (
@@ -89981,7 +89983,7 @@ auU
avG
awr
awr
azV
akV
aAh
aAh
aFg

View File

@@ -0,0 +1,723 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/closed/indestructible/riveted,
/area/mafia)
"b" = (
/turf/closed/wall/mineral/iron,
/area/mafia)
"c" = (
/turf/closed/wall/rust,
/area/mafia)
"d" = (
/turf/open/floor/plating,
/area/mafia)
"e" = (
/turf/open/floor/plating{
icon_state = "platingdmg3"
},
/area/mafia)
"f" = (
/turf/open/floor/plating{
icon_state = "panelscorched"
},
/area/mafia)
"g" = (
/obj/mafia_game_board,
/turf/open/floor/plating{
icon_state = "platingdmg3"
},
/area/mafia)
"h" = (
/obj/structure/grille/indestructable,
/turf/open/floor/plating,
/area/mafia)
"i" = (
/turf/open/floor/plating{
icon_state = "platingdmg1"
},
/area/mafia)
"j" = (
/turf/closed/indestructible/fakedoor,
/area/mafia)
"k" = (
/obj/mafia_game_board,
/turf/open/floor/plating,
/area/mafia)
"l" = (
/obj/structure/closet/crate/coffin,
/turf/open/floor/carpet/red,
/area/mafia)
"m" = (
/obj/effect/landmark/mafia,
/turf/open/floor/carpet/red,
/area/mafia)
"n" = (
/obj/effect/landmark/mafia,
/turf/open/floor/plasteel/chapel{
dir = 1
},
/area/mafia)
"o" = (
/obj/structure/closet/crate/coffin,
/turf/open/floor/plasteel/chapel{
dir = 4
},
/area/mafia)
"p" = (
/obj/machinery/door/poddoor/preopen{
desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
id = "mafia";
max_integrity = 99999;
name = "Station Night Shutters"
},
/turf/closed/indestructible/opsglass,
/area/mafia)
"q" = (
/turf/open/floor/carpet/red,
/area/mafia)
"r" = (
/turf/open/floor/plasteel/chapel{
dir = 8
},
/area/mafia)
"t" = (
/turf/open/floor/carpet/royalblack,
/area/mafia)
"u" = (
/obj/effect/baseturf_helper/asteroid,
/obj/effect/landmark/mafia/town_center,
/turf/open/floor/carpet/royalblack,
/area/mafia)
"v" = (
/obj/mafia_game_board,
/turf/open/floor/plating{
icon_state = "panelscorched"
},
/area/mafia)
"D" = (
/obj/effect/landmark/mafia,
/turf/open/floor/plasteel/chapel{
dir = 4
},
/area/mafia)
"E" = (
/turf/open/floor/plasteel/chapel{
dir = 4
},
/area/mafia)
"H" = (
/obj/structure/closet/cabinet{
anchored = 1
},
/turf/open/floor/carpet/red,
/area/mafia)
"J" = (
/obj/structure/closet/crate/coffin,
/turf/open/floor/plasteel/chapel{
dir = 1
},
/area/mafia)
"M" = (
/obj/effect/landmark/mafia,
/turf/open/floor/plasteel/chapel{
dir = 8
},
/area/mafia)
"N" = (
/obj/effect/landmark/mafia,
/turf/open/floor/plasteel/chapel,
/area/mafia)
"O" = (
/turf/open/floor/plasteel/chapel,
/area/mafia)
"P" = (
/obj/structure/closet/crate/coffin,
/turf/open/floor/plasteel/chapel,
/area/mafia)
"Q" = (
/obj/structure/closet/crate/coffin,
/turf/open/floor/plasteel/chapel{
dir = 8
},
/area/mafia)
"X" = (
/turf/open/floor/plasteel/chapel{
dir = 1
},
/area/mafia)
(1,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
"}
(2,1,1) = {"
a
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
a
"}
(3,1,1) = {"
a
b
b
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
b
b
a
"}
(4,1,1) = {"
a
b
b
c
g
h
d
d
d
d
d
e
d
d
d
d
d
h
k
c
b
b
a
"}
(5,1,1) = {"
a
b
b
c
h
d
d
e
b
b
j
b
j
b
b
d
d
i
h
c
b
b
a
"}
(6,1,1) = {"
a
b
b
c
i
b
b
j
b
l
q
b
X
Q
b
j
b
b
d
c
b
b
a
"}
(7,1,1) = {"
a
b
c
c
d
b
J
r
p
m
q
p
E
N
p
q
l
b
d
c
c
b
a
"}
(8,1,1) = {"
a
b
c
d
d
b
D
O
b
b
q
b
r
b
b
q
m
b
d
d
c
b
a
"}
(9,1,1) = {"
a
b
c
d
b
b
p
X
r
p
q
p
O
p
q
q
p
b
b
d
c
b
a
"}
(10,1,1) = {"
a
b
c
d
b
l
p
b
p
p
p
p
p
p
p
b
p
Q
b
d
c
b
a
"}
(11,1,1) = {"
a
b
c
d
j
m
q
q
q
p
t
t
t
p
X
r
E
N
j
e
c
b
a
"}
(12,1,1) = {"
a
b
c
e
b
b
p
b
p
p
t
u
t
p
p
b
p
b
b
d
c
b
a
"}
(13,1,1) = {"
a
b
c
d
j
n
r
E
O
p
t
t
t
p
q
q
q
m
j
d
c
b
a
"}
(14,1,1) = {"
a
b
c
d
b
o
p
b
p
p
p
p
p
p
p
b
p
l
b
i
c
b
a
"}
(15,1,1) = {"
a
b
c
d
b
b
p
q
q
p
X
p
q
p
E
O
p
b
b
d
c
b
a
"}
(16,1,1) = {"
a
b
c
f
d
b
m
q
b
b
E
b
q
b
b
X
M
b
d
d
c
b
a
"}
(17,1,1) = {"
a
b
c
c
d
b
l
q
p
n
r
p
q
m
p
E
P
b
d
c
c
b
a
"}
(18,1,1) = {"
a
b
b
c
d
b
b
j
b
o
O
b
q
H
b
j
b
b
d
c
b
b
a
"}
(19,1,1) = {"
a
b
b
c
h
i
d
d
b
b
j
b
j
b
b
d
e
d
h
c
b
b
a
"}
(20,1,1) = {"
a
b
b
c
k
h
d
d
e
d
d
d
d
d
d
d
d
h
v
c
b
b
a
"}
(21,1,1) = {"
a
b
b
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
b
b
a
"}
(22,1,1) = {"
a
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
a
"}
(23,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
"}

View File

@@ -1,802 +0,0 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/closed/indestructible/riveted,
/area/mafia)
"b" = (
/turf/closed/indestructible/riveted/boss,
/area/mafia)
"c" = (
/turf/closed/wall/mineral/cult,
/area/mafia)
"d" = (
/turf/open/indestructible/necropolis/air,
/area/mafia)
"e" = (
/obj/structure/grille/indestructable,
/turf/open/indestructible/necropolis/air,
/area/mafia)
"f" = (
/obj/effect/mapping_helpers/airlock/locked,
/obj/machinery/door/airlock{
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi';
name = "Maintenance";
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
},
/turf/open/indestructible/necropolis/air,
/area/mafia)
"g" = (
/obj/structure/stone_tile/slab,
/obj/structure/closet/crate/necropolis{
anchored = 1
},
/turf/open/lava/smooth,
/area/mafia)
"h" = (
/obj/structure/stone_tile/block/burnt{
dir = 8
},
/obj/structure/stone_tile/block/burnt{
dir = 4
},
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"i" = (
/turf/open/floor/plating/asteroid/basalt,
/area/mafia)
"j" = (
/obj/structure/closet/crate/necropolis{
anchored = 1
},
/turf/open/floor/plating/asteroid/basalt,
/area/mafia)
"k" = (
/obj/machinery/door/poddoor/preopen{
desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
id = "mafia";
max_integrity = 99999;
name = "Station Night Shutters"
},
/turf/closed/indestructible/riveted/boss/see_through{
color = "#add8e6"
},
/area/mafia)
"l" = (
/obj/structure/stone_tile/block/cracked,
/obj/structure/stone_tile/burnt{
dir = 1
},
/turf/open/lava/smooth,
/area/mafia)
"m" = (
/obj/structure/stone_tile/slab/burnt,
/turf/open/lava/smooth,
/area/mafia)
"n" = (
/obj/structure/stone_tile/surrounding/cracked,
/turf/open/lava/smooth,
/area/mafia)
"o" = (
/obj/structure/stone_tile/block/cracked,
/turf/open/lava/smooth,
/area/mafia)
"p" = (
/obj/effect/landmark/mafia,
/turf/open/floor/plating/asteroid/basalt,
/area/mafia)
"q" = (
/obj/structure/stone_tile/slab/cracked,
/turf/open/lava/smooth,
/area/mafia)
"r" = (
/obj/structure/stone_tile/surrounding,
/turf/open/lava/smooth,
/area/mafia)
"s" = (
/obj/machinery/door/poddoor/preopen{
desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
id = "mafia";
max_integrity = 99999;
name = "Station Night Shutters"
},
/turf/closed/indestructible/riveted/hierophant{
opacity = 0
},
/area/mafia)
"t" = (
/obj/structure/stone_tile/surrounding/cracked,
/obj/structure/stone_tile/surrounding_tile/burnt,
/obj/structure/stone_tile/center/cracked,
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"u" = (
/obj/structure/stone_tile/block/cracked,
/obj/structure/stone_tile/surrounding_tile/burnt{
dir = 4
},
/turf/open/lava/smooth,
/area/mafia)
"v" = (
/obj/structure/stone_tile/block/burnt,
/obj/structure/stone_tile/burnt{
dir = 4
},
/turf/open/lava/smooth,
/area/mafia)
"w" = (
/turf/open/indestructible/hierophant,
/area/mafia)
"x" = (
/obj/mafia_game_board,
/turf/open/indestructible/necropolis/air,
/area/mafia)
"y" = (
/obj/structure/stone_tile/block/burnt,
/turf/open/lava/smooth,
/area/mafia)
"z" = (
/obj/structure/stone_tile/block/cracked,
/obj/structure/stone_tile/block{
dir = 1
},
/turf/open/lava/smooth,
/area/mafia)
"A" = (
/obj/structure/stone_tile/surrounding_tile/burnt,
/obj/structure/stone_tile/surrounding_tile/burnt{
dir = 8
},
/obj/structure/stone_tile/cracked{
dir = 4
},
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"B" = (
/obj/effect/mapping_helpers/airlock/locked{
max_integrity = 99999
},
/obj/machinery/door/airlock{
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi';
name = "Maintenance";
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
},
/turf/open/indestructible/necropolis/air,
/area/mafia)
"C" = (
/obj/structure/stone_tile/slab/cracked{
dir = 6
},
/turf/open/lava/smooth,
/area/mafia)
"D" = (
/obj/structure/stone_tile/cracked{
dir = 4
},
/obj/structure/stone_tile/block,
/turf/open/lava/smooth,
/area/mafia)
"E" = (
/obj/structure/stone_tile/cracked,
/obj/structure/stone_tile/block{
dir = 1
},
/turf/open/lava/smooth,
/area/mafia)
"F" = (
/obj/structure/stone_tile/cracked,
/obj/structure/stone_tile/surrounding_tile/burnt{
dir = 4
},
/turf/open/lava/smooth,
/area/mafia)
"G" = (
/obj/structure/stone_tile/block/burnt{
dir = 4
},
/turf/open/lava/smooth,
/area/mafia)
"H" = (
/obj/structure/stone_tile/cracked{
dir = 4
},
/obj/structure/stone_tile/cracked,
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"I" = (
/obj/structure/stone_tile/cracked{
dir = 8
},
/obj/structure/stone_tile/surrounding_tile/burnt,
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"J" = (
/obj/structure/stone_tile/block/burnt,
/obj/effect/landmark/mafia,
/turf/open/lava/smooth,
/area/mafia)
"K" = (
/obj/effect/baseturf_helper/asteroid,
/obj/effect/hierophant,
/obj/effect/landmark/mafia/town_center,
/turf/open/indestructible/hierophant/two,
/area/mafia)
(1,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
"}
(2,1,1) = {"
a
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
a
"}
(3,1,1) = {"
a
b
b
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
b
b
a
"}
(4,1,1) = {"
a
b
b
c
x
e
d
d
d
d
d
d
d
d
d
d
d
e
x
c
b
b
a
"}
(5,1,1) = {"
a
b
b
c
e
d
d
d
b
b
f
b
f
b
b
d
d
d
e
c
b
b
a
"}
(6,1,1) = {"
a
b
b
c
d
b
b
f
b
g
A
b
p
j
b
f
b
b
d
c
b
b
a
"}
(7,1,1) = {"
a
b
c
c
d
b
j
p
k
r
u
k
i
i
k
D
g
b
d
c
c
b
a
"}
(8,1,1) = {"
a
b
c
d
d
b
i
i
b
b
v
b
i
b
b
E
I
b
d
d
c
b
a
"}
(9,1,1) = {"
a
b
c
d
b
b
k
i
i
k
q
k
i
k
q
F
k
b
b
d
c
b
a
"}
(10,1,1) = {"
a
b
c
d
b
g
k
b
k
s
s
s
s
s
k
b
k
j
b
d
c
b
a
"}
(11,1,1) = {"
a
b
c
d
f
h
l
m
q
s
w
w
w
s
i
i
i
p
f
d
c
b
a
"}
(12,1,1) = {"
a
b
c
d
b
b
k
b
k
s
w
K
w
s
k
b
k
b
b
d
c
b
a
"}
(13,1,1) = {"
a
b
c
d
f
p
i
i
i
s
w
w
w
s
q
G
C
J
f
d
c
b
a
"}
(14,1,1) = {"
a
b
c
d
b
j
k
b
k
s
s
s
s
s
k
b
k
g
b
d
c
b
a
"}
(15,1,1) = {"
a
b
c
d
b
b
k
n
q
k
i
k
q
k
i
i
k
b
b
d
c
b
a
"}
(16,1,1) = {"
a
b
c
d
d
b
m
o
b
b
i
b
y
b
b
i
p
b
d
d
c
b
a
"}
(17,1,1) = {"
a
b
c
c
d
b
g
t
k
i
i
k
z
C
k
i
j
b
d
c
c
b
a
"}
(18,1,1) = {"
a
b
b
c
d
b
b
f
b
j
p
b
H
g
b
f
b
b
d
c
b
b
a
"}
(19,1,1) = {"
a
b
b
c
e
d
d
d
b
b
f
b
B
b
b
d
d
d
e
c
b
b
a
"}
(20,1,1) = {"
a
b
b
c
x
e
d
d
d
d
d
d
d
d
d
d
d
e
x
c
b
b
a
"}
(21,1,1) = {"
a
b
b
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
b
b
a
"}
(22,1,1) = {"
a
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
a
"}
(23,1,1) = {"
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
"}

View File

@@ -97,11 +97,12 @@
/turf/open/floor/holofloor/snow,
/area/mafia)
"w" = (
/turf/open/lava/plasma,
/turf/open/lava/plasma/mafia,
/area/mafia)
"x" = (
/obj/machinery/door/airlock/external{
max_integrity = 9999
max_integrity = 9999;
opacity = 0
},
/obj/machinery/door/poddoor/preopen{
desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
@@ -118,7 +119,7 @@
/area/mafia)
"z" = (
/obj/structure/lattice/catwalk,
/turf/open/lava/plasma,
/turf/open/lava/plasma/mafia,
/area/mafia)
"A" = (
/obj/machinery/door/airlock/external{
@@ -136,7 +137,7 @@
"B" = (
/obj/effect/landmark/mafia,
/obj/structure/lattice/catwalk,
/turf/open/lava/plasma,
/turf/open/lava/plasma/mafia,
/area/mafia)
"C" = (
/obj/mafia_game_board,
@@ -153,7 +154,7 @@
/obj/structure/closet/crate/critter,
/obj/item/clothing/suit/hooded/wintercoat/miner,
/obj/item/clothing/shoes/winterboots,
/turf/open/lava/plasma,
/turf/open/lava/plasma/mafia,
/area/mafia)
"F" = (
/turf/open/floor/holofloor/wood,

View File

@@ -316,14 +316,6 @@
},
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"aaL" = (
/obj/effect/turf_decal/tile/bar,
/obj/effect/turf_decal/tile/bar{
dir = 1
},
/obj/effect/landmark/event_spawn,
/turf/open/floor/plasteel,
/area/crew_quarters/bar)
"aaM" = (
/obj/structure/table/wood,
/turf/open/floor/wood,
@@ -659,8 +651,8 @@
/area/maintenance/central)
"abq" = (
/obj/machinery/light_switch{
pixel_y = -25;
pixel_x = -4
pixel_x = -4;
pixel_y = -25
},
/obj/effect/turf_decal/tile/red,
/obj/effect/turf_decal/tile/red{
@@ -7410,21 +7402,14 @@
},
/turf/open/floor/plasteel,
/area/hallway/primary/port)
"apB" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 6
},
/obj/structure/cable,
/turf/open/floor/plating,
/area/maintenance/port/fore)
"apC" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 9
},
/obj/structure/cable,
/obj/structure/disposalpipe/segment{
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
},
/turf/open/floor/plating,
/area/maintenance/port/fore)
"apD" = (
@@ -15959,8 +15944,8 @@
/obj/effect/decal/cleanable/dirt,
/obj/structure/table,
/obj/machinery/microwave{
pixel_y = 6;
pixel_x = 0
pixel_x = 0;
pixel_y = 6
},
/turf/open/floor/plasteel,
/area/quartermaster/warehouse)
@@ -17076,8 +17061,8 @@
/obj/structure/cable,
/obj/machinery/computer/security/telescreen/interrogation{
name = "isolation room monitor";
pixel_y = 31;
network = list("isolation")
network = list("isolation");
pixel_y = 31
},
/turf/open/floor/plasteel,
/area/security/prison)
@@ -18148,8 +18133,8 @@
pixel_y = 15
},
/obj/item/stack/cable_coil{
pixel_y = 18;
pixel_x = 0
pixel_x = 0;
pixel_y = 18
},
/obj/machinery/requests_console{
department = "Tool Storage";
@@ -19754,8 +19739,8 @@
pixel_x = -8
},
/obj/item/assembly/prox_sensor{
pixel_y = 12;
pixel_x = 0
pixel_x = 0;
pixel_y = 12
},
/obj/machinery/light{
dir = 4
@@ -25350,8 +25335,8 @@
pixel_y = 9
},
/obj/item/cartridge/quartermaster{
pixel_y = 0;
pixel_x = 9
pixel_x = 9;
pixel_y = 0
},
/obj/item/cartridge/quartermaster{
pixel_x = 5;
@@ -26318,8 +26303,8 @@
/area/quartermaster/sorting)
"biI" = (
/obj/machinery/firealarm{
pixel_y = 0;
pixel_x = 30
pixel_x = 30;
pixel_y = 0
},
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 1
@@ -27038,8 +27023,8 @@
"bku" = (
/obj/machinery/disposal/bin,
/obj/machinery/firealarm{
pixel_y = 0;
pixel_x = -31
pixel_x = -31;
pixel_y = 0
},
/obj/machinery/light{
dir = 8
@@ -29998,7 +29983,7 @@
"bro" = (
/obj/structure/cable,
/obj/machinery/firealarm{
pixel_z = -28
pixel_y = -28
},
/obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 8
@@ -35660,6 +35645,7 @@
req_access_txt = "46"
},
/obj/machinery/door/firedoor,
/obj/effect/mapping_helpers/airlock/unres,
/turf/open/floor/wood,
/area/crew_quarters/theatre)
"bFC" = (
@@ -36259,6 +36245,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/door/firedoor,
/obj/structure/disposalpipe/segment,
/obj/effect/mapping_helpers/airlock/unres,
/turf/open/floor/plasteel,
/area/hallway/secondary/service)
"bHg" = (
@@ -42757,7 +42744,6 @@
/area/hydroponics)
"bWR" = (
/obj/effect/landmark/start/botanist,
/obj/machinery/holopad,
/obj/effect/turf_decal/trimline/green/filled/line,
/obj/effect/turf_decal/trimline/green/filled/line{
dir = 1
@@ -47107,6 +47093,9 @@
name = "Cryogenics";
req_access_txt = "5"
},
/obj/effect/mapping_helpers/airlock/unres{
dir = 1
},
/turf/open/floor/plasteel/white,
/area/medical/cryo)
"cgV" = (
@@ -47126,6 +47115,9 @@
},
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/effect/mapping_helpers/airlock/unres{
dir = 1
},
/turf/open/floor/plasteel/white,
/area/medical/cryo)
"cgX" = (
@@ -49923,6 +49915,9 @@
dir = 4
},
/obj/machinery/door/firedoor,
/obj/effect/mapping_helpers/airlock/unres{
dir = 8
},
/turf/open/floor/plasteel/white,
/area/medical/sleeper)
"cnA" = (
@@ -50592,6 +50587,9 @@
dir = 4
},
/obj/machinery/door/firedoor,
/obj/effect/mapping_helpers/airlock/unres{
dir = 8
},
/turf/open/floor/plasteel/white,
/area/medical/sleeper)
"coN" = (
@@ -70125,9 +70123,9 @@
dir = 8
},
/obj/structure/sink{
pixel_y = 29;
dir = 2;
pixel_x = 0
pixel_x = 0;
pixel_y = 29
},
/mob/living/simple_animal/mouse/brown/tom,
/turf/open/floor/plating,
@@ -70143,16 +70141,6 @@
/obj/machinery/door/firedoor,
/turf/open/floor/plasteel/dark,
/area/medical/morgue)
"idz" = (
/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
dir = 1
},
/obj/structure/cable,
/obj/structure/disposalpipe/segment{
dir = 4
},
/turf/open/floor/plating,
/area/maintenance/port/fore)
"ifK" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
@@ -71494,9 +71482,9 @@
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/button/flasher{
pixel_y = 8;
id = "IsolationFlash";
pixel_x = -23
pixel_x = -23;
pixel_y = 8
},
/obj/structure/cable,
/turf/open/floor/plasteel,
@@ -74725,10 +74713,10 @@
dir = 4
},
/obj/machinery/button/door{
name = "Panic Button";
pixel_y = -24;
id = "PermaLockdown";
name = "Panic Button";
pixel_x = -1;
pixel_y = -24;
req_access_txt = "2"
},
/obj/structure/cable,
@@ -102749,7 +102737,7 @@ lMJ
lMJ
dne
aoi
apB
doJ
apC
dne
dne
@@ -103007,7 +102995,7 @@ aax
aio
dne
dne
idz
apC
dne
aaa
aaa

View File

@@ -262,8 +262,7 @@
"aR" = (
/obj/structure/mirror{
pixel_x = -23;
pixel_y = -4;
pixel_z = 2
pixel_y = -2
},
/obj/structure/sink/greyscale{
dir = 4;

View File

@@ -101,6 +101,7 @@
#define ADMIN_PUNISHMENT_CRACK ":B:oneless"
#define ADMIN_PUNISHMENT_BLEED ":B:loodless"
#define ADMIN_PUNISHMENT_SCARIFY "Scarify"
#define ADMIN_PUNISHMENT_SHOES "Knot Shoes"
#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2

View File

@@ -13,23 +13,35 @@
#define STYLE_GONDOLA 13
#define STYLE_SEETHROUGH 14
#define POD_ICON_STATE 1
#define POD_NAME 2
#define POD_DESC 3
#define POD_SHAPE 1
#define POD_BASE 2
#define POD_DECAL 3
#define POD_GLOW 4
#define POD_RUBBLE_TYPE 5
#define POD_NAME 6
#define POD_DESC 7
#define RUBBLE_NONE 1
#define RUBBLE_NORMAL 2
#define RUBBLE_WIDE 3
#define RUBBLE_THIN 4
#define POD_SHAPE_NORML 1
#define POD_SHAPE_OTHER 2
#define POD_STYLES list(\
list("supplypod", "supply pod", "A Nanotrasen supply drop pod."),\
list("bluespacepod", "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
list("centcompod", "\improper CentCom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to CentCom after delivery."),\
list("syndiepod", "blood-red supply pod", "A dark, intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
list("squadpod", "\improper MK. II supply pod", "A Nanotrasen supply pod. This one has been marked the markings of some sort of elite strike team."),\
list("cultpod", "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
list("missilepod", "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxiliary payload hatch on the side, though manually opening it is likely impossible."),\
list("smissilepod", "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxiliary payload hatch on the side, though manually opening it is likely impossible."),\
list("boxpod", "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
list("honkpod", "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
list("fruitpod", "\improper Orange", "An angry orange."),\
list("", "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
list("gondolapod", "gondola", "The silent walker. This one seems to be part of a delivery agency."),\
list("", "", "")\
list(POD_SHAPE_NORML, "pod", "default", "yellow", RUBBLE_NORMAL, "supply pod", "A Nanotrasen supply drop pod."),\
list(POD_SHAPE_NORML, "advpod", "bluespace", "blue", RUBBLE_NORMAL, "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
list(POD_SHAPE_NORML, "advpod", "centcom", "blue", RUBBLE_NORMAL, "\improper CentCom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to CentCom after delivery."),\
list(POD_SHAPE_NORML, "darkpod", "syndicate", "red", RUBBLE_NORMAL, "blood-red supply pod", "An intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
list(POD_SHAPE_NORML, "darkpod", "deathsquad", "blue", RUBBLE_NORMAL, "\improper Deathsquad drop pod", "A Nanotrasen drop pod. This one has been marked the markings of Nanotrasen's elite strike team."),\
list(POD_SHAPE_NORML, "pod", "cultist", "red", RUBBLE_NORMAL, "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
list(POD_SHAPE_OTHER, "missile", null, "yellow", RUBBLE_THIN, "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list(POD_SHAPE_OTHER, "smissile", null, "yellow", RUBBLE_THIN, "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list(POD_SHAPE_OTHER, "box", null, "yellow", RUBBLE_WIDE, "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
list(POD_SHAPE_NORML, "clownpod", "clown", "green", RUBBLE_NORMAL, "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
list(POD_SHAPE_OTHER, "orange", null, "yellow", RUBBLE_NONE, "\improper Orange", "An angry orange."),\
list(POD_SHAPE_OTHER, "", null, "yellow", RUBBLE_NONE, "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
list(POD_SHAPE_OTHER, "gondola", null, "yellow", RUBBLE_NONE, "gondola", "The silent walker. This one seems to be part of a delivery agency."),\
list(POD_SHAPE_OTHER, "", null, "yellow", RUBBLE_NONE, "", "")\
)

View File

@@ -34,6 +34,10 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define ADMIN_SPAWNED_1 (1<<15)
/// should not get harmed if this gets caught by an explosion?
#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16)
/// should the contents of this atom be acted upon
#define RAD_PROTECT_CONTENTS_1 (1 << 17)
/// should this object be allowed to be contaminated
#define RAD_NO_CONTAMINATE_1 (1 << 18)
/// If the thing can reflect light (lasers/energy)
@@ -126,10 +130,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL)
#define MOBILITY_FLAGS_INTERACTION (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_UI | MOBILITY_STORAGE)
// radiation
#define RAD_PROTECT_CONTENTS (1<<0)
#define RAD_NO_CONTAMINATE (1<<1)
//alternate appearance flags
#define AA_TARGET_SEE_APPEARANCE (1<<0)
#define AA_MATCH_TARGET_OVERLAYS (1<<1)

View File

@@ -120,6 +120,12 @@
#define SHOES_TIED 1
#define SHOES_KNOTTED 2
//how fast a disposal machinery thing is ejecting things
#define EJECT_SPEED_SLOW 1
#define EJECT_SPEED_MED 2
#define EJECT_SPEED_FAST 4
#define EJECT_SPEED_YEET 6
//Cache of bloody footprint images
//Key:
//"entered-[blood_state]-[dir_of_image]"

View File

@@ -227,6 +227,9 @@
#define AI_OFF 3
#define AI_Z_OFF 4
//The range at which a mob should wake up if you spawn into the z level near it
#define MAX_SIMPLEMOB_WAKEUP_RANGE 5
//determines if a mob can smash through it
#define ENVIRONMENT_SMASH_NONE 0
#define ENVIRONMENT_SMASH_STRUCTURES (1<<0) //crates, lockers, ect

View File

@@ -85,3 +85,6 @@
#define SLIME_RESEARCH_TIER_4 2000
#define SLIME_RESEARCH_TIER_5 2500
#define SLIME_RESEARCH_TIER_RAINBOW 5000
///Amount of points gained per second by a single R&D server, see: [/controllers/subsystem/research.dm][research]
#define TECHWEB_SINGLE_SERVER_INCOME 52.3

View File

@@ -1,4 +1,30 @@
#define UI_INTERACTIVE 2 // Green/Interactive
#define UI_UPDATE 1 // Orange/Updates Only
#define UI_DISABLED 0 // Red/Disabled
#define UI_CLOSE -1 // Closed
/// Green eye; fully interactive
#define UI_INTERACTIVE 2
/// Orange eye; updates but is not interactive
#define UI_UPDATE 1
/// Red eye; disabled, does not update
#define UI_DISABLED 0
/// UI Should close
#define UI_CLOSE -1
/// Maximum number of windows that can be suspended/reused
#define TGUI_WINDOW_SOFT_LIMIT 5
/// Maximum number of open windows
#define TGUI_WINDOW_HARD_LIMIT 9
/// Maximum ping timeout allowed to detect zombie windows
#define TGUI_PING_TIMEOUT 4 SECONDS
/// Window does not exist
#define TGUI_WINDOW_CLOSED 0
/// Window was just opened, but is still not ready to be sent data
#define TGUI_WINDOW_LOADING 1
/// Window is free and ready to receive data
#define TGUI_WINDOW_READY 2
/// Window is in use by a tgui datum
#define TGUI_WINDOW_ACTIVE 3
/// Get a window id based on the provided pool index
#define TGUI_WINDOW_ID(index) "tgui-window-[index]"
/// Get a pool index of the provided window id
#define TGUI_WINDOW_INDEX(window_id) text2num(copytext(window_id, 13))

View File

@@ -113,6 +113,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_RESISTLOWPRESSURE "resist_low_pressure"
#define TRAIT_BOMBIMMUNE "bomb_immunity"
#define TRAIT_RADIMMUNE "rad_immunity"
#define TRAIT_GENELESS "geneless"
#define TRAIT_VIRUSIMMUNE "virus_immunity"
#define TRAIT_PIERCEIMMUNE "pierce_immunity"
#define TRAIT_NODISMEMBER "dismember_immunity"
@@ -126,6 +127,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_LIMBATTACHMENT "limb_attach"
#define TRAIT_NOLIMBDISABLE "no_limb_disable"
#define TRAIT_EASYLIMBDISABLE "easy_limb_disable"
#define TRAIT_HARDLIMBDISABLE "hard_limb_disable"
#define TRAIT_TOXINLOVER "toxinlover"
#define TRAIT_NOBREATH "no_breath"
#define TRAIT_ANTIMAGIC "anti_magic"
@@ -186,6 +188,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_SILENT_FOOTSTEPS "silent_footsteps" //makes your footsteps completely silent
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good....
#define TRAIT_TUMOR_SUPPRESSED "brain_tumor_suppressed" //prevents the damage done by a brain tumor
#define TRAIT_PERMANENTLY_ONFIRE "permanently_onfire" //overrides the update_fire proc to always add fire (for lava)
//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
@@ -262,6 +265,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define INNATE_TRAIT "innate"
#define CRIT_HEALTH_TRAIT "crit_health"
#define OXYLOSS_TRAIT "oxyloss"
#define TURF_TRAIT "turf"
// unique trait sources, still defines
#define CLONING_POD_TRAIT "cloning-pod"

View File

@@ -201,9 +201,18 @@
WRITE_LOG(GLOB.world_map_error_log, text)
/* ui logging */
/proc/log_tgui(text)
WRITE_LOG(GLOB.tgui_log, text)
/proc/log_tgui(user_or_client, text)
var/entry = ""
if(!user_or_client)
entry += "no user"
else if(istype(user_or_client, /mob))
var/mob/user = user_or_client
entry += "[user.ckey] (as [user])"
else if(istype(user_or_client, /client))
var/client/client = user_or_client
entry += "[client.ckey]"
entry += ":\n[text]"
WRITE_LOG(GLOB.tgui_log, entry)
/* For logging round startup. */
/proc/start_log(log)

View File

@@ -714,7 +714,7 @@ world
/// Only the first argument is required.
/proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE)
//Define... defines.
var/static/icon/flat_template = icon('icons/effects/effects.dmi', "nothing")
var/static/icon/flat_template = icon('icons/blanks/32x32.dmi', "nothing")
#define BLANK icon(flat_template)
#define SET_SELF(SETVAR) do { \

View File

@@ -18,7 +18,7 @@
if(ignored_things[thing.type])
continue
. += thing
if((thing.rad_flags & RAD_PROTECT_CONTENTS) || (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION))
if((thing.flags_1 & RAD_PROTECT_CONTENTS_1) || (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION))
continue
processing_list += thing.contents

View File

@@ -843,3 +843,39 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
var/limit = reverse ? numSquares - percent*numSquares : percent*numSquares
loadstring += i <= limit ? "█" : "░"
return "\[[loadstring]\]"
/**
* Formats a number to human readable form with the appropriate SI unit.
*
* Supports SI exponents between 1e-15 to 1e15, but properly handles numbers outside that range as well.
* Examples:
* * `siunit(1234, "Pa", 1)` -> `"1.2 kPa"`
* * `siunit(0.5345, "A", 0)` -> `"535 mA"`
* * `siunit(1000, "Pa", 4)` -> `"1 kPa"`
* Arguments:
* * value - The number to convert to text. Can be positive or negative.
* * unit - The base unit of the number, such as "Pa" or "W".
* * maxdecimals - Maximum amount of decimals to display for the final number. Defaults to 1.
*/
/proc/siunit(value, unit, maxdecimals=1)
var/static/list/prefixes = list("f","p","n","μ","m","","k","M","G","T","P")
// We don't have prefixes beyond this point
// and this also captures value = 0 which you can't compute the logarithm for
// and also byond numbers are floats and doesn't have much precision beyond this point anyway
if(abs(value) <= 1e-18)
return "0 [unit]"
var/exponent = clamp(log(10, abs(value)), -15, 15) // Calculate the exponent and clamp it so we don't go outside the prefix list bounds
var/divider = 10 ** (round(exponent / 3) * 3) // Rounds the exponent to nearest SI unit and power it back to the full form
var/coefficient = round(value / divider, 10 ** -maxdecimals) // Calculate the coefficient and round it to desired decimals
var/prefix_index = round(exponent / 3) + 6 // Calculate the index in the prefixes list for this exponent
// An edge case which happens if we round 999.9 to 0 decimals for example, which gets rounded to 1000
// In that case, we manually swap up to the next prefix if there is one available
if(coefficient >= 1000 && prefix_index < 11)
coefficient /= 1e3
prefix_index++
var/prefix = prefixes[prefix_index]
return "[coefficient] [prefix][unit]"

View File

@@ -132,7 +132,10 @@ GLOBAL_LIST_INIT(bitfields, list(
"HOLOGRAM_1" = HOLOGRAM_1,
"SHOCKED_1" = SHOCKED_1,
"INITIALIZED_1" = INITIALIZED_1,
"ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1
"ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1,
"PREVENT_CONTENTS_EXPLOSION_1" = PREVENT_CONTENTS_EXPLOSION_1,
"RAD_PROTECT_CONTENTS_1" = RAD_PROTECT_CONTENTS_1,
"RAD_NO_CONTAMINATE_1" = RAD_NO_CONTAMINATE_1
),
"flags_ricochet" = list(
"RICOCHET_SHINY" = RICOCHET_SHINY,
@@ -178,10 +181,6 @@ GLOBAL_LIST_INIT(bitfields, list(
"STORAGE" = MOBILITY_STORAGE,
"PULL" = MOBILITY_PULL,
),
"rad_flags" = list(
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
),
"disease_flags" = list (
"CURABLE" = CURABLE,
"CAN_CARRY" = CAN_CARRY,

View File

@@ -39,6 +39,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_RESISTLOWPRESSURE" = TRAIT_RESISTLOWPRESSURE,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_RADIMMUNE" = TRAIT_RADIMMUNE,
"TRAIT_GENELESS" = TRAIT_GENELESS,
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
"TRAIT_PIERCEIMMUNE" = TRAIT_PIERCEIMMUNE,
"TRAIT_NODISMEMBER" = TRAIT_NODISMEMBER,
@@ -108,7 +109,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_GIANT" = TRAIT_GIANT,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_NICE_SHOT" = TRAIT_NICE_SHOT,
"TRAIT_TUMOR_SUPPRESSION" = TRAIT_TUMOR_SUPPRESSED
"TRAIT_TUMOR_SUPPRESSION" = TRAIT_TUMOR_SUPPRESSED,
"TRAIT_PERMANENTLY_ONFIRE" = TRAIT_PERMANENTLY_ONFIRE
),
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS

View File

@@ -78,7 +78,7 @@
var/auto_trim = TRUE
/datum/config_entry/string/vv_edit_var(var_name, var_value)
return var_name != "auto_trim" && ..()
return var_name != NAMEOF(src, auto_trim) && ..()
/datum/config_entry/string/ValidateAndSet(str_val)
if(!VASProcCallGuard(str_val))
@@ -105,7 +105,7 @@
return FALSE
/datum/config_entry/number/vv_edit_var(var_name, var_value)
var/static/list/banned_edits = list("max_val", "min_val", "integer")
var/static/list/banned_edits = list(NAMEOF(src, max_val), NAMEOF(src, min_val), NAMEOF(src, integer))
return !(var_name in banned_edits) && ..()
/datum/config_entry/flag
@@ -194,4 +194,4 @@
return FALSE
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
return var_name != "splitter" && ..()
return var_name != NAMEOF(src, splitter) && ..()

View File

@@ -261,10 +261,10 @@
/datum/controller/subsystem/vv_edit_var(var_name, var_value)
switch (var_name)
if ("can_fire")
if (NAMEOF(src, can_fire))
//this is so the subsystem doesn't rapid fire to make up missed ticks causing more lag
if (var_value)
next_fire = world.time + wait
if ("queued_priority") //editing this breaks things.
return 0
if (NAMEOF(src, queued_priority)) //editing this breaks things.
return FALSE
. = ..()

View File

@@ -45,7 +45,8 @@ SUBSYSTEM_DEF(achievements)
if(!PD || !PD.achievements)
continue
cheevos_to_save += PD.achievements.get_changed_data()
if(!length(cheevos_to_save))
return
SSdbcore.MassInsert(format_table_name("achievements"),cheevos_to_save,duplicate_key = TRUE)
//Update the metadata if any are behind

View File

@@ -69,9 +69,9 @@ SUBSYSTEM_DEF(blackbox)
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
switch(var_name)
if("feedback")
if(NAMEOF(src, feedback))
return FALSE
if("sealed")
if(NAMEOF(src, sealed))
if(var_value)
return Seal()
return FALSE

View File

@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(research)
var/list/point_types = list() //typecache style type = TRUE list
var/list/slime_already_researched = list() //Slime cores that have already been researched
//----------------------------------------------
var/list/single_server_income = list(TECHWEB_POINT_TYPE_GENERIC = 52.3)
var/list/single_server_income = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_SINGLE_SERVER_INCOME)
var/multiserver_calculation = FALSE
var/last_income
//^^^^^^^^ ALL OF THESE ARE PER SECOND! ^^^^^^^^

View File

@@ -752,14 +752,15 @@ SUBSYSTEM_DEF(shuttle)
preview_shuttle.jumpToNullSpace()
preview_shuttle = null
/datum/controller/subsystem/shuttle/ui_state(mob/user)
return GLOB.admin_state
/datum/controller/subsystem/shuttle/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.admin_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/controller/subsystem/shuttle/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "ShuttleManipulator", name, 800, 600, master_ui, state)
ui = new(user, src, "ShuttleManipulator")
ui.open()
/datum/controller/subsystem/shuttle/ui_data(mob/user)
var/list/data = list()
data["tabs"] = list("Status", "Templates", "Modification")

View File

@@ -1,4 +1,8 @@
/**
* tgui subsystem
*
* Contains all tgui state and subsystem code.
*
* Copyright (c) 2020 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
@@ -10,10 +14,14 @@ SUBSYSTEM_DEF(tgui)
priority = FIRE_PRIORITY_TGUI
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/list/currentrun = list()
var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
var/list/processing_uis = list() // A list of processing UIs, ungrouped.
var/basehtml // The HTML base used for all UIs.
/// A list of UIs scheduled to process
var/list/current_run = list()
/// A list of open UIs
var/list/open_uis = list()
/// A list of open UIs, grouped by src_object.
var/list/open_uis_by_src = list()
/// The HTML base used for all UIs.
var/basehtml
/datum/controller/subsystem/tgui/PreInit()
basehtml = file2text('tgui/packages/tgui/public/tgui.html')
@@ -22,20 +30,322 @@ SUBSYSTEM_DEF(tgui)
close_all_uis()
/datum/controller/subsystem/tgui/stat_entry()
..("P:[processing_uis.len]")
..("P:[open_uis.len]")
/datum/controller/subsystem/tgui/fire(resumed = 0)
if (!resumed)
src.currentrun = processing_uis.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/datum/tgui/ui = currentrun[currentrun.len]
currentrun.len--
if(!resumed)
src.current_run = open_uis.Copy()
// Cache for sanic speed (lists are references anyways)
var/list/current_run = src.current_run
while(current_run.len)
var/datum/tgui/ui = current_run[current_run.len]
current_run.len--
// TODO: Move user/src_object check to process()
if(ui && ui.user && ui.src_object)
ui.process()
else
processing_uis.Remove(ui)
if (MC_TICK_CHECK)
open_uis.Remove(ui)
if(MC_TICK_CHECK)
return
/**
* public
*
* Requests a usable tgui window from the pool.
* Returns null if pool was exhausted.
*
* required user mob
* return datum/tgui
*/
/datum/controller/subsystem/tgui/proc/request_pooled_window(mob/user)
if(!user.client)
return null
var/list/windows = user.client.tgui_windows
var/window_id
var/datum/tgui_window/window
var/window_found = FALSE
// Find a usable window
for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT)
window_id = TGUI_WINDOW_ID(i)
window = windows[window_id]
// As we are looping, create missing window datums
if(!window)
window = new(user.client, window_id, pooled = TRUE)
// Skip windows with acquired locks
if(window.locked)
continue
if(window.status == TGUI_WINDOW_READY)
return window
if(window.status == TGUI_WINDOW_CLOSED)
window.status = TGUI_WINDOW_LOADING
window_found = TRUE
break
if(!window_found)
log_tgui(user, "Error: Pool exhausted")
return null
return window
/**
* public
*
* Force closes all tgui windows.
*
* required user mob
*/
/datum/controller/subsystem/tgui/proc/force_close_all_windows(mob/user)
log_tgui(user, "force_close_all_windows")
if(user.client)
user.client.tgui_windows = list()
for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT)
var/window_id = TGUI_WINDOW_ID(i)
user << browse(null, "window=[window_id]")
/**
* public
*
* Force closes the tgui window by window_id.
*
* required user mob
* required window_id string
*/
/datum/controller/subsystem/tgui/proc/force_close_window(mob/user, window_id)
log_tgui(user, "force_close_window")
// Close all tgui datums based on window_id.
for(var/datum/tgui/ui in user.tgui_open_uis)
if(ui.window && ui.window.id == window_id)
ui.close(can_be_suspended = FALSE)
// Unset machine just to be sure.
user.unset_machine()
// Close window directly just to be sure.
user << browse(null, "window=[window_id]")
/**
* public
*
* Try to find an instance of a UI, and push an update to it.
*
* required user mob The mob who opened/is using the UI.
* required src_object datum The object/datum which owns the UI.
* optional ui datum/tgui The UI to be updated, if it exists.
* optional force_open bool If the UI should be re-opened instead of updated.
*
* return datum/tgui The found UI.
*/
/datum/controller/subsystem/tgui/proc/try_update_ui(
mob/user,
datum/src_object,
datum/tgui/ui)
// Look up a UI if it wasn't passed
if(isnull(ui))
ui = get_open_ui(user, src_object)
// Couldn't find a UI.
if(isnull(ui))
return null
ui.process_status()
// UI ended up with the closed status
// or is actively trying to close itself.
// FIXME: Doesn't actually fix the paper bug.
if(ui.status <= UI_CLOSE)
ui.close()
return null
ui.send_update()
return ui
/**
* public
*
* Get a open UI given a user and src_object.
*
* required user mob The mob who opened/is using the UI.
* required src_object datum The object/datum which owns the UI.
*
* return datum/tgui The found UI.
*/
/datum/controller/subsystem/tgui/proc/get_open_ui(mob/user, datum/src_object)
var/key = "[REF(src_object)]"
// No UIs opened for this src_object
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
return null
for(var/datum/tgui/ui in open_uis_by_src[key])
// Make sure we have the right user
if(ui.user == user)
return ui
return null
/**
* public
*
* Update all UIs attached to src_object.
*
* required src_object datum The object/datum which owns the UIs.
*
* return int The number of UIs updated.
*/
/datum/controller/subsystem/tgui/proc/update_uis(datum/src_object)
var/count = 0
var/key = "[REF(src_object)]"
// No UIs opened for this src_object
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
return count
for(var/datum/tgui/ui in open_uis_by_src[key])
// Check if UI is valid.
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
ui.process(force = 1)
count++
return count
/**
* public
*
* Close all UIs attached to src_object.
*
* required src_object datum The object/datum which owns the UIs.
*
* return int The number of UIs closed.
*/
/datum/controller/subsystem/tgui/proc/close_uis(datum/src_object)
var/count = 0
var/key = "[REF(src_object)]"
// No UIs opened for this src_object
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
return count
for(var/datum/tgui/ui in open_uis_by_src[key])
// Check if UI is valid.
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
ui.close()
count++
return count
/**
* public
*
* Close all UIs regardless of their attachment to src_object.
*
* return int The number of UIs closed.
*/
/datum/controller/subsystem/tgui/proc/close_all_uis()
var/count = 0
for(var/key in open_uis_by_src)
for(var/datum/tgui/ui in open_uis_by_src[key])
// Check if UI is valid.
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
ui.close()
count++
return count
/**
* public
*
* Update all UIs belonging to a user.
*
* required user mob The mob who opened/is using the UI.
* optional src_object datum If provided, only update UIs belonging this src_object.
*
* return int The number of UIs updated.
*/
/datum/controller/subsystem/tgui/proc/update_user_uis(mob/user, datum/src_object)
var/count = 0
if(length(user?.tgui_open_uis) == 0)
return count
for(var/datum/tgui/ui in user.tgui_open_uis)
if(isnull(src_object) || ui.src_object == src_object)
ui.process(force = 1)
count++
return count
/**
* public
*
* Close all UIs belonging to a user.
*
* required user mob The mob who opened/is using the UI.
* optional src_object datum If provided, only close UIs belonging this src_object.
*
* return int The number of UIs closed.
*/
/datum/controller/subsystem/tgui/proc/close_user_uis(mob/user, datum/src_object)
var/count = 0
if(length(user?.tgui_open_uis) == 0)
return count
for(var/datum/tgui/ui in user.tgui_open_uis)
if(isnull(src_object) || ui.src_object == src_object)
ui.close()
count++
return count
/**
* private
*
* Add a UI to the list of open UIs.
*
* required ui datum/tgui The UI to be added.
*/
/datum/controller/subsystem/tgui/proc/on_open(datum/tgui/ui)
var/key = "[REF(ui.src_object)]"
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
open_uis_by_src[key] = list()
ui.user.tgui_open_uis |= ui
var/list/uis = open_uis_by_src[key]
uis |= ui
open_uis |= ui
/**
* private
*
* Remove a UI from the list of open UIs.
*
* required ui datum/tgui The UI to be removed.
*
* return bool If the UI was removed or not.
*/
/datum/controller/subsystem/tgui/proc/on_close(datum/tgui/ui)
var/key = "[REF(ui.src_object)]"
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
return FALSE
// Remove it from the list of processing UIs.
open_uis.Remove(ui)
// If the user exists, remove it from them too.
if(ui.user)
ui.user.tgui_open_uis.Remove(ui)
var/list/uis = open_uis_by_src[key]
uis.Remove(ui)
if(length(uis) == 0)
open_uis_by_src.Remove(key)
return TRUE
/**
* private
*
* Handle client logout, by closing all their UIs.
*
* required user mob The mob which logged out.
*
* return int The number of UIs closed.
*/
/datum/controller/subsystem/tgui/proc/on_logout(mob/user)
close_user_uis(user)
/**
* private
*
* Handle clients switching mobs, by transferring their UIs.
*
* required user source The client's original mob.
* required user target The client's new mob.
*
* return bool If the UIs were transferred.
*/
/datum/controller/subsystem/tgui/proc/on_transfer(mob/source, mob/target)
// The old mob had no open UIs.
if(length(source?.tgui_open_uis) == 0)
return FALSE
if(isnull(target.tgui_open_uis) || !istype(target.tgui_open_uis, /list))
target.tgui_open_uis = list()
// Transfer all the UIs.
for(var/datum/tgui/ui in source.tgui_open_uis)
// Inform the UIs of their new owner.
ui.user = target
target.tgui_open_uis.Add(ui)
// Clear the old list.
source.tgui_open_uis.Cut()
return TRUE

View File

@@ -64,15 +64,40 @@ SUBSYSTEM_DEF(throwing)
var/delayed_time = 0
var/last_move = 0
/datum/thrownthing/New(thrownthing, target, target_turf, init_dir, maxrange, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
. = ..()
src.thrownthing = thrownthing
RegisterSignal(thrownthing, COMSIG_PARENT_QDELETING, .proc/on_thrownthing_qdel)
src.target = target
src.target_turf = target_turf
src.init_dir = init_dir
src.maxrange = maxrange
src.speed = speed
src.thrower = thrower
src.diagonals_first = diagonals_first
src.force = force
src.gentle = gentle
src.callback = callback
src.target_zone = target_zone
/datum/thrownthing/Destroy()
SSthrowing.processing -= thrownthing
thrownthing.throwing = null
thrownthing = null
target = null
thrower = null
callback = null
if(callback)
QDEL_NULL(callback) //It stores a reference to the thrownthing, its source. Let's clean that.
return ..()
///Defines the datum behavior on the thrownthing's qdeletion event.
/datum/thrownthing/proc/on_thrownthing_qdel(atom/movable/source, force)
qdel(src)
/datum/thrownthing/proc/tick()
var/atom/movable/AM = thrownthing
if (!isturf(AM.loc) || !AM.throwing)
@@ -136,15 +161,21 @@ SUBSYSTEM_DEF(throwing)
if (A == target)
hit = TRUE
thrownthing.throw_impact(A, src)
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
return //deletion should already be handled by on_thrownthing_qdel()
break
if (!hit)
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
return //deletion should already be handled by on_thrownthing_qdel()
thrownthing.newtonian_move(init_dir)
else
thrownthing.newtonian_move(init_dir)
if(target)
thrownthing.throw_impact(target, src)
if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
return //deletion should already be handled by on_thrownthing_qdel()
if (callback)
callback.Invoke()

View File

@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(title)
. = ..()
if(.)
switch(var_name)
if("icon")
if(NAMEOF(src, icon))
if(splash_turf)
splash_turf.icon = icon

View File

@@ -91,16 +91,18 @@
else if(istype(A, /datum/award/score))
data[achievement_type] = 0
/datum/achievement_data/ui_base_html(html)
var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/achievements)
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
/datum/achievement_data/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/simple/achievements),
)
/datum/achievement_data/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.always_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/achievement_data/ui_state(mob/user)
return GLOB.always_state
/datum/achievement_data/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/achievements)
assets.send(user)
ui = new(user, src, ui_key, "Achievements", "Achievements Menu", 540, 680, master_ui, state)
ui = new(user, src, "Achievements")
ui.open()
/datum/achievement_data/ui_data(mob/user)

View File

@@ -14,7 +14,7 @@
/datum/brain_trauma/severe/split_personality/on_gain()
var/mob/living/M = owner
if(M.stat == DEAD) //No use assigning people to a corpse
if(M.stat == DEAD || !M.client) //No use assigning people to a corpse or braindead
qdel(src)
return
..()
@@ -71,6 +71,9 @@
current_backseat = owner_backseat
free_backseat = stranger_backseat
if(!free_backseat.client) //Make sure we never switch to a logged off mob.
return
log_game("[key_name(current_backseat)] assumed control of [key_name(owner)] due to [src]. (Original owner: [current_controller == OWNER ? owner.key : current_backseat.key])")
to_chat(owner, "<span class='userdanger'>You feel your control being taken away... your other personality is in charge now!</span>")
to_chat(current_backseat, "<span class='userdanger'>You manage to take control of your body!</span>")

View File

@@ -316,9 +316,12 @@
if(user == parent)
ui_interact(user)
/datum/component/personal_crafting/ui_state(mob/user)
return GLOB.not_incapacitated_turf_state
//For the UI related things we're going to assume the user is a mob rather than typesetting it to an atom as the UI isn't generated if the parent is an atom
/datum/component/personal_crafting/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.not_incapacitated_turf_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/component/personal_crafting/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
cur_category = categories[1]
if(islist(categories[cur_category]))
@@ -326,7 +329,7 @@
cur_subcategory = subcats[1]
else
cur_subcategory = CAT_NONE
ui = new(user, src, ui_key, "PersonalCrafting", "Crafting Menu", 700, 800, master_ui, state)
ui = new(user, src, "PersonalCrafting")
ui.open()
/datum/component/personal_crafting/ui_data(mob/user)
@@ -406,13 +409,8 @@
display_compact = !display_compact
. = TRUE
if("set_category")
if(!isnull(params["category"]))
cur_category = params["category"]
if(!isnull(params["subcategory"]))
if(params["subcategory"] == "0")
cur_subcategory = ""
else
cur_subcategory = params["subcategory"]
cur_subcategory = params["subcategory"] || ""
. = TRUE
/datum/component/personal_crafting/proc/build_recipe_data(datum/crafting_recipe/R)

View File

@@ -80,19 +80,15 @@ GLOBAL_LIST_EMPTY(GPS_list)
to_chat(user, "<span class='notice'>[parent] is now tracking, and visible to other GPS devices.</span>")
tracking = TRUE
/datum/component/gps/item/ui_interact(mob/user, ui_key = "gps", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
/datum/component/gps/item/ui_interact(mob/user, datum/tgui/ui)
if(emped)
to_chat(user, "<span class='hear'>[parent] fizzles weakly.</span>")
return
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
// Variable window height, depending on how many GPS units there are
// to show, clamped to relatively safe range.
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
ui = new(user, src, ui_key, "Gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
ui = new(user, src, "Gps")
ui.open()
ui.set_autoupdate(state = updating)
ui.set_autoupdate(updating)
/datum/component/gps/item/ui_data(mob/user)
var/list/data = list()

View File

@@ -285,5 +285,5 @@
/datum/component/pellet_cloud/proc/on_target_qdel(atom/target)
UnregisterSignal(target, COMSIG_PARENT_QDELETING)
targets_hit -= target
bodies -= target
LAZYREMOVE(bodies, target)
LAZYREMOVE(purple_hearts, target)

View File

@@ -366,6 +366,7 @@
user.adjustBruteLoss(30)
playsound(user, 'sound/effects/blobattack.ogg', 60, TRUE)
playsound(user, 'sound/effects/splat.ogg', 70, TRUE)
playsound(user, 'sound/effects/crack2.ogg', 70, TRUE)
user.emote("scream")
user.gain_trauma(/datum/brain_trauma/severe/paralysis/paraplegic) // oopsie indeed!
shake_camera(user, 7, 7)
@@ -434,13 +435,13 @@
W.obj_destruction()
user.adjustStaminaLoss(10 * speed)
user.Paralyze(30)
user.visible_message("<span class='danger'>[user] slams into [W] and shatters it, shredding [user.p_them()]self with glass!</span>", "<span class='userdanger'>You slam into [W] and shatter it, shredding yourself with glass!</span>")
user.visible_message("<span class='danger'>[user] smacks into [W] and shatters it, shredding [user.p_them()]self with glass!</span>", "<span class='userdanger'>You smacks into [W] and shatter it, shredding yourself with glass!</span>")
else
user.visible_message("<span class='danger'>[user] slams into [W] like a bug, then slowly slides off it!</span>", "<span class='userdanger'>You slam into [W] like a bug, then slowly slide off it!</span>")
user.visible_message("<span class='danger'>[user] smacks into [W] like a bug!</span>", "<span class='userdanger'>You smacks into [W] like a bug!</span>")
user.Paralyze(10)
user.Knockdown(30)
W.take_damage(20 * speed)
W.take_damage(30 * speed)
user.adjustStaminaLoss(10 * speed)
user.adjustBruteLoss(5 * speed)

View File

@@ -120,12 +120,14 @@
// an unlocked uplink blocks also opening the PDA or headset menu
return COMPONENT_NO_INTERACT
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
/datum/component/uplink/ui_state(mob/user)
return GLOB.inventory_state
/datum/component/uplink/ui_interact(mob/user, datum/tgui/ui)
active = TRUE
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Uplink", name, 620, 580, master_ui, state)
ui = new(user, src, "Uplink", name)
// This UI is only ever opened by one person,
// and never is updated outside of user input.
ui.set_autoupdate(FALSE)

View File

@@ -8,7 +8,7 @@
/datum/keybinding/human/quick_equip
hotkey_keys = list("E")
name = "quick_equip"
full_name = "Quick Equip"
full_name = "Quick equip"
description = "Quickly puts an item in the best slot available"
/datum/keybinding/human/quick_equip/down(client/user)
@@ -16,27 +16,36 @@
H.quick_equip()
return TRUE
/datum/keybinding/human/quick_equipbelt
/datum/keybinding/human/quick_equip_belt
hotkey_keys = list("ShiftE")
name = "quick_equipbelt"
name = "quick_equip_belt"
full_name = "Quick equip belt"
description = "Put held thing in belt or take out most recent thing from belt"
///which slot are we trying to quickdraw from/quicksheathe into?
var/slot_type = ITEM_SLOT_BELT
///what we should call slot_type in messages (including failure messages)
var/slot_item_name = "belt"
/datum/keybinding/human/quick_equipbelt/down(client/user)
/datum/keybinding/human/quick_equip_belt/down(client/user)
var/mob/living/carbon/human/H = user.mob
H.smart_equipbelt()
H.smart_equip_targeted(slot_type, slot_item_name)
return TRUE
/datum/keybinding/human/bag_equip
/datum/keybinding/human/quick_equip_belt/quick_equip_bag
hotkey_keys = list("ShiftB")
name = "bag_equip"
full_name = "Bag equip"
name = "quick_equip_bag"
full_name = "Quick equip bag"
description = "Put held thing in backpack or take out most recent thing from backpack"
slot_type = ITEM_SLOT_BACK
slot_item_name = "backpack"
/datum/keybinding/human/bag_equip/down(client/user)
var/mob/living/carbon/human/H = user.mob
H.smart_equipbag()
return TRUE
/datum/keybinding/human/quick_equip_belt/quick_equip_suit_storage
hotkey_keys = list("ShiftQ")
name = "quick_equip_suit_storage"
full_name = "Quick equip suit storage slot"
description = "Put held thing in suit storage slot item or take out most recent thing from suit storage slot item"
slot_type = ITEM_SLOT_SUITSTORE
slot_item_name = "suit storage slot item"
/datum/keybinding/human/equipment_swap
hotkey_keys = list("V")

View File

@@ -73,6 +73,10 @@
var/list/known_skills = list()
///What character we spawned in as- either at roundstart or latejoin, so we know for persistent scars if we ended as the same person or not
var/mob/original_character
///Skill multiplier, adjusts how much xp you get/loose from adjust_xp. Dont override it directly, add your reason to experience_multiplier_reasons and use that as a key to put your value in there.
var/experience_multiplier = 1
///Skill multiplier list, just slap your multiplier change onto this with the type it is coming from as key.
var/list/experience_multiplier_reasons = list()
/datum/mind/New(key)
src.key = key
@@ -146,7 +150,10 @@
/datum/mind/proc/adjust_experience(skill, amt, silent = FALSE, force_old_level = 0)
var/datum/skill/S = GetSkillRef(skill)
var/old_level = force_old_level ? force_old_level : known_skills[skill][SKILL_LVL] //Get current level of the S skill
known_skills[skill][SKILL_EXP] = max(0, known_skills[skill][SKILL_EXP] + amt) //Update exp. Prevent going below 0
experience_multiplier = initial(experience_multiplier)
for(var/key in experience_multiplier_reasons)
experience_multiplier += experience_multiplier_reasons[key]
known_skills[skill][SKILL_EXP] = max(0, known_skills[skill][SKILL_EXP] + amt*experience_multiplier) //Update exp. Prevent going below 0
known_skills[skill][SKILL_LVL] = update_skill_level(skill)//Check what the current skill level is based on that skill's exp
if(silent)
return

View File

@@ -124,7 +124,7 @@
))
if(!can_contaminate || !can_contam || blacklisted[thing.type])
continue
if(thing.rad_flags & RAD_NO_CONTAMINATE || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
if(thing.flags_1 & RAD_NO_CONTAMINATE_1 || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
continue
if(contamination_strength > remaining_contam)

View File

@@ -77,5 +77,5 @@ GLOBAL_LIST_INIT(skill_types, subtypesof(/datum/skill))
pod.explosionSize = list(0,0,0,0)
to_chat(mind.current, "<span class='nicegreen'>My legendary skill has attracted the attention of the Professional [title] Association. It seems they are sending me a status symbol to commemorate my abilities.</span>")
var/turf/T = get_turf(mind.current)
new /obj/effect/dp_target(T, pod , new skill_cape_path(T))
new /obj/effect/pod_landingzone(T, pod , new skill_cape_path(T))
LAZYADD(mind.skills_rewarded, src.type)

View File

@@ -6,10 +6,13 @@
qdel(src)
owner = new_owner
/datum/spawners_menu/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.observer_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/spawners_menu/ui_state(mob/user)
return GLOB.observer_state
/datum/spawners_menu/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "SpawnersMenu", "Spawners Menu", 700, 600, master_ui, state)
ui = new(user, src, "SpawnersMenu")
ui.open()
/datum/spawners_menu/ui_data(mob/user)

View File

@@ -33,7 +33,7 @@
if(prob(40))
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.dna && !HAS_TRAIT(H, TRAIT_RADIMMUNE))
if(H.dna && !HAS_TRAIT(H, TRAIT_GENELESS))
if(prob(max(0,100-resist)))
H.randmuti()
if(prob(50))

View File

@@ -215,11 +215,13 @@
return ..()
return UI_CLOSE
/datum/wires/ui_interact(mob/user, ui_key = "wires", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/wires/ui_state(mob/user)
return GLOB.physical_state
/datum/wires/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, ui_key, "Wires", "[holder.name] Wires", 350, 150 + wires.len * 30, master_ui, state)
ui = new(user, src, "Wires", "[holder.name] Wires")
ui.open()
/datum/wires/ui_data(mob/user)

View File

@@ -0,0 +1,17 @@
/datum/wires/conveyor
holder_type = /obj/machinery/conveyor_switch
proper_name = "conveyor"
/// var holder that logs who put the assembly inside and gets transfered to the switch on pulse
var/mob/fingerman
/datum/wires/conveyor/New(atom/holder)
add_duds(1)
..()
/datum/wires/conveyor/on_pulse(wire)
var/obj/machinery/conveyor_switch/C = holder
C.interact(fingerman)
/datum/wires/conveyor/interactable(mob/user)
fingerman = user
return TRUE

View File

@@ -141,6 +141,7 @@
flags_1 = NONE
flora_allowed = TRUE
blob_allowed = FALSE
valid_territory = FALSE
/area/icemoon/surface
name = "Icemoon"

View File

@@ -71,8 +71,6 @@
//List of datums orbiting this atom
var/datum/component/orbiter/orbiters
/// Will move to flags_1 when i can be arsed to (2019, has not done so)
var/rad_flags = NONE
/// Radiation insulation types
var/rad_insulation = RAD_NO_INSULATION
@@ -976,7 +974,7 @@
flags_1 |= ADMIN_SPAWNED_1
. = ..()
switch(var_name)
if("color")
if(NAMEOF(src, color))
add_atom_colour(color, ADMIN_COLOUR_PRIORITY)
/**
@@ -1291,13 +1289,15 @@
* * base_roll- Base wounding ability of an attack is a random number from 1 to (dealt_damage ** WOUND_DAMAGE_EXPONENT). This is the number that was rolled in there, before mods
*/
/proc/log_wound(atom/victim, datum/wound/suffered_wound, dealt_damage, dealt_wound_bonus, dealt_bare_wound_bonus, base_roll)
var/message = "has suffered: [suffered_wound] to [suffered_wound.limb.name]" // maybe indicate if it's a promote/demote?
if(QDELETED(victim) || !suffered_wound)
return
var/message = "has suffered: [suffered_wound][suffered_wound.limb ? " to [suffered_wound.limb.name]" : null]"// maybe indicate if it's a promote/demote?
if(dealt_damage)
message += " | Damage: [dealt_damage]"
// The base roll is useful since it can show how lucky someone got with the given attack. For example, dealing a cut
if(base_roll)
message += "(rolled [base_roll]/[dealt_damage ** WOUND_DAMAGE_EXPONENT])"
message += " (rolled [base_roll]/[dealt_damage ** WOUND_DAMAGE_EXPONENT])"
if(dealt_wound_bonus)
message += " | WB: [dealt_wound_bonus]"
@@ -1323,6 +1323,12 @@
arguments -= "priority"
filters += filter(arglist(arguments))
/obj/item/update_filters()
. = ..()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/atom/movable/proc/get_filter(name)
if(filter_data && filter_data[name])
return filters[filter_data.Find(name)]
@@ -1409,3 +1415,19 @@
*/
/atom/proc/rust_heretic_act()
return
/**
* Used to set something as 'open' if it's being used as a supplypod
*
* Override this if you want an atom to be usable as a supplypod.
*/
/atom/proc/setOpened()
return
/**
* Used to set something as 'closed' if it's being used as a supplypod
*
* Override this if you want an atom to be usable as a supplypod.
*/
/atom/proc/setClosed()
return

View File

@@ -127,25 +127,25 @@
if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
return FALSE
switch(var_name)
if("x")
if(NAMEOF(src, x))
var/turf/T = locate(var_value, y, z)
if(T)
forceMove(T)
return TRUE
return FALSE
if("y")
if(NAMEOF(src, y))
var/turf/T = locate(x, var_value, z)
if(T)
forceMove(T)
return TRUE
return FALSE
if("z")
if(NAMEOF(src, z))
var/turf/T = locate(x, y, var_value)
if(T)
forceMove(T)
return TRUE
return FALSE
if("loc")
if(NAMEOF(src, loc))
if(istype(var_value, /atom))
forceMove(var_value)
return TRUE
@@ -574,7 +574,7 @@
if(impact_signal & COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH)
hitpush = FALSE // hacky, tie this to something else or a proper workaround later
if(impact_signal & ~COMPONENT_MOVABLE_IMPACT_NEVERMIND) // in case a signal interceptor broke or deleted the thing before we could process our hit
if(!(impact_signal && (impact_signal & COMPONENT_MOVABLE_IMPACT_NEVERMIND))) // in case a signal interceptor broke or deleted the thing before we could process our hit
return hit_atom.hitby(src, throwingdatum=throwingdatum, hitpush=hitpush)
/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
@@ -590,6 +590,10 @@
///If this returns FALSE then callback will not be called.
/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE, quickstart = TRUE)
. = FALSE
if(QDELETED(src))
CRASH("Qdeleted thing being thrown around.")
if (!target || speed <= 0)
return
@@ -625,20 +629,13 @@
. = TRUE // No failure conditions past this point.
var/datum/thrownthing/TT = new()
TT.thrownthing = src
TT.target = target
TT.target_turf = get_turf(target)
TT.init_dir = get_dir(src, target)
TT.maxrange = range
TT.speed = speed
TT.thrower = thrower
TT.diagonals_first = diagonals_first
TT.force = force
TT.gentle = gentle
TT.callback = callback
if(!QDELETED(thrower))
TT.target_zone = thrower.zone_selected
var/target_zone
if(QDELETED(thrower))
thrower = null //Let's not pass a qdeleting reference if any.
else
target_zone = thrower.zone_selected
var/datum/thrownthing/TT = new(src, target, get_turf(target), get_dir(src, target), range, speed, thrower, diagonals_first, force, gentle, callback, thrower, target_zone)
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)

View File

@@ -12,8 +12,6 @@
density = FALSE
state_open = TRUE
circuit = /obj/item/circuitboard/machine/sleeper
ui_x = 310
ui_y = 465
var/efficiency = 1
var/min_health = -25
@@ -136,15 +134,15 @@
visible_message("<span class='notice'>[usr] pries open [src].</span>", "<span class='notice'>You pry open [src].</span>")
open_machine()
/obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
/obj/machinery/sleeper/ui_state(mob/user)
if(controls_inside)
return GLOB.notcontained_state
return GLOB.default_state
if(controls_inside && state == GLOB.notcontained_state)
state = GLOB.default_state // If it has a set of controls on the inside, make it actually controllable by the mob in it.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/sleeper/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Sleeper", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Sleeper", name)
ui.open()
/obj/machinery/sleeper/AltClick(mob/user)
@@ -287,8 +285,6 @@
idle_power_usage = 3000
circuit = /obj/item/circuitboard/machine/sleeper/party
var/leddit = FALSE //Get it like reddit and lead alright fine
ui_x = 310
ui_y = 400
controls_inside = TRUE
possible_chems = list(

View File

@@ -126,11 +126,8 @@ Class Procs:
var/market_verb = "Customer"
var/payment_department = ACCOUNT_ENG
// For storing and overriding ui id and dimensions
// For storing and overriding ui id
var/tgui_id // ID of TGUI interface
var/ui_style // ID of custom TGUI style (optional)
var/ui_x // Default size of TGUI window, in pixels
var/ui_y
/obj/machinery/Initialize()
if(!armor)
@@ -407,7 +404,7 @@ Class Procs:
for(var/obj/item/I in component_parts)
I.forceMove(loc)
component_parts.Cut()
qdel(src)
return ..()
/obj/machinery/proc/spawn_frame(disassembled)
var/obj/structure/frame/machine/M = new /obj/structure/frame/machine(loc)
@@ -437,6 +434,7 @@ Class Procs:
occupant = null
update_icon()
updateUsrDialog()
return ..()
/obj/machinery/CanAllowThrough(atom/movable/mover, turf/target)
. = ..()

View File

@@ -93,13 +93,10 @@ GLOBAL_LIST_EMPTY(announcement_systems)
for(var/channel in channels)
radio.talk_into(src, message, channel)
//config stuff
/obj/machinery/announcement_system/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
. = ..()
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/announcement_system/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AutomatedAnnouncement", "Automated Announcement System", 500, 225, master_ui, state)
ui = new(user, src, "AutomatedAnnouncement")
ui.open()
/obj/machinery/announcement_system/ui_data()

View File

@@ -3,8 +3,7 @@
desc = "A machine used to deposit and withdraw station funds."
icon = 'goon/icons/obj/goon_terminals.dmi'
idle_power_usage = 100
ui_x = 335
ui_y = 160
var/siphoning = FALSE
var/next_warning = 0
var/obj/item/radio/radio
@@ -61,11 +60,10 @@
radio.talk_into(src, message, radio_channel)
next_warning = world.time + minimum_time_between_warnings
/obj/machinery/computer/bank_machine/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/bank_machine/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "BankMachine", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "BankMachine", name)
ui.open()
/obj/machinery/computer/bank_machine/ui_data(mob/user)

View File

@@ -9,8 +9,6 @@ GLOBAL_LIST_EMPTY(request_list)
desc = "Alows you to place requests for goods and services across the station, as well as pay those who actually did it."
icon = 'icons/obj/terminals.dmi'
icon_state = "request_kiosk"
ui_x = 550
ui_y = 600
light_color = LIGHT_COLOR_GREEN
///Reference to the currently logged in user.
var/datum/bank_account/current_user
@@ -56,10 +54,10 @@ GLOBAL_LIST_EMPTY(request_list)
new /obj/item/wallframe/bounty_board(loc)
qdel(src)
/obj/machinery/bounty_board/ui_interact(mob/user, ui_key, datum/tgui/ui, force_open, datum/tgui/master_ui, datum/ui_state/state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/bounty_board/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "RequestKiosk", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "RequestKiosk", name)
ui.open()
/obj/machinery/bounty_board/ui_data(mob/user)

View File

@@ -8,87 +8,116 @@
/obj/structure/canister_frame/examine(user)
. = ..()
/obj/structure/canister_frame/deconstruct(disassembled = TRUE)
if (!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc, 5)
qdel(src)
/obj/structure/canister_frame/machine
name = "canister frame"
desc = "A frame used to build different kinds of canisters."
/// The previous canister frame tier path
var/obj/structure/canister_frame/machine/prev_tier
/// The next canister frame tier path
var/obj/structure/canister_frame/machine/next_tier
/// The required item for going to next tier. Must be set if next_tier is set.
var/obj/item/stack/next_tier_reqitem
/// The amount of items required in the stack of the required item. Must be set if next_tier is set.
var/next_tier_reqitem_am
/// The finished usable canister path
var/atom/finished_obj
/obj/structure/canister_frame/machine/deconstruct(disassembled = TRUE)
if (!(flags_1 & NODECONSTRUCT_1))
// Spawn 5 sheets for the tier 0 frame
new /obj/item/stack/sheet/metal(loc, 5)
// Loop backwards in the tiers and spawn the requirement for each tier
var/obj/structure/canister_frame/machine/i_prev = prev_tier
while(ispath(i_prev))
var/obj/item/stack/prev_tier_reqitem = initial(i_prev.next_tier_reqitem)
var/prev_tier_reqitem_am = initial(i_prev.next_tier_reqitem_am)
new prev_tier_reqitem(loc, prev_tier_reqitem_am)
i_prev = initial(i_prev.prev_tier)
qdel(src)
/obj/structure/canister_frame/machine/frame_tier_0
name = "Tier 0 canister frame"
name = "tier 0 canister frame"
icon_state = "frame_0"
next_tier = /obj/structure/canister_frame/machine/frame_tier_1
next_tier_reqitem = /obj/item/stack/sheet/metal
next_tier_reqitem_am = 5
/obj/structure/canister_frame/machine/frame_tier_1
name = "Tier 1 canister frame"
name = "tier 1 canister frame"
icon_state = "frame_1"
prev_tier = /obj/structure/canister_frame/machine/frame_tier_0
next_tier = /obj/structure/canister_frame/machine/frame_tier_2
next_tier_reqitem = /obj/item/stack/sheet/plasteel
next_tier_reqitem_am = 5
finished_obj = /obj/machinery/portable_atmospherics/canister/tier_1
/obj/structure/canister_frame/machine/frame_tier_2
name = "Tier 2 canister frame"
name = "tier 2 canister frame"
icon_state = "frame_2"
prev_tier = /obj/structure/canister_frame/machine/frame_tier_1
next_tier = /obj/structure/canister_frame/machine/frame_tier_3
next_tier_reqitem = /obj/item/stack/sheet/bluespace_crystal
next_tier_reqitem_am = 1
finished_obj = /obj/machinery/portable_atmospherics/canister/tier_2
/obj/structure/canister_frame/machine/frame_tier_3
name = "Tier 3 canister frame"
name = "tier 3 canister frame"
icon_state = "frame_3"
///Proc to build the different tiers, if the sheet used is right, it will upgrade the frame or build the respective canister tier
/obj/structure/canister_frame/machine/frame_tier_0/attackby(obj/item/S, mob/user, params)
if (istype(S, /obj/item/stack/sheet/metal))
prev_tier = /obj/structure/canister_frame/machine/frame_tier_2
finished_obj = /obj/machinery/portable_atmospherics/canister/tier_3
/obj/structure/canister_frame/machine/examine(user)
. = ..()
. += "<span class='notice'>It can be dismantled by removing the <b>bolts</b>.</span>"
if(ispath(next_tier))
var/item_name = initial(next_tier_reqitem.singular_name)
if(!item_name)
item_name = initial(next_tier_reqitem.name)
if(next_tier_reqitem_am > 1)
. += "<span class='notice'>It can be improved using [next_tier_reqitem_am] [item_name]\s.</span>"
else
. += "<span class='notice'>It can be improved using \a [item_name].</span>"
if(ispath(finished_obj))
. += "<span class='notice'>It can be finished off by <b>screwing</b> it together.</span>"
/obj/structure/canister_frame/machine/attackby(obj/item/S, mob/user, params)
if (ispath(next_tier) && istype(S, next_tier_reqitem))
var/obj/item/stack/ST = S
if (ST.get_amount() < 5)
to_chat(user, "<span class='warning'>You need at least five sheets for that!</span>")
return
if(do_after(user, 15, target = src))
new /obj/structure/canister_frame/machine/frame_tier_1(drop_location())
var/reqitem_name = ST.singular_name ? ST.singular_name : ST.name
to_chat(user, "<span class='notice'>You start adding [next_tier_reqitem_am] [reqitem_name]\s to the frame...</span>")
if (ST.use_tool(src, user, 2 SECONDS, amount=next_tier_reqitem_am, volume=50))
to_chat(user, "<span class='notice'>You added [next_tier_reqitem_am] [reqitem_name]\s to the frame, turning it into \a [initial(next_tier.name)].</span>")
new next_tier(drop_location())
qdel(src)
ST.use(5)
return
return ..()
///Proc to build the different tiers, if the sheet used is right, it will upgrade the frame or build the respective canister tier
/obj/structure/canister_frame/machine/frame_tier_1/attackby(obj/item/S, mob/user, params)
if (istype(S, /obj/item/screwdriver))
if (do_after(user, 6, target = src))
new /obj/machinery/portable_atmospherics/canister/tier_1(drop_location())
qdel(src)
else if (istype(S, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/ST = S
if (ST.get_amount() < 5)
to_chat(user, "<span class='warning'>You need at least five sheets for that!</span>")
/obj/structure/canister_frame/machine/screwdriver_act(mob/living/user, obj/item/I)
. = TRUE
if(..())
return
if (do_after(user, 15, target = src))
new /obj/structure/canister_frame/machine/frame_tier_2(drop_location())
if(ispath(finished_obj))
to_chat(user, "<span class='notice'>You start tightening the screws on \the [src].</span>")
if (I.use_tool(src, user, 2 SECONDS, volume=50))
to_chat(user, "<span class='notice'>You tighten the last screws on \the [src].</span>")
new finished_obj(drop_location())
qdel(src)
ST.use(5)
else
return ..()
///Proc to build the different tiers, if the sheet used is right, it will upgrade the frame or build the respective canister tier
/obj/structure/canister_frame/machine/frame_tier_2/attackby(obj/item/S, mob/user, params)
if (istype(S, /obj/item/screwdriver))
if (do_after(user, 6, target = src))
new /obj/machinery/portable_atmospherics/canister/tier_2(drop_location())
qdel(src)
else if (istype(S, /obj/item/stack/sheet/bluespace_crystal))
var/obj/item/stack/ST = S
if (ST.get_amount() < 1)
to_chat(user, "<span class='warning'>You need at least one bluespace crystal for that!</span>")
return
if (do_after(user,15, target = src))
new /obj/structure/canister_frame/machine/frame_tier_3(drop_location())
qdel(src)
ST.use(1)
else
return ..()
return FALSE
///Proc to build the different tiers, if the sheet used is right, it will upgrade the frame or build the respective canister tier
/obj/structure/canister_frame/machine/frame_tier_3/attackby(obj/item/S, mob/user, params)
if (istype(S, /obj/item/screwdriver))
if (do_after(user, 6, target = src))
new /obj/machinery/portable_atmospherics/canister/tier_3(drop_location())
qdel(src)
else
return ..()
/obj/structure/canister_frame/machine/wrench_act(mob/living/user, obj/item/I)
. = TRUE
if(..())
return
to_chat(user, "<span class='notice'>You start to dismantle \the [src]...</span>")
if (I.use_tool(src, user, 2 SECONDS, volume=50))
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
deconstruct()

View File

@@ -7,8 +7,6 @@
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
ui_x = 350
ui_y = 470
var/mob/living/carbon/human/patient
var/obj/structure/table/optable/table
@@ -63,10 +61,13 @@
sbed.op_computer = src
break
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.not_incapacitated_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/operating/ui_state(mob/user)
return GLOB.not_incapacitated_state
/obj/machinery/computer/operating/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "OperatingComputer", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "OperatingComputer", name)
ui.open()
/obj/machinery/computer/operating/ui_data(mob/user)

View File

@@ -6,8 +6,7 @@
icon_keyboard = "tech_key"
icon_screen = "ai-fixer"
light_color = LIGHT_COLOR_PINK
ui_x = 370
ui_y = 360
/// Variable containing transferred AI
var/mob/living/silicon/ai/occupier
/// Variable dictating if we are in the process of restoring the occupier AI
@@ -22,11 +21,10 @@
else
return ..()
/obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/aifixer/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AiRestorer", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "AiRestorer", name)
ui.open()
/obj/machinery/computer/aifixer/ui_data(mob/user)

View File

@@ -12,8 +12,6 @@
var/restoring = FALSE
var/list/logs
var/auth_id = "\[NULL\]:"
ui_x = 550
ui_y = 500
/obj/machinery/computer/apc_control/Initialize(mapload, obj/item/circuitboard/C)
. = ..()
@@ -41,14 +39,13 @@
/obj/machinery/computer/apc_control/proc/check_apc(obj/machinery/power/apc/APC)
return APC.z == z && !APC.malfhack && !APC.aidisabled && !(APC.obj_flags & EMAGGED) && !APC.machine_stat && !istype(APC.area, /area/ai_monitored) && !APC.area.outdoors
/obj/machinery/computer/apc_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
/obj/machinery/computer/apc_control/ui_interact(mob/user, datum/tgui/ui)
operator = user
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "ApcControl", "APC Controller", ui_x, ui_y, master_ui, state)
ui = new(user, src, "ApcControl")
ui.open()
/obj/machinery/computer/apc_control/ui_data(mob/user)
var/list/data = list()
data["auth_id"] = auth_id

View File

@@ -597,14 +597,13 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
return ..() //well boys we did it, lists are no more
/obj/machinery/computer/arcade/battle/examine_more(mob/user)
to_chat(user, "<span class='notice'>Scribbled on the side of the Arcade Machine you notice some writing...\
\nmagical -> >=50 power\
\nsmart -> defend, defend, light attack\
\nshotgun -> defend, defend, power attack\
\nshort temper -> counter, counter, counter\
\npoisonous -> light attack, light attack, light attack\
\nchonker -> power attack, power attack, power attack</span>")
return ..()
var/list/msg = list("<span class='notice'><i>You notice some writing scribbled on the side of [src]...</i></span>")
msg += "\t<span class='info'>smart -> defend, defend, light attack</span>"
msg += "\t<span class='info'>shotgun -> defend, defend, power attack</span>"
msg += "\t<span class='info'>short temper -> counter, counter, counter</span>"
msg += "\t<span class='info'>poisonous -> light attack, light attack, light attack</span>"
msg += "\t<span class='info'>chonker -> power attack, power attack, power attack</span>"
return msg
/obj/machinery/computer/arcade/battle/emag_act(mob/user)
if(obj_flags & EMAGGED)

View File

@@ -323,7 +323,7 @@
var/obj/item/reagent_containers/food/drinks/trophy/gold_cup/G = new(get_turf(L))
G.name = "[L.real_name]'s Trophy"
/obj/machinery/computer/arena/ui_interact(mob/user, ui_key, datum/tgui/ui, force_open, datum/tgui/master_ui, datum/ui_state/state)
/obj/machinery/computer/arena/ui_interact(mob/user)
. = ..()
var/list/dat = list()
dat += "<div>Spawning is currently [ready_to_spawn ? "<span class='good'>enabled</span>" : "<span class='bad'>disabled</span>"] <a href='?src=[REF(src)];toggle_spawn=1'>Toggle</a></div>"

View File

@@ -2,8 +2,6 @@
name = "atmospheric alert console"
desc = "Used to monitor the station's air alarms."
circuit = /obj/item/circuitboard/computer/atmos_alert
ui_x = 350
ui_y = 300
icon_screen = "alert:0"
icon_keyboard = "atmos_key"
var/list/priority_alarms = list()
@@ -21,11 +19,10 @@
SSradio.remove_object(src, receive_frequency)
return ..()
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AtmosAlertConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "AtmosAlertConsole", name)
ui.open()
/obj/machinery/computer/atmos_alert/ui_data(mob/user)

View File

@@ -92,8 +92,6 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
icon_screen = "tank"
icon_keyboard = "atmos_key"
circuit = /obj/item/circuitboard/computer/atmos_control
ui_x = 400
ui_y = 925
var/frequency = FREQ_ATMOS_STORAGE
var/list/sensors = list(
@@ -124,11 +122,10 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
SSradio.remove_object(src, frequency)
return ..()
/obj/machinery/computer/atmos_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/atmos_control/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AtmosControlConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "AtmosControlConsole", name)
ui.open()
/obj/machinery/computer/atmos_control/ui_data(mob/user)
@@ -169,16 +166,12 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
name = "Incinerator Air Control"
sensors = list(ATMOS_GAS_MONITOR_SENSOR_INCINERATOR = "Incinerator Chamber")
circuit = /obj/item/circuitboard/computer/atmos_control/incinerator
ui_x = 400
ui_y = 300
//Toxins mix sensor only
/obj/machinery/computer/atmos_control/toxinsmix
name = "Toxins Mixing Air Control"
sensors = list(ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB = "Toxins Mixing Chamber")
circuit = /obj/item/circuitboard/computer/atmos_control/toxinsmix
ui_x = 400
ui_y = 300
/////////////////////////////////////////////////////////////
// LARGE TANK CONTROL
@@ -189,13 +182,9 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
var/output_tag
frequency = FREQ_ATMOS_STORAGE
circuit = /obj/item/circuitboard/computer/atmos_control/tank
var/list/input_info
var/list/output_info
ui_x = 500
ui_y = 315
/obj/machinery/computer/atmos_control/tank/oxygen_tank
name = "Oxygen Supply Control"
input_tag = ATMOS_GAS_MONITOR_INPUT_O2
@@ -276,13 +265,6 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices)
U.broadcast_status()
/obj/machinery/computer/atmos_control/tank/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "AtmosControlConsole", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/computer/atmos_control/tank/ui_data(mob/user)
var/list/data = ..()
data["tank"] = TRUE
@@ -290,7 +272,6 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
data["inputRate"] = input_info ? input_info["volume_rate"] : 0
data["outputting"] = output_info ? output_info["power"] : FALSE
data["outputPressure"] = output_info ? output_info["internal"] : 0
return data
/obj/machinery/computer/atmos_control/tank/ui_act(action, params)

View File

@@ -7,8 +7,6 @@
icon_keyboard = "security_key"
circuit = /obj/item/circuitboard/computer/security
light_color = LIGHT_COLOR_RED
ui_x = 870
ui_y = 708
var/list/network = list("ss13")
var/obj/machinery/camera/active_camera
@@ -59,11 +57,9 @@
network -= i
network += "[idnum][i]"
/obj/machinery/computer/security/ui_interact(\
mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
/obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/ui)
// Update UI
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
// Show static if can't use the camera
if(!active_camera?.can_use())
show_camera_static()
@@ -84,7 +80,7 @@
user.client.register_map_obj(plane)
user.client.register_map_obj(cam_background)
// Open UI
ui = new(user, src, ui_key, "CameraConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "CameraConsole", name)
ui.open()
/obj/machinery/computer/security/ui_data()

View File

@@ -77,11 +77,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
/datum/crewmonitor/Destroy()
return ..()
/datum/crewmonitor/ui_interact(mob/user, ui_key = "crew", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/datum/crewmonitor/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, ui_key, "CrewConsole", "crew monitor", 800, 600 , master_ui, state)
ui = new(user, src, "CrewConsole")
ui.open()
/datum/crewmonitor/proc/show(mob/M, source)

View File

@@ -205,12 +205,7 @@
// already discovered mutations
stored_research = SSresearch.science_tech
/obj/machinery/computer/scan_consolenew/examine(mob/user)
. = ..()
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
. = ..()
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, datum/tgui/ui)
// Most of ui_interact is spent setting variables for passing to the tgui
// interface.
// We can also do some general state processing here too as it's a good
@@ -252,10 +247,9 @@
time_to_pulse = round((rad_pulse_timer - world.time)/10)
// Attempt to update tgui ui, open and update if needed.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "DnaConsole", name, 539, 710, master_ui, state)
ui = new(user, src, "DnaConsole")
ui.open()
/obj/machinery/computer/scan_consolenew/ui_data(mob/user)
@@ -1491,7 +1485,7 @@
// this DNA can not be bad
// is done via radiation bursts, so radiation immune carbons are not viable
// And the DNA Scanner itself must have a valid scan level
if(scanner_occupant.has_dna() && !HAS_TRAIT(scanner_occupant, TRAIT_RADIMMUNE) && !HAS_TRAIT(scanner_occupant, TRAIT_BADDNA) || (connected_scanner.scan_level == 3))
if(scanner_occupant.has_dna() && !HAS_TRAIT(scanner_occupant, TRAIT_GENELESS) && !HAS_TRAIT(scanner_occupant, TRAIT_BADDNA) || (connected_scanner.scan_level == 3))
return TRUE
return FALSE

View File

@@ -4,8 +4,6 @@
icon_screen = "teleport"
icon_keyboard = "teleport_key"
circuit = /obj/item/circuitboard/computer/launchpad_console
ui_x = 475
ui_y = 260
var/selected_id
var/list/obj/machinery/launchpad/launchpads
@@ -53,10 +51,10 @@
var/obj/machinery/launchpad/pad = launchpads[number]
return pad
/obj/machinery/computer/launchpad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/launchpad/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "LaunchpadConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "LaunchpadConsole", name)
ui.open()
/obj/machinery/computer/launchpad/ui_data(mob/user)

View File

@@ -6,8 +6,6 @@
icon_keyboard = "security_key"
req_access = list(ACCESS_ARMORY)
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
ui_x = 350
ui_y = 295
var/default_goal = 200
var/obj/machinery/gulag_teleporter/teleporter = null
@@ -21,11 +19,10 @@
. = ..()
scan_machinery()
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "GulagTeleporterConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "GulagTeleporterConsole", name)
ui.open()
/obj/machinery/computer/prisoner/gulag_teleporter_computer/ui_data(mob/user)

View File

@@ -6,8 +6,6 @@
req_access = list(ACCESS_ROBOTICS)
circuit = /obj/item/circuitboard/computer/robotics
light_color = LIGHT_COLOR_PINK
ui_x = 500
ui_y = 460
/obj/machinery/computer/robotics/proc/can_control(mob/user, mob/living/silicon/robot/R)
. = FALSE
@@ -23,11 +21,10 @@
return
return TRUE
/obj/machinery/computer/robotics/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/robotics/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "RoboticsControlConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "RoboticsControlConsole", name)
ui.open()
/obj/machinery/computer/robotics/ui_data(mob/user)

View File

@@ -4,8 +4,6 @@
icon_screen = "alert:0"
icon_keyboard = "atmos_key"
circuit = /obj/item/circuitboard/computer/stationalert
ui_x = 325
ui_y = 500
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
light_color = LIGHT_COLOR_CYAN
@@ -18,11 +16,10 @@
GLOB.alert_consoles -= src
return ..()
/obj/machinery/computer/station_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/station_alert/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "StationAlertConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "StationAlertConsole", name)
ui.open()
/obj/machinery/computer/station_alert/ui_data(mob/user)

View File

@@ -5,8 +5,7 @@
icon_keyboard = "teleport_key"
light_color = LIGHT_COLOR_BLUE
circuit = /obj/item/circuitboard/computer/teleporter
ui_x = 470
ui_y = 140
var/regime_set = "Teleporter"
var/id
var/obj/machinery/teleport/station/power_station
@@ -33,11 +32,10 @@
break
return power_station
/obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/teleporter/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Teleporter", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Teleporter", name)
ui.open()
/obj/machinery/computer/teleporter/ui_data(mob/user)

View File

@@ -6,8 +6,6 @@
verb_say = "states"
density = TRUE
req_access = list(ACCESS_BAR)
ui_x = 370
ui_y = 313
var/active = FALSE
var/list/rangers = list()
var/stop = 0
@@ -100,11 +98,10 @@
return UI_CLOSE
return ..()
/obj/machinery/jukebox/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/jukebox/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Jukebox", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Jukebox", name)
ui.open()
/obj/machinery/jukebox/ui_data(mob/user)

View File

@@ -27,6 +27,12 @@
QDEL_NULL(defib)
. = ..()
/obj/machinery/defibrillator_mount/handle_atom_del(atom/A)
if(A == defib)
defib = null
end_processing()
return ..()
/obj/machinery/defibrillator_mount/examine(mob/user)
. = ..()
if(defib)
@@ -171,6 +177,8 @@
/obj/machinery/defibrillator_mount/charging/process()
var/obj/item/stock_parts/cell/C = get_cell()
if(!C)
return PROCESS_KILL
if(C.charge < C.maxcharge && is_operational())
use_power(100)
C.give(80)

View File

@@ -37,6 +37,7 @@
#define AIRLOCK_DAMAGE_DEFLECTION_N 21 // Normal airlock damage deflection
#define AIRLOCK_DAMAGE_DEFLECTION_R 30 // Reinforced airlock damage deflection
#define DOOR_CLOSE_WAIT 60 /// Time before a door closes, if not overridden
/obj/machinery/door/airlock
name = "airlock"
icon = 'icons/obj/doors/airlocks/station/public.dmi'
@@ -86,11 +87,10 @@
var/obj/machinery/door/airlock/cyclelinkedairlock
var/shuttledocked = 0
var/delayed_close_requested = FALSE // TRUE means the door will automatically close the next time it's opened.
var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close
var/prying_so_hard = FALSE
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
rad_insulation = RAD_MEDIUM_INSULATION
var/static/list/airlock_overlays = list()
@@ -188,7 +188,7 @@
/obj/machinery/door/airlock/vv_edit_var(var_name)
. = ..()
switch (var_name)
if ("cyclelinkeddir")
if (NAMEOF(src, cyclelinkeddir))
cyclelinkairlock()
/obj/machinery/door/airlock/check_access_ntnet(datum/netdata/data)
@@ -1077,7 +1077,7 @@
if(safe)
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
autoclose_in(60)
autoclose_in(DOOR_CLOSE_WAIT)
return
if(forced < 2)
@@ -1321,11 +1321,10 @@
else if(istype(note, /obj/item/photo))
return "photo"
/obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/door/airlock/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AiAirlock", name, 500, 390, master_ui, state)
ui = new(user, src, "AiAirlock", name)
ui.open()
return TRUE
@@ -1497,3 +1496,5 @@
#undef AIRLOCK_INTEGRITY_MULTIPLIER
#undef AIRLOCK_DAMAGE_DEFLECTION_N
#undef AIRLOCK_DAMAGE_DEFLECTION_R
#undef DOOR_CLOSE_WAIT

View File

@@ -15,11 +15,13 @@
. = ..()
. += "<span class='notice'>Has a neat <i>selection menu</i> for modifying airlock access levels.</span>"
/obj/item/electronics/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/item/electronics/airlock/ui_state(mob/user)
return GLOB.hands_state
/obj/item/electronics/airlock/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "AirlockElectronics", name, 420, 485, master_ui, state)
ui = new(user, src, "AirlockElectronics", name)
ui.open()
/obj/item/electronics/airlock/ui_static_data(mob/user)

View File

@@ -37,8 +37,6 @@
maptext_height = 26
maptext_width = 32
maptext_y = -1
ui_x = 300
ui_y = 138
/obj/machinery/door_timer/Initialize()
. = ..()
@@ -142,11 +140,10 @@
. = new_time == timer_duration //return 1 on no change
timer_duration = new_time
/obj/machinery/door_timer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/door_timer/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "BrigTimer", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "BrigTimer", name)
ui.open()
//icon update function

View File

@@ -1,3 +1,4 @@
#define DOOR_CLOSE_WAIT 60 ///Default wait until doors autoclose
/obj/machinery/door
name = "door"
desc = "It opens and closes."
@@ -301,7 +302,7 @@
air_update_turf(1)
update_freelook_sight()
if(autoclose)
addtimer(CALLBACK(src, .proc/close), autoclose)
autoclose_in(DOOR_CLOSE_WAIT)
return 1
/obj/machinery/door/proc/close()
@@ -313,7 +314,7 @@
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
if(autoclose)
autoclose_in(60)
autoclose_in(DOOR_CLOSE_WAIT)
return
operating = TRUE
@@ -424,4 +425,6 @@
/obj/machinery/door/power_change()
. = ..()
if(. && !(machine_stat & NOPOWER))
autoclose_in(rand(0.5 SECONDS, 3 SECONDS))
autoclose_in(DOOR_CLOSE_WAIT)
#undef DOOR_CLOSE_WAIT

View File

@@ -7,8 +7,6 @@
icon_state = "tdoppler"
density = TRUE
verb_say = "states coldly"
ui_x = 500
ui_y = 225
var/cooldown = 10
var/next_announce = 0
var/max_dist = 150
@@ -36,11 +34,10 @@
var/factual_radius = list()
var/theory_radius = list()
/obj/machinery/doppler_array/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/doppler_array/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "TachyonArray", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "TachyonArray", name)
ui.open()
/obj/machinery/doppler_array/ui_data(mob/user)

View File

@@ -12,9 +12,8 @@
max_integrity = 250
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 10)
circuit = /obj/item/circuitboard/machine/electrolyzer
ui_x = 400
ui_y = 305
use_power = NO_POWER_USE /// We don't use area power, we always use the cell
/// We don't use area power, we always use the cell
use_power = NO_POWER_USE
///used to check if there is a cell in the machine
var/obj/item/stock_parts/cell/cell
///check if the machine is on or off
@@ -143,11 +142,13 @@
return
return ..()
/obj/machinery/electrolyzer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/electrolyzer/ui_state(mob/user)
return GLOB.physical_state
/obj/machinery/electrolyzer/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Electrolyzer", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Electrolyzer", name)
ui.open()
/obj/machinery/electrolyzer/ui_data()

View File

@@ -3,7 +3,7 @@
desc = "Safely and efficiently extracts excess fat from a subject."
icon = 'icons/obj/machines/fat_sucker.dmi'
icon_state = "fat"
circuit = /obj/item/circuitboard/machine/fat_sucker
state_open = FALSE
density = TRUE
req_access = list(ACCESS_KITCHEN)

View File

@@ -8,8 +8,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 100
active_power_usage = 2500
ui_x = 325
ui_y = 400
var/list/stored_items = list()
var/obj/machinery/gulag_teleporter/linked_teleporter = null
@@ -27,11 +26,10 @@
req_access = list()
obj_flags |= EMAGGED
/obj/machinery/gulag_item_reclaimer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/gulag_item_reclaimer/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "GulagItemReclaimer", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "GulagItemReclaimer", name)
ui.open()
/obj/machinery/gulag_item_reclaimer/ui_data(mob/user)

View File

@@ -41,8 +41,6 @@ Possible to do for anyone motivated enough:
max_integrity = 300
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
circuit = /obj/item/circuitboard/machine/holopad
ui_x = 440
ui_y = 245
/// List of living mobs that use the holopad
var/list/masters
/// Holoray-mob link
@@ -208,11 +206,10 @@ obj/machinery/holopad/secure/Initialize()
return UI_CLOSE
return ..()
/obj/machinery/holopad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/holopad/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Holopad", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Holopad", name)
ui.open()
/obj/machinery/holopad/ui_data(mob/user)

View File

@@ -6,14 +6,12 @@
circuit = /obj/item/circuitboard/machine/hypnochair
density = TRUE
opacity = 0
ui_x = 375
ui_y = 480
var/mob/living/carbon/victim = null ///Keeps track of the victim to apply effects if it teleports away
var/interrogating = FALSE ///Is the device currently interrogating someone?
var/start_time = 0 ///Time when the interrogation was started, to calculate effect in case of interruption
var/trigger_phrase = "" ///Trigger phrase to implant
var/timerid = 0 ///Timer ID for interrogations
var/message_cooldown = 0 ///Cooldown for breakout message
/obj/machinery/hypnochair/Initialize()
@@ -25,19 +23,19 @@
if(!occupant && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
update_icon()
return
if(default_pry_open(I))
return
if(default_deconstruction_crowbar(I))
return
return ..()
/obj/machinery/hypnochair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/hypnochair/ui_state(mob/user)
return GLOB.notcontained_state
/obj/machinery/hypnochair/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "HypnoChair", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "HypnoChair", name)
ui.open()
/obj/machinery/hypnochair/ui_data()

View File

@@ -321,12 +321,15 @@
ui_interact(user)
to_chat(user, "<span class='notice'>[src] projects a display onto your retina.</span>")
/obj/item/launchpad_remote/ui_interact(mob/user, ui_key = "launchpad_remote", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "LaunchpadRemote", "Briefcase Launchpad Remote", 300, 240, master_ui, state) //width, height
ui.open()
/obj/item/launchpad_remote/ui_state(mob/user)
return GLOB.inventory_state
/obj/item/launchpad_remote/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "LaunchpadRemote")
ui.open()
ui.set_autoupdate(TRUE)
/obj/item/launchpad_remote/ui_data(mob/user)

View File

@@ -153,7 +153,7 @@
else
. += "<span class='notice'>\The [src] has its scanner clipped to the side. Alt-Click to remove.</span>"
/obj/machinery/medical_kiosk/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
/obj/machinery/medical_kiosk/ui_interact(mob/user, datum/tgui/ui)
var/patient_distance = 0
if(!ishuman(user))
to_chat(user, "<span class='warning'>[src] is unable to interface with non-humanoids!</span>")
@@ -169,10 +169,9 @@
say("Patient out of range. Resetting biometrics.")
clearScans()
return
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "MedicalKiosk", name, 575, 420, master_ui, state)
ui = new(user, src, "MedicalKiosk", name)
ui.open()
icon_state = "kiosk_off"
RefreshParts()

View File

@@ -29,8 +29,6 @@
max_integrity = 160 //the turret's health
integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
ui_x = 305
ui_y = 300
/// Base turret icon state
var/base_icon_state = "standard"
/// Scan range of the turret for locating targets
@@ -192,11 +190,10 @@
remove_control()
return ..()
/obj/machinery/porta_turret/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/porta_turret/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "PortableTurret", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "PortableTurret", name)
ui.open()
/obj/machinery/porta_turret/ui_data(mob/user)
@@ -831,8 +828,6 @@
density = FALSE
req_access = list(ACCESS_AI_UPLOAD)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
ui_x = 305
ui_y = 172
/// Variable dictating if linked turrets are active and will shoot targets
var/enabled = TRUE
/// Variable dictating if linked turrets will shoot lethal projectiles
@@ -924,11 +919,10 @@
else
to_chat(user, "<span class='warning'>There seems to be a firewall preventing you from accessing this device!</span>")
/obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/turretid/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "TurretControl", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "TurretControl", name)
ui.open()
/obj/machinery/turretid/ui_data(mob/user)
@@ -1063,7 +1057,6 @@
/obj/machinery/porta_turret/lasertag
req_access = list(ACCESS_MAINT_TUNNELS, ACCESS_THEATRE)
turret_flags = TURRET_FLAG_AUTH_WEAPONS
ui_y = 115
var/team_color
/obj/machinery/porta_turret/lasertag/assess_perp(mob/living/carbon/human/perp)

View File

@@ -29,8 +29,6 @@
idle_power_usage = 10
active_power_usage = 100
max_integrity = 500
ui_x = 603
ui_y = 475
armor = list("melee" = 45, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 10, "bio" = 30, "rad" = 30, "fire" = 30, "acid" = 30)
var/static/list/numbers = list("0" = "green", "1" = "red", "3" = "red", "5" = "red", "7" = "red", "9" = "red", "12" = "red", "14" = "red", "16" = "red",\
"18" = "red", "19" = "red", "21" = "red", "23" = "red", "25" = "red", "27" = "red", "30" = "red", "32" = "red", "34" = "red", "36" = "red",\
@@ -60,12 +58,12 @@
prize_theft(0.05)
. = ..()
/obj/machinery/roulette/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
/obj/machinery/roulette/ui_interact(mob/user, datum/tgui/ui)
if(machine_stat & MAINT)
return
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "Roulette", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "Roulette", name)
ui.open()
/obj/machinery/roulette/ui_data(mob/user)
@@ -409,7 +407,7 @@
new /obj/machinery/roulette(toLaunch)
new /obj/effect/dp_target(drop_location(), toLaunch)
new /obj/effect/pod_landingzone(drop_location(), toLaunch)
qdel(src)
#undef ROULETTE_SINGLES_PAYOUT

View File

@@ -26,8 +26,6 @@
use_power = IDLE_POWER_USE
idle_power_usage = 50
circuit = /obj/item/circuitboard/machine/scanner_gate
ui_x = 400
ui_y = 300
var/scanline_timer
var/next_beep = 0 //avoids spam
@@ -180,11 +178,10 @@
return FALSE
return ..()
/obj/machinery/scanner_gate/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/scanner_gate/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "ScannerGate", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "ScannerGate", name)
ui.open()
/obj/machinery/scanner_gate/ui_data()

View File

@@ -85,7 +85,7 @@
if(parent_rune)
parent_rune.visible_message("<span class='danger'>The [parent_rune] fades away as [src] is destroyed!</span>")
QDEL_NULL(parent_rune)
..()
return ..()
/**
*Turns the shield on and off.

View File

@@ -13,9 +13,8 @@
max_integrity = 250
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 10)
circuit = /obj/item/circuitboard/machine/space_heater
ui_x = 400
ui_y = 305
use_power = NO_POWER_USE /// We don't use area power, we always use the cell
/// We don't use area power, we always use the cell
use_power = NO_POWER_USE
var/obj/item/stock_parts/cell/cell
var/on = FALSE
var/mode = HEATER_MODE_STANDBY
@@ -170,11 +169,10 @@
else
return ..()
/obj/machinery/space_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/space_heater/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "SpaceHeater", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "SpaceHeater", name)
ui.open()
/obj/machinery/space_heater/ui_data()

View File

@@ -289,7 +289,7 @@
if(!.)
return
switch(var_name)
if("shuttle_id")
if(NAMEOF(src, shuttle_id))
update()
/obj/machinery/status_display/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)

View File

@@ -9,8 +9,6 @@
power_channel = AREA_USAGE_EQUIP
density = TRUE
max_integrity = 250
ui_x = 400
ui_y = 305
var/obj/item/clothing/suit/space/suit = null
var/obj/item/clothing/head/helmet/space/helmet = null
@@ -434,11 +432,13 @@
visible_message("<span class='notice'>[usr] pries open \the [src].</span>", "<span class='notice'>You pry open \the [src].</span>")
open_machine()
/obj/machinery/suit_storage_unit/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/suit_storage_unit/ui_state(mob/user)
return GLOB.notcontained_state
/obj/machinery/suit_storage_unit/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "SuitStorageUnit", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "SuitStorageUnit", name)
ui.open()
/obj/machinery/suit_storage_unit/ui_data()

View File

@@ -86,15 +86,13 @@
icon_screen = "recharge_comp"
icon_keyboard = "rd_key"
circuit = /obj/item/circuitboard/computer/mech_bay_power_console
ui_x = 400
ui_y = 200
var/obj/machinery/mech_bay_recharge_port/recharge_port
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "MechBayPowerConsole", "Mech Bay Power Control Console", ui_x, ui_y, master_ui, state)
ui = new(user, src, "MechBayPowerConsole", name)
ui.open()
/obj/machinery/computer/mech_bay_power_console/ui_act(action, params)

View File

@@ -258,7 +258,7 @@
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
return round(initial(D.construction_time)*time_coeff, roundto)
/obj/machinery/mecha_part_fabricator/ui_interact(mob/user as mob)
/obj/machinery/mecha_part_fabricator/ui_interact(mob/user)
. = ..()
var/dat, left_part
user.set_machine(src)

View File

@@ -5,14 +5,11 @@
icon_keyboard = "tech_key"
req_access = list(ACCESS_ROBOTICS)
circuit = /obj/item/circuitboard/computer/mecha_control
ui_x = 500
ui_y = 500
/obj/machinery/computer/mecha/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
/obj/machinery/computer/mecha/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "ExosuitControlConsole", name, ui_x, ui_y, master_ui, state)
ui = new(user, src, "ExosuitControlConsole", name)
ui.open()
/obj/machinery/computer/mecha/ui_data(mob/user)

View File

@@ -1,12 +1,10 @@
/obj/mecha/proc/get_armour_facing(relative_dir)
switch(relative_dir)
if(0) // BACKSTAB!
if(180) // BACKSTAB!
return facing_modifiers[MECHA_BACK_ARMOUR]
if(45, 90, 270, 315)
return facing_modifiers[MECHA_SIDE_ARMOUR]
if(225, 180, 135)
if(0, 45) // direct or 45 degrees off
return facing_modifiers[MECHA_FRONT_ARMOUR]
return 1 //always return non-0
return facing_modifiers[MECHA_SIDE_ARMOUR] //if its not a front hit or back hit then assume its from the side
/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
@@ -43,7 +41,7 @@
break
if(attack_dir)
var/facing_modifier = get_armour_facing(dir2angle(attack_dir) - dir2angle(src))
var/facing_modifier = get_armour_facing(abs(dir2angle(dir) - dir2angle(attack_dir)))
booster_damage_modifier /= facing_modifier
booster_deflection_modifier *= facing_modifier
if(prob(deflect_chance * booster_deflection_modifier))

View File

@@ -102,6 +102,10 @@
step_towards(M,src)
for(var/obj/O in range(0,src))
if(!O.anchored)
if(isturf(O.loc))
var/turf/T = O.loc
if(T.intact && HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
continue
var/mob/living/target = locate() in view(4,src)
if(target && !target.stat)
O.throw_at(target, 5, 10)

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