Merge pull request #3 from quotefox/master

update
This commit is contained in:
Crashtest-LXXXIX
2020-12-04 23:48:24 +00:00
committed by GitHub
463 changed files with 343688 additions and 205929 deletions
@@ -0,0 +1,315 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/turf/template_noop,
/area/template_noop)
"c" = (
/turf/open/lava/smooth/lava_land_surface,
/area/ruin/unpowered)
"d" = (
/obj/effect/decal/remains/human,
/mob/living/simple_animal/hostile/carp/eyeball,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"e" = (
/obj/effect/decal/remains/human,
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/ruin/unpowered)
"f" = (
/obj/effect/decal/cleanable/blood/gibs/human/limb,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"g" = (
/obj/effect/decal/cleanable/blood,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"l" = (
/obj/effect/decal/remains/human,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"o" = (
/obj/structure/lunaraltar,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"q" = (
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"s" = (
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/ruin/unpowered)
"x" = (
/obj/effect/decal/cleanable/blood,
/obj/effect/decal/cleanable/blood,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"y" = (
/obj/effect/decal/cleanable/blood/gibs/human,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"A" = (
/mob/living/simple_animal/hostile/carp/eyeball,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"R" = (
/obj/effect/decal/cleanable/ash/large,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
"X" = (
/obj/effect/decal/cleanable/blood/gibs/human/lizard/limb,
/turf/open/floor/plasteel/cult/airless,
/area/ruin/unpowered)
(1,1,1) = {"
a
a
a
a
a
a
c
c
c
a
a
a
a
a
a
"}
(2,1,1) = {"
a
s
e
c
c
c
c
c
c
c
c
c
s
s
a
"}
(3,1,1) = {"
a
e
s
s
c
c
c
c
c
c
c
e
s
s
a
"}
(4,1,1) = {"
a
s
s
c
c
c
c
c
c
c
c
c
e
s
a
"}
(5,1,1) = {"
a
c
c
c
c
c
c
c
c
c
c
c
c
s
a
"}
(6,1,1) = {"
a
c
c
c
c
c
l
f
d
c
c
c
c
c
a
"}
(7,1,1) = {"
c
c
c
c
c
l
q
g
g
y
c
c
c
c
c
"}
(8,1,1) = {"
c
c
c
c
c
A
q
o
x
g
c
c
c
c
c
"}
(9,1,1) = {"
c
c
c
c
c
l
q
R
X
l
c
c
c
c
c
"}
(10,1,1) = {"
a
c
c
c
c
c
q
q
A
c
c
c
c
c
a
"}
(11,1,1) = {"
a
s
c
c
c
c
c
c
c
c
c
c
s
s
a
"}
(12,1,1) = {"
a
s
s
c
c
c
c
c
c
c
c
c
e
s
a
"}
(13,1,1) = {"
a
e
s
c
c
c
c
c
c
c
c
e
s
s
a
"}
(14,1,1) = {"
a
s
e
c
c
c
c
c
c
c
c
s
s
s
a
"}
(15,1,1) = {"
a
a
a
a
a
a
c
c
c
a
a
a
a
a
a
"}
File diff suppressed because it is too large Load Diff
@@ -2,7 +2,7 @@
"aq" = (
/obj/structure/table/reinforced,
/obj/item/paper{
desc = "Charlie, remember to reconnect the gas mix monitor if it's having issues, by the way, if the heat gets too high, don't be afraid to space this part of engineering and use a voidsuit or a hardsuit. There's one in the crates.";
info = "Charlie, remember to reconnect the gas mix monitor if it's having issues, by the way, if the heat gets too high, don't be afraid to space this part of engineering and use a voidsuit or a hardsuit. There's one in the crates... <br> And remember. When the candle is lit... The burn is good.;
name = "TEG Chamber Note"
},
/turf/open/floor/plasteel,
@@ -15,12 +15,6 @@
/obj/effect/spawner/structure/window/plasma/reinforced,
/turf/open/floor/plating,
/area/engine/engineering)
"aG" = (
/obj/machinery/atmospherics/pipe/heat_exchanging/simple{
dir = 4
},
/turf/open/space,
/area/space/nearstation)
"aR" = (
/obj/machinery/atmospherics/pipe/simple/dark/visible{
dir = 4
@@ -825,13 +819,6 @@
/turf/open/floor/plasteel,
/area/engine/engineering)
"xD" = (
/obj/machinery/atmospherics/pipe/simple/orange/visible{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pump{
dir = 8;
name = "Mix to Engine"
},
/obj/machinery/atmospherics/components/binary/pump{
dir = 8;
name = "Atmos to Loop"
@@ -1368,6 +1355,7 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/simple{
dir = 9
},
/obj/structure/lattice,
/turf/open/space,
/area/space/nearstation)
"Lw" = (
@@ -1392,7 +1380,7 @@
/area/engine/engineering)
"LS" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible,
/turf/open/floor/plating/airless,
/turf/open/space/basic,
/area/engine/engineering)
"Mf" = (
/obj/structure/closet/secure_closet/engineering_personal,
@@ -2140,7 +2128,7 @@ ZT
ZT
ZT
Le
aG
Nz
Qu
Nz
EW
@@ -2196,7 +2184,7 @@ EL
Tk
MP
Le
aG
Nz
Qu
Nz
EW
+1
View File
@@ -11,6 +11,7 @@
#include "map_files\OmegaStation\OmegaStation.dmm"
#include "map_files\PubbyStation\PubbyStation.dmm"
#include "map_files\BoxStation\BoxStation.dmm"
#include "map_files\SyndieBoxStation\SyndieBoxStation.dmm"
#ifdef TRAVISBUILDING
#include "templates.dm"
+3 -2
View File
@@ -4606,7 +4606,7 @@
/turf/open/floor/plasteel,
/area/security/processing)
"ajg" = (
/obj/machinery/computer/gulag_teleporter_computer,
/obj/machinery/computer/prisoner/gulag_teleporter_computer,
/turf/open/floor/plasteel,
/area/security/processing)
"ajh" = (
@@ -37381,13 +37381,13 @@
/obj/structure/table/glass,
/obj/item/folder/white,
/obj/item/stamp/cmo,
/obj/item/clothing/glasses/hud/health,
/obj/effect/turf_decal/tile/blue{
dir = 4
},
/obj/effect/turf_decal/tile/blue{
dir = 8
},
/obj/item/clothing/glasses/hud/health/gar,
/turf/open/floor/plasteel/cafeteria,
/area/crew_quarters/heads/cmo)
"bDW" = (
@@ -62592,6 +62592,7 @@
/obj/effect/turf_decal/tile/brown{
dir = 1
},
/obj/machinery/computer/card/minor/qm,
/turf/open/floor/plasteel/dark,
/area/quartermaster/qm)
"tDj" = (
@@ -27550,7 +27550,6 @@
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"aZh" = (
/obj/structure/table/reinforced,
/obj/machinery/light{
dir = 4
},
@@ -27561,6 +27560,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/machinery/computer/card/minor/qm{
dir = 8
},
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"aZi" = (
File diff suppressed because it is too large Load Diff
@@ -687,7 +687,7 @@
"ank" = (/obj/machinery/computer/card/minor/hos{dir = 8},/turf/open/floor/carpet,/area/crew_quarters/heads/hos)
"anl" = (/obj/structure/transit_tube/diagonal,/turf/open/space/basic,/area/space/nearstation)
"anm" = (/obj/machinery/door/airlock/maintenance/abandoned{name = "Pete's Speakeasy"; req_access_txt = "0"},/turf/open/floor/plating,/area/maintenance/department/crew_quarters/dorms)
"ann" = (/obj/structure/table,/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_x = -30},/obj/item/paper_bin{layer = 2.9},/obj/item/pen,/obj/effect/turf_decal/tile/brown{dir = 1},/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 8},/obj/item/book/lorebooks/welcome_to_kinaris,/turf/open/floor/plasteel,/area/quartermaster/qm)
"ann" = (/obj/structure/table,/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_x = -30},/obj/effect/turf_decal/tile/brown{dir = 1},/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 8},/obj/machinery/computer/card/minor/qm{dir = 1},/turf/open/floor/plasteel,/area/quartermaster/qm)
"ano" = (/obj/machinery/button/door{desc = "A remote control-switch for the engineering security doors."; id = "Engineering"; name = "Engineering Lockdown"; pixel_x = -24; pixel_y = -10; req_access_txt = "10"},/obj/machinery/button/door{desc = "A remote control-switch for secure storage."; id = "Secure Storage"; name = "Engineering Secure Storage"; pixel_x = -24; req_access_txt = "11"},/obj/machinery/button/door{id = "atmos"; name = "Atmospherics Lockdown"; pixel_x = -24; pixel_y = 10; req_access_txt = "24"},/obj/structure/table/reinforced,/obj/item/folder/yellow,/obj/item/paper/monitorkey,/obj/item/pen,/obj/effect/turf_decal/tile/yellow{dir = 1},/obj/effect/turf_decal/tile/yellow{dir = 8},/obj/item/book/lorebooks/welcome_to_kinaris,/mob/living/simple_animal/parrot/Poly,/turf/open/floor/plasteel,/area/crew_quarters/heads/chief)
"anp" = (/obj/structure/closet/secure_closet/personal,/obj/item/toy/poolnoodle/red,/obj/item/toy/poolnoodle/yellow,/obj/item/toy/poolnoodle/blue,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 1},/turf/open/floor/plasteel,/area/crew_quarters/fitness/pool)
"anq" = (/obj/structure/grille/broken,/turf/open/floor/plating,/area/maintenance/department/security/brig)
@@ -776,7 +776,7 @@
"aoV" = (/obj/machinery/disposal/bin,/obj/structure/disposalpipe/trunk{dir = 4},/turf/open/floor/plasteel/showroomfloor,/area/security/warden)
"aoW" = (/obj/machinery/atmospherics/pipe/simple/cyan/hidden,/obj/structure/disposalpipe/segment{dir = 10},/turf/open/floor/plasteel/showroomfloor,/area/security/warden)
"aoX" = (/obj/structure/rack,/obj/item/crowbar,/obj/item/wrench,/obj/item/laser_pointer/red,/turf/open/floor/plasteel/showroomfloor,/area/security/warden)
"aoY" = (/obj/structure/filingcabinet/chestdrawer,/obj/machinery/light_switch{pixel_y = -22},/turf/open/floor/plasteel/showroomfloor,/area/security/warden)
"aoY" = (/obj/structure/filingcabinet/chestdrawer,/obj/machinery/light_switch{pixel_y = -22},/obj/item/reagent_containers/food/drinks/beer/light{desc = "beer"; name = "beer"; pixel_y = 15},/turf/open/floor/plasteel/showroomfloor,/area/security/warden)
"aoZ" = (/obj/structure/cable{icon_state = "0-2"},/obj/structure/cable,/obj/effect/spawner/structure/window/reinforced,/turf/open/floor/plating,/area/security/warden)
"apa" = (/obj/machinery/disposal/bin,/obj/structure/disposalpipe/trunk{dir = 4},/obj/effect/turf_decal/tile/red{dir = 1},/obj/effect/turf_decal/tile/red,/obj/effect/turf_decal/tile/red{dir = 4},/obj/effect/turf_decal/tile/red{dir = 8},/turf/open/floor/plasteel,/area/security/main)
"apb" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/turf_decal/tile/red,/obj/effect/turf_decal/tile/red{dir = 8},/turf/open/floor/plasteel,/area/security/main)
@@ -809,7 +809,7 @@
"apC" = (/obj/machinery/light/small{brightness = 3; dir = 8},/obj/structure/trash_pile,/turf/open/floor/plating,/area/maintenance/department/crew_quarters/bar)
"apD" = (/obj/structure/rack,/obj/effect/spawner/lootdrop/maintenance,/obj/structure/disposalpipe/junction/yjunction{dir = 2},/turf/open/floor/plating,/area/maintenance/department/engine)
"apE" = (/obj/effect/spawner/structure/window/reinforced,/turf/open/floor/plating,/area/security/brig)
"apF" = (/obj/machinery/computer/gulag_teleporter_computer{dir = 1},/turf/open/floor/plasteel/dark,/area/security/brig)
"apF" = (/obj/machinery/computer/prisoner/gulag_teleporter_computer{dir = 1},/turf/open/floor/plasteel/dark,/area/security/brig)
"apG" = (/obj/machinery/gulag_teleporter,/turf/open/floor/plasteel/dark,/area/security/brig)
"apH" = (/obj/machinery/atmospherics/pipe/simple/cyan/hidden{dir = 10},/turf/open/floor/plasteel,/area/security/brig)
"apI" = (/obj/structure/cable{icon_state = "1-4"},/obj/structure/cable{icon_state = "1-2"},/turf/closed/wall/r_wall,/area/security/warden)
@@ -2943,7 +2943,7 @@
"beG" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/camera{c_tag = "Bar Starboard"; dir = 1},/obj/machinery/light{light_color = "#c9d3e8"},/turf/open/floor/plasteel/dark,/area/crew_quarters/bar)
"beH" = (/obj/machinery/disposal/bin,/obj/structure/disposalpipe/trunk{dir = 8},/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/dark,/area/crew_quarters/bar)
"beI" = (/turf/closed/wall,/area/science/robotics/mechbay)
"beJ" = (/obj/structure/filingcabinet,/obj/effect/turf_decal/tile/brown{dir = 1},/obj/effect/turf_decal/tile/brown{dir = 8},/obj/machinery/keycard_auth{pixel_x = -23; pixel_y = 0},/turf/open/floor/plasteel,/area/quartermaster/qm)
"beJ" = (/obj/effect/turf_decal/tile/brown{dir = 1},/obj/effect/turf_decal/tile/brown{dir = 8},/obj/machinery/keycard_auth{pixel_x = -23; pixel_y = 0},/turf/open/floor/plasteel,/area/quartermaster/qm)
"beK" = (/obj/structure/chair/office/dark{dir = 4},/obj/effect/landmark/start/quartermaster,/turf/open/floor/plasteel,/area/quartermaster/qm)
"beL" = (/obj/machinery/computer/cargo{dir = 8},/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 4},/turf/open/floor/plasteel,/area/quartermaster/qm)
"beM" = (/obj/machinery/mineral/equipment_vendor,/obj/effect/turf_decal/tile/brown{dir = 1},/turf/open/floor/plasteel,/area/quartermaster/miningdock)
@@ -2988,7 +2988,7 @@
"bfz" = (/turf/open/floor/plasteel/dark,/area/science/robotics/mechbay)
"bfA" = (/obj/machinery/computer/mech_bay_power_console,/obj/structure/cable{icon_state = "0-2"},/turf/open/floor/plasteel/dark,/area/science/robotics/mechbay)
"bfB" = (/obj/effect/turf_decal/tile/red{dir = 8},/obj/effect/turf_decal/tile/red{dir = 1},/obj/effect/turf_decal/tile/red,/turf/open/floor/plasteel,/area/security/range)
"bfC" = (/obj/structure/table,/obj/item/clipboard,/obj/machinery/light,/obj/machinery/camera{c_tag = "Cargo Quartermaster's Office"; dir = 1},/obj/machinery/light_switch{pixel_y = -24},/obj/item/cartridge/quartermaster{pixel_x = 6; pixel_y = 5},/obj/item/cartridge/quartermaster,/obj/item/cartridge/quartermaster{pixel_x = -4; pixel_y = 7},/obj/item/coin/silver,/obj/item/stamp/qm,/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 8},/turf/open/floor/plasteel,/area/quartermaster/qm)
"bfC" = (/obj/structure/table,/obj/item/clipboard,/obj/machinery/light,/obj/machinery/camera{c_tag = "Cargo Quartermaster's Office"; dir = 1},/obj/machinery/light_switch{pixel_y = -24},/obj/item/cartridge/quartermaster{pixel_x = 6; pixel_y = 5},/obj/item/cartridge/quartermaster,/obj/item/cartridge/quartermaster{pixel_x = -4; pixel_y = 7},/obj/item/coin/silver,/obj/item/stamp/qm,/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 8},/obj/item/paper_bin{layer = 2.9},/obj/item/pen,/turf/open/floor/plasteel,/area/quartermaster/qm)
"bfD" = (/obj/item/radio/intercom{name = "Station Intercom (General)"; pixel_y = -35},/obj/machinery/computer/security/qm{dir = 8},/obj/effect/turf_decal/tile/brown,/obj/effect/turf_decal/tile/brown{dir = 4},/obj/effect/turf_decal/tile/brown{dir = 8},/turf/open/floor/plasteel,/area/quartermaster/qm)
"bfE" = (/obj/structure/rack,/obj/item/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/item/pickaxe{pixel_x = 5},/obj/item/shovel{pixel_x = -5},/obj/machinery/camera{c_tag = "Cargo Mining Dock"; dir = 4},/obj/effect/turf_decal/tile/brown{dir = 1},/turf/open/floor/plasteel,/area/quartermaster/miningdock)
"bfF" = (/obj/structure/cable{icon_state = "1-2"},/obj/effect/landmark/start/shaft_miner,/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 8},/turf/open/floor/plasteel,/area/quartermaster/miningdock)
@@ -4091,7 +4091,7 @@
"bCp" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 8},/obj/effect/turf_decal/tile/blue,/obj/effect/turf_decal/tile/blue{dir = 4},/turf/open/floor/plasteel/white,/area/medical/medbay/central)
"bCr" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/obj/structure/cable{icon_state = "1-2"},/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCs" = (/obj/structure/table/glass,/obj/item/paper_bin{pixel_x = -2; pixel_y = 5},/obj/item/pen{layer = 3.1},/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCt" = (/obj/structure/table/glass,/obj/item/folder/white,/obj/item/clothing/glasses/hud/health,/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCt" = (/obj/structure/table/glass,/obj/item/folder/white,/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/obj/item/clothing/glasses/hud/health/gar,/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCu" = (/obj/structure/table/glass,/obj/structure/disposalpipe/segment{dir = 4},/obj/item/stack/medical/gauze,/obj/item/clothing/neck/stethoscope,/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCv" = (/obj/structure/cable{icon_state = "2-4"},/obj/structure/disposalpipe/sorting/mail{dir = 8; sortType = 10},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 5},/obj/structure/cable{icon_state = "1-4"},/obj/effect/turf_decal/tile/blue{dir = 4},/obj/effect/turf_decal/tile/blue{dir = 8},/turf/open/floor/plasteel/white,/area/crew_quarters/heads/cmo)
"bCx" = (/obj/structure/cable{icon_state = "4-8"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/obj/machinery/light/small{dir = 1},/turf/open/floor/plating,/area/maintenance/department/engine)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
#define FORCE_MAP "_maps/syndieboxstation.json"
+11
View File
@@ -0,0 +1,11 @@
{
"map_name": "Syndicate Box Station",
"map_path": "map_files/SyndieBoxStation",
"map_file": "SyndieBoxStation.dmm",
"shuttles": {
"cargo": "cargo_box",
"ferry": "ferry_fancy",
"whiteship": "whiteship_box",
"emergency": "emergency_box"
}
}
+2
View File
@@ -64,6 +64,8 @@
#define ACCESS_WEAPONS 66 //Weapon authorization for secbots
#define ACCESS_NETWORK 67 //NTnet diagnostics/monitoring software
#define ACCESS_CLONING 68 //Cloning room and clone pod ejection
#define ACCESS_ENTER_GENPOP 69
#define ACCESS_LEAVE_GENPOP 70
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
+17
View File
@@ -40,3 +40,20 @@
#define NOT_DOMINATING -1
#define MAX_LEADERS_GANG 3
#define INITIAL_DOM_ATTEMPTS 3
//Bloodsucker defines
// Bloodsucker related antag datums
#define ANTAG_DATUM_BLOODSUCKER /datum/antagonist/bloodsucker
#define ANTAG_DATUM_VASSAL /datum/antagonist/vassal
//#define ANTAG_DATUM_HUNTER /datum/antagonist/vamphunter Disabled for now
// BLOODSUCKER
#define BLOODSUCKER_LEVEL_TO_EMBRACE 3
#define BLOODSUCKER_FRENZY_TIME 25 // How long the vamp stays in frenzy.
#define BLOODSUCKER_FRENZY_OUT_TIME 300 // How long the vamp goes back into frenzy.
#define BLOODSUCKER_STARVE_VOLUME 5 // Amount of blood, below which a Vamp is at risk of frenzy.
#define CAT_STRUCTURE "Structures"
#define MARTIALART_HUNTER "hunter-fu"
+1
View File
@@ -57,6 +57,7 @@
#define ANTAG_HUD_SOULLESS 21
#define ANTAG_HUD_CLOCKWORK 22
#define ANTAG_HUD_BROTHER 23
#define ANTAG_HUD_BLOODSUCKER 24
// Notification action types
#define NOTIFY_JUMP "jump"
+1 -1
View File
@@ -499,7 +499,7 @@
///called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists"
//This uses all return values of COMSIG_IMPLANT_OTHER
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
// /obj/item/pda signals
///called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
+2
View File
@@ -221,6 +221,8 @@ GLOBAL_LIST_INIT(heavyfootmob, typecacheof(list(
#define isitem(A) (istype(A, /obj/item))
#define isidcard(I) (istype(I, /obj/item/card/id))
#define isstructure(A) (istype(A, /obj/structure))
#define ismachinery(A) (istype(A, /obj/machinery))
+4
View File
@@ -12,6 +12,8 @@
#define ROBOTICIST (1<<8)
#define AI_JF (1<<9)
#define CYBORG (1<<10)
#define JR_OFFICER (1<<11)
#define JR_ENGINEER (1<<12)
#define MEDSCI (1<<1)
@@ -23,6 +25,8 @@
#define DOCTOR (1<<4)
#define GENETICIST (1<<5)
#define VIROLOGIST (1<<6)
#define JR_DOCTOR (1<<7)
#define JR_SCIENTIST (1<<9)
#define CIVILIAN (1<<2)
+3 -2
View File
@@ -66,8 +66,9 @@
#define SPACEVINE_LAYER 4.8
#define SPACEVINE_MOB_LAYER 4.9
//#define FLY_LAYER 5 //For easy recordkeeping; this is a byond define
#define GASFIRE_LAYER 5.05
#define RIPPLE_LAYER 5.1
#define ABOVE_FLY_LAYER 5.1
#define GASFIRE_LAYER 5.2
#define RIPPLE_LAYER 5.3
#define GHOST_LAYER 6
#define LOW_LANDMARK_LAYER 9
+1
View File
@@ -35,6 +35,7 @@
#define LOG_GAME (1 << 12)
#define LOG_ADMIN_PRIVATE (1 << 13)
#define LOG_ASAY (1 << 14)
#define LOG_VIRUS (1 << 15)
//Individual logging panel pages
#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK)
+2
View File
@@ -272,3 +272,5 @@
#define PULL_PRONE_SLOWDOWN 0.6
#define HUMAN_CARRY_SLOWDOWN 0
#define TYPING_INDICATOR_TIMEOUT 10 MINUTES
+2 -2
View File
@@ -26,7 +26,7 @@
//Research point amounts
#define NOBLIUM_RESEARCH_AMOUNT 100
#define BZ_RESEARCH_AMOUNT 15
#define MIASMA_RESEARCH_AMOUNT 16
#define MIASMA_RESEARCH_AMOUNT 6 //lolno, fart gas 2 ez
#define STIMULUM_RESEARCH_AMOUNT 50
//Plasma fusion properties
#define FUSION_ENERGY_THRESHOLD 3e9 //Amount of energy it takes to start a fusion reaction
@@ -41,4 +41,4 @@
#define FUSION_RAD_MAX 2000
#define FUSION_RAD_COEFFICIENT (-1000)
#define FUSION_INSTABILITY_ENDOTHERMALITY 2
#define FUSION_MAXIMUM_TEMPERATURE 1e8
#define FUSION_MAXIMUM_TEMPERATURE 1e8
+4 -1
View File
@@ -35,6 +35,7 @@
#define ROLE_LAVALAND "lavaland"
#define ROLE_INTERNAL_AFFAIRS "internal affairs agent"
#define ROLE_GANG "gangster"
#define ROLE_BLOODSUCKER "bloodsucker"
//Hyper
#define ROLE_LEWD_TRAITOR "lewd traitor"
@@ -62,7 +63,9 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_OVERTHROW = /datum/game_mode/overthrow,
ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs,
ROLE_SENTIENCE,
ROLE_GANG = /datum/game_mode/gang
ROLE_GANG = /datum/game_mode/gang,
ROLE_BLOODSUCKER = /datum/game_mode/bloodsucker
//ROLE_MONSTERHUNTER Disabled for now
))
//Job defines for what happens when you fail to qualify for any job during job selection
+4 -1
View File
@@ -44,7 +44,7 @@
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep
#define STATUS_EFFECT_TASED /datum/status_effect/electrode //the affected has been tased, preventing fine muscle control
#define STATUS_EFFECT_TASED /datum/status_effect/no_combat_mode/electrode/ //the affected has been tased, preventing fine muscle control
#define STATUS_EFFECT_PACIFY /datum/status_effect/pacify //the affected is pacified, preventing direct hostile actions
@@ -75,6 +75,9 @@
#define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute.
#define STATUS_EFFECT_STASIS /datum/status_effect/incapacitating/stasis //Halts biological functions like bleeding, chemical processing, blood regeneration, walking, etc
#define STATUS_EFFECT_NO_COMBAT_MODE /datum/status_effect/no_combat_mode //Wont allow combat mode and will disable it
#define STATUS_EFFECT_MESMERIZE /datum/status_effect/no_combat_mode/mesmerize //Just reskinned no_combat_mode
/////////////
// NEUTRAL //
/////////////
+6 -1
View File
@@ -123,9 +123,13 @@
#define TRAIT_CALCIUM_HEALER "calcium_healer"
#define TRAIT_ALCOHOL_LIGHTWEIGHT "alcohol_lightweight" //Skyrat port
#define TRAIT_CURSED_BLOOD "cursed_blood" //Yo dawg I heard you like bloodborne references so I put a
#define TRAIT_RADRESONANCE "radioactive_resonance" //Hyperstation edit
#define TRAIT_SWIMMING "swimming" //only applied by /datum/element/swimming, for checking
#define TRAIT_CAPTAIN_METABOLISM "captain-metabolism"
#define TRAIT_NONATURALHEAL "nonaturalheal" // Only Admins can heal you. NOTHING else does it unless it's given the god tag.
#define TRAIT_NORUNNING "norunning" // You walk!
#define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites.
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
@@ -184,6 +188,7 @@
#define OBESITY "obesity"
#define MAGIC_TRAIT "magic"
#define TRAUMA_TRAIT "trauma"
#define DISEASE_TRAIT "disease"
#define SPECIES_TRAIT "species"
#define ORGAN_TRAIT "organ"
#define JOB_TRAIT "job"
+6
View File
@@ -381,6 +381,12 @@
i++
return i
/proc/count_occurences_of_value(list/L, val, limit) //special thanks to salmonsnake
. = 0
for (var/i in 1 to limit)
if (L[i] == val)
.++
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
+4
View File
@@ -61,6 +61,10 @@
if (CONFIG_GET(flag/log_game))
WRITE_LOG(GLOB.world_game_log, "GAME: [text]")
/proc/log_virus(text)
if (CONFIG_GET(flag/log_virus))
WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]")
/proc/log_access(text)
if (CONFIG_GET(flag/log_access))
WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]")
+4 -1
View File
@@ -82,11 +82,14 @@ GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B)
return A.totalResistance() - B.totalResistance()
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
return sorttext(B.sample_object.name, A.sample_object.name)
/proc/cmp_quirk_asc(datum/quirk/A, datum/quirk/B)
var/a_sign = num2sign(initial(A.value) * -1)
var/b_sign = num2sign(initial(B.value) * -1)
// Neutral traits go last
// Neutral traits go last.
if(a_sign == 0)
a_sign = 2
if(b_sign == 0)
+1 -1
View File
@@ -103,7 +103,7 @@
//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=1, max_length=MAX_NAME_LEN)
if(!t_in || length(t_in) > max_length)
return //Rejects the input if it is null or if it is longer then the max length allowed
+4
View File
@@ -1565,6 +1565,10 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
if(condition.Invoke(i))
. |= i
/proc/CallAsync(datum/source, proctype, list/arguments)
set waitfor = FALSE
return call(source, proctype)(arglist(arguments))
/proc/num2sign(numeric)
if(numeric > 0)
return 1
+4
View File
@@ -198,3 +198,7 @@ GLOBAL_LIST_INIT(numbers_as_words, world.file2list("strings/numbers_as_words.txt
GLOBAL_LIST_INIT(station_numerals, greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings())
GLOBAL_LIST_INIT(admiral_messages, list("Do you know how expensive these stations are?","Stop wasting my time.","I was sleeping, thanks a lot.","Stand and fight you cowards!","You knew the risks coming in.","Stop being paranoid.","Whatever's broken just build a new one.","No.", "<i>null</i>","<i>Error: No comment given.</i>", "It's a good day to die!"))
GLOBAL_LIST_INIT(speech_verbs, list("default", "says", "gibbers", "gekkers", "states", "chitters", "declares", "bellows", "buzzes" ,"beeps", "chirps" ,"hisses" ,"poofs" ,"rattles", "mewls", "barks", "blorbles", "squeaks", "squawks", "flutters"))
GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc))
+1 -2
View File
@@ -118,6 +118,5 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
/obj/item/autosurgeon/vagina = 1,
/obj/item/autosurgeon/breasts = 1,
/obj/item/autosurgeon/womb = 1,
/obj/item/toy/plush/random = 1,
"" = 3
/obj/item/toy/plush/random = 1
))
+2
View File
@@ -26,6 +26,8 @@ GLOBAL_VAR(query_debug_log)
GLOBAL_PROTECT(query_debug_log)
GLOBAL_VAR(world_job_debug_log)
GLOBAL_PROTECT(world_job_debug_log)
GLOBAL_VAR(world_virus_log)
GLOBAL_PROTECT(world_virus_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
+1 -1
View File
@@ -408,7 +408,7 @@
/mob/living/LaserEyes(atom/A, params)
changeNext_move(CLICK_CD_RANGE)
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc )
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc)
LE.icon = 'icons/effects/genetics.dmi'
LE.icon_state = "eyelasers"
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
+7
View File
@@ -349,6 +349,13 @@
devilsouldisplay = new /obj/screen/devil/soul_counter
infodisplay += devilsouldisplay
blood_display = new /obj/screen/bloodsucker/blood_counter // Blood Volume
infodisplay += blood_display
vamprank_display = new /obj/screen/bloodsucker/rank_counter // Vampire Rank
infodisplay += vamprank_display
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter // Sunlight
infodisplay += sunlight_display
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
+1 -2
View File
@@ -122,7 +122,7 @@
send_item_attack_message(I, user)
if(I.force)
apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage
if(I.damtype == BRUTE)
if(I.damtype == BRUTE && !HAS_TRAIT(src, TRAIT_NOMARROW))
if(prob(33))
I.add_mob_blood(src)
var/turf/location = get_turf(src)
@@ -175,4 +175,3 @@
/obj/item/proc/getweight()
return total_mass || w_class * 1.25
+2 -2
View File
@@ -20,7 +20,7 @@
var/override = 0
for(var/datum/mutation/human/HM in dna.mutations)
override += HM.on_attack_hand(src, A, proximity)
override += HM.on_attack_hand(A, proximity)
if(override)
return
@@ -93,7 +93,7 @@
return
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_ranged_attack(src, A, mouseparams)
HM.on_ranged_attack(A, mouseparams)
if(isturf(A) && get_dist(src,A) <= 1)
src.Move_Pulled(A)
@@ -39,6 +39,8 @@
/datum/config_entry/flag/log_game // log game events
/datum/config_entry/flag/log_virus // log virology data
/datum/config_entry/flag/log_vote // log voting
/datum/config_entry/flag/log_whisper // log client whisper
+11 -1
View File
@@ -6,7 +6,17 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
/datum/controller/subsystem/assets/Initialize(timeofday)
for(var/type in typesof(/datum/asset))
var/list/priority_assets = list(
/datum/asset/simple/oui_theme_nano,
/datum/asset/simple/goonchat
)
for(var/type in priority_assets)
var/datum/asset/A = new type()
A.register()
for(var/type in typesof(/datum/asset) - (priority_assets | list(/datum/asset, /datum/asset/simple)))
var/datum/asset/A = type
if (type != initial(A._abstract))
get_asset_datum(type)
+8 -5
View File
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(input)
// This is for when macro sets are eventualy datumized
/datum/controller/subsystem/input/proc/setup_default_macro_sets()
var/list/static/default_macro_sets
if(default_macro_sets)
macro_sets = default_macro_sets
return
@@ -33,10 +33,11 @@ SUBSYSTEM_DEF(input)
"Tab" = "\".winset \\\"input.focus=true?map.focus=true input.background-color=[COLOR_INPUT_DISABLED]:input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
"O" = "ooc",
"Ctrl+O" = "looc",
"T" = "say",
"Ctrl+T" = "whisper",
"M" = "me",
"Ctrl+M" = "subtle",
"Ctrl+T" = "say",
"T" = "say_indicator",
"Y" = "whisper",
"Ctrl+M" = "me",
"M" = "me_indicator",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"", // This makes it so backspace can remove default inputs
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
@@ -50,7 +51,9 @@ SUBSYSTEM_DEF(input)
"Tab" = "\".winset \\\"mainwindow.macro=old_default input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
"O" = "ooc",
"T" = "say",
"Ctrl+T" = "say_indicator",
"M" = "me",
"Ctrl+M" = "me_indicator",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"", // This makes it so backspace can remove default inputs
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
+11
View File
@@ -91,6 +91,17 @@ SUBSYSTEM_DEF(mapping)
seedRuins(space_ruins, CONFIG_GET(number/space_budget), /area/space, space_ruins_templates)
SSmapping.seedStation()
loading_ruins = FALSE
/*
//Hyper change - preload Reebe for midround purposes. I'll change this when I find a decent way to load maps midround.
var/list/errorList = list()
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
if(errorList.len) // reebe failed to load
message_admins("Reebe failed to load!")
log_game("Reebe failed to load!")
return FALSE
for(var/datum/parsed_map/PM in reebes)
PM.initTemplateBounds()
*/
#endif
repopulate_sorted_areas()
// Set up Z-level transitions.
+23 -21
View File
@@ -17,8 +17,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
/datum/controller/subsystem/processing/quirks/Initialize(timeofday)
if(!quirks.len)
SetupQuirks()
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Apathetic","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"),list("Prosthetic Limb (Left Arm)","Prosthetic Limb (Right Arm)","Prosthetic Limb (Left Leg)","Prosthetic Limb (Right Leg)","Prosthetic Limb"),list("Social Anxiety","Mute"))
quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"),list("Prosthetic Limb (Left Arm)","Prosthetic Limb (Right Arm)","Prosthetic Limb (Left Leg)","Prosthetic Limb (Right Leg)","Prosthetic Limb"),list("Social Anxiety","Mute"))
return ..()
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
@@ -32,13 +31,21 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
quirk_names_by_path[T] = initial(T.name)
/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/cli, spawn_effects, roundstart = FALSE, datum/job/job, silent = FALSE, mob/to_chat_target)
GenerateQuirks(cli)
var/list/quirks = cli.prefs.character_quirks.Copy()
var/badquirk = FALSE
var/list/my_quirks = cli.prefs.all_quirks.Copy()
var/list/cut
if(job && job.blacklisted_quirks)
cut = filter_quirks(quirks, job)
for(var/V in quirks)
user.add_quirk(V, spawn_effects)
if(job?.blacklisted_quirks)
cut = filter_quirks(my_quirks, job)
for(var/V in my_quirks)
if(V in quirks)
var/datum/quirk/Q = quirks[V]
user.add_quirk(Q, spawn_effects)
else
log_admin("Invalid quirk \"[V]\" in client [cli.ckey] preferences")
cli.prefs.all_quirks -= V
badquirk = TRUE
if(badquirk)
cli.prefs.save_character()
if(!silent && LAZYLEN(cut))
to_chat(to_chat_target || user, "<span class='boldwarning'>All of your non-neutral character quirks have been cut due to these quirks conflicting with your job assignment: [english_list(cut)].</span>")
@@ -56,28 +63,28 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
for(var/i in quirk_names)
. += quirk_points_by_name(i)
/datum/controller/subsystem/processing/quirks/proc/filter_quirks(list/quirks, datum/job/job)
/datum/controller/subsystem/processing/quirks/proc/filter_quirks(list/our_quirks, datum/job/job)
var/list/cut = list()
var/list/banned_names = list()
for(var/i in job.blacklisted_quirks)
var/name = quirk_name_by_path(i)
if(name)
banned_names += name
var/list/blacklisted = quirks & banned_names
var/list/blacklisted = our_quirks & banned_names
if(length(blacklisted))
for(var/i in blacklisted)
quirks -= i
our_quirks -= i
cut += i
/* //Code to automatically reduce positive quirks until balance is even.
var/points_used = total_points(quirks)
var/points_used = total_points(our_quirks)
if(points_used > 0)
//they owe us points, let's collect.
for(var/i in quirks)
for(var/i in our_quirks)
var/points = quirk_points_by_name(i)
if(points > 0)
cut += i
quirks -= i
our_quirks -= i
points_used -= points
if(points_used <= 0)
break
@@ -85,14 +92,9 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
//Nah, let's null all non-neutrals out.
if(cut.len)
for(var/i in quirks)
for(var/i in our_quirks)
if(quirk_points_by_name(i) != 0)
//cut += i -- Commented out: Only show the ones that triggered the quirk purge.
quirks -= i
our_quirks -= i
return cut
/datum/controller/subsystem/processing/quirks/proc/GenerateQuirks(client/user)
if(user.prefs.character_quirks.len)
return
user.prefs.character_quirks = user.prefs.all_quirks
+2 -2
View File
@@ -383,8 +383,8 @@ SUBSYSTEM_DEF(ticker)
captainless=0
if(player.mind.assigned_role != player.mind.special_role)
SSjob.EquipRank(N, player.mind.assigned_role, 0)
if(CONFIG_GET(flag/roundstart_traits) && ishuman(N.new_character))
SSquirks.AssignQuirks(N.new_character, N.client, TRUE, TRUE, SSjob.GetJob(player.mind.assigned_role), FALSE, N)
if(CONFIG_GET(flag/roundstart_traits) && ishuman(N.new_character))
SSquirks.AssignQuirks(N.new_character, N.client, TRUE, TRUE, SSjob.GetJob(player.mind.assigned_role), FALSE, N)
CHECK_TICK
if(captainless)
for(var/mob/dead/new_player/N in GLOB.player_list)
+3 -2
View File
@@ -1,4 +1,4 @@
#define DYNAMIC_DEFAULT_CHAOS 1.5 //The default chaos value for low pop low vote rounds
#define DYNAMIC_DEFAULT_CHAOS 1.0 //The default chaos value for low pop low vote rounds
#define DYNAMIC_VOTE_NORMALIZATION 5 //If there are fewer than this many votes, the average will be skewed towards the default
SUBSYSTEM_DEF(vote)
@@ -158,7 +158,7 @@ SUBSYSTEM_DEF(vote)
. = (total / v)
if(total == 0)//If statements down the road break if total is allowed to be 0 and it defaults to normal extended.
. = 0.1
text += "\n<b>Chaos level [obfuscated ? "???" : .]</b>"
text += "\n<b>Chaos level [.]</b>"
if(mode != "custom" && mode != "dynamic")
if(winners.len > 1 && !obfuscated) //CIT CHANGE - adds obfuscated votes
@@ -285,6 +285,7 @@ SUBSYSTEM_DEF(vote)
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("secret", "extended")
if("dynamic")
obfuscated = TRUE
choices.Add("0","1","2","3","4","5")
if("custom")
question = stripped_input(usr,"What is the vote for?")
-9
View File
@@ -158,15 +158,6 @@
else
owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect)
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
if(prob(0.05))
add_event(null, "depression", /datum/mood_event/depression)
clear_event(null, "jolly")
if(HAS_TRAIT(owner, TRAIT_JOLLY))
if(prob(0.05))
add_event(null, "jolly", /datum/mood_event/jolly)
clear_event(null, "depression")
holdmyinsanityeffect = insanity_effect
HandleNutrition(owner)
+1 -1
View File
@@ -234,7 +234,7 @@
/datum/component/storage/proc/quick_empty(mob/M)
var/atom/A = parent
if((!ishuman(M) && (A.loc != M)) || (M.stat != CONSCIOUS) || M.restrained() || !M.canmove)
if(!M.canUseStorage() || !A.Adjacent(M) || M.incapacitated())
return
if(check_locked(null, M, TRUE))
return FALSE
+10 -1
View File
@@ -24,8 +24,9 @@ GLOBAL_LIST_EMPTY(uplinks)
var/unlock_note
var/unlock_code
var/failsafe_code
var/datum/ui_state/checkstate
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
@@ -57,6 +58,7 @@ GLOBAL_LIST_EMPTY(uplinks)
active = _enabled
gamemode = _gamemode
telecrystals = starting_tc
checkstate = _checkstate
if(!lockable)
active = TRUE
locked = FALSE
@@ -115,6 +117,7 @@ GLOBAL_LIST_EMPTY(uplinks)
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
state = checkstate ? checkstate : state
active = TRUE
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -123,6 +126,12 @@ GLOBAL_LIST_EMPTY(uplinks)
ui.set_style("syndicate")
ui.open()
/datum/component/uplink/ui_host(mob/user)
if(istype(parent, /obj/item/implant)) //implants are like organs, not really located inside mobs codewise.
var/obj/item/implant/I = parent
return I.imp_in
return ..()
/datum/component/uplink/ui_data(mob/user)
if(!user.mind)
return
+27 -1
View File
@@ -1397,4 +1397,30 @@
return
var/mob/living/carbon/human/H = locate(href_list["copyoutfit"]) in GLOB.carbon_list
if(istype(H))
H.copy_outfit()
H.copy_outfit()
else if(href_list["modquirks"])
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["modquirks"]) in GLOB.mob_list
if(!istype(H))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
var/list/options = list("Clear"="Clear")
for(var/x in subtypesof(/datum/quirk))
var/datum/quirk/T = x
var/qname = initial(T.name)
options[H.has_quirk(T) ? "[qname] (Remove)" : "[qname] (Add)"] = T
var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in options
if(result)
if(result == "Clear")
for(var/datum/quirk/q in H.roundstart_quirks)
H.remove_quirk(q.type)
else
var/T = options[result]
if(H.has_quirk(T))
H.remove_quirk(T)
else
H.add_quirk(T,TRUE)
+6
View File
@@ -144,3 +144,9 @@
if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs)))
return FALSE
return ..()
/mob/living/proc/CanSpreadAirborneDisease()
return !is_mouth_covered()
/mob/living/carbon/CanSpreadAirborneDisease()
return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating("bio") >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating("bio") >= 25)))
+11 -2
View File
@@ -55,6 +55,13 @@
D.after_add()
infectee.med_hud_set_status()
var/turf/source_turf = get_turf(infectee)
log_virus("[key_name(infectee)] was infected by virus: [src.admin_details()] at [loc_name(source_turf)]")
//Return a string for admin logging uses, should describe the disease in detail
/datum/disease/proc/admin_details()
return "[src.name] : [src.type]"
/datum/disease/proc/stage_act()
var/cure = has_cure()
@@ -65,15 +72,17 @@
if(!cure)
if(prob(stage_prob))
stage = min(stage + 1,max_stages)
update_stage(min(stage + 1,max_stages))
else
if(prob(cure_chance))
stage = max(stage - 1, 1)
update_stage(max(stage - 1, 1))
if(disease_flags & CURABLE)
if(cure && prob(cure_chance))
cure()
/datum/disease/proc/update_stage(new_stage)
stage = new_stage
/datum/disease/proc/has_cure()
if(!(disease_flags & CURABLE))
+31 -17
View File
@@ -31,9 +31,9 @@
var/id = ""
var/processing = FALSE
var/mutable = TRUE //set to FALSE to prevent most in-game methods of altering the disease via virology
var/oldres
var/oldres //To prevent setting new cures unless resistance changes.
// The order goes from easy to cure to hard to cure.
// The order goes from easy to cure to hard to cure. Keep in mind that sentient diseases pick two cures from tier 6 and up, ensure they wont react away in bodies.
var/static/list/advance_cures = list(
list( // level 1
"copper", "silver", "iodine", "iron", "carbon"
@@ -110,15 +110,22 @@
return
if(symptoms && symptoms.len)
if(!processing)
processing = TRUE
for(var/datum/symptom/S in symptoms)
S.Start(src)
if(S.Start(src)) //this will return FALSE if the symptom is neutered
S.next_activation = world.time + rand(S.symptom_delay_min * 10, S.symptom_delay_max * 10)
S.on_stage_change(src)
for(var/datum/symptom/S in symptoms)
S.Activate(src)
// Tell symptoms stage changed
/datum/disease/advance/update_stage(new_stage)
..()
for(var/datum/symptom/S in symptoms)
S.on_stage_change(src)
// Compares type then ID.
/datum/disease/advance/IsSame(datum/disease/advance/D)
@@ -137,10 +144,16 @@
A.symptoms += S.Copy()
A.properties = properties.Copy()
A.id = id
A.mutable = mutable
A.oldres = oldres
//this is a new disease starting over at stage 1, so processing is not copied
return A
//Describe this disease to an admin in detail (for logging)
/datum/disease/advance/admin_details()
var/list/name_symptoms = list()
for(var/datum/symptom/S in symptoms)
name_symptoms += S.name
return "[name] sym:[english_list(name_symptoms)] r:[totalResistance()] s:[totalStealth()] ss:[totalStageSpeed()] t:[totalTransmittable()]"
/*
NEW PROCS
@@ -191,6 +204,10 @@
/datum/disease/advance/proc/Refresh(new_name = FALSE)
GenerateProperties()
AssignProperties()
if(processing && symptoms && symptoms.len)
for(var/datum/symptom/S in symptoms)
S.Start(src)
S.on_stage_change(src)
id = null
var/the_id = GetDiseaseID()
@@ -342,28 +359,28 @@
return id
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
// we take a random symptom away and add the new one.
// Add a symptom, if it is over the limit we take a random symptom away and add the new one.
/datum/disease/advance/proc/AddSymptom(datum/symptom/S)
if(HasSymptom(S))
return
if(symptoms.len < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1))
symptoms += S
else
if(!(symptoms.len < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1)))
RemoveSymptom(pick(symptoms))
symptoms += S
symptoms += S
S.OnAdd(src)
// Simply removes the symptom.
/datum/disease/advance/proc/RemoveSymptom(datum/symptom/S)
symptoms -= S
S.OnRemove(src)
// Neuter a symptom, so it will only affect stats
/datum/disease/advance/proc/NeuterSymptom(datum/symptom/S)
if(!S.neutered)
S.neutered = TRUE
S.name += " (neutered)"
S.OnRemove(src)
/*
@@ -417,7 +434,7 @@
var/i = VIRUS_SYMPTOM_LIMIT
var/datum/disease/advance/D = new(0, null)
var/datum/disease/advance/D = new()
D.symptoms = list()
var/list/symptoms = list()
@@ -444,10 +461,6 @@
return
D.AssignName(new_name)
D.Refresh()
for(var/datum/disease/advance/AD in SSdisease.active_diseases)
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!is_station_level(H.z))
continue
@@ -458,7 +471,8 @@
var/list/name_symptoms = list()
for(var/datum/symptom/S in D.symptoms)
name_symptoms += S.name
message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.admin_details()]")
log_virus("[key_name(user)] has triggered a custom virus outbreak of [D.admin_details()]!")
/datum/disease/advance/proc/totalStageSpeed()
@@ -70,6 +70,6 @@ BONUS
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 6)
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 12)
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 18)
if(infective)
if(infective && M.CanSpreadAirborneDisease())
A.spread(1)
@@ -219,8 +219,10 @@
level = 8
passive_message = "<span class='notice'>The pain from your wounds makes you feel oddly sleepy...</span>"
var/deathgasp = FALSE
var/stabilize = FALSE
var/active_coma = FALSE //to prevent multiple coma procs
threshold_desc = "<b>Stealth 2:</b> Host appears to die when falling into a coma.<br>\
<b>Resistance 4:</b> The virus also stabilizes the host while they are in critical condition.<br>\
<b>Stage Speed 7:</b> Increases healing speed."
/datum/symptom/heal/coma/Start(datum/disease/advance/A)
@@ -228,9 +230,25 @@
return
if(A.properties["stage_rate"] >= 7)
power = 1.5
if(A.properties["resistance"] >= 4)
stabilize = TRUE
if(A.properties["stealth"] >= 2)
deathgasp = TRUE
/datum/symptom/heal/coma/on_stage_change(datum/disease/advance/A) //mostly copy+pasted from the code for self-respiration's TRAIT_NOBREATH stuff
if(!..())
return FALSE
if(A.stage >= 4 && stabilize)
ADD_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT)
else
REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT)
return TRUE
/datum/symptom/heal/coma/End(datum/disease/advance/A)
if(!..())
return
REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT)
/datum/symptom/heal/coma/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
if(HAS_TRAIT(M, TRAIT_DEATHCOMA))
@@ -427,6 +445,7 @@
power = 2
if(A.properties["transmittable"] >= 6)
cellular_damage = TRUE
ADD_TRAIT(A.affected_mob, TRAIT_RADRESONANCE, DISEASE_TRAIT)
/datum/symptom/heal/radiation/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
@@ -464,3 +483,8 @@
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
M.update_damage_overlays()
return 1
/datum/symptom/heal/radiation/End(datum/disease/advance/A)
if(!..())
return
REMOVE_TRAIT(A.affected_mob, TRAIT_RADRESONANCE, DISEASE_TRAIT)
@@ -50,3 +50,19 @@ Bonus
if(prob(base_message_chance))
to_chat(M, "<span class='notice'>[pick("Your lungs feel great.", "You realize you haven't been breathing.", "You don't feel the need to breathe.")]</span>")
return
/datum/symptom/oxygen/on_stage_change(datum/disease/advance/A)
if(!..())
return FALSE
var/mob/living/carbon/M = A.affected_mob
if(A.stage >= 4)
ADD_TRAIT(M, TRAIT_NOBREATH, DISEASE_TRAIT)
else
REMOVE_TRAIT(M, TRAIT_NOBREATH, DISEASE_TRAIT)
return TRUE
/datum/symptom/oxygen/End(datum/disease/advance/A)
if(!..())
return
if(A.stage >= 4)
REMOVE_TRAIT(A.affected_mob, TRAIT_NOBREATH, DISEASE_TRAIT)
@@ -48,4 +48,5 @@ Bonus
M.emote("sniff")
else
M.emote("sneeze")
A.spread(4 + power)
if(M.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth
A.spread(4 + power)
@@ -8,12 +8,14 @@
level = 5
severity = 0
/datum/symptom/undead_adaptation/Start(datum/disease/advance/A)
if(!..())
return
/datum/symptom/undead_adaptation/OnAdd(datum/disease/advance/A)
A.process_dead = TRUE
A.infectable_biotypes |= MOB_UNDEAD
/datum/symptom/undead_adaptation/OnRemove(datum/disease/advance/A)
A.process_dead = FALSE
A.infectable_biotypes -= MOB_UNDEAD
/datum/symptom/inorganic_adaptation
name = "Inorganic Biology"
desc = "The virus can survive and replicate even in an inorganic environment, increasing its resistance and infection rate."
@@ -24,8 +26,8 @@
level = 5
severity = 0
/datum/symptom/inorganic_adaptation/Start(datum/disease/advance/A)
if(!..())
return
/datum/symptom/inorganic_adaptation/OnAdd(datum/disease/advance/A)
A.infectable_biotypes |= MOB_INORGANIC
/datum/symptom/inorganic_adaptation/OnRemove(datum/disease/advance/A)
A.infectable_biotypes -= MOB_INORGANIC
@@ -38,11 +38,10 @@
return
CRASH("We couldn't assign an ID!")
// Called when processing of the advance disease, which holds this symptom, starts.
// Called when processing of the advance disease that holds this symptom infects a host and upon each Refresh() of that advance disease.
/datum/symptom/proc/Start(datum/disease/advance/A)
if(neutered)
return FALSE
next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10) //so it doesn't instantly activate on infection
return TRUE
// Called when the advance disease is going to be deleted or when the advance disease stops processing.
@@ -60,6 +59,11 @@
next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10)
return TRUE
/datum/symptom/proc/on_stage_change(datum/disease/advance/A)
if(neutered)
return FALSE
return TRUE
/datum/symptom/proc/Copy()
var/datum/symptom/new_symp = new type
new_symp.name = name
@@ -69,3 +73,9 @@
/datum/symptom/proc/generate_threshold_desc()
return
/datum/symptom/proc/OnAdd(datum/disease/advance/A) //Overload when a symptom needs to be active before processing, like changing biotypes.
return
/datum/symptom/proc/OnRemove(datum/disease/advance/A) //But dont forget to remove them too.
return
+2
View File
@@ -45,6 +45,7 @@
destination.dna.uni_identity = uni_identity
destination.dna.blood_type = blood_type
destination.set_species(species.type, icon_update=0)
destination.dna.species.say_mod = species.say_mod
destination.dna.features = features.Copy()
destination.dna.real_name = real_name
destination.dna.nameless = nameless
@@ -64,6 +65,7 @@
new_dna.blood_type = blood_type
new_dna.features = features.Copy()
new_dna.species = new species.type
new_dna.species.say_mod = species.say_mod
new_dna.real_name = real_name
new_dna.nameless = nameless
new_dna.custom_species = custom_species
+1 -1
View File
@@ -167,7 +167,7 @@
release()
/obj/item/clothing/head/mob_holder/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
if(!ishuman(M)) //monkeys holding monkeys holding monkeys...
if(M == held_mob || !ishuman(M)) //monkeys holding monkeys holding monkeys...
return FALSE
return ..()
+1
View File
@@ -27,6 +27,7 @@ GLOBAL_LIST_INIT(huds, list(
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
ANTAG_HUD_BROTHER = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_BLOODSUCKER = new/datum/atom_hud/antag/bloodsucker()
))
/datum/atom_hud
+5 -4
View File
@@ -364,13 +364,15 @@
output += memory
var/list/all_objectives = list()
for(var/datum/antagonist/A in antag_datums)
output += A.antag_memory
all_objectives |= A.objectives
if(objectives.len)
if(all_objectives.len)
output += "<B>Objectives:</B>"
var/obj_count = 1
for(var/datum/objective/objective in objectives)
for(var/datum/objective/objective in all_objectives)
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
var/list/datum/mind/other_owners = objective.get_owners() - src
if(other_owners.len)
@@ -586,14 +588,12 @@
new_objective.owner = src
new_objective.target = null
new_objective.explanation_text = "Free lewd objective"
objectives += new_objective
else
new_objective = new objective_path
new_objective.owner = src
new_objective.target = new_target.mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.update_explanation_text()
objectives += new_objective
if ("custom")
var/expl = stripped_input(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : "")
@@ -610,6 +610,7 @@
if(target_antag)
target_antag.objectives -= objective
objectives -= objective
objectives += new_objective
target_antag.objectives.Insert(objective_pos, new_objective)
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
@@ -175,4 +175,49 @@
mood_change = -5
/datum/mood_event/revenant_blight/add_effects()
description = "<span class='umbra'>Just give up, [pick("no one will miss you", "there is nothing you can do to help", "even a clown would be more useful than you", "does it even matter in the end?")]...</span>\n"
description = "<span class='umbra'>Just give up, [pick("no one will miss you", "there is nothing you can do to help", "even a clown would be more useful than you", "does it even matter in the end?")]...</span>\n"
/datum/mood_event/vampcandle
description = "<span class='umbra'>Something is making your mind feel... loose...</span>\n"
mood_change = -15
timeout = 1 MINUTES
/datum/mood_event/drankblood_bad
description = "<span class='boldwarning'>I drank the blood of a lesser creature. Disgusting.</span>\n"
mood_change = -3
timeout = 8 MINUTES
/datum/mood_event/drankblood_dead
description = "<span class='boldwarning'>I drank dead blood. I am better than this.</span>\n"
mood_change = -5
timeout = 10 MINUTES
/datum/mood_event/drankblood_synth
description = "<span class='boldwarning'>I drank synthetic blood. What is wrong with me?</span>\n"
mood_change = -7
timeout = 15 MINUTES
/datum/mood_event/drankkilled
description = "<span class='boldwarning'>I drank from my victim until they died. I feel...less human.</span>\n"
mood_change = -10
timeout = 25 MINUTES
/datum/mood_event/madevamp
description = "<span class='boldwarning'>A soul has been cursed to undeath by my own hand.</span>\n"
mood_change = -10
timeout = 10 MINUTES
/datum/mood_event/vampatefood
description = "<span class='boldwarning'>Mortal nourishment no longer sustains me. I feel unwell.</span>\n"
mood_change = -6
timeout = 10 MINUTES
/datum/mood_event/daylight_1
description = "<span class='boldwarning'>I slept poorly in a makeshift coffin during the day.</span>\n"
mood_change = -3
timeout = 10 MINUTES
/datum/mood_event/daylight_2
description = "<span class='boldwarning'>I have been scorched by the unforgiving rays of the sun.</span>\n"
mood_change = -6
timeout = 15 MINUTES
@@ -127,7 +127,7 @@
mood_change = 2
timeout = 15 MINUTES
//Power gamer stuff below
//Bloodsucker stuff below.
/datum/mood_event/drankblood
description = "<span class='nicegreen'>I have fed greedly from that which nourishes me.</span>\n"
mood_change = 10
@@ -51,45 +51,46 @@
if(copymut && istype(copymut, /datum/mutation/human))
copy_mutation(copymut)
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner)
if(!owner || !istype(owner) || owner.stat == DEAD || (src in owner.dna.mutations))
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/H)
if(!H || !istype(H) || H.stat == DEAD || (src in H.dna.mutations))
return TRUE
if(species_allowed.len && !species_allowed.Find(owner.dna.species.id))
if(species_allowed.len && !species_allowed.Find(H.dna.species.id))
return TRUE
if(health_req && owner.health < health_req)
if(health_req && H.health < health_req)
return TRUE
if(limb_req && !owner.get_bodypart(limb_req))
if(limb_req && !H.get_bodypart(limb_req))
return TRUE
dna = owner.dna
owner = H
dna = H.dna
dna.mutations += src
if(text_gain_indication)
to_chat(owner, text_gain_indication)
to_chat(H, text_gain_indication)
if(visual_indicators.len)
var/list/mut_overlay = list(get_visual_indicator(owner))
if(owner.overlays_standing[layer_used])
mut_overlay = owner.overlays_standing[layer_used]
mut_overlay |= get_visual_indicator(owner)
owner.remove_overlay(layer_used)
owner.overlays_standing[layer_used] = mut_overlay
owner.apply_overlay(layer_used)
var/list/mut_overlay = list(get_visual_indicator())
if(H.overlays_standing[layer_used])
mut_overlay = H.overlays_standing[layer_used]
mut_overlay |= get_visual_indicator()
H.remove_overlay(layer_used)
H.overlays_standing[layer_used] = mut_overlay
H.apply_overlay(layer_used)
grant_spell(owner)
grant_spell()
if(!modified)
addtimer(CALLBACK(src, .proc/modify, 5)) //gonna want children calling ..() to run first
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
/datum/mutation/human/proc/get_visual_indicator()
return
/datum/mutation/human/proc/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
/datum/mutation/human/proc/on_attack_hand(atom/target, proximity)
return
/datum/mutation/human/proc/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
/datum/mutation/human/proc/on_ranged_attack(atom/target, mouseparams)
return
/datum/mutation/human/proc/on_move(mob/living/carbon/human/owner, new_loc)
/datum/mutation/human/proc/on_move(atom/new_loc)
return
/datum/mutation/human/proc/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/proc/on_life()
return
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
@@ -172,7 +173,7 @@
else
qdel(src)
/datum/mutation/human/proc/grant_spell(mob/living/carbon/human/owner)
/datum/mutation/human/proc/grant_spell()
if(!ispath(power) || !owner)
return FALSE
@@ -180,4 +181,4 @@
power.action_background_icon_state = "bg_tech_blue_on"
power.panel = "Genetic"
owner.AddSpell(power)
return TRUE
return TRUE
+1 -1
View File
@@ -90,7 +90,7 @@
energy_coeff = 1
synchronizer_coeff = 1
/datum/mutation/human/void/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/void/on_life()
if(!isturf(owner.loc))
return
if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
+3 -3
View File
@@ -35,7 +35,7 @@
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))//-MUTATIONS_LAYER+1
/datum/mutation/human/antenna/get_visual_indicator(mob/living/carbon/human/owner)
/datum/mutation/human/antenna/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/mindreader
@@ -103,5 +103,5 @@
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))
/datum/mutation/human/mindreader/get_visual_indicator(mob/living/carbon/human/owner)
return visual_indicators[type][1]
/datum/mutation/human/mindreader/get_visual_indicator()
return visual_indicators[type][1]
+5 -5
View File
@@ -9,7 +9,7 @@
synchronizer_coeff = 1
power_coeff = 1
/datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/epilepsy/on_life()
if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
owner.visible_message("<span class='danger'>[owner] starts having a seizure!</span>", "<span class='userdanger'>You have a seizure!</span>")
owner.Unconscious(200 * GET_MUTATION_POWER(src))
@@ -57,7 +57,7 @@
synchronizer_coeff = 1
power_coeff = 1
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/cough/on_life()
if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
owner.drop_all_held_items()
owner.emote("cough")
@@ -143,7 +143,7 @@
text_gain_indication = "<span class='danger'>You twitch.</span>"
synchronizer_coeff = 1
/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/tourettes/on_life()
if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun())
owner.Stun(200)
switch(rand(1, 3))
@@ -237,7 +237,7 @@
synchronizer_coeff = 1
power_coeff = 1
/datum/mutation/human/fire/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/fire/on_life()
if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src))
owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src))
owner.IgniteMob()
@@ -278,7 +278,7 @@
text_gain_indication = "<span class='danger'>You feel screams echo through your mind...</span>"
text_lose_indication = "<span class'notice'>The screaming in your mind fades.</span>"
/datum/mutation/human/paranoia/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/paranoia/on_life()
if(prob(5) && owner.stat == CONSCIOUS)
owner.emote("scream")
owner.jitteriness = min(max(0, owner.jitteriness + 5), 30)
+3 -3
View File
@@ -14,13 +14,13 @@
return
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
/datum/mutation/human/chameleon/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/chameleon/on_life()
owner.alpha = max(0, owner.alpha - 25)
/datum/mutation/human/chameleon/on_move(mob/living/carbon/human/owner)
/datum/mutation/human/chameleon/on_move(atom/new_loc)
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
/datum/mutation/human/chameleon/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
/datum/mutation/human/chameleon/on_attack_hand(atom/target, proximity)
if(proximity) //stops tk from breaking chameleon
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
return
+1 -1
View File
@@ -13,7 +13,7 @@
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER))
/datum/mutation/human/space_adaptation/get_visual_indicator(mob/living/carbon/human/owner)
/datum/mutation/human/space_adaptation/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner)
+1 -1
View File
@@ -7,7 +7,7 @@
instability = 5
difficulty = 8
/datum/mutation/human/radioactive/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/radioactive/on_life()
radiation_pulse(owner, 20)
/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
+1 -1
View File
@@ -7,7 +7,7 @@
quality = MINOR_NEGATIVE
text_gain_indication = "<span class='danger'>You feel nervous.</span>"
/datum/mutation/human/nervousness/on_life(mob/living/carbon/human/owner)
/datum/mutation/human/nervousness/on_life()
if(prob(10))
owner.stuttering = max(10, owner.stuttering)
+3 -3
View File
@@ -13,8 +13,8 @@
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER))
/datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner)
/datum/mutation/human/telekinesis/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
target.attack_tk(owner)
/datum/mutation/human/telekinesis/on_ranged_attack(atom/target, mouseparams)
target.attack_tk(owner)
+1 -1
View File
@@ -104,7 +104,7 @@
H.update_action_buttons_icon()
if(implants)
for(var/implant_type in implants)
var/obj/item/implant/I = new implant_type(H)
var/obj/item/implant/I = new implant_type
I.implant(H, null, TRUE)
H.update_body()
+8
View File
@@ -233,3 +233,11 @@
suffix = "lavaland_surface_oasis.dmm"
allow_duplicates = FALSE
cost = 0
/datum/map_template/ruin/lavaland/lunaraltar
name = "Lunar Altar"
id = "lunaraltar"
description = "Millenia ago, the humanoids of this strange land used to offer sacrifices here..."
suffix = "lavaland_surface_lunaraltar.dmm"
allow_duplicates = FALSE
cost = 10
+38 -8
View File
@@ -81,33 +81,63 @@
icon_state = "asleep"
//TASER
/datum/status_effect/electrode
id = "tased"
/datum/status_effect/no_combat_mode/
id = "no_combat_mode"
blocks_combatmode = TRUE
status_type = STATUS_EFFECT_REPLACE
alert_type = null
status_type = STATUS_EFFECT_REPLACE
/datum/status_effect/electrode/on_creation(mob/living/new_owner, set_duration)
/datum/status_effect/no_combat_mode/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(C.combatmode)
C.toggle_combat_mode(TRUE)
/datum/status_effect/no_combat_mode/mesmerize
id = "Mesmerize"
alert_type = /obj/screen/alert/status_effect/mesmerized
/datum/status_effect/no_combat_mode/mesmerize/on_creation(mob/living/new_owner, set_duration)
. = ..()
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
/datum/status_effect/no_combat_mode/mesmerize/on_remove()
. = ..()
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
/obj/screen/alert/status_effect/mesmerized
name = "Mesmerized"
desc = "You cant tear your sight from who is in front of you...Their gaze is simply too enthralling.."
icon = 'icons/mob/actions/bloodsucker.dmi'
icon_state = "power_mez"
/datum/status_effect/no_combat_mode/electrode
id = "tased"
/datum/status_effect/no_combat_mode/electrode/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration)) //TODO, figure out how to grab from subtype
duration = set_duration
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(C.combatmode)
C.toggle_combat_mode(TRUE)
C.add_movespeed_modifier(MOVESPEED_ID_TASED_STATUS, TRUE, override = TRUE, multiplicative_slowdown = 8)
/datum/status_effect/electrode/on_remove()
/datum/status_effect/no_combat_mode/electrode/on_remove()
if(iscarbon(owner))
var/mob/living/carbon/C = owner
C.remove_movespeed_modifier(MOVESPEED_ID_TASED_STATUS)
. = ..()
/datum/status_effect/electrode/tick()
/datum/status_effect/no_combat_mode/electrode/tick()
if(owner)
owner.adjustStaminaLoss(5) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing.
/datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y
/datum/status_effect/no_combat_mode/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y
return 2
//STASIS
@@ -698,4 +728,4 @@ datum/status_effect/pacify
/obj/screen/alert/status_effect/dna_melt
name = "Genetic Breakdown"
desc = "I don't feel so good. Your body can't handle the mutations! You have one minute to remove your mutations, or you will be met with a horrible fate."
icon_state = "dna_melt"
icon_state = "dna_melt"
+19
View File
@@ -8,12 +8,14 @@
mob_trait = TRAIT_ALCOHOL_TOLERANCE
gain_text = "<span class='notice'>You feel like you could drink a whole keg!</span>"
lose_text = "<span class='danger'>You don't feel as resistant to alcohol anymore. Somehow.</span>"
medical_record_text = "Patient demonstrates a high tolerance for alcohol."
/datum/quirk/apathetic
name = "Apathetic"
desc = "You just don't care as much as other people. That's nice to have in a place like this, I guess."
value = 1
mood_quirk = TRUE
medical_record_text = "Patient was administered the Apathy Evaluation Scale but did not bother to complete it."
/datum/quirk/apathetic/add()
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
@@ -42,6 +44,7 @@
mob_trait = TRAIT_EMPATH
gain_text = "<span class='notice'>You feel in tune with those around you.</span>"
lose_text = "<span class='danger'>You feel isolated from others.</span>"
medical_record_text = "Patient is highly perceptive of and sensitive to social cues, or may possibly have ESP. Further testing needed."
/datum/quirk/freerunning
name = "Freerunning"
@@ -50,6 +53,7 @@
mob_trait = TRAIT_FREERUNNING
gain_text = "<span class='notice'>You feel lithe on your feet!</span>"
lose_text = "<span class='danger'>You feel clumsy again.</span>"
medical_record_text = "Patient scored highly on cardio tests."
/datum/quirk/friendly
name = "Friendly"
@@ -59,6 +63,7 @@
gain_text = "<span class='notice'>You want to hug someone.</span>"
lose_text = "<span class='danger'>You no longer feel compelled to hug others.</span>"
mood_quirk = TRUE
medical_record_text = "Patient demonstrates low-inhibitions for physical contact and well-developed arms. Requesting another doctor take over this case."
/datum/quirk/jolly
name = "Jolly"
@@ -66,6 +71,11 @@
value = 1
mob_trait = TRAIT_JOLLY
mood_quirk = TRUE
medical_record_text = "Patient demonstrates constant euthymia irregular for environment. It's a bit much, to be honest."
/datum/quirk/jolly/on_process()
if(prob(0.05))
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "jolly", /datum/mood_event/jolly)
/datum/quirk/light_step
name = "Light Step"
@@ -74,6 +84,7 @@
mob_trait = TRAIT_LIGHT_STEP
gain_text = "<span class='notice'>You walk with a little more litheness.</span>"
lose_text = "<span class='danger'>You start tromping around like a barbarian.</span>"
medical_record_text = "Patient's dexterity belies a strong capacity for stealth."
/datum/quirk/quick_step
name = "Quick Step"
@@ -82,6 +93,7 @@
mob_trait = TRAIT_SPEEDY_STEP
gain_text = "<span class='notice'>You feel determined. No time to lose.</span>"
lose_text = "<span class='danger'>You feel less determined. What's the rush, man?</span>"
medical_record_text = "Patient scored highly on racewalking tests."
/datum/quirk/musician
name = "Musician"
@@ -90,6 +102,7 @@
mob_trait = TRAIT_MUSICIAN
gain_text = "<span class='notice'>You know everything about musical instruments.</span>"
lose_text = "<span class='danger'>You forget how musical instruments work.</span>"
medical_record_text = "Patient brain scans show a highly-developed auditory pathway."
/datum/quirk/musician/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
@@ -131,6 +144,7 @@
mob_trait = TRAIT_PHOTOGRAPHER
gain_text = "<span class='notice'>You know everything about photography.</span>"
lose_text = "<span class='danger'>You forget how photo cameras work.</span>"
medical_record_text = "Patient mentions photography as a stress-relieving hobby."
/datum/quirk/photographer/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
@@ -150,6 +164,7 @@
desc = "You know your body well, and can accurately assess the extent of your wounds."
value = 2
mob_trait = TRAIT_SELF_AWARE
medical_record_text = "Patient demonstrates an uncanny knack for self-diagnosis."
/datum/quirk/skittish
name = "Skittish"
@@ -164,6 +179,7 @@
mob_trait = TRAIT_SPIRITUAL
gain_text = "<span class='notice'>You feel a little more faithful to the gods today.</span>"
lose_text = "<span class='danger'>You feel less faithful in the gods.</span>"
medical_record_text = "Patient reports a belief in a higher power."
/datum/quirk/tagger
name = "Tagger"
@@ -172,6 +188,7 @@
mob_trait = TRAIT_TAGGER
gain_text = "<span class='notice'>You know how to tag walls efficiently.</span>"
lose_text = "<span class='danger'>You forget how to tag walls properly.</span>"
medical_record_text = "Patient was recently seen for possible paint huffing incident."
/datum/quirk/tagger/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
@@ -192,6 +209,7 @@
mob_trait = TRAIT_VORACIOUS
gain_text = "<span class='notice'>You feel HONGRY.</span>"
lose_text = "<span class='danger'>You no longer feel HONGRY.</span>"
medical_record_text = "Patient demonstrates a disturbing capacity for eating."
/datum/quirk/trandening
name = "High Luminosity Eyes"
@@ -219,6 +237,7 @@
mob_trait = TRAIT_HIGH_BLOOD
gain_text = "<span class='notice'>You feel full of blood!</span>"
lose_text = "<span class='notice'>You feel like your blood pressure went down.</span>"
medical_record_text = "Patient's blood tests report an abnormal concentration of red blood cells in their bloodstream."
/datum/quirk/bloodpressure/add()
quirk_holder.blood_ratio = 1.2
+13 -6
View File
@@ -22,14 +22,19 @@
value = -1
gain_text = "<span class='danger'>You start feeling depressed.</span>"
lose_text = "<span class='notice'>You no longer feel depressed.</span>" //if only it were that easy!
medical_record_text = "Patient has a severe mood disorder causing them to experience sudden moments of sadness."
medical_record_text = "Patient has a severe mood disorder, causing them to experience acute episodes of depression."
mood_quirk = TRUE
/datum/quirk/depression/on_process()
if(prob(0.05))
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "depression", /datum/mood_event/depression)
/datum/quirk/family_heirloom
name = "Family Heirloom"
desc = "You are the current owner of an heirloom, passed down for generations. You have to keep it safe!"
value = -1
mood_quirk = TRUE
medical_record_text = "Patient demonstrates an unnatural attachment to a family heirloom."
var/obj/item/heirloom
var/where
@@ -155,14 +160,15 @@
/datum/quirk/nearsighted/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H))
H.put_in_hands(glasses)
H.equip_to_slot(glasses, SLOT_GLASSES)
if(!H.equip_to_slot_if_possible(glasses, SLOT_GLASSES))
H.put_in_hands(glasses)
H.regenerate_icons() //this is to remove the inhand icon, which persists even if it's not in their hands
/datum/quirk/nyctophobia
name = "Nyctophobia"
desc = "As far as you can remember, you've always been afraid of the dark. While in the dark without a light source, you instinctually act careful, and constantly feel a sense of dread."
value = -1
medical_record_text = "Patient demonstrates a fear of the dark. (Seriously?)"
/datum/quirk/nyctophobia/on_process()
var/mob/living/carbon/human/H = quirk_holder
@@ -183,7 +189,8 @@
desc = "Bright lights irritate you. Your eyes start to water, your skin feels itchy against the photon radiation, and your hair gets dry and frizzy. Maybe it's a medical condition. If only Kinaris was more considerate of your needs..."
value = -1
gain_text = "<span class='danger'>The safety of light feels off...</span>"
lose_text = "<span class='notice'>Enlighing.</span>"
lose_text = "<span class='notice'>Enlightening.</span>"
medical_record_text = "Despite my warnings, the patient refuses turn on the lights, only to end up rolling down a full flight of stairs and into the cellar."
/datum/quirk/lightless/on_process()
var/turf/T = get_turf(quirk_holder)
@@ -461,5 +468,5 @@
H.maxHealth = H.maxHealth * 0.8
/datum/quirk/flimsy/remove() //how do admins even remove traits?
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth += healthchange
if(quirk_holder)
quirk_holder.maxHealth += healthchange
+3
View File
@@ -39,6 +39,7 @@
value = 0
gain_text = "<span class='notice'>You feel an intense craving for pineapple.</span>"
lose_text = "<span class='notice'>Your feelings towards pineapples seem to return to a lukewarm state.</span>"
medical_record_text = "Patient demonstrates a pathological love of pineapple."
/datum/quirk/pineapple_liker/add()
var/mob/living/carbon/human/H = quirk_holder
@@ -57,6 +58,7 @@
value = 0
gain_text = "<span class='notice'>You find yourself pondering what kind of idiot actually enjoys pineapples...</span>"
lose_text = "<span class='notice'>Your feelings towards pineapples seem to return to a lukewarm state.</span>"
medical_record_text = "Patient is correct to think that pineapple is disgusting."
/datum/quirk/pineapple_hater/add()
var/mob/living/carbon/human/H = quirk_holder
@@ -75,6 +77,7 @@
value = 0
gain_text = "<span class='notice'>You start craving something that tastes strange.</span>"
lose_text = "<span class='notice'>You feel like eating normal food again.</span>"
medical_record_text = "Patient demonstrates irregular nutrition preferences."
/datum/quirk/deviant_tastes/add()
var/mob/living/carbon/human/H = quirk_holder
+2 -2
View File
@@ -86,8 +86,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
var/turf/picked = AR.contents[1]
if (picked && is_station_level(picked.z))
GLOB.teleportlocs[AR.name] = AR
sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
if(GLOB.teleportlocs.len) //DON'T TRY TO TIMSORT THINGS THAT HAVE NOTHING. FUCK.
sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
// ===
+5
View File
@@ -252,6 +252,11 @@
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
. = P.on_hit(src, 0, def_zone)
//used on altdisarm() for special interactions between the shoved victim (target) and the src, with user being the one shoving the target on it.
// IMPORTANT: if you wish to add a new own shove_act() to a certain object, remember to add SHOVABLE_ONTO to its obj_flags bitfied var first.
/atom/proc/shove_act(mob/living/target, mob/living/user)
return FALSE
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
if(istype(src.loc, container))
@@ -0,0 +1,292 @@
/datum/game_mode
var/list/datum/mind/bloodsuckers = list() // List of minds belonging to this game mode.
var/list/datum/mind/vassals = list() // List of minds that have been turned into Vassals.
//var/list/datum/mind/vamphunters = list() // List of minds hunting vampires. Disabled at the moment
var/obj/effect/sunlight/bloodsucker_sunlight // Sunlight Timer. Created on first Bloodsucker assign. Destroyed on last removed Bloodsucker.
// LISTS //
var/list/vassal_allowed_antags = list(/datum/antagonist/brother, /datum/antagonist/traitor, /datum/antagonist/traitor/internal_affairs, /datum/antagonist/survivalist, \
/datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee)
// The antags you're allowed to be if turning Vassal.
/datum/game_mode/bloodsucker
name = "bloodsucker"
config_tag = "bloodsucker"
traitor_name = "Bloodsucker"
antag_flag = ROLE_BLOODSUCKER
false_report_weight = 1
restricted_jobs = list("AI","Cyborg")
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_players = 20
required_enemies = 2
recommended_enemies = 4
reroll_friendly = FALSE
enemy_minimum_age = 7
round_ends_with_antag_death = FALSE
announce_span = "danger"
announce_text = "Filthy, bloodsucking vampires are crawling around disguised as crewmembers!\n\
<span class='danger'>Bloodsuckers</span>: The crew are cattle, while you are both shepherd and slaughterhouse.\n\
<span class='notice'>Crew</span>: Put an end to the undead infestation before the station is overcome!"
/datum/game_mode/bloodsucker/generate_report()
return "Reports indicate that some of your crew may have toppled statues in the past week, angering the gods and becoming cursed with undeath and a desire for blood. Watch out for crewmembers that seem to shun the light or are found pale and delirious."
// Seems to be run by game ONCE, and finds all potential players to be antag.
/datum/game_mode/bloodsucker/pre_setup()
// Set Restricted Jobs
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
restricted_jobs += "Assistant"
// Set number of Vamps
recommended_enemies = CLAMP(round(num_players()/10), 1, 6);
// Select Antags
for(var/i = 0, i < recommended_enemies, i++)
if (!antag_candidates.len)
break
var/datum/mind/bloodsucker = pick(antag_candidates)
// Can we even BE a bloodsucker?
//if (can_make_bloodsucker(bloodsucker, display_warning=FALSE))
bloodsuckers += bloodsucker
bloodsucker.restricted_roles = restricted_jobs
log_game("[bloodsucker.key] (ckey) has been selected as a Bloodsucker.")
antag_candidates.Remove(bloodsucker) // Apparently you can also write antag_candidates -= bloodsucker
// Assign Hunters (as many as monsters, plus one)
//assign_monster_hunters(bloodsuckers.len, TRUE, bloodsuckers) // Disabled for now
// Do we have enough vamps to continue?
return bloodsuckers.len >= required_enemies
// Gamemode is all done being set up. We have all our Vamps. We now pick objectives and let them know what's happening.
/datum/game_mode/bloodsucker/post_setup()
// Sunlight (Creating Bloodsuckers manually will check to create this, too)
check_start_sunlight()
// Vamps
for(var/datum/mind/bloodsucker in bloodsuckers)
// spawn() --> Run block of code but game continues on past it.
// sleep() --> Run block of code and freeze code there (including whoever called us) until it's resolved.
//Clean Bloodsucker Species (racist?)
//clean_invalid_species(bloodsucker)
// TO-DO !!!
// Add Bloodsucker Antag Datum (or remove from list on Fail)
if (!make_bloodsucker(bloodsucker))
bloodsuckers -= bloodsucker
// NOTE: Hunters are done in ..() parent proc
return ..()
// Checking for ACTUALLY Dead Vamps
/datum/game_mode/bloodsucker/are_special_antags_dead()
// Bloodsucker not Final Dead
for(var/datum/mind/bloodsucker in bloodsuckers)
if(!bloodsucker.AmFinalDeath())
return FALSE
return TRUE
// Init Sunlight (called from datum_bloodsucker.on_gain(), in case game mode isn't even Bloodsucker
/datum/game_mode/proc/check_start_sunlight()
// Already Sunlight (and not about to cancel)
if (istype(bloodsucker_sunlight) && !bloodsucker_sunlight.cancel_me)
return
bloodsucker_sunlight = new ()
// End Sun (last bloodsucker removed)
/datum/game_mode/proc/check_cancel_sunlight()
// No Sunlight
if (!istype(bloodsucker_sunlight))
return
if (bloodsuckers.len <= 0)
bloodsucker_sunlight.cancel_me = TRUE
qdel(bloodsucker_sunlight)
bloodsucker_sunlight = null
/datum/game_mode/proc/is_daylight()
return istype(bloodsucker_sunlight) && bloodsucker_sunlight.amDay
//////////////////////////////////////////////////////////////////////////////
/datum/game_mode/proc/can_make_bloodsucker(datum/mind/bloodsucker, datum/mind/creator, display_warning=TRUE) // Creator is just here so we can display fail messages to whoever is turning us.
// No Mind
if(!bloodsucker || !bloodsucker.key) // KEY is client login?
//if(creator) // REMOVED. You wouldn't see their name if there is no mind, so why say anything?
// to_chat(creator, "<span class='danger'>[bloodsucker] isn't self-aware enough to be raised as a Bloodsucker!</span>")
return FALSE
// Current body is invalid
if(!ishuman(bloodsucker.current))// && !ismonkey(bloodsucker.current))
if(display_warning && creator)
to_chat(creator, "<span class='danger'>[bloodsucker] isn't evolved enough to be raised as a Bloodsucker!</span>")
return FALSE
// Species Must have a HEART (Sorry Plasmabois)
var/mob/living/carbon/human/H = bloodsucker.current
if(NOBLOOD in H.dna.species.species_traits)
if(display_warning && creator)
to_chat(creator, "<span class='danger'>[bloodsucker]'s DNA isn't compatible!</span>")
return FALSE
// Already a Non-Human Antag
if(bloodsucker.has_antag_datum(/datum/antagonist/abductor) || bloodsucker.has_antag_datum(/datum/antagonist/devil) || bloodsucker.has_antag_datum(/datum/antagonist/changeling))
return FALSE
// Already a vamp
if(bloodsucker.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
if(display_warning && creator)
to_chat(creator, "<span class='danger'>[bloodsucker] is already a Bloodsucker!</span>")
return FALSE
// Not High Enough
if(creator)
var/datum/antagonist/bloodsucker/creator_bloodsucker = creator.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
if(!istype(creator_bloodsucker) || creator_bloodsucker.vamplevel < BLOODSUCKER_LEVEL_TO_EMBRACE)
to_chat(creator, "<span class='danger'>Your blood is too thin to turn this corpse!</span>")
return FALSE
return TRUE
/datum/game_mode/proc/make_bloodsucker(datum/mind/bloodsucker, datum/mind/creator = null) // NOTE: This is a game_mode/proc, NOT a game_mode/bloodsucker/proc! We need to access this function despite the game mode.
if (!can_make_bloodsucker(bloodsucker))
return FALSE
// Create Datum: Fledgling
var/datum/antagonist/bloodsucker/A
// [FLEDGLING]
if (creator)
A = new (bloodsucker)
A.creator = creator
bloodsucker.add_antag_datum(A)
// Log
message_admins("[bloodsucker] has become a Bloodsucker, and was created by [creator].")
log_admin("[bloodsucker] has become a Bloodsucker, and was created by [creator].")
// [MASTER]
else
A = bloodsucker.add_antag_datum(ANTAG_DATUM_BLOODSUCKER)
return TRUE
/datum/game_mode/proc/remove_bloodsucker(datum/mind/bloodsucker)
bloodsucker.remove_antag_datum(ANTAG_DATUM_BLOODSUCKER)
/datum/game_mode/proc/clean_invalid_species(datum/mind/bloodsucker)
// Only checking for Humans here
if (!ishuman(bloodsucker.current) || !bloodsucker.current.client)
return
var/am_valid = TRUE
var/mob/living/carbon/human/H = bloodsucker.current
// Check if PLASMAMAN?
if(NOBLOOD in H.dna.species.species_traits)
am_valid = FALSE
// PROBLEM:
//
// Setting species leaves clothes on. If you were a plasmaman, we need to reassign your entire outfit. Otherwise
// everyone will wonder why you're a human with Plasma clothes (jk they'll know you're antag)
// Convert to HUMAN (along with ID and PDA)
if (!am_valid)
H.set_species(/datum/species/human)
H.real_name = H.client.prefs.custom_names["human"]
var/obj/item/card/id/ID = H.wear_id?.GetID()
if(ID)
ID.registered_name = H.real_name
ID.update_label()
/datum/game_mode/proc/can_make_vassal(mob/living/target, datum/mind/creator, display_warning=TRUE)//, check_antag_or_loyal=FALSE)
// Not Correct Type: Abort
if (!iscarbon(target) || !creator)
return FALSE
if (target.stat > UNCONSCIOUS)
return FALSE
// Check Overdose: Am I even addicted to blood? Do I even have any in me?
//if (!target.reagents.addiction_list || !target.reagents.reagent_list)
//message_admins("DEBUG2: can_make_vassal() Abort: No reagents")
// return 0
// Check Overdose: Did my current volume go over the Overdose threshold?
//var/am_addicted = 0
//for (var/datum/reagent/blood/vampblood/blood in target.reagents.addiction_list) // overdosed is tracked in reagent_list, not addiction_list.
//message_admins("DEBUG3: can_make_vassal() Found Blood! [blood] [blood.overdose]")
//if (blood.overdosed)
// am_addicted = 1 // Blood is present in addiction? That's all we need.
// break
//if (!am_addicted)
//message_admins("DEBUG4: can_make_vassal() Abort: No Blood")
// return 0
// No Mind!
if (!target.mind || !target.mind.key)
if (display_warning)
to_chat(creator, "<span class='danger'>[target] isn't self-aware enough to be made into a Vassal.</span>")
return FALSE
// Already MY Vassal
var/datum/antagonist/vassal/V = target.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
if (istype(V) && V.master)
if (V.master.owner == creator)
if (display_warning)
to_chat(creator, "<span class='danger'>[target] is already your loyal Vassal!</span>")
else
if (display_warning)
to_chat(creator, "<span class='danger'>[target] is the loyal Vassal of another Bloodsucker!</span>")
return FALSE
// Already Antag or Loyal (Vamp Hunters count as antags)
if (target.mind.enslaved_to || AmInvalidAntag(target.mind)) //!VassalCheckAntagValid(target.mind, check_antag_or_loyal)) // HAS_TRAIT(target, TRAIT_MINDSHIELD, "implant") ||
if (display_warning)
to_chat(creator, "<span class='danger'>[target] resists the power of your blood to dominate their mind!</span>")
return FALSE
return TRUE
/datum/game_mode/proc/AmValidAntag(datum/mind/M)
// No List?
if(!islist(M.antag_datums) || M.antag_datums.len == 0)
return FALSE
// Am I NOT an invalid Antag? NOTE: We already excluded non-antags above. Don't worry about the "No List?" check in AmInvalidIntag()
return !AmInvalidAntag(M)
/datum/game_mode/proc/AmInvalidAntag(datum/mind/M)
// No List?
if(!islist(M.antag_datums) || M.antag_datums.len == 0)
return FALSE
// Does even ONE antag appear in this mind that isn't in the list? Then FAIL!
for(var/datum/antagonist/antag_datum in M.antag_datums)
if (!(antag_datum.type in vassal_allowed_antags)) // vassal_allowed_antags is a list stored in the game mode, above.
//message_admins("DEBUG VASSAL: Found Invalid: [antag_datum] // [antag_datum.type]")
return TRUE
//message_admins("DEBUG VASSAL: Valid Antags! (total of [M.antag_datums.len])")
// WHEN YOU DELETE THE ABOVE: Remove the 3 second timer on converting the vassal too.
return FALSE
/datum/game_mode/proc/make_vassal(mob/living/target, datum/mind/creator)
if (!can_make_vassal(target,creator))
return FALSE
// Make Vassal
var/datum/antagonist/vassal/V = new (target.mind)
var/datum/antagonist/bloodsucker/B = creator.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
V.master = B
target.mind.add_antag_datum(V, V.master.get_team())
// Update Bloodsucker Title (we're a daddy now)
B.SelectTitle(am_fledgling = FALSE) // Only works if you have no title yet.
// Log
message_admins("[target] has become a Vassal, and is enslaved to [creator].")
log_admin("[target] has become a Vassal, and is enslaved to [creator].")
return TRUE
/datum/game_mode/proc/remove_vassal(datum/mind/vassal)
vassal.remove_antag_datum(ANTAG_DATUM_VASSAL)
+42
View File
@@ -0,0 +1,42 @@
/*
// Called from game mode pre_setup()
/datum/game_mode/proc/assign_monster_hunters(monster_count = 4, guaranteed_hunters = FALSE, list/datum/mind/exclude_from_hunter)
// Not all game modes GUARANTEE a hunter
if (rand(0,2) == 0) // 50% of the time, we get fewer or NO Hunters
if (!guaranteed_hunters)
return
else
monster_count /= 2
var/list/no_hunter_jobs = list("AI","Cyborg")
// Set Restricted Jobs
if(CONFIG_GET(flag/protect_roles_from_antagonist))
no_hunter_jobs += list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
no_hunter_jobs += "Assistant"
// Find Valid Hunters
var/list/datum/mind/hunter_candidates = get_players_for_role(ROLE_MONSTERHUNTER)
// Assign Hunters (as many as vamps, plus one)
for(var/i = 1, i < monster_count, i++) // Start at 1 so we skip Hunters if there's only one sucker.
if (!hunter_candidates.len)
break
// Assign Hunter
var/datum/mind/hunter = pick(hunter_candidates)
hunter_candidates.Remove(hunter) // Remove Either Way
// Already Antag? Skip
if (islist(exclude_from_hunter) && (locate(hunter) in exclude_from_hunter)) //if (islist(hunter.antag_datums) && hunter.antag_datums.len)
i --
continue
// NOTE:
vamphunters += hunter
hunter.restricted_roles = no_hunter_jobs
log_game("[hunter.key] (ckey) has been selected as a Hunter.")
// Called from game mode post_setup()
/datum/game_mode/proc/finalize_monster_hunters(monster_count = 4)
var/amEvil = TRUE // First hunter is always an evil boi
for(var/datum/mind/hunter in vamphunters)
var/datum/antagonist/vamphunter/A = new (hunter)
A.bad_dude = amEvil
hunter.add_antag_datum(A)
amEvil = FALSE // Every other hunter is just a boring greytider
*/
@@ -150,6 +150,7 @@ Credit where due:
var/datum/team/clockcult/main_clockcult
/datum/game_mode/clockwork_cult/pre_setup()
/* //Reebe should be preloaded
var/list/errorList = list()
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
if(errorList.len) // reebe failed to load
@@ -158,6 +159,7 @@ Credit where due:
return FALSE
for(var/datum/parsed_map/PM in reebes)
PM.initTemplateBounds()
*/
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
+13 -12
View File
@@ -17,10 +17,10 @@ GLOBAL_VAR_INIT(dynamic_latejoin_delay_max, (25 MINUTES))
GLOBAL_VAR_INIT(dynamic_midround_delay_min, (15 MINUTES))
GLOBAL_VAR_INIT(dynamic_midround_delay_max, (35 MINUTES))
GLOBAL_VAR_INIT(dynamic_event_delay_min, (3 MINUTES))
GLOBAL_VAR_INIT(dynamic_event_delay_max, (10 MINUTES))
GLOBAL_VAR_INIT(dynamic_event_delay_min, (4 MINUTES))
GLOBAL_VAR_INIT(dynamic_event_delay_max, (12 MINUTES))
GLOBAL_VAR_INIT(dynamic_threat_delay, (5 MINUTES))
GLOBAL_VAR_INIT(dynamic_threat_delay, (4 MINUTES))
// Are HIGHLANDER_RULESETs allowed to stack?
GLOBAL_VAR_INIT(dynamic_no_stacking, TRUE)
@@ -125,9 +125,10 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
/datum/game_mode/dynamic/admin_panel()
var/list/dat = list("<html><head><title>Game Mode Panel</title></head><body><h1><B>Game Mode Panel</B></h1>")
dat += "Dynamic Mode <a href='?_src_=vars;[HrefToken()];Vars=[REF(src)]'>\[VV\]</A><BR>"
dat += "Threat Level: <b>[threat_level]</b><br/>"
dat += "Threat to Spend: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "Chaos Level: <b>[GLOB.dynamic_chaos_level]</b><br/>"
//dat += "Threat Level: <b>[threat_level]</b><br/>"
//dat += "Threat to Spend: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "Threat Level: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "<br/>"
dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
//dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
@@ -445,7 +446,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
/// Picks a random roundstart rule from the list given as an argument and executes it.
/datum/game_mode/dynamic/proc/picking_roundstart_rule(list/drafted_rules = list(), forced = FALSE)
var/datum/dynamic_ruleset/roundstart/starting_rule = pickweight(drafted_rules)
var/datum/dynamic_ruleset/roundstart/starting_rule = pickweightAllowZero(drafted_rules)
if(!starting_rule)
return FALSE
@@ -457,7 +458,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
drafted_rules -= starting_rule
if(drafted_rules.len <= 0)
return FALSE
starting_rule = pickweight(drafted_rules)
starting_rule = pickweightAllowZero(drafted_rules)
// Check if the ruleset is highlander and if a highlander ruleset has been executed
else if(starting_rule.flags & HIGHLANDER_RULESET)
if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
@@ -465,7 +466,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
drafted_rules -= starting_rule
if(drafted_rules.len <= 0)
return FALSE
starting_rule = pickweight(drafted_rules)
starting_rule = pickweightAllowZero(drafted_rules)
message_admins("Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]")
log_game("DYNAMIC: Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]")
@@ -516,7 +517,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
/// Picks a random midround OR latejoin rule from the list given as an argument and executes it.
/// Also this could be named better.
/datum/game_mode/dynamic/proc/picking_midround_latejoin_rule(list/drafted_rules = list(), forced = FALSE)
var/datum/dynamic_ruleset/rule = pickweight(drafted_rules)
var/datum/dynamic_ruleset/rule = pickweightAllowZero(drafted_rules)
if(!rule)
return FALSE
@@ -528,7 +529,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
drafted_rules -= rule
if(drafted_rules.len <= 0)
return FALSE
rule = pickweight(drafted_rules)
rule = pickweightAllowZero(drafted_rules)
// Check if the ruleset is highlander and if a highlander ruleset has been executed
else if(rule.flags & HIGHLANDER_RULESET)
if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
@@ -536,7 +537,7 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
drafted_rules -= rule
if(drafted_rules.len <= 0)
return FALSE
rule = pickweight(drafted_rules)
rule = pickweightAllowZero(drafted_rules)
if(!rule.repeatable)
if(rule.ruletype == "Latejoin")
@@ -26,7 +26,6 @@
continue // Dead players cannot count as opponents
if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles)))
job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it
var/threat = max(min(round(mode.threat_level/10),9),1) //min() to stop index errors at 100 threat //Max to stop breaking at 0 threat.
if (job_check < required_enemies[threat])
return FALSE
@@ -104,7 +103,7 @@
typepath = /datum/round_event/pirates
antag_flag = ROLE_TRAITOR
enemy_roles = list("AI","Security Officer","Head of Security","Captain")
required_enemies = list(2,2,2,2,1,1,1,1,0,0)
required_enemies = list(3,3,2,2,2,1,1,1,1,0)
weight = 3
cost = 0
earliest_start = 50 MINUTES
@@ -120,82 +119,6 @@
return FALSE
return ..()
/* //not currently functional
//////////////////////////////////////////
// //
// LEWD //
// //
//////////////////////////////////////////
//Might move this to midround antags, but I don't want it messing with the weights of regular antags right now
//Only drops one horny antag at a time anyways
/datum/dynamic_ruleset/event/lewd
name = "Horny Traitor"
//config_tag = "pirates"
//typepath = /datum/round_event/pirates
antag_flag = ROLE_LEWD_TRAITOR
antag_datum = /datum/antagonist/traitor/lewd
enemy_roles = list()
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
protected_roles = list("AI","Cyborg")
restricted_roles = list("Cyborg","AI")
weight = 300 //JAY CHANGE THIS WHEN YOU ARE DONE TESTING
cost = 0
earliest_start = 50 MINUTES
//blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
requirements = list(10,10,10,10,10,10,10,10,10,10)
high_population_requirement = 10
occurances_max = 2
chaos_min = 0
chaos_max = 2.5
minimum_required_age = 7
admin_required = TRUE
var/list/mob/living/carbon/human/lewd_candidates = list()
var/list/mob/living/carbon/human/targets = list()
var/num_lewd_traitors = 1 //The number of lewds to drop in
var/numTraitors = 0 //Variable for later. Don't touch.
earliest_start = 0 MINUTES
/datum/dynamic_ruleset/event/lewd/ready(forced = FALSE)
//to_chat(GLOB.admins, "makeLewd_traitors called")
//var/datum/game_mode/traitor/lewd/temp = new
//if(CONFIG_GET(flag/protect_roles_from_antagonist))
//continue
//if(CONFIG_GET(flag/protect_assistant_from_antagonist))
//continue
//var/mob/living/carbon/human/T = null
for(var/mob/living/carbon/human/target in CURRENT_LIVING_PLAYERS)
if(target.client.prefs.noncon)
if(!(target.job in restricted_roles))
targets += target
if(lewd_candidates.len)
numTraitors = min(candidates.len, targets.len, num_lewd_traitors)
if(numTraitors == 0)
to_chat(GLOB.admins, "No lewd traitors created. Are there any valid targets?")
return 0
return ..()
return 0
/datum/dynamic_ruleset/event/lewd/execute(forced = FALSE)
var/mob/living/carbon/human/H = null
if(numTraitors)
for(var/i = 0, i<numTraitors, i++)
H = pick(lewd_candidates)
H.mind.make_LewdTraitor()
lewd_candidates.Remove(H)
return TRUE
return FALSE
*/
//////////////////////////////////////////////
// //
// SPIDERS //
@@ -207,8 +130,8 @@
//config_tag = "spiders"
typepath = /datum/round_event/spider_infestation
enemy_roles = list("AI","Security Officer","Head of Security","Captain")
required_enemies = list(2,2,1,1,0,0,0,0,0,0)
weight = 3
required_enemies = list(3,2,2,2,2,1,1,1,0,0)
weight = 2
cost = 5
requirements = list(101,20,15,10,10,10,10,10,10,10)
high_population_requirement = 15
@@ -228,7 +151,7 @@
//config_tag = "ventclog"
typepath = /datum/round_event/vent_clog
enemy_roles = list("Chemist","Medical Doctor","Chief Medical Officer")
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
required_enemies = list(2,2,2,2,2,2,2,2,2,0)
cost = 2
weight = 1
repeatable_weight_decrease = 1
@@ -293,12 +216,12 @@
//config_tag = "meteor_wave"
typepath = /datum/round_event/meteor_wave
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Captain","Cyborg")
required_enemies = list(2,2,2,2,2,1,1,1,0,0)
required_enemies = list(2,2,2,2,2,2,2,2,1,1)
cost = 0
weight = 2
earliest_start = 45 MINUTES
repeatable_weight_decrease = 2
requirements = list(101,101,15,15,15,15,15,15,10,10)
requirements = list(101,101,25,25,20,20,15,15,10,10)
high_population_requirement = 30
//property_weights = list("extended" = -2)
occurances_max = 2
@@ -307,21 +230,22 @@
/datum/dynamic_ruleset/event/meteor_wave/ready()
if(world.time-SSticker.round_start_time > 35 MINUTES && mode.threat_level > 40 && mode.threat >= 25 && prob(30))
name = "Meteor Wave: Threatening"
cost = 10
cost = 5
typepath = /datum/round_event/meteor_wave/threatening
requirements = list(101,101,30,25,20,20,20,20,20,15)
chaos_min = 1.8
else if(world.time-SSticker.round_start_time > 45 MINUTES && mode.threat_level > 50 && mode.threat >= 40 && prob(30))
name = "Meteor Wave: Catastrophic"
cost = 0
cost = 10
typepath = /datum/round_event/meteor_wave/catastrophic
required_enemies = list(3,3,3,3,3,3,3,3,3,3)
required_enemies = list(3,3,3,3,3,2,2,2,2,2)
requirements = list(101,101,40,30,30,30,30,30,30,30)
chaos_min = 2.0
else
name = "Meteor Wave: Normal"
cost = 5
typepath = /datum/round_event/meteor_wave
chaos_min = 1.2
chaos_min = 1.5
required_enemies = list(2,2,2,2,1,1,1,1,0,0)
return ..()
@@ -336,12 +260,12 @@
//config_tag = "anomaly_bluespace"
typepath = /datum/round_event/anomaly/anomaly_bluespace
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain")
required_enemies = list(1,1,1,0,0,0,0,0,0,0)
weight = 3
required_enemies = list(2,2,2,1,1,1,1,1,1,0)
weight = 2
earliest_start = 20 MINUTES
repeatable_weight_decrease = 2
cost = 3
requirements = list(101,101,5,5,5,5,5,5,5,5)
cost = 0
requirements = list(101,101,10,5,5,5,5,5,5,5)
high_population_requirement = 5
repeatable = TRUE
//property_weights = list("extended" = 1)
@@ -353,12 +277,12 @@
//config_tag = "anomaly_flux"
typepath = /datum/round_event/anomaly/anomaly_flux
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain")
required_enemies = list(1,1,1,0,0,0,0,0,0,0)
required_enemies = list(2,2,2,2,2,2,2,2,2,0)
weight = 3
earliest_start = 20 MINUTES
repeatable_weight_decrease = 2
cost = 3
requirements = list(101,5,5,5,5,5,5,5,5,5)
cost = 2
requirements = list(101,101,10,5,5,5,5,5,5,5)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = 1)
@@ -369,10 +293,10 @@
name = "Anomaly: Gravitational"
//config_tag = "anomaly_gravitational"
typepath = /datum/round_event/anomaly/anomaly_grav
weight = 4
weight = 3
repeatable_weight_decrease = 1
cost = 0
requirements = list(5,4,3,2,1,0,0,0,0,0)
requirements = list(101,4,3,2,1,0,0,0,0,0)
high_population_requirement = 5
repeatable = TRUE
//property_weights = list("extended" = 1)
@@ -388,7 +312,7 @@
repeatable_weight_decrease = 1
cost = 0
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(2,2,2,2,2,1,1,1,1,1)
required_enemies = list(2,2,2,2,2,1,1,1,1,0)
requirements = list(101,101,10,10,10,10,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
@@ -405,8 +329,8 @@
repeatable_weight_decrease = 1
cost = 0
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(3,3,3,2,2,2,2,2,2,2)
requirements = list(101,101,10,10,10,10,10,10,10,10)
required_enemies = list(3,3,3,2,2,2,2,2,2,0)
requirements = list(101,101,101,10,10,10,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
//property_weights = list("extended" = 1)
@@ -426,13 +350,16 @@
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
weight = 0 //This is changed in nuclearbomb.dm
occurances_max = 1
requirements = list(10,5,0,0,0,0,0,0,0,0) //SECURE THAT DISK
requirements = list(10,10,10,10,10,10,10,10,10,10) //SECURE THAT DISK
cost = 50
chaos_min = 0.5
/datum/dynamic_ruleset/event/operative/get_weight()
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
if(istype(loneop))
weight = loneop.weight //Get the weight whenever it's called.
if(weight < 5)
weight = 0
to_chat(GLOB.admins, "<span class='adminnotice'>Current LoneOP weight [weight]</span>")
else
to_chat(GLOB.admins, "<span class='adminnotice'>LoneOP is fucking broken.</span>")
@@ -451,9 +378,9 @@
weight = 1
earliest_start = 30 MINUTES
repeatable_weight_decrease = 1
cost = -10
cost = 0
enemy_roles = list("Chief Engineer","Station Engineer","Atmospheric Technician","Research Director","Scientist","Captain","Cyborg")
required_enemies = list(2,1,1,1,1,1,0,0,0,0)
required_enemies = list(3,2,2,2,1,1,1,0,0,0)
requirements = list(101,25,20,15,15,15,10,10,10,10)
high_population_requirement = 10
repeatable = TRUE
@@ -465,12 +392,12 @@
name = "Carp Migration"
//config_tag = "carp_migration"
typepath = /datum/round_event/carp_migration
weight = 5
repeatable_weight_decrease = 3
weight = 4
repeatable_weight_decrease = 2
cost = 4
requirements = list(101,5,5,1,1,1,1,1,1,1)
requirements = list(101,5,5,5,5,1,1,1,1,1)
high_population_requirement = 10
earliest_start = 0 MINUTES
earliest_start = 10 MINUTES
repeatable = TRUE
//property_weights = list("extended" = 1)
occurances_max = 3
@@ -480,7 +407,7 @@
name = "Communications Blackout"
//config_tag = "communications_blackout"
typepath = /datum/round_event/communications_blackout
cost = 4
cost = 2
weight = 10
repeatable_weight_decrease = 2
enemy_roles = list("Chief Engineer","Station Engineer")
@@ -547,7 +474,7 @@
repeatable_weight_decrease = 2
enemy_roles = list("Chief Engineer","Station Engineer")
required_enemies = list(1,1,1,0,0,0,0,0,0,0)
requirements = list(5,5,4,3,2,1,1,0,0,0)
requirements = list(3,3,2,2,1,1,0,0,0,0)
high_population_requirement = 5
repeatable = TRUE
occurances_max = 10
@@ -555,12 +482,12 @@
/datum/dynamic_ruleset/event/heart_attack
name = "Random Heart Attack"
typepath = /datum/round_event/heart_attack
cost = 15
cost = 0
weight = 2
earliest_start = 30 MINUTES
repeatable_weight_decrease = 1
enemy_roles = list("Medical Doctor","Chief Medical Officer")
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
enemy_roles = list("Medical Doctor","Chief Medical Officer", "Chemist")
required_enemies = list(3,3,2,2,2,2,2,2,2,1)
requirements = list(101,101,101,10,5,5,5,5,5,5)
high_population_requirement = 5
repeatable = TRUE
@@ -575,7 +502,7 @@
weight = 2
repeatable_weight_decrease = 2
enemy_roles = list("Chemist","Chief Medical Officer","Geneticist","Medical Doctor","AI","Captain")
required_enemies = list(1,1,1,1,1,1,1,1,1,1)
required_enemies = list(2,2,2,2,1,1,1,1,1,0)
requirements = list(5,5,5,5,5,5,5,5,5,5)
high_population_requirement = 5
//property_weights = list("extended" = 1,"chaos" = 1)
@@ -594,7 +521,7 @@
earliest_start = 40 MINUTES
//property_weights = list("teamwork" = 1,"chaos" = 1, "extended" = -1)
occurances_max = 1
chaos_min = 1.0
chaos_min = 1.3
/datum/dynamic_ruleset/event/wormholes
@@ -605,7 +532,7 @@
weight = 2
repeatable_weight_decrease = 1
enemy_roles = list("AI","Medical Doctor","Station Engineer","Head of Personnel","Captain")
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
required_enemies = list(2,2,2,2,2,2,2,2,2,0)
requirements = list(5,5,5,5,5,5,5,5,5,5)
high_population_requirement = 5
//property_weights = list("extended" = 1)
@@ -620,12 +547,12 @@
weight = 1
earliest_start = 40 MINUTES
enemy_roles = list("AI","Security Officer","Head of Security","Captain","Station Engineer","Atmos Technician","Chief Engineer")
required_enemies = list(4,4,4,4,3,3,3,3,3,2)
required_enemies = list(4,4,4,4,3,3,3,3,2,2)
requirements = list(101,101,50,40,40,40,40,35,30,30)
high_population_requirement = 5
//property_weights = list("extended" = -2)
occurances_max = 1
chaos_min = 2.0
chaos_min = 1.5
/datum/dynamic_ruleset/event/sentient_disease
name = "Sentient Disease"
@@ -636,7 +563,7 @@
required_candidates = 1
weight = 4
cost = -5
requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"!
requirements = list(101,101,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"!
//property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2)
high_population_requirement = 5
occurances_max = 1
@@ -651,7 +578,7 @@
required_candidates = 1
weight = 4
cost = 5
requirements = list(101,30,27,24,21,18,15,15,10,10)
requirements = list(101,101,23,21,18,18,15,15,10,10)
high_population_requirement = 15
//property_weights = list("story_potential" = -2, "extended" = -1)
occurances_max = 1 //Skyrat change.
@@ -662,8 +589,8 @@
controller = /datum/round_event_control/immovable_rod
typepath = /datum/round_event/immovable_rod
enemy_roles = list("Research Director","Chief Engineer","Station Engineer","Captain","Chaplain","AI")
required_enemies = list(2,2,2,2,2,2,1,1,1,1)
requirements = list(101,101,18,16,14,12,10,8,6,6)
required_enemies = list(2,2,2,2,2,2,1,1,1,0)
requirements = list(101,101,20,18,16,14,12,10,8,6)
high_population_requirement = 15
cost = 0
occurances_max = 2
@@ -737,29 +664,16 @@
repeatable = TRUE
occurances_max = 2
/datum/dynamic_ruleset/event/disease_outbreak/execute() //I do not know why this is necessary
var/datum/round_event_control/E = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/event = E.runEvent() //But it is.
event.announceWhen = -1 //So it isn't double announced.
return ..()
/datum/dynamic_ruleset/event/falsealarm //I THINK IT WORKS
/datum/dynamic_ruleset/event/falsealarm
name = "False Alarm"
controller = /datum/round_event_control/falsealarm
typepath = /datum/round_event/falsealarm
requirements = list(0,0,0,0,0,0,0,0,0,0)
requirements = list(5,5,5,5,5,5,5,5,5,5) //Tell me lieeeess
high_population_requirement = 0
weight = 5
repeatable = TRUE
occurances_max = 5
///datum/dynamic_ruleset/event/falsealarm/execute() //I do not know why this is necessary
//var/datum/round_event_control/E = locate(/datum/round_event_control/falsealarm) in SSevents.control
//var/datum/round_event/event = E.runEvent()
//event.announceWhen = -1 //So it isn't double announced.
//E.runEvent()
//return ..()
/datum/dynamic_ruleset/event/grid_check
name = "Grid Check"
typepath = /datum/round_event/grid_check
@@ -796,8 +710,8 @@
name = "Grey Tide"
typepath = /datum/round_event/grey_tide
enemy_roles = list("Chief Engineer","Station Engineer","Captain","Atmospheric Technician","AI","Cyborg")
required_enemies = list(3,2,2,2,2,2,1,1,1,1)
requirements = list(101,101,5,5,5,5,5,5,5,5)
required_enemies = list(3,2,2,2,2,2,1,1,1,0)
requirements = list(101,101,101,5,5,5,5,5,5,5)
high_population_requirement = 0
repeatable = TRUE
weight = 4
@@ -807,9 +721,10 @@
/datum/dynamic_ruleset/event/sentience
name = "Random Human-level Intelligence"
typepath = /datum/round_event/ghost_role/sentience
requirements = list(0,0,0,0,0,0,0,0,0,0)
requirements = list(101,101,0,0,0,0,0,0,0,0)
high_population_requirement = 0
weight = 5
repeatable_weight_decrease = 1
/datum/dynamic_ruleset/event/shuttle_loan
name = "Shuttle Loan"
@@ -827,7 +742,7 @@
name = "Spacevine"
typepath = /datum/round_event/spacevine
enemy_roles = list("Cook","Botanist","Security Officer","Captain","Station Engineer")
required_enemies = list(2,2,2,1,1,1,1,1,1,1)
required_enemies = list(2,2,2,1,1,1,1,1,1,0)
requirements = list(101,101,10,9,8,7,5,5,5,0)
cost = 2
high_population_requirement = 0
@@ -840,11 +755,11 @@
/datum/dynamic_ruleset/event/spontaneous_appendicitis
name = "Spontaneous Appendicitis"
typepath = /datum/round_event/spontaneous_appendicitis
enemy_roles = list("Medical Doctor","Chief Medical Officer")
required_enemies = list(2,2,1,1,1,1,1,1,1,1)
enemy_roles = list("Medical Doctor","Chief Medical Officer","Roboticist")
required_enemies = list(2,2,2,2,2,2,2,1,1,1)
requirements = list(5,5,5,5,5,5,5,5,0,0)
high_population_requirement = 5
weight = 8
weight = 5
repeatable = TRUE
repeatable_weight_decrease = 5
repeatable_weight_decrease = 3
occurances_max = 3
@@ -1,4 +1,4 @@
#define REVENANT_SPAWN_THRESHOLD 20
#define REVENANT_SPAWN_THRESHOLD 15
#define ABDUCTOR_MAX_TEAMS 4 // blame TG for not using the defines files
//////////////////////////////////////////////
@@ -18,6 +18,7 @@
var/list/dead_players = list()
var/list/list_observers = list()
var/list/ghost_eligible = list()
var/controller //round event controller for the event - Required for certain events dependendant on variables within their controllers
/datum/dynamic_ruleset/midround/from_ghosts
weight = 0
@@ -99,9 +100,8 @@
continue // Dead players cannot count as opponents
if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles)))
job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it
var/threat = min(round(mode.threat_level/10),9)
if (job_check < required_enemies[threat])
var/chaos = min(max(round(GLOB.dynamic_chaos_level * 2), 0), 9)
if (job_check < required_enemies[chaos])
return FALSE
return TRUE
@@ -113,8 +113,20 @@
/datum/dynamic_ruleset/midround/from_ghosts/execute()
var/application_successful = send_applications(ghost_eligible)
return assigned.len > 0 && application_successful
message_admins("<span class='deadsay'><b>[name]</b> has just been randomly triggered!</span>") //STOP ASSUMING IT'S BADMINS!
log_game("Midround triggering: [name]")
var/datum/round_event/E
//occurances_current++
if(controller)
var/datum/round_event_control/C = locate(controller) in SSevents.control
E = C.runEvent()
else
var/application_successful = send_applications(ghost_eligible)
return assigned.len > 0 && application_successful
testing("[time2text(world.time, "hh:mm:ss")] [E.type]")
return E
/// This sends a poll to ghosts if they want to be a ghost spawn from a ruleset.
/datum/dynamic_ruleset/midround/from_ghosts/proc/send_applications(list/possible_volunteers = list())
@@ -221,7 +233,7 @@
high_population_requirement = 10
flags = TRAITOR_RULESET
chaos_min = 2.0
chaos_max = 4.0
chaos_max = 3.5
/datum/dynamic_ruleset/midround/autotraitor/acceptable(population = 0, threat = 0)
var/player_count = mode.current_players[CURRENT_LIVING_PLAYERS].len
@@ -270,15 +282,15 @@
antag_flag = ROLE_LEWD_TRAITOR
antag_datum = /datum/antagonist/traitor/lewd
//minimum_required_age = 7
protected_roles = list("AI","Cyborg")
restricted_roles = list("Cyborg","AI")
protected_roles = list("AI","Cyborg", "Positronic Brain")
restricted_roles = list("Cyborg","AI", "Positronic Brain")
required_candidates = 1
weight = 2
cost = 0
requirements = list(10,10,10,10,10,10,10,10,10,10)
high_population_requirement = 10
chaos_min = 0.1
chaos_max = 2.5
chaos_max = 2.0
admin_required = TRUE
//vars for execution
var/list/mob/living/carbon/human/lewd_candidates = list()
@@ -355,7 +367,7 @@
return 1
return 0
/datum/dynamic_ruleset/midround/autotraitor/lewd/execute()
var/mob/M = pick(lewd_candidates)
lewd_candidates -= M
@@ -380,7 +392,7 @@
required_candidates = 1
weight = 3
cost = 20
requirements = list(101,101,55,50,45,40,35,30,25,20)
requirements = list(101,101,101,45,40,35,30,25,20,15)
high_population_requirement = 35
required_type = /mob/living/silicon/ai
var/ion_announce = 33
@@ -428,7 +440,7 @@
antag_datum = /datum/antagonist/wizard
antag_flag = ROLE_WIZARD
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,1,0,0)
required_enemies = list(2,2,1,1,1,1,1,1,1,0)
required_candidates = 1
weight = 1
cost = 20
@@ -462,13 +474,13 @@
antag_flag = ROLE_OPERATIVE
antag_datum = /datum/antagonist/nukeop
enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
required_enemies = list(3,3,3,3,3,2,2,1,1,0)
required_enemies = list(3,3,3,3,3,2,2,2,2,1)
required_candidates = 5
weight = 5
cost = 35
requirements = list(101,101,100,70,60,50,40,40,40,40)
cost = 20
requirements = list(101,100,95,85,70,60,50,40,30,20)
high_population_requirement = 10
var/operative_cap = list(2,2,2,2,3,3,4,4,5,5)
var/operative_cap = list(1,1,1,2,2,3,3,4,4,5)
var/datum/team/nuclear/nuke_team
flags = HIGHLANDER_RULESET
chaos_min = 4.0
@@ -505,15 +517,17 @@
name = "Blob"
antag_datum = /datum/antagonist/blob
antag_flag = ROLE_BLOB
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain", "Station Engineer")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 4
weight = 3
cost = 20
requirements = list(101,101,60,50,45,40,40,40,30,20)
requirements = list(101,101,101,60,50,40,40,40,30,20)
//requirements = list(0,0,0,0,0,0,0,0,0,0)
high_population_requirement = 50
repeatable = TRUE
chaos_min = 3.5
chaos_min = 4.0
controller = /datum/round_event_control/blob
/datum/dynamic_ruleset/midround/from_ghosts/blob/generate_ruleset_body(mob/applicant)
var/body = applicant.become_overmind()
@@ -534,11 +548,13 @@
required_candidates = 1
weight = 3
cost = 15
requirements = list(101,101,100,70,60,50,40,40,30,20)
requirements = list(101,101,101,50,40,35,30,30,30,20)
//requirements = list(0,0,0,0,0,0,0,0,0,0)
high_population_requirement = 50
repeatable = TRUE
var/list/vents = list()
chaos_min = 3.5
controller = /datum/round_event_control/alien_infestation
/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute()
// 50% chance of being incremented by one
@@ -575,12 +591,13 @@
/datum/dynamic_ruleset/midround/from_ghosts/nightmare
name = "Nightmare"
antag_datum = /datum/antagonist/nightmare
controller = /datum/round_event_control/nightmare
antag_flag = "Nightmare"
antag_flag_override = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 3
weight = 4
cost = 10
requirements = list(101,50,40,30,20,20,20,20,15,10)
high_population_requirement = 50
@@ -626,18 +643,18 @@
antag_flag = ROLE_ABDUCTOR
// Has two antagonist flags, in fact
enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
required_enemies = list(3,3,2,2,1,1,0,0,0,0)
required_enemies = list(3,3,2,2,2,2,2,2,2,0)
required_candidates = 2
weight = 4
weight = 3
cost = 10
requirements = list(101,101,50,45,40,30,20,20,10,10)
requirements = list(101,101,101,101,40,30,30,30,30,30)
blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
high_population_requirement = 15
var/datum/team/abductor_team/team
//property_weights = list("extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2)
repeatable_weight_decrease = 4
repeatable = TRUE
chaos_min = 2.0
chaos_min = 4.0
/datum/dynamic_ruleset/midround/from_ghosts/abductors/ready(forced = FALSE)
team = new /datum/team/abductor_team
@@ -671,7 +688,7 @@
required_enemies = list(3,2,2,2,2,1,1,1,1,0)
required_candidates = 1
weight = 4
cost = 15
cost = 10
requirements = list(101,101,101,40,35,30,25,20,20,20)
high_population_requirement = 30
//property_weights = list("story_potential" = 1, "extended" = -2, "valid" = 2)
@@ -728,3 +745,52 @@
#undef ABDUCTOR_MAX_TEAMS
#undef REVENANT_SPAWN_THRESHOLD
//////////////////////////////////////////////
// //
// BLOODSUCKERS //
// //
//////////////////////////////////////////////
/datum/dynamic_ruleset/midround/bloodsucker
name = "Bloodsucker Infiltrator"
//config_tag = "latejoin_bloodsucker"
antag_datum = ANTAG_DATUM_BLOODSUCKER
antag_flag = ROLE_TRAITOR
restricted_roles = list("AI", "Cyborg")
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_candidates = 1
enemy_roles = list("Security Officer","Head of Security","Captain","AI","Cyborg","Chaplain","Curator")
required_enemies = list(3,2,2,2,2,2,2,2,2,2)
weight = 3
cost = 10
requirements = list(101,101,101,60,55,50,45,40,35,30)
high_population_requirement = 30
repeatable = FALSE
chaos_min = 4.0
datum/dynamic_ruleset/midround/bloodsucker/trim_candidates()
..()
for(var/mob/living/player in living_players)
if(issilicon(player)) // Your assigned role doesn't change when you are turned into a silicon.
living_players -= player
continue
if(is_centcom_level(player.z))
living_players -= player // We don't autotator people in CentCom
continue
if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0))
living_players -= player // We don't autotator people with roles already
/datum/dynamic_ruleset/midround/bloodsucker/ready(forced = FALSE)
if (required_candidates > living_players.len)
return FALSE
return ..()
/datum/dynamic_ruleset/midround/bloodsucker/execute()
var/mob/M = pick(living_players)
assigned += M
living_players -= M
var/datum/antagonist/bloodsucker/newVamp = new
M.mind.add_antag_datum(newVamp)
return TRUE
@@ -12,11 +12,11 @@
antag_datum = /datum/antagonist/traitor/
minimum_required_age = 0
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Cyborg", "Quartermaster")
restricted_roles = list("Cyborg")
restricted_roles = list("Cyborg", "AI") //Malf is it's own ruleset
required_candidates = 1
weight = 5
cost = 10
requirements = list(101,40,30,25,20,20,15,15,15,15)
requirements = list(101,101,30,25,20,20,15,15,15,15)
high_population_requirement = 10
var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec)
chaos_min = 2.5
@@ -29,11 +29,11 @@
antag_datum = /datum/antagonist/traitor/thief
minimum_required_age = 0
//protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Cyborg")
restricted_roles = list("Cyborg")
restricted_roles = list("Cyborg", "AI") //Malf is it's own ruleset
//required_candidates = 1
//weight = 5
weight = 5
cost = 0
requirements = list(101,25,25,20,20,15,15,10,10,5)
requirements = list(101,25,25,20,20,15,15,10,10,10)
high_population_requirement = 10
//var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec)
chaos_min = 2.0
@@ -76,12 +76,12 @@
protected_roles = list("AI","Cyborg")
restricted_roles = list("Cyborg","AI")
required_candidates = 1
weight = 3
weight = 2
cost = 0
requirements = list(101,10,10,10,10,10,10,10,10,10)
requirements = list(10,10,10,10,10,10,10,10,10,10)
high_population_requirement = 10
chaos_min = 0.1
chaos_max = 2.5
chaos_max = 2.0
admin_required = TRUE
//vars for execution
var/list/mob/living/carbon/human/lewd_candidates = list()
@@ -103,7 +103,7 @@
return 1
return 0
/datum/dynamic_ruleset/roundstart/traitor/lewd/pre_execute()
var/traitor_scaling_coeff = 10 - max(0,round(mode.threat_level/10)-5) // Above 50 threat level, coeff goes down by 1 for every 10 levels
var/num_traitors = min(round(mode.candidates.len / traitor_scaling_coeff) + 1, candidates.len)
@@ -115,17 +115,6 @@
M.mind.restricted_roles = restricted_roles
return TRUE
/*
/datum/dynamic_ruleset/roundstart/traitor/lewd/execute()
var/datum/mind/M = null
if(numTraitors)
for(var/i = 0, i<numTraitors, i++)
M = pick(assigned)
assigned.Remove(M)
M.make_LewdTraitor()
return TRUE
return FALSE
*/
//////////////////////////////////////////
// //
@@ -300,7 +289,7 @@
flags = HIGHLANDER_RULESET
var/cultist_cap = list(2,2,2,3,3,4,4,4,4,4)
var/datum/team/cult/main_cult
chaos_min = 4.9
chaos_min = 4.5
admin_required = TRUE
/datum/dynamic_ruleset/roundstart/bloodcult/ready(forced = FALSE)
@@ -356,7 +345,7 @@
required_candidates = 5
weight = 3
cost = 20
requirements = list(101,100,90,80,70,60,50,40,30,20)
requirements = list(101,100,95,85,70,60,50,40,30,20)
high_population_requirement = 10
pop_per_requirement = 5
flags = HIGHLANDER_RULESET
@@ -559,11 +548,13 @@
required_candidates = 4
weight = 4
cost = 0
requirements = list(101,101,100,90,80,70,60,50,40,30)
requirements = list(101,101,100,95,85,70,60,50,40,30)
//requirements = list(0,0,0,0,0,0,0,0,0,0)
high_population_requirement = 101
flags = HIGHLANDER_RULESET
var/ark_time
chaos_min = 4.9
var/servants = list(1,1,1,1,2,2,3,3,4,4)
chaos_min = 4.5
admin_required = TRUE
/datum/dynamic_ruleset/roundstart/clockcult/pre_execute()
@@ -575,20 +566,23 @@
return FALSE
for(var/datum/parsed_map/PM in reebes)
PM.initTemplateBounds()
/*
var/starter_servants = 4
var/number_players = num_players()
if(number_players > 30)
number_players -= 30
starter_servants += round(number_players / 10)
starter_servants = min(starter_servants, 8)
*/
var/indice_pop = min(10,round(mode.roundstart_pop_ready/5)+1)
var/starter_servants = servants[indice_pop]
for (var/i in 1 to starter_servants)
var/mob/servant = pick(candidates)
candidates -= servant
assigned += servant.mind
servant.mind.assigned_role = ROLE_SERVANT_OF_RATVAR
servant.mind.special_role = ROLE_SERVANT_OF_RATVAR
ark_time = 30 + round((number_players / 5))
ark_time = 30 + round((mode.roundstart_pop_ready / 5))
ark_time = min(ark_time, 35)
return TRUE
@@ -831,4 +825,43 @@
var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
spawn_meteors(ramp_up_final, wavetype)
//////////////////////////////////////////////
// //
// BLOODSUCKERS //
// //
//////////////////////////////////////////////
/datum/dynamic_ruleset/roundstart/bloodsucker
name = "Bloodsuckers"
persistent = TRUE
antag_flag = ROLE_BLOODSUCKER
antag_datum = ANTAG_DATUM_BLOODSUCKER
minimum_required_age = 0
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
restricted_roles = list("Cyborg", "AI")
required_candidates = 1
weight = 3
cost = 0
requirements = list(101,101,101,70,60,60,50,50,50,40)
high_population_requirement = 10
chaos_min = 4.0
/datum/dynamic_ruleset/roundstart/bloodsucker/pre_execute()
var/num_bloodsuckers = min(round(mode.candidates.len / 10) +1, candidates.len)
for (var/i = 1 to num_bloodsuckers)
var/mob/M = pick_n_take(candidates)
assigned += M.mind
M.mind.special_role = ROLE_BLOODSUCKER
M.mind.restricted_roles = restricted_roles
return TRUE
/datum/dynamic_ruleset/roundstart/bloodsucker/pre_execute()
var/mob/M = pick_n_take(candidates)
assigned += M.mind
M.mind.special_role = ROLE_BLOODSUCKER
M.mind.restricted_roles = restricted_roles
return TRUE
+2 -1
View File
@@ -79,6 +79,7 @@
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
//finalize_monster_hunters() Disabled for now
if(!report)
report = !CONFIG_GET(flag/no_intercept_report)
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
@@ -549,4 +550,4 @@
/// Mode specific admin panel.
/datum/game_mode/proc/admin_panel()
return
return
+1 -1
View File
@@ -265,7 +265,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
/obj/effect/meteor/irradiated/meteor_effect()
..()
explosion(src.loc, 0, 0, 4, 3, 0)
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
new /obj/effect/decal/cleanable/greenglow/radioactive(get_turf(src))
radiation_pulse(src, 500)
//Meaty Ore
+2 -2
View File
@@ -155,9 +155,9 @@
var/obj/item/U = new uplink_type(H, H.key, tc)
H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK)
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
var/obj/item/implant/weapons_auth/W = new
W.implant(H)
var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H)
var/obj/item/implant/explosive/E = new
E.implant(H)
H.faction |= ROLE_SYNDICATE
H.update_icons()
-81
View File
@@ -113,11 +113,6 @@ Class Procs:
var/atom/movable/occupant = null
var/speed_process = FALSE // Process as fast as possible?
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
var/obj/item/card/id/inserted_scan_id
var/obj/item/card/id/inserted_modify_id
var/list/region_access = null // For the identification console (card.dm)
var/list/head_subordinates = null // For the identification console (card.dm)
var/authenticated = 0 // For the identification console (card.dm)
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
@@ -472,8 +467,6 @@ Class Procs:
. += "<span class='warning'>It's falling apart!</span>"
if(user.research_scanner && component_parts)
. += display_parts(user, TRUE)
if(inserted_scan_id || inserted_modify_id)
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
//called on machinery construction (i.e from frame to machinery) but not on initialization
/obj/machinery/proc/on_construction()
@@ -507,77 +500,3 @@ Class Procs:
. = . % 9
AM.pixel_x = -8 + ((.%3)*8)
AM.pixel_y = -8 + (round( . / 3)*8)
/obj/machinery/CanPass(atom/movable/mover, turf/target)
. = ..()
if(istype(mover) && (mover.pass_flags & PASSMACHINES))
return TRUE
/obj/machinery/proc/id_insert_scan(mob/user, obj/item/card/id/I)
I = user.get_active_held_item()
if(istype(I))
if(inserted_scan_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_scan_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_scan(mob/user)
if(!inserted_scan_id)
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
return
if(inserted_scan_id)
inserted_scan_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_scan_id)
inserted_scan_id = null
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_modify(mob/user)
if(inserted_modify_id)
GLOB.data_core.manifest_modify(inserted_modify_id.registered_name, inserted_modify_id.assignment)
inserted_modify_id.update_label()
inserted_modify_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_modify_id)
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
inserted_modify_id = null
region_access = null
head_subordinates = null
updateUsrDialog()
/obj/machinery/proc/id_insert_modify(mob/user)
var/obj/item/card/id/I = user.get_active_held_item()
if(istype(I))
if(inserted_modify_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_modify_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(inserted_modify_id)
id_eject_modify(user)
authenticated = FALSE
return
if(inserted_scan_id)
id_eject_scan(user)
authenticated = FALSE
return
@@ -13,6 +13,7 @@
var/icon_keyboard = "generic_key"
var/icon_screen = "generic"
var/clockwork = FALSE
var/authenticated = FALSE
/obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C)
. = ..()
+1 -3
View File
@@ -92,9 +92,7 @@
if(!usr || !usr.canUseTopic(src) || stat || QDELETED(src))
return
if(href_list["authenticate"])
var/obj/item/card/id/ID = usr.get_active_held_item()
if(!istype(ID))
ID = usr.get_idcard()
var/obj/item/card/id/ID = usr.get_idcard(TRUE)
if(ID && istype(ID))
if(check_access(ID))
authenticated = TRUE
+251 -255
View File
@@ -4,6 +4,11 @@
//increase the slots of many jobs.
GLOBAL_VAR_INIT(time_last_changed_position, 0)
#define JOB_ALLOWED 1
#define JOB_COOLDOWN -2
#define JOB_MAX_POSITIONS -1 // Trying to reduce the number of slots below that of current holders of that job, or trying to open more slots than allowed
#define JOB_DENIED 0
/obj/machinery/computer/card
name = "identification console"
desc = "You can use this to manage jobs and ID access."
@@ -11,8 +16,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
icon_keyboard = "id_key"
req_one_access = list(ACCESS_HEADS, ACCESS_CHANGE_IDS)
circuit = /obj/item/circuitboard/computer/card
var/obj/item/card/id/scan = null
var/obj/item/card/id/modify = null
var/mode = 0
var/printing = null
var/target_dept = 0 //Which department this computer has access to. 0=all departments
@@ -31,75 +34,74 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
"Head of Security",
"Chief Engineer",
"Research Director",
"Chief Medical Officer")
"Chief Medical Officer",
"Quartermaster")
//The scaling factor of max total positions in relation to the total amount of people on board the station in %
var/max_relative_positions = 30 //30%: Seems reasonable, limit of 6 @ 20 players
//This is used to keep track of opened positions for jobs to allow instant closing
//Assoc array: "JobName" = (int)<Opened Positions>
var/list/opened_positions = list();
var/list/opened_positions = list()
var/obj/item/card/id/inserted_scan_id
var/obj/item/card/id/inserted_modify_id
var/list/region_access = null
var/list/head_subordinates = null
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/card/examine(mob/user)
. = ..()
if(scan || modify)
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
/obj/machinery/computer/card/proc/get_jobs()
return get_all_jobs()
/obj/machinery/computer/card/centcom/get_jobs()
return get_all_centcom_jobs()
/obj/machinery/computer/card/Initialize()
. = ..()
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY
if(istype(O, /obj/item/card/id))
var/obj/item/card/id/idcard = O
if(check_access(idcard))
if(!scan)
if (!user.transferItemToLoc(idcard,src))
return
scan = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(!modify)
if (!user.transferItemToLoc(idcard,src))
return
modify = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else
if(!modify)
if (!user.transferItemToLoc(idcard,src))
return
modify = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
updateUsrDialog()
/obj/machinery/computer/card/examine(mob/user)
. = ..()
if(inserted_scan_id || inserted_modify_id)
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
/obj/machinery/computer/card/attackby(obj/I, mob/user, params)
if(isidcard(I))
if(check_access(I) && !inserted_scan_id)
if(id_insert(user, I, inserted_scan_id))
inserted_scan_id = I
updateUsrDialog()
else if(id_insert(user, I, inserted_modify_id))
inserted_modify_id = I
updateUsrDialog()
else
return ..()
/obj/machinery/computer/card/Destroy()
if(scan)
qdel(scan)
scan = null
if(modify)
qdel(modify)
modify = null
if(inserted_scan_id)
qdel(inserted_scan_id)
inserted_scan_id = null
if(inserted_modify_id)
qdel(inserted_modify_id)
inserted_modify_id = null
return ..()
/obj/machinery/computer/card/handle_atom_del(atom/A)
..()
if(A == scan)
scan = null
if(A == inserted_scan_id)
inserted_scan_id = null
updateUsrDialog()
if(A == modify)
modify = null
if(A == inserted_modify_id)
inserted_modify_id = null
updateUsrDialog()
/obj/machinery/computer/card/on_deconstruction()
if(scan)
scan.forceMove(drop_location())
scan = null
if(modify)
modify.forceMove(drop_location())
modify = null
if(inserted_scan_id)
inserted_scan_id.forceMove(drop_location())
inserted_scan_id = null
if(inserted_modify_id)
inserted_modify_id.forceMove(drop_location())
inserted_modify_id = null
//Check if you can't open a new position for a certain job
/obj/machinery/computer/card/proc/job_blacklisted(jobtitle)
@@ -113,10 +115,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100)))
var/delta = (world.time / 10) - GLOB.time_last_changed_position
if((change_position_cooldown < delta) || (opened_positions[job.title] < 0))
return 1
return -2
return -1
return 0
return JOB_ALLOWED
return JOB_COOLDOWN
return JOB_MAX_POSITIONS
return JOB_DENIED
//Logic check for Topic() if you can close the job
/obj/machinery/computer/card/proc/can_close_job(datum/job/job)
@@ -125,84 +127,117 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if(job.total_positions > job.current_positions)
var/delta = (world.time / 10) - GLOB.time_last_changed_position
if((change_position_cooldown < delta) || (opened_positions[job.title] > 0))
return 1
return -2
return -1
return 0
return JOB_ALLOWED
return JOB_COOLDOWN
return JOB_MAX_POSITIONS
return JOB_DENIED
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target)
var/obj/item/card/id/card_to_insert = inserting_item
var/holder_item = FALSE
if(!isidcard(card_to_insert))
card_to_insert = inserting_item.RemoveID()
holder_item = TRUE
if(!card_to_insert || !user.transferItemToLoc(card_to_insert, src))
return FALSE
if(target)
if(holder_item && inserting_item.InsertID(target))
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
else
id_eject(user, target)
user.visible_message("<span class='notice'>[user] inserts \the [card_to_insert] into \the [src].</span>",
"<span class='notice'>You insert \the [card_to_insert] into \the [src].</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
return TRUE
/obj/machinery/computer/card/proc/id_eject(mob/user, obj/target)
if(!target)
to_chat(user, "<span class='warning'>That slot is empty!</span>")
return FALSE
else
target.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(target)
user.visible_message("<span class='notice'>[user] gets \the [target] from \the [src].</span>", \
"<span class='notice'>You get \the [target] from \the [src].</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
return TRUE
/obj/machinery/computer/card/AltClick(mob/user)
..()
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(inserted_modify_id)
if(id_eject(user, inserted_modify_id))
inserted_modify_id = null
updateUsrDialog()
return
if(inserted_scan_id)
if(id_eject(user, inserted_scan_id))
inserted_scan_id = null
updateUsrDialog()
return
/obj/machinery/computer/card/ui_interact(mob/user)
. = ..()
var/dat
if(!SSticker)
return
var/list/dat = list()
if (mode == 1) // accessing crew manifest
var/crew = ""
dat += "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>"
for(var/datum/data/record/t in sortRecord(GLOB.data_core.general))
crew += t.fields["name"] + " - " + t.fields["rank"] + "<br>"
dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=[REF(src)];choice=print'>Print</a><br><br><a href='?src=[REF(src)];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
dat += {"[t.fields["name"]] - [t.fields["rank"]]<br>"}
dat += "<a href='?src=[REF(src)];choice=print'>Print</a><br><br><a href='?src=[REF(src)];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
else if(mode == 2)
// JOB MANAGEMENT
dat = "<a href='?src=[REF(src)];choice=return'>Return</a>"
dat += " || Confirm Identity: "
var/S
if(scan)
S = html_encode(scan.name)
else
S = "--------"
dat += "<a href='?src=[REF(src)];choice=scan'>[S]</a>"
dat += "<table>"
dat += "<tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td><td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"
var/ID
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
ID = 1
else
ID = 0
dat += {"<a href='?src=[REF(src)];choice=return'>Return</a>
<table><tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td>
<td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"}
for(var/datum/job/job in SSjob.occupations)
dat += "<tr>"
if(job.title in blacklisted)
continue
dat += "<td>[job.title]</td>"
dat += "<td>[job.current_positions]/[job.total_positions]</td>"
dat += "<td>"
dat += {"<td>[job.title]</td>
<td>[job.current_positions]/[job.total_positions]</td>
<td>"}
switch(can_open_job(job))
if(1)
if(ID)
if(JOB_ALLOWED)
if(authenticated == 2)
dat += "<a href='?src=[REF(src)];choice=make_job_available;job=[job.title]'>Open Position</a><br>"
else
dat += "Open Position"
if(-1)
dat += "Denied"
if(-2)
if(JOB_COOLDOWN)
var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1)
var/mins = round(time_to_wait / 60)
var/seconds = time_to_wait - (60*mins)
dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]"
if(0)
else
dat += "Denied"
dat += "</td><td>"
switch(can_close_job(job))
if(1)
if(ID)
if(JOB_ALLOWED)
if(authenticated == 2)
dat += "<a href='?src=[REF(src)];choice=make_job_unavailable;job=[job.title]'>Close Position</a>"
else
dat += "Close Position"
if(-1)
dat += "Denied"
if(-2)
if(JOB_COOLDOWN)
var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1)
var/mins = round(time_to_wait / 60)
var/seconds = time_to_wait - (60*mins)
dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]"
if(0)
else
dat += "Denied"
dat += "</td><td>"
switch(job.total_positions)
if(0)
dat += "Denied"
else
if(ID)
if(authenticated == 2)
if(job in SSjob.prioritized_jobs)
dat += "<a href='?src=[REF(src)];choice=prioritize_job;job=[job.title]'>Deprioritize</a>"
else
@@ -216,57 +251,35 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
dat += "</td></tr>"
dat += "</table>"
else
var/header = ""
var/target_name
var/target_owner
var/target_rank
if(modify)
target_name = html_encode(modify.name)
else
target_name = "--------"
if(modify && modify.registered_name)
target_owner = html_encode(modify.registered_name)
else
target_owner = "--------"
if(modify && modify.assignment)
target_rank = html_encode(modify.assignment)
else
target_rank = "Unassigned"
var/scan_name
if(scan)
scan_name = html_encode(scan.name)
else
scan_name = "--------"
var/list/header = list()
var/scan_name = inserted_scan_id ? html_encode(inserted_scan_id.name) : "--------"
var/target_name = inserted_modify_id ? html_encode(inserted_modify_id.name) : "--------"
var/target_owner = (inserted_modify_id && inserted_modify_id.registered_name) ? html_encode(inserted_modify_id.registered_name) : "--------"
var/target_rank = (inserted_modify_id && inserted_modify_id.assignment) ? html_encode(inserted_modify_id.assignment) : "Unassigned"
if(!authenticated)
header += "<br><i>Please insert the cards into the slots</i><br>"
header += "Target: <a href='?src=[REF(src)];choice=modify'>[target_name]</a><br>"
header += "Confirm Identity: <a href='?src=[REF(src)];choice=scan'>[scan_name]</a><br>"
header += {"<br><i>Please insert the cards into the slots</i><br>
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"}
else
header += "<div align='center'><br>"
header += "<a href='?src=[REF(src)];choice=modify'>Remove [target_name]</a> || "
header += "<a href='?src=[REF(src)];choice=scan'>Remove [scan_name]</a> <br> "
header += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a> <br> "
header += "<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"
header += {"<div align='center'><br>
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> ||
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a><br>
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br>
[!target_dept ? "<a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><br>" : ""]
<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"}
header += "<hr>"
var/jobs_all = ""
var/list/alljobs = list("Unassigned")
alljobs += (istype(src, /obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
for(var/job in alljobs)
jobs_all += "<a href='?src=[REF(src)];choice=assign;assign_target=[job]'>[replacetext(job, " ", "&nbsp")]</a> " //make sure there isn't a line break in the middle of a job
var/body
if (authenticated && modify)
var/carddesc = text("")
var/jobs = text("")
if( authenticated == 2)
if (authenticated && inserted_modify_id)
var/list/carddesc = list()
var/list/jobs = list()
if (authenticated == 2)
var/list/jobs_all = list()
for(var/job in (list("Unassigned") + get_jobs() + "Custom"))
jobs_all += "<a href='?src=[REF(src)];choice=assign;assign_target=[job]'>[replacetext(job, " ", "&nbsp;")]</a> " //make sure there isn't a line break in the middle of a job
carddesc += {"<script type="text/javascript">
function markRed(){
var nameField = document.getElementById('namefield');
@@ -278,20 +291,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all.Join()]";
}
function hideAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>show</a>";
}
</script>"}
carddesc += "<form name='cardcomp' action='?src=[REF(src)]' method='get'>"
carddesc += "<input type='hidden' name='src' value='[REF(src)]'>"
carddesc += "<input type='hidden' name='choice' value='reg'>"
carddesc += "<b>registered name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>"
carddesc += "<input type='submit' value='Rename' onclick='markGreen()'>"
carddesc += "</form>"
carddesc += "<b>Assignment:</b> "
carddesc += {"<form name='cardcomp' action='?src=[REF(src)]' method='get'>
<input type='hidden' name='src' value='[REF(src)]'>
<input type='hidden' name='choice' value='reg'>
<b>registered name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>
<input type='submit' value='Rename' onclick='markGreen()'>
</form>
<b>Assignment:</b> "}
jobs += "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
@@ -299,18 +312,18 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
carddesc += "<b>registered_name:</b> [target_owner]</span>"
jobs += "<b>Assignment:</b> [target_rank] (<a href='?src=[REF(src)];choice=demote'>Demote</a>)</span>"
var/accesses = ""
if(istype(src, /obj/machinery/computer/card/centcom))
var/list/accesses = list()
if(istype(src, /obj/machinery/computer/card/centcom)) //REE
accesses += "<h5>Central Command:</h5>"
for(var/A in get_all_centcom_access())
if(A in modify.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</font></a> "
if(A in inserted_modify_id.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"6bc473\">[replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</a> "
else
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
accesses += {"<div align='center'><b>Access</b></div>
<table style='width:100%'>
<tr>"}
for(var/i = 1; i <= 7; i++)
if(authenticated == 1 && !(i in region_access))
continue
@@ -321,24 +334,24 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
continue
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in modify.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
if(A in inserted_modify_id.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"6bc473\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
body = "[carddesc]<br>[jobs]<br><br>[accesses]" //CHECK THIS
body = "[carddesc.Join()]<br>[jobs.Join()]<br><br>[accesses.Join()]<hr>" //CHECK THIS
else
body = "<a href='?src=[REF(src)];choice=auth'>{Log in}</a> <br><hr>"
body += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a>"
else if (!authenticated)
body = {"<a href='?src=[REF(src)];choice=auth'>Log In</a><br><hr>
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br><hr>"}
if(!target_dept)
body += "<br><hr><a href = '?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a>"
body += "<a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><hr>"
dat = "<tt>[header][body]<hr><br></tt>"
dat = list("<tt>", header.Join(), body, "<br></tt>")
var/datum/browser/popup = new(user, "id_com", src.name, 900, 620)
popup.set_content(dat)
popup.set_content(dat.Join())
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
@@ -353,50 +366,72 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
usr.set_machine(src)
switch(href_list["choice"])
if ("modify")
eject_id_modify(usr)
if ("scan")
eject_id_scan(usr)
if ("inserted_modify_id")
if(inserted_modify_id && !usr.get_active_held_item())
if(id_eject(usr, inserted_modify_id))
inserted_modify_id = null
updateUsrDialog()
return
if(usr.get_id_in_hand())
var/obj/item/held_item = usr.get_active_held_item()
var/obj/item/card/id/id_to_insert = held_item.GetID()
if(id_insert(usr, held_item, inserted_modify_id))
inserted_modify_id = id_to_insert
updateUsrDialog()
if ("inserted_scan_id")
if(inserted_scan_id && !usr.get_active_held_item())
if(id_eject(usr, inserted_scan_id))
inserted_scan_id = null
updateUsrDialog()
return
if(usr.get_id_in_hand())
var/obj/item/held_item = usr.get_active_held_item()
var/obj/item/card/id/id_to_insert = held_item.GetID()
if(id_insert(usr, held_item, inserted_scan_id))
inserted_scan_id = id_to_insert
updateUsrDialog()
if ("auth")
if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode)))
if (check_access(scan))
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) || mode))
if (check_access(inserted_scan_id))
region_access = list()
head_subordinates = list()
if(ACCESS_CHANGE_IDS in scan.access)
if(ACCESS_CHANGE_IDS in inserted_scan_id.access)
if(target_dept)
head_subordinates = get_all_jobs()
region_access |= target_dept
authenticated = 1
else
authenticated = 2
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
else
if((ACCESS_HOP in scan.access) && ((target_dept==1) || !target_dept))
if((ACCESS_HOP in inserted_scan_id.access) && ((target_dept==1) || !target_dept))
region_access |= 1
region_access |= 6
get_subordinates("Head of Personnel")
if((ACCESS_HOS in scan.access) && ((target_dept==2) || !target_dept))
if((ACCESS_HOS in inserted_scan_id.access) && ((target_dept==2) || !target_dept))
region_access |= 2
get_subordinates("Head of Security")
if((ACCESS_CMO in scan.access) && ((target_dept==3) || !target_dept))
if((ACCESS_CMO in inserted_scan_id.access) && ((target_dept==3) || !target_dept))
region_access |= 3
get_subordinates("Chief Medical Officer")
if((ACCESS_RD in scan.access) && ((target_dept==4) || !target_dept))
if((ACCESS_RD in inserted_scan_id.access) && ((target_dept==4) || !target_dept))
region_access |= 4
get_subordinates("Research Director")
if((ACCESS_CE in scan.access) && ((target_dept==5) || !target_dept))
if((ACCESS_CE in inserted_scan_id.access) && ((target_dept==5) || !target_dept))
region_access |= 5
get_subordinates("Chief Engineer")
if((ACCESS_QM in inserted_scan_id.access) && ((target_dept==6) || !target_dept))
region_access |= 6
get_subordinates("Quartermaster")
if(region_access)
authenticated = 1
else if ((!( authenticated ) && issilicon(usr)) && (!modify))
else if ((!( authenticated ) && issilicon(usr)) && (!inserted_modify_id))
to_chat(usr, "<span class='warning'>You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.</span>")
if ("logout")
region_access = null
head_subordinates = null
authenticated = 0
playsound(src, 'sound/machines/terminal_off.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
if("access")
if(href_list["allowed"])
@@ -404,20 +439,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/access_type = text2num(href_list["access_target"])
var/access_allowed = text2num(href_list["allowed"])
if(access_type in (istype(src, /obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses()))
modify.access -= access_type
inserted_modify_id.access -= access_type
if(access_allowed == 1)
modify.access += access_type
playsound(src, "terminal_type", 50, 0)
inserted_modify_id.access += access_type
playsound(src, "terminal_type", 50, FALSE)
if ("assign")
if (authenticated == 2)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", modify ? modify.assignment : "Unassigned"), MAX_NAME_LEN)
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
if(newJob)
t1 = newJob
else if(t1 == "Unassigned")
modify.access -= get_all_accesses()
inserted_modify_id.access -= get_all_accesses()
else
var/datum/job/jobdatum
@@ -428,30 +463,30 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
updateUsrDialog()
break
if(!jobdatum)
to_chat(usr, "<span class='error'>No log exists for this job.</span>")
to_chat(usr, "<span class='alert'>No log exists for this job.</span>")
updateUsrDialog()
return
modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (modify)
modify.assignment = t1
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
inserted_modify_id.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (inserted_modify_id)
inserted_modify_id.assignment = t1
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if ("demote")
if(modify.assignment in head_subordinates || modify.assignment == "Assistant")
modify.assignment = "Unassigned"
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
if(inserted_modify_id.assignment in head_subordinates || inserted_modify_id.assignment == "Assistant")
inserted_modify_id.assignment = "Unassigned"
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
else
to_chat(usr, "<span class='error'>You are not authorized to demote this position.</span>")
to_chat(usr, "<span class='alert'>You are not authorized to demote this position.</span>")
if ("reg")
if (authenticated)
var/t2 = modify
if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
var/t2 = inserted_modify_id
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
var/newName = reject_bad_name(href_list["reg"])
if(newName)
modify.registered_name = newName
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
inserted_modify_id.registered_name = newName
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
else
to_chat(usr, "<span class='error'>Invalid name entered.</span>")
to_chat(usr, "<span class='alert'>Invalid name entered.</span>")
updateUsrDialog()
return
if ("mode")
@@ -460,11 +495,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if("return")
//DISPLAY MAIN MENU
mode = 3;
playsound(src, "terminal_type", 25, 0)
playsound(src, "terminal_type", 25, FALSE)
if("make_job_available")
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(authenticated && !target_dept)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
@@ -477,11 +512,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions++
opened_positions[edit_job_target]++
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if("make_job_unavailable")
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(authenticated && !target_dept)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
@@ -495,11 +530,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions--
opened_positions[edit_job_target]--
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
if ("prioritize_job")
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(authenticated && !target_dept)
var/priority_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(priority_target)
if(!j)
@@ -515,8 +550,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
return
else
SSjob.prioritized_jobs += j
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if ("print")
if (!( printing ))
@@ -529,59 +564,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
P.info = t1
P.name = "paper- 'Crew Manifest'"
printing = null
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
if (modify)
modify.update_label()
updateUsrDialog()
/obj/machinery/computer/card/AltClick(mob/user)
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(scan)
eject_id_scan(user)
if(modify)
eject_id_modify(user)
/obj/machinery/computer/card/proc/eject_id_scan(mob/user)
if(scan)
scan.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(scan)
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
scan = null
else //switching the ID with the one you're holding
if(issilicon(user) || !Adjacent(user))
return
var/obj/item/I = user.get_active_held_item()
if(istype(I, /obj/item/card/id))
if(!user.transferItemToLoc(I,src))
return
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
scan = I
authenticated = FALSE
updateUsrDialog()
/obj/machinery/computer/card/proc/eject_id_modify(mob/user)
if(modify)
GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment)
modify.update_label()
modify.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(modify)
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
modify = null
region_access = null
head_subordinates = null
else //switching the ID with the one you're holding
if(issilicon(user) || !Adjacent(user))
return
var/obj/item/I = user.get_active_held_item()
if(istype(I, /obj/item/card/id))
if (!user.transferItemToLoc(I,src))
return
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
modify = I
authenticated = FALSE
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
if (inserted_modify_id)
inserted_modify_id.update_label()
updateUsrDialog()
/obj/machinery/computer/card/proc/get_subordinates(rank)
@@ -607,7 +592,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
typed_circuit.target_dept = target_dept
else
target_dept = typed_circuit.target_dept
var/list/dept_list = list("general","security","medical","science","engineering")
var/list/dept_list = list("civilian","security","medical","science","engineering","cargo")
name = "[dept_list[target_dept]] department console"
/obj/machinery/computer/card/minor/hos
@@ -631,3 +616,14 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
icon_screen = "idce"
light_color = LIGHT_COLOR_YELLOW
/obj/machinery/computer/card/minor/qm
target_dept = 6
icon_screen = "idqm"
light_color = LIGHT_COLOR_ORANGE
#undef JOB_ALLOWED
#undef JOB_COOLDOWN
#undef JOB_MAX_POSITIONS
#undef JOB_DENIED
+1 -1
View File
@@ -231,7 +231,7 @@
dat += "<h4>[src.active_record.fields["name"]]</h4>"
dat += "Scan ID [src.active_record.fields["id"]] <a href='byond://?src=[REF(src)];clone=[active_record.fields["id"]]'>Clone</a><br>"
var/obj/item/implant/health/H = locate(src.active_record.fields["imp"])
var/obj/item/implant/health/H = locate(active_record.fields["imp"])
if ((H) && (istype(H)))
dat += "<b>Health Implant Data:</b><br />[H.sensehealth()]<br><br />"
@@ -70,9 +70,7 @@
if("login")
var/mob/M = usr
var/obj/item/card/id/I = M.get_active_held_item()
if(!istype(I))
I = M.get_idcard()
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(I && istype(I))
if(check_access(I))
@@ -431,6 +429,7 @@
return ..()
/obj/machinery/computer/communications/emag_act(mob/user)
. = ..()
if(obj_flags & EMAGGED)
return
obj_flags |= EMAGGED
@@ -439,6 +438,7 @@
authenticated = 2
to_chat(user, "<span class='danger'>You scramble the communication routing circuits!</span>")
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
return TRUE
/obj/machinery/computer/communications/ui_interact(mob/user)
. = ..()
@@ -1,163 +0,0 @@
//computer that handle the points and teleports the prisoner
/obj/machinery/computer/gulag_teleporter_computer
name = "labor camp teleporter console"
desc = "Used to send criminals to the Labor Camp."
icon_screen = "explosive"
icon_keyboard = "security_key"
req_access = list(ACCESS_ARMORY)
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
var/default_goal = 200
var/obj/item/card/id/prisoner/id = null
var/obj/machinery/gulag_teleporter/teleporter = null
var/obj/structure/gulag_beacon/beacon = null
var/mob/living/carbon/human/prisoner = null
var/datum/data/record/temporary_record = null
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/gulag_teleporter_computer/Initialize()
. = ..()
scan_machinery()
/obj/machinery/computer/gulag_teleporter_computer/Destroy()
if(id)
id.forceMove(get_turf(src))
return ..()
/obj/machinery/computer/gulag_teleporter_computer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/card/id/prisoner))
if(!id)
if (!user.transferItemToLoc(W,src))
return
id = W
to_chat(user, "<span class='notice'>You insert [W].</span>")
return
else
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
return ..()
/obj/machinery/computer/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
ui.open()
/obj/machinery/computer/gulag_teleporter_computer/ui_data(mob/user)
var/list/data = list()
var/list/prisoner_list = list()
var/can_teleport = FALSE
if(teleporter && (teleporter.occupant && ishuman(teleporter.occupant)))
prisoner = teleporter.occupant
prisoner_list["name"] = prisoner.real_name
if(id)
can_teleport = TRUE
if(!isnull(GLOB.data_core.general))
for(var/r in GLOB.data_core.security)
var/datum/data/record/R = r
if(R.fields["name"] == prisoner_list["name"])
temporary_record = R
prisoner_list["crimstat"] = temporary_record.fields["criminal"]
data["prisoner"] = prisoner_list
if(teleporter)
data["teleporter"] = teleporter
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
data["teleporter_lock"] = teleporter.locked
data["teleporter_state_open"] = teleporter.state_open
if(beacon)
data["beacon"] = beacon
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
if(id)
data["id"] = id
data["id_name"] = id.registered_name
data["goal"] = id.goal
data["can_teleport"] = can_teleport
return data
/obj/machinery/computer/gulag_teleporter_computer/ui_act(action, list/params)
if(..())
return
if(!allowed(usr))
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
switch(action)
if("scan_teleporter")
teleporter = findteleporter()
if("scan_beacon")
beacon = findbeacon()
if("handle_id")
if(id)
usr.put_in_hands(id)
id = null
else
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
id = I
if("set_goal")
var/new_goal = input("Set the amount of points:", "Points", id.goal) as num|null
if(!isnum(new_goal))
return
if(!new_goal)
new_goal = default_goal
if (new_goal > 1000)
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
if("toggle_open")
if(teleporter.locked)
to_chat(usr, "The teleporter is locked")
return
teleporter.toggle_open()
if("teleporter_lock")
if(teleporter.state_open)
to_chat(usr, "Close the teleporter before locking!")
return
teleporter.locked = !teleporter.locked
if("teleport")
if(!teleporter || !beacon)
return
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
/obj/machinery/computer/gulag_teleporter_computer/proc/scan_machinery()
teleporter = findteleporter()
beacon = findbeacon()
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(var/direction in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
if(teleporterf && teleporterf.is_operational())
return teleporterf
/obj/machinery/computer/gulag_teleporter_computer/proc/findbeacon()
return locate(/obj/structure/gulag_beacon)
/obj/machinery/computer/gulag_teleporter_computer/proc/teleport(mob/user)
if(!id) //incase the ID was removed after the transfer timer was set.
say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!")
return
var/id_goal_not_set
if(!id.goal)
id_goal_not_set = TRUE
id.goal = default_goal
say("[id]'s ID card goal defaulting to [id.goal] points.")
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][id.goal] points.")
teleporter.handle_prisoner(id, temporary_record)
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
prisoner.forceMove(get_turf(beacon))
prisoner.Knockdown(40) // small travel dizziness
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
playsound(src, "sparks", 50, 1)
if(teleporter.locked)
teleporter.locked = FALSE
teleporter.toggle_open()
id = null
temporary_record = null
@@ -74,8 +74,8 @@
t += "<A href='?src=[REF(src)];lowery=1;raisex=1;pad=[current_pad]'>O</A><BR>"//down-right
t += "<BR>"
t += "<div class='statusDisplay'>Current offset:</div><BR>"
t += "<div class='statusDisplay'>[abs(pad.y_offset)] [pad.y_offset > 0 ? "N":"S"]</div><BR>"
t += "<div class='statusDisplay'>[abs(pad.x_offset)] [pad.x_offset > 0 ? "E":"W"]</div><BR>"
t += "<div class='statusDisplay'>[abs(pad.y_offset)] [pad.y_offset > 0 ? "N":"S"] <a href='?src=[REF(src)];sety=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
t += "<div class='statusDisplay'>[abs(pad.x_offset)] [pad.x_offset > 0 ? "E":"W"] <a href='?src=[REF(src)];setx=1;pad=[current_pad]'>\[SET\]</a></div><BR>"
t += "<BR><A href='?src=[REF(src)];launch=1;pad=[current_pad]'>Launch</A>"
t += " <A href='?src=[REF(src)];pull=1;pad=[current_pad]'>Pull</A>"
@@ -132,6 +132,16 @@
if(!new_name)
return
pad.display_name = new_name
if(href_list["setx"])
var/newx = input(usr, "Input new x offset", pad.display_name, pad.x_offset) as null|num
if(!isnull(newx))
pad.x_offset = CLAMP(newx, -pad.range, pad.range)
if(href_list["sety"])
var/newy = input(usr, "Input new y offset", pad.display_name, pad.y_offset) as null|num
if(!isnull(newy))
pad.y_offset = CLAMP(newy, -pad.range, pad.range)
if(href_list["remove"])
if(usr && alert(usr, "Are you sure?", "Remove Launchpad", "I'm Sure", "Abort") != "Abort")
@@ -145,4 +155,4 @@
sending = FALSE
teleport(usr, pad)
updateDialog()
updateDialog()
+1 -7
View File
@@ -22,12 +22,6 @@
/obj/machinery/computer/med_data/syndie
icon_keyboard = "syndie_key"
/obj/machinery/computer/med_data/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id))
id_insert_scan(user)
else
return ..()
/obj/machinery/computer/med_data/ui_interact(mob/user)
. = ..()
var/dat
@@ -573,7 +567,7 @@
if(user)
if(message)
if(authenticated)
if(user.canUseTopic(src, BE_CLOSE))
if(user.canUseTopic(src, !issilicon(user)))
if(!record1 || record1 == active1)
if(!record2 || record2 == active2)
return 1
-1
View File
@@ -1 +0,0 @@
/obj/machinery/computer/prisoner

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