Merge remote-tracking branch 'upstream/master' into TGUIs_Nexties

This commit is contained in:
Artur
2020-02-02 13:31:54 +01:00
259 changed files with 8749 additions and 1498 deletions
+1
View File
@@ -195,6 +195,7 @@ Temporary Items
#Visual studio stuff #Visual studio stuff
*.vscode/* *.vscode/*
!/.vscode/extensions.json
tools/MapAtmosFixer/MapAtmosFixer/obj/* tools/MapAtmosFixer/MapAtmosFixer/obj/*
tools/MapAtmosFixer/MapAtmosFixer/bin/* tools/MapAtmosFixer/MapAtmosFixer/bin/*
+7
View File
@@ -0,0 +1,7 @@
{
"recommendations": [
"gbasood.byond-dm-language-support",
"platymuus.dm-langclient",
"EditorConfig.EditorConfig"
]
}
+1 -1
View File
@@ -1,4 +1,4 @@
FROM tgstation/byond:513.1490 as base FROM tgstation/byond:513.1503 as base
FROM base as build_base FROM base as build_base
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+20 -20
View File
@@ -7850,7 +7850,7 @@
/turf/open/floor/wood, /turf/open/floor/wood,
/area/lawoffice) /area/lawoffice)
"asa" = ( "asa" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32 pixel_x = 32
}, },
/obj/effect/turf_decal/tile/red{ /obj/effect/turf_decal/tile/red{
@@ -13716,7 +13716,7 @@
/turf/open/floor/plating, /turf/open/floor/plating,
/area/chapel/main) /area/chapel/main)
"aHu" = ( "aHu" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32 pixel_x = 32
}, },
/turf/open/floor/plasteel/white/corner{ /turf/open/floor/plasteel/white/corner{
@@ -16757,7 +16757,7 @@
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
/area/crew_quarters/locker) /area/crew_quarters/locker)
"aPE" = ( "aPE" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall, /turf/closed/wall,
/area/crew_quarters/locker) /area/crew_quarters/locker)
"aPF" = ( "aPF" = (
@@ -16848,7 +16848,7 @@
/obj/structure/cable{ /obj/structure/cable{
icon_state = "0-8" icon_state = "0-8"
}, },
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/obj/effect/spawner/structure/window/reinforced, /obj/effect/spawner/structure/window/reinforced,
/obj/machinery/door/poddoor/preopen{ /obj/machinery/door/poddoor/preopen{
id = "bridge blast"; id = "bridge blast";
@@ -16880,7 +16880,7 @@
/obj/structure/cable{ /obj/structure/cable{
icon_state = "0-4" icon_state = "0-4"
}, },
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/obj/effect/spawner/structure/window/reinforced, /obj/effect/spawner/structure/window/reinforced,
/obj/machinery/door/poddoor/preopen{ /obj/machinery/door/poddoor/preopen{
id = "bridge blast"; id = "bridge blast";
@@ -18156,7 +18156,7 @@
/area/hallway/secondary/exit) /area/hallway/secondary/exit)
"aTl" = ( "aTl" = (
/obj/machinery/vending/cola/random, /obj/machinery/vending/cola/random,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
layer = 4; layer = 4;
pixel_y = 32 pixel_y = 32
}, },
@@ -18197,7 +18197,7 @@
/area/hallway/secondary/exit) /area/hallway/secondary/exit)
"aTr" = ( "aTr" = (
/obj/machinery/door/firedoor, /obj/machinery/door/firedoor,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32 pixel_x = 32
}, },
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
@@ -21371,7 +21371,7 @@
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
/area/quartermaster/warehouse) /area/quartermaster/warehouse)
"baZ" = ( "baZ" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
layer = 4; layer = 4;
pixel_y = 32 pixel_y = 32
}, },
@@ -21528,7 +21528,7 @@
/turf/open/floor/wood, /turf/open/floor/wood,
/area/crew_quarters/heads/captain) /area/crew_quarters/heads/captain)
"bbv" = ( "bbv" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/cable{ /obj/structure/cable{
@@ -22164,7 +22164,7 @@
dir = 4 dir = 4
}, },
/obj/structure/disposalpipe/segment, /obj/structure/disposalpipe/segment,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/effect/turf_decal/tile/blue{ /obj/effect/turf_decal/tile/blue{
@@ -23065,7 +23065,7 @@
/turf/closed/wall/r_wall, /turf/closed/wall/r_wall,
/area/ai_monitored/turret_protected/ai_upload) /area/ai_monitored/turret_protected/ai_upload)
"bfw" = ( "bfw" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall/r_wall, /turf/closed/wall/r_wall,
/area/ai_monitored/turret_protected/ai_upload) /area/ai_monitored/turret_protected/ai_upload)
"bfx" = ( "bfx" = (
@@ -25063,7 +25063,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32 pixel_x = 32
}, },
/obj/machinery/aug_manipulator, /obj/machinery/aug_manipulator,
@@ -27326,7 +27326,7 @@
/turf/open/floor/plasteel/white, /turf/open/floor/plasteel/white,
/area/medical/medbay/central) /area/medical/medbay/central)
"bpw" = ( "bpw" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall, /turf/closed/wall,
/area/medical/medbay/central) /area/medical/medbay/central)
"bpx" = ( "bpx" = (
@@ -28634,7 +28634,7 @@
/turf/open/floor/plasteel/white, /turf/open/floor/plasteel/white,
/area/medical/medbay/central) /area/medical/medbay/central)
"bsz" = ( "bsz" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/turf/open/floor/plasteel/white/side{ /turf/open/floor/plasteel/white/side{
@@ -32596,7 +32596,7 @@
/obj/structure/disposalpipe/segment{ /obj/structure/disposalpipe/segment{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = -32 pixel_y = -32
}, },
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
@@ -35471,7 +35471,7 @@
/area/medical/sleeper) /area/medical/sleeper)
"bIe" = ( "bIe" = (
/obj/structure/disposalpipe/segment, /obj/structure/disposalpipe/segment,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
@@ -42591,7 +42591,7 @@
/turf/open/floor/plating, /turf/open/floor/plating,
/area/tcommsat/computer) /area/tcommsat/computer)
"bZr" = ( "bZr" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall, /turf/closed/wall,
/area/tcommsat/computer) /area/tcommsat/computer)
"bZs" = ( "bZs" = (
@@ -49648,7 +49648,7 @@
/area/ai_monitored/turret_protected/aisat_interior) /area/ai_monitored/turret_protected/aisat_interior)
"cuc" = ( "cuc" = (
/obj/structure/rack, /obj/structure/rack,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = -32 pixel_y = -32
}, },
/obj/item/storage/box/donkpockets, /obj/item/storage/box/donkpockets,
@@ -50228,7 +50228,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/aisat_interior) /area/ai_monitored/turret_protected/aisat_interior)
"cvf" = ( "cvf" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall/r_wall, /turf/closed/wall/r_wall,
/area/ai_monitored/turret_protected/ai) /area/ai_monitored/turret_protected/ai)
"cvg" = ( "cvg" = (
@@ -50753,7 +50753,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 8 dir = 8
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/turf/open/floor/circuit, /turf/open/floor/circuit,
File diff suppressed because it is too large Load Diff
+43 -43
View File
@@ -421,7 +421,7 @@
}, },
/area/security/prison) /area/security/prison)
"abr" = ( "abr" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/blue{ /obj/effect/turf_decal/tile/blue{
@@ -2472,7 +2472,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hos) /area/crew_quarters/heads/hos)
"afj" = ( "afj" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32; pixel_x = -32;
pixel_y = 32 pixel_y = 32
}, },
@@ -2501,7 +2501,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hos) /area/crew_quarters/heads/hos)
"afn" = ( "afn" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32; pixel_x = 32;
pixel_y = 32 pixel_y = 32
}, },
@@ -15058,7 +15058,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/red{ /obj/effect/turf_decal/tile/red{
@@ -17819,7 +17819,7 @@
/obj/structure/chair{ /obj/structure/chair{
name = "Judge" name = "Judge"
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/light{ /obj/machinery/light{
@@ -19088,7 +19088,7 @@
"aLO" = ( "aLO" = (
/obj/machinery/atmospherics/components/unary/portables_connector/visible, /obj/machinery/atmospherics/components/unary/portables_connector/visible,
/obj/machinery/portable_atmospherics/scrubber, /obj/machinery/portable_atmospherics/scrubber,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 30 pixel_y = 30
}, },
/obj/effect/turf_decal/delivery, /obj/effect/turf_decal/delivery,
@@ -21087,7 +21087,7 @@
/obj/structure/cable/yellow{ /obj/structure/cable/yellow{
icon_state = "0-4" icon_state = "0-4"
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/camera{ /obj/machinery/camera{
@@ -21381,7 +21381,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = 32 pixel_x = 32
}, },
/obj/machinery/flasher{ /obj/machinery/flasher{
@@ -23713,7 +23713,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai) /area/ai_monitored/turret_protected/ai)
"aVm" = ( "aVm" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/atmospherics/components/unary/vent_scrubber/on, /obj/machinery/atmospherics/components/unary/vent_scrubber/on,
@@ -23740,7 +23740,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai) /area/ai_monitored/turret_protected/ai)
"aVq" = ( "aVq" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/atmospherics/components/unary/vent_pump/on, /obj/machinery/atmospherics/components/unary/vent_pump/on,
@@ -23803,7 +23803,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/on{ /obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/stripes/line{ /obj/effect/turf_decal/stripes/line{
@@ -24135,7 +24135,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -24359,7 +24359,7 @@
pixel_x = -25; pixel_x = -25;
pixel_y = 25 pixel_y = 25
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/extinguisher_cabinet{ /obj/structure/extinguisher_cabinet{
@@ -27493,7 +27493,7 @@
name = "Station Intercom (General)"; name = "Station Intercom (General)";
pixel_x = -29 pixel_x = -29
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -28332,7 +28332,7 @@
/turf/open/floor/carpet, /turf/open/floor/carpet,
/area/crew_quarters/heads/captain/private) /area/crew_quarters/heads/captain/private)
"bdI" = ( "bdI" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
@@ -30143,7 +30143,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/bridge) /area/bridge)
"bhk" = ( "bhk" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/item/folder/yellow{ /obj/item/folder/yellow{
@@ -30795,7 +30795,7 @@
/obj/structure/chair/office/dark{ /obj/structure/chair/office/dark{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = -32 pixel_y = -32
}, },
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
@@ -32463,7 +32463,7 @@
/area/ai_monitored/turret_protected/aisat/foyer) /area/ai_monitored/turret_protected/aisat/foyer)
"blC" = ( "blC" = (
/obj/machinery/teleport/station, /obj/machinery/teleport/station,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -32572,7 +32572,7 @@
/area/ai_monitored/storage/satellite) /area/ai_monitored/storage/satellite)
"blK" = ( "blK" = (
/obj/machinery/recharge_station, /obj/machinery/recharge_station,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/cable/yellow{ /obj/structure/cable/yellow{
@@ -33091,7 +33091,7 @@
/area/crew_quarters/heads/captain/private) /area/crew_quarters/heads/captain/private)
"bmJ" = ( "bmJ" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/structure/disposalpipe/segment, /obj/structure/disposalpipe/segment,
@@ -34052,7 +34052,7 @@
/obj/structure/displaycase/captain{ /obj/structure/displaycase/captain{
pixel_y = 5 pixel_y = 5
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/turf/open/floor/wood, /turf/open/floor/wood,
@@ -35067,7 +35067,7 @@
/turf/open/floor/wood, /turf/open/floor/wood,
/area/crew_quarters/heads/hop) /area/crew_quarters/heads/hop)
"bqF" = ( "bqF" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/blue{ /obj/effect/turf_decal/tile/blue{
@@ -35947,7 +35947,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/aisat_interior) /area/ai_monitored/turret_protected/aisat_interior)
"bse" = ( "bse" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/porta_turret/ai, /obj/machinery/porta_turret/ai,
@@ -36179,7 +36179,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = -32 pixel_y = -32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -36283,7 +36283,7 @@
/turf/open/floor/carpet, /turf/open/floor/carpet,
/area/crew_quarters/heads/hop) /area/crew_quarters/heads/hop)
"bsP" = ( "bsP" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/bed/dogbed/ian, /obj/structure/bed/dogbed/ian,
@@ -37933,7 +37933,7 @@
/area/bridge) /area/bridge)
"bwu" = ( "bwu" = (
/obj/machinery/holopad, /obj/machinery/holopad,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/light{ /obj/machinery/light{
@@ -39063,7 +39063,7 @@
}, },
/area/engine/atmos) /area/engine/atmos)
"byS" = ( "byS" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/light{ /obj/machinery/light{
@@ -39533,7 +39533,7 @@
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
/area/hallway/secondary/command) /area/hallway/secondary/command)
"bzN" = ( "bzN" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/bot, /obj/effect/turf_decal/bot,
@@ -40057,7 +40057,7 @@
"bAW" = ( "bAW" = (
/obj/structure/table/wood, /obj/structure/table/wood,
/obj/item/folder/blue, /obj/item/folder/blue,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 31 pixel_y = 31
}, },
/obj/item/folder/blue, /obj/item/folder/blue,
@@ -41121,7 +41121,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{ /obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/atmospherics/components/unary/vent_scrubber/on, /obj/machinery/atmospherics/components/unary/vent_scrubber/on,
@@ -41265,7 +41265,7 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden{ /obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/atmospherics/components/unary/vent_scrubber/on, /obj/machinery/atmospherics/components/unary/vent_scrubber/on,
@@ -44514,7 +44514,7 @@
/obj/machinery/gateway{ /obj/machinery/gateway{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/bot_white, /obj/effect/turf_decal/bot_white,
@@ -45284,7 +45284,7 @@
/area/maintenance/central) /area/maintenance/central)
"bLH" = ( "bLH" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/machinery/camera{ /obj/machinery/camera{
@@ -49142,7 +49142,7 @@
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -49213,7 +49213,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -52537,7 +52537,7 @@
pixel_y = 4 pixel_y = 4
}, },
/obj/item/pen, /obj/item/pen,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/light/small{ /obj/machinery/light/small{
@@ -59310,7 +59310,7 @@
/turf/open/floor/plasteel/white, /turf/open/floor/plasteel/white,
/area/medical/medbay/central) /area/medical/medbay/central)
"cnC" = ( "cnC" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/table/glass, /obj/structure/table/glass,
@@ -62450,7 +62450,7 @@
}, },
/area/crew_quarters/heads/hor) /area/crew_quarters/heads/hor)
"ctc" = ( "ctc" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/landmark/xmastree/rdrod, /obj/effect/landmark/xmastree/rdrod,
@@ -65398,7 +65398,7 @@
"cyO" = ( "cyO" = (
/obj/machinery/disposal/bin, /obj/machinery/disposal/bin,
/obj/structure/disposalpipe/trunk, /obj/structure/disposalpipe/trunk,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/turf/open/floor/plasteel/white/side, /turf/open/floor/plasteel/white/side,
@@ -73012,7 +73012,7 @@
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
/area/hallway/secondary/exit/departure_lounge) /area/hallway/secondary/exit/departure_lounge)
"cMU" = ( "cMU" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
layer = 4 layer = 4
}, },
/turf/closed/wall, /turf/closed/wall,
@@ -76209,7 +76209,7 @@
/obj/machinery/light{ /obj/machinery/light{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 30 pixel_y = 30
}, },
/obj/machinery/photocopier{ /obj/machinery/photocopier{
@@ -78350,7 +78350,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/engine/engineering) /area/engine/engineering)
"deD" = ( "deD" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall/r_wall, /turf/closed/wall/r_wall,
/area/engine/supermatter) /area/engine/supermatter)
"deI" = ( "deI" = (
@@ -79825,7 +79825,7 @@
/area/maintenance/aft) /area/maintenance/aft)
"diD" = ( "diD" = (
/obj/machinery/vending/cigarette, /obj/machinery/vending/cigarette,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/sign/poster/official/random{ /obj/structure/sign/poster/official/random{
+10 -10
View File
@@ -3086,7 +3086,7 @@
/area/security/main) /area/security/main)
"ajo" = ( "ajo" = (
/obj/machinery/vending/coffee, /obj/machinery/vending/coffee,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/red{ /obj/effect/turf_decal/tile/red{
@@ -3427,7 +3427,7 @@
"akc" = ( "akc" = (
/obj/structure/table/wood, /obj/structure/table/wood,
/obj/machinery/recharger, /obj/machinery/recharger,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/machinery/light{ /obj/machinery/light{
@@ -6882,7 +6882,7 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/bridge) /area/bridge)
"arK" = ( "arK" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/item/folder/yellow{ /obj/item/folder/yellow{
@@ -9248,7 +9248,7 @@
/obj/structure/disposalpipe/segment{ /obj/structure/disposalpipe/segment{
dir = 4 dir = 4
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/blue{ /obj/effect/turf_decal/tile/blue{
@@ -11380,7 +11380,7 @@
/turf/open/floor/wood, /turf/open/floor/wood,
/area/crew_quarters/heads/hop) /area/crew_quarters/heads/hop)
"aBF" = ( "aBF" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/structure/bed/dogbed/ian, /obj/structure/bed/dogbed/ian,
@@ -14151,7 +14151,7 @@
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
dir = 1 dir = 1
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
@@ -17493,7 +17493,7 @@
/turf/open/floor/plasteel, /turf/open/floor/plasteel,
/area/hallway/secondary/exit/departure_lounge) /area/hallway/secondary/exit/departure_lounge)
"aQt" = ( "aQt" = (
/obj/machinery/status_display, /obj/machinery/status_display/evac,
/turf/closed/wall, /turf/closed/wall,
/area/hallway/secondary/exit/departure_lounge) /area/hallway/secondary/exit/departure_lounge)
"aQu" = ( "aQu" = (
@@ -24292,7 +24292,7 @@
/obj/structure/cable{ /obj/structure/cable{
icon_state = "0-2" icon_state = "0-2"
}, },
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 30 pixel_y = 30
}, },
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
@@ -36929,7 +36929,7 @@
/area/medical/surgery) /area/medical/surgery)
"bHc" = ( "bHc" = (
/obj/machinery/computer/med_data, /obj/machinery/computer/med_data,
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_y = 32 pixel_y = 32
}, },
/turf/open/floor/plasteel/freezer, /turf/open/floor/plasteel/freezer,
@@ -48691,7 +48691,7 @@
/turf/open/space, /turf/open/space,
/area/space/nearstation) /area/space/nearstation)
"cmu" = ( "cmu" = (
/obj/machinery/status_display{ /obj/machinery/status_display/evac{
pixel_x = -32 pixel_x = -32
}, },
/obj/structure/table, /obj/structure/table,
+3 -11
View File
@@ -924,25 +924,16 @@
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/shuttle/syndicate/medical) /area/shuttle/syndicate/medical)
"ce" = ( "ce" = (
/obj/item/sbeacondrop/bomb{
pixel_y = 5
},
/obj/item/sbeacondrop/bomb,
/obj/structure/table/reinforced, /obj/structure/table/reinforced,
/obj/effect/turf_decal/tile/neutral, /obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
dir = 8 dir = 8
}, },
/obj/effect/landmark/start/nuclear_equipment,
/obj/effect/landmark/start/nuclear_equipment,
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/shuttle/syndicate/armory) /area/shuttle/syndicate/armory)
"cf" = ( "cf" = (
/obj/item/grenade/syndieminibomb{
pixel_x = 4;
pixel_y = 2
},
/obj/item/grenade/syndieminibomb{
pixel_x = -1
},
/obj/structure/table/reinforced, /obj/structure/table/reinforced,
/obj/structure/window/reinforced{ /obj/structure/window/reinforced{
dir = 4 dir = 4
@@ -956,6 +947,7 @@
/obj/effect/turf_decal/tile/neutral{ /obj/effect/turf_decal/tile/neutral{
dir = 8 dir = 8
}, },
/obj/effect/landmark/start/nuclear_equipment/minibomb,
/turf/open/floor/plasteel/dark, /turf/open/floor/plasteel/dark,
/area/shuttle/syndicate/armory) /area/shuttle/syndicate/armory)
"cg" = ( "cg" = (
+1
View File
@@ -198,6 +198,7 @@
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living) #define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage) #define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: () #define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" //sent when a mob/login() finishes: (client)
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override) #define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
// /mob/living/carbon signals // /mob/living/carbon signals
+5 -3
View File
@@ -200,9 +200,11 @@
#define NO_SLIP_WHEN_WALKING (1<<0) #define NO_SLIP_WHEN_WALKING (1<<0)
#define SLIDE (1<<1) #define SLIDE (1<<1)
#define GALOSHES_DONT_HELP (1<<2) #define GALOSHES_DONT_HELP (1<<2)
#define SLIDE_ICE (1<<3) #define FLYING_DOESNT_HELP (1<<3)
#define SLIP_WHEN_CRAWLING (1<<4) //clown planet ruin #define SLIDE_ICE (1<<4)
#define SLIP_WHEN_JOGGING (1<<5) //slips prevented by walking are also dodged if the mob is not sprinting or fatigued... unless this flag is on. #define SLIP_WHEN_CRAWLING (1<<5) //clown planet ruin amongst others
#define SLIP_WHEN_JOGGING (1<<6) //slips prevented by walking are also dodged if the mob is nor sprinting or fatigued... unless this flag is on.
#define MAX_CHICKENS 50 #define MAX_CHICKENS 50
+1 -1
View File
@@ -2,7 +2,7 @@
#define TYPEID_NULL "0" #define TYPEID_NULL "0"
#define TYPEID_NORMAL_LIST "f" #define TYPEID_NORMAL_LIST "f"
//helper macros //helper macros
#define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, length(ref)-6) ) ) #define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, -7) ) )
#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST) #define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)
+1 -1
View File
@@ -20,7 +20,7 @@
continue continue
path += choice path += choice
if(copytext(path,-1,0) != "/") //didn't choose a directory, no need to iterate again if(copytext_char(path, -1) != "/") //didn't choose a directory, no need to iterate again
break break
var/extensions var/extensions
for(var/i in valid_extensions) for(var/i in valid_extensions)
+2 -2
View File
@@ -985,7 +985,7 @@ world
var/icon/atom_icon = new(A.icon, A.icon_state) var/icon/atom_icon = new(A.icon, A.icon_state)
if(!letter) if(!letter)
letter = copytext(A.name, 1, 2) letter = A.name[1]
if(uppercase == 1) if(uppercase == 1)
letter = uppertext(letter) letter = uppertext(letter)
else if(uppercase == -1) else if(uppercase == -1)
@@ -1113,7 +1113,7 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
WRITE_FILE(GLOB.iconCache[iconKey], icon) WRITE_FILE(GLOB.iconCache[iconKey], icon)
var/iconData = GLOB.iconCache.ExportText(iconKey) var/iconData = GLOB.iconCache.ExportText(iconKey)
var/list/partial = splittext(iconData, "{") var/list/partial = splittext(iconData, "{")
return replacetext(copytext(partial[2], 3, -5), "\n", "") return replacetext(copytext_char(partial[2], 3, -5), "\n", "")
/proc/icon2html(thing, target, icon_state, dir, frame = 1, moving = FALSE) /proc/icon2html(thing, target, icon_state, dir, frame = 1, moving = FALSE)
if (!thing) if (!thing)
+2 -2
View File
@@ -28,10 +28,10 @@
. = "does" . = "does"
/datum/proc/p_theyve(capitalized, temp_gender) /datum/proc/p_theyve(capitalized, temp_gender)
. = p_they(capitalized, temp_gender) + "'" + copytext(p_have(temp_gender), 3) . = p_they(capitalized, temp_gender) + "'" + copytext_char(p_have(temp_gender), 3)
/datum/proc/p_theyre(capitalized, temp_gender) /datum/proc/p_theyre(capitalized, temp_gender)
. = p_they(capitalized, temp_gender) + "'" + copytext(p_are(temp_gender), 2) . = p_they(capitalized, temp_gender) + "'" + copytext_char(p_are(temp_gender), 2)
/datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what? /datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what?
. = "s" . = "s"
+15 -13
View File
@@ -43,24 +43,24 @@
if(!istext(color)) if(!istext(color))
color = "" color = ""
var/start = 1 + (text2ascii(color,1)==35) var/start = 1 + (text2ascii(color, 1) == 35)
var/len = length(color) var/len = length(color)
var/step_size = 1 + ((len+1)-start != desired_format) var/char = ""
. = "" . = ""
for(var/i=start, i<=len, i+=step_size) for(var/i = start, i <= len, i += length(char))
var/ascii = text2ascii(color,i) char = color[i]
switch(ascii) switch(text2ascii(char))
if(48 to 57) if(48 to 57) //numbers 0 to 9
. += ascii2text(ascii) //numbers 0 to 9 . += char
if(97 to 102) if(97 to 102) //letters a to f
. += ascii2text(ascii) //letters a to f . += char
if(65 to 70) if(65 to 70) //letters A to F - translates to lowercase
. += ascii2text(ascii+32) //letters A to F - translates to lowercase . += lowertext(char)
else else
break break
if(length(.) != desired_format) if(length_char(.) != desired_format)
if(default) if(default)
return default return default
return crunch + repeat_string(desired_format, "0") return crunch + repeat_string(desired_format, "0")
@@ -68,7 +68,9 @@
return crunch + . return crunch + .
/proc/sanitize_ooccolor(color) /proc/sanitize_ooccolor(color)
var/list/HSL = rgb2hsl(hex2num(copytext(color,2,4)),hex2num(copytext(color,4,6)),hex2num(copytext(color,6,8))) if(length(color) != length_char(color))
CRASH("Invalid characters in color '[color]'")
var/list/HSL = rgb2hsl(hex2num(copytext(color, 2, 4)), hex2num(copytext(color, 4, 6)), hex2num(copytext(color, 6, 8)))
HSL[3] = min(HSL[3],0.4) HSL[3] = min(HSL[3],0.4)
var/list/RGB = hsl2rgb(arglist(HSL)) var/list/RGB = hsl2rgb(arglist(HSL))
return "#[num2hex(RGB[1],2)][num2hex(RGB[2],2)][num2hex(RGB[3],2)]" return "#[num2hex(RGB[1],2)][num2hex(RGB[2],2)][num2hex(RGB[3],2)]"
+1 -1
View File
@@ -52,6 +52,6 @@
if(bad_chars) if(bad_chars)
bad_match = url_encode(bad_chars_regex.match) bad_match = url_encode(bad_chars_regex.match)
scrubbed_url += bad_match scrubbed_url += bad_match
last_good = bad_chars + length(bad_match) last_good = bad_chars + length(bad_chars_regex.match)
while(bad_chars) while(bad_chars)
. = scrubbed_url . = scrubbed_url
+213 -231
View File
@@ -40,8 +40,8 @@
for(var/char in repl_chars) for(var/char in repl_chars)
var/index = findtext(t, char) var/index = findtext(t, char)
while(index) while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1) t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index + length(char))
index = findtext(t, char, index+1) index = findtext(t, char, index + length(char))
return t return t
/proc/sanitize_filename(t) /proc/sanitize_filename(t)
@@ -63,22 +63,28 @@
//Returns null if there is any bad text in the string //Returns null if there is any bad text in the string
/proc/reject_bad_text(text, max_length=512) /proc/reject_bad_text(text, max_length = 512, ascii_only = TRUE)
if(length(text) > max_length) var/char_count = 0
return //message too long var/non_whitespace = FALSE
var/non_whitespace = 0 var/lenbytes = length(text)
for(var/i=1, i<=length(text), i++) var/char = ""
switch(text2ascii(text,i)) for(var/i = 1, i <= lenbytes, i += length(char))
if(62,60,92,47) char = text[i]
return //rejects the text if it contains these bad characters: <, >, \ or / char_count++
if(127 to 255) if(char_count > max_length)
return //rejects weird letters like return
switch(text2ascii(char))
if(62,60,92,47) // <, >, \, /
return
if(0 to 31) if(0 to 31)
return //more weird stuff return
if(32) if(32)
continue //whitespace continue //whitespace
if(127 to INFINITY)
if(ascii_only)
return
else else
non_whitespace = 1 non_whitespace = TRUE
if(non_whitespace) if(non_whitespace)
return text //only accepts the text if it has some non-spaces return text //only accepts the text if it has some non-spaces
@@ -101,73 +107,84 @@
else else
return trim(html_encode(name), max_length) return trim(html_encode(name), max_length)
#define NO_CHARS_DETECTED 0
#define SPACES_DETECTED 1
#define SYMBOLS_DETECTED 2
#define NUMBERS_DETECTED 3
#define LETTERS_DETECTED 4
//Filters out undesirable characters from names //Filters out undesirable characters from names
/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN) /proc/reject_bad_name(t_in, allow_numbers = FALSE, max_length = MAX_NAME_LEN, ascii_only = TRUE)
if(!t_in || length(t_in) > max_length) if(!t_in)
return //Rejects the input if it is null or if it is longer then the max length allowed return //Rejects the input if it is null
var/number_of_alphanumeric = 0 var/number_of_alphanumeric = 0
var/last_char_group = 0 var/last_char_group = NO_CHARS_DETECTED
var/t_out = "" var/t_out = ""
var/t_len = length(t_in)
var/charcount = 0
var/char = ""
for(var/i=1, i<=length(t_in), i++)
var/ascii_char = text2ascii(t_in,i) for(var/i = 1, i <= t_len, i += length(char))
switch(ascii_char) char = t_in[i]
switch(text2ascii(char))
// A .. Z // A .. Z
if(65 to 90) //Uppercase Letters if(65 to 90) //Uppercase Letters
t_out += ascii2text(ascii_char)
number_of_alphanumeric++ number_of_alphanumeric++
last_char_group = 4 last_char_group = LETTERS_DETECTED
// a .. z // a .. z
if(97 to 122) //Lowercase Letters if(97 to 122) //Lowercase Letters
if(last_char_group<2) if(last_char_group == NO_CHARS_DETECTED || last_char_group == SPACES_DETECTED || last_char_group == SYMBOLS_DETECTED) //start of a word
t_out += ascii2text(ascii_char-32) //Force uppercase first character char = uppertext(char)
else
t_out += ascii2text(ascii_char)
number_of_alphanumeric++ number_of_alphanumeric++
last_char_group = 4 last_char_group = LETTERS_DETECTED
// 0 .. 9 // 0 .. 9
if(48 to 57) //Numbers if(48 to 57) //Numbers
if(!last_char_group) if(last_char_group == NO_CHARS_DETECTED || !allow_numbers) //suppress at start of string
continue //suppress at start of string
if(!allow_numbers)
continue continue
t_out += ascii2text(ascii_char)
number_of_alphanumeric++ number_of_alphanumeric++
last_char_group = 3 last_char_group = NUMBERS_DETECTED
// ' - . // ' - .
if(39,45,46) //Common name punctuation if(39,45,46) //Common name punctuation
if(!last_char_group) if(last_char_group == NO_CHARS_DETECTED)
continue continue
t_out += ascii2text(ascii_char) last_char_group = SYMBOLS_DETECTED
last_char_group = 2
// ~ | @ : # $ % & * + // ~ | @ : # $ % & * +
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI) if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
if(!last_char_group) if(last_char_group == NO_CHARS_DETECTED || !allow_numbers) //suppress at start of string
continue //suppress at start of string
if(!allow_numbers)
continue continue
t_out += ascii2text(ascii_char) last_char_group = SYMBOLS_DETECTED
last_char_group = 2
//Space //Space
if(32) if(32)
if(last_char_group <= 1) if(last_char_group == NO_CHARS_DETECTED || last_char_group == SPACES_DETECTED) //suppress double-spaces and spaces at start of string
continue //suppress double-spaces and spaces at start of string continue
t_out += ascii2text(ascii_char) last_char_group = SPACES_DETECTED
last_char_group = 1
if(127 to INFINITY)
if(ascii_only)
continue
last_char_group = SYMBOLS_DETECTED //for now, we'll treat all non-ascii characters like symbols even though most are letters
else else
return continue
t_out += char
charcount++
if(charcount >= max_length)
break
if(number_of_alphanumeric < 2) if(number_of_alphanumeric < 2)
return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '" return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
if(last_char_group == 1) if(last_char_group == SPACES_DETECTED)
t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space) t_out = copytext_char(t_out, 1, -1) //removes the last character (in this case a space)
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
if(cmptext(t_out,bad_name)) if(cmptext(t_out,bad_name))
@@ -175,6 +192,11 @@
return t_out return t_out
#undef NO_CHARS_DETECTED
#undef SPACES_DETECTED
#undef NUMBERS_DETECTED
#undef LETTERS_DETECTED
//html_encode helper proc that returns the smallest non null of two numbers //html_encode helper proc that returns the smallest non null of two numbers
//or 0 if they're both null (needed because of findtext returning 0 when a value is not present) //or 0 if they're both null (needed because of findtext returning 0 when a value is not present)
/proc/non_zero_min(a, b) /proc/non_zero_min(a, b)
@@ -184,39 +206,6 @@
return a return a
return (a < b ? a : b) return (a < b ? a : b)
/*
* Text searches
*/
//Checks the beginning of a string for a specified sub-string
//Returns the position of the substring or 0 if it was not found
/proc/dd_hasprefix(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findtext(text, prefix, start, end)
//Checks the beginning of a string for a specified sub-string. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hasprefix_case(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findtextEx(text, prefix, start, end)
//Checks the end of a string for a specified substring.
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix(text, suffix)
var/start = length(text) - length(suffix)
if(start)
return findtext(text, suffix, start, null)
return
//Checks the end of a string for a specified substring. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix_case(text, suffix)
var/start = length(text) - length(suffix)
if(start)
return findtextEx(text, suffix, start, null)
//Checks if any of a given list of needles is in the haystack //Checks if any of a given list of needles is in the haystack
/proc/text_in_list(haystack, list/needle_list, start=1, end=0) /proc/text_in_list(haystack, list/needle_list, start=1, end=0)
for(var/needle in needle_list) for(var/needle in needle_list)
@@ -231,23 +220,19 @@
return 1 return 1
return 0 return 0
//Adds 'u' number of zeros ahead of the text 't' //Adds 'char' ahead of 'text' until there are 'count' characters total
/proc/add_zero(t, u) /proc/add_leading(text, count, char = " ")
while (length(t) < u) text = "[text]"
t = "0[t]" var/charcount = count - length_char(text)
return t var/list/chars_to_add[max(charcount + 1, 0)]
return jointext(chars_to_add, char) + text
//Adds 'u' number of spaces ahead of the text 't' //Adds 'char' behind 'text' until there are 'count' characters total
/proc/add_lspace(t, u) /proc/add_trailing(text, count, char = " ")
while(length(t) < u) text = "[text]"
t = " [t]" var/charcount = count - length_char(text)
return t var/list/chars_to_add[max(charcount + 1, 0)]
return text + jointext(chars_to_add, char)
//Adds 'u' number of spaces behind the text 't'
/proc/add_tspace(t, u)
while(length(t) < u)
t = "[t] "
return t
//Returns a string with reserved characters and spaces before the first letter removed //Returns a string with reserved characters and spaces before the first letter removed
/proc/trim_left(text) /proc/trim_left(text)
@@ -267,57 +252,41 @@
//Returns a string with reserved characters and spaces before the first word and after the last word removed. //Returns a string with reserved characters and spaces before the first word and after the last word removed.
/proc/trim(text, max_length) /proc/trim(text, max_length)
if(max_length) if(max_length)
text = copytext(text, 1, max_length) text = copytext_char(text, 1, max_length)
return trim_left(trim_right(text)) return trim_left(trim_right(text))
//Returns a string with the first element of the string capitalized. //Returns a string with the first element of the string capitalized.
/proc/capitalize(t as text) /proc/capitalize(t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2) . = t
if(t)
//Centers text by adding spaces to either side of the string. . = t[1]
/proc/dd_centertext(message, length) return uppertext(.) + copytext(t, 1 + length(.))
var/new_message = message
var/size = length(message)
var/delta = length - size
if(size == length)
return new_message
if(size > length)
return copytext(new_message, 1, length + 1)
if(delta == 1)
return new_message + " "
if(delta % 2)
new_message = " " + new_message
delta--
var/spaces = add_lspace("",delta/2-1)
return spaces + new_message + spaces
//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose
/proc/dd_limittext(message, length)
var/size = length(message)
if(size <= length)
return message
return copytext(message, 1, length + 1)
/proc/stringmerge(text,compare,replace = "*") /proc/stringmerge(text,compare,replace = "*")
//This proc fills in all spaces with the "replace" var (* by default) with whatever //This proc fills in all spaces with the "replace" var (* by default) with whatever
//is in the other string at the same spot (assuming it is not a replace char). //is in the other string at the same spot (assuming it is not a replace char).
//This is used for fingerprints //This is used for fingerprints
var/newtext = text var/newtext = text
if(length(text) != length(compare)) var/text_it = 1 //iterators
return 0 var/comp_it = 1
for(var/i = 1, i < length(text), i++) var/newtext_it = 1
var/a = copytext(text,i,i+1) var/text_length = length(text)
var/b = copytext(compare,i,i+1) var/comp_length = length(compare)
while(comp_it <= comp_length && text_it <= text_length)
var/a = text[text_it]
var/b = compare[comp_it]
//if it isn't both the same letter, or if they are both the replacement character //if it isn't both the same letter, or if they are both the replacement character
//(no way to know what it was supposed to be) //(no way to know what it was supposed to be)
if(a != b) if(a != b)
if(a == replace) //if A is the replacement char if(a == replace) //if A is the replacement char
newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1) newtext = copytext(newtext, 1, newtext_it) + b + copytext(newtext, newtext_it + length(newtext[newtext_it]))
else if(b == replace) //if B is the replacement char else if(b == replace) //if B is the replacement char
newtext = copytext(newtext,1,i) + a + copytext(newtext, i+1) newtext = copytext(newtext, 1, newtext_it) + a + copytext(newtext, newtext_it + length(newtext[newtext_it]))
else //The lists disagree, Uh-oh! else //The lists disagree, Uh-oh!
return 0 return 0
text_it += length(a)
comp_it += length(b)
newtext_it += length(newtext[newtext_it])
return newtext return newtext
/proc/stringpercent(text,character = "*") /proc/stringpercent(text,character = "*")
@@ -326,16 +295,21 @@
if(!text || !character) if(!text || !character)
return 0 return 0
var/count = 0 var/count = 0
for(var/i = 1, i <= length(text), i++) var/lentext = length(text)
var/a = copytext(text,i,i+1) var/a = ""
for(var/i = 1, i <= lentext, i += length(a))
a = text[i]
if(a == character) if(a == character)
count++ count++
return count return count
/proc/reverse_text(text = "") /proc/reverse_text(text = "")
var/new_text = "" var/new_text = ""
for(var/i = length(text); i > 0; i--) var/lentext = length(text)
new_text += copytext(text, i, i+1) var/letter = ""
for(var/i = 1, i <= lentext, i += length(letter))
letter = text[i]
new_text = letter + new_text
return new_text return new_text
GLOBAL_LIST_INIT(zero_character_only, list("0")) GLOBAL_LIST_INIT(zero_character_only, list("0"))
@@ -358,15 +332,6 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
/proc/random_color() /proc/random_color()
return random_string(6, GLOB.hex_characters) return random_string(6, GLOB.hex_characters)
/proc/add_zero2(t, u)
var/temp1
while (length(t) < u)
t = "0[t]"
temp1 = t
if (length(t) > u)
temp1 = copytext(t,2,u+1)
return temp1
//merges non-null characters (3rd argument) from "from" into "into". Returns result //merges non-null characters (3rd argument) from "from" into "into". Returns result
//e.g. into = "Hello World" //e.g. into = "Hello World"
// from = "Seeya______" // from = "Seeya______"
@@ -379,41 +344,48 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
into = "" into = ""
if(!istext(from)) if(!istext(from))
from = "" from = ""
var/null_ascii = istext(null_char) ? text2ascii(null_char,1) : null_char var/null_ascii = istext(null_char) ? text2ascii(null_char, 1) : null_char
var/copying_into = FALSE
var/previous = 0 var/char = ""
var/start = 1 var/start = 1
var/end = length(into) + 1 var/end_from = length(from)
var/end_into = length(into)
for(var/i=1, i<end, i++) var/into_it = 1
var/ascii = text2ascii(from, i) var/from_it = 1
if(ascii == null_ascii) while(from_it <= end_from && into_it <= end_into)
if(previous != 1) char = from[from_it]
. += copytext(from, start, i) if(text2ascii(char) == null_ascii)
start = i if(!copying_into)
previous = 1 . += copytext(from, start, from_it)
start = into_it
copying_into = TRUE
else else
if(previous != 0) if(copying_into)
. += copytext(into, start, i) . += copytext(into, start, into_it)
start = i start = from_it
previous = 0 copying_into = FALSE
into_it += length(into[into_it])
from_it += length(char)
if(previous == 0) if(copying_into)
. += copytext(from, start, end) . += copytext(into, start)
else else
. += copytext(into, start, end) . += copytext(from, start, from_it)
if(into_it <= end_into)
. += copytext(into, into_it)
//finds the first occurrence of one of the characters from needles argument inside haystack //finds the first occurrence of one of the characters from needles argument inside haystack
//it may appear this can be optimised, but it really can't. findtext() is so much faster than anything you can do in byondcode. //it may appear this can be optimised, but it really can't. findtext() is so much faster than anything you can do in byondcode.
//stupid byond :( //stupid byond :(
/proc/findchar(haystack, needles, start=1, end=0) /proc/findchar(haystack, needles, start=1, end=0)
var/temp var/char = ""
var/len = length(needles) var/len = length(needles)
for(var/i=1, i<=len, i++) for(var/i = 1, i <= len, i += length(char))
temp = findtextEx(haystack, ascii2text(text2ascii(needles,i)), start, end) //Note: ascii2text(text2ascii) is faster than copytext() char = needles[i]
if(temp) . = findtextEx(haystack, char, start, end)
end = temp if(.)
return end return
return 0
/proc/parsemarkdown_basic_step1(t, limited=FALSE) /proc/parsemarkdown_basic_step1(t, limited=FALSE)
if(length(t) <= 0) if(length(t) <= 0)
@@ -571,23 +543,28 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
return t return t
#define string2charlist(string) (splittext(string, regex("(.)")) - splittext(string, "")) /proc/text2charlist(text)
var/char = ""
var/lentext = length(text)
. = list()
for(var/i = 1, i <= lentext, i += length(char))
char = text[i]
. += char
/proc/rot13(text = "") /proc/rot13(text = "")
var/list/textlist = string2charlist(text) var/lentext = length(text)
var/list/result = list() var/char = ""
for(var/c in textlist) var/ascii = 0
var/ca = text2ascii(c) . = ""
if(ca >= text2ascii("a") && ca <= text2ascii("m")) for(var/i = 1, i <= lentext, i += length(char))
ca += 13 char = text[i]
else if(ca >= text2ascii("n") && ca <= text2ascii("z")) ascii = text2ascii(char)
ca -= 13 switch(ascii)
else if(ca >= text2ascii("A") && ca <= text2ascii("M")) if(65 to 77, 97 to 109) //A to M, a to m
ca += 13 ascii += 13
else if(ca >= text2ascii("N") && ca <= text2ascii("Z")) if(78 to 90, 110 to 122) //N to Z, n to z
ca -= 13 ascii -= 13
result += ascii2text(ca) . += ascii2text(ascii)
return jointext(result, "")
//Takes a list of values, sanitizes it down for readability and character count, //Takes a list of values, sanitizes it down for readability and character count,
//then exports it as a json file at data/npc_saves/[filename].json. //then exports it as a json file at data/npc_saves/[filename].json.
@@ -599,7 +576,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
return return
//Regular expressions are, as usual, absolute magic //Regular expressions are, as usual, absolute magic
var/regex/all_invalid_symbols = new("\[^ -~]+") //Any characters outside of 32 (space) to 126 (~) because treating things you don't understand as "magic" is really stupid
var/regex/all_invalid_symbols = new(@"[^ -~]{1}")
var/list/accepted = list() var/list/accepted = list()
for(var/string in proposed) for(var/string in proposed)
@@ -607,34 +585,44 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
continue continue
var/buffer = "" var/buffer = ""
var/early_culling = TRUE var/early_culling = TRUE
for(var/pos = 1, pos <= length(string), pos++) var/lentext = length(string)
var/let = copytext(string, pos, (pos + 1) % length(string)) var/let = ""
if(early_culling && !findtext(let,GLOB.is_alphanumeric))
for(var/pos = 1, pos <= lentext, pos += length(let))
let = string[pos]
if(!findtext(let, GLOB.is_alphanumeric))
continue continue
early_culling = FALSE early_culling = FALSE
buffer += let buffer = copytext(string, pos)
if(!findtext(buffer,GLOB.is_alphanumeric)) break
if(early_culling) //Never found any letters! Bail!
continue continue
var/punctbuffer = "" var/punctbuffer = ""
var/cutoff = length(buffer) var/cutoff = 0
for(var/pos = length(buffer), pos >= 0, pos--) lentext = length_char(buffer)
var/let = copytext(buffer, pos, (pos + 1) % length(buffer)) for(var/pos = 1, pos <= lentext, pos++)
if(findtext(let,GLOB.is_alphanumeric)) let = copytext_char(buffer, -pos, -pos + 1)
if(!findtext(let, GLOB.is_punctuation)) //This won't handle things like Nyaaaa!~ but that's fine
break break
if(findtext(let,GLOB.is_punctuation)) punctbuffer += let
punctbuffer = let + punctbuffer //Note this isn't the same thing as using += cutoff += length(let)
cutoff = pos
if(punctbuffer) //We clip down excessive punctuation to get the letter count lower and reduce repeats. It's not perfect but it helps. if(punctbuffer) //We clip down excessive punctuation to get the letter count lower and reduce repeats. It's not perfect but it helps.
var/exclaim = FALSE var/exclaim = FALSE
var/question = FALSE var/question = FALSE
var/periods = 0 var/periods = 0
for(var/pos = length(punctbuffer), pos >= 0, pos--) lentext = length(punctbuffer)
var/punct = copytext(punctbuffer, pos, (pos + 1) % length(punctbuffer)) for(var/pos = 1, pos <= lentext, pos += length(let))
if(!exclaim && findtext(punct,"!")) let = punctbuffer[pos]
if(!exclaim && findtext(let, "!"))
exclaim = TRUE exclaim = TRUE
if(!question && findtext(punct,"?")) if(question)
break
if(!question && findtext(let, "?"))
question = TRUE question = TRUE
if(!exclaim && !question && findtext(punct,".")) if(exclaim)
break
if(!exclaim && !question && findtext(let, ".")) //? and ! take priority over periods
periods += 1 periods += 1
if(exclaim) if(exclaim)
if(question) if(question)
@@ -643,15 +631,13 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
punctbuffer = "!" punctbuffer = "!"
else if(question) else if(question)
punctbuffer = "?" punctbuffer = "?"
else if(periods) else if(periods > 1)
if(periods > 1) punctbuffer = "..."
punctbuffer = "..." else
else punctbuffer = "" //Grammer nazis be damned
punctbuffer = "" //Grammer nazis be damned buffer = copytext(buffer, 1, -cutoff) + punctbuffer
buffer = copytext(buffer, 1, cutoff) + punctbuffer lentext = length_char(buffer)
if(!findtext(buffer,GLOB.is_alphanumeric)) if(!buffer || lentext > 280 || lentext <= cullshort || (buffer in accepted))
continue
if(!buffer || length(buffer) > 280 || length(buffer) <= cullshort || buffer in accepted)
continue continue
accepted += buffer accepted += buffer
@@ -688,7 +674,7 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
var/leng = length(string) var/leng = length(string)
var/next_space = findtext(string, " ", next_backslash + 1) var/next_space = findtext(string, " ", next_backslash + length(string[next_backslash]))
if(!next_space) if(!next_space)
next_space = leng - next_backslash next_space = leng - next_backslash
@@ -696,8 +682,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
return string return string
var/base = next_backslash == 1 ? "" : copytext(string, 1, next_backslash) var/base = next_backslash == 1 ? "" : copytext(string, 1, next_backslash)
var/macro = lowertext(copytext(string, next_backslash + 1, next_space)) var/macro = lowertext(copytext(string, next_backslash + length(string[next_space]), next_space))
var/rest = next_backslash > leng ? "" : copytext(string, next_space + 1) var/rest = next_backslash > leng ? "" : copytext(string, next_space + length(string[next_space]))
//See https://secure.byond.com/docs/ref/info.html#/DM/text/macros //See https://secure.byond.com/docs/ref/info.html#/DM/text/macros
switch(macro) switch(macro)
@@ -769,28 +755,24 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
return "[number]\th" return "[number]\th"
/proc/unintelligize(message) /proc/unintelligize(message)
var/prefix=copytext(message,1,2) var/regex/word_boundaries = regex(@"\b[\S]+\b", "g")
var/prefix = message[1]
if(prefix == ";") if(prefix == ";")
message = copytext(message,2) message = copytext(message, 1 + length(prefix))
else if(prefix in list(":","#")) else if(prefix in list(":", "#"))
prefix += copytext(message,2,3) prefix += message[1 + length(prefix)]
message = copytext(message,3) message = copytext(message, length(prefix))
else else
prefix="" prefix = ""
var/list/words = splittext(message," ")
var/list/rearranged = list() var/list/rearranged = list()
for(var/i=1;i<=words.len;i++) while(word_boundaries.Find(message))
var/cword = pick(words) var/cword = word_boundaries.match
words.Remove(cword)
var/suffix = copytext(cword,length(cword)-1,length(cword))
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
cword = copytext(cword,1 ,length(cword)-1)
suffix = copytext(cword,length(cword)-1,length(cword) )
if(length(cword)) if(length(cword))
rearranged += cword rearranged += cword
message = "[prefix][jointext(rearranged," ")]" shuffle_inplace(rearranged)
. = message return "[prefix][jointext(rearranged, " ")]"
#define is_alpha(X) ((text2ascii(X) <= 122) && (text2ascii(X) >= 97)) #define is_alpha(X) ((text2ascii(X) <= 122) && (text2ascii(X) >= 97))
#define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1)) #define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1))
+5 -4
View File
@@ -8,14 +8,15 @@
index = findtext(t, char) index = findtext(t, char)
return t return t
proc/TextPreview(var/string,var/len=40) /proc/TextPreview(string, len = 40)
if(length(string) <= len) var/char_len = length_char(string)
if(!length(string)) if(char_len <= len)
if(char_len)
return "\[...\]" return "\[...\]"
else else
return string return string
else else
return "[copytext(string, 1, 37)]..." return "[copytext_char(string, 1, 37)]..."
GLOBAL_LIST_EMPTY(mentorlog) GLOBAL_LIST_EMPTY(mentorlog)
GLOBAL_PROTECT(mentorlog) GLOBAL_PROTECT(mentorlog)
+5 -5
View File
@@ -542,17 +542,17 @@
//assumes format #RRGGBB #rrggbb //assumes format #RRGGBB #rrggbb
/proc/color_hex2num(A) /proc/color_hex2num(A)
if(!A) if(!A || length(A) != length_char(A))
return 0 return 0
var/R = hex2num(copytext(A,2,4)) var/R = hex2num(copytext(A, 2, 4))
var/G = hex2num(copytext(A,4,6)) var/G = hex2num(copytext(A, 4, 6))
var/B = hex2num(copytext(A,6,0)) var/B = hex2num(copytext(A, 6, 0))
return R+G+B return R+G+B
//word of warning: using a matrix like this as a color value will simplify it back to a string after being set //word of warning: using a matrix like this as a color value will simplify it back to a string after being set
/proc/color_hex2color_matrix(string) /proc/color_hex2color_matrix(string)
var/length = length(string) var/length = length(string)
if(length != 7 && length != 9) if((length != 7 && length != 9) || length != length_char(string))
return color_matrix_identity() return color_matrix_identity()
var/r = hex2num(copytext(string, 2, 4))/255 var/r = hex2num(copytext(string, 2, 4))/255
var/g = hex2num(copytext(string, 4, 6))/255 var/g = hex2num(copytext(string, 4, 6))/255
+13 -20
View File
@@ -6,25 +6,18 @@
//Inverts the colour of an HTML string //Inverts the colour of an HTML string
/proc/invertHTML(HTMLstring) /proc/invertHTML(HTMLstring)
if(!istext(HTMLstring))
if (!( istext(HTMLstring) ))
CRASH("Given non-text argument!") CRASH("Given non-text argument!")
return return
else else if(length(HTMLstring) != 7)
if (length(HTMLstring) != 7) CRASH("Given non-HTML argument!")
CRASH("Given non-HTML argument!") return
return else if(length_char(HTMLstring) != 7)
CRASH("Given non-hex symbols in argument!")
var/textr = copytext(HTMLstring, 2, 4) var/textr = copytext(HTMLstring, 2, 4)
var/textg = copytext(HTMLstring, 4, 6) var/textg = copytext(HTMLstring, 4, 6)
var/textb = copytext(HTMLstring, 6, 8) var/textb = copytext(HTMLstring, 6, 8)
var/r = hex2num(textr) return rgb(255 - hex2num(textr), 255 - hex2num(textg), 255 - hex2num(textb))
var/g = hex2num(textg)
var/b = hex2num(textb)
textr = num2hex(255 - r, 2)
textg = num2hex(255 - g, 2)
textb = num2hex(255 - b, 2)
return text("#[][][]", textr, textg, textb)
return
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams. /proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
if(!start || !end) if(!start || !end)
@@ -184,15 +177,15 @@ Turf and target are separate in case you want to teleport some distance from a t
//Returns whether or not a player is a guest using their ckey as an input //Returns whether or not a player is a guest using their ckey as an input
/proc/IsGuestKey(key) /proc/IsGuestKey(key)
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0 return FALSE
var/i, ch, len = length(key) var/i, ch, len = length(key)
for (i = 7, i <= len, ++i) for (i = 7, i <= len, ++i) //we know the first 6 chars are Guest-
ch = text2ascii(key, i) ch = text2ascii(key, i)
if (ch < 48 || ch > 57) if (ch < 48 || ch > 57) //0-9
return 0 return FALSE
return 1 return TRUE
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame() //Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
/mob/proc/apply_pref_name(role, client/C) /mob/proc/apply_pref_name(role, client/C)
@@ -1314,7 +1307,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/proc/GUID() /proc/GUID()
var/const/GUID_VERSION = "b" var/const/GUID_VERSION = "b"
var/const/GUID_VARIANT = "d" var/const/GUID_VARIANT = "d"
var/node_id = copytext(md5("[rand()*rand(1,9999999)][world.name][world.hub][world.hub_password][world.internet_address][world.address][world.contents.len][world.status][world.port][rand()*rand(1,9999999)]"), 1, 13) var/node_id = copytext_char(md5("[rand()*rand(1,9999999)][world.name][world.hub][world.hub_password][world.internet_address][world.address][world.contents.len][world.status][world.port][rand()*rand(1,9999999)]"), 1, 13)
var/time_high = "[num2hex(text2num(time2text(world.realtime,"YYYY")), 2)][num2hex(world.realtime, 6)]" var/time_high = "[num2hex(text2num(time2text(world.realtime,"YYYY")), 2)][num2hex(world.realtime, 6)]"
+20
View File
@@ -39,6 +39,26 @@
#error You need version 512 or higher #error You need version 512 or higher
#endif #endif
//Compatability -- These procs were added in 513.1493, not 513.1490
//Which really shoulda bumped us up to 514 right then and there but instead Lummox is a dumb dumb
#if DM_BUILD < 1493
#define length_char(args...) length(args)
#define text2ascii_char(args...) text2ascii(args)
#define copytext_char(args...) copytext(args)
#define splittext_char(args...) splittext(args)
#define spantext_char(args...) spantext(args)
#define nonspantext_char(args...) nonspantext(args)
#define findtext_char(args...) findtext(args)
#define findtextEx_char(args...) findtextEx(args)
#define findlasttext_char(args...) findlasttext(args)
#define findlasttextEx_char(args...) findlasttextEx(args)
#define replacetext_char(args...) replacetext(args)
#define replacetextEx_char(args...) replacetextEx(args)
// /regex procs
#define Find_char(args...) Find(args)
#define Replace_char(args...) Replace(args)
#endif
//Additional code for the above flags. //Additional code for the above flags.
#ifdef TESTING #ifdef TESTING
#warn compiling in TESTING mode. testing() debug messages will be visible. #warn compiling in TESTING mode. testing() debug messages will be visible.
-5
View File
@@ -50,11 +50,6 @@
zone_select.update_icon() zone_select.update_icon()
static_inventory += zone_select static_inventory += zone_select
using = new /obj/screen/craft
using.icon = ui_style
using.hud = src
static_inventory += using
using = new /obj/screen/area_creator using = new /obj/screen/area_creator
using.icon = ui_style using.icon = ui_style
using.hud = src using.hud = src
-7
View File
@@ -91,13 +91,6 @@
var/obj/screen/using var/obj/screen/using
var/obj/screen/inventory/inv_box var/obj/screen/inventory/inv_box
using = new /obj/screen/craft
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxcraft // CIT CHANGE
using.hud = src
static_inventory += using
using = new/obj/screen/language_menu using = new/obj/screen/language_menu
using.icon = ui_style using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE if(!widescreenlayout) // CIT CHANGE
-6
View File
@@ -66,12 +66,6 @@
icon_state = "craft" icon_state = "craft"
screen_loc = ui_crafting screen_loc = ui_crafting
/obj/screen/craft/Click()
var/mob/living/M = usr
if(isobserver(usr))
return
M.OpenCraftingMenu()
/obj/screen/area_creator /obj/screen/area_creator
name = "create new area" name = "create new area"
icon = 'icons/mob/screen_midnight.dmi' icon = 'icons/mob/screen_midnight.dmi'
@@ -171,7 +171,8 @@
key_name = copytext(str_val, 1, key_pos) key_name = copytext(str_val, 1, key_pos)
if(lowercase) if(lowercase)
key_name = lowertext(key_name) key_name = lowertext(key_name)
key_value = copytext(str_val, key_pos + 1) if(key_pos)
key_value = copytext(str_val, key_pos + length(str_val[key_pos]))
var/new_key var/new_key
var/new_value var/new_value
var/continue_check_value var/continue_check_value
@@ -109,13 +109,13 @@
if(!L) if(!L)
continue continue
var/firstchar = copytext(L, 1, 2) var/firstchar = L[1]
if(firstchar == "#") if(firstchar == "#")
continue continue
var/lockthis = firstchar == "@" var/lockthis = firstchar == "@"
if(lockthis) if(lockthis)
L = copytext(L, 2) L = copytext(L, length(firstchar) + 1)
var/pos = findtext(L, " ") var/pos = findtext(L, " ")
var/entry = null var/entry = null
@@ -123,7 +123,7 @@
if(pos) if(pos)
entry = lowertext(copytext(L, 1, pos)) entry = lowertext(copytext(L, 1, pos))
value = copytext(L, pos + 1) value = copytext(L, pos + length(L[pos]))
else else
entry = lowertext(L) entry = lowertext(L)
@@ -269,7 +269,7 @@
t = trim(t) t = trim(t)
if(length(t) == 0) if(length(t) == 0)
continue continue
else if(copytext(t, 1, 2) == "#") else if(t[1] == "#")
continue continue
var/pos = findtext(t, " ") var/pos = findtext(t, " ")
@@ -278,7 +278,7 @@
if(pos) if(pos)
command = lowertext(copytext(t, 1, pos)) command = lowertext(copytext(t, 1, pos))
data = copytext(t, pos + 1) data = copytext(t, pos + length(t[pos]))
else else
command = lowertext(t) command = lowertext(t)
+12 -12
View File
@@ -39,34 +39,34 @@ SUBSYSTEM_DEF(pai)
switch(option) switch(option)
if("name") if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text t = reject_bad_name(stripped_input(usr, "Enter a name for your pAI", "pAI Name", candidate.name, MAX_NAME_LEN), TRUE)
if(t) if(t)
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN) candidate.name = t
if("desc") if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message t = stripped_multiline_input(usr, "Enter a description for your pAI", "pAI Description", candidate.description, MAX_MESSAGE_LEN)
if(t) if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN) candidate.description = t
if("role") if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text t = stripped_input(usr, "Enter a role for your pAI", "pAI Role", candidate.role, MAX_MESSAGE_LEN)
if(t) if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN) candidate.role = t
if("ooc") if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message t = stripped_multiline_input(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments, MAX_MESSAGE_LEN)
if(t) if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN) candidate.comments = t
if("save") if("save")
candidate.savefile_save(usr) candidate.savefile_save(usr)
if("load") if("load")
candidate.savefile_load(usr) candidate.savefile_load(usr)
//In case people have saved unsanitized stuff. //In case people have saved unsanitized stuff.
if(candidate.name) if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN) candidate.name = copytext_char(sanitize(candidate.name),1,MAX_NAME_LEN)
if(candidate.description) if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN) candidate.description = copytext_char(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
if(candidate.role) if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN) candidate.role = copytext_char(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
if(candidate.comments) if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN) candidate.comments = copytext_char(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
if("submit") if("submit")
if(isobserver(usr)) if(isobserver(usr))
@@ -46,6 +46,6 @@ PROCESSING_SUBSYSTEM_DEF(networks)
var/hex = md5(string) var/hex = md5(string)
if(!hex) if(!hex)
return //errored return //errored
. = "[copytext(hex, 1, 9)]" //16 ^ 8 possibilities I think. . = "[copytext_char(hex, 1, 9)]" //16 ^ 8 possibilities I think.
if(interfaces_by_id[.]) if(interfaces_by_id[.])
return resolve_collisions? make_address("[num2text(rand(HID_RESTRICTED_END, 999999999), 12)]"):null return resolve_collisions? make_address("[num2text(rand(HID_RESTRICTED_END, 999999999), 12)]"):null
+1 -1
View File
@@ -153,7 +153,7 @@
to_chat(src, compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)) to_chat(src, compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source))
/mob/camera/imaginary_friend/proc/friend_talk(message) /mob/camera/imaginary_friend/proc/friend_talk(message)
message = capitalize(trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))) message = capitalize(trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)))
if(!message) if(!message)
return return
+11 -9
View File
@@ -199,13 +199,16 @@
var/list/new_message = list() var/list/new_message = list()
for(var/word in message_split) for(var/word in message_split)
var/suffix = copytext(word,-1) var/suffix = ""
var/suffix_foundon = 0
for(var/potential_suffix in list("." , "," , ";" , "!" , ":" , "?"))
suffix_foundon = findtext(word, potential_suffix, -length(potential_suffix))
if(suffix_foundon)
suffix = potential_suffix
break
// Check if we have a suffix and break it out of the word if(suffix_foundon)
if(suffix in list("." , "," , ";" , "!" , ":" , "?")) word = copytext(word, 1, suffix_foundon)
word = copytext(word,1,-1)
else
suffix = ""
word = html_decode(word) word = html_decode(word)
@@ -216,10 +219,9 @@
new_message += pick("uh","erm") new_message += pick("uh","erm")
break break
else else
var/list/charlist = string2charlist(word) // Stupid shit code var/list/charlist = text2charlist(word)
shuffle_inplace(charlist) shuffle_inplace(charlist)
charlist.len = round(charlist.len * 0.5,1) new_message += jointext(charlist, "") + suffix
new_message += html_encode(jointext(charlist,"")) + suffix
message = jointext(new_message, " ") message = jointext(new_message, " ")
@@ -1,4 +1,17 @@
/datum/personal_crafting /datum/component/personal_crafting/Initialize()
if(!ismob(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, .proc/create_mob_button)
/datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL)
var/datum/hud/H = user.hud_used
var/obj/screen/craft/C = new()
C.icon = H.ui_style
H.static_inventory += C
CL.screen += C
RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact)
/datum/component/personal_crafting
var/busy var/busy
var/viewing_category = 1 //typical powergamer starting on the Weapons tab var/viewing_category = 1 //typical powergamer starting on the Weapons tab
var/viewing_subcategory = 1 var/viewing_subcategory = 1
@@ -38,9 +51,6 @@
var/display_craftable_only = FALSE var/display_craftable_only = FALSE
var/display_compact = TRUE var/display_compact = TRUE
/* This is what procs do: /* This is what procs do:
get_environment - gets a list of things accessable for crafting by user get_environment - gets a list of things accessable for crafting by user
get_surroundings - takes a list of things and makes a list of key-types to values-amounts of said type in the list get_surroundings - takes a list of things and makes a list of key-types to values-amounts of said type in the list
@@ -50,16 +60,15 @@
del_reqs - takes recipe and a user, loops over the recipes reqs var and tries to find everything in the list make by get_environment and delete it/add to parts list, then returns the said list del_reqs - takes recipe and a user, loops over the recipes reqs var and tries to find everything in the list make by get_environment and delete it/add to parts list, then returns the said list
*/ */
/datum/component/personal_crafting/proc/check_contents(datum/crafting_recipe/R, list/contents)
/datum/personal_crafting/proc/check_contents(datum/crafting_recipe/R, list/contents)
contents = contents["other"] contents = contents["other"]
main_loop: main_loop:
for(var/A in R.reqs) for(var/A in R.reqs)
var/needed_amount = R.reqs[A] var/needed_amount = R.reqs[A]
for(var/B in contents) for(var/B in contents)
if(ispath(B, A)) if(ispath(B, A))
if (R.blacklist.Find(B))
continue
if(contents[B] >= R.reqs[A]) if(contents[B] >= R.reqs[A])
continue main_loop continue main_loop
else else
@@ -74,7 +83,7 @@
return 0 return 0
return 1 return 1
/datum/personal_crafting/proc/get_environment(mob/user) /datum/component/personal_crafting/proc/get_environment(mob/user)
. = list() . = list()
for(var/obj/item/I in user.held_items) for(var/obj/item/I in user.held_items)
. += I . += I
@@ -89,8 +98,10 @@
if(AM.flags_1 & HOLOGRAM_1) if(AM.flags_1 & HOLOGRAM_1)
continue continue
. += AM . += AM
for(var/slot in list(SLOT_R_STORE, SLOT_L_STORE))
. += user.get_item_by_slot(slot)
/datum/personal_crafting/proc/get_surroundings(mob/user) /datum/component/personal_crafting/proc/get_surroundings(mob/user)
. = list() . = list()
.["tool_behaviour"] = list() .["tool_behaviour"] = list()
.["other"] = list() .["other"] = list()
@@ -111,7 +122,7 @@
.["other"][A.type] += A.volume .["other"][A.type] += A.volume
.["other"][I.type] += 1 .["other"][I.type] += 1
/datum/personal_crafting/proc/check_tools(mob/user, datum/crafting_recipe/R, list/contents) /datum/component/personal_crafting/proc/check_tools(mob/user, datum/crafting_recipe/R, list/contents)
if(!R.tools.len) if(!R.tools.len)
return TRUE return TRUE
var/list/possible_tools = list() var/list/possible_tools = list()
@@ -142,7 +153,7 @@
return FALSE return FALSE
return TRUE return TRUE
/datum/personal_crafting/proc/construct_item(mob/user, datum/crafting_recipe/R) /datum/component/personal_crafting/proc/construct_item(mob/user, datum/crafting_recipe/R)
var/list/contents = get_surroundings(user) var/list/contents = get_surroundings(user)
var/send_feedback = 1 var/send_feedback = 1
if(check_contents(R, contents)) if(check_contents(R, contents))
@@ -156,9 +167,11 @@
var/list/parts = del_reqs(R, user) var/list/parts = del_reqs(R, user)
var/atom/movable/I = new R.result (get_turf(user.loc)) var/atom/movable/I = new R.result (get_turf(user.loc))
I.CheckParts(parts, R) I.CheckParts(parts, R)
if(isitem(I))
user.put_in_hands(I)
if(send_feedback) if(send_feedback)
SSblackbox.record_feedback("tally", "object_crafted", 1, I.type) SSblackbox.record_feedback("tally", "object_crafted", 1, I.type)
log_craft("[I] crafted by [user] at [loc_name(I.loc)]") log_craft("[I] crafted by [user] at [loc_name(I.loc)]")
return 0 return 0
return "." return "."
return ", missing tool." return ", missing tool."
@@ -189,7 +202,7 @@
del_reqs return the list of parts resulting object will receive as argument of CheckParts proc, on the atom level it will add them all to the contents, on all other levels it calls ..() and does whatever is needed afterwards but from contents list already del_reqs return the list of parts resulting object will receive as argument of CheckParts proc, on the atom level it will add them all to the contents, on all other levels it calls ..() and does whatever is needed afterwards but from contents list already
*/ */
/datum/personal_crafting/proc/del_reqs(datum/crafting_recipe/R, mob/user) /datum/component/personal_crafting/proc/del_reqs(datum/crafting_recipe/R, mob/user)
var/list/surroundings var/list/surroundings
var/list/Deletion = list() var/list/Deletion = list()
. = list() . = list()
@@ -287,15 +300,18 @@
Deletion.Cut(Deletion.len) Deletion.Cut(Deletion.len)
qdel(DL) qdel(DL)
/datum/component/personal_crafting/proc/component_ui_interact(obj/screen/craft/image, location, control, params, user)
if(user == parent)
ui_interact(user)
/datum/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) /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) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui) if(!ui)
ui = new(user, src, ui_key, "personal_crafting", "Crafting Menu", 700, 800, master_ui, state) ui = new(user, src, ui_key, "personal_crafting", "Crafting Menu", 700, 800, master_ui, state)
ui.open() ui.open()
/datum/personal_crafting/ui_data(mob/user) /datum/component/personal_crafting/ui_data(mob/user)
var/list/data = list() var/list/data = list()
var/list/subs = list() var/list/subs = list()
var/cur_subcategory = CAT_NONE var/cur_subcategory = CAT_NONE
@@ -331,21 +347,20 @@
return data return data
/datum/personal_crafting/ui_act(action, params) /datum/component/personal_crafting/ui_act(action, params)
if(..()) if(..())
return return
switch(action) switch(action)
if("make") if("make")
var/datum/crafting_recipe/TR = locate(params["recipe"]) var/datum/crafting_recipe/TR = locate(params["recipe"]) in GLOB.crafting_recipes
busy = TRUE busy = TRUE
ui_interact(usr) //explicit call to show the busy display ui_interact(usr)
var/fail_msg = construct_item(usr, TR) var/fail_msg = construct_item(usr, TR)
if(!fail_msg) if(!fail_msg)
to_chat(usr, "<span class='notice'>[TR.name] constructed.</span>") to_chat(usr, "<span class='notice'>[TR.name] constructed.</span>")
else else
to_chat(usr, "<span class='warning'>Construction failed[fail_msg]</span>") to_chat(usr, "<span class='warning'>Construction failed[fail_msg]</span>")
busy = FALSE busy = FALSE
ui_interact(usr)
if("forwardCat") //Meow if("forwardCat") //Meow
viewing_category = next_cat(FALSE) viewing_category = next_cat(FALSE)
. = TRUE . = TRUE
@@ -365,21 +380,20 @@
display_compact = !display_compact display_compact = !display_compact
. = TRUE . = TRUE
//Next works nicely with modular arithmetic //Next works nicely with modular arithmetic
/datum/personal_crafting/proc/next_cat(readonly = TRUE) /datum/component/personal_crafting/proc/next_cat(readonly = TRUE)
if (!readonly) if (!readonly)
viewing_subcategory = 1 viewing_subcategory = 1
. = viewing_category % categories.len + 1 . = viewing_category % categories.len + 1
/datum/personal_crafting/proc/next_subcat() /datum/component/personal_crafting/proc/next_subcat()
if(islist(subcategories[viewing_category])) if(islist(subcategories[viewing_category]))
var/list/subs = subcategories[viewing_category] var/list/subs = subcategories[viewing_category]
. = viewing_subcategory % subs.len + 1 . = viewing_subcategory % subs.len + 1
//Previous can go fuck itself //Previous can go fuck itself
/datum/personal_crafting/proc/prev_cat(readonly = TRUE) /datum/component/personal_crafting/proc/prev_cat(readonly = TRUE)
if (!readonly) if (!readonly)
viewing_subcategory = 1 viewing_subcategory = 1
if(viewing_category == categories.len) if(viewing_category == categories.len)
@@ -389,7 +403,7 @@
if(. <= 0) if(. <= 0)
. = categories.len . = categories.len
/datum/personal_crafting/proc/prev_subcat() /datum/component/personal_crafting/proc/prev_subcat()
if(islist(subcategories[viewing_category])) if(islist(subcategories[viewing_category]))
var/list/subs = subcategories[viewing_category] var/list/subs = subcategories[viewing_category]
if(viewing_subcategory == subs.len) if(viewing_subcategory == subs.len)
@@ -402,7 +416,7 @@
. = null . = null
/datum/personal_crafting/proc/build_recipe_data(datum/crafting_recipe/R) /datum/component/personal_crafting/proc/build_recipe_data(datum/crafting_recipe/R)
var/list/data = list() var/list/data = list()
data["name"] = R.name data["name"] = R.name
data["ref"] = "[REF(R)]" data["ref"] = "[REF(R)]"
@@ -441,3 +455,4 @@
if(!learned_recipes) if(!learned_recipes)
learned_recipes = list() learned_recipes = list()
learned_recipes |= R learned_recipes |= R
@@ -0,0 +1,25 @@
/datum/crafting_recipe
var/name = "" //in-game display name
var/list/reqs = list() //type paths of items consumed associated with how many are needed
var/list/blacklist = list() //type paths of items explicitly not allowed as an ingredient
var/result //type path of item resulting from this craft
var/list/tools = list() //type paths of items needed but not consumed
var/time = 30 //time in deciseconds
var/list/parts = list() //type paths of items that will be placed in the result
var/list/chem_catalysts = list() //like tools but for reagents
var/category = CAT_NONE //where it shows up in the crafting UI
var/subcategory = CAT_NONE
var/always_availible = TRUE //Set to FALSE if it needs to be learned first.
/datum/crafting_recipe/New()
if(!(result in reqs))
blacklist += result
/**
* Run custom pre-craft checks for this recipe
*
* user: The /mob that initiated the crafting
* collected_requirements: A list of lists of /obj/item instances that satisfy reqs. Top level list is keyed by requirement path.
*/
/datum/crafting_recipe/proc/check_requirements(mob/user, list/collected_requirements)
return TRUE
@@ -18,6 +18,10 @@
category = CAT_WEAPONRY category = CAT_WEAPONRY
subcategory = CAT_WEAPON subcategory = CAT_WEAPON
/datum/crafting_recipe/strobeshield/New()
..()
blacklist |= subtypesof(/obj/item/shield/riot/)
/datum/crafting_recipe/makeshiftshield /datum/crafting_recipe/makeshiftshield
name = "Makeshift Metal Shield" name = "Makeshift Metal Shield"
result = /obj/item/shield/makeshift result = /obj/item/shield/makeshift
+3 -2
View File
@@ -9,7 +9,8 @@
callback = _callback callback = _callback
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip) RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip)
/datum/component/slippery/proc/Slip(datum/source, atom/movable/AM) /datum/component/slippery/proc/Slip(datum/source, atom/movable/AM, extra_flags = NONE)
var/mob/victim = AM var/mob/victim = AM
if(istype(victim) && !victim.is_flying() && victim.slip(intensity, parent, lube_flags) && callback) var/lube = lube_flags | extra_flags
if(istype(victim) && victim.slip(intensity, parent, lube) && callback)
callback.Invoke(victim) callback.Invoke(victim)
@@ -22,7 +22,7 @@ Bonus
stealth = -3 stealth = -3
resistance = -2 resistance = -2
stage_speed = -2 stage_speed = -2
transmittable = -4 transmittable = -2
level = 3 level = 3
severity = 3 severity = 3
base_message_chance = 15 base_message_chance = 15
@@ -19,9 +19,9 @@ Bonus
name = "Spontaneous Combustion" name = "Spontaneous Combustion"
desc = "The virus turns fat into an extremely flammable compound, and raises the body's temperature, making the host burst into flames spontaneously." desc = "The virus turns fat into an extremely flammable compound, and raises the body's temperature, making the host burst into flames spontaneously."
stealth = 1 stealth = -1
resistance = -4 resistance = -4
stage_speed = -4 stage_speed = -3
transmittable = -4 transmittable = -4
level = 6 level = 6
severity = 5 severity = 5
@@ -22,7 +22,7 @@ Bonus
stealth = -3 stealth = -3
resistance = -4 resistance = -4
stage_speed = 0 stage_speed = 0
transmittable = -4 transmittable = -3
level = 6 level = 6
severity = 5 severity = 5
base_message_chance = 50 base_message_chance = 50
@@ -18,7 +18,7 @@ Bonus
/datum/symptom/hallucigen /datum/symptom/hallucigen
name = "Hallucigen" name = "Hallucigen"
desc = "The virus stimulates the brain, causing occasional hallucinations." desc = "The virus stimulates the brain, causing occasional hallucinations."
stealth = -2 stealth = -1
resistance = -3 resistance = -3
stage_speed = -3 stage_speed = -3
transmittable = -1 transmittable = -1
@@ -18,7 +18,7 @@ Bonus
stealth = -1 stealth = -1
resistance = -2 resistance = -2
stage_speed = -3 stage_speed = -3
transmittable = -4 transmittable = 0
level = 6 level = 6
symptom_delay_min = 15 symptom_delay_min = 15
symptom_delay_max = 80 symptom_delay_max = 80
@@ -20,7 +20,7 @@ Bonus
desc = "The virus inhibits the body's thermoregulation, cooling the body down." desc = "The virus inhibits the body's thermoregulation, cooling the body down."
stealth = 0 stealth = 0
resistance = 2 resistance = 2
stage_speed = 2 stage_speed = 3
transmittable = 2 transmittable = 2
level = 2 level = 2
severity = 2 severity = 2
@@ -26,7 +26,7 @@ BONUS
////////////////////////////////////// //////////////////////////////////////
Viral evolution Viral evolution
Moderate stealth reductopn. Moderate stealth reduction.
Major decreases to resistance. Major decreases to resistance.
increases stage speed. increases stage speed.
increase to transmission increase to transmission
@@ -25,8 +25,8 @@ Bonus
desc = "The virus causes nausea and irritates the stomach, causing occasional vomit." desc = "The virus causes nausea and irritates the stomach, causing occasional vomit."
stealth = -2 stealth = -2
resistance = -1 resistance = -1
stage_speed = 0 stage_speed = -1
transmittable = 1 transmittable = 2
level = 3 level = 3
severity = 3 severity = 3
base_message_chance = 100 base_message_chance = 100
+3 -3
View File
@@ -370,14 +370,14 @@
/////////////////////////// DNA HELPER-PROCS ////////////////////////////// /////////////////////////// DNA HELPER-PROCS //////////////////////////////
/proc/getleftblocks(input,blocknumber,blocksize) /proc/getleftblocks(input,blocknumber,blocksize)
if(blocknumber > 1) if(blocknumber > 1)
return copytext(input,1,((blocksize*blocknumber)-(blocksize-1))) return copytext_char(input,1,((blocksize*blocknumber)-(blocksize-1)))
/proc/getrightblocks(input,blocknumber,blocksize) /proc/getrightblocks(input,blocknumber,blocksize)
if(blocknumber < (length(input)/blocksize)) if(blocknumber < (length(input)/blocksize))
return copytext(input,blocksize*blocknumber+1,length(input)+1) return copytext_char(input,blocksize*blocknumber+1,length(input)+1)
/proc/getblock(input, blocknumber, blocksize=DNA_BLOCK_SIZE) /proc/getblock(input, blocknumber, blocksize=DNA_BLOCK_SIZE)
return copytext(input, blocksize*(blocknumber-1)+1, (blocksize*blocknumber)+1) return copytext_char(input, blocksize*(blocknumber-1)+1, (blocksize*blocknumber)+1)
/proc/setblock(istring, blocknumber, replacement, blocksize=DNA_BLOCK_SIZE) /proc/setblock(istring, blocknumber, replacement, blocksize=DNA_BLOCK_SIZE)
if(!istring || !blocknumber || !replacement || !blocksize) if(!istring || !blocknumber || !replacement || !blocksize)
+1
View File
@@ -18,6 +18,7 @@
var/list/mob_type_ignore_stat_typecache var/list/mob_type_ignore_stat_typecache
var/stat_allowed = CONSCIOUS var/stat_allowed = CONSCIOUS
var/static/list/emote_list = list() var/static/list/emote_list = list()
var/static/regex/stop_bad_mime = regex(@"says|exclaims|yells|asks")
/datum/emote/New() /datum/emote/New()
if(key_third_person) if(key_third_person)
+1 -1
View File
@@ -43,7 +43,7 @@
for(var/line in testmerge) for(var/line in testmerge)
var/datum/tgs_revision_information/test_merge/tm = line var/datum/tgs_revision_information/test_merge/tm = line
var/cm = tm.pull_request_commit var/cm = tm.pull_request_commit
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext(cm, 1, min(length(cm), 11))) var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder)) if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
continue continue
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a><br>" . += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a><br>"
+2 -2
View File
@@ -257,8 +257,8 @@
var/splitpoint = findtext(prepared_line," ") var/splitpoint = findtext(prepared_line," ")
if(!splitpoint) if(!splitpoint)
continue continue
var/command = copytext(prepared_line,1,splitpoint) var/command = copytext(prepared_line, 1, splitpoint)
var/value = copytext(prepared_line,splitpoint+1) var/value = copytext(prepared_line, splitpoint + length(prepared_line[splitpoint]))
switch(command) switch(command)
if("DELAY") if("DELAY")
var/delay_value = text2num(value) var/delay_value = text2num(value)
+1 -1
View File
@@ -31,7 +31,7 @@
reset_streak(D) reset_streak(D)
streak = streak+element streak = streak+element
if(length(streak) > max_streak_length) if(length(streak) > max_streak_length)
streak = copytext(streak,2) streak = copytext(streak, 1 + length(streak[1]))
return return
/datum/martial_art/proc/reset_streak(mob/living/carbon/human/new_target) /datum/martial_art/proc/reset_streak(mob/living/carbon/human/new_target)
+7 -1
View File
@@ -50,6 +50,12 @@
D.forcesay(GLOB.hit_appends) D.forcesay(GLOB.hit_appends)
return 1 return 1
/datum/martial_art/boxing/teach(mob/living/carbon/human/H, make_temporary = TRUE)
. = ..()
if(.)
if(H.pulling && ismob(H.pulling))
H.stop_pulling()
/obj/item/clothing/gloves/boxing /obj/item/clothing/gloves/boxing
var/datum/martial_art/boxing/style = new var/datum/martial_art/boxing/style = new
@@ -58,7 +64,7 @@
return return
if(slot == SLOT_GLOVES) if(slot == SLOT_GLOVES)
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
style.teach(H,1) style.teach(H,TRUE)
return return
/obj/item/clothing/gloves/boxing/dropped(mob/user) /obj/item/clothing/gloves/boxing/dropped(mob/user)
+2 -2
View File
@@ -139,7 +139,7 @@
SEND_SIGNAL(new_character, COMSIG_MOB_ON_NEW_MIND) SEND_SIGNAL(new_character, COMSIG_MOB_ON_NEW_MIND)
/datum/mind/proc/store_memory(new_text) /datum/mind/proc/store_memory(new_text)
if((length(memory) + length(new_text)) <= MAX_MESSAGE_LEN) if((length_char(memory) + length_char(new_text)) <= MAX_MESSAGE_LEN)
memory += "[new_text]<BR>" memory += "[new_text]<BR>"
/datum/mind/proc/wipe_memory() /datum/mind/proc/wipe_memory()
@@ -409,7 +409,7 @@
assigned_role = new_role assigned_role = new_role
else if (href_list["memory_edit"]) else if (href_list["memory_edit"])
var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN) var/new_memo = stripped_multiline_input(usr, "Write new memory", "Memory", memory, MAX_MESSAGE_LEN)
if (isnull(new_memo)) if (isnull(new_memo))
return return
memory = new_memo memory = new_memo
+2 -2
View File
@@ -32,9 +32,9 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/proc/set_se(se_string, on = 1) /datum/mutation/human/proc/set_se(se_string, on = 1)
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE) if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
return return
var/before = copytext(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1) var/before = copytext_char(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE) var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
var/after = copytext(se_string, (dna_block * DNA_BLOCK_SIZE) + 1, 0) var/after = copytext_char(se_string, (dna_block * DNA_BLOCK_SIZE) + 1, 0)
return before + injection + after return before + injection + after
/datum/mutation/human/proc/set_block(mob/living/carbon/owner, on = 1) /datum/mutation/human/proc/set_block(mob/living/carbon/owner, on = 1)
+20
View File
@@ -35,6 +35,26 @@
suffix = "Box/Engine/engine_tesla.dmm" suffix = "Box/Engine/engine_tesla.dmm"
name = "Box Tesla" name = "Box Tesla"
/datum/map_template/ruin/station/box/engine/teg
id = "engine_teg"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Box TEG"
/datum/map_template/ruin/station/box/engine/empty
id = "engine_empty"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Box Empty"
/datum/map_template/ruin/station/box/engine/am
id = "engine_am"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Box Antimatter"
/datum/map_template/ruin/station/box/engine/budget
id = "engine_budget"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Box P.A.C.M.A.N"
// Lavaland // Lavaland
// Mining Base // Mining Base
/datum/map_template/ruin/station/lavaland/mining_base /datum/map_template/ruin/station/lavaland/mining_base
+2 -2
View File
@@ -88,8 +88,8 @@
var/list/entry = list() var/list/entry = list()
entry["parent"] = "[type]" entry["parent"] = "[type]"
entry["name"] = verbpath.desc entry["name"] = verbpath.desc
if (copytext(verbpath.name,1,2) == "@") if (verbpath.name[1] == "@")
entry["command"] = copytext(verbpath.name,2) entry["command"] = copytext(verbpath.name, length(verbpath.name[1]) + 1)
else else
entry["command"] = replacetext(verbpath.name, " ", "-") entry["command"] = replacetext(verbpath.name, " ", "-")
+1 -1
View File
@@ -118,7 +118,7 @@
return TRUE return TRUE
/datum/wires/proc/is_dud(wire) /datum/wires/proc/is_dud(wire)
return dd_hasprefix(wire, WIRE_DUD_PREFIX) return findtext(wire, WIRE_DUD_PREFIX)
/datum/wires/proc/is_dud_color(color) /datum/wires/proc/is_dud_color(color)
return is_dud(get_wire(color)) return is_dud(get_wire(color))
+9 -11
View File
@@ -57,10 +57,8 @@
/obj/item/melee/transforming/energy/sword/bananium /obj/item/melee/transforming/energy/sword/bananium
name = "bananium sword" name = "bananium sword"
desc = "An elegant weapon, for a more civilized age." desc = "An elegant weapon, for a more civilized age."
force = 0 force_on = 15
throwforce = 0 throwforce_on = 15
force_on = 0
throwforce_on = 0
hitsound = null hitsound = null
attack_verb_on = list("slipped") attack_verb_on = list("slipped")
clumsy_check = FALSE clumsy_check = FALSE
@@ -72,7 +70,7 @@
/obj/item/melee/transforming/energy/sword/bananium/Initialize() /obj/item/melee/transforming/energy/sword/bananium/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) AddComponent(/datum/component/slippery, 81, GALOSHES_DONT_HELP)
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.signal_enabled = active slipper.signal_enabled = active
@@ -80,13 +78,13 @@
..() ..()
if(active) if(active)
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(M) slipper.Slip(src, M, FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
/obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum) /obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
. = ..() . = ..()
if(active) if(active)
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(hit_atom) slipper.Slip(src, hit_atom, FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
/obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params) /obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params)
if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/transforming/energy/sword/bananium)) if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/transforming/energy/sword/bananium))
@@ -109,7 +107,7 @@
transform_weapon(user, TRUE) transform_weapon(user, TRUE)
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!</span>") user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!</span>")
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(user) slipper.Slip(src, user, FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
return SHAME return SHAME
//BANANIUM SHIELD //BANANIUM SHIELD
@@ -129,7 +127,7 @@
/obj/item/shield/energy/bananium/Initialize() /obj/item/shield/energy/bananium/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) AddComponent(/datum/component/slippery, 81, GALOSHES_DONT_HELP)
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.signal_enabled = active slipper.signal_enabled = active
@@ -150,7 +148,7 @@
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum) var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(hit_atom) slipper.Slip(src, hit_atom, FLYING_DOESNT_HELP|SLIP_WHEN_CRAWLING)
if(thrownby && !caught) if(thrownby && !caught)
throw_at(thrownby, throw_range+2, throw_speed, null, 1) throw_at(thrownby, throw_range+2, throw_speed, null, 1)
else else
@@ -212,7 +210,7 @@
M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE) M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
/obj/item/clothing/mask/fakemoustache/sticky /obj/item/clothing/mask/fakemoustache/sticky
var/unstick_time = 600 var/unstick_time = 2 MINUTES
/obj/item/clothing/mask/fakemoustache/sticky/Initialize() /obj/item/clothing/mask/fakemoustache/sticky/Initialize()
. = ..() . = ..()
+1 -1
View File
@@ -482,7 +482,7 @@
R.fields["ckey"] = mob_occupant.ckey R.fields["ckey"] = mob_occupant.ckey
R.fields["name"] = mob_occupant.real_name R.fields["name"] = mob_occupant.real_name
R.fields["id"] = copytext(md5(mob_occupant.real_name), 2, 6) R.fields["id"] = copytext_char(md5(mob_occupant.real_name), 2, 6)
R.fields["UE"] = dna.unique_enzymes R.fields["UE"] = dna.unique_enzymes
R.fields["UI"] = dna.uni_identity R.fields["UI"] = dna.uni_identity
R.fields["SE"] = dna.struc_enzymes R.fields["SE"] = dna.struc_enzymes
@@ -443,7 +443,7 @@
var/dat = "" var/dat = ""
if(SSshuttle.emergency.mode == SHUTTLE_CALL) if(SSshuttle.emergency.mode == SHUTTLE_CALL)
var/timeleft = SSshuttle.emergency.timeLeft() var/timeleft = SSshuttle.emergency.timeLeft()
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]" dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_leading(num2text(timeleft % 60), 2, "0")]"
var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500) var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500)
+25 -17
View File
@@ -274,13 +274,18 @@
var/max_line_len = 7*DNA_BLOCK_SIZE var/max_line_len = 7*DNA_BLOCK_SIZE
if(viable_occupant) if(viable_occupant)
temp_html += "<div class='dnaBlockNumber'>1</div>" temp_html += "<div class='dnaBlockNumber'>1</div>"
var/len = length(viable_occupant.dna.uni_identity) var/char = ""
for(var/i=1, i<=len, i++) var/ui_text = viable_occupant.dna.uni_identity
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[i];'>[copytext(viable_occupant.dna.uni_identity,i,i+1)]</a>" var/len_byte = length(ui_text)
if ((i % max_line_len) == 0) var/char_it = 0
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
char_it++
char = ui_text[byte_it]
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[char_it];'>[char]</a>"
if((char_it % max_line_len) == 0)
temp_html += "</div><div class='clearBoth'>" temp_html += "</div><div class='clearBoth'>"
if((i % DNA_BLOCK_SIZE) == 0 && i < len) if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>" temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
else else
temp_html += "----" temp_html += "----"
temp_html += "</div></div></div><br>" temp_html += "</div></div></div><br>"
@@ -288,13 +293,16 @@
temp_html += "<br><div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><div class='clearBoth'>" temp_html += "<br><div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><div class='clearBoth'>"
if(viable_occupant) if(viable_occupant)
temp_html += "<div class='dnaBlockNumber'>1</div>" temp_html += "<div class='dnaBlockNumber'>1</div>"
var/len = length(viable_occupant.dna.struc_enzymes) var/char = ""
for(var/i=1, i<=len, i++) var/ui_text = viable_occupant.dna.uni_identity
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[i];'>[copytext(viable_occupant.dna.struc_enzymes,i,i+1)]</a>" var/len_byte = length(ui_text)
if ((i % max_line_len) == 0) var/char_it = 0
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[char_it];'>[char]</a>"
if((char_it % max_line_len) == 0)
temp_html += "</div><div class='clearBoth'>" temp_html += "</div><div class='clearBoth'>"
if((i % DNA_BLOCK_SIZE) == 0 && i < len) if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>" temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
else else
temp_html += "----" temp_html += "----"
temp_html += "</div></div></div>" temp_html += "</div></div></div>"
@@ -465,7 +473,7 @@
viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation
switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage
if("pulseui") if("pulseui")
var/len = length(viable_occupant.dna.uni_identity) var/len = length_char(viable_occupant.dna.uni_identity)
num = WRAP(num, 1, len+1) num = WRAP(num, 1, len+1)
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2 num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low //Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
@@ -473,12 +481,12 @@
var/subblock = num - block*DNA_BLOCK_SIZE var/subblock = num - block*DNA_BLOCK_SIZE
last_change = "UI #[block]-[subblock]; " last_change = "UI #[block]-[subblock]; "
var/hex = copytext(viable_occupant.dna.uni_identity, num, num+1) var/hex = copytext_char(viable_occupant.dna.uni_identity, num, num+1)
last_change += "[hex]" last_change += "[hex]"
hex = scramble(hex, radstrength, radduration) hex = scramble(hex, radstrength, radduration)
last_change += "->[hex]" last_change += "->[hex]"
viable_occupant.dna.uni_identity = copytext(viable_occupant.dna.uni_identity, 1, num) + hex + copytext(viable_occupant.dna.uni_identity, num+1, 0) viable_occupant.dna.uni_identity = copytext_char(viable_occupant.dna.uni_identity, 1, num) + hex + copytext_char(viable_occupant.dna.uni_identity, num + 1)
viable_occupant.updateappearance(mutations_overlay_update=1) viable_occupant.updateappearance(mutations_overlay_update=1)
if("pulsese") if("pulsese")
var/len = length(viable_occupant.dna.struc_enzymes) var/len = length(viable_occupant.dna.struc_enzymes)
@@ -489,12 +497,12 @@
var/subblock = num - block*DNA_BLOCK_SIZE var/subblock = num - block*DNA_BLOCK_SIZE
last_change = "SE #[block]-[subblock]; " last_change = "SE #[block]-[subblock]; "
var/hex = copytext(viable_occupant.dna.struc_enzymes, num, num+1) var/hex = copytext_char(viable_occupant.dna.struc_enzymes, num, num+1)
last_change += "[hex]" last_change += "[hex]"
hex = scramble(hex, radstrength, radduration) hex = scramble(hex, radstrength, radduration)
last_change += "->[hex]" last_change += "->[hex]"
viable_occupant.dna.struc_enzymes = copytext(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext(viable_occupant.dna.struc_enzymes, num+1, 0) viable_occupant.dna.struc_enzymes = copytext_char(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext_char(viable_occupant.dna.struc_enzymes, num + 1)
viable_occupant.domutcheck() viable_occupant.domutcheck()
else else
current_screen = "mainmenu" current_screen = "mainmenu"
@@ -125,7 +125,7 @@
to_chat(usr, "<span class='danger'>Unauthorized access.</span>") to_chat(usr, "<span class='danger'>Unauthorized access.</span>")
else if(href_list["warn"]) else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN) var/warning = stripped_input(usr, "Message:", "Enter your message here!", "", MAX_MESSAGE_LEN)
if(!warning) if(!warning)
return return
var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants var/obj/item/implant/I = locate(href_list["warn"]) in GLOB.tracked_implants
+1 -1
View File
@@ -544,7 +544,7 @@ What a mess.*/
switch(href_list["field"]) switch(href_list["field"])
if("name") if("name")
if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record)) if(istype(active1, /datum/data/record) || istype(active2, /datum/data/record))
var/t1 = copytext(sanitize(input("Please input name:", "Secure. records", active1.fields["name"], null) as text),1,MAX_MESSAGE_LEN) var/t1 = stripped_input(usr, "Please input name:", "Secure. records", active1.fields["name"], MAX_MESSAGE_LEN)
if(!canUseSecurityRecordsConsole(usr, t1, a1)) if(!canUseSecurityRecordsConsole(usr, t1, a1))
return return
if(istype(active1, /datum/data/record)) if(istype(active1, /datum/data/record))
+1 -1
View File
@@ -168,7 +168,7 @@
if(timing) if(timing)
var/disp1 = id var/disp1 = id
var/time_left = time_left(seconds = TRUE) var/time_left = time_left(seconds = TRUE)
var/disp2 = "[add_zero(num2text((time_left / 60) % 60),2)]~[add_zero(num2text(time_left % 60), 2)]" var/disp2 = "[add_leading(num2text((time_left / 60) % 60), 2, "0")]:[add_leading(num2text(time_left % 60), 2, "0")]"
if(length(disp2) > CHARS_PER_LINE) if(length(disp2) > CHARS_PER_LINE)
disp2 = "Error" disp2 = "Error"
update_display(disp1, disp2) update_display(disp1, disp2)
+13 -7
View File
@@ -306,7 +306,7 @@
if(speed <= 0) if(speed <= 0)
speed = 1 speed = 1
if("setpath") if("setpath")
var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN) var/newpath = stripped_input(usr, "Please define a new path!", "New Path", path, MAX_MESSAGE_LEN)
if(newpath && newpath != "") if(newpath && newpath != "")
moving = 0 // stop moving moving = 0 // stop moving
path = newpath path = newpath
@@ -368,13 +368,19 @@
// Generates the rpath variable using the path string, think of this as "string2list" // Generates the rpath variable using the path string, think of this as "string2list"
// Doesn't use params2list() because of the akward way it stacks entities // Doesn't use params2list() because of the akward way it stacks entities
rpath = list() // clear rpath rpath = list() // clear rpath
var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length var/maximum_characters = 50
for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path var/lentext = length(path)
var/nextchar = ""
var/charcount = 0
var/nextchar = copytext(path, i, i+1) // find next character for(var/i = 1, i <= lentext, i += length(nextchar)) // iterates through all characters in path
nextchar = path[i] // find next character
if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
rpath += copytext(path, i, i+1) // else, add to list
if(nextchar in list(";", "&", "*", " ")) // if char is a separator, ignore
continue
rpath += nextchar // else, add to list
// there doesn't HAVE to be separators but it makes paths syntatically visible // there doesn't HAVE to be separators but it makes paths syntatically visible
charcount++
if(charcount >= maximum_characters)
break
+2 -2
View File
@@ -62,7 +62,7 @@
var/index = findtext(e, "=") // format is "key=value" var/index = findtext(e, "=") // format is "key=value"
if(index) if(index)
var/key = copytext(e, 1, index) var/key = copytext(e, 1, index)
var/val = copytext(e, index+1) var/val = copytext(e, index + length(e[index]))
codes[key] = val codes[key] = val
else else
codes[e] = "1" codes[e] = "1"
@@ -167,7 +167,7 @@ Transponder Codes:<UL>"}
usr.set_machine(src) usr.set_machine(src)
if(href_list["locedit"]) if(href_list["locedit"])
var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN) var/newloc = stripped_input(usr, "Enter New Location", "Navigation Beacon", location, MAX_MESSAGE_LEN)
if(newloc) if(newloc)
location = newloc location = newloc
updateDialog() updateDialog()
+2 -4
View File
@@ -162,7 +162,7 @@ GLOBAL_LIST_EMPTY(allCasters)
NEWSCASTER.update_icon() NEWSCASTER.update_icon()
/datum/newscaster/feed_network/proc/save_photo(icon/photo) /datum/newscaster/feed_network/proc/save_photo(icon/photo)
var/photo_file = copytext(md5("\icon[photo]"), 1, 6) var/photo_file = copytext_char(md5("\icon[photo]"), 1, 6)
if(!fexists("[GLOB.log_directory]/photos/[photo_file].png")) if(!fexists("[GLOB.log_directory]/photos/[photo_file].png"))
//Clean up repeated frames //Clean up repeated frames
var/icon/clean = new /icon() var/icon/clean = new /icon()
@@ -514,8 +514,6 @@ GLOBAL_LIST_EMPTY(allCasters)
scan_user(usr) scan_user(usr)
if(href_list["set_channel_name"]) if(href_list["set_channel_name"])
channel_name = stripped_input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "", MAX_NAME_LEN) channel_name = stripped_input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "", MAX_NAME_LEN)
while (findtext(channel_name," ") == 1)
channel_name = copytext(channel_name,2,length(channel_name)+1)
updateUsrDialog() updateUsrDialog()
else if(href_list["set_channel_lock"]) else if(href_list["set_channel_lock"])
c_locked = !c_locked c_locked = !c_locked
@@ -690,7 +688,7 @@ GLOBAL_LIST_EMPTY(allCasters)
updateUsrDialog() updateUsrDialog()
else if(href_list["new_comment"]) else if(href_list["new_comment"])
var/datum/newscaster/feed_message/FM = locate(href_list["new_comment"]) var/datum/newscaster/feed_message/FM = locate(href_list["new_comment"])
var/cominput = copytext(stripped_input(usr, "Write your message:", "New comment", null),1,141) var/cominput = copytext_char(stripped_input(usr, "Write your message:", "New comment", null), 140)
if(cominput) if(cominput)
scan_user(usr) scan_user(usr)
var/datum/newscaster/feed_comment/FC = new/datum/newscaster/feed_comment var/datum/newscaster/feed_comment/FC = new/datum/newscaster/feed_comment
+6 -8
View File
@@ -263,10 +263,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
usr.set_machine(src) usr.set_machine(src)
add_fingerprint(usr) add_fingerprint(usr)
if(reject_bad_text(href_list["write"])) if(href_list["write"])
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name dpt = ckey(reject_bad_text(href_list["write"])) //write contains the string of the receiving department's name
var/new_message = stripped_input(usr, "Write your message:", "Awaiting Input", "", MAX_MESSAGE_LEN)
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
if(new_message) if(new_message)
message = new_message message = new_message
screen = 9 screen = 9
@@ -282,7 +281,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
priority = -1 priority = -1
if(href_list["writeAnnouncement"]) if(href_list["writeAnnouncement"])
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN) var/new_message = reject_bad_text(stripped_input(usr, "Write your message:", "Awaiting Input", "", MAX_MESSAGE_LEN))
if(new_message) if(new_message)
message = new_message message = new_message
if (text2num(href_list["priority"]) < 2) if (text2num(href_list["priority"]) < 2)
@@ -438,9 +437,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
return return
/obj/machinery/requests_console/say_mod(input, message_mode) /obj/machinery/requests_console/say_mod(input, message_mode)
var/ending = copytext(input, length(input) - 2) if(spantext_char(input, "!", -3))
if (ending == "!!!") return "blares"
. = "blares"
else else
. = ..() . = ..()
+12 -12
View File
@@ -15,7 +15,7 @@
#define SD_AI_EMOTE 1 // 1 = AI emoticon #define SD_AI_EMOTE 1 // 1 = AI emoticon
#define SD_AI_BSOD 2 // 2 = Blue screen of death #define SD_AI_BSOD 2 // 2 = Blue screen of death
/// Status display which can show images and scrolling text. /// Status display which can show images and scrolling text. !!!USE /obj/machinery/status_display/evac NOT THIS!!!
/obj/machinery/status_display /obj/machinery/status_display
name = "status display" name = "status display"
desc = null desc = null
@@ -55,14 +55,14 @@
/// Call with no arguments to disable. /// Call with no arguments to disable.
/obj/machinery/status_display/proc/set_message(m1, m2) /obj/machinery/status_display/proc/set_message(m1, m2)
if(m1) if(m1)
index1 = (length(m1) > CHARS_PER_LINE) index1 = (length_char(m1) > CHARS_PER_LINE)
message1 = m1 message1 = m1
else else
message1 = "" message1 = ""
index1 = 0 index1 = 0
if(m2) if(m2)
index2 = (length(m2) > CHARS_PER_LINE) index2 = (length_char(m2) > CHARS_PER_LINE)
message2 = m2 message2 = m2
else else
message2 = "" message2 = ""
@@ -77,19 +77,19 @@
var/line1 = message1 var/line1 = message1
if(index1) if(index1)
line1 = copytext("[message1]|[message1]", index1, index1+CHARS_PER_LINE) line1 = copytext_char("[message1]|[message1]", index1, index1+CHARS_PER_LINE)
var/message1_len = length(message1) var/message1_len = length_char(message1)
index1 += SCROLL_SPEED index1 += SCROLL_SPEED
if(index1 > message1_len) if(index1 > message1_len + 1)
index1 -= message1_len index1 -= (message1_len + 1)
var/line2 = message2 var/line2 = message2
if(index2) if(index2)
line2 = copytext("[message2]|[message2]", index2, index2+CHARS_PER_LINE) line2 = copytext_char("[message2]|[message2]", index2, index2+CHARS_PER_LINE)
var/message2_len = length(message2) var/message2_len = length(message2)
index2 += SCROLL_SPEED index2 += SCROLL_SPEED
if(index2 > message2_len) if(index2 > message2_len + 1)
index2 -= message2_len index2 -= (message2_len + 1)
update_display(line1, line2) update_display(line1, line2)
if (!index1 && !index2) if (!index1 && !index2)
@@ -130,7 +130,7 @@
var/line1 = "-[shuttle.getModeStr()]-" var/line1 = "-[shuttle.getModeStr()]-"
var/line2 = shuttle.getTimerStr() var/line2 = shuttle.getTimerStr()
if(length(line2) > CHARS_PER_LINE) if(length_char(line2) > CHARS_PER_LINE)
line2 = "error" line2 = "error"
update_display(line1, line2) update_display(line1, line2)
else else
@@ -242,7 +242,7 @@
else else
line1 = "CARGO" line1 = "CARGO"
line2 = SSshuttle.supply.getTimerStr() line2 = SSshuttle.supply.getTimerStr()
if(length(line2) > CHARS_PER_LINE) if(length_char(line2) > CHARS_PER_LINE)
line2 = "Error" line2 = "Error"
update_display(line1, line2) update_display(line1, line2)
@@ -132,7 +132,7 @@
set waitfor = FALSE set waitfor = FALSE
// Perform final composition steps on the message. // Perform final composition steps on the message.
var/message = copytext(data["message"], 1, MAX_BROADCAST_LEN) var/message = copytext_char(data["message"], 1, MAX_BROADCAST_LEN)
if(!message) if(!message)
return return
var/compression = data["compression"] var/compression = data["compression"]
@@ -179,7 +179,7 @@
if("id") if("id")
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN) var/newid = reject_bad_text(stripped_input(usr, "Specify the new ID for this machine", src, id, MAX_MESSAGE_LEN))
if(newid && canAccess(usr)) if(newid && canAccess(usr))
id = newid id = newid
temp = "<font color = #666633>-% New ID assigned: \"[id]\" %-</font color>" temp = "<font color = #666633>-% New ID assigned: \"[id]\" %-</font color>"
+1 -1
View File
@@ -416,7 +416,7 @@
return ..() return ..()
/obj/machinery/mecha_part_fabricator/proc/material2name(ID) /obj/machinery/mecha_part_fabricator/proc/material2name(ID)
return copytext(ID,2) return copytext_char(ID,2)
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user) /obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
if(panel_open) if(panel_open)
+5 -5
View File
@@ -294,11 +294,11 @@
onclose(occupant, "exosuit_log") onclose(occupant, "exosuit_log")
if (href_list["change_name"]) if (href_list["change_name"])
var/newname = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN) var/userinput = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN)
if(newname && trim(newname)) if(!userinput || usr != occupant || usr.incapacitated())
name = newname return
else name = userinput
alert(occupant, "nope.avi") return
if (href_list["toggle_id_upload"]) if (href_list["toggle_id_upload"])
add_req_access = !add_req_access add_req_access = !add_req_access
+1 -1
View File
@@ -128,7 +128,7 @@
if (smooth & SMOOTH_DIAGONAL) if (smooth & SMOOTH_DIAGONAL)
for (var/O in overlays) for (var/O in overlays)
var/image/I = O var/image/I = O
if (copytext(I.icon_state, 1, 3) == "d-") if(copytext(I.icon_state, 1, 3) == "d-") //3 == length("d-") + 1
return return
var/stuff_on_wall = 0 var/stuff_on_wall = 0
+21
View File
@@ -273,6 +273,27 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
GLOB.newplayer_start += loc GLOB.newplayer_start += loc
return INITIALIZE_HINT_QDEL return INITIALIZE_HINT_QDEL
/obj/effect/landmark/start/nuclear_equipment
name = "bomb or clown beacon spawner"
var/nukie_path = /obj/item/sbeacondrop/bomb
var/clown_path = /obj/item/sbeacondrop/clownbomb
/obj/effect/landmark/start/nuclear_equipment/after_round_start()
var/npath = nukie_path
if(istype(SSticker.mode, /datum/game_mode/nuclear/clown_ops))
npath = clown_path
else if(istype(SSticker.mode, /datum/game_mode/dynamic))
var/datum/game_mode/dynamic/D = SSticker.mode
if(locate(/datum/dynamic_ruleset/roundstart/nuclear/clown_ops) in D.current_rules)
npath = clown_path
new npath(loc)
return ..()
/obj/effect/landmark/start/nuclear_equipment/minibomb
name = "minibomb or bombanana spawner"
nukie_path = /obj/item/storage/box/minibombs
clown_path = /obj/item/storage/box/bombananas
/obj/effect/landmark/latejoin /obj/effect/landmark/latejoin
name = "JoinLate" name = "JoinLate"
+3 -6
View File
@@ -269,14 +269,11 @@ update_label("John Doe", "Clowny")
if(isliving(user) && user.mind) if(isliving(user) && user.mind)
if(user.mind.special_role || anyone) if(user.mind.special_role || anyone)
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge") if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
var/t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26) var/input_name = reject_bad_name(stripped_input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name), MAX_NAME_LEN), TRUE)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm if(!input_name)
if (t)
alert("Invalid name.")
return return
registered_name = t
var/u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN) var/u = stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant", MAX_MESSAGE_LEN)
if(!u) if(!u)
registered_name = "" registered_name = ""
return return
+1 -1
View File
@@ -407,7 +407,7 @@
to_chat(user, "<span class='notice'>You spray a [temp] on \the [target.name]</span>") to_chat(user, "<span class='notice'>You spray a [temp] on \the [target.name]</span>")
if(length(text_buffer) > 1) if(length(text_buffer) > 1)
text_buffer = copytext(text_buffer,2) text_buffer = copytext(text_buffer, length(text_buffer[1]) + 1)
SStgui.update_uis(src) SStgui.update_uis(src)
if(post_noise) if(post_noise)
+2 -2
View File
@@ -641,13 +641,13 @@ GLOBAL_LIST_EMPTY(PDAs)
if("Clear")//Clears messages if("Clear")//Clears messages
tnote = null tnote = null
if("Ringtone") if("Ringtone")
var/t = input(U, "Please enter new ringtone", name, ttone) as text var/t = stripped_input(U, "Please enter new ringtone", name, ttone, 20)
if(in_range(src, U) && loc == U && t) if(in_range(src, U) && loc == U && t)
if(SEND_SIGNAL(src, COMSIG_PDA_CHANGE_RINGTONE, U, t) & COMPONENT_STOP_RINGTONE_CHANGE) if(SEND_SIGNAL(src, COMSIG_PDA_CHANGE_RINGTONE, U, t) & COMPONENT_STOP_RINGTONE_CHANGE)
U << browse(null, "window=pda") U << browse(null, "window=pda")
return return
else else
ttone = copytext(sanitize(t), 1, 20) ttone = t
else else
U << browse(null, "window=pda") U << browse(null, "window=pda")
return return
+7 -2
View File
@@ -309,9 +309,14 @@ Code:
var/list/S = list(" Off","AOff"," On", " AOn") var/list/S = list(" Off","AOff"," On", " AOn")
var/list/chg = list("N","C","F") var/list/chg = list("N","C","F")
//Neither copytext nor copytext_char is appropriate here; neither 30 UTF-8 code units nor 30 code points equates to 30 columns of output.
//Some glyphs are very tall or very wide while others are small or even take up no space at all.
//Emojis can take modifiers which are many characters but render as only one glyph.
//A proper solution here (as far as Unicode goes, maybe not ideal as far as markup goes, a table would be better)
//would be to use <span style="width: NNNpx; overflow: none;">[A.area.name]</span>
for(var/obj/machinery/power/apc/A in L) for(var/obj/machinery/power/apc/A in L)
menu += copytext(add_tspace(A.area.name, 30), 1, 30) menu += copytext_char(add_trailing(A.area.name, 30, " "), 1, 30)
menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(DisplayPower(A.lastused_total), 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]<BR>" menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_leading(DisplayPower(A.lastused_total), 6, " ")] [A.cell ? "[add_leading(round(A.cell.percent()), 3, " ")]% [chg[A.charging+1]]" : " N/C"]<BR>"
menu += "</FONT></PRE>" menu += "</FONT></PRE>"
+1 -1
View File
@@ -101,7 +101,7 @@
if(href_list["reset_radio_short"]) if(href_list["reset_radio_short"])
pai.unshort_radio() pai.unshort_radio()
if(href_list["setlaws"]) if(href_list["setlaws"])
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1]) as message),1,MAX_MESSAGE_LEN) var/newlaws = stripped_multiline_input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", MAX_MESSAGE_LEN)
if(newlaws && pai) if(newlaws && pai)
pai.add_supplied_law(0,newlaws) pai.add_supplied_law(0,newlaws)
if(href_list["toggle_holo"]) if(href_list["toggle_holo"])
@@ -200,10 +200,10 @@ Code:
/obj/item/electropack/shockcollar/attackby(obj/item/W, mob/user, params) //moves it here because on_click is being bad /obj/item/electropack/shockcollar/attackby(obj/item/W, mob/user, params) //moves it here because on_click is being bad
if(istype(W, /obj/item/pen)) if(istype(W, /obj/item/pen))
var/t = input(user, "Would you like to change the name on the tag?", "Name your new pet", tagname ? tagname : "Spot") as null|text var/t = stripped_input(user, "Would you like to change the name on the tag?", "Name your new pet", tagname ? tagname : "Spot", MAX_NAME_LEN)
if(t) if(t)
tagname = copytext(sanitize(t), 1, MAX_NAME_LEN) tagname = t
name = "[initial(name)] - [tagname]" name = "[initial(name)] - [t]"
else else
return ..() return ..()
+1 -1
View File
@@ -28,7 +28,7 @@ SLIME SCANNER
/obj/item/t_scanner/attack_self(mob/user) /obj/item/t_scanner/attack_self(mob/user)
on = !on on = !on
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]" icon_state = copytext_char(icon_state, 1, -1) + "[on]"
if(on) if(on)
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
+3 -3
View File
@@ -34,12 +34,12 @@
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user) /obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY) var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE)) if(clumsy)
if(prob(50)) if(clumsy_check == GRENADE_CLUMSY_FUMBLE && prob(50))
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>") to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
preprime(user, 5, FALSE) preprime(user, 5, FALSE)
return FALSE return FALSE
else if(!clumsy && (clumsy_check == GRENADE_NONCLUMSY_FUMBLE)) else if(clumsy_check == GRENADE_NONCLUMSY_FUMBLE && !(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY)))
to_chat(user, "<span class='warning'>You pull the pin on [src]. Attached to it is a pink ribbon that says, \"<span class='clown'>HONK</span>\"</span>") to_chat(user, "<span class='warning'>You pull the pin on [src]. Attached to it is a pink ribbon that says, \"<span class='clown'>HONK</span>\"</span>")
preprime(user, 5, FALSE) preprime(user, 5, FALSE)
return FALSE return FALSE
+4 -3
View File
@@ -72,20 +72,21 @@
display_names += list(initial(A.name) = A) display_names += list(initial(A.name) = A)
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type) var/turf/T = get_turf(M)
if(!T || QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type)
return return
var/index = display_names.Find(choice) var/index = display_names.Find(choice)
var/A = holy_armor_list[index] var/A = holy_armor_list[index]
GLOB.holy_armor_type = A GLOB.holy_armor_type = A
var/holy_armor_box = new A var/holy_armor_box = new A(T)
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]") SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
if(holy_armor_box) if(holy_armor_box)
qdel(src) qdel(src)
M.put_in_active_hand(holy_armor_box)///YOU COMPILED M.put_in_hands(holy_armor_box)
/obj/item/storage/box/holy /obj/item/storage/box/holy
name = "Templar Kit" name = "Templar Kit"
+8
View File
@@ -19,3 +19,11 @@
icon_state = "skub" icon_state = "skub"
w_class = WEIGHT_CLASS_BULKY w_class = WEIGHT_CLASS_BULKY
attack_verb = list("skubbed") attack_verb = list("skubbed")
/obj/item/supermatterspray
name = "supermatter spray"
desc = "A spray bottle containing some kind of magical spray to fix the SM. \"Do not inhale.\" is written on the side. Unless aimed at the supermatter, it does nothing."
icon = 'icons/obj/supermatter.dmi'
icon_state = "supermatterspray"
w_class = WEIGHT_CLASS_SMALL
var/usesleft = 2
@@ -154,6 +154,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
GLOBAL_LIST_INIT(plasteel_recipes, list ( \ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \ new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \ new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
new/datum/stack_recipe("crate", /obj/structure/closet/crate, 5, time = 90, one_per_turf = TRUE), \
null, \ null, \
new /datum/stack_recipe_list("airlock assemblies", list( \ new /datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 6, time = 50, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 6, time = 50, one_per_turf = 1, on_floor = 1), \
+20
View File
@@ -322,6 +322,26 @@
for(var/i in 1 to 5) for(var/i in 1 to 5)
new /obj/item/grenade/empgrenade(src) new /obj/item/grenade/empgrenade(src)
/obj/item/storage/box/minibombs
name = "box of syndicate minibombs"
desc = "A box containing 2 highly explosive syndicate minibombs."
icon_state = "syndiebox"
illustration = "frag"
/obj/item/storage/box/minibombs/PopulateContents()
new /obj/item/grenade/syndieminibomb(src)
new /obj/item/grenade/syndieminibomb(src)
/obj/item/storage/box/bombananas
name = "box of bombananas"
desc = "A box containing 2 highly explosive bombananas. Discard peel at enemy after consumption."
icon_state = "syndiebox"
illustration = "frag"
/obj/item/storage/box/bombananas/PopulateContents()
new /obj/item/reagent_containers/food/snacks/grown/banana/bombanana(src)
new /obj/item/reagent_containers/food/snacks/grown/banana/bombanana(src)
/obj/item/storage/box/trackimp /obj/item/storage/box/trackimp
name = "boxed tracking implant kit" name = "boxed tracking implant kit"
desc = "Box full of scum-bag tracking utensils." desc = "Box full of scum-bag tracking utensils."
+31
View File
@@ -12,6 +12,7 @@
* Cigarette Box * Cigarette Box
* Cigar Case * Cigar Case
* Heart Shaped Box w/ Chocolates * Heart Shaped Box w/ Chocolates
* Ring Box
*/ */
/obj/item/storage/fancy /obj/item/storage/fancy
@@ -352,3 +353,33 @@
var/datum/component/storage/STR = GetComponent(/datum/component/storage) var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8 STR.max_items = 8
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate)) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))
/*
* Ring Box
*/
/obj/item/storage/fancy/ringbox
name = "ring box"
desc = "A tiny box covered in soft red felt made for holding rings."
icon = 'icons/obj/ring.dmi'
icon_state = "gold ringbox"
icon_type = "gold ring"
w_class = WEIGHT_CLASS_TINY
spawn_type = /obj/item/clothing/gloves/ring
/obj/item/storage/fancy/ringbox/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 1
STR.can_hold = typecacheof(list(/obj/item/clothing/gloves/ring))
/obj/item/storage/fancy/ringbox/diamond
icon_state = "diamond ringbox"
icon_type = "diamond ring"
spawn_type = /obj/item/clothing/gloves/ring/diamond
/obj/item/storage/fancy/ringbox/silver
icon_state = "silver ringbox"
icon_type = "silver ring"
spawn_type = /obj/item/clothing/gloves/ring/silver
+2 -2
View File
@@ -38,9 +38,9 @@
wielded = 0 wielded = 0
if(!isnull(force_unwielded)) if(!isnull(force_unwielded))
force = force_unwielded force = force_unwielded
var/sf = findtext(name," (Wielded)") var/sf = findtext(name, " (Wielded)", -10)//10 == length(" (Wielded)")
if(sf) if(sf)
name = copytext(name,1,sf) name = copytext(name, 1, sf)
else //something wrong else //something wrong
name = "[initial(name)]" name = "[initial(name)]"
update_icon() update_icon()
+2 -2
View File
@@ -60,8 +60,8 @@
var/flagslist = splittext(set_obj_flags,";") var/flagslist = splittext(set_obj_flags,";")
var/list/string_to_objflag = GLOB.bitfields["obj_flags"] var/list/string_to_objflag = GLOB.bitfields["obj_flags"]
for (var/flag in flagslist) for (var/flag in flagslist)
if (findtext(flag,"!",1,2)) if(flag[1] == "!")
flag = copytext(flag,1-(length(flag))) // Get all but the initial ! flag = copytext(flag, length(flag[1]) + 1) // Get all but the initial !
obj_flags &= ~string_to_objflag[flag] obj_flags &= ~string_to_objflag[flag]
else else
obj_flags |= string_to_objflag[flag] obj_flags |= string_to_objflag[flag]
@@ -126,8 +126,10 @@
new /obj/item/clothing/mask/bandana/black(src) new /obj/item/clothing/mask/bandana/black(src)
if(prob(40)) if(prob(40))
new /obj/item/clothing/under/assistantformal(src) new /obj/item/clothing/under/assistantformal(src)
new /obj/item/clothing/suit/hooded/wintercoat/aformal(src)
if(prob(40)) if(prob(40))
new /obj/item/clothing/under/assistantformal(src) new /obj/item/clothing/under/assistantformal(src)
new /obj/item/clothing/suit/hooded/wintercoat/aformal(src)
if(prob(30)) if(prob(30))
new /obj/item/clothing/suit/hooded/wintercoat(src) new /obj/item/clothing/suit/hooded/wintercoat(src)
new /obj/item/clothing/shoes/winterboots(src) new /obj/item/clothing/shoes/winterboots(src)
@@ -169,4 +171,6 @@
if(prob(30)) if(prob(30))
new /obj/item/clothing/suit/hooded/wintercoat(src) new /obj/item/clothing/suit/hooded/wintercoat(src)
new /obj/item/clothing/shoes/winterboots(src) new /obj/item/clothing/shoes/winterboots(src)
if (prob(30))
new /obj/item/clothing/suit/hooded/wintercoat/polychromic(src)
return return
@@ -13,6 +13,8 @@
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
climb_stun = 0 //climbing onto crates isn't hard, guys climb_stun = 0 //climbing onto crates isn't hard, guys
delivery_icon = "deliverycrate" delivery_icon = "deliverycrate"
material_drop = /obj/item/stack/sheet/plasteel
material_drop_amount = 5
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest var/obj/item/paper/fluff/jobs/cargo/manifest/manifest
/obj/structure/closet/crate/New() /obj/structure/closet/crate/New()
+1 -1
View File
@@ -133,7 +133,7 @@
switch(choice) switch(choice)
if("name") if("name")
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN) var/newname = reject_bad_name(stripped_input(H, "Who are we again?", "Name change", H.name, MAX_NAME_LEN))
if(!newname) if(!newname)
return return
+12 -11
View File
@@ -109,8 +109,10 @@
var/cur_note = text2ascii(note) - 96 var/cur_note = text2ascii(note) - 96
if(cur_note < 1 || cur_note > 7) if(cur_note < 1 || cur_note > 7)
continue continue
for(var/i=2 to length(note)) var/notelen = length(note)
var/ni = copytext(note,i,i+1) var/ni = ""
for(var/i = length(note[1]) + 1, i <= notelen, i += length(ni))
ni = note[i]
if(!text2num(ni)) if(!text2num(ni))
if(ni == "#" || ni == "b" || ni == "n") if(ni == "#" || ni == "b" || ni == "n")
cur_acc[cur_note] = ni cur_acc[cur_note] = ni
@@ -199,9 +201,10 @@
//split into lines //split into lines
lines = splittext(text, "\n") lines = splittext(text, "\n")
if(lines.len) if(lines.len)
if(copytext(lines[1],1,6) == "BPM: ") var/bpm_string = "BPM: "
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6))) if(findtext(lines[1], bpm_string, 1, length(bpm_string) + 1))
lines.Cut(1,2) tempo = sanitize_tempo(600 / text2num(copytext(lines[1], length(bpm_string) + 1)))
lines.Cut(1, 2)
else else
tempo = sanitize_tempo(5) // default 120 BPM tempo = sanitize_tempo(5) // default 120 BPM
if(lines.len > MUSIC_MAXLINES) if(lines.len > MUSIC_MAXLINES)
@@ -209,7 +212,7 @@
lines.Cut(MUSIC_MAXLINES + 1) lines.Cut(MUSIC_MAXLINES + 1)
var/linenum = 1 var/linenum = 1
for(var/l in lines) for(var/l in lines)
if(length(l) > MUSIC_MAXLINECHARS) if(length_char(l) > MUSIC_MAXLINECHARS)
to_chat(usr, "Line [linenum] too long!") to_chat(usr, "Line [linenum] too long!")
lines.Remove(l) lines.Remove(l)
else else
@@ -236,11 +239,11 @@
if(!in_range(instrumentObj, usr)) if(!in_range(instrumentObj, usr))
return return
if(length(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS) if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no") var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
if(cont == "no") if(cont == "no")
break break
while(length(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS) while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
ParseSong(t) ParseSong(t)
else if(href_list["help"]) else if(href_list["help"])
@@ -284,11 +287,9 @@
else if(href_list["modifyline"]) else if(href_list["modifyline"])
var/num = round(text2num(href_list["modifyline"]),1) var/num = round(text2num(href_list["modifyline"]),1)
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null) var/content = stripped_input(usr, "Enter your line: ", instrumentObj.name, lines[num], MUSIC_MAXLINECHARS)
if(!content || !in_range(instrumentObj, usr)) if(!content || !in_range(instrumentObj, usr))
return return
if(length(content) > MUSIC_MAXLINECHARS)
content = copytext(content, 1, MUSIC_MAXLINECHARS)
if(num > lines.len || num < 1) if(num > lines.len || num < 1)
return return
lines[num] = content lines[num] = content

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