diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index 1069dd6b2d6..9bfc6fa90b0 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -140,6 +140,25 @@ CREATE TABLE `death` ( ) ENGINE=MyISAM AUTO_INCREMENT=166546 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `donators` +-- + +DROP TABLE IF EXISTS `donators`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `donators` ( + `patreon_name` varchar(32) NOT NULL, + `tier` int(2), + `ckey` varchar(32) COMMENT 'Manual Field', + `start_date` datetime, + `end_date` datetime, + `active` boolean, + PRIMARY KEY (`patreon_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + + -- -- Table structure for table `admin` -- diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index 55e71aa2aab..c0cc8c86d6b 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -140,6 +140,24 @@ CREATE TABLE `SS13_death` ( ) ENGINE=MyISAM AUTO_INCREMENT=166546 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `donators` +-- + +DROP TABLE IF EXISTS `SS13_donators`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `donators` ( + `patreon_name` varchar(32) NOT NULL, + `tier` int(2), + `ckey` varchar(32) COMMENT 'Manual Field', + `start_date` datetime, + `end_date` datetime, + `active` boolean, + PRIMARY KEY (`patreon_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `SS13_admin` -- diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 1590325df0e..15a969e7a47 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -365,7 +365,7 @@ "aha" = (/obj/machinery/computer/prisoner,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahb" = (/obj/machinery/computer/security,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahc" = (/obj/machinery/computer/secure_data,/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) -"ahd" = (/obj/structure/table/woodentable,/obj/machinery/requests_console{announcementConsole = 1; department = "Head of Security's Desk"; departmentType = 5; name = "Head of Security RC"; pixel_x = 0; pixel_y = 30},/obj/machinery/computer/med_data/laptop,/obj/item/weapon/storage/secure/safe/HoS{pixel_x = 36; pixel_y = 28},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) +"ahd" = (/obj/structure/table/woodentable,/obj/machinery/requests_console{announcementConsole = 1; department = "Head of Security's Desk"; departmentType = 5; name = "Head of Security RC"; pixel_x = 0; pixel_y = 30},/obj/machinery/computer/med_data/laptop,/obj/item/weapon/storage/secure/safe{pixel_x = 36; pixel_y = 28},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahe" = (/turf/simulated/wall,/area/security/range) "ahf" = (/obj/machinery/alarm{pixel_y = 28},/obj/structure/rack,/obj/item/weapon/gun/energy/ionrifle,/obj/item/clothing/suit/armor/laserproof,/obj/machinery/light{dir = 1; on = 1},/turf/simulated/floor/plasteel{tag = "icon-vault (WEST)"; icon_state = "vault"; dir = 8},/area/security/warden) "ahg" = (/obj/machinery/door/airlock/external{name = "Escape Pod Three"},/turf/simulated/floor/plating,/area/crew_quarters/fitness{name = "\improper Recreation Area"}) diff --git a/_maps/map_files/RandomZLevels/spacehotel.dmm b/_maps/map_files/RandomZLevels/spacehotel.dmm index 6a368e05b16..c09808a51f8 100644 --- a/_maps/map_files/RandomZLevels/spacehotel.dmm +++ b/_maps/map_files/RandomZLevels/spacehotel.dmm @@ -523,7 +523,7 @@ "kc" = (/obj/machinery/door/airlock{name = "Supply Closet"},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "kd" = (/obj/machinery/door/airlock/glass{name = "Gateway"},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "ke" = (/obj/item/weapon/melee/cultblade,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) -"kf" = (/obj/item/weapon/kitchen/knife/butcher{blood_DNA = 1e+009},/obj/effect/decal/cleanable/blood/old,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) +"kf" = (/obj/item/weapon/kitchen/knife/butcher{blood_DNA = list("1e+009" = "O-")},/obj/effect/decal/cleanable/blood/old,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) "kg" = (/obj/machinery/light{dir = 8},/obj/structure/stool/bed/chair/sofa/left{icon_state = "sofaend_left"; dir = 4},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "kh" = (/obj/effect/hotel_controller,/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "ki" = (/obj/item/weapon/pen,/obj/structure/table/reinforced,/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel/reception) diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 899b6c51113..0e99320c6a3 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -531,7 +531,7 @@ "akk" = (/obj/structure/filingcabinet/chestdrawer,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/camera{c_tag = "Brig Warden's Office"; dir = 2; network = list("SS13")},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/warden) "akl" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/warden) "akm" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/closet/secure_closet/warden,/obj/machinery/status_display{layer = 4; pixel_x = 0; pixel_y = 32},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/warden) -"akn" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/table/reinforced,/obj/machinery/syndicatebomb/training,/obj/machinery/requests_console{department = "Security"; departmentType = 3; name = "Security Requests Console"; pixel_x = 30},/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/turf/simulated/floor/plasteel{icon_state = "red"; dir = 5},/area/security/range) +"akn" = (/obj/structure/table/reinforced,/obj/machinery/syndicatebomb/training,/obj/machinery/requests_console{department = "Security"; departmentType = 3; name = "Security Requests Console"; pixel_x = 30},/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plasteel{icon_state = "red"; dir = 5},/area/security/range) "ako" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass_security{name = "Prison Wing"; req_access_txt = "63"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 8},/area/security/permabrig) "akp" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/table/reinforced,/obj/item/weapon/book/manual/sop_legal,/turf/simulated/floor/plasteel,/area/security/main) "akq" = (/obj/structure/reagent_dispensers/peppertank{pixel_y = 30},/turf/simulated/floor/plasteel{icon_state = "red"; dir = 1},/area/security/seceqstorage) @@ -3753,7 +3753,7 @@ "bui" = (/turf/simulated/wall,/area/medical/morgue) "buj" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/medical/exam_room) "buk" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/turf/simulated/wall,/area/security/permabrig) -"bul" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"bul" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "bum" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall,/area/hallway/primary/starboard/east) "bun" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 1; scrub_Toxins = 1},/obj/item/weapon/twohanded/required/kirbyplants,/turf/simulated/floor/plasteel,/area/hallway/primary/starboard/east) "buo" = (/turf/simulated/floor/plasteel{dir = 1; icon_state = "loadingarea"; tag = "loading"},/area/hallway/primary/starboard/east) @@ -3842,7 +3842,7 @@ "bvT" = (/obj/structure/cable,/obj/machinery/power/apc{cell_type = 5000; dir = 2; name = "south bump Important Area"; pixel_y = -24},/turf/simulated/floor/bluegrid,/area/turret_protected/ai_upload) "bvU" = (/turf/simulated/floor/plasteel{dir = 1; icon_state = "blue"},/area/medical/morgue) "bvV" = (/obj/structure/morgue{tag = "icon-morgue1 (WEST)"; icon_state = "morgue1"; dir = 8},/turf/simulated/floor/plasteel,/area/medical/morgue) -"bvW" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"bvW" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "bvX" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall/r_wall,/area/assembly/chargebay) "bvY" = (/turf/simulated/wall/r_wall,/area/assembly/chargebay) "bvZ" = (/obj/machinery/door/firedoor{dir = 8; name = "Firelock West"},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/obj/machinery/door/airlock/research{name = "Mech Bay"; req_access_txt = "29"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/assembly/chargebay) @@ -3925,7 +3925,7 @@ "bxy" = (/obj/machinery/door/firedoor{dir = 1; name = "hazard door north"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/airlock/glass_research{name = "Research and Development"; req_access_txt = "47"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/lab) "bxz" = (/obj/structure/morgue,/obj/effect/landmark{name = "revenantspawn"},/turf/simulated/floor/plasteel,/area/medical/morgue) "bxA" = (/obj/structure/morgue{tag = "icon-morgue1 (WEST)"; icon_state = "morgue1"; dir = 8},/obj/effect/landmark{name = "revenantspawn"},/turf/simulated/floor/plasteel,/area/medical/morgue) -"bxB" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"bxB" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "bxC" = (/obj/machinery/light_switch{pixel_x = -23; pixel_y = 0},/turf/simulated/floor/plasteel,/area/assembly/chargebay) "bxD" = (/turf/simulated/floor/plasteel,/area/assembly/chargebay) "bxE" = (/obj/machinery/door_control{dir = 2; id = "mechbay"; name = "Mech Bay Door Control"; pixel_x = 6; pixel_y = 24; req_access_txt = "29"},/turf/simulated/floor/plasteel{tag = "icon-warningcorner (WEST)"; icon_state = "warningcorner"; dir = 8},/area/assembly/chargebay) @@ -5332,11 +5332,11 @@ "bYB" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/plasteel,/area/janitor) "bYC" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plasteel,/area/janitor) "bYD" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"bYE" = (/turf/simulated/floor/plasteel{dir = 4; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTH)"},/area/medical/paramedic) -"bYF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/stool/bed/amb_trolley,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) +"bYE" = (/obj/structure/stool/bed/amb_trolley,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) +"bYF" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/turf/simulated/floor/plasteel{dir = 4; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTH)"},/area/medical/paramedic) "bYG" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{dir = 8; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTH)"},/area/medical/paramedic) -"bYH" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) -"bYI" = (/obj/structure/closet/secure_closet/paramedic,/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) +"bYH" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) +"bYI" = (/obj/structure/closet/secure_closet/paramedic,/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1; scrub_N2O = 1; scrub_Toxins = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/paramedic) "bYJ" = (/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 4; icon_state = "shutter0"; id_tag = "acute2"; name = "Acute 2 Privacy Shutters"; opacity = 0},/turf/simulated/floor/plasteel{tag = "icon-whitebluefull"; icon_state = "whitebluefull"},/area/medical/sleeper) "bYK" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{tag = "icon-whiteblue (WEST)"; icon_state = "whiteblue"; dir = 8},/area/medical/medbay2) "bYL" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/medbay2) @@ -5470,10 +5470,10 @@ "cbj" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{dir = 8; icon_state = "cautioncorner"},/area/hallway/primary/aft) "cbk" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel,/area/hallway/primary/aft) "cbl" = (/turf/simulated/floor/plasteel{dir = 2; icon_state = "yellowcorner"},/area/hallway/primary/aft) -"cbm" = (/obj/machinery/door/airlock/maintenance{name = "Custodial Maintenance"; req_access_txt = "26"},/turf/simulated/floor/plating,/area/janitor) +"cbm" = (/obj/machinery/door/airlock/maintenance{name = "Custodial Maintenance"; req_access_txt = "26"},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cbn" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/light{dir = 1},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/obj/item/weapon/twohanded/required/kirbyplants,/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/turf/simulated/floor/wood,/area/ntrep) "cbo" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/grille{density = 0; icon_state = "brokengrille"},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cbp" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door/airlock/maintenance{name = "Paramedic Maintenance"; req_access_txt = "66"},/turf/simulated/floor/plating,/area/medical/paramedic) +"cbp" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door/airlock/maintenance{name = "Paramedic Maintenance"; req_access_txt = "66"},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cbq" = (/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "scansep"; name = "Scanning Room Separation Shutters"; opacity = 0},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/sleeper) "cbr" = (/obj/structure/disposalpipe/segment,/obj/machinery/door/firedoor,/turf/simulated/floor/plasteel{tag = "icon-whiteblue (WEST)"; icon_state = "whiteblue"; dir = 8},/area/medical/medbay2) "cbs" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/firedoor,/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 32; pixel_y = 0},/turf/simulated/floor/plasteel{dir = 4; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)"},/area/medical/medbay2) @@ -5940,7 +5940,7 @@ "ckl" = (/turf/simulated/wall,/area/medical/ward) "ckm" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall,/area/medical/ward) "ckn" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass_medical{id_tag = null; name = "Recovery Ward"; req_access_txt = "0"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) -"cko" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass_medical{id_tag = null; name = "Recovery Ward"; req_access_txt = "0"},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"cko" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass_medical{id_tag = null; name = "Recovery Ward"; req_access_txt = "0"},/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "ckp" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall,/area/medical/ward) "ckq" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/wall,/area/medical/ward) "ckr" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall,/area/medical/ward) @@ -6012,7 +6012,7 @@ "clF" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "clG" = (/obj/structure/cable,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8; initialize_directions = 11; level = 1},/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "blue"; dir = 6},/area/medical/sleeper) "clH" = (/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) -"clI" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"clI" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "clJ" = (/obj/machinery/alarm{pixel_y = 23},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "clK" = (/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/obj/structure/stool/bed,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "clL" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/light{dir = 1; on = 1},/obj/structure/stool/bed,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) @@ -6149,7 +6149,7 @@ "com" = (/obj/structure/stool/bed/chair/comfy/black,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "con" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/closet/wardrobe/pjs,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "coo" = (/obj/structure/closet/wardrobe/pjs,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) -"cop" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) +"cop" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "coq" = (/obj/structure/stool/bed/chair/comfy/black,/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) "cor" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{level = 1},/turf/simulated/wall,/area/engine/break_room) "cos" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plasteel{dir = 2; icon_state = "yellowcorner"},/area/hallway/primary/aft) @@ -6217,14 +6217,14 @@ "cpC" = (/obj/structure/table,/obj/item/stack/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/stack/cable_coil{pixel_x = 3; pixel_y = -7},/turf/simulated/floor/plasteel,/area/engine/controlroom) "cpD" = (/obj/machinery/light_switch{pixel_x = -23; pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "cpE" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) -"cpF" = (/turf/simulated/wall,/area/medical/surgery) -"cpG" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall,/area/medical/surgery) -"cpH" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/medical{name = "Operating Theatre"; req_access_txt = "45"},/obj/machinery/holosign/surgery{id = "surgery1"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cpI" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs1"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/surgery) -"cpJ" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs2"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/surgery) -"cpK" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/medical{name = "Operating Theatre"; req_access_txt = "45"},/obj/machinery/holosign/surgery{id = "surgery2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cpF" = (/turf/simulated/wall,/area/medical/surgery1) +"cpG" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall,/area/medical/surgery1) +"cpH" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs1"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/surgery1) +"cpI" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/medical{name = "Operating Theatre"; req_access_txt = "45"},/obj/machinery/holosign/surgery{id = "surgery1"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cpJ" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs1"; name = "Privacy Shutters"; opacity = 0},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/surgery1) +"cpK" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs2"; name = "Privacy Shutters"; opacity = 0},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/surgery2) "cpL" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance{name = "Genetics Maintenance"; req_access_txt = "9"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/maintenance/genetics) -"cpM" = (/turf/simulated/wall/r_wall,/area/medical/surgery) +"cpM" = (/obj/structure/sign/nosmoking_2,/turf/simulated/wall,/area/medical/surgery1) "cpN" = (/turf/simulated/floor/plasteel,/area/medical/biostorage) "cpO" = (/obj/structure/closet/l3closet,/obj/item/clothing/mask/gas,/turf/simulated/floor/plasteel{icon_state = "blue"; dir = 10},/area/medical/biostorage) "cpP" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/shoes/magboots,/obj/item/clothing/suit/space/rig/medical,/obj/item/clothing/mask/gas,/obj/item/clothing/head/helmet/space/rig/medical,/turf/simulated/floor/plasteel{dir = 0; icon_state = "blue"},/area/medical/biostorage) @@ -6271,15 +6271,15 @@ "cqE" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "cqF" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "cqG" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) -"cqH" = (/obj/structure/table,/obj/item/weapon/storage/box/gloves,/obj/item/weapon/storage/box/masks,/obj/item/weapon/reagent_containers/spray/cleaner{desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; name = "Surgery Cleaner"},/obj/machinery/light_switch{pixel_x = -5; pixel_y = 27},/obj/machinery/holosign_switch{id = "surgery1"; pixel_x = 5; pixel_y = 27},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cqH" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs2"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/surgery2) "cqI" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/door/window/westright{dir = 8; icon_state = "left"; name = "Witness Stand"},/obj/structure/window/reinforced{dir = 1; layer = 2.9},/turf/simulated/floor/wood,/area/crew_quarters/courtroom) -"cqJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cqK" = (/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cqL" = (/obj/machinery/bodyscanner,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cqM" = (/obj/machinery/body_scanconsole,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cqN" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cqJ" = (/turf/simulated/wall,/area/medical/surgery2) +"cqK" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/medical{name = "Operating Theatre"; req_access_txt = "45"},/obj/machinery/holosign/surgery{id = "surgery2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cqL" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall,/area/medical/surgery2) +"cqM" = (/obj/structure/table,/obj/item/weapon/reagent_containers/blood/AMinus,/obj/item/weapon/reagent_containers/blood/APlus,/obj/item/weapon/reagent_containers/blood/BMinus,/obj/item/weapon/reagent_containers/blood/BPlus,/obj/item/weapon/reagent_containers/blood/OPlus,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/alarm{pixel_y = 23},/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/camera{c_tag = "Medbay Surgery 1 North"; network = list("SS13")},/obj/machinery/light{dir = 1; in_use = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cqN" = (/obj/structure/table,/obj/item/weapon/storage/box/gloves,/obj/item/weapon/storage/box/masks,/obj/item/weapon/reagent_containers/spray/cleaner{desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; name = "Surgery Cleaner"},/obj/machinery/light_switch{pixel_x = -5; pixel_y = 27},/obj/machinery/holosign_switch{id = "surgery1"; pixel_x = 5; pixel_y = 27},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cqO" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance{name = "Medbay Maintenance"; req_access_txt = "5"},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cqP" = (/obj/structure/table,/obj/item/weapon/storage/box/gloves,/obj/item/weapon/storage/box/masks,/obj/item/weapon/reagent_containers/spray/cleaner{desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; name = "Surgery Cleaner"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/light_switch{pixel_x = 5; pixel_y = 27},/obj/machinery/holosign_switch{id = "surgery2"; pixel_x = -5; pixel_y = 27},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cqP" = (/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cqQ" = (/obj/machinery/light{dir = 8},/obj/structure/closet/wardrobe/pjs,/turf/simulated/floor/plasteel{dir = 8; icon_state = "whitered"},/area/medical/medbay2) "cqR" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint2) "cqS" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/obj/machinery/atmospherics/pipe/simple/visible/universal,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/maintenance/asmaint2) @@ -6311,7 +6311,7 @@ "crs" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/drone_fabricator,/turf/simulated/floor/plasteel,/area/engine/controlroom) "crt" = (/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 1; scrub_Toxins = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/turf/simulated/floor/plasteel,/area/engine/controlroom) "cru" = (/obj/item/device/radio/intercom{name = "station intercom (General)"; pixel_y = -28},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/computer/drone_control,/turf/simulated/floor/plasteel,/area/engine/controlroom) -"crv" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/wall,/area/medical/surgery) +"crv" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "crw" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/electrical{pixel_y = 5},/obj/machinery/atmospherics/pipe/simple/hidden/supply{level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/item/device/radio/intercom{frequency = 1459; name = "station intercom (General)"; pixel_x = -28},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "crx" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/mechanical{pixel_y = 5},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10; initialize_directions = 10; level = 1},/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "cry" = (/obj/structure/table,/obj/item/device/multitool,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) @@ -6319,9 +6319,9 @@ "crA" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/construction) "crB" = (/turf/simulated/wall/r_wall/coated,/area/maintenance/turbine) "crC" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/camera{c_tag = "Medbay Recovery Ward East"; dir = 8; network = list("SS13"); pixel_y = -22},/obj/structure/closet/wardrobe/pjs,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/ward) -"crD" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs1"; name = "Privacy Shutters"; opacity = 0},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/surgery) -"crE" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "surgeryobs2"; name = "Privacy Shutters"; opacity = 0},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/surgery) -"crF" = (/obj/structure/table,/obj/item/weapon/reagent_containers/blood/AMinus,/obj/item/weapon/reagent_containers/blood/APlus,/obj/item/weapon/reagent_containers/blood/BMinus,/obj/item/weapon/reagent_containers/blood/BPlus,/obj/item/weapon/reagent_containers/blood/OPlus,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/alarm{pixel_y = 23},/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/camera{c_tag = "Medbay Surgery 1 North"; network = list("SS13")},/obj/machinery/light{dir = 1; in_use = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"crD" = (/obj/machinery/body_scanconsole,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"crE" = (/obj/machinery/bodyscanner,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"crF" = (/obj/machinery/bodyscanner,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "crG" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/asmaint2) "crH" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/maintenance/asmaint2) "crI" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/maintenance/asmaint2) @@ -6372,7 +6372,7 @@ "csB" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{dir = 4; icon_state = "yellowcorner"},/area/hallway/primary/aft) "csC" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel,/area/hallway/primary/aft) "csD" = (/obj/machinery/atmospherics/unary/portables_connector{dir = 4},/obj/machinery/portable_atmospherics/scrubber,/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plasteel{dir = 8; icon_state = "escape"},/area/hallway/primary/aft) -"csE" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/wall,/area/medical/surgery) +"csE" = (/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "csF" = (/obj/machinery/door/firedoor{dir = 1; name = "Firelock North"},/obj/machinery/door/airlock/glass_engineering{name = "Engineering"; req_access_txt = "0"; req_one_access_txt = "11;24"},/obj/machinery/atmospherics/pipe/simple/hidden/yellow{tag = "icon-intact (NORTHWEST)"; icon_state = "intact"; dir = 9},/turf/simulated/floor/plasteel,/area/engine/controlroom) "csG" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall,/area/maintenance/asmaint2) "csH" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_l (NORTH)"; icon_state = "propulsion_l"; dir = 1},/turf/space,/area/shuttle/syndicate_sit) @@ -6383,16 +6383,16 @@ "csM" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/turf/simulated/wall/r_wall,/area/atmos/control) "csN" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall/r_wall,/area/atmos/control) "csO" = (/turf/simulated/wall/r_wall,/area/atmos/control) -"csP" = (/obj/machinery/body_scanconsole,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csQ" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csR" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csS" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csT" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csU" = (/obj/machinery/bodyscanner,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csV" = (/obj/structure/table,/obj/item/weapon/reagent_containers/blood/AMinus,/obj/item/weapon/reagent_containers/blood/APlus,/obj/item/weapon/reagent_containers/blood/BMinus,/obj/item/weapon/reagent_containers/blood/BPlus,/obj/item/weapon/reagent_containers/blood/OPlus,/obj/machinery/alarm{pixel_y = 23},/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/camera{c_tag = "Medbay Surgery 2 North"; network = list("SS13")},/obj/machinery/light{dir = 1; in_use = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csW" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; external_pressure_bound = 101; on = 1; pressure_checks = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csX" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"csY" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"csP" = (/obj/machinery/body_scanconsole,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"csQ" = (/obj/structure/table,/obj/item/weapon/reagent_containers/blood/AMinus,/obj/item/weapon/reagent_containers/blood/APlus,/obj/item/weapon/reagent_containers/blood/BMinus,/obj/item/weapon/reagent_containers/blood/BPlus,/obj/item/weapon/reagent_containers/blood/OPlus,/obj/machinery/alarm{pixel_y = 23},/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/camera{c_tag = "Medbay Surgery 2 North"; network = list("SS13")},/obj/machinery/light{dir = 1; in_use = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"csR" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"csS" = (/obj/structure/table,/obj/item/weapon/storage/box/gloves,/obj/item/weapon/storage/box/masks,/obj/item/weapon/reagent_containers/spray/cleaner{desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back."; name = "Surgery Cleaner"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/light_switch{pixel_x = 5; pixel_y = 27},/obj/machinery/holosign_switch{id = "surgery2"; pixel_x = -5; pixel_y = 27},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"csT" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"csU" = (/obj/structure/disposalpipe/trunk{dir = 4},/obj/machinery/disposal,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"csV" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"csW" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"csX" = (/obj/machinery/door_control{id = "surgeryobs1"; name = "Privacy Shutters Control"; pixel_x = 25; pixel_y = 0},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"csY" = (/obj/machinery/door_control{id = "surgeryobs2"; name = "Privacy Shutters Control"; pixel_x = -25; pixel_y = 0},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "csZ" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/medical{name = "Isolation A"; req_access_txt = "5"},/turf/simulated/floor/plasteel,/area/medical/patient_a) "cta" = (/obj/structure/stool/bed,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/virology) "ctb" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{dir = 4; icon_state = "whitered"},/area/medical/patient_a) @@ -6448,16 +6448,16 @@ "ctZ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 5},/obj/machinery/computer/general_air_control{frequency = 1443; level = 3; name = "Distribution and Waste Monitor"; sensors = list("mair_in_meter" = "Mixed Air In", "air_sensor" = "Mixed Air Supply Tank", "mair_out_meter" = "Mixed Air Out", "dloop_atm_meter" = "Distribution Loop", "wloop_atm_meter" = "Waste Loop")},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel,/area/atmos/control) "cua" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall/r_wall,/area/atmos/control) "cub" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 1; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cuc" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall,/area/medical/surgery) -"cud" = (/obj/structure/closet/crate/freezer,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/device/radio/intercom{frequency = 1459; name = "station intercom (General)"; pixel_x = -28},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cue" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cuf" = (/obj/machinery/computer/operating,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cug" = (/obj/machinery/optable,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cuh" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cui" = (/obj/structure/disposalpipe/trunk{dir = 4},/obj/machinery/disposal,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cuj" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cuk" = (/obj/machinery/computer/operating,/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cul" = (/obj/structure/closet/crate/freezer,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cuc" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cud" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cue" = (/turf/simulated/wall/r_wall,/area/medical/surgery2) +"cuf" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/trunk{dir = 8},/obj/machinery/disposal,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cug" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cuh" = (/obj/machinery/iv_drip,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cui" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cuj" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cuk" = (/obj/structure/sink{dir = 4; icon_state = "sink"; pixel_x = 12; pixel_y = 2},/obj/machinery/firealarm{dir = 4; pixel_x = 24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cul" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cum" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8; initialize_directions = 11; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 6},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cun" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/asmaint2) "cuo" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "blue"; dir = 8},/area/medical/patients_rooms) @@ -6510,10 +6510,10 @@ "cvj" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/obj/structure/stool/bed/chair/office/dark{dir = 1},/turf/simulated/floor/plasteel,/area/atmos/control) "cvk" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/computer/atmos_alert,/turf/simulated/floor/plasteel,/area/atmos/control) "cvl" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cvm" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/turf/simulated/wall,/area/medical/surgery) -"cvn" = (/obj/structure/closet/secure_closet/medical3,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cvo" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cvp" = (/obj/machinery/door_control{id = "surgeryobs1"; name = "Privacy Shutters Control"; pixel_x = 25; pixel_y = 0},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cvm" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cvn" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; external_pressure_bound = 101; on = 1; pressure_checks = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cvo" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cvp" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "cvq" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 2; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/virology) "cvr" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/asmaint) "cvs" = (/obj/structure/table,/obj/machinery/kitchen_machine/microwave{pixel_x = -3; pixel_y = 6},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/virology) @@ -6554,20 +6554,20 @@ "cwb" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 8},/turf/simulated/floor/plasteel,/area/atmos/control) "cwc" = (/turf/simulated/floor/plasteel,/area/atmos/control) "cwd" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/computer/security/engineering,/obj/machinery/requests_console{department = "Atmospherics"; departmentType = 3; name = "Atmospherics Requests Console"; pixel_x = 30; pixel_y = 0},/turf/simulated/floor/plasteel,/area/atmos/control) -"cwe" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall,/area/medical/surgery) -"cwf" = (/obj/structure/closet/secure_closet/medical2,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cwe" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cwf" = (/obj/effect/spawner/window/reinforced,/turf/simulated/floor/plating,/area/medical/surgery2) "cwg" = (/obj/structure/cable,/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/turf/simulated/floor/plating,/area/maintenance/consarea) -"cwh" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cwi" = (/obj/machinery/door_control{id = "surgeryobs2"; name = "Privacy Shutters Control"; pixel_x = -25; pixel_y = 0},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cwj" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cwk" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/trunk{dir = 8},/obj/machinery/disposal,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cwl" = (/obj/machinery/iv_drip,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"cwm" = (/obj/structure/sink{dir = 4; icon_state = "sink"; pixel_x = 12; pixel_y = 2},/obj/machinery/firealarm{dir = 4; pixel_x = 24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cwh" = (/obj/machinery/iv_drip,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cwi" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall,/area/medical/surgery1) +"cwj" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cwk" = (/obj/structure/closet/crate/freezer,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/device/radio/intercom{frequency = 1459; name = "station intercom (General)"; pixel_x = -28},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cwl" = (/obj/machinery/optable,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"cwm" = (/obj/machinery/computer/operating,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cwn" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/airlock/maintenance{name = "Medbay Maintenance"; req_access_txt = "5"},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cwo" = (/obj/structure/closet/secure_closet/medical2,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cwo" = (/obj/item/weapon/circular_saw,/obj/item/weapon/FixOVein,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cwp" = (/turf/space,/area/maintenance/asmaint) "cwq" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel,/area/hallway/primary/aft) -"cwr" = (/obj/effect/spawner/window/reinforced,/turf/simulated/floor/plating,/area/medical/surgery) +"cwr" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cws" = (/obj/machinery/iv_drip,/obj/machinery/light,/obj/item/device/radio/intercom{dir = 8; name = "station intercom (General)"; pixel_x = -28},/turf/simulated/floor/plasteel{dir = 10; icon_state = "whitered"},/area/medical/patient_a) "cwt" = (/obj/structure/disposalpipe/trunk{dir = 4},/obj/structure/disposaloutlet,/turf/simulated/floor/engine,/area/toxins/xenobiology) "cwu" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/light/small{dir = 1},/turf/simulated/floor/engine,/area/toxins/xenobiology) @@ -6633,7 +6633,7 @@ "cxC" = (/obj/structure/window/reinforced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate_sit) "cxD" = (/obj/structure/stool/bed/chair{dir = 4},/obj/machinery/light/spot{tag = "icon-tube1 (WEST)"; icon_state = "tube1"; dir = 8},/obj/structure/window/reinforced,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate_sit) "cxE" = (/obj/machinery/door/window/brigdoor{dir = 2; name = "Cell Door"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/syndicate_sit) -"cxF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance{name = "Surgery Maintenance"; req_access_txt = "45"},/turf/simulated/floor/plating,/area/maintenance/asmaint) +"cxF" = (/obj/item/weapon/circular_saw,/obj/item/weapon/FixOVein,/obj/item/device/radio/intercom{frequency = 1459; name = "station intercom (General)"; pixel_x = -28},/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "cxG" = (/obj/machinery/access_button{command = "cycle_exterior"; frequency = 1379; master_tag = "xeno_airlock_control"; name = "Xenobiology Access Button"; pixel_x = -24; pixel_y = 0; req_access_txt = "55"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/firedoor{dir = 4; name = "Firelock East"},/obj/machinery/door/airlock/research{autoclose = 0; frequency = 1379; icon_state = "door_locked"; id_tag = "xeno_airlock_exterior"; locked = 1; name = "Xenobiology External Airlock"; req_access_txt = "55"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/toxins/xenobiology) "cxH" = (/obj/effect/spawner/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/asmaint2) "cxI" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{dir = 4; icon_state = "blue"},/area/medical/patients_rooms) @@ -6685,8 +6685,8 @@ "cyC" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 6},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cyD" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cyE" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 1; initialize_directions = 11; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cyF" = (/obj/structure/sign/nosmoking_2,/turf/simulated/wall,/area/medical/surgery) -"cyG" = (/obj/structure/closet/secure_closet/medical3,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cyF" = (/obj/machinery/optable,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"cyG" = (/obj/machinery/computer/operating,/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "cyH" = (/obj/machinery/light/small,/turf/simulated/floor/plating,/area/maintenance/asmaint) "cyI" = (/obj/structure/disposaloutlet{dir = 8},/obj/structure/disposalpipe/trunk,/turf/simulated/floor/engine,/area/toxins/xenobiology) "cyJ" = (/turf/simulated/wall,/area/maintenance/asmaint2) @@ -6783,7 +6783,7 @@ "cAw" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = ""},/turf/simulated/wall,/area/engine/break_room) "cAx" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = ""},/obj/machinery/alarm{dir = 4; pixel_x = -23; pixel_y = 0},/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/obj/item/device/radio/intercom{dir = 1; name = "station intercom (General)"; pixel_y = 25},/turf/simulated/floor/plasteel,/area/engine/break_room) "cAy" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel,/area/engine/break_room) -"cAz" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cAz" = (/obj/structure/closet/crate/freezer,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/obj/item/weapon/reagent_containers/blood/empty,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "cAA" = (/obj/effect/landmark/start{name = "Station Engineer"},/obj/structure/stool/bed/chair/comfy/black{dir = 8},/turf/simulated/floor/plasteel,/area/engine/break_room) "cAB" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{level = 1},/obj/item/weapon/twohanded/required/kirbyplants,/turf/simulated/floor/plasteel,/area/engine/break_room) "cAC" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/wall/r_wall,/area/atmos/control) @@ -6851,7 +6851,7 @@ "cBM" = (/obj/machinery/firealarm{dir = 2; pixel_y = 24},/obj/machinery/atmospherics/pipe/manifold/visible/cyan{dir = 1},/turf/simulated/floor/plasteel,/area/atmos/distribution) "cBN" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cBO" = (/obj/machinery/atmospherics/pipe/simple/visible/cyan{dir = 10; initialize_directions = 10; level = 2},/obj/machinery/alarm{frequency = 1439; pixel_y = 23},/turf/simulated/floor/plasteel,/area/atmos/distribution) -"cBP" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) +"cBP" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/turf/simulated/wall,/area/medical/surgery1) "cBQ" = (/obj/machinery/light/small{dir = 1},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cBR" = (/obj/machinery/hologram/holopad,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/virology) "cBS" = (/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/virology) @@ -7004,7 +7004,7 @@ "cEJ" = (/obj/machinery/alarm{pixel_y = 24},/turf/simulated/floor/plasteel{dir = 8; icon_state = "neutralfull"},/area/engine/chiefs_office) "cEK" = (/obj/machinery/door/airlock/glass_command{name = "Chief Engineer"; req_access_txt = "56"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "neutralfull"},/area/engine/chiefs_office) "cEL" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel,/area/engine/equipmentstorage) -"cEM" = (/obj/structure/table/glass,/obj/item/weapon/bonegel,/obj/item/weapon/bonesetter,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"cEM" = (/obj/structure/closet/secure_closet/medical3,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "cEN" = (/obj/item/device/radio/intercom{dir = 8; name = "station intercom (General)"; pixel_x = -28},/obj/machinery/portable_atmospherics/canister/air,/obj/effect/decal/warning_stripes/white/hollow,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/atmos) "cEO" = (/obj/machinery/portable_atmospherics/canister/air,/obj/effect/decal/warning_stripes/white/hollow,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/atmos) "cEP" = (/obj/machinery/atmospherics/pipe/simple/visible/yellow{level = 2},/obj/machinery/atmospherics/pipe/simple/visible/green{dir = 4; level = 2},/turf/simulated/floor/plasteel,/area/atmos/distribution) @@ -7887,7 +7887,7 @@ "cVI" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = ""},/turf/simulated/floor/plasteel{icon_state = "grimy"},/area/turret_protected/aisat_interior) "cVJ" = (/turf/simulated/wall,/area/turret_protected/aisat_interior) "cVK" = (/obj/effect/decal/warning_stripes/east,/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/machinery/camera{c_tag = "Mini Satellite Teleporter"; dir = 1; network = list("SS13","MiniSat")},/turf/simulated/floor/plasteel{dir = 5; icon_state = "dark"; tag = "icon-vault (NORTHEAST)"},/area/turret_protected/aisat_interior) -"cVL" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/hatch{name = "MiniSat Antechamber"; req_access_txt = "75"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{dir = 5; icon_state = "dark"; tag = "icon-vault (NORTHEAST)"},/area/turret_protected/aisat_interior) +"cVL" = (/obj/machinery/door/firedoor,/obj/machinery/door/airlock/hatch{name = "MiniSat Antechamber"; req_access_txt = "75"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{dir = 5; icon_state = "dark"; tag = "icon-vault (NORTHEAST)"},/area/turret_protected/aisat_interior) "cVM" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/wall,/area/turret_protected/aisat_interior) "cVN" = (/obj/machinery/computer/teleporter,/turf/simulated/floor/plating,/area/turret_protected/aisat_interior) "cVO" = (/turf/simulated/wall/r_wall,/area/aisat/entrance{name = "\improper AI Satellite Atmospherics"}) @@ -8237,7 +8237,7 @@ "dcu" = (/obj/machinery/light{dir = 4},/obj/structure/dresser,/turf/simulated/floor/plasteel{dir = 2; icon_state = "barber"},/area/civilian/barber) "dcv" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/decal/warning_stripes/southwestcorner,/turf/simulated/floor/plasteel,/area/engine/engineering) "dcw" = (/obj/structure/disposalpipe/segment,/obj/structure/table/glass,/obj/machinery/computer/med_data/laptop,/turf/simulated/floor/plasteel{dir = 2; icon_state = "whitegreen"; tag = "icon-whitehall (WEST)"},/area/medical/virology) -"dcx" = (/obj/effect/spawner/lootdrop/maintenance,/obj/effect/decal/cleanable/cobweb2,/turf/simulated/floor/plating,/area/medical/virology) +"dcx" = (/obj/effect/spawner/lootdrop/maintenance,/obj/effect/decal/cleanable/cobweb2,/turf/simulated/floor/plating,/area/maintenance/asmaint) "dcy" = (/obj/item/device/radio/intercom{dir = 1; name = "station intercom (General)"; pixel_y = -28},/turf/simulated/floor/plasteel{dir = 1; icon_state = "whitegreencorner"},/area/medical/virology) "dcz" = (/obj/structure/closet/secure_closet/personal/patient,/turf/simulated/floor/plasteel{dir = 5; icon_state = "whitegreencorner"},/area/medical/virology) "dcA" = (/obj/item/device/radio/intercom{dir = 1; name = "station intercom (General)"; pixel_y = -28},/turf/simulated/floor/plasteel{dir = 4; icon_state = "whitegreencorner"},/area/medical/virology) @@ -8247,7 +8247,7 @@ "dcE" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall/r_wall,/area/engine/engineering) "dcF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall/r_wall,/area/engine/engineering) "dcG" = (/obj/machinery/atmospherics/binary/valve{dir = 4},/obj/effect/decal/warning_stripes/north,/turf/simulated/floor/plating,/area/maintenance/asmaint) -"dcH" = (/obj/machinery/atmospherics/pipe/manifold/visible{dir = 8},/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plating,/area/medical/virology) +"dcH" = (/obj/machinery/atmospherics/pipe/manifold/visible{dir = 8},/obj/effect/decal/warning_stripes/northwest,/turf/simulated/floor/plating,/area/maintenance/asmaint) "dcI" = (/obj/machinery/atmospherics/binary/valve{dir = 4},/obj/effect/decal/warning_stripes/south,/turf/simulated/floor/plating,/area/maintenance/asmaint) "dcJ" = (/obj/structure/stool,/obj/machinery/atmospherics/pipe/simple/visible{dir = 5},/obj/item/weapon/wrench,/obj/machinery/light/small{dir = 8},/obj/effect/decal/warning_stripes/southwest,/turf/simulated/floor/plating,/area/maintenance/asmaint) "dcK" = (/obj/structure/closet/radiation,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/extinguisher_cabinet{pixel_x = 27; pixel_y = 0},/obj/effect/decal/warning_stripes/southeastcorner,/turf/simulated/floor/plasteel,/area/engine/engineering) @@ -8325,7 +8325,7 @@ "dee" = (/obj/structure/stool/bed/roller,/obj/machinery/vending/wallmed1{layer = 3.3; name = "Emergency NanoMed"; pixel_x = 28; pixel_y = 0; req_access_txt = "0"},/obj/machinery/light/spot{tag = "icon-tube1 (EAST)"; icon_state = "tube1"; dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape) "def" = (/obj/machinery/status_display{pixel_x = -30; pixel_y = 0},/obj/machinery/light/spot{tag = "icon-tube1 (WEST)"; icon_state = "tube1"; dir = 8},/turf/simulated/shuttle/floor4,/area/shuttle/escape) "deg" = (/obj/item/device/radio/intercom{dir = 4; name = "station intercom (General)"; pixel_x = 28},/turf/simulated/shuttle/floor4,/area/shuttle/escape) -"deh" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"deh" = (/obj/item/weapon/retractor,/obj/item/weapon/cautery,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) "dei" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor/plating,/area/maintenance/asmaint2) "dej" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/regular{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/regular{pixel_x = -2; pixel_y = 4},/obj/item/bodybag/cryobag{pixel_x = 5},/obj/item/device/radio/intercom{dir = 4; name = "station intercom (General)"; pixel_x = 28},/obj/item/weapon/storage/firstaid/o2{layer = 2.8; pixel_x = 4; pixel_y = 6},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape) "dek" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/shuttle/floor4,/area/shuttle/escape) @@ -8713,7 +8713,7 @@ "dlC" = (/obj/structure/grille,/obj/structure/window/full/shuttle,/turf/space,/area/shuttle/constructionsite) "dlD" = (/obj/docking_port/mobile/pod{dir = 4; id = "pod4"; name = "escape pod 4"},/obj/machinery/door/airlock/shuttle{id_tag = "s_docking_airlock"; name = "Escape Pod Hatch"},/turf/simulated/shuttle/floor,/area/shuttle/pod_4) "dlE" = (/obj/structure/table,/obj/structure/bedsheetbin{pixel_x = -1; pixel_y = 2},/turf/simulated/floor/plasteel{dir = 8; icon_state = "barber"},/area/crew_quarters/locker) -"dlF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"dlF" = (/obj/item/weapon/retractor,/obj/item/weapon/cautery,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "dlG" = (/obj/machinery/camera{c_tag = "Aft Starboard Solar Access"; dir = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint2) "dlH" = (/obj/machinery/atmospherics/pipe/simple/hidden,/turf/simulated/floor/plasteel,/area/hydroponics) "dlI" = (/obj/machinery/atmospherics/pipe/simple/hidden{dir = 4},/turf/simulated/floor/plasteel{icon_state = "green"; dir = 8},/area/hydroponics) @@ -8989,16 +8989,16 @@ "dqS" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{level = 1},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plasteel,/area/security/permabrig) "dqT" = (/turf/simulated/floor/plasteel{icon_state = "red"; dir = 4},/area/security/permabrig) "dqU" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel,/area/security/permabrig) -"dqV" = (/obj/machinery/iv_drip,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dqW" = (/obj/item/weapon/circular_saw,/obj/item/weapon/FixOVein,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dqX" = (/obj/item/weapon/circular_saw,/obj/item/weapon/FixOVein,/obj/item/device/radio/intercom{frequency = 1459; name = "station intercom (General)"; pixel_x = -28},/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dqY" = (/obj/item/weapon/retractor,/obj/item/weapon/cautery,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dqZ" = (/obj/item/weapon/retractor,/obj/item/weapon/cautery,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dra" = (/obj/item/weapon/surgicaldrill,/obj/item/stack/medical/bruise_pack/advanced,/obj/machinery/camera{c_tag = "Medbay Surgery 1 South"; dir = 1; network = list("SS13"); pixel_x = 0},/obj/machinery/light,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"drb" = (/obj/item/weapon/hemostat,/obj/item/weapon/scalpel,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"drc" = (/obj/item/weapon/bonegel,/obj/item/weapon/bonesetter,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"drd" = (/obj/item/weapon/hemostat,/obj/item/weapon/scalpel,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) -"dre" = (/obj/item/weapon/surgicaldrill,/obj/item/stack/medical/bruise_pack/advanced,/obj/machinery/camera{c_tag = "Medbay Surgery 2 South"; dir = 1; network = list("SS13"); pixel_x = 0},/obj/machinery/light,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery) +"dqV" = (/obj/structure/closet/secure_closet/medical3,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"dqW" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall,/area/medical/surgery1) +"dqX" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"dqY" = (/obj/structure/closet/secure_closet/medical2,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"dqZ" = (/obj/item/weapon/surgicaldrill,/obj/item/stack/medical/bruise_pack/advanced,/obj/machinery/camera{c_tag = "Medbay Surgery 1 South"; dir = 1; network = list("SS13"); pixel_x = 0},/obj/machinery/light,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"dra" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"drb" = (/obj/item/weapon/hemostat,/obj/item/weapon/scalpel,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"drc" = (/obj/item/weapon/bonegel,/obj/item/weapon/bonesetter,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery1) +"drd" = (/obj/item/weapon/hemostat,/obj/item/weapon/scalpel,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"dre" = (/obj/item/weapon/surgicaldrill,/obj/item/stack/medical/bruise_pack/advanced,/obj/machinery/camera{c_tag = "Medbay Surgery 2 South"; dir = 1; network = list("SS13"); pixel_x = 0},/obj/machinery/light,/obj/structure/table/glass,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) "drf" = (/obj/item/device/radio/intercom{pixel_x = 28},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/security/prison/cell_block/A) "drg" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/power/port_gen/pacman,/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/turf/simulated/floor/plating,/area/aisat/maintenance{name = "\improper AI Satellite Service"}) "drh" = (/obj/structure/table,/obj/item/weapon/storage/box/evidence,/obj/machinery/camera{c_tag = "Brig Evidence Storage"; dir = 1; network = list("SS13")},/obj/item/weapon/hand_labeler,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 1; scrub_Toxins = 1},/obj/machinery/alarm{dir = 1; icon_state = "alarm0"; pixel_x = 0; pixel_y = -22},/obj/item/weapon/pen,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/evidence) @@ -9040,6 +9040,16 @@ "drR" = (/obj/machinery/requests_console{department = "Engineering"; departmentType = 3; name = "Engineering Requests Console"; pixel_y = 30},/obj/structure/table,/obj/item/weapon/book/manual/engineering_guide,/obj/item/weapon/book/manual/engineering_particle_accelerator{pixel_y = 6},/obj/item/weapon/book/manual/engineering_singularity_safety,/obj/machinery/camera{c_tag = "Engineering North-West"; network = list("SS13")},/turf/simulated/floor/plasteel,/area/engine/engineering) "drS" = (/obj/structure/lattice,/obj/machinery/camera{c_tag = "AI Satellite Exterior East"; dir = 4; network = list("SS13","MiniSat")},/turf/space,/area/aisat) "drT" = (/obj/structure/lattice,/obj/machinery/camera{c_tag = "AI Satellite Exterior South East"; dir = 4; network = list("SS13","MiniSat")},/turf/space,/area/turret_protected/ai) +"drU" = (/obj/structure/table/glass,/obj/item/weapon/bonegel,/obj/item/weapon/bonesetter,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"drV" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"drW" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"drX" = (/obj/structure/closet/secure_closet/medical2,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgery2) +"drY" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall,/area/medical/surgery2) +"drZ" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/wall,/area/medical/surgery2) +"dsa" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance{name = "Surgery Maintenance"; req_access_txt = "45"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/asmaint) +"dsb" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/wall,/area/medical/surgery2) +"dsc" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/asmaint) +"dsd" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/asmaint) "YDt" = (/obj/structure/table,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/item/weapon/tank/emergency_oxygen/nitrogen{pixel_x = 6; pixel_y = 5},/obj/item/weapon/tank/emergency_oxygen/nitrogen{pixel_x = 4; pixel_y = 3},/obj/item/weapon/tank/emergency_oxygen/plasma{pixel_x = -4; pixel_y = 5},/obj/item/weapon/tank/emergency_oxygen/plasma{pixel_x = -6; pixel_y = 3},/turf/simulated/floor/plasteel{dir = 4; icon_state = "blue"},/area/medical/biostorage) (1,1,1) = {" @@ -9190,7 +9200,7 @@ bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbi bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdjZdjYdkDdkDdkDdkDdkDdkEdjHdjHdjFdjydjydjydjydjydjydjBbikbikbikbikbikbikbikbikbikbikbikdeRdeSdeSdeSdeTbikbikbikbikbikbikbikbOUbOTbQebOTbQfbikbikbikbOVbOVbOVbTjbTkbRObTlbNybTmbQnbTnbTobNzbDXbTpbTqbTrbTsbTtbTubTvbTwbTxbTybTzbTAbTBbTCbTCbTDbTEbTEbTEbTEbTEbTEbTFbTGbTHbTNbTMbTPbTOdlidjmdlkdljdllbPlbTQbQUbQVbTRbSpbJkbSqbSrbTSbTTbTUbTVbTWbTXbJsbTYbTZbLbbLbbUabUabLbbSDbLdbUbbUcbLgbUdbUebUfbUgbUhbLgbPNbUibUjbUkbUlbUmbUnbUobPPbUpbRAbSTbSTbZkbUqbUrbUsbUtbXNbUvbUwbUxbUybVObNabOMbUAbUBbUAbUCbUDbUCbUCbUCbikbikbikbikaabaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikaabaabaabaabaabbikbikbikbikaabaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkhdjYdkDdkDdkDdkFdkGdjFdjHdjHdjFdjHdjHdjHdkHdjHdkIdjFbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbTgbTfbTibThbTgbUIbUIbUIbOVbUJdpmbUKbULbUMbUNbUObUPbUQbUQbURbNzbUSbUTbUUbUVbUVbUWbUXbUYbUVbUZbUZbVabVbbONbUZbUZbVdbQMbQMbVebVfbVfbVfbVgbVhbVfbVfbVibVjbVkbVkbVlbVkbVmbVnbVkbVobVpbVqbPlbVrbVsbSqbVtbVubVvbVwbVxbYybVubJkbSybVzbVAbVBbVCbVDbVEbVFbVGbVHbVIbVJbVKbVLbVMbVNbPMbLhbPNbPNbVPbVQbVRbVSbVRbVTbPPbVUbVVbVWbVWbZkbVXbVYbVZbNabNabNabNabNabNabNabNabOMbUAbWabWbbWcbWdbWdbWebUCbikbikbikbikbikbikbikaabbikbikbikbikbikbikbikbikbikbikbikbikaabbWfbWfbWfbWfbWgbWgbWhbWhbWhbWhbWiaabaabbikbikbikaahbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkkdjyddZdkDdkDdkLdkMdjFdjHdjHdkNdjHdjHdjHdkOdjHdkPdjFbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbQebUEbUFbUEbQebUIbWmbWlbOVbWnbTkbWpbWqbWrbWsbNzbWtbWubWvbWwbNzbUTbUTbWxbUVbWybWzbWAbWBcabbUZdmbbWEbWFbWGcbnbUZbWIbWJbWKbVfbWLbWMbWObWNbWPbWQbWRceLbWTbWUbWVbWWbWXbWYbWZbXabXbbXcbXdbXebXfbXgbXhbSrbXibXjbXkbXlbXmbXnbJsbXobXpbXqbXrbVDbXsbXsbXtbXubLgbXvbXwbXxbXybXzbXAdoEbLhcbObXDbXEbXFbXEbXEbXGbXHbXIbXJbXKbXLbXMbZkccCbXObPXbEXbxXbXPbXQbXRbXRbXQbXRbXSbUAbXTbXUbWcbWdbXWbXVbUCbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWfbXXbXYbXXbWgbWhbWhbXZbYabXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkkdjydkQdkDdkDdkRdjFdjHdjHdjFdkSdjHdjHdkUdkTdjydkjbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbTgbUGbUEbUEdeycOWbTkbTkdeAbZAbTkbTkbWqbYhbYibNzbNzbNzbNzbNzbNzbYjbUTbYkbYlbYmbYnbYnbYnbYobUZbYpbYqbYqbYqbYrbYsbYtbYubYvbYwcdIbYxbYzbYAbYBbYCbVfbVibYDbVkbYEbYFbYGbYHbYIbVkbSmbQVbSnbQVbYJbYKbYLbYMbYNbYObYPbYQbYRbVubYSbYTbYUbYVbYWbYXbYYbYZbZabZbbLgbLgbLgbLgbLgbZcbZdbZebLhbZfbXEbXEbZgbZhbXEbZibZjbZkbZlbRAbZmbZmbZkbPVbZnbPXbEXbUAbZobUAbUAbUAbUAbUAbUAbUAbZpbZqbUCbZrbZtbZsbUCaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacbZubXXbXXbZvbWhbWhbXZbXZbZwbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkkdjydkQdkDdkDdkRdjFdjHdjHdjFdkSdjHdjHdkUdkTdjydkjbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbTgbUGbUEbUEdeycOWbTkbTkdeAbZAbTkbTkbWqbYhbYibNzbNzbNzbNzbNzbNzbYjbUTbYkbYlbYmbYnbYnbYnbYobUZbYpbYqbYqbYqbYrbYsbYtbYubYvbYwcdIbYxbYzbYAbYBbYCbVfbVibYDbVkbYFbYEbYGbYHbYIbVkbSmbQVbSnbQVbYJbYKbYLbYMbYNbYObYPbYQbYRbVubYSbYTbYUbYVbYWbYXbYYbYZbZabZbbLgbLgbLgbLgbLgbZcbZdbZebLhbZfbXEbXEbZgbZhbXEbZibZjbZkbZlbRAbZmbZmbZkbPVbZnbPXbEXbUAbZobUAbUAbUAbUAbUAbUAbUAbZpbZqbUCbZrbZtbZsbUCaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacbZubXXbXXbZvbWhbWhbXZbXZbZwbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkkdjydkWdkVdkXdjFdjHdkYdjFdkZdladjHdjydjydkjbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbQebUFbUFbUFbQebUIbYfbYebZzbZAbTkbTkbZBbZCbZDbZEbZFbZFbZFbZGbUTbUTbUTbWxbUVbZHbYnbZIbYnbZJbUZbYpbYqbZKbYqbZLbUZbZMbZNbZObVfbZQbZPbZSbZRbZTbZUbZVbZWbZXbZYbZZcaachdcaccadbVkbTQbQVbQVcaebYJbYKcafcagcahbXjcaicajcElcalcamcancaocapcaqcarcIfcasbXscatbVAcaucavcawcaxcaycazcaAbZjbZfcaBbXEbXEbXEcaCcaDbZjbZkcaEbRAbZmbZmbZkcaFcaGbPXbEXcaHcaIcaJbUAcaKcaLcaMcaNcaOcaPcaQbUCcaRcaScaTbUCbUAbUAbUAbUAbUAbUAbUAbUAbikbikbikbikbikaabbikbikbikbikbikbikbikcaUbWhbZubWhbWhbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdkkdjydjydjydjydjydjydjydjydjydjydkjbikbikbikbikbikbikbikbikbikbikbikbikbikaabaabaabaacbUTcjMcjMbUTcjMcjMbUTbikbikbTgbWjbYbbWkbTgbUIbUIbUIbOVcaYdpncaZcaZcaZbOVbOVbUTcbbcbaccAcbcbUTcbdcbebUVbZHbYnbYnbYncbfbUZbYpbYqbYqcbgcbhcbicbjcbkcblbVfbVfbVfbVfbVfcbmbVfbVfciFcbobVkbVkcbpbVkbVnbVkbVkbPlcbqcbqbPlccicbrcbscbtcbucbvcbwcbxcbycbzcbAcbBcaocapcbCcbDcbEcbFcbGcbHbVAcbIcbJcbKcbLcbMcbNciHcbPcbQcbPcbRcbRcbRcbPcbScbPcbPcbTcbUbZmbZmbZkcbVbZnbPXcbWcbXcbYcbZccaccbccccccccdcceccfccgcckccjcdqcclcfeccmccnccoccpccqccrccscctaabaabaabaabaabaabaabaabbikbikbikbikbikbWgbWhccuccvccvbXZbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbikbikbUTccBcqsbUTccBcqsbUTbikbikbYcbOTbYgbOTbZxbikaabbikbOVbOVbOVbOVbOVbOVbOVclabUTcuRcsucjbccDbZFccEccFbUVccGccHdmcbYnccJccKccLccMccNccOccPbUZccQccRccSccTccUccUccUccUccVccWccXccYccYccZccZcdacdbcdcbVibPlcddcdecdfcdgcdhbYKcdicbtcdjcdkcdlcdmbSwcdncdocdpcffcdrcdrcdscdrcdrcdrcdtbVAcducdvcdwcdxcdycdzcdAcdCcdBcdCcdDcdEcdFcdCcdGcdHcbPcjfcdJbRBbZkbZkcdKcdLcdMcdNcdOcdPcdQcdRcdScdTcdUcdVcdWcdXcdYcdZceacebceaceccebcebcebcedceecefcegcehaabbikbikbikbikaabbikbikbikbikbikbikbikbWhbWhceibXZbXZbXZbXZbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik @@ -9200,22 +9210,22 @@ bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbi bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabaacaabaabaaccjMdnrdnqdnscqscqsdoxcqscqsdnobUTbUTbUTbUTbUTbUTcekbUTbUTbUTbUTdntdntdntdntdntdntdntdntdntbUTcfScejbikbikbikbikciEbaTciGckiciIciJciKciLciMciNcmPciPciQciRciSciSciTbPSceDceCceCceCceCceEceCbGybGybPlciYciZcjaclGcjccjdchScjecmDbBccjhcjicjjcjkcjlcfdcnicxVcxVcxVcxVckNclSckUcnjcjqcjrcjscjtcbAcwncjvcdCcjwcmScjycjzcjAcfrcjBcdCcdCbxOcgfbxObxObxOcjDcjEcjFbxObxXciicjGcjHcyJcyJcyJbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbUAbikbikbikbikbikaabbikbikbikbikbikbikbikbWhccvccvccvccvccvccvcjIbXZccuccvcjJbXZbXZbXZbXZbWhaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbUTcjKcjKcjKcjKcjKcjKcjLcjKdnodnubUTcqsdoydnwdnycqsdnydnvdnzdnwdntdnAdnAdntdnBdntdnDdnCdntcqscelcjMbikcjNcjOcjPcjQcjRcjScjTcjUcjVcjWcjXcjYcjZcosckbckcckdckeckfckgckhceDcngckjckjckjckkceCbGybGycklcklcklcklckmcklckncknckocklcklckpcklckqckrckscktckscglaPKcmacmmcmlcmocmnckzckAckBckCckDckEckFcdccdCcdCciVcdCckHcdCciXciWcjpcgnckLckMckvckOcwAcjCckRcxTcwAbxXciickTbxXbxXckVckWckXchabxXbxXbxXbxXbxXbxXbxXckYckZcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWhbXZbXZbXZbXZbXZbXZcfNbXZcjJbXZbXZbXZbXZbXZbWhbWhaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdnEclbclbclbclbclbclbclccldcleclfclgclhclicjLdnocnRbUTcqsdozdnwcqscqscqsdnvcwNdnwdntdnAdnFdnCdnCdnGdnCdnHdntcljcelcjMbikclkcllclmclnclocjSclpdhpclrclsciLcltcgdcoaciPcluchyclvchyclwclxclyclzclAclAclAclBceCbGybGycklclCbzsclEclDcoyclHclHclFclJclKclMclLclNclOcotcfhcpwckGcmrcmqctbcsZcuoctcckDclVclWclXckzclYcmtcmscmbcmbcmccmdcmecmfcmgcmhcmfcmfcmfcmicmfcmfcmjcmucnpcnlcqRcoXcrGcqScrHcrHcrIcrHcrHcrHcrHcrJcrKcrHcrHcrHcrMcmvbxXcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWhbWhceibXZbXZbXZbXZbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcmwcmxcmxcmxcmxcmycmzcmAcmBcmCcmCcoKcjKdnocqscekcqscqscqscqscqscqscqscqscqsdntdntdnCdnIdnCdntdnCdnIdntcmEcfScjMbikclkcmFcmGcmHcmIcmJcmKcmLcmIcmIcmMcmNcmOcpxckIckIcmRcpuchycmTcmUclyclAclAclAclAcmVceCbGybGycklcmWcmXcmYcmZcnacnbcnbclIbvWbulbxBclHconcklcqQcfdcrLcxVcwscvxcwEcwCcxNcxIckDcnmcnnYDtckDbJGcumctecnqcnqcnqcnqcnqcnrcnscntcnucnvcnvcnwcnwcnvcnxcnycnzcnAcnCcnCcnDcnEcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcuncnFcnGcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcaUbWhbWhchlchlbXZbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcmwcmxcmxcmxcmxcmycmzcmAcmBcmCcmCcoKcjKdnocqscekcqscqscqscqscqscqscqscqscqsdntdntdnCdnIdnCdntdnCdnIdntcmEcfScjMbikclkcmFcmGcmHcmIcmJcmKcmLcmIcmIcmMcmNcmOcpxckIckIcmRcpuchycmTcmUclyclAclAclAclAcmVceCbGybGycklcmWcmXcmYcmZcnacnbcnbbulbxBbvWclIclHconcklcqQcfdcrLcxVcwscvxcwEcwCcxNcxIckDcnmcnnYDtckDbJGcumctecnqcnqcnqcnqcnqcnrcnscntcnucnvcnvcnwcnwcnvcnxcnycnzcnAcnCcnCcnDcnEcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcnCcuncnFcnGcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcaUbWhbWhchlchlbXZbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcnHcnIcnJcnKcnJcnLcnMcnNcnOcnPcnQcjKdnobUTbUTdnJcjMcjMcjMcjMcjMcjMcjMdnKdntdnCdnCdnCdnCdnLdnCdnCdntcnRcelcjMbikclkcnScnTcnUcnVcjScnWcnXcnYcnZciLcltcgdcbkchqcodcoccodciPciPciPckJcofclAclAcogcohceCbGycoicklcoocokcolcomcomcoqcojcnhcomcomcopclHcrCcklcrNcfdcupcxVcxVcxUcxVcxVcxNcEickDcowcoxcqjckDcozcuscoicoAcoAcoAcoAcoAcoDcoDcoDcoAcoAbikbikbikbikckPctdcoFckKcnCcoHcoIcoJcrecoLcoMcoNcoOcoPcoQcoRcoScoTcoUcnCcuncoWcvtcoYcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcoZcpacpbbWhbZubWhbXZbXZbXZbXZbXZbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcnHcpccpdcpecpfcmBcpgcphcpicmBcpjcpkdnMchobUTcqscjMbikbikbikbikbikcjMcqsdnldnAdnOdnCdnCdnCdnCdnPdnNcplcpmcjMbikcpncjOcpocjQcppcjScjScpqcprcpscptcslcpvcwqchqcodcpycpzcpAcpBcpCceDcpDclAclAclAcpEceCbGybGycpFcpFcpGcpHcpIcpIcrDcyFcrEcpJcpJcpKcpFcpGcpFcqQcfdcrLdbAbjVcEYdbndbmcxNclRckDcoucpNcovckDbGycuscoAcoAaabaabbikbikbikbikbikbikbikbikbikbikbikcpRcpScpTcpUcpVcpWcpXcpXcpYcpXcpXcpXcpXcpXcpZcqacqbcqccqdbwocvvbXSbwobwoaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWhcqhcqictYbWhbWhbXZbXZcqkbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcnHcqlcnJcqmcnJcqncqocqpcqqcnNcqrcjKdoAcwNbUTcfQcejbikbikbikbikbikcejdnRdntdnSdnSdnAdnUdnTdnCcwgdntcqscelcejbikbikbikbikciEcqtcqucqvcqvciLcqwciLcqxcgdcbkcqyckQcqAcqBcqCcqCcqCcqDcqEclAcqFclAcqGceCbGybGycpFcqHcrFcqJcqKcqLcsPcpFcsUcqMcqKcqNcsVcqPcpFczecyWczgdbAdbpdbodbrdbqdbsctcckDcpOcpPcpQckDbGycuscoAcvyaabaabaabbikbikbikbikbikbikbikbikbikbikcpRcqUcqVcqWcqXcqYcqZcracrbcpXcpXcrccpXcpXcpZcqbcqbcqbcrdbwocvzbxXbwoaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWfcrhcribZvbWgbWhbWhbXZbYabXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikctUctUctUctUctUcjKdnWcrjcrjcrjcrjcrjdnQcwUcwUcwUcrjcrjcrjcrjcrjcrjcrjcwUcwUcwUdntdntdntdntdntdntdntcekcrlcrmcrmcrmcrmcrmciEciLciLciLciLciLciLciLcrncgdcbkcroclZcrqcrrcrscrtcrucmpcrwcrxcrycrzcrAceCbGybGycpFcuicsYcvocujcujcvpcpFcwicujcujcwjcujcwkcpMbGwbGwbGwcEjdbudbtdbvdbmdbxctcdbydbydbycoAcoAbGycuscoDcwpbikaabaabaabbikbikbikbikbikbikbikbikbikcpRczNczPcoBcrOcrPcrQcrRcrScpXcpXcpXcpXcrTcrUcrVcrWcrXcrYbwocvzbxXbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWfbWfbWfbWfbWgbWgbWhbWhbWhbWhbWiaabaabbikbikaahbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikbikbikbikbikaSecsdctvdnZctvdoBcsdcsecsfcsgcsgcshcsicspcskcyrcsmcsncsocsrcsqcsqcsscsqcstctzctzctAcsvcswcsxcsycsxcsxcsxcswcsxcsxcszcsAcsBcsCcgdcbkcsDcmQcsFcnBcodcoeckIcoEcorcsKcsLcsMcsNcsObGybGycpFcwlcsQcsRcsScsTcwmcpFdehcsTcsWcsXdlFdqVcwrbikbikbikcEjdbAdbzdbAdbAdbCdbBdbEdbDcoGcwFbVibGycuscoDcwpbikbikaabaabaabbikbikbikbikbikbikbikbikctdckPcxGckSctdctfctgcthctictjctkctlcpXcpXctmctnctoctpctqbwocvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikbikbikbikbikaabaabaabaabbikbikbikbikaabaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaSecsdctvctvctvdoBcsdctuctvctwctvctxctyctDctCdmedcYdmedmfcxnctEctFctEctEctGcblcblctEctHctEctEctEctEctEctEctEctEctEctEctIctJctKctLctMctNcqzctPctQcyqctSctTbEbctVctWctXcAvctZcuacnqcubcuccudcuecufcugcuhdqWcpFdqXcqKcugcukcqKculcwrbikbikbikdbFcmkdbGdbJdbIdbCdbKdbMdbLcrpdbNceFceJdbPcoDcwpbikbikbikaabaabaabbikbikbikbikbikbikbikckPcurczQcutckPcnCcnCcnCcnCcnCcnCcuuctlcuvcuwcuxcuycnCcnCbwocvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaSedobctvdocctvdoBcuBdodcuCcuDcuEcuFcuGcuHcuIcuJcuKcuLcuMcuNcuOcuPcuQdoeceAcuSceAcuNcuTcuNcuNcuNcuNcuNcuNcuNcuNcuNcuNcuUctEcuVcuWcuXcuYcuZcvacvbcvccvdcvecvfcvgcvhcvicvjcvkcsLceJcvlcvmcvncqKcqJcqKcqKdqYcpFdqZcqKcqKcqNcqKcyGcwrbikbikbikdbFdbRdbQdbTdbSdbVdbUdbXdbWcoGbGychCcyHcuscoAbikbikbikbikbikaabckPckPckPckPckPckPckPckPckPcvucxScvwcwAcxOcxOcyIckPaabcnCcnCcvAcnCcvBcvCcvDcnCcyKcyJcvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdogdofcrjcrjcrjcrjdnQcwUcwUcwUcwUdnXcwUcvFcvGcvGcvHctBdlXcwUcCmcvJcvKcvKcvLcvKcvMcvKcvKcvNcvOcvKcvKcvOcvOcvOcvKcvKcvKcvKcvPcvQcvRcvScvTcvUcvVcvWcvXcvWcvWcvWcvWcvZcwacwbcwccwdcsObGycvrcwecwfcAzcwhdradrcdrbcpFdrdcEMdrecqNcqKcwocpMbikbikbikdbFdbZdbYdcadbIdccdcbdbUczRcoGcyObVibVicuscoAbikbikbikbikbikbikckPcwtcwucwvcwwcwxcwycwzcwAcwBczScwDcwAcxOcBZcyPckPaabaabcwGcwHcwIcwJcwKcwLcwGbxXbxXcvzczfbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGacGacGafxafxacGafxafxaabagiaabaqZbikaqZaqZdoidoCdojdojdojdoldokcwUcwOcwPcwQcwRcwScwTcwUcwVcwWcvOcwYcwZcxacxbcxccxdcxecxfcxgcvKcxfcxhcxicxjcxjcxkcvKcxlcxmcxncxocbkcxpcxqcxrcxscxtcxucxtcxvcxwcxxcxycxzcxAcsOcsOcvrcwecpFcpFcxBcpFcpFcwecrvcuccuccuccxFcuccsEcpMbikbikbikdbFdbFdbFdbFdbFdbydcedcgcBbcoGbGybGyczhcuscoAbikbikbikbikbikbikckPcxOcxPcxOcxQcxRcqUcxScwAcxTczicxTcwAcxOcxOcMpckPaabbikcwGcxWcxXcwJcwJcxYcwGczjbxXcvzbzNczMbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGbikbikaabaabbikaabaabbikbikaabaabaabaabaabdoidoidohdoidoidoncEBcwUcwUcwUcwUcwUcwUcwUcwUdoicwWcvOcyccydcyecyfcyfcyfcyfcygcyhcyicxjcyjcxjcxjcykcxjcylcymcyncyocxocbkcypcyqcDucxscyscytcyucxscyvcywcyxcyycyzcyAcyBcyCcyDcyEcyEcAaczUcAdcAccAeczTbGyceJcAhbGycAMcoAcoAcoAcoAcoAbikbikbikbikdcidchdckdcjcoGdclbVibVicuscoAcoAcoAcoAcoAbikbikckPcxOcxOcxOcyZczaczbczcczdcAicAOcFRcwAcAVcAYcAWckPbikbikcwGczkcwJczlcwJczmcwGbxXbxXcvzczMbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdoDbikacGbikczoczpczqbikczoczpczqbikczoczpczqbikbikdoidoocfRdopdoidoqcGKdojdojdojdojdojdojdojdojdojcEycvOcztcxjcykczucxjcxjcxjczvcxjcztcztcxjcxjcxjcxjczwczxcymczyctEczzcoacyqcyqczAcxsczBczCczDcxsczEctWczFczGczHczIczJczKbGyczLcdcczLbGycBacAZcBccBccBccBccBPcBNcBNcBNcBNcBNcBQcoAbikbikbikbikdcidchdckdcmcTabGyckObVicusbGybGybGycgmcoAbikbikckPcwAcwAcwAcwAczWcqUczXczYczZcCfcAbcwAcCGcCYcCIckPbikbikcwGcAfcAgcDLcwJcDNcwGcEdbxXcvzbwoaabaabaabaabbikbikbikbikaahbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcnHcpccpdcpecpfcmBcpgcphcpicmBcpjcpkdnMchobUTcqscjMbikbikbikbikbikcjMcqsdnldnAdnOdnCdnCdnCdnCdnPdnNcplcpmcjMbikcpncjOcpocjQcppcjScjScpqcprcpscptcslcpvcwqchqcodcpycpzcpAcpBcpCceDcpDclAclAclAcpEceCbGybGycpFcpFcpGcpIcpHcpHcpJcpMcpKcqHcqHcqKcqJcqLcqJcqQcfdcrLdbAbjVcEYdbndbmcxNclRckDcoucpNcovckDbGycuscoAcoAaabaabbikbikbikbikbikbikbikbikbikbikbikcpRcpScpTcpUcpVcpWcpXcpXcpYcpXcpXcpXcpXcpXcpZcqacqbcqccqdbwocvvbXSbwobwoaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWhcqhcqictYbWhbWhbXZbXZcqkbXZbXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikcnHcqlcnJcqmcnJcqncqocqpcqqcnNcqrcjKdoAcwNbUTcfQcejbikbikbikbikbikcejdnRdntdnSdnSdnAdnUdnTdnCcwgdntcqscelcejbikbikbikbikciEcqtcqucqvcqvciLcqwciLcqxcgdcbkcqyckQcqAcqBcqCcqCcqCcqDcqEclAcqFclAcqGceCbGybGycpFcqNcqMcrvcqPcrEcrDcpFcrFcsPcsEcsRcsQcsScqJczecyWczgdbAdbpdbodbrdbqdbsctcckDcpOcpPcpQckDbGycuscoAcvyaabaabaabbikbikbikbikbikbikbikbikbikbikcpRcqUcqVcqWcqXcqYcqZcracrbcpXcpXcrccpXcpXcpZcqbcqbcqbcrdbwocvzbxXbwoaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWfcrhcribZvbWgbWhbWhbXZbYabXZbWhbWhaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikctUctUctUctUctUcjKdnWcrjcrjcrjcrjcrjdnQcwUcwUcwUcrjcrjcrjcrjcrjcrjcrjcwUcwUcwUdntdntdntdntdntdntdntcekcrlcrmcrmcrmcrmcrmciEciLciLciLciLciLciLciLcrncgdcbkcroclZcrqcrrcrscrtcrucmpcrwcrxcrycrzcrAceCbGybGycpFcsUcsTcsWcsVcsVcsXcpFcsYcuccuccudcuccufcuebGwbGwbGwcEjdbudbtdbvdbmdbxctcdbydbydbycoAcoAbGycuscoDcwpbikaabaabaabbikbikbikbikbikbikbikbikbikcpRczNczPcoBcrOcrPcrQcrRcrScpXcpXcpXcpXcrTcrUcrVcrWcrXcrYbwocvzbxXbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbWfbWfbWfbWfbWgbWgbWhbWhbWhbWhbWiaabaabbikbikaahbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikbikbikbikbikaSecsdctvdnZctvdoBcsdcsecsfcsgcsgcshcsicspcskcyrcsmcsncsocsrcsqcsqcsscsqcstctzctzctAcsvcswcsxcsycsxcsxcsxcswcsxcsxcszcsAcsBcsCcgdcbkcsDcmQcsFcnBcodcoeckIcoEcorcsKcsLcsMcsNcsObGybGycpFcuhcugcujcuiculcukcpFcvmcvocvncwecvpcwhcwfbikbikbikcEjdbAdbzdbAdbAdbCdbBdbEdbDcoGcwFbVibGycuscoDcwpbikbikaabaabaabbikbikbikbikbikbikbikbikctdckPcxGckSctdctfctgcthctictjctkctlcpXcpXctmctnctoctpctqbwocvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikbikbikbikbikaabaabaabaabbikbikbikbikaabaabaabaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaSecsdctvctvctvdoBcsdctuctvctwctvctxctyctDctCdmedcYdmedmfcxnctEctFctEctEctGcblcblctEctHctEctEctEctEctEctEctEctEctEctEctIctJctKctLctMctNcqzctPctQcyqctSctTbEbctVctWctXcAvctZcuacnqcubcwicwkcwjcwmcwlcwrcwocqJcxFcsEcyFcyGcsEcAzcwfbikbikbikdbFcmkdbGdbJdbIdbCdbKdbMdbLcrpdbNceFceJdbPcoDcwpbikbikbikaabaabaabbikbikbikbikbikbikbikckPcurczQcutckPcnCcnCcnCcnCcnCcnCcuuctlcuvcuwcuxcuycnCcnCbwocvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaSedobctvdocctvdoBcuBdodcuCcuDcuEcuFcuGcuHcuIcuJcuKcuLcuMcuNcuOcuPcuQdoeceAcuSceAcuNcuTcuNcuNcuNcuNcuNcuNcuNcuNcuNcuNcuUctEcuVcuWcuXcuYcuZcvacvbcvccvdcvecvfcvgcvhcvicvjcvkcsLceJcvlcBPcEMcqPcrvcqPcqPdehcqJdlFcsEcsEcsRcsEdqVcwfbikbikbikdbFdbRdbQdbTdbSdbVdbUdbXdbWcoGbGychCcyHcuscoAbikbikbikbikbikaabckPckPckPckPckPckPckPckPckPcvucxScvwcwAcxOcxOcyIckPaabcnCcnCcvAcnCcvBcvCcvDcnCcyKcyJcvzbxXcxHbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdogdofcrjcrjcrjcrjdnQcwUcwUcwUcwUdnXcwUcvFcvGcvGcvHctBdlXcwUcCmcvJcvKcvKcvLcvKcvMcvKcvKcvNcvOcvKcvKcvOcvOcvOcvKcvKcvKcvKcvPcvQcvRcvScvTcvUcvVcvWcvXcvWcvWcvWcvWcvZcwacwbcwccwdcsObGycvrdqWdqYdqXdradqZdrcdrbcqJdrddrUdredrWdrVdrXcuebikbikbikdbFdbZdbYdcadbIdccdcbdbUczRcoGcyObVibVicuscoAbikbikbikbikbikbikckPcwtcwucwvcwwcwxcwycwzcwAcwBczScwDcwAcxOcBZcyPckPaabaabcwGcwHcwIcwJcwKcwLcwGbxXbxXcvzczfbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGacGacGafxafxacGafxafxaabagiaabaqZbikaqZaqZdoidoCdojdojdojdoldokcwUcwOcwPcwQcwRcwScwTcwUcwVcwWcvOcwYcwZcxacxbcxccxdcxecxfcxgcvKcxfcxhcxicxjcxjcxkcvKcxlcxmcxncxocbkcxpcxqcxrcxscxtcxucxtcxvcxwcxxcxycxzcxAcsOcsOcvrdqWcpFcpFcxBcpFcpFdqWdrZdrYdrYdrYdsadrYdsbcuebikbikbikdbFdbFdbFdbFdbFdbydcedcgcBbcoGbGybGyczhcuscoAbikbikbikbikbikbikckPcxOcxPcxOcxQcxRcqUcxScwAcxTczicxTcwAcxOcxOcMpckPaabbikcwGcxWcxXcwJcwJcxYcwGczjbxXcvzbzNczMbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGbikbikaabaabbikaabaabbikbikaabaabaabaabaabdoidoidohdoidoidoncEBcwUcwUcwUcwUcwUcwUcwUcwUdoicwWcvOcyccydcyecyfcyfcyfcyfcygcyhcyicxjcyjcxjcxjcykcxjcylcymcyncyocxocbkcypcyqcDucxscyscytcyucxscyvcywcyxcyycyzcyAcyBcyCcyDcyEcyEcAaczUcAdcAccAeczTceJceJdscbGycAMcoAcoAcoAcoAcoAbikbikbikbikdcidchdckdcjcoGdclbVibVicuscoAcoAcoAcoAcoAbikbikckPcxOcxOcxOcyZczaczbczcczdcAicAOcFRcwAcAVcAYcAWckPbikbikcwGczkcwJczlcwJczmcwGbxXbxXcvzczMbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikdoDbikacGbikczoczpczqbikczoczpczqbikczoczpczqbikbikdoidoocfRdopdoidoqcGKdojdojdojdojdojdojdojdojdojcEycvOcztcxjcykczucxjcxjcxjczvcxjcztcztcxjcxjcxjcxjczwczxcymczyctEczzcoacyqcyqczAcxsczBczCczDcxsczEctWczFczGczHczIczJczKbGyczLcdcczLbGycBacAZcBccBccBccBcdsdcBNcBNcBNcBNcBNcBQcoAbikbikbikbikdcidchdckdcmcTabGyckObVicusbGybGybGycgmcoAbikbikckPcwAcwAcwAcwAczWcqUczXczYczZcCfcAbcwAcCGcCYcCIckPbikbikcwGcAfcAgcDLcwJcDNcwGcEdbxXcvzbwoaabaabaabaabbikbikbikbikaahbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGbikczocAkczqbikczocAkczqbikczocAkczqbikaqZdoicfRcfRcfRdoidoidorczsdoidoiczsczsdoidoiczsczscwWcvOcztcAlcxjcAmcAncAocAocyjcxjcztcApcxjcxjcxjcxjcAqcArcAscAtbZNcAucAPcAwcAxcAycxsczBdlYcAAcxscABctWcsOcACcsLcADcAEcAFcAGcAHcAIcAJcAGcAKcAGcAGcAGcoAcoAcoAcoAcoAcoAcoAcoAcEhcoAbikbikbikbikdcicBTdcqcBUcoGcgmcFdbVicFmcFlcFlcFnbGycoAbikbikckPcwtcwucwvcAQcARczbcAScATcAUcFrcIScAXcGscIScGtckPbikbikcwGcwGcGIcCrcBdcwGcwGbwobxXcGycyJcyJcyJbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikaqZaabczocAkczqbikczocAkczqaabczocAkczqbikaabdoidondosdoqdoibikaabbikbikbikbikbikaabbikbikczscwWcvKcBecxjcBfcBgcBhcBicBjcBicBkcBicBlcBmcxfcBncztcztczxcBocBpcBqcBrcBscBtcBucBvcFbcBxcBycBzcBAcBBcBCcBDcBDcBEcBFcBGcBHcBIcBJcBKcBLcBMcALcBOcHucHtcDPcDPcDPcDPcDPcDPcHvcoAcEhclUclUclUclUclUclUcjmbEJcjmcFfclUclUcoAcoAcoAcoAcusbGycoAbikbikckPcxOcBZcxOcCacxRcqUcCbcCccCdcCecqUcqUcCgcqUcChckPbikaabaabcwGcwGcCscwGcwGbikbwobxXcvzcyJcHycHxbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbikczocAkczqaabczocAkczqbikczocAkczqaabbikdoidoiczsdoidoibikaabaabbikaabbikaabaabbikbikcybcCicvKcCjcCkcCkcClcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcCmcCncCmcCocCmcrmcCpcCqcIUcCtcCtcCtcCucCvcBCcCwcCxcCycCzcCAcCBcBIcCCcCDcCEcCFcHzcCHcHAcCJaabcCKcCKcCKcCKcCKcHBcoAcHDcHCcIGcHHcIHctaclUciUckucjoclUcBXcCPcBYcCRcCQcoAcusbGycoAbikbikckPcxOcxOcxOckycCTczbcCUcCVcCWcCXcCZcCZcDacqUcDbckPaabaabbikbikbikcIKbikbikbikbwobxXcvzcyJbxXbxXbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik -bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGacGafxaqZbikczocAkczqaabczocAkczqbikczocAkczqaabbikbikbikbikbikbikbikbikbikaabcDccDdcDdcDdcDdcybcDecwWcDfcDgcDhcDhcDicDjcDkcDlcDlcDlcDlcDmdotcDocDncDncDpcDpcDncDqcDrcDscDtcDtcFMcDvdaIcDxcDycDzcDzdiEdppcDCcDDcDEcDFcCAcDGcBIcDHcDIcDJcDKcILcDMcIMcDOcDPcDQcDRcDScDTcCKcHBcoDcEhclUcvscvqcIOcINcxLckxckwdcrclUcCSczVcuqczVcDUcoAcusbGycoAcoAbikckPcwAcwAcwAcwAcEkcqUcCbdlZcEmcCecqUcEncEocEocEpcEqcXYaabbikbikbikbikbikbikbikbwobxXcGybxXbxXcIPbwoaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaahbikbikbikaqZaabczocAkczqbikczocAkczqaabczocAkczqbikaabdoidondosdoqdoibikaabbikbikbikbikbikaabbikbikczscwWcvKcBecxjcBfcBgcBhcBicBjcBicBkcBicBlcBmcxfcBncztcztczxcBocBpcBqcBrcBscBtcBucBvcFbcBxcBycBzcBAcBBcBCcBDcBDcBEcBFcBGcBHcBIcBJcBKcBLcBMcALcBOcHucHtcDPcDPcDPcDPcDPcDPcHvcoAcEhclUclUclUclUclUclUcjmbEJcjmcFfclUclUclUclUclUclUcusbGycoAbikbikckPcxOcBZcxOcCacxRcqUcCbcCccCdcCecqUcqUcCgcqUcChckPbikaabaabcwGcwGcCscwGcwGbikbwobxXcvzcyJcHycHxbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikaabbikczocAkczqaabczocAkczqbikczocAkczqaabbikdoidoiczsdoidoibikaabaabbikaabbikaabaabbikbikcybcCicvKcCjcCkcCkcClcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcvKcCmcCncCmcCocCmcrmcCpcCqcIUcCtcCtcCtcCucCvcBCcCwcCxcCycCzcCAcCBcBIcCCcCDcCEcCFcHzcCHcHAcCJaabcCKcCKcCKcCKcCKcHBcoAcHDcHCcIGcHHcIHctaclUciUckucjoclUcBXcCPcBYcCRcCQclUcusbGycoAbikbikckPcxOcxOcxOckycCTczbcCUcCVcCWcCXcCZcCZcDacqUcDbckPaabaabbikbikbikcIKbikbikbikbwobxXcvzcyJbxXbxXbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik +bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGacGafxaqZbikczocAkczqaabczocAkczqbikczocAkczqaabbikbikbikbikbikbikbikbikbikaabcDccDdcDdcDdcDdcybcDecwWcDfcDgcDhcDhcDicDjcDkcDlcDlcDlcDlcDmdotcDocDncDncDpcDpcDncDqcDrcDscDtcDtcFMcDvdaIcDxcDycDzcDzdiEdppcDCcDDcDEcDFcCAcDGcBIcDHcDIcDJcDKcILcDMcIMcDOcDPcDQcDRcDScDTcCKcHBcoDcEhclUcvscvqcIOcINcxLckxckwdcrclUcCSczVcuqczVcDUclUcusbGycoAcoAbikckPcwAcwAcwAcwAcEkcqUcCbdlZcEmcCecqUcEncEocEocEpcEqcXYaabbikbikbikbikbikbikbikbwobxXcGybxXbxXcIPbwoaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGbikaabbikaabaabcEraabaabaabcEraabbikaabcEraabbikbikbikbikbikbikbikbikbikcDccDccDccEscEtcEucDdcKlcExcEycDfcDfcEzcEAcvKcvKcEBcECcECcECcECcEDcEEcEFcEEcEEcEEcDtcDtcEGcEHcEIcEJcEKcDzcELcDwcDzcDzcDzcDzdpwcBCcENcEOcCycDFcCAcDFcBIcDHcDIcEPcEQcERcEScETcEUaabcEVcEWcDTcEXcCKcHBcoDcHDcHCcxKcxJczVcxMclUcIIcDVdcsclUcDWcDYczVcEbcEaclUcusbGycITcoAbikckPcwtcwucwvcFjcARczbcFkcJIcGCcJKcJKcFocFpcFqcJLckPaabaabaabbikbikbikbikbikbikbwocJMcvzbwobwobwobwobwoaabaabaabcJNcJNcJNcJNcJNcJNaabbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikafxaabcFscFtcFtcFucFvcFwcFwcFwcFvcFwcFwcFwcFvcFwcFwcFwcFxcFtcFtcFtcFtcFtcFycFzcFAcFBcFCcFDcFEcFFcFGcfRcwWcFHcDfcvKcvKcvKcFIcEBcECcFJdrRcFLcHscFNcJlcFPcFOcFQcFScFTcSpcFVcFWcFXcFScFYcFZcDwcGacDzcDzcDzcGbcBCcGccGccDFcGdcGecGfcGgcGhcGicGjcGkcGlcGmcGncDOcGocDQcGpcDTcDTcCKcHBcoDcEhclUcyMcyLcyNcFfclUcnkclTcFfclUcyQcyScyRcyTcyTclUcusbGycJOcoAbikckPcxOcxPcxOcGAcxRcqUcGBcJPcJJcqUdlWcGDcwAcwAcwAckPbikbikaabaabbikbikbikbikbikbwocyKcvzbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik bikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikacGbikaabbikaabaabcGFaabbikaabcGFaabbikaabcGFaabbikbikbikbikbikbikbikbikbikcDccDccDccGGcGHcWAcDddovcfRcGKcExcExcExcExcGLcExcFGcECcGMcGNcGOcGPcGQcGRcGScGTcGUcGVcGWcGXcGYcGZcHacHbcFYcELcDwcHccHdcDzcDzcHecBCcHfcHgcDFcHhcCAcHicHjcHkcHlcHmcHncHocHpcHocHqaabcCKcCKcCKcCKcCKcHBcoAcEhclUcIJcyVcyYcyXcEecEccEgcEfcHwcGucHZczVcIRcIQclUcusbGycJRcoAbikckPcxOcxOcxOcBWcHEcHFcHGcHJcHIcqUcqUcqUcqUcHKcHLcHMbikbikbikaabaabbikbikbikbikbwobwocvzbwobikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbikbik diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index aeadda0a7b4..fad455ed438 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/New() ..() - + if(!icon_manager) icon_manager = new() @@ -318,3 +318,6 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) Deconstruct() + +/obj/machinery/atmospherics/update_remote_sight(mob/user) + user.sight |= (SEE_TURFS|BLIND) diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 8ce7b1ce0ba..b6c5d55e5a9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -2,77 +2,84 @@ //node2, air2, network2 correspond to output /obj/machinery/atmospherics/binary/circulator name = "circulator/heat exchanger" - desc = "A gas circulator pump and heat exchanger." - icon = 'icons/obj/pipes.dmi' - icon_state = "circ-off" - anchored = 0 - density = 1 + desc = "A gas circulator pump and heat exchanger. Its input port is on the south side, and its output port is on the north side." + icon = 'icons/obj/atmospherics/circulator.dmi' + icon_state = "circ1-off" + + var/side = CIRC_LEFT + + var/global/const/CIRC_LEFT = WEST + var/global/const/CIRC_RIGHT = EAST - var/recent_moles_transferred = 0 - var/last_heat_capacity = 0 - var/last_temperature = 0 var/last_pressure_delta = 0 - var/last_worldtime_transfer = 0 + + var/obj/machinery/power/generator/generator -/obj/machinery/atmospherics/binary/circulator/New() - ..() - desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]." + layer = 2.45 // Just above wires + + anchored = 1 + density = 1 + + can_unwrench = 1 + +// Creating a custom circulator pipe subtype to be delivered through cargo +/obj/item/pipe/circulator + name = "circulator/heat exchanger fitting" + +/obj/item/pipe/circulator/New(loc) + var/obj/machinery/atmospherics/binary/circulator/C = new /obj/machinery/atmospherics/binary/circulator(null) + ..(loc, make_from = C) + +/obj/machinery/atmospherics/binary/circulator/Destroy() + if(generator && generator.cold_circ == src) + generator.cold_circ = null + else if(generator && generator.hot_circ == src) + generator.hot_circ = null + return ..() /obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air() - var/datum/gas_mixture/removed - if(anchored && !(stat & BROKEN)) - var/input_starting_pressure = air1.return_pressure() - var/output_starting_pressure = air2.return_pressure() - last_pressure_delta = max(input_starting_pressure - output_starting_pressure + 10, 0) + var/output_starting_pressure = air1.return_pressure() + var/input_starting_pressure = air2.return_pressure() - //only circulate air if there is a pressure difference (plus 10 kPa to represent friction in the machine) - if(air1.temperature > 0 && last_pressure_delta > 0) + if(output_starting_pressure >= input_starting_pressure - 10) + //Need at least 10 KPa difference to overcome friction in the mechanism + last_pressure_delta = 0 + return null - //Calculate necessary moles to transfer using PV = nRT - recent_moles_transferred = last_pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION) + //Calculate necessary moles to transfer using PV = nRT + if(air2.temperature > 0) + var/pressure_delta = (input_starting_pressure - output_starting_pressure) / 2 - //Actually transfer the gas - removed = air1.remove(recent_moles_transferred) - if(removed) - last_heat_capacity = removed.heat_capacity() - last_temperature = removed.temperature + var/transfer_moles = pressure_delta * air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION) - //Update the gas networks. - parent1.update = 1 + last_pressure_delta = pressure_delta - last_worldtime_transfer = world.time - else - recent_moles_transferred = 0 + //log_debug("pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];") + + //Actually transfer the gas + var/datum/gas_mixture/removed = air2.remove(transfer_moles) + + parent1.update = 1 + parent2.update = 1 - update_icon() return removed + else + last_pressure_delta = 0 + /obj/machinery/atmospherics/binary/circulator/process() - if(!..()) - return 0 - if(last_worldtime_transfer < world.time - 50) - recent_moles_transferred = 0 - update_icon() + ..() + update_icon() /obj/machinery/atmospherics/binary/circulator/update_icon() - if(stat & (BROKEN|NOPOWER) || !anchored) - icon_state = "circ-p" - else if(last_pressure_delta > 0 && recent_moles_transferred > 0) - if(last_pressure_delta > 5*ONE_ATMOSPHERE) - icon_state = "circ-run" + if(stat & (BROKEN|NOPOWER)) + icon_state = "circ[side]-p" + else if(last_pressure_delta > 0) + if(last_pressure_delta > ONE_ATMOSPHERE) + icon_state = "circ[side]-run" else - icon_state = "circ-slow" + icon_state = "circ[side]-slow" else - icon_state = "circ-off" + icon_state = "circ[side]-off" - return 1 - -/obj/machinery/atmospherics/binary/circulator/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - if(istype(W, /obj/item/weapon/wrench)) - var/turf/T = get_turf(src) - if(!istype(T, /turf/simulated)) - return ..() - anchored = !anchored - to_chat(user, "You [(anchored) ? "fasten" : "loosen"] \the [src] to the floor") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - else return ..() + return 1 \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 94efade9b1a..cbe1422c38a 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -108,22 +108,16 @@ return 1 -/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - var/list/data = new() - - data = build_uidata() - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330) - ui.set_initial_data(data) ui.open() -/obj/machinery/atmospherics/omni/filter/proc/build_uidata() - var/list/data = new() +/obj/machinery/atmospherics/omni/filter/ui_data(mob/user, datum/topic_state/state) + var/data[0] data["power"] = on data["config"] = configuring diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index c64703773d3..07269c5f3db 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -132,22 +132,16 @@ return 1 -/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - var/list/data = new() - - data = build_uidata() - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330) - ui.set_initial_data(data) ui.open() -/obj/machinery/atmospherics/omni/mixer/proc/build_uidata() - var/list/data = new() +/obj/machinery/atmospherics/omni/mixer/ui_data(mob/user, datum/topic_state/state) + var/data[0] data["power"] = on data["config"] = configuring diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 49ef7a72855..0397b5bcdde 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -43,4 +43,21 @@ #define R_MAXPERMISSION 32768 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. -#define R_HOST 65535 \ No newline at end of file +#define R_HOST 65535 + +#define ADMIN_QUE(user) "(?)" +#define ADMIN_FLW(user) "(FLW)" +#define ADMIN_PP(user) "(PP)" +#define ADMIN_VV(atom) "(VV)" +#define ADMIN_SM(user) "(SM)" +#define ADMIN_TP(user) "(TP)" +#define ADMIN_BSA(user) "(BSA)" +#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" +#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" +#define ADMIN_SC(user) "(SC)" +#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" +#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" +#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]" +#define ADMIN_JMP(src) "(JMP)" +#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" +#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" \ No newline at end of file diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index e5e6aff1648..6e332bd8b5e 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -283,13 +283,20 @@ #define SOUND_MINIMUM_PRESSURE 10 #define FALLOFF_SOUNDS 0.5 - // Bluespace shelter deploy checks #define SHELTER_DEPLOY_ALLOWED "allowed" #define SHELTER_DEPLOY_BAD_TURFS "bad turfs" #define SHELTER_DEPLOY_BAD_AREA "bad area" #define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects" +// Client donator levels +#define DONATOR_LEVEL_NONE 0 +#define DONATOR_LEVEL_ONE 1 +#define DONATOR_LEVEL_TWO 2 + +// The cooldown on OOC messages such as OOC, LOOC, praying and adminhelps +#define OOC_COOLDOWN 5 + // Medal names #define BOSS_KILL_MEDAL "Killer" #define ALL_KILL_MEDAL "Exterminator" //Killing all of x type diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index bf9c479d3e8..7ab8a19f86d 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -110,6 +110,9 @@ #define CHEM_MOB_SPAWN_HOSTILE 1 #define CHEM_MOB_SPAWN_FRIENDLY 2 +#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay +#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully + #define isliving(A) (istype((A), /mob/living)) #define iscarbon(A) (istype((A), /mob/living/carbon)) #define ishuman(A) (istype((A), /mob/living/carbon/human)) @@ -146,4 +149,4 @@ #define isorgan(A) (istype((A), /obj/item/organ/external)) #define hasorgans(A) (ishuman(A)) -#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) \ No newline at end of file +#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 703b3e6b205..d39cc600221 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -24,5 +24,6 @@ #define DISABLE_KARMA_REMINDER 4096 #define MEMBER_PUBLIC 8192 #define CHAT_NO_ADMINLOGS 16384 +#define DONATOR_PUBLIC 32768 -#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|MEMBER_PUBLIC) +#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC) diff --git a/code/__DEFINES/process_scheduler.dm b/code/__DEFINES/process_scheduler.dm index f1e30c23ed3..5cdb99fc4bd 100644 --- a/code/__DEFINES/process_scheduler.dm +++ b/code/__DEFINES/process_scheduler.dm @@ -16,3 +16,6 @@ // Sleep check macro #define SCHECK if(world.tick_usage >= next_sleep_usage) defer() + +//Timing Controller +#define GLOBAL_PROC "some_magic_bullshit" \ No newline at end of file diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 114588009ed..986cbac0bd3 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -85,3 +85,18 @@ var/gaussian_next gaussian_next = R2 * working return (mean + stddev * R1) #undef ACCURACY + + + +// oof, what a mouthful +// Used in status_procs' "adjust" to let them modify a status effect by a given +// amount, without inadverdently increasing it in the wrong direction +/proc/directional_bounded_sum(orig_val, modifier, bound_lower, bound_upper) + var/new_val = orig_val + modifier + if(modifier > 0) + if(new_val > bound_upper) + new_val = max(orig_val, bound_upper) + else if(modifier < 0) + if(new_val < bound_lower) + new_val = min(orig_val, bound_lower) + return new_val diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 94668321c60..3b370f8a945 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -24,3 +24,39 @@ animate(transform = matrices[i], time = speed) //doesn't have an object argument because this is "Stacking" with the animate call above //3 billion% intentional + +//Dumps the matrix data in format a-f +/matrix/proc/tolist() + . = list() + . += a + . += b + . += c + . += d + . += e + . += f + +//Dumps the matrix data in a matrix-grid format +/* + a d 0 + b e 0 + c f 1 +*/ +/matrix/proc/togrid() + . = list() + . += a + . += d + . += 0 + . += b + . += e + . += 0 + . += c + . += f + . += 1 + +//The X pixel offset of this matrix +/matrix/proc/get_x_shift() + . = c + +//The Y pixel offset of this matrix +/matrix/proc/get_y_shift() + . = f \ No newline at end of file diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f13a2c1e21e..61e0deec1ad 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1014,6 +1014,50 @@ proc/get_mob_with_client_list() else if(zone == "l_foot") return "left foot" else if(zone == "r_foot") return "right foot" else return zone + +/* + + Gets the turf this atom's *ICON* appears to inhabit + It takes into account: + * Pixel_x/y + * Matrix x/y + + NOTE: if your atom has non-standard bounds then this proc + will handle it, but: + * if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked + (this may seem bad, but you're atleast as close to the center of the atom as possible, better than byond's default loc being all the way off) + * if the bounds are odd, the true middle turf of the atom is returned + +*/ + +/proc/get_turf_pixel(atom/movable/AM) + if(!istype(AM)) + return + + //Find AM's matrix so we can use it's X/Y pixel shifts + var/matrix/M = matrix(AM.transform) + + var/pixel_x_offset = AM.pixel_x + M.get_x_shift() + var/pixel_y_offset = AM.pixel_y + M.get_y_shift() + + //Irregular objects + if(AM.bound_height != world.icon_size || AM.bound_width != world.icon_size) + var/icon/AMicon = icon(AM.icon, AM.icon_state) + pixel_x_offset += ((AMicon.Width()/world.icon_size)-1)*(world.icon_size*0.5) + pixel_y_offset += ((AMicon.Height()/world.icon_size)-1)*(world.icon_size*0.5) + qdel(AMicon) + + //DY and DX + var/rough_x = round(round(pixel_x_offset,world.icon_size)/world.icon_size) + var/rough_y = round(round(pixel_y_offset,world.icon_size)/world.icon_size) + + //Find coordinates + var/turf/T = get_turf(AM) //use AM's turfs, as it's coords are the same as AM's AND AM's coords are lost if it is inside another atom + var/final_x = T.x + rough_x + var/final_y = T.y + rough_y + + if(final_x || final_y) + return locate(final_x, final_y, T.z) //Finds the distance between two atoms, in pixels //centered = 0 counts from turf edge to edge diff --git a/code/_globalvars/mapping.dm b/code/_globalvars/mapping.dm index a7fc0306f1b..c826424e19f 100644 --- a/code/_globalvars/mapping.dm +++ b/code/_globalvars/mapping.dm @@ -18,7 +18,6 @@ var/global/list/global_map = null //3 - AI satellite //5 - empty space -var/list/monkeystart = list() var/list/wizardstart = list() var/list/newplayer_start = list() var/list/latejoin = list() @@ -26,10 +25,9 @@ var/list/latejoin_gateway = list() var/list/latejoin_cryo = list() var/list/latejoin_cyborg = list() var/list/prisonwarp = list() //prisoners go to these -var/list/holdingfacility = list() //captured people go here var/list/xeno_spawn = list()//Aliens spawn at these. var/list/ertdirector = list() -// list/mazewarp = list() +var/list/emergencyresponseteamspawn = list() var/list/tdome1 = list() var/list/tdome2 = list() var/list/team_alpha = list() diff --git a/code/_globalvars/unused.dm b/code/_globalvars/unused.dm index d3945b68eab..e55794c3dc9 100644 --- a/code/_globalvars/unused.dm +++ b/code/_globalvars/unused.dm @@ -31,10 +31,4 @@ var/endicon = null var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null var/going = 1.0 var/datum/engine_eject/engine_eject_control = null -// list/traitors = list() //traitor list -// list/traitobj = list( ) -var/airtunnel_start = 68 // default -var/airtunnel_stop = 68 // default -var/airtunnel_bottom = 72 // default -// reverse_dir[dir] = reverse of dir diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index cdce17f6277..f3ae2fdea48 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -31,9 +31,15 @@ return next_click = world.time + 1 - if(control_disabled || stat) return + + var/turf/pixel_turf = get_turf_pixel(A) + if(pixel_turf && !cameranet.checkTurfVis(pixel_turf)) + log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)])") + message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(A)]))") + send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)]))") + return var/list/modifiers = params2list(params) if(modifiers["shift"] && modifiers["ctrl"]) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index d9a75424179..e8a12cb89d8 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -62,7 +62,7 @@ CtrlClickOn(A) return - if(stat || paralysis || stunned || weakened) + if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1)) return face_atom(A) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 1f60c26f885..a15176af87c 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -39,7 +39,7 @@ CtrlClickOn(A) return - if(stat || lockcharge || weakened || stunned || paralysis) + if(incapacitated()) return if(next_move >= world.time) diff --git a/code/controllers/Processes/timer.dm b/code/controllers/Processes/timer.dm index 2e60f8752b8..4add16aae31 100644 --- a/code/controllers/Processes/timer.dm +++ b/code/controllers/Processes/timer.dm @@ -6,7 +6,7 @@ var/global/datum/controller/process/timer/timer_master /datum/controller/process/timer/setup() name = "timer" - schedule_interval = 5 //every 0.5 seconds + schedule_interval = 1 //every 0.1 seconds--2 server ticks timer_master = src log_startup_progress("Timer process starting up.") @@ -30,7 +30,10 @@ var/global/datum/controller/process/timer/timer_master /datum/controller/process/timer/proc/runevent(datum/timedevent/event) set waitfor = 0 if(event.thingToCall) - call(event.thingToCall, event.procToCall)(arglist(event.argList)) + if(event.thingToCall == GLOBAL_PROC && istext(event.procToCall)) + call("/proc/[event.procToCall]")(arglist(event.argList)) + else + call(event.thingToCall, event.procToCall)(arglist(event.argList)) /datum/timedevent var/thingToCall @@ -42,8 +45,7 @@ var/global/datum/controller/process/timer/timer_master var/static/nextid = 1 /datum/timedevent/New() - id = nextid - nextid++ + id = nextid++ /datum/timedevent/Destroy() timer_master.processing_timers -= src @@ -53,7 +55,7 @@ var/global/datum/controller/process/timer/timer_master /proc/addtimer(thingToCall, procToCall, wait, unique = FALSE, ...) if(!timer_master) //can't run timers before the mc has been created return - if(!thingToCall || !procToCall || wait <= 0) + if(!thingToCall || !procToCall) return if(timer_master.disabled) timer_master.disabled = 0 @@ -71,11 +73,17 @@ var/global/datum/controller/process/timer/timer_master // Check for dupes if unique = 1. if(unique) - if(event.hash in timer_master.hashes) - return + var/datum/timedevent/hash_event = timer_master.hashes[event.hash] + if(hash_event) + return hash_event.id + timer_master.hashes[event.hash] = event + if(wait <= 0) + timer_master.runevent(event) + timer_master.hashes -= event.hash + return // If we are unique (or we're not checking that), add the timer and return the id. timer_master.processing_timers += event - timer_master.hashes += event.hash + return event.id /proc/deltimer(id) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index d525abef680..0f4ad0eb47c 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -139,6 +139,7 @@ var/list/irc_bot_host = list() var/main_irc = "" var/admin_irc = "" + var/admin_notify_irc = "" var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix var/default_laws = 0 //Controls what laws the AI spawns with. @@ -468,6 +469,9 @@ if("admin_irc") config.admin_irc = value + if("admin_notify_irc") + config.admin_notify_irc = value + if("python_path") if(value) config.python_path = value diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm index ab98e25c547..ada85c38611 100644 --- a/code/datums/cargoprofile.dm +++ b/code/datums/cargoprofile.dm @@ -643,9 +643,7 @@ //this is necessarily damaging var/damage = rand(1,5) to_chat(M, "The unloading machine grabs you with a hard metallic claw!") - if(M.client) - M.client.eye = master - M.client.perspective = EYE_PERSPECTIVE + M.reset_perspective(master) M.loc = master master.types[M.type] = src M.apply_damage(damage) // todo: ugly @@ -699,10 +697,7 @@ //this is necessarily damaging var/damage = rand(1,5) to_chat(M, "The unloading machine grabs you with a hard metallic claw!") - if(M.client) - M.client.eye = master - M.client.perspective = EYE_PERSPECTIVE - M.loc = master + M.forceMove(master) master.types[M.type] = src M.apply_damage(damage) // todo: ugly M.visible_message("\red [M.name] gets pulled into the machine!") @@ -710,11 +705,8 @@ outlet_reaction(var/atom/W,var/turf/D) var/mob/living/M = W - M.loc = master.loc + M.forceMove(master.loc) M.dir = master.outdir - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE D = get_step(D,master.outdir) // throw attempt eject_speed = rand(0,4) @@ -796,4 +788,4 @@ var/punches = punch(M,remaining / PUNCH_WORK) if(punches>1)master.sleep++ return punches * PUNCH_WORK -#undef MAXCOIL \ No newline at end of file +#undef MAXCOIL diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index c7edd88803a..dbd9f92f533 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -150,7 +150,10 @@ proc/get_id_photo(var/mob/living/carbon/human/H) preview_icon.Blend(temp, ICON_OVERLAY) //Tail - if(H.species.tail && H.species.flags & HAS_TAIL) + if(H.body_accessory && istype(H.body_accessory, /datum/body_accessory/tail)) + temp = new/icon("icon" = H.body_accessory.icon, "icon_state" = H.body_accessory.icon_state) + preview_icon.Blend(temp, ICON_OVERLAY) + else if(H.species.tail && H.species.bodyflags & HAS_TAIL) temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s") preview_icon.Blend(temp, ICON_OVERLAY) @@ -173,6 +176,17 @@ proc/get_id_photo(var/mob/living/carbon/human/H) if(H.species.bodyflags & HAS_SKIN_COLOR) preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD) + //Tail Markings + var/icon/t_marking_s + if(H.species.bodyflags & HAS_TAIL_MARKINGS) + var/tail_marking = H.m_styles["tail"] + var/datum/sprite_accessory/tail_marking_style = marking_styles_list[tail_marking] + if(tail_marking_style && tail_marking_style.species_allowed) + t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s") + t_marking_s.Blend(H.m_colours["tail"], ICON_ADD) + if(!(H.body_accessory && istype(H.body_accessory, /datum/body_accessory/body))) + preview_icon.Blend(t_marking_s, ICON_OVERLAY) + var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s") if(!(H.species.bodyflags & NO_EYES)) var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s") @@ -190,7 +204,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H) // I'll want to make a species-specific proc for this sooner or later // But this'll do for now if(head_organ.species.name == "Slime People") - hair_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_ADD) + hair_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_AND) else hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD) @@ -378,9 +392,22 @@ proc/get_id_photo(var/mob/living/carbon/human/H) else clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + preview_icon.Blend(face_s, ICON_OVERLAY) // Why do we do this twice if(clothes_s) preview_icon.Blend(clothes_s, ICON_OVERLAY) + //Bus body accessories that go over clothes. + if(H.body_accessory && istype(H.body_accessory, /datum/body_accessory/body)) + temp = new/icon("icon" = H.body_accessory.icon, "icon_state" = H.body_accessory.icon_state) + if(H.body_accessory.pixel_x_offset) + temp.Shift(EAST, H.body_accessory.pixel_x_offset) + if(H.body_accessory.pixel_y_offset) + temp.Shift(NORTH, H.body_accessory.pixel_y_offset) + if(H.species.bodyflags & HAS_SKIN_COLOR) + temp.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), H.body_accessory.blend_mode) + if(t_marking_s) + temp.Blend(t_marking_s, ICON_OVERLAY) + preview_icon.Blend(temp, ICON_OVERLAY) qdel(face_s) qdel(clothes_s) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index b3985b97c05..dfe7d746955 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1034,7 +1034,7 @@ body to_chat(usr, "Mob doesn't exist anymore") return - if(!(locateUID(rem_organ) in M.internal_organs)) + if(!(rem_organ in M.internal_organs)) to_chat(usr, "Mob does not have that organ.") return diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 8f388c45edc..9e806b24f41 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -35,6 +35,6 @@ Bonus to_chat(M, "[pick("Your head hurts.", "Your mind blanks for a moment.")]") else to_chat(M, "You can't think straight!") - M.confused = min(100, M.confused + 8) + M.AdjustConfused(8, bound_lower = 0, bound_upper = 100) return diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index 6c65e330fa8..1a9bba6961e 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -33,11 +33,11 @@ Bonus if(3, 4) to_chat(M, "[pick("You hear a ringing in your ear.", "Your ears pop.")]") if(5) - if(!(M.ear_deaf)) + if(!(M.disabilities & DEAF)) to_chat(M, "Your ears pop and begin ringing loudly!") - M.setEarDamage(-1,INFINITY) //Shall be enough + M.BecomeDeaf() spawn(200) if(M) to_chat(M, "The ringing in your ears fades...") - M.setEarDamage(-1,0) - return \ No newline at end of file + M.CureDeaf() + return diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index cac8b4d2e03..e117dbf51f8 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -36,6 +36,6 @@ Bonus to_chat(M, "[pick("Something is following you.", "You are being watched.", "You hear a whisper in your ear.", "Thumping footsteps slam toward you from nowhere.")]") else to_chat(M, "[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]") - M.hallucination += 5 + M.AdjustHallucinate(5) return diff --git a/code/datums/diseases/anxiety.dm b/code/datums/diseases/anxiety.dm index 150b7483aaa..4d9716e44da 100644 --- a/code/datums/diseases/anxiety.dm +++ b/code/datums/diseases/anxiety.dm @@ -24,18 +24,18 @@ to_chat(affected_mob, "You feel panicky.") if(prob(2)) to_chat(affected_mob, "You're overtaken with panic!") - affected_mob.confused += (rand(2,3)) + affected_mob.AdjustConfused(rand(2,3)) if(4) if(prob(10)) to_chat(affected_mob, "You feel butterflies in your stomach.") if(prob(5)) affected_mob.visible_message("[affected_mob] stumbles around in a panic.", \ "You have a panic attack!") - affected_mob.confused += (rand(6,8)) - affected_mob.jitteriness += (rand(6,8)) + affected_mob.AdjustConfused(rand(6,8)) + affected_mob.AdjustJitter(rand(6,8)) if(prob(2)) affected_mob.visible_message("[affected_mob] coughs up butterflies!", \ "You cough up butterflies!") new /mob/living/simple_animal/butterfly(affected_mob.loc) new /mob/living/simple_animal/butterfly(affected_mob.loc) - return \ No newline at end of file + return diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 7f04eb5fc56..e3482955865 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -106,7 +106,7 @@ if(3) if(prob(4)) to_chat(affected_mob, "You feel a stabbing pain in your head.") - affected_mob.confused += 10 + affected_mob.AdjustConfused(10) if(4) if(prob(3)) affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh.")) @@ -241,4 +241,4 @@ stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.") stage4 = list("You're ravenous.") stage5 = list("You have become a morph.") - new_form = /mob/living/simple_animal/hostile/morph \ No newline at end of file + new_form = /mob/living/simple_animal/hostile/morph diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm index 11c06e386c5..4cd027a7d7d 100644 --- a/code/datums/diseases/tuberculosis.dm +++ b/code/datums/diseases/tuberculosis.dm @@ -44,7 +44,7 @@ affected_mob.AdjustSleeping(5) if(prob(2)) to_chat(affected_mob, "You feel your mind relax and your thoughts drift!") - affected_mob.confused = min(100, affected_mob.confused + 8) + affected_mob.AdjustConfused(8, bound_lower = 0, bound_upper = 100) if(prob(10)) affected_mob.vomit(20) if(prob(3)) @@ -55,4 +55,3 @@ to_chat(affected_mob, "[pick("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit", "You feel like taking off some clothes...")]") affected_mob.bodytemperature += 40 return - diff --git a/code/datums/diseases/vampire.dm b/code/datums/diseases/vampire.dm index dbcc9bbb3c0..16706087673 100644 --- a/code/datums/diseases/vampire.dm +++ b/code/datums/diseases/vampire.dm @@ -20,15 +20,15 @@ if(prob(10)) affected_mob.emote(pick("cough","groan", "gasp")) - affected_mob.losebreath++ + affected_mob.AdjustLoseBreath(1) if(prob(15)) if(prob(33)) to_chat(affected_mob, "You feel sickly and weak.") - affected_mob.slowed += 3 + affected_mob.AdjustSlowed(3) affected_mob.adjustToxLoss(toxdamage) if(prob(5)) to_chat(affected_mob, "Your joints ache horribly!") affected_mob.Weaken(stuntime) - affected_mob.Stun(stuntime) \ No newline at end of file + affected_mob.Stun(stuntime) diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 6498f16c0d3..0a17435c5c0 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -61,7 +61,7 @@ else if(istype(used_atom, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = used_atom if(C.amount<4) - to_chat(user, ("There's not enough cable to finish the task.")) + to_chat(user, ("There's not enough cable to finish the task.")) return 0 else C.use(4) @@ -69,7 +69,7 @@ else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom if(S.amount < 5) - to_chat(user, ("There's not enough material in this stack.")) + to_chat(user, ("There's not enough material in this stack.")) return 0 else S.use(5) @@ -106,30 +106,29 @@ return proc/try_consume(mob/user as mob, atom/used_atom, amount) - if(amount>0) - // STACKS - if(istype(used_atom,/obj/item/stack)) - var/obj/item/stack/stack=used_atom - if(stack.amount < amount) - to_chat(user, "\red You don't have enough [stack]! You need at least [amount].") - return 0 - stack.use(amount) + if(amount > 0) // CABLES if(istype(used_atom,/obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/coil=used_atom - if(coil.amount < amount) - to_chat(user, "\red You don't have enough cable! You need at least [amount] coils.") + if(!coil.use(amount)) + to_chat(user, "You don't have enough cable! You need at least [amount] coils.") return 0 - coil.use(amount) // WELDER if(istype(used_atom,/obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/welder=used_atom if(!welder.isOn()) - to_chat(user, "\blue You tap the [src] with your unlit welder. [pick("Ding","Dong")].") + to_chat(user, "You tap the [src] with your unlit welder. [pick("Ding","Dong")].") return 0 if(!welder.remove_fuel(amount,user)) - to_chat(user, "\red You don't have enough fuel!") + to_chat(user, "You don't have enough fuel!") return 0 + // STACKS + if(istype(used_atom,/obj/item/stack)) + var/obj/item/stack/stack=used_atom + if(stack.amount < amount) + to_chat(user, "You don't have enough [stack]! You need at least [amount].") + return 0 + stack.use(amount) return 1 /datum/construction/reversible diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 645af5e8aea..2e953f3ec91 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -42,7 +42,7 @@ var/byproduct // example: = /obj/item/weapon/kitchen/mould // byproduct to return, such as a mould or trash -/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous +/datum/recipe/proc/check_reagents(datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous . = 1 for(var/r_r in reagents) var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r) @@ -55,7 +55,7 @@ return -1 return . -/datum/recipe/proc/check_fruit(var/obj/container) +/datum/recipe/proc/check_fruit(obj/container) . = 1 if(fruit && fruit.len) var/list/checklist = list() @@ -74,7 +74,7 @@ break return . -/datum/recipe/proc/check_items(var/obj/container as obj) +/datum/recipe/proc/check_items(obj/container) . = 1 if(items && items.len) var/list/checklist = list() @@ -96,7 +96,7 @@ return . //general version -/datum/recipe/proc/make(var/obj/container as obj) +/datum/recipe/proc/make(obj/container) var/obj/result_obj = new result(container) for(var/obj/O in (container.contents-result_obj)) O.reagents.trans_to(result_obj, O.reagents.total_volume) @@ -106,7 +106,7 @@ return result_obj // food-related -/datum/recipe/proc/make_food(var/obj/container as obj) +/datum/recipe/proc/make_food(obj/container) var/obj/result_obj = new result(container) for(var/obj/O in (container.contents-result_obj)) if(O.reagents) @@ -118,7 +118,7 @@ score_meals++ return result_obj -/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num) +/proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj, exact = 1) if(!exact) exact = -1 var/list/datum/recipe/possible_recipes = new diff --git a/code/datums/spell.dm b/code/datums/spell.dm index b18b912c6b5..fe2e7431cf3 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -110,7 +110,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin var/mob/living/carbon/human/caster = user if(caster.remoteview_target) caster.remoteview_target = null - caster.reset_view(0) + caster.reset_perspective(0) return 0 if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm index d4d3b383f9d..fe0e02bda6d 100644 --- a/code/datums/spells/cluwne.dm +++ b/code/datums/spells/cluwne.dm @@ -16,7 +16,7 @@ adjustBrainLoss(80) nutrition = 9000 overeatduration = 9000 - confused = 30 + Confused(30) if(mind) mind.assigned_role = "Cluwne" @@ -44,8 +44,8 @@ adjustBrainLoss(-120) nutrition = NUTRITION_LEVEL_STARVING overeatduration = 0 - confused = 0 - jitteriness = 0 + SetConfused(0) + SetJitter(0) if(mind) mind.assigned_role = "Lawyer" diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm index 6dd0439e8c6..cfda930afd2 100644 --- a/code/datums/spells/inflict_handler.dm +++ b/code/datums/spells/inflict_handler.dm @@ -50,8 +50,8 @@ target.Paralyse(amt_paralysis) target.Stun(amt_stunned) - target.eye_blind += amt_eye_blind - target.eye_blurry += amt_eye_blurry + target.AdjustEyeBlind(amt_eye_blind) + target.AdjustEyeBlurry(amt_eye_blurry) //summoning if(summon_type) - new summon_type(target.loc, target) \ No newline at end of file + new summon_type(target.loc, target) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 73c653369eb..7a8f05e08fc 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -581,7 +581,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /obj/item/clothing/head/helmet/space, /obj/item/clothing/head/helmet/space, /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath,) + /obj/item/clothing/mask/breath) cost = 30 containertype = /obj/structure/closet/crate/secure containername = "space suit crate" @@ -607,9 +607,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine name = "Thermo-Electric Generator Crate" contains = list( /obj/machinery/power/generator, - /obj/machinery/atmospherics/binary/circulator, - /obj/machinery/atmospherics/binary/circulator - ) + /obj/item/pipe/circulator, + /obj/item/pipe/circulator) cost = 25 containertype = /obj/structure/closet/crate/secure containername = "thermo-electric generator crate" diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index bba4971acd9..2c5b9375918 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -207,6 +207,7 @@ var/list/uplink_items = list() item = /obj/item/weapon/caution/proximity_sign cost = 4 job = list("Janitor") + surplus = 0 //Medical diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 62774ad61a7..6c9387644b0 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -62,7 +62,7 @@ /datum/announcement/proc/Message(message as text, message_title as text) for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, "

[title]

") to_chat(M, "[message]") if(announcer) @@ -88,7 +88,7 @@ command += "
[message]
" command += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, command) /datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text) @@ -100,7 +100,7 @@ command += "
[message]
" command += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, command) /datum/announcement/priority/security/Message(message as text, message_title as text) @@ -125,7 +125,7 @@ if(!message_sound) return for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) M << message_sound /datum/announcement/proc/Sound(var/message_sound) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 49b64064dbe..e1077773daa 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1558,6 +1558,14 @@ var/list/ghostteleportlocs = list() name = "\improper Surgery" icon_state = "surgery" +/area/medical/surgery1 + name = "\improper Surgery 1" + icon_state = "surgery1" + +/area/medical/surgery2 + name = "\improper Surgery 2" + icon_state = "surgery2" + /area/medical/surgeryobs name = "\improper Surgery Observation" icon_state = "surgery" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 694d369782f..0df047cdca3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -429,6 +429,15 @@ else return 0 +// Used to provide overlays when using this atom as a viewing focus +// (cameras, locker tint, etc.) +/atom/proc/get_remote_view_fullscreens(mob/user) + return + +//the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera) +/atom/proc/update_remote_sight(mob/living/user) + return + /atom/proc/checkpass(passflag) return pass_flags&passflag diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 1279e543922..83a344d8611 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -147,6 +147,18 @@ return 1 +/mob/living/forceMove(atom/destination) + stop_pulling() + if(buckled) + buckled.unbuckle_mob(src,force=1) + // in lieu of "unbuckle_all_mobs" + if(buckled_mob) + unbuckle_mob(buckled_mob,force=1) + . = ..() + if(client) + reset_perspective(destination) + update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall. + //called when src is thrown into hit_atom /atom/movable/proc/throw_impact(atom/hit_atom, var/speed) if(istype(hit_atom,/mob/living)) @@ -179,7 +191,7 @@ if(has_gravity(src)) return 1 - if(pulledby) + if(pulledby && !pulledby.pulling) return 1 if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 2c5fdbbb5b1..e5af89c3d25 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -149,38 +149,20 @@ else H.change_gender(MALE, 0) - var/number_head_marks = 0 - var/number_body_marks = 0 - var/number_tail_marks = 0 - for(var/m in marking_styles_list) - var/datum/sprite_accessory/body_markings/marking = marking_styles_list[m] - if(marking.marking_location == "head") - number_head_marks++ - else if(marking.marking_location == "body") - number_body_marks++ - else if(marking.marking_location == "tail") - number_tail_marks++ - //Head Markings var/head_marks = dna.GetUIValueRange(DNA_UI_HEAD_MARK_STYLE, marking_styles_list.len) - if((head_marks > 0) && (head_marks <= number_head_marks)) + if((head_marks > 0) && (head_marks <= marking_styles_list.len)) H.m_styles["head"] = marking_styles_list[head_marks] //Body Markings var/body_marks = dna.GetUIValueRange(DNA_UI_BODY_MARK_STYLE, marking_styles_list.len) - if((body_marks > 0) && (body_marks <= number_body_marks)) + if((body_marks > 0) && (body_marks <= marking_styles_list.len)) H.m_styles["body"] = marking_styles_list[body_marks] //Tail Markings var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE, marking_styles_list.len) - if((tail_marks > 0) && (tail_marks <= number_tail_marks)) + if((tail_marks > 0) && (tail_marks <= marking_styles_list.len)) H.m_styles["tail"] = marking_styles_list[tail_marks] - H.force_update_limbs() - H.update_eyes() - H.update_hair() - H.update_fhair() - H.update_markings() - H.update_tail_layer() - H.update_head_accessory() + H.regenerate_icons() return 1 else diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 40814a72c78..0533afe2911 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -144,7 +144,7 @@ if(usr.stat != 0) return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(!ishuman(usr)) //Make sure they're a mob that has dna to_chat(usr, "Try as you might, you can not climb up into the [src].") @@ -156,8 +156,6 @@ to_chat(usr, "Subject cannot have abiotic items on.") return usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src usr.forceMove(src) src.occupant = usr src.icon_state = "scanner_occupied" @@ -169,7 +167,7 @@ return if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return @@ -258,9 +256,6 @@ go_out() /obj/machinery/dna_scannernew/proc/put_in(var/mob/M) - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src M.forceMove(src) src.occupant = M src.icon_state = "scanner_occupied" @@ -283,9 +278,6 @@ to_chat(usr, "The scanner is locked!") return - if(src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE src.occupant.forceMove(src.loc) src.occupant = null src.icon_state = "scanner_open" @@ -476,7 +468,18 @@ if(user == connected.occupant) return - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/computer/scan_consolenew/ui_data(mob/user, datum/topic_state/state) var/data[0] data["selectedMenuKey"] = selected_menu_key data["locked"] = src.connected.locked @@ -550,18 +553,7 @@ for(var/datum/reagent/R in connected.beaker.reagents.reagent_list) data["beakerVolume"] += R.volume - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/computer/scan_consolenew/Topic(href, href_list) if(..()) @@ -973,4 +965,4 @@ return 1 -/////////////////////////// DNA MACHINES \ No newline at end of file +/////////////////////////// DNA MACHINES diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index a30d160fd92..4cfa6f45750 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -24,7 +24,7 @@ /datum/dna/gene/disability/can_activate(var/mob/M,var/flags) return 1 // Always set! -/datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/disability/activate(var/mob/living/M, var/connected, var/flags) ..() if(mutation && !(mutation in M.mutations)) M.mutations.Add(mutation) @@ -35,7 +35,7 @@ else testing("[name] has no activation message.") -/datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/disability/deactivate(var/mob/living/M, var/connected, var/flags) ..() if(mutation && (mutation in M.mutations)) M.mutations.Remove(mutation) @@ -127,7 +127,7 @@ /datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags) ..(M,connected,flags) - M.ear_deaf = 1 + M.EarDeaf(1) /datum/dna/gene/disability/nearsighted name="Nearsightedness" diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index fd57ae5b471..36c9af1c48c 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -148,15 +148,15 @@ action_icon_state = "genetic_cryo" -/obj/effect/proc_holder/spell/targeted/cryokinesis/cast(list/targets, mob/user = usr) +/obj/effect/proc_holder/spell/targeted/cryokinesis/cast(list/targets) if(!targets.len) - to_chat(user, "No target found in range.") + to_chat(usr, "No target found in range.") return var/mob/living/carbon/C = targets[1] if(!iscarbon(C)) - to_chat(user, "This will only work on normal organic beings.") + to_chat(usr, "This will only work on normal organic beings.") return if(RESIST_COLD in C.mutations) @@ -169,15 +169,15 @@ if(istype(H.wear_suit, /obj/item/clothing/suit/space)) handle_suit = 1 if(H.internal) - H.visible_message("[user] sprays a cloud of fine ice crystals, engulfing [H]!", - "[user] sprays a cloud of fine ice crystals over your [H.head]'s visor.") - log_admin("[key_name(user)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") - msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") + H.visible_message("[usr] sprays a cloud of fine ice crystals, engulfing [H]!", + "[usr] sprays a cloud of fine ice crystals over your [H.head]'s visor.") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] while wearing internals and a suit") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") else - H.visible_message("[user] sprays a cloud of fine ice crystals engulfing, [H]!", - "[user] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") - log_admin("[key_name(user)] has used cryokinesis on [key_name(C)]") - msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") + H.visible_message("[usr] sprays a cloud of fine ice crystals engulfing, [H]!", + "[usr] sprays a cloud of fine ice crystals cover your [H.head]'s visor and make it into your air vents!.") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)]") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") H.bodytemperature = max(0, H.bodytemperature - 50) H.adjustFireLoss(5) if(!handle_suit) @@ -185,11 +185,11 @@ C.adjustFireLoss(10) C.ExtinguishMob() - C.visible_message("\red [user] sprays a cloud of fine ice crystals, engulfing [C]!") - log_admin("[key_name(user)] has used cryokinesis on [key_name(C)] without internals or a suit") - msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)]") + C.visible_message("\red [usr] sprays a cloud of fine ice crystals, engulfing [C]!") + log_admin("[key_name(usr)] has used cryokinesis on [key_name(C)] without internals or a suit") + msg_admin_attack("[key_name_admin(usr)] has cast cryokinesis on [key_name_admin(C)]") - //playsound(user.loc, 'bamf.ogg', 50, 0) + //playsound(usr.loc, 'bamf.ogg', 50, 0) new/obj/effect/self_deleting(C.loc, icon('icons/effects/genetics.dmi', "cryokinesis")) @@ -288,6 +288,10 @@ if((O in user) && is_type_in_list(O,own_blacklist)) continue if(is_type_in_list(O,types_allowed)) + if(isanimal(O)) + var/mob/living/simple_animal/SA = O + if(!SA.gold_core_spawnable) + continue possible_targets += O targets += input("Choose the target of your hunger.", "Targeting") as null|anything in possible_targets @@ -296,9 +300,10 @@ revert_cast(user) return - perform(targets, user = user) + perform(targets) -/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets, mob/user = usr) +/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets) + var/mob/user = usr if(!targets.len) to_chat(user, "No target found in range.") return @@ -384,60 +389,60 @@ action_icon_state = "genetic_jump" -/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets, mob/user = usr) +/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets) var/failure = 0 - if(istype(user.loc,/mob/) || user.lying || user.stunned || user.buckled || user.stat) - to_chat(user, "You can't jump right now!") + if(istype(usr.loc,/mob/) || usr.lying || usr.stunned || usr.buckled || usr.stat) + to_chat(usr, "You can't jump right now!") return - if(istype(user.loc,/turf/)) - if(user.restrained())//Why being pulled while cuffed prevents you from moving - for(var/mob/M in range(user, 1)) - if(M.pulling == user) - if(!M.restrained() && M.stat == 0 && M.canmove && user.Adjacent(M)) + if(istype(usr.loc,/turf/)) + if(usr.restrained())//Why being pulled while cuffed prevents you from moving + for(var/mob/M in range(usr, 1)) + if(M.pulling == usr) + if(!M.restrained() && M.stat == 0 && M.canmove && usr.Adjacent(M)) failure = 1 else M.stop_pulling() - if(user.pinned.len) + if(usr.pinned.len) failure = 1 - user.visible_message("[user.name] takes a huge leap!") - playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1) + usr.visible_message("[usr.name] takes a huge leap!") + playsound(usr.loc, 'sound/weapons/thudswoosh.ogg', 50, 1) if(failure) - user.Weaken(5) - user.Stun(5) - user.visible_message("[user] attempts to leap away but is slammed back down to the ground!", + usr.Weaken(5) + usr.Stun(5) + usr.visible_message("[usr] attempts to leap away but is slammed back down to the ground!", "You attempt to leap away but are suddenly slammed back down to the ground!", "You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.") return 0 - var/prevLayer = user.layer - var/prevFlying = user.flying - user.layer = 9 + var/prevLayer = usr.layer + var/prevFlying = usr.flying + usr.layer = 9 - user.flying = 1 + usr.flying = 1 for(var/i=0, i<10, i++) - step(user, user.dir) - if(i < 5) user.pixel_y += 8 - else user.pixel_y -= 8 + step(usr, usr.dir) + if(i < 5) usr.pixel_y += 8 + else usr.pixel_y -= 8 sleep(1) - user.flying = prevFlying + usr.flying = prevFlying - if(FAT in user.mutations && prob(66)) - user.visible_message("[user.name] crashes due to their heavy weight!") - //playsound(user.loc, 'zhit.wav', 50, 1) - user.AdjustWeakened(10) - user.AdjustStunned(5) + if(FAT in usr.mutations && prob(66)) + usr.visible_message("[usr.name] crashes due to their heavy weight!") + //playsound(usr.loc, 'zhit.wav', 50, 1) + usr.AdjustWeakened(10) + usr.AdjustStunned(5) - user.layer = prevLayer + usr.layer = prevLayer - if(istype(user.loc,/obj/)) - var/obj/container = user.loc - to_chat(user, "You leap and slam your head against the inside of [container]! Ouch!") - user.AdjustParalysis(3) - user.AdjustWeakened(5) - container.visible_message("[user.loc] emits a loud thump and rattles a bit.") - playsound(user.loc, 'sound/effects/bang.ogg', 50, 1) + if(istype(usr.loc,/obj/)) + var/obj/container = usr.loc + to_chat(usr, "You leap and slam your head against the inside of [container]! Ouch!") + usr.AdjustParalysis(3) + usr.AdjustWeakened(5) + container.visible_message("[usr.loc] emits a loud thump and rattles a bit.") + playsound(usr.loc, 'sound/effects/bang.ogg', 50, 1) var/wiggle = 6 while(wiggle > 0) wiggle-- @@ -483,21 +488,21 @@ action_icon_state = "genetic_poly" -/obj/effect/proc_holder/spell/targeted/polymorph/cast(list/targets, mob/user = usr) +/obj/effect/proc_holder/spell/targeted/polymorph/cast(list/targets) var/mob/living/M=targets[1] if(!ishuman(M)) - to_chat(user, "You can only change your appearance to that of another human.") + to_chat(usr, "You can only change your appearance to that of another human.") return - if(!ishuman(user)) + if(!ishuman(usr)) return - user.visible_message("[user]'s body shifts and contorts.") + usr.visible_message("[usr]'s body shifts and contorts.") spawn(10) - if(M && user) - playsound(user.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) - var/mob/living/carbon/human/H = user + if(M && usr) + playsound(usr.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) + var/mob/living/carbon/human/H = usr var/mob/living/carbon/human/target = M H.UpdateAppearance(target.dna.UI) H.real_name = target.real_name @@ -540,29 +545,29 @@ revert_cast(user) return - perform(targets, user = user) + perform(targets) -/obj/effect/proc_holder/spell/targeted/empath/cast(list/targets, mob/user = usr) - if(!ishuman(user)) return +/obj/effect/proc_holder/spell/targeted/empath/cast(list/targets) + if(!ishuman(usr)) return for(var/mob/living/carbon/M in targets) if(!iscarbon(M)) - to_chat(user, "You may only use this on other organic beings.") + to_chat(usr, "You may only use this on other organic beings.") return if(PSY_RESIST in M.mutations) - to_chat(user, "You can't see into [M.name]'s mind at all!") + to_chat(usr, "You can't see into [M.name]'s mind at all!") return if(M.stat == 2) - to_chat(user, "[M.name] is dead and cannot have their mind read.") + to_chat(usr, "[M.name] is dead and cannot have their mind read.") return if(M.health < 0) - to_chat(user, "[M.name] is dying, and their thoughts are too scrambled to read.") + to_chat(usr, "[M.name] is dying, and their thoughts are too scrambled to read.") return - to_chat(user, "Mind Reading of [M.name]:") + to_chat(usr, "Mind Reading of [M.name]:") var/pain_condition = M.health // lower health means more pain var/list/randomthoughts = list("what to have for lunch","the future","the past","money", @@ -579,33 +584,33 @@ switch(pain_condition) if(81 to INFINITY) - to_chat(user, "Condition: [M.name] feels good.") + to_chat(usr, "Condition: [M.name] feels good.") if(61 to 80) - to_chat(user, "Condition: [M.name] is suffering mild pain.") + to_chat(usr, "Condition: [M.name] is suffering mild pain.") if(41 to 60) - to_chat(user, "Condition: [M.name] is suffering significant pain.") + to_chat(usr, "Condition: [M.name] is suffering significant pain.") if(21 to 40) - to_chat(user, "Condition: [M.name] is suffering severe pain.") + to_chat(usr, "Condition: [M.name] is suffering severe pain.") else - to_chat(user, "Condition: [M.name] is suffering excruciating pain.") + to_chat(usr, "Condition: [M.name] is suffering excruciating pain.") thoughts = "haunted by their own mortality" switch(M.a_intent) if(I_HELP) - to_chat(user, "Mood: You sense benevolent thoughts from [M.name].") + to_chat(usr, "Mood: You sense benevolent thoughts from [M.name].") if(I_DISARM) - to_chat(user, "Mood: You sense cautious thoughts from [M.name].") + to_chat(usr, "Mood: You sense cautious thoughts from [M.name].") if(I_GRAB) - to_chat(user, "Mood: You sense hostile thoughts from [M.name].") + to_chat(usr, "Mood: You sense hostile thoughts from [M.name].") if(I_HARM) - to_chat(user, "Mood: You sense cruel thoughts from [M.name].") + to_chat(usr, "Mood: You sense cruel thoughts from [M.name].") for(var/mob/living/L in view(7,M)) if(L == M) continue thoughts = "thinking about punching [L.name]" break else - to_chat(user, "Mood: You sense strange thoughts from [M.name].") + to_chat(usr, "Mood: You sense strange thoughts from [M.name].") if(istype(M,/mob/living/carbon/human)) var/numbers[0] @@ -614,11 +619,11 @@ numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.remote_access_pin if(numbers.len>0) - to_chat(user, "b>Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") - to_chat(user, "Thoughts: [M.name] is currently [thoughts].") + to_chat(usr, "Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + to_chat(usr, "Thoughts: [M.name] is currently [thoughts].") if(EMPATH in M.mutations) - to_chat(M, "You sense [user.name] reading your mind.") + to_chat(M, "You sense [usr.name] reading your mind.") else if(prob(5) || M.mind.assigned_role=="Chaplain") to_chat(M, "You sense someone intruding upon your thoughts...") return @@ -655,16 +660,16 @@ invocation_emote_self = invocation ..(user) -/obj/effect/proc_holder/spell/aoe_turf/superfart/cast(list/targets, mob/user = usr) - var/UT = get_turf(user) +/obj/effect/proc_holder/spell/aoe_turf/superfart/cast(list/targets) + var/UT = get_turf(usr) - if(do_after(user, 30, target = user)) + if(do_after(usr, 30, target = usr)) playsound(UT, 'sound/goonstation/effects/superfart.ogg', 50, 0) - user.visible_message("[user] unleashes a [pick("tremendous","gigantic","colossal")] fart!", "You hear a [pick("tremendous","gigantic","colossal")] fart.") + usr.visible_message("[usr] unleashes a [pick("tremendous","gigantic","colossal")] fart!", "You hear a [pick("tremendous","gigantic","colossal")] fart.") for(var/T in targets) for(var/mob/living/M in T) shake_camera(M, 10, 5) - if(M == user) + if(M == usr) continue to_chat(M, "You are sent flying!") M.Weaken(5) @@ -672,4 +677,4 @@ step_away(M, UT, 15) step_away(M, UT, 15) else - to_chat(user, "You were interrupted and couldn't fart! Rude!") + to_chat(usr, "You were interrupted and couldn't fart! Rude!") diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index ed18f2acb58..e159aa44247 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -302,12 +302,12 @@ if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab/)) to_chat(H, "Your mind is too busy with that telekinetic grab.") H.remoteview_target = null - H.reset_view(0) + H.reset_perspective(0) return if(H.client.eye != user.client.mob) H.remoteview_target = null - H.reset_view(0) + H.reset_perspective(0) return for(var/mob/living/L in targets) @@ -315,7 +315,7 @@ if(target) H.remoteview_target = target - H.reset_view(target) + H.reset_perspective(target) else H.remoteview_target = null - H.reset_view(0) + H.reset_perspective(0) diff --git a/code/game/gamemodes/changeling/powers/headcrab.dm b/code/game/gamemodes/changeling/powers/headcrab.dm index 07ae44d9a9a..4adbc39e7fc 100644 --- a/code/game/gamemodes/changeling/powers/headcrab.dm +++ b/code/game/gamemodes/changeling/powers/headcrab.dm @@ -17,11 +17,11 @@ for(var/mob/living/carbon/human/H in range(2,user)) to_chat(H, "You are blinded by a shower of blood!") H.Stun(1) - H.eye_blurry = max(20, H.eye_blurry) + H.EyeBlurry(20) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) E.damage = max(E.damage+5, 0) - H.confused += 3 + H.AdjustConfused(3) for(var/mob/living/silicon/S in range(2,user)) to_chat(S, "Your sensors are disabled by a shower of blood!") S.Weaken(3) @@ -37,4 +37,4 @@ to_chat(crab, "You burst out of the remains of your former body in a shower of gore!") user.gib() feedback_add_details("changeling_powers","LR") - return 1 \ No newline at end of file + return 1 diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index b6692817650..8cb58d8dbe0 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -5,10 +5,6 @@ //Revive from regenerative stasis /obj/effect/proc_holder/changeling/revive/sting_action(var/mob/living/carbon/user) - if(user.stat == DEAD) - dead_mob_list -= user - living_mob_list |= user - user.stat = CONSCIOUS user.setToxLoss(0) user.setOxyLoss(0) user.setCloneLoss(0) @@ -17,10 +13,14 @@ user.SetStunned(0) user.SetWeakened(0) user.radiation = 0 - user.eye_blind = 0 - user.eye_blurry = 0 - user.setEarDamage(0,0) + user.SetEyeBlind(0) + user.SetEyeBlurry(0) + user.SetEarDamage(0) + user.SetEarDeaf(0) user.heal_overall_damage(user.getBruteLoss(), user.getFireLoss()) + user.CureBlind() + user.CureDeaf() + user.CureNearsighted() user.reagents.clear_reagents() user.germ_level = 0 user.next_pain_time = 0 @@ -59,12 +59,13 @@ IO.damage = 0 IO.trace_chemicals = list() H.updatehealth() + to_chat(user, "We have regenerated.") user.regenerate_icons() user.status_flags &= ~(FAKEDEATH) - user.update_canmove() + user.update_revive() //Handle waking up the changeling after the regenerative stasis has completed. user.mind.changeling.purchasedpowers -= src user.med_hud_set_status() user.med_hud_set_health() diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 7babc2a5a62..5185b61e508 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -11,8 +11,8 @@ for(var/mob/living/M in get_mobs_in_view(4, user)) if(iscarbon(M)) if(!M.mind || !M.mind.changeling) - M.adjustEarDamage(0, 30) - M.confused += 20 + M.AdjustEarDeaf(30) + M.AdjustConfused(20) M.Jitter(50) else M << sound('sound/effects/screech.ogg') @@ -41,5 +41,3 @@ L.broken() empulse(get_turf(user), 2, 4, 1) return 1 - - diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index f4aa6f3d8f2..0df371009a8 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -153,7 +153,7 @@ obj/effect/proc_holder/changeling/sting/mute /obj/effect/proc_holder/changeling/sting/mute/sting_action(var/mob/user, var/mob/living/carbon/target) add_logs(user, target, "stung", object="mute sting") - target.silent += 30 + target.AdjustSilence(30) feedback_add_details("changeling_powers","MS") return 1 @@ -165,12 +165,12 @@ obj/effect/proc_holder/changeling/sting/blind chemical_cost = 25 dna_cost = 1 -/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/user, var/mob/target) +/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/living/user, var/mob/living/target) add_logs(user, target, "stung", object="blind sting") to_chat(target, "Your eyes burn horrifically!") - target.disabilities |= NEARSIGHTED - target.eye_blind = 20 - target.eye_blurry = 40 + target.BecomeNearsighted() + target.EyeBlind(20) + target.EyeBlurry(40) feedback_add_details("changeling_powers","BS") return 1 @@ -186,7 +186,7 @@ obj/effect/proc_holder/changeling/sting/LSD add_logs(user, target, "stung", object="LSD sting") spawn(rand(300,600)) if(target) - target.hallucination = max(400, target.hallucination) + target.Hallucinate(400) feedback_add_details("changeling_powers","HS") return 1 diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index c6d81a318cf..52f29f08f13 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -6,13 +6,20 @@ var/runedec = 0 var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide") /client/proc/check_words() // -- Urist - set category = "Special Verbs" + set category = "Admin" set name = "Check Rune Words" set desc = "Check the rune-word meaning" + + if(!check_rights(R_ADMIN)) + return + if(!cultwords["travel"]) runerandom() for(var/word in engwords) to_chat(usr, "[cultwords[word]] is [word]") + + log_and_message_admins("checked the rune words.") + feedback_add_details("admin_verb","CRW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/runerandom() //randomizes word meaning var/list/runewords=list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") ///"orkan" and "allaq" removed. @@ -102,6 +109,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", return return +// This is for the seer rune, so you don't get permanent ghost sight +/obj/effect/rune/Uncrossed(atom/movable/O) + if(isliving(O)) + var/mob/living/L = O + L.update_sight() /obj/effect/rune/proc/get_word_string() if(word1 == cultwords["travel"]) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 82ffcea9563..533da29f7cd 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -210,6 +210,8 @@ var/list/sacrificed = list() /obj/effect/rune/proc/seer() if(usr.loc==src.loc) + // No. Bad cultcode. Bad. + var/mob/living/carbon/human/H = usr if(usr.seer==1) usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.") to_chat(usr, "\red The world beyond fades from your vision.") @@ -224,6 +226,7 @@ var/list/sacrificed = list() to_chat(usr, "\red The world beyond opens to your eyes.") usr.see_invisible = SEE_INVISIBLE_OBSERVER usr.seer = 1 + H.update_sight() return return fizzle() @@ -840,7 +843,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.adjustEarDamage(0,50) + C.AdjustEarDeaf(50) C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ if(prob(1)) @@ -859,7 +862,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.adjustEarDamage(0,30) + C.AdjustEarDeaf(30) //talismans is weaker. C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ @@ -880,12 +883,12 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.eye_blurry += 50 - C.eye_blind += 20 + C.AdjustEyeBlurry(50) + C.AdjustEyeBlind(20) if(prob(5)) - C.disabilities |= NEARSIGHTED + C.BecomeNearsighted() if(prob(10)) - C.disabilities |= BLIND + C.BecomeBlind() C.show_message("\red Suddenly you see red flash that blinds you.", 3) affected++ if(affected) @@ -902,8 +905,8 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.eye_blurry += 30 - C.eye_blind += 10 + C.AdjustEyeBlurry(30) + C.AdjustEyeBlind(10) //talismans is weaker. affected++ C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3) @@ -1016,7 +1019,7 @@ var/list/sacrificed = list() var/mob/living/carbon/C = T C.flash_eyes() if(!(HULK in C.mutations)) - C.silent += 15 + C.AdjustSilence(15) C.Weaken(10) C.Stun(10) return diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm deleted file mode 100644 index d1fd034e312..00000000000 --- a/code/game/gamemodes/events.dm +++ /dev/null @@ -1,59 +0,0 @@ -/proc/alien_infestation(var/spawncount = 1) // -- TLE - //command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') - var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) - if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) - if(temp_vent.parent.other_atmosmch.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology - vents += temp_vent - - spawn() - var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 1) - - if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one - while((spawncount >= 1) && vents.len && candidates.len) - - var/obj/vent = pick(vents) - var/mob/candidate = pick(candidates) - var/client/C = candidate.client - if(C) - var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc) - new_xeno.key = C - respawnable_list -= C - candidates -= C - vents -= vent - spawncount-- - - spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes. - command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') - for(var/mob/M in player_list) - M << sound('sound/AI/aliens.ogg') - -/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights - if(isEvent) - command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") - - if(lightsoutAmount) - var/list/epicentreList = list() - - for(var/i=1,i<=lightsoutAmount,i++) - var/list/possibleEpicentres = list() - for(var/obj/effect/landmark/newEpicentre in landmarks_list) - if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList)) - possibleEpicentres += newEpicentre - if(possibleEpicentres.len) - epicentreList += pick(possibleEpicentres) - else - break - - if(!epicentreList.len) - return - - for(var/obj/effect/landmark/epicentre in epicentreList) - for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange)) - apc.overload_lighting() - - else - for(var/obj/machinery/power/apc/apc in apcs) - apc.overload_lighting() - - return diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 5deb2bafa0f..bc682a4f168 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -209,12 +209,9 @@ var/round_start_time = 0 //start_events() //handles random events and space dust. //new random event system is handled from the MC. - var/admins_number = 0 - for(var/client/C) - if(C.holder) - admins_number++ - if(admins_number == 0) - send2adminirc("Round has started with no admins online.") + var/list/admins_number = staff_countup(R_BAN) + if(admins_number[1] == 0 && admins_number[3] == 0) + send2irc(config.admin_notify_irc, "Round has started with no admins online.") auto_toggle_ooc(0) // Turn it off round_start_time = world.time @@ -414,7 +411,7 @@ var/round_start_time = 0 var/dat dat += {"Karma Reminder

Karma Reminder


You have not yet spent your karma for the round, surely there is a player who was worthy of receiving
- your reward? Look under 'Special Verbs' for the 'Award Karma' button, and use it once a round for best results!"} + your reward? Look under 'OOC' for the 'Award Karma' button, and use it once a round for best results!"} player << browse(dat, "window=karmareminder;size=400x300") diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 4d98876ccd6..29f217b44bc 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -466,7 +466,7 @@ Congratulations! You are now trained for xenobiology research!"} L.Sleeping(60) add_logs(user, L, "put to sleep") else - L.drowsyness += 1 + L.AdjustDrowsy(1) to_chat(user, "Sleep inducement works fully only on stunned specimens! ") L.visible_message("[user] tried to induce sleep in [L] with [src]!", \ "You suddenly feel drowsy!") diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 8a3fbd8ff60..b59f1fd8454 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -98,7 +98,7 @@ if(H == owner) continue to_chat(H, "You hear a buzz in your head.") - H.confused += 20 + H.AdjustConfused(20) /obj/item/organ/internal/gland/pop origin_tech = "materials=4;biotech=6;abductor=3" diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm index 8d6a3e08c2e..24b02aea489 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm @@ -76,10 +76,9 @@ origin.vest_mode_action.Remove(C) origin.vest_disguise_action.Remove(C) origin.set_droppoint_action.Remove(C) - remote_eye.user = null + remote_eye.eye_user = null + C.reset_perspective(null) if(C.client) - C.client.perspective = MOB_PERSPECTIVE - C.client.eye = src C.client.images -= remote_eye.user_image for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks) C.client.images -= chunk.obscured diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index aea520a48cc..755bd21e2e5 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -203,9 +203,6 @@ /obj/machinery/abductor/experiment/proc/eject_abductee() if(!occupant) return - if(occupant.client) - occupant.client.eye = occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(get_turf(src)) occupant = null - icon_state = "experiment-open" \ No newline at end of file + icon_state = "experiment-open" diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index e63221970c0..a074773932b 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -446,7 +446,7 @@ controlling = 0 - reset_view(null) + reset_perspective(null) machine = null host.verbs -= /mob/living/carbon/proc/release_control @@ -562,10 +562,10 @@ src.forceMove(get_turf(host)) - reset_view(null) + reset_perspective(null) machine = null - host.reset_view(null) + host.reset_perspective(null) host.machine = null var/mob/living/H = host diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 393b4677887..94a7895bf51 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -629,7 +629,8 @@ spawn(600) if(src) stored_obj.loc = get_turf(src.loc) - to_chat(spawner, "Failure! Your trap on \the [stored_obj] didn't catch anyone this time.") + if(spawner) + to_chat(spawner, "Failure! Your trap on \the [stored_obj] didn't catch anyone this time.") qdel(src) /obj/item/weapon/guardian_bomb/proc/detonate(var/mob/living/user) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 2d0d9028fe3..d93fc49c92d 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -253,7 +253,7 @@ to_chat(human, "You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].") human.adjustStaminaLoss(stamdamage) human.adjustToxLoss(toxdamage) - human.confused = min(human.confused+confusion, maxconfusion) + human.AdjustConfused(confusion, bound_lower = 0, bound_upper = maxconfusion) new/obj/effect/overlay/temp/revenant(human.loc) if(!istype(T, /turf/simulated/shuttle) && !istype(T, /turf/simulated/wall/rust) && !istype(T, /turf/simulated/wall/r_wall) && istype(T, /turf/simulated/wall) && prob(15)) new/obj/effect/overlay/temp/revenant(T) @@ -317,4 +317,4 @@ playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1) new/obj/effect/overlay/temp/revenant(S.loc) S.spark_system.start() - S.emp_act(1) \ No newline at end of file + S.emp_act(1) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index df30a2e6169..13219b46e10 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -144,22 +144,15 @@ proc/issyndicate(mob/living/M as mob) var/mob/living/carbon/human/M = synd_mind.current var/obj/item/organ/external/head/head_organ = M.get_organ("head") + M.mutations = list() + M.disabilities = 0 + M.overeatduration = 0 M.set_species("Human",1) M.dna.ready_dna(M) // Quadriplegic Nuke Ops won't be participating in the paralympics var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black - var/hair_style = "Bald" - var/facial_hair_style = "Shaved" - if(M.gender == MALE) - hair_style = pick(hair_styles_male_list) - facial_hair_style = pick(facial_hair_styles_list) - else - hair_style = pick(hair_styles_female_list) - if(prob(5)) - facial_hair_style = pick(facial_hair_styles_list) - head_organ.r_facial = color2R(hair_c) head_organ.g_facial = color2G(hair_c) head_organ.b_facial = color2B(hair_c) @@ -168,9 +161,11 @@ proc/issyndicate(mob/living/M as mob) head_organ.b_hair = color2B(hair_c) M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c)) M.s_tone = skin_tone - head_organ.h_style = hair_style - head_organ.f_style = facial_hair_style + head_organ.h_style = random_hair_style(M.gender, head_organ.species.name) + head_organ.f_style = random_facial_hair_style(M.gender, head_organ.species.name) M.body_accessory = null + M.regenerate_icons() + M.update_body() /datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code) var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord") diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index ba20d4dfff1..759fe0a04e9 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -177,6 +177,13 @@ var/bomb_set return /obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "nuclear_bomb.tmpl", "Nuke Control Panel", 450, 550, state = physical_state) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/nuclearbomb/ui_data(mob/user, datum/topic_state/state) var/data[0] data["is_syndicate"] = is_syndicate data["hacking"] = 0 @@ -203,12 +210,7 @@ var/bomb_set if(yes_code) data["message"] = "*****" - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "nuclear_bomb.tmpl", "Nuke Control Panel", 450, 550, state = physical_state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/nuclearbomb/verb/make_deployable() set category = "Object" diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index ee36a71a9cd..f118bf548f0 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -179,7 +179,7 @@ /obj/item/weapon/pinpointer/nukeop var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle var/obj/docking_port/mobile/home = null - slot_flags = SLOT_BELT + slot_flags = SLOT_BELT | SLOT_PDA /obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob) if(!active) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 83846818091..461fe0e4ca7 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -241,7 +241,7 @@ revolutionaries += rev_mind if(iscarbon(rev_mind.current)) var/mob/living/carbon/carbon_mob = rev_mind.current - carbon_mob.silent = max(carbon_mob.silent, 5) + carbon_mob.Silence(5) carbon_mob.flash_eyes(1, 1) rev_mind.current.Stun(5) to_chat(rev_mind.current, " You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!") diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 75e9730855e..cc910f18d79 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -46,7 +46,7 @@ else //Only alludes to the shadowling if the target is close by to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by the heavenly lights...") target.Stun(10) - M.silent += 10 + M.AdjustSilence(10) /obj/effect/proc_holder/spell/targeted/lesser_glare @@ -79,7 +79,7 @@ else to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by their heavenly beauty...") target.Stun(3) //Roughly 30% as long as the normal one - M.silent += 3 + M.AdjustSilence(3) /obj/effect/proc_holder/spell/aoe_turf/veil @@ -519,7 +519,7 @@ /datum/reagent/shadowling_blindness_smoke/on_mob_life(mob/living/M) if(!is_shadow_or_thrall(M)) to_chat(M, "You breathe in the black smoke, and your eyes burn horribly!") - M.eye_blind = 5 + M.EyeBlind(5) if(prob(25)) M.visible_message("[M] claws at their eyes!") M.Stun(3) @@ -556,8 +556,8 @@ if(iscarbon(target)) var/mob/living/carbon/M = target to_chat(M, "A spike of pain drives into your head and scrambles your thoughts!") - M.confused += 10 - M.setEarDamage(M.ear_damage + 3) + M.AdjustConfused(10) + M.AdjustEarDamage(3) else if(issilicon(target)) var/mob/living/silicon/S = target to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#") diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index dd40a6817b6..39c9c24ec50 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -242,6 +242,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha owner.mind.spell_list.Remove(ability) qdel(ability) +/datum/vampire/proc/update_owner(var/mob/living/carbon/human/current) //Called when a vampire gets cloned. This updates vampire.owner to the new body. + if(current.mind && current.mind.vampire && current.mind.vampire.owner && (current.mind.vampire.owner != current)) + current.mind.vampire.owner = current + /mob/proc/make_vampire() if(!mind) return @@ -325,8 +329,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha else if(istype(p, /datum/vampire_passive)) var/datum/vampire_passive/power = p to_chat(owner, "[power.gain_desc]") - - + /datum/game_mode/proc/remove_vampire(datum/mind/vampire_mind) if(vampire_mind in vampires) ticker.mode.vampires -= vampire_mind @@ -335,12 +338,12 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha if(vampire_mind.vampire) vampire_mind.vampire.remove_vampire_powers() qdel(vampire_mind.vampire) - vampire_mind.vampire = null + vampire_mind.vampire = null if(issilicon(vampire_mind.current)) to_chat(vampire_mind.current, "You have been turned into a robot! You can feel your powers fading away...") else to_chat(vampire_mind.current, "You have been brainwashed! You are no longer a vampire.") - ticker.mode.update_vampire_icons_removed(vampire_mind) + ticker.mode.update_vampire_icons_removed(vampire_mind) //prepare for copypaste /datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index eb3aed6485b..023fef59a7b 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -259,8 +259,8 @@ continue to_chat(C, "You hear a ear piercing shriek and your senses dull!") C.Weaken(4) - C.adjustEarDamage(0,20) - C.stuttering = 20 + C.AdjustEarDeaf(20) + C.Stuttering(20) C.Stun(4) C.Jitter(150) for(var/obj/structure/window/W in view(4)) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 8db8000c7fe..18cc1d64b7d 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -782,7 +782,7 @@ var/global/list/multiverse = list() else if(istype(I,/obj/item/weapon/bikehorn)) to_chat(target, "HONK") target << 'sound/items/AirHorn.ogg' - target.adjustEarDamage(0,3) + target.AdjustEarDeaf(3) GiveHint(target) cooldown = world.time +cooldown_time return @@ -817,11 +817,9 @@ var/global/list/multiverse = list() log_game("[user][user.key] made [target][target.key] say [wgw] with a voodoo doll.") if("eyes") user.set_machine(src) - if(user.client) - user.client.eye = target - user.client.perspective = EYE_PERSPECTIVE + user.reset_perspective(target) spawn(100) - user.reset_view() + user.reset_perspective(null) user.unset_machine() if("r_leg","l_leg") to_chat(user, "You move the doll's legs around.") diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 024865807bf..41cc9420327 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -747,7 +747,7 @@ /obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user as mob) ..() to_chat(user, "You go blind!") - user.eye_blind = 10 + user.EyeBlind(10) /obj/item/weapon/spellbook/oneuse/mindswap spell = /obj/effect/proc_holder/spell/targeted/mind_transfer diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 7f1a89ab0a4..8a8c7a04114 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -98,7 +98,18 @@ src.ui_interact(user) /obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 540, 300) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["on"] = on ? 1 : 0 data["gasPressure"] = round(air_contents.return_pressure()) @@ -117,19 +128,7 @@ else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100)) temp_class = "average" data["gasTemperatureClass"] = temp_class - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 540, 300) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list) if(..()) @@ -257,7 +256,18 @@ src.ui_interact(user) /obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 540, 300) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["on"] = on ? 1 : 0 data["gasPressure"] = round(air_contents.return_pressure()) @@ -274,19 +284,7 @@ if(air_contents.temperature > (T20C+40)) temp_class = "bad" data["gasTemperatureClass"] = temp_class - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 540, 300) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/atmospherics/unary/heat_reservoir/heater/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index e901a245bea..873b86d9400 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -96,12 +96,9 @@ user.visible_message("[user] climbs on the operating table.","You climb on the operating table.") else visible_message("[C] has been laid on the operating table by [user].") - if(C.client) - C.client.perspective = EYE_PERSPECTIVE - C.client.eye = src C.resting = 1 C.update_canmove() - C.loc = src.loc + C.forceMove(loc) if(user.pulling == C) user.stop_pulling() for(var/obj/O in src) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 60e650691e5..0e0067eafe9 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -135,6 +135,13 @@ ui_interact(user) /obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper", 550, 770) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/sleeper/ui_data(mob/user, datum/topic_state/state) var/data[0] data["hasOccupant"] = occupant ? 1 : 0 var/occupantData[0] @@ -229,13 +236,7 @@ chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("chemical" = temp.id), "occ_amount" = reagent_amount, "pretty_amount" = pretty_amount, "injectable" = injectable, "overdosing" = overdosing, "od_warning" = caution))) data["chemicals"] = chemicals - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper", 550, 770) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/sleeper/Topic(href, href_list) if(!controls_inside && usr == occupant) @@ -343,9 +344,6 @@ return if(!G || !G:affecting) return var/mob/M = G:affecting - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src M.forceMove(src) src.occupant = M src.icon_state = "[base_icon]" @@ -420,9 +418,6 @@ toggle_filter() if(!occupant) return - if(occupant.client) - occupant.client.eye = occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(loc) occupant = null icon_state = "[base_icon]-open" @@ -454,8 +449,10 @@ set name = "Eject Sleeper" set category = "Object" set src in oview(1) - if(usr.stat != 0) + + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return + src.icon_state = "[base_icon]-open" src.go_out() add_fingerprint(usr) @@ -465,8 +462,10 @@ set name = "Remove Beaker" set category = "Object" set src in oview(1) - if(usr.stat != 0) + + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return + if(beaker) filtering = 0 beaker.forceMove(usr.loc) @@ -517,10 +516,6 @@ to_chat(user, ">The sleeper is already occupied!") return if(!L) return - - if(L.client) - L.client.perspective = EYE_PERSPECTIVE - L.client.eye = src L.forceMove(src) src.occupant = L src.icon_state = "[base_icon]" @@ -546,7 +541,7 @@ if(panel_open) to_chat(usr, "Close the maintenance panel first.") return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return for(var/mob/living/carbon/slime/M in range(1,usr)) if(M.Victim == usr) @@ -558,8 +553,6 @@ to_chat(usr, "The sleeper is already occupied!") return usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src usr.forceMove(src) src.occupant = usr src.icon_state = "[base_icon]" @@ -590,4 +583,4 @@ component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() -#undef ADDICTION_SPEEDUP_TIME \ No newline at end of file +#undef ADDICTION_SPEEDUP_TIME diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 8ea98b53c8b..538e389c083 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -93,9 +93,6 @@ if(M.abiotic()) to_chat(user, "Subject cannot have abiotic items on.") return - /*if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src*///THIS IS FUCKING POINTLESS BECAUSE OF ON-LIFE() FUCKING RESET_VIEW() AHHHHHHHHHHGGGGGGGGGG M.forceMove(src) occupant = M icon_state = "body_scanner_1" @@ -159,9 +156,6 @@ /obj/machinery/bodyscanner/proc/go_out() if(!occupant || locked) return - if(occupant.client) - occupant.client.eye = occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(loc) occupant = null icon_state = "body_scanner_0" @@ -322,140 +316,142 @@ /obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/body_scanconsole/ui_data(mob/user, datum/topic_state/state) var/data[0] data["connected"] = connected ? 1 : 0 - if(connected) - data["occupied"] = connected.occupant ? 1 : 0 + if(!connected) + return data - var/occupantData[0] - if(connected.occupant) - var/mob/living/carbon/human/H = connected.occupant - occupantData["name"] = H.name - occupantData["stat"] = H.stat - occupantData["health"] = H.health - occupantData["maxHealth"] = H.maxHealth + data["occupied"] = connected.occupant ? 1 : 0 - occupantData["hasVirus"] = H.viruses.len + var/occupantData[0] + if(connected.occupant) + var/mob/living/carbon/human/H = connected.occupant + occupantData["name"] = H.name + occupantData["stat"] = H.stat + occupantData["health"] = H.health + occupantData["maxHealth"] = H.maxHealth - occupantData["bruteLoss"] = H.getBruteLoss() - occupantData["oxyLoss"] = H.getOxyLoss() - occupantData["toxLoss"] = H.getToxLoss() - occupantData["fireLoss"] = H.getFireLoss() + occupantData["hasVirus"] = H.viruses.len - occupantData["radLoss"] = H.radiation - occupantData["cloneLoss"] = H.getCloneLoss() - occupantData["brainLoss"] = H.getBrainLoss() - occupantData["paralysis"] = H.paralysis - occupantData["paralysisSeconds"] = round(H.paralysis / 4) - occupantData["bodyTempC"] = H.bodytemperature-T0C - occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32) + occupantData["bruteLoss"] = H.getBruteLoss() + occupantData["oxyLoss"] = H.getOxyLoss() + occupantData["toxLoss"] = H.getToxLoss() + occupantData["fireLoss"] = H.getFireLoss() - occupantData["hasBorer"] = H.has_brain_worms() + occupantData["radLoss"] = H.radiation + occupantData["cloneLoss"] = H.getCloneLoss() + occupantData["brainLoss"] = H.getBrainLoss() + occupantData["paralysis"] = H.paralysis + occupantData["paralysisSeconds"] = round(H.paralysis / 4) + occupantData["bodyTempC"] = H.bodytemperature-T0C + occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32) - var/bloodData[0] - bloodData["hasBlood"] = 0 - if(ishuman(H) && H.vessel && !(H.species && H.species.flags & NO_BLOOD)) - var/blood_type = H.get_blood_name() - var/blood_volume = round(H.vessel.get_reagent_amount(blood_type)) - bloodData["hasBlood"] = 1 - bloodData["volume"] = blood_volume - bloodData["percent"] = round(((blood_volume / BLOOD_VOLUME_NORMAL)*100)) - bloodData["pulse"] = H.get_pulse(GETPULSE_TOOL) - bloodData["bloodLevel"] = blood_volume - bloodData["bloodMax"] = H.max_blood - occupantData["blood"] = bloodData + occupantData["hasBorer"] = H.has_brain_worms() - var/implantData[0] - for(var/obj/item/weapon/implant/I in H) - if(I.implanted && is_type_in_list(I, known_implants)) - var/implantSubData[0] - implantSubData["name"] = sanitize(I.name) - implantData.Add(list(implantSubData)) - occupantData["implant"] = implantData - occupantData["implant_len"] = implantData.len + var/bloodData[0] + bloodData["hasBlood"] = 0 + if(ishuman(H) && H.vessel && !(H.species && H.species.flags & NO_BLOOD)) + var/blood_type = H.get_blood_name() + var/blood_volume = round(H.vessel.get_reagent_amount(blood_type)) + bloodData["hasBlood"] = 1 + bloodData["volume"] = blood_volume + bloodData["percent"] = round(((blood_volume / BLOOD_VOLUME_NORMAL)*100)) + bloodData["pulse"] = H.get_pulse(GETPULSE_TOOL) + bloodData["bloodLevel"] = blood_volume + bloodData["bloodMax"] = H.max_blood + occupantData["blood"] = bloodData - var/extOrganData[0] - for(var/obj/item/organ/external/E in H.organs) - var/organData[0] - organData["name"] = E.name - organData["open"] = E.open - organData["germ_level"] = E.germ_level - organData["bruteLoss"] = E.brute_dam - organData["fireLoss"] = E.burn_dam - organData["totalLoss"] = E.brute_dam + E.burn_dam - organData["maxHealth"] = E.max_damage - organData["bruised"] = E.min_bruised_damage - organData["broken"] = E.min_broken_damage + var/implantData[0] + for(var/obj/item/weapon/implant/I in H) + if(I.implanted && is_type_in_list(I, known_implants)) + var/implantSubData[0] + implantSubData["name"] = sanitize(I.name) + implantData.Add(list(implantSubData)) + occupantData["implant"] = implantData + occupantData["implant_len"] = implantData.len - var/shrapnelData[0] - for(var/obj/I in E.implants) - var/shrapnelSubData[0] - shrapnelSubData["name"] = I.name + var/extOrganData[0] + for(var/obj/item/organ/external/E in H.organs) + var/organData[0] + organData["name"] = E.name + organData["open"] = E.open + organData["germ_level"] = E.germ_level + organData["bruteLoss"] = E.brute_dam + organData["fireLoss"] = E.burn_dam + organData["totalLoss"] = E.brute_dam + E.burn_dam + organData["maxHealth"] = E.max_damage + organData["bruised"] = E.min_bruised_damage + organData["broken"] = E.min_broken_damage - shrapnelData.Add(list(shrapnelSubData)) + var/shrapnelData[0] + for(var/obj/I in E.implants) + var/shrapnelSubData[0] + shrapnelSubData["name"] = I.name - organData["shrapnel"] = shrapnelData - organData["shrapnel_len"] = shrapnelData.len + shrapnelData.Add(list(shrapnelSubData)) - var/organStatus[0] - if(E.status & ORGAN_DESTROYED) - organStatus["destroyed"] = 1 - if(E.status & ORGAN_BROKEN) - organStatus["broken"] = E.broken_description - if(E.status & ORGAN_ROBOT) - organStatus["robotic"] = 1 - if(E.status & ORGAN_SPLINTED) - organStatus["splinted"] = 1 - if(E.status & ORGAN_BLEEDING) - organStatus["bleeding"] = 1 - if(E.status & ORGAN_DEAD) - organStatus["dead"] = 1 + organData["shrapnel"] = shrapnelData + organData["shrapnel_len"] = shrapnelData.len - organData["status"] = organStatus + var/organStatus[0] + if(E.status & ORGAN_DESTROYED) + organStatus["destroyed"] = 1 + if(E.status & ORGAN_BROKEN) + organStatus["broken"] = E.broken_description + if(E.status & ORGAN_ROBOT) + organStatus["robotic"] = 1 + if(E.status & ORGAN_SPLINTED) + organStatus["splinted"] = 1 + if(E.status & ORGAN_BLEEDING) + organStatus["bleeding"] = 1 + if(E.status & ORGAN_DEAD) + organStatus["dead"] = 1 - if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured()) - organData["lungRuptured"] = 1 + organData["status"] = organStatus - for(var/datum/wound/W in E.wounds) - if(W.internal) - organData["internalBleeding"] = 1 - break + if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured()) + organData["lungRuptured"] = 1 - extOrganData.Add(list(organData)) + for(var/datum/wound/W in E.wounds) + if(W.internal) + organData["internalBleeding"] = 1 + break - occupantData["extOrgan"] = extOrganData + extOrganData.Add(list(organData)) - var/intOrganData[0] - for(var/obj/item/organ/internal/I in H.internal_organs) - var/organData[0] - organData["name"] = I.name - organData["desc"] = I.desc - organData["germ_level"] = I.germ_level - organData["damage"] = I.damage - organData["maxHealth"] = I.max_damage - organData["bruised"] = I.min_broken_damage - organData["broken"] = I.min_bruised_damage - organData["robotic"] = I.robotic - organData["dead"] = (I.status & ORGAN_DEAD) + occupantData["extOrgan"] = extOrganData - intOrganData.Add(list(organData)) + var/intOrganData[0] + for(var/obj/item/organ/internal/I in H.internal_organs) + var/organData[0] + organData["name"] = I.name + organData["desc"] = I.desc + organData["germ_level"] = I.germ_level + organData["damage"] = I.damage + organData["maxHealth"] = I.max_damage + organData["bruised"] = I.min_broken_damage + organData["broken"] = I.min_bruised_damage + organData["robotic"] = I.robotic + organData["dead"] = (I.status & ORGAN_DEAD) - occupantData["intOrgan"] = intOrganData + intOrganData.Add(list(organData)) - occupantData["blind"] = (H.disabilities & BLIND) - occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED) + occupantData["intOrgan"] = intOrganData - data["occupant"] = occupantData - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + occupantData["blind"] = (H.disabilities & BLIND) + occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED) + data["occupant"] = occupantData + return data /obj/machinery/body_scanconsole/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 5515eb7ab3a..79a423c70cf 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -696,8 +696,14 @@ data["danger"] = danger return data -/obj/machinery/alarm/proc/get_nano_data(mob/user, href_list) +/obj/machinery/alarm/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + var/list/href_list = state.href_list() + + if(href_list) + data["remote_connection"] = href_list["remote_connection"] + data["remote_access"] = href_list["remote_access"] + data["name"] = sanitize(name) data["air"] = ui_air_status() data["alarmActivated"] = alarmActivated || danger_level == 2 @@ -807,22 +813,9 @@ return thresholds /obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) - var/list/href = state.href_list(user) - var/remote_connection = 0 - var/remote_access = 0 - if(href) - remote_connection = href["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer - remote_access = href["remote_access"] // Remote access means we also have the privilege to alter the air alarm. - - var/list/data = get_nano_data(user, href) - - data["remote_connection"] = remote_connection - data["remote_access"] = remote_access - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "air_alarm.tmpl", name, 570, 410, state = state) - ui.set_initial_data(data) ui.open() ui.set_auto_update(1) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 7eb01d06988..a7d62d74b94 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -88,8 +88,8 @@ var/datum/canister_icons/canister_icon_container = new() "quart" = "none") oldcolor = new /list() decals = list("cold" = 0, "hot" = 0, "plasma" = 0) - colorcontainer = new /list(4) - possibledecals = new /list(3) + colorcontainer = list() + possibledecals = list() update_icon() /obj/machinery/portable_atmospherics/canister/proc/init_data_vars() @@ -123,7 +123,7 @@ var/datum/canister_icons/canister_icon_container = new() L.Add(list("anycolor" = 1)) colorcontainer[C] = L - possibledecals = new /list(3) + possibledecals = list() var/i var/list/L = canister_icon_container.possibledecals @@ -382,10 +382,23 @@ update_flag /obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob) return src.ui_interact(user) -/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state) if(src.destroyed) return + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400, state = state) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + + +/obj/machinery/portable_atmospherics/canister/ui_data(mob/user, datum/topic_state/state) init_data_vars() //set up var/colorcontainer and var/possibledecals // this is the data which will be sent to the ui @@ -394,8 +407,10 @@ update_flag data["menu"] = menu ? 1 : 0 data["canLabel"] = can_label ? 1 : 0 data["canister_color"] = canister_color - data["colorContainer"] = colorcontainer - data["possibleDecals"] = possibledecals + data["colorContainer"] = colorcontainer.Copy() + colorcontainer.Cut() + data["possibleDecals"] = possibledecals.Copy() + possibledecals.Cut() data["portConnected"] = connected_port ? 1 : 0 data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0) data["releasePressure"] = round(release_pressure ? release_pressure : 0) @@ -405,24 +420,9 @@ update_flag data["hasHoldingTank"] = holding ? 1 : 0 if(holding) - data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400, state = physical_state) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) - - //Disregard these, avoid cluttering up the VV window - colorcontainer = new /list(4) - possibledecals = new /list(3) + data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) + + return data /obj/machinery/portable_atmospherics/canister/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 9f716696591..8f7f6d72bb4 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -8,7 +8,7 @@ var/on = 0 var/direction_out = 0 //0 = siphoning, 1 = releasing var/target_pressure = 100 - + var/pressuremin = 0 var/pressuremax = 10 * ONE_ATMOSPHERE @@ -98,15 +98,27 @@ /obj/machinery/portable_atmospherics/pump/attack_ai(var/mob/user as mob) src.add_hiddenprint(user) return src.attack_hand(user) - + /obj/machinery/portable_atmospherics/pump/attack_ghost(var/mob/user as mob) return src.attack_hand(user) /obj/machinery/portable_atmospherics/pump/attack_hand(var/mob/user as mob) ui_interact(user) - -/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - var/list/data[0] + +/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state) + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 400, state = state) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/portable_atmospherics/pump/ui_data(mob/user, datum/topic_state/state = physical_state) + var/data[0] data["portConnected"] = connected_port ? 1 : 0 data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0) data["targetpressure"] = round(target_pressure) @@ -119,18 +131,7 @@ if(holding) data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0)) - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 400, state = physical_state) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/portable_atmospherics/pump/Topic(href, href_list) if(..()) @@ -155,4 +156,3 @@ update_icon() src.add_fingerprint(usr) - \ No newline at end of file diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 1fb0bdd1308..de5ac2dc49d 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -10,7 +10,7 @@ var/widenet = 0 //is this scrubber acting on the 3x3 area around it. volume = 750 - + var/minrate = 0//probably useless, but whatever var/maxrate = 10 * ONE_ATMOSPHERE @@ -52,7 +52,7 @@ if(istype(T)) for(var/turf/simulated/tile in T.GetAtmosAdjacentTurfs(alldir=1)) scrub(tile) - + /obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/turf/simulated/tile) var/datum/gas_mixture/environment if(holding) @@ -108,7 +108,7 @@ /obj/machinery/portable_atmospherics/scrubber/attack_ai(var/mob/user as mob) src.add_hiddenprint(user) return src.attack_hand(user) - + /obj/machinery/portable_atmospherics/scrubber/attack_ghost(var/mob/user as mob) return src.attack_hand(user) @@ -116,8 +116,20 @@ ui_interact(user) return -/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - var/list/data[0] +/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state) + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = state) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/portable_atmospherics/scrubber/ui_data(mob/user, datum/topic_state/state = physical_state) + var/data[0] data["portConnected"] = connected_port ? 1 : 0 data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0) data["rate"] = round(volume_rate) @@ -129,18 +141,7 @@ if(holding) data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0)) - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/portable_atmospherics/scrubber/Topic(href, href_list) if(..()) @@ -160,7 +161,7 @@ volume_rate = Clamp(volume_rate+diff, minrate, maxrate) src.add_fingerprint(usr) - + /obj/machinery/portable_atmospherics/scrubber/huge name = "Huge Air Scrubber" icon_state = "scrubber:0" @@ -172,7 +173,7 @@ var/global/gid = 1 var/id = 0 var/stationary = 0 - + /obj/machinery/portable_atmospherics/scrubber/huge/New() ..() id = gid @@ -207,7 +208,7 @@ else if((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) - + /obj/machinery/portable_atmospherics/scrubber/huge/stationary name = "Stationary Air Scrubber" - stationary = 1 \ No newline at end of file + stationary = 1 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 1270b782ecd..db616620244 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -92,7 +92,7 @@ for(var/mob/O in mob_list) if(O.client && O.client.eye == src) O.unset_machine() - O.reset_view(null) + O.reset_perspective(null) to_chat(O, "The screen bursts into static.") ..() @@ -279,7 +279,7 @@ for(var/mob/O in player_list) if(O.client && O.client.eye == src) O.unset_machine() - O.reset_view(null) + O.reset_perspective(null) to_chat(O, "The screen bursts into static.") /obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0) @@ -387,6 +387,20 @@ cam["z"] = 0 return cam +/obj/machinery/camera/get_remote_view_fullscreens(mob/user) + if(view_range == short_range) //unfocused + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) + +/obj/machinery/camera/update_remote_sight(mob/living/user) + user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras + if(isXRay()) + user.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + user.see_in_dark = max(user.see_in_dark, 8) + else + user.sight = 0 + user.see_in_dark = 2 + return 1 + /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index f07cd94438d..0e0eaaf6985 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -205,7 +205,7 @@ clonemind = locate(R.mind) if(!istype(clonemind)) //not a mind return 0 - if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body + if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body return 0 if(clonemind.active) //somebody is using that mind if(ckey(clonemind.key) != R.ckey) @@ -229,12 +229,21 @@ spawn(30) eject_wait = 0 + if(!R.dna) + R.dna = new /datum/dna() + var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species) occupant = H if(!R.dna.real_name) //to prevent null names - R.dna.real_name = "clone ([rand(0,999)])" - H.real_name = R.dna.real_name + R.dna.real_name = H.real_name + else + H.real_name = R.dna.real_name + + H.dna = R.dna.Clone() + + for(var/datum/language/L in R.languages) + H.add_language(L.name) //Get the clone body ready H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite @@ -247,6 +256,7 @@ if(grab_ghost_when == CLONER_FRESH_CLONE) clonemind.transfer_to(H) H.ckey = R.ckey + update_clone_antag(H) //Since the body's got the mind, update their antag stuff right now. Otherwise, wait until they get kicked out (as per the CLONER_MATURE_CLONE business) to do it. to_chat(H, {"Consciousness slowly creeps over you as your body regenerates.
So this is what cloning feels like?
"}) @@ -255,51 +265,23 @@ beginning to regenerate in a cloning pod. You will become conscious when it is complete."}) - // -- Mode/mind specific stuff goes here - callHook("clone", list(H)) + domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them - if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries)) - ticker.mode.update_rev_icons_added() //So the icon actually appears - if(H.mind in ticker.mode.syndicates) - ticker.mode.update_synd_icons_added() - if(H.mind in ticker.mode.cult) - ticker.mode.add_cult_viewpoint(H) - ticker.mode.add_cultist(occupant.mind) - ticker.mode.update_cult_icons_added() //So the icon actually appears - if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) - ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears - if(("\ref[H.mind]" in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled)) - ticker.mode.update_vampire_icons_added(H.mind) - if(("\ref[H.mind]" in ticker.mode.shadowling_thralls) || (H.mind in ticker.mode.shadows)) - ticker.mode.update_shadow_icons_added(H.mind) - - // -- End mode specific stuff - - if(!R.dna) - H.dna = new /datum/dna() - H.dna.real_name = H.real_name - H.dna.ready_dna(H) - else - H.dna = R.dna.Clone() if(efficiency > 2 && efficiency < 5 && prob(25)) randmutb(H) if(efficiency > 5 && prob(20)) randmutg(H) if(efficiency < 3 && prob(50)) randmutb(H) + H.dna.UpdateSE() H.dna.UpdateUI() - H.set_species(R.dna.species) H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it H.UpdateAppearance() - H.update_body() update_icon() - for(var/datum/language/L in R.languages) - H.add_language(L.name) - H.suiciding = 0 attempting = 0 return 1 @@ -420,6 +402,28 @@ locked = 0 go_out() +/obj/machinery/clonepod/proc/update_clone_antag(var/mob/living/carbon/human/H) + // Check to see if the clone's mind is an antagonist of any kind and handle them accordingly to make sure they get their spells, HUD/whatever else back. + callHook("clone", list(H)) + if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries)) + ticker.mode.update_rev_icons_added() //So the icon actually appears + if(H.mind in ticker.mode.syndicates) + ticker.mode.update_synd_icons_added() + if(H.mind in ticker.mode.cult) + ticker.mode.add_cult_viewpoint(H) + ticker.mode.add_cultist(occupant.mind) + ticker.mode.update_cult_icons_added() //So the icon actually appears + if((H.mind in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) + ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears + if(H.mind.vampire) + H.mind.vampire.update_owner(H) + if((H.mind in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled)) + ticker.mode.update_vampire_icons_added(H.mind) + if(H.mind in ticker.mode.changelings) + ticker.mode.update_change_icons_added(H.mind) + if((H.mind in ticker.mode.shadowling_thralls) || (H.mind in ticker.mode.shadows)) + ticker.mode.update_shadow_icons_added(H.mind) + //Put messages in the connected computer's temp var for display. /obj/machinery/clonepod/proc/connected_message(message) if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning))) @@ -461,6 +465,7 @@ if(grab_ghost_when == CLONER_MATURE_CLONE) clonemind.transfer_to(occupant) occupant.grab_ghost() + update_clone_antag(occupant) to_chat(occupant, "There is a bright flash!
\ You feel like a new being.
") occupant.flash_eyes(visual = 1) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index eafdbe893ab..aa834941d78 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -553,8 +553,8 @@ to_chat(user, "The device is a solid button, there's nothing you can do with it!") /obj/machinery/readybutton/attack_hand(mob/user as mob) - if(user.stat || stat & (NOPOWER|BROKEN)) - to_chat(user, "This device is not powered.") + if(user.stat || stat & (BROKEN)) + to_chat(user, "This device is not functioning.") return currentarea = get_area(src.loc) diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 08e3677b039..1c40370f56d 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -86,6 +86,13 @@ // onclose(user, "op") /obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)//ui is mostly copy pasta from the sleeper ui + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "op_computer.tmpl", "Patient Monitor", 650, 455) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/operating/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/mob/living/carbon/human/occupant = src.table.victim data["hasOccupant"] = occupant ? 1 : 0 @@ -156,15 +163,7 @@ data["healthAlarm"]=healthAlarm data["oxy"]=oxy - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "op_computer.tmpl", "Patient Monitor", 650, 455) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - - - + return data /obj/machinery/computer/operating/Topic(href, href_list) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 097efa2c75c..539edb24d65 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -33,6 +33,14 @@ to_chat(user, "You have been locked out from this console!") /obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + + if(!ui) + ui = new(user, src, ui_key, "ai_fixer.tmpl", "AI System Integrity Restorer", 550, 500) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/aifixer/ui_data(mob/user, datum/topic_state/state) var/data[0] if(occupant) data["occupant"] = occupant.name @@ -49,13 +57,7 @@ data["laws"] = laws - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "ai_fixer.tmpl", "AI System Integrity Restorer", 550, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/aifixer/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 65a1730bacd..603c0483129 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -448,7 +448,7 @@ if(ORION_TRAIL_RAIDERS) if(prob(50)) to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") - M.hallucination += 30 + M.AdjustHallucinate(30) else to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") M.take_organ_damage(30) @@ -930,7 +930,8 @@ if(specific && specific != dont_remove) safe2remove = list(specific) else - removed = pick(safe2remove) + if(safe2remove.len >= 1) //need to make sure we even have anyone to remove + removed = pick(safe2remove) if(removed) if(lings_aboard && prob(40*lings_aboard)) //if there are 2 lings you're twice as likely to get one, obviously diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index cecf755b37d..ea53374970a 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -24,6 +24,13 @@ var/global/list/minor_air_alarms = list() ui_interact(user) /obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/atmos_alert/ui_data(mob/user, datum/topic_state/state) var/data[0] var/major_alarms[0] var/minor_alarms[0] @@ -37,12 +44,7 @@ var/global/list/minor_air_alarms = list() data["priority_alarms"] = major_alarms data["minor_alarms"] = minor_alarms - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/atmos_alert/update_icon() var/list/alarms = atmosphere_alarm.major_alarms() diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index b17a9a37aab..0c09bc5f2c5 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -287,7 +287,7 @@ /obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I,/obj/item/device/multitool)) - var/catastasis = src.contraband_enabled + var/catastasis = contraband_enabled var/opposite_catastasis if(catastasis) opposite_catastasis = "STANDARD" @@ -297,9 +297,9 @@ catastasis = "STANDARD" switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") ) - //switch( alert("Current receiver spectrum is set to: " {(src.contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(src.contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") ) + //switch( alert("Current receiver spectrum is set to: " {(contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") ) if("Switch to STANDARD","Switch to BROAD") - src.contraband_enabled = !src.contraband_enabled + contraband_enabled = !contraband_enabled if("Cancel") return @@ -345,97 +345,110 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20, target = src)) - to_chat(user, "\blue You wrench the frame into place.") - src.anchored = 1 - src.state = 1 + to_chat(user, "You wrench the frame into place.") + anchored = 1 + state = 1 if(istype(P, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = P if(!WT.remove_fuel(0, user)) - to_chat(user, "The welding tool must be on to complete this task.") + to_chat(user, "The welding tool must be on to complete this task.") return - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + playsound(loc, 'sound/items/Welder.ogg', 50, 1) if(do_after(user, 20, target = src)) if(!src || !WT.isOn()) return - to_chat(user, "\blue You deconstruct the frame.") - new /obj/item/stack/sheet/metal( src.loc, 5 ) + to_chat(user, "You deconstruct the frame.") + new /obj/item/stack/sheet/metal(loc, 5) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20, target = src)) - to_chat(user, "\blue You unfasten the frame.") - src.anchored = 0 - src.state = 0 + to_chat(user, "You unfasten the frame.") + anchored = 0 + state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "computer") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - to_chat(user, "\blue You place the circuit board inside the frame.") - src.icon_state = "1" - src.circuit = P + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You place the circuit board inside the frame.") + icon_state = "1" + circuit = P user.drop_item() P.loc = src else - to_chat(user, "\red This frame does not accept circuit boards of this type!") + to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You screw the circuit board into place.") - src.state = 2 - src.icon_state = "2" + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You screw the circuit board into place.") + state = 2 + icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - to_chat(user, "\blue You remove the circuit board.") - src.state = 1 - src.icon_state = "0" - circuit.loc = src.loc - src.circuit = null + playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + to_chat(user, "You remove the circuit board.") + state = 1 + icon_state = "0" + circuit.loc = loc + circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You unfasten the circuit board.") - src.state = 1 - src.icon_state = "1" + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You unfasten the circuit board.") + state = 1 + icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) - if(P:amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + var/obj/item/stack/cable_coil/C = P + if(C.amount >= 5) + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You start to add cables to the frame.") if(do_after(user, 20, target = src)) - if(P) - P:amount -= 5 - if(!P:amount) qdel(P) - to_chat(user, "\blue You add cables to the frame.") - src.state = 3 - src.icon_state = "3" + if(state == 2 && C.amount >= 5 && C.use(5)) + to_chat(user, "You add cables to the frame.") + state = 3 + icon_state = "3" + else + to_chat(user, "At some point during construction you lost some cable. Make sure you have five lengths before trying again.") + return + else + to_chat(user, "You need five lengths of cable to wire the frame.") + return if(3) if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - to_chat(user, "\blue You remove the cables.") - src.state = 2 - src.icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) + playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + to_chat(user, "You remove the cables.") + state = 2 + icon_state = "2" + var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) A.amount = 5 if(istype(P, /obj/item/stack/sheet/glass)) - if(P:amount >= 2) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + var/obj/item/stack/sheet/glass/G = P + if(G.amount >= 2) + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You start to add the glass panel to the frame.") if(do_after(user, 20, target = src)) - if(P) - P:use(2) - to_chat(user, "\blue You put in the glass panel.") - src.state = 4 - src.icon_state = "4" + if(state == 3 && G.amount >= 2 && G.use(2)) + to_chat(user, "You put in the glass panel.") + state = 4 + icon_state = "4" + else + to_chat(user, "At some point during construction you lost some glass. Make sure you have two sheets before trying again.") + return + else + to_chat(user, "You need two sheets of glass for this.") + return if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - to_chat(user, "\blue You remove the glass panel.") - src.state = 3 - src.icon_state = "3" - new /obj/item/stack/sheet/glass( src.loc, 2 ) + playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + to_chat(user, "You remove the glass panel.") + state = 3 + icon_state = "3" + new /obj/item/stack/sheet/glass(loc, 2) if(istype(P, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You connect the monitor.") - var/B = new src.circuit.build_path ( src.loc ) + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You connect the monitor.") + var/B = new circuit.build_path (loc) if(circuit.powernet) B:powernet = circuit.powernet if(circuit.id) B:id = circuit.id if(circuit.records) B:records = circuit.records @@ -456,97 +469,110 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20, target = src)) - to_chat(user, "\blue You wrench the frame into place.") - src.anchored = 1 - src.state = 1 + to_chat(user, "You wrench the frame into place.") + anchored = 1 + state = 1 if(istype(P, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = P if(!WT.remove_fuel(0, user)) - to_chat(user, "The welding tool must be on to complete this task.") + to_chat(user, "The welding tool must be on to complete this task.") return - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + playsound(loc, 'sound/items/Welder.ogg', 50, 1) if(do_after(user, 20, target = src)) if(!src || !WT.isOn()) return - to_chat(user, "\blue You deconstruct the frame.") - new /obj/item/stack/sheet/mineral/bananium( src.loc, 5 ) + to_chat(user, "You deconstruct the frame.") + new /obj/item/stack/sheet/mineral/bananium(loc, 5) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20, target = src)) - to_chat(user, "\blue You unfasten the frame.") - src.anchored = 0 - src.state = 0 + to_chat(user, "You unfasten the frame.") + anchored = 0 + state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "honkcomputer") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - to_chat(user, "\blue You place the circuit board inside the frame.") - src.icon_state = "1" - src.circuit = P + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You place the circuit board inside the frame.") + icon_state = "1" + circuit = P user.drop_item() P.loc = src else - to_chat(user, "\red This frame does not accept circuit boards of this type!") + to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You screw the circuit board into place.") - src.state = 2 - src.icon_state = "2" + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You screw the circuit board into place.") + state = 2 + icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - to_chat(user, "\blue You remove the circuit board.") - src.state = 1 - src.icon_state = "0" - circuit.loc = src.loc - src.circuit = null + playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + to_chat(user, "You remove the circuit board.") + state = 1 + icon_state = "0" + circuit.loc = loc + circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You unfasten the circuit board.") - src.state = 1 - src.icon_state = "1" + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You unfasten the circuit board.") + state = 1 + icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) - if(P:amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + var/obj/item/stack/cable_coil/C = P + if(C.amount >= 5) + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You start to add cables to the frame.") if(do_after(user, 20, target = src)) - if(P) - P:amount -= 5 - if(!P:amount) qdel(P) - to_chat(user, "\blue You add cables to the frame.") - src.state = 3 - src.icon_state = "3" + if(state == 2 && C.amount >= 5 && C.use(5)) + to_chat(user, "You add cables to the frame.") + state = 3 + icon_state = "3" + else + to_chat(user, "At some point during construction you lost some cable. Make sure you have five lengths before trying again.") + return + else + to_chat(user, "You need five lengths of cable to wire the frame.") + return if(3) if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - to_chat(user, "\blue You remove the cables.") - src.state = 2 - src.icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) + playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + to_chat(user, "You remove the cables.") + state = 2 + icon_state = "2" + var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) A.amount = 5 if(istype(P, /obj/item/stack/sheet/glass)) - if(P:amount >= 2) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + var/obj/item/stack/sheet/glass/G = P + if(G.amount >= 2) + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You start to add the glass panel to the frame.") if(do_after(user, 20, target = src)) - if(P) - P:use(2) - to_chat(user, "\blue You put in the glass panel.") - src.state = 4 - src.icon_state = "4" + if(state == 3 && G.amount >= 2 && G.use(2)) + to_chat(user, "You put in the glass panel.") + state = 4 + icon_state = "4" + else + to_chat(user, "At some point during construction you lost some glass. Make sure you have two sheets before trying again.") + return + else + to_chat(user, "You need two sheets of glass for this.") + return if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - to_chat(user, "\blue You remove the glass panel.") - src.state = 3 - src.icon_state = "3" - new /obj/item/stack/sheet/glass( src.loc, 2 ) + playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + to_chat(user, "You remove the glass panel.") + state = 3 + icon_state = "3" + new /obj/item/stack/sheet/glass(loc, 2) if(istype(P, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - to_chat(user, "\blue You connect the monitor.") - var/B = new src.circuit.build_path ( src.loc ) + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + to_chat(user, "You connect the monitor.") + var/B = new circuit.build_path (loc) if(circuit.powernet) B:powernet = circuit.powernet if(circuit.id) B:id = circuit.id if(circuit.records) B:records = circuit.records diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 97a976ddc41..57718687660 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -45,7 +45,7 @@ /obj/machinery/computer/security/check_eye(var/mob/user as mob) if((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon))) return null - user.reset_view(current) + user.reset_perspective(current) return 1 // Network configuration @@ -70,6 +70,17 @@ if(user.stat) return + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800) + // adding a template with the key "mapContent" enables the map ui functionality + ui.add_template("mapContent", "sec_camera_map_content.tmpl") + // adding a template with the key "mapHeader" replaces the map header content + ui.add_template("mapHeader", "sec_camera_map_header.tmpl") + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/security/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["current"] = null @@ -115,18 +126,7 @@ if(current) data["current"] = current.nano_structure() - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800) - - // adding a template with the key "mapContent" enables the map ui functionality - ui.add_template("mapContent", "sec_camera_map_content.tmpl") - // adding a template with the key "mapHeader" replaces the map header content - ui.add_template("mapHeader", "sec_camera_map_header.tmpl") - - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/security/Topic(href, href_list) if(..()) @@ -138,10 +138,10 @@ var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras if(!C) return 1 - + if(!can_access_camera(C)) return 1 // No href exploits for you. - + switch_to_camera(usr, C) else if(href_list["reset"]) diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 0a84ee81821..3d1df935cf8 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -20,7 +20,7 @@ jump_action.Grant(user) /obj/machinery/computer/camera_advanced/check_eye(mob/user) - if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || user.eye_blind || user.incapacitated()) + if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.has_vision() || user.incapacitated()) user.unset_machine() return 0 return 1 @@ -41,61 +41,73 @@ return if(!iscarbon(user)) return - var/mob/living/carbon/L = user - - if(!current_user) - user.set_machine(src) - if(!eyeobj) - CreateEye() - GrantActions(user) - current_user = user - eyeobj.user = user - eyeobj.name = "Camera Eye ([user.name])" - L.remote_view = 1 - L.remote_control = eyeobj - L.client.perspective = EYE_PERSPECTIVE - if(!eyeobj.initialized) - for(var/obj/machinery/camera/C in cameranet.cameras) - if(!C.can_use()) - continue - if(C.network&networks) - eyeobj.setLoc(get_turf(C)) - break - eyeobj.initialized = 1 - else - eyeobj.setLoc(eyeobj.loc) - else + if(current_user) to_chat(user, "The console is already in use!") + return + + user.set_machine(src) + if(!eyeobj) + CreateEye() + if(!eyeobj.initialized) + var/camera_location + for(var/obj/machinery/camera/C in cameranet.cameras) + if(!C.can_use()) + continue + if(C.network&networks) + camera_location = get_turf(C) + break + if(camera_location) + eyeobj.initialized = 1 + give_eye_control(user) + eyeobj.setLoc(camera_location) + else + // An abberant case - silent failure is obnoxious + to_chat(user, "ERROR: No linked and active camera network found.") + user.unset_machine() + else + give_eye_control(user) + + +/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user) + GrantActions(user) + current_user = user + eyeobj.eye_user = user + eyeobj.name = "Camera Eye ([user.name])" + // This should be able to be excised once the full view refactor rolls out + user.remote_view = 1 + user.remote_control = eyeobj + user.reset_perspective(eyeobj) + eyeobj.setLoc(eyeobj.loc) /mob/camera/aiEye/remote name = "Inactive Camera Eye" var/sprint = 10 var/cooldown = 0 var/acceleration = 1 - var/mob/living/carbon/human/user = null + var/mob/living/carbon/human/eye_user = null var/obj/machinery/computer/camera_advanced/origin var/initialized = 0 var/visible_icon = 0 var/image/user_image = null /mob/camera/aiEye/remote/GetViewerClient() - if(user) - return user.client + if(eye_user) + return eye_user.client return null /mob/camera/aiEye/remote/setLoc(T) - if(user) - if(!isturf(user.loc)) + if(eye_user) + if(!isturf(eye_user.loc)) return T = get_turf(T) loc = T cameranet.visibility(src) - if(user.client) + if(eye_user.client) if(visible_icon) - user.client.images -= user_image + eye_user.client.images -= user_image user_image = image(icon,loc,icon_state,FLY_LAYER) - user.client.images += user_image - user.client.eye = src + eye_user.client.images += user_image + eye_user.client.eye = src /mob/camera/aiEye/remote/relaymove(mob/user,direct) var/initial = initial(sprint) @@ -127,10 +139,9 @@ C.remote_view = 0 remote_eye.origin.current_user = null remote_eye.origin.jump_action.Remove(C) - remote_eye.user = null + remote_eye.eye_user = null + C.reset_perspective(null) if(C.client) - C.client.perspective = MOB_PERSPECTIVE - C.client.eye = src C.client.images -= remote_eye.user_image for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks) C.client.images -= chunk.obscured @@ -167,4 +178,4 @@ var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T var/obj/machinery/camera/final = T[camera] if(final) - remote_eye.setLoc(get_turf(final)) \ No newline at end of file + remote_eye.setLoc(get_turf(final)) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 7e78232de4d..a33d3aa02eb 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -173,9 +173,15 @@ var/time_last_changed_position = 0 ui_interact(user) -/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/computer/card/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700) + ui.open() + +/obj/machinery/computer/card/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["src"] = UID() data["station_name"] = station_name() @@ -242,11 +248,7 @@ var/time_last_changed_position = 0 data["regions"] = regions - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/card/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 4afe9ba3cff..847f20a3f23 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -120,6 +120,14 @@ /obj/machinery/computer/cloning/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & (NOPOWER|BROKEN)) return + + // Set up the Nano UI + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 520) + ui.open() + +/obj/machinery/computer/cloning/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["menu"] = src.menu data["scanner"] = sanitize("[src.scanner]") @@ -175,12 +183,7 @@ else data["podready"] = 0 - // Set up the Nano UI - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 520) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/cloning/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 01608efedcb..f7ee5908824 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -69,14 +69,14 @@ var/list/access = usr.get_access() if(allowed(usr)) authenticated = COMM_AUTHENTICATION_MIN - + if(access_captain in access) authenticated = COMM_AUTHENTICATION_MAX var/mob/living/carbon/human/H = usr var/obj/item/weapon/card/id = H.get_idcard(TRUE) if(istype(id)) crew_announcement.announcer = GetNameAndAssignmentFromId(id) - + nanomanager.update_uis(src) return @@ -313,7 +313,16 @@ ui_interact(user) /obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500) + // open the new ui window + ui.open() + +/obj/machinery/computer/communications/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["is_ai"] = isAI(user)||isrobot(user) data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state @@ -377,16 +386,8 @@ else data["dock_request"] = 0 - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() + return data + /obj/machinery/computer/communications/proc/setCurrentMessage(var/mob/user,var/value) if(isAI(user) || isrobot(user)) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index a3bd840750e..b8b2629b22b 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -145,7 +145,7 @@ if(!auth) dat += "

Please authenticate with the server in order to show additional options." else - dat += "

Reg, #514 forbids sending messages to a Head of Staff containing Erotic Rendering Properties." + dat += "

Reg, #514 forbids sending messages containing Erotic Rendering Properties." //Message Logs if(1) diff --git a/code/game/machinery/computer/pod_tracking_console.dm b/code/game/machinery/computer/pod_tracking_console.dm index cf16c34e04d..8664d786a24 100644 --- a/code/game/machinery/computer/pod_tracking_console.dm +++ b/code/game/machinery/computer/pod_tracking_console.dm @@ -14,6 +14,13 @@ ui_interact(user) /obj/machinery/computer/podtracker/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "pod_tracking.tmpl", "Pod Tracking Console", 400, 500) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/podtracker/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/list/pods[0] for(var/obj/item/device/spacepod_equipment/misc/tracker/TR in world) @@ -33,14 +40,7 @@ pods.Add(list(list("pod" = "\ref[my_pod]", "name" = podname) + chairs + list("x" = my_pod.x, "y" = my_pod.y, "z" = my_pod.z))) data["pods"] = pods - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "pod_tracking.tmpl", "Pod Tracking Console", 400, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/podtracker/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 160fbeb9827..6f7e3391457 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -35,6 +35,13 @@ return 0 /obj/machinery/computer/robotics/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/robotics/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/list/robots = get_cyborgs(user) if(robots.len) @@ -43,14 +50,7 @@ // Also applies for cyborgs. Hides the manual self-destruct button. data["is_ai"] = issilicon(user) data["allowed"] = is_authenticated(user) - - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/robotics/Topic(href, href_list) if(..()) @@ -242,4 +242,4 @@ return for(var/mob/living/silicon/robot/R in mob_list) if(R.name == name) - return R \ No newline at end of file + return R diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 2c6740ffbb3..d7384290164 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -69,21 +69,23 @@ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) to_chat(user, "You start to add cables to the frame.") if(do_after(user, 20, target = src)) - if(C.amount >= 5 && state == 1) - C.use(5) + if(state == 1 && C.amount >= 5 && C.use(5)) to_chat(user, "You add cables to the frame.") state = 2 icon_state = "box_1" + else + to_chat(user, "At some point during construction you lost some cable. Make sure you have five lengths before trying again.") + return else - to_chat(user, "You need five length of cable to wire the frame.") + to_chat(user, "You need five lengths of cable to wire the frame.") return else if(istype(P, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = P - if(G.amount<5) - to_chat(user, "\red You do not have enough glass to build a display case.") + if(G.amount < 5) + to_chat(user, "You do not have enough glass to build a display case.") return G.use(5) - to_chat(user, "\blue You add the glass to the frame.") + to_chat(user, "You add the glass to the frame.") playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) new /obj/structure/displaycase_frame(src.loc) qdel(src) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6dd6182c930..f42650a8e86 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -80,10 +80,10 @@ beaker = null return ..() -/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) +/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/living/user as mob) if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return @@ -122,7 +122,7 @@ ..() if(autoeject) if(occupant) - if(occupant.health >= 100) + if(!occupant.has_organic_damage()) on = 0 go_out() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) @@ -179,7 +179,18 @@ * @return nothing */ /obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/atmospherics/unary/cryo_cell/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["isOperating"] = on data["hasOccupant"] = occupant ? 1 : 0 @@ -206,13 +217,6 @@ data["cellTemperatureStatus"] = "average" data["isBeakerLoaded"] = beaker ? 1 : 0 - /* // Removing beaker contents list from front-end, replacing with a total remaining volume - var beakerContents[0] - if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list... - data["beakerContents"] = beakerContents - */ data["beakerLabel"] = null data["beakerVolume"] = 0 if(beaker) @@ -222,19 +226,7 @@ data["beakerVolume"] += R.volume data["autoeject"] = autoeject - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list) if(usr == occupant) @@ -371,7 +363,7 @@ occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature)*current_heat_capacity/(current_heat_capacity + air_contents.heat_capacity()) occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise if(occupant.bodytemperature < T0C) - occupant.sleeping = max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency) + occupant.Sleeping(max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency)) occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency)) if(air_contents.oxygen > 2) if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1) @@ -385,8 +377,11 @@ var/heal_fire = occupant.getFireLoss() ? min(efficiency, 20*(efficiency**2) / occupant.getFireLoss()) : 0 occupant.heal_organ_damage(heal_brute,heal_fire) if(beaker && next_trans == 0) + var/proportion = 10 * min(1/beaker.volume, 1) + // Yes, this means you can get more bang for your buck with a beaker of SF vs a patch + // But it also means a giant beaker of SF won't heal people ridiculously fast 4 cheap + beaker.reagents.reaction(occupant, TOUCH, proportion) beaker.reagents.trans_to(occupant, 1, 10) - beaker.reagents.reaction(occupant) next_trans++ if(next_trans == 10) next_trans = 0 @@ -403,9 +398,6 @@ /obj/machinery/atmospherics/unary/cryo_cell/proc/go_out() if(!occupant) return - if(occupant.client) - occupant.client.eye = occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem. if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected occupant.bodytemperature = 261 @@ -428,9 +420,6 @@ if(!node) to_chat(usr, "\red The cell is not correctly connected to its pipe network!") return - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src M.stop_pulling() M.forceMove(src) if(M.health > -100 && (M.health < 0 || M.sleeping)) @@ -446,16 +435,17 @@ set name = "Eject occupant" set category = "Object" set src in oview(1) + if(usr == occupant)//If the user is inside the tube... - if(usr.stat == 2)//and he's not dead.... + if(usr.stat == DEAD) return - to_chat(usr, "\blue Release sequence activated. This will take two minutes.") + to_chat(usr, "Release sequence activated. This will take two minutes.") sleep(600) if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already return go_out()//and release him from the eternal prison. else - if(usr.stat != 0) + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return go_out() add_fingerprint(usr) @@ -465,14 +455,18 @@ set name = "Move Inside" set category = "Object" set src in oview(1) + for(var/mob/living/carbon/slime/M in range(1,usr)) if(M.Victim == usr) to_chat(usr, "You're too busy getting your life sucked out of you.") return - if(usr.stat != 0 || stat & (NOPOWER|BROKEN)) + + if(stat & (NOPOWER|BROKEN)) return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return + put_mob(usr) return @@ -486,3 +480,9 @@ /datum/data/function/proc/display() return + +/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user) + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1) + +/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user) + return //we don't see the pipe network while inside cryo. diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9ffec3cb02c..e48a5f44b32 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -442,11 +442,7 @@ to_chat(user, "\The [src] is in use.") return - M.loc = src - - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src + M.forceMove(src) time_till_despawn = initial(time_till_despawn) / willing @@ -485,7 +481,7 @@ if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return @@ -540,12 +536,8 @@ if(src.occupant) to_chat(user, "\The [src] is in use.") return - L.loc = src + L.forceMove(src) time_till_despawn = initial(time_till_despawn) / willing - - if(L.client) - L.client.perspective = EYE_PERSPECTIVE - L.client.eye = src else to_chat(user, "You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]") return @@ -637,9 +629,7 @@ return usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src + usr.forceMove(src) src.occupant = usr time_till_despawn = initial(time_till_despawn) / willing_time_divisor @@ -662,11 +652,7 @@ if(!occupant) return - if(occupant.client) - occupant.client.eye = src.occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE - - occupant.loc = get_turf(src) + occupant.forceMove(get_turf(src)) occupant = null if(orient_right) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 23e25bb836a..433f23a592b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -481,7 +481,8 @@ About the new airlock wires panel: shockedby += text("\[[time_stamp()]\] - EMP)") message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." electrified_until = duration == -1 ? -1 : world.time + SecondsToTicks(duration) - electrified_timer = addtimer(src, "electrify", SecondsToTicks(duration), 1, 0) + if(duration != -1) + electrified_timer = addtimer(src, "electrify", SecondsToTicks(duration), 1, 0) if(feedback && message) to_chat(usr, message) @@ -559,6 +560,13 @@ About the new airlock wires panel: ui_interact(user) /obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/door/airlock/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["main_power_loss"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1) @@ -567,22 +575,16 @@ About the new airlock wires panel: data["open"] = !density var/commands[0] - commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) - commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0) - commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) - commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) - commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) - commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0) - commands[++commands.len] = list("name" = "Emergency Access", "command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0) + commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner,"enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0) + commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0) + commands[++commands.len] = list("name" = "Emergency Access","command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0) data["commands"] = commands - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/door/airlock/proc/hack(mob/user as mob) if(src.aiHacking==0) diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm index 2b336859127..d9be59bde59 100644 --- a/code/game/machinery/embedded_controller/airlock_controllers.dm +++ b/code/game/machinery/embedded_controller/airlock_controllers.dm @@ -21,6 +21,13 @@ name = "Advanced Airlock Controller" /obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data = list( @@ -32,16 +39,7 @@ "secure" = program.memory["secure"] ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290) - - ui.set_initial_data(data) - - ui.open() - - ui.set_auto_update(1) + return data /obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/Topic(href, href_list) if(..()) @@ -79,6 +77,13 @@ tag_secure = 1 /obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data = list( @@ -88,16 +93,7 @@ "processing" = program.memory["processing"], ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290) - - ui.set_initial_data(data) - - ui.open() - - ui.set_auto_update(1) + return data /obj/machinery/embedded_controller/radio/airlock/airlock_controller/Topic(href, href_list) if(..()) @@ -144,6 +140,13 @@ icon_state = "access_control_off" /obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data = list( @@ -152,16 +155,7 @@ "processing" = program.memory["processing"] ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220) - - ui.set_initial_data(data) - - ui.open() - - ui.set_auto_update(1) + return data /obj/machinery/embedded_controller/radio/airlock/access_controller/Topic(href, href_list) if(..()) @@ -186,4 +180,4 @@ if(clean) program.receive_user_command(href_list["command"]) - return 1 \ No newline at end of file + return 1 diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index fcf9d56b355..b1f7d33244d 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -174,6 +174,13 @@ FIRE ALARM ui_interact(user) /obj/machinery/firealarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "firealarm.tmpl", name, 400, 400, state = state) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/firealarm/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/area/A = get_area(src) @@ -186,16 +193,7 @@ FIRE ALARM var/minute = round(time / 60) data["time_left"] = "[minute ? "[minute]:" : ""][add_zero(num2text(second), 2)]" - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "firealarm.tmpl", name, 400, 400, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - - - + return data /obj/machinery/firealarm/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index f7e78ffad2e..1d8d9a1e22e 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -981,7 +981,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob, pa /obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile. if(news_call) - atom_say("Breaking news from [news_call]!") + atom_say("[news_call]!") src.alert = 1 src.update_icon() spawn(300) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index afe79ca48e3..bf2eedeaf23 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -37,6 +37,7 @@ #define PIPE_DP_VENT 36 #define PIPE_PASV_VENT 37 #define PIPE_DTVALVE 38 +#define PIPE_CIRCULATOR 39 /obj/item/pipe name = "pipe" @@ -150,10 +151,16 @@ src.pipe_type = PIPE_OMNI_MIXER else if(istype(make_from, /obj/machinery/atmospherics/omni/filter)) src.pipe_type = PIPE_OMNI_FILTER + else if(istype(make_from, /obj/machinery/atmospherics/binary/circulator)) + src.pipe_type = PIPE_CIRCULATOR var/obj/machinery/atmospherics/trinary/triP = make_from if(istype(triP) && triP.flipped) src.flipped = 1 + + var/obj/machinery/atmospherics/binary/circulator/circP = make_from + if(istype(circP) && circP.side == circP.CIRC_RIGHT) + src.flipped = 1 else src.pipe_type = pipe_type @@ -214,6 +221,7 @@ "dual-port vent", \ "passive vent", \ "digital t-valve", \ + "circulator/heat exchanger", \ ) name = nlist[pipe_type+1] + " fitting" var/list/islist = list( \ @@ -256,11 +264,15 @@ "dual-port vent", \ "passive vent", \ "dtvalve", \ + "circ", \ ) icon_state = islist[pipe_type + 1] var/obj/machinery/atmospherics/trinary/triP = make_from if(istype(triP) && triP.flipped) icon_state = "m_[icon_state]" + var/obj/machinery/atmospherics/binary/circulator/circP = make_from + if(istype(circP) && circP.side == circP.CIRC_RIGHT) + icon_state = "m_[icon_state]" // called by turf to know if should treat as bent or not on placement /obj/item/pipe/proc/is_bent_pipe() @@ -280,6 +292,10 @@ if( usr.stat || usr.restrained() ) return + + if(pipe_type == PIPE_CIRCULATOR) + flip() + return src.dir = turn(src.dir, -90) @@ -295,7 +311,7 @@ if(usr.stat || usr.restrained()) return - if(pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE)) + if(pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE, PIPE_CIRCULATOR)) if(flipped) icon_state = copytext(icon_state,3) else @@ -529,6 +545,14 @@ if(pipename) P.name = pipename P.construction(unflip(dir), pipe_dir, color) + + if(PIPE_CIRCULATOR) //circulator + var/obj/machinery/atmospherics/binary/circulator/C = new(src.loc) + if(flipped) + C.side = C.CIRC_RIGHT + if(pipename) + C.name = pipename + C.construction(C.dir, C.initialize_directions, color) if(PIPE_SCRUBBER) //scrubber var/obj/machinery/atmospherics/unary/vent_scrubber/S = new(src.loc) @@ -682,3 +706,4 @@ #undef PIPE_DP_VENT #undef PIPE_PASV_VENT #undef PIPE_DTVALVE +#undef PIPE_CIRCULATOR diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index d8f23599f74..80f5e8be5d7 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -104,11 +104,11 @@ return if(drownee.stat) //Mob is in critical. - drownee.losebreath -= 3 //You're gonna die here. + drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20) add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked. else - drownee.losebreath -= 2 //For every time you drown, you miss 2 breath attempts. Hope you catch on quick! + drownee.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 20) //For every time you drown, you miss 2 breath attempts. Hope you catch on quick! add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then. drownee.visible_message("\The [drownee] flails, almost like they are drowning!","You're lacking air!") //*gasp* *gasp* *gasp* *gasp* *gasp* @@ -130,18 +130,19 @@ /obj/machinery/poolcontroller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410) + ui.open() + +/obj/machinery/poolcontroller/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["currentTemp"] = temperature data["emagged"] = emagged data["TempColor"] = temperaturecolor - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410) - ui.set_initial_data(data) - ui.open() - + return data /obj/machinery/poolcontroller/Topic(href, href_list) diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm index deafad7f9b7..de78d46178f 100644 --- a/code/game/machinery/portable_tag_turret.dm +++ b/code/game/machinery/portable_tag_turret.dm @@ -43,18 +43,19 @@ iconholder = 1 /obj/machinery/porta_turret/tag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/porta_turret/tag/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["access"] = !isLocked(user) data["locked"] = locked data["enabled"] = enabled data["is_lethal"] = 0 - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/porta_turret/tag/update_icon() if(!anchored) @@ -121,4 +122,4 @@ if(istype(H.belt, target_weapon)) return TURRET_SECONDARY_TARGET - return TURRET_NOT_TARGET \ No newline at end of file + return TURRET_NOT_TARGET diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 469738e7aaa..5832e41a4f5 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -200,6 +200,13 @@ var/list/turret_icons ui_interact(user) /obj/machinery/porta_turret/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 320) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/porta_turret/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["access"] = !isLocked(user) data["screen"] = screen @@ -230,13 +237,7 @@ var/list/turret_icons active = (access in req_access) accesses[++accesses.len] = list("name" = name, "active" = active, "number" = access) data["accesses"] = accesses - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 320) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/porta_turret/proc/HasController() var/area/A = get_area(src) diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index 4cd09d6f8a4..e41dfd2f79f 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -254,6 +254,7 @@ src.overrides = null P.emag_overrides = src.emag_overrides src.emag_overrides = null + default_deconstruction_crowbar(I, 1) return else ..(I,user) @@ -296,10 +297,8 @@ O.loc = loc for(var/mob/M in contents) M.loc = loc - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - to_chat(M, "\blue The machine turns off, and you fall out.") + M.reset_perspective(null) + to_chat(M, "The machine turns off, and you fall out.") return diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 342b24fa055..ac88d755561 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -166,17 +166,12 @@ H.updatehealth() /obj/machinery/recharge_station/proc/go_out() - if(!( src.occupant )) + if(!occupant) return - //for(var/obj/O in src) - // O.loc = src.loc - if(src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null + occupant.forceMove(loc) + occupant = null build_icon() - src.use_power = 1 + use_power = 1 return /obj/machinery/recharge_station/proc/restock_modules() @@ -300,9 +295,6 @@ return user.stop_pulling() - if(user && user.client) - user.client.perspective = EYE_PERSPECTIVE - user.client.eye = src user.forceMove(src) occupant = user diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 7bf9b661a24..9de1806852f 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -109,6 +109,13 @@ var/list/obj/machinery/requests_console/allConsoles = list() ui_interact(user) /obj/machinery/requests_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/requests_console/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["department"] = department @@ -129,12 +136,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() data["msgVerified"] = msgVerified data["announceAuth"] = announceAuth - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/requests_console/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 9705ef9dedd..c72e987cd92 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -22,6 +22,13 @@ ui_interact(user) /obj/machinery/slot_machine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/slot_machine/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["working"] = working @@ -30,12 +37,7 @@ data["result"] = result data["resultlvl"] = resultlvl - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/slot_machine/Topic(href, href_list) add_fingerprint(usr) @@ -112,4 +114,4 @@ T.amount = "[amt]" T.date = current_date_string T.time = worldtime2text() - account.transaction_log.Add(T) \ No newline at end of file + account.transaction_log.Add(T) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index d48a21709c0..b50fc3566d8 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -430,27 +430,21 @@ /obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob) - if(src.islocked) + if(islocked) return - if(!src.OCCUPANT) + if(!OCCUPANT) return -// for(var/obj/O in src) -// O.loc = src.loc - if(src.OCCUPANT.client) - if(user != OCCUPANT) - to_chat(OCCUPANT, "The machine kicks you out!") - if(user.loc != src.loc) - to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") - - src.OCCUPANT.client.eye = src.OCCUPANT.client.mob - src.OCCUPANT.client.perspective = MOB_PERSPECTIVE - src.OCCUPANT.loc = src.loc - src.OCCUPANT = null - if(!src.isopen) - src.isopen = 1 - src.update_icon() + if(user != OCCUPANT) + to_chat(OCCUPANT, "The machine kicks you out!") + if(user.loc != loc) + to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") + OCCUPANT.forceMove(loc) + OCCUPANT = null + if(!isopen) + isopen = 1 + update_icon() return @@ -487,9 +481,7 @@ visible_message("[usr] starts squeezing into the suit storage unit!") if(do_after(usr, 10, target = usr)) usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src + usr.forceMove(src) // usr.metabslow = 1 src.OCCUPANT = usr src.isopen = 0 //Close the thing after the guy gets inside @@ -532,10 +524,7 @@ if(do_after(user, 20, target = G:affecting)) if(!G || !G.affecting) return //derpcheck var/mob/M = G.affecting - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src + M.forceMove(src) src.OCCUPANT = M src.isopen = 0 //close ittt @@ -690,10 +679,7 @@ if(do_after(user, 20, target = G:affecting)) if(!G || !G.affecting) return var/mob/M = G.affecting - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src + M.forceMove(src) src.occupant = M src.add_fingerprint(user) @@ -999,16 +985,12 @@ if(!occupant) return - if(occupant.client) - occupant.client.eye = occupant.client.mob - occupant.client.perspective = MOB_PERSPECTIVE - - occupant.loc = get_turf(occupant) + occupant.forceMove(loc) occupant = null add_fingerprint(usr) - src.updateUsrDialog() - src.update_icon() + updateUsrDialog() + update_icon() return /* diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 369cb0fc708..0fec852c2f5 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -11,7 +11,6 @@ var/calibrating var/turf/target //Used for one-time-use teleport cards (such as clown planet coordinates.) //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. - var/data[0] /obj/machinery/computer/teleporter/New() src.id = "[rand(1000, 9999)]" @@ -67,11 +66,17 @@ ui_interact(user) /obj/machinery/computer/teleporter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(..()) - return if(stat & (NOPOWER|BROKEN)) return + // Set up the Nano UI + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400) + ui.open() + +/obj/machinery/computer/teleporter/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] data["powerstation"] = power_station if(power_station) data["teleporterhub"] = power_station.teleporter_hub @@ -86,13 +91,7 @@ data["target"] = (!target) ? "None" : sanitize(targetarea.name) data["calibrating"] = calibrating data["locked"] = locked - - // Set up the Nano UI - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/teleporter/Topic(href, href_list) if(..()) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index d27df18523a..eda38ee6120 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -119,6 +119,13 @@ ui_interact(user) /obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/turretid/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["access"] = !isLocked(user) data["locked"] = locked @@ -136,12 +143,7 @@ settings[++settings.len] = list("category" = "Check Misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies) data["settings"] = settings - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0) if(..()) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 4199bf72d68..ed6a23998c4 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -411,6 +411,12 @@ /obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600) + ui.open() + +/obj/machinery/vending/ui_data(mob/user, datum/topic_state/state = default_state) var/list/data = list() if(currently_vending) data["mode"] = 1 @@ -446,12 +452,7 @@ data["speaker"] = src.shut_up ? 0 : 1 else data["panel"] = 0 - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/vending/Topic(href, href_list) if(..()) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 12303c7767d..c60a560d19b 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -33,6 +33,7 @@ /obj/item/mecha_parts/mecha_equipment/Destroy()//missiles detonating, teleporter creating singularity? if(chassis) + detach(chassis) chassis.equipment -= src listclearnulls(chassis.equipment) if(chassis.selected == src) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 23271355206..d95570cf88f 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -481,7 +481,7 @@ return 0 occupant_message("Analyzing reagents...") for(var/datum/reagent/R in A.reagents.reagent_list) - if(R.reagent_state == 2 && add_known_reagent(R.id,R.name)) + if(R.can_synth && add_known_reagent(R.id, R.name)) occupant_message("Reagent analyzed, identified as [R.name] and added to database.") send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form()) occupant_message("Analyzis complete.") diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 4f7211282c9..6146e326023 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -115,12 +115,22 @@ equip_cooldown = 30 var/scanning = 0 -/obj/item/mecha_parts/mecha_equipment/mining_scanner/New() +/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M) + . = ..() processing_objects.Add(src) + M.occupant_sight_flags |= SEE_TURFS + if(M.occupant) + M.occupant.update_sight() + +/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach() + chassis.occupant_sight_flags &= ~SEE_TURFS + processing_objects.Remove(src) + if(chassis.occupant) + chassis.occupant.update_sight() + return ..() /obj/item/mecha_parts/mecha_equipment/mining_scanner/process() if(!loc) - processing_objects.Remove(src) qdel(src) if(scanning) return diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 68b2c83059e..fedb792c37d 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -164,9 +164,9 @@ if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs)) continue to_chat(M, "HONK") - M.sleeping = 0 - M.stuttering = 20 - M.adjustEarDamage(0,30) + M.SetSleeping(0) + M.Stuttering(20) + M.AdjustEarDeaf(30) M.Weaken(3) if(prob(30)) M.Stun(10) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index f60a37be397..ea8a06961cc 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -145,7 +145,18 @@ ui_interact(user) /obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - var/list/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "mech_bay_console.tmpl", "Mech Bay Control Console", 500, 325) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/computer/mech_bay_power_console/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] if(!recharge_port) reconnect() if(recharge_port && !qdeleted(recharge_port)) @@ -160,20 +171,10 @@ data["mecha_charge_percentage"] = isnull(recharge_port.recharging_mecha) ? 0 : round(recharge_port.recharging_mecha.cell.percent()) else data["has_mech"] = 0 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "mech_bay_console.tmpl", "Mech Bay Control Console", 500, 325) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/computer/mech_bay_power_console/initialize() reconnect() update_icon() - return ..() \ No newline at end of file + return ..() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 1cda4c86649..32ba3730419 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -65,6 +65,7 @@ var/max_equip = 3 var/datum/events/events var/turf/crashing = null + var/occupant_sight_flags = 0 var/stepsound = 'sound/mecha/mechstep.ogg' @@ -564,7 +565,9 @@ dam_coeff = B.damage_coeff break - if(prob(deflect_chance * deflection) && (Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + if(Proj.damage_type != BRUTE && Proj.damage_type != BURN) + visible_message("[src]'s armour is undamaged by [Proj]!") + else if(prob(deflect_chance * deflection)) visible_message("[src]'s armour deflects [Proj]!") else visible_message("[src] is hit by [Proj].") @@ -1128,7 +1131,7 @@ occupant = H H.stop_pulling() H.forceMove(src) - H.reset_view(src) + H.reset_perspective(src) add_fingerprint(H) //GrantActions(H, human_occupant=1) forceMove(loc) @@ -1177,13 +1180,9 @@ to_chat(user, "\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]") return 0 var/mob/brainmob = mmi_as_oc.brainmob - brainmob.reset_view(src) - /* - brainmob.client.eye = src - brainmob.client.perspective = EYE_PERSPECTIVE - */ + brainmob.reset_perspective(src) occupant = brainmob - brainmob.loc = src //should allow relaymove + brainmob.forceMove(src) //should allow relaymove brainmob.canmove = 1 mmi_as_oc.loc = src mmi_as_oc.mecha = src @@ -1266,7 +1265,7 @@ var/obj/item/device/mmi/mmi = mob_container if(mmi.brainmob) L.loc = mmi - L.reset_view() + L.reset_perspective() mmi.mecha = null mmi.update_icon() L.canmove = 0 @@ -1440,3 +1439,8 @@ /obj/mecha/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list()) flick_overlay(image('icons/mob/talk.dmi', bubble_loc, bubble_state,MOB_LAYER+1), bubble_recipients, 30) + +/obj/mecha/update_remote_sight(mob/living/user) + if(occupant_sight_flags) + if(user == occupant) + user.sight |= occupant_sight_flags diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 39cda37a167..6838aae1b29 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -17,6 +17,13 @@ ui_interact(user) /obj/machinery/computer/mecha/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "exosuit_control.tmpl", "Exosuit Control Console", 420, 500) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/mecha/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["screen"] = screen if(screen == 0) @@ -28,14 +35,7 @@ data["mechas"] = mechas if(screen == 1) data["log"] = stored_data - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "exosuit_control.tmpl", "Exosuit Control Console", 420, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/computer/mecha/Topic(href, href_list) if(..()) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 4c61393d9f7..0297a372dff 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -61,8 +61,8 @@ M.adjust_fire_stacks(1) M.IgniteMob() -/atom/movable/proc/unbuckle_mob() - if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr)) +/atom/movable/proc/unbuckle_mob(force = FALSE) + if(buckled_mob && buckled_mob.buckled == src && (buckled_mob.can_unbuckle(usr) || force)) . = buckled_mob buckled_mob.buckled = null buckled_mob.anchored = initial(buckled_mob.anchored) @@ -72,7 +72,6 @@ post_buckle_mob(.) - //Handle any extras after buckling/unbuckling //Called on buckle_mob() and unbuckle_mob() /atom/movable/proc/post_buckle_mob(mob/living/M) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 3c1a16787c0..106c451ca09 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -79,7 +79,8 @@ /obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj) - health -= Proj.damage + if(Proj.damage_type == BRUTE || Proj.damage_type == BURN) + health -= Proj.damage ..() healthcheck() diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 47b6c1bf57b..90e4c47b276 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -583,7 +583,7 @@ steam.start() -- spawns the effect // if(M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later else M.drop_item() - M:sleeping += 5 + M.AdjustSleeping(5) if(M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") @@ -600,7 +600,7 @@ steam.start() -- spawns the effect return else M.drop_item() - M:sleeping += 5 + M.AdjustSleeping(5) if(M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index d9b99df812b..8d0ae413fb7 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -12,22 +12,6 @@ invisibility = 101 switch(name) //some of these are probably obsolete - if("shuttle") - log_runtime(EXCEPTION("Obsolete landmark '[name]' at ([x],[y],[z])"), src) - qdel(src) - - if("airtunnel_stop") - airtunnel_stop = x - - if("airtunnel_start") - airtunnel_start = x - - if("airtunnel_bottom") - airtunnel_bottom = y - - if("monkey") - monkeystart += loc - qdel(src) if("start") newplayer_start += loc qdel(src) @@ -52,29 +36,28 @@ latejoin_cyborg += loc qdel(src) - //prisoners if("prisonwarp") prisonwarp += loc qdel(src) - // if("mazewarp") - // mazewarp += loc - if("Holding Facility") - holdingfacility += loc - if("tdome1") - tdome1 += loc - if("tdome2") - tdome2 += loc - if("tdomeadmin") - tdomeadmin += loc - if("tdomeobserve") - tdomeobserve += loc - if("aroomwarp") - aroomwarp += loc - - //not prisoners + if("prisonsecuritywarp") prisonsecuritywarp += loc qdel(src) + + if("tdome1") + tdome1 += loc + + if("tdome2") + tdome2 += loc + + if("tdomeadmin") + tdomeadmin += loc + + if("tdomeobserve") + tdomeobserve += loc + + if("aroomwarp") + aroomwarp += loc if("blobstart") blobstart += loc @@ -96,6 +79,11 @@ if("ERT Director") ertdirector += loc + qdel(src) + + if("Response Team") + emergencyresponseteamspawn += loc + qdel(src) landmarks_list += src return 1 diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index a635d2fdad9..328555fc39b 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -55,13 +55,6 @@ anchored = 1.0 unacidable = 1 -/obj/effect/stop - var/victim = null - icon_state = "empty" - name = "Geas" - desc = "You can't resist." - // name = "" - /obj/effect/projection name = "Projection" desc = "This looks like a projection of something." diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 7fd6cb0946f..4a8681b928a 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -191,3 +191,17 @@ /obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter splatter_type = "xsplatter" + +/obj/effect/overlay/wall_rot + name = "Wallrot" + desc = "Ick..." + icon = 'icons/effects/wallrot.dmi' + anchored = 1 + density = 1 + layer = 5 + mouse_opacity = 0 + +/obj/effect/overlay/wall_rot/New() + ..() + pixel_x += rand(-10, 10) + pixel_y += rand(-10, 10) \ No newline at end of file diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 79b09f48835..9d1fb75d25e 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -215,6 +215,7 @@ desc = "Green squishy mess." icon = 'icons/effects/effects.dmi' icon_state = "greenshatter" + anchored = 1 /obj/effect/spider/cocoon name = "cocoon" diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 32bf9a2fea5..9e36faae088 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -57,10 +57,11 @@ var/close = range(world.view+round(devastation_range,1), epicenter) // to all distanced mobs play a different sound - for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close)) - // check if the mob can hear - if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space)) - M << 'sound/effects/explosionfar.ogg' + for(var/mob/M in world) + if(M.z == epicenter.z && !(M in close)) + // check if the mob can hear + if(M.can_hear() && !istype(M.loc,/turf/space)) + M << 'sound/effects/explosionfar.ogg' if(heavy_impact_range > 1) var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6ea2906c072..b34cc09ca89 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -474,10 +474,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly to_chat(M, "Your eyes start to bleed profusely!") if(prob(50)) - if(M.stat != 2) + if(M.stat != DEAD) to_chat(M, "You drop what you're holding and clutch at your eyes!") M.drop_item() - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) M.Paralyse(1) M.Weaken(2) if(eyes.damage >= eyes.min_broken_damage) @@ -488,7 +488,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d H.UpdateDamageIcon() else M.take_organ_damage(7) - M.eye_blurry += rand(3,4) + M.AdjustEyeBlurry(rand(3,4)) return /obj/item/clean_blood() diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index a91c4e2ebe3..065392a9222 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -236,10 +236,10 @@ var/mob/living/carbon/human/C = target user.visible_message(" [user] sprays [src] into the face of [target]!") if(C.client) - C.eye_blurry = max(C.eye_blurry, 3) - C.eye_blind = max(C.eye_blind, 1) + C.EyeBlurry(3) + C.EyeBlind(1) if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS. - C.confused = max(C.confused, 3) + C.Confused(3) C.Weaken(3) C.lip_style = "spray_face" C.lip_color = colour @@ -251,4 +251,4 @@ overlays.Cut() var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]") I.color = colour - overlays += I \ No newline at end of file + overlays += I diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index d4668b3a69e..ab897d80ec0 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -41,6 +41,14 @@ /obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state) + ui.open() + ui.set_auto_update(1) + + +/obj/item/device/aicard/ui_data(mob/user, datum/topic_state/state = inventory_state) var/data[0] var/mob/living/silicon/ai/AI = locate() in src @@ -59,12 +67,7 @@ data["laws"] = laws data["has_laws"] = laws.len - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/item/device/aicard/Topic(href, href_list, nowindow, state) diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 7f2afb179e4..af745b97f1f 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -55,8 +55,8 @@ interact(user) /obj/item/device/camera_bug/check_eye(var/mob/user as mob) - if(user.stat || loc != user || !user.canmove || user.eye_blind || !current) - user.reset_view(null) + if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current) + user.reset_perspective(null) user.unset_machine() return null @@ -64,7 +64,7 @@ if(T.z != current.z || !current.can_use()) to_chat(user, "[src] has lost the signal.") current = null - user.reset_view(null) + user.reset_perspective(null) user.unset_machine() return null @@ -184,7 +184,7 @@ /obj/item/device/camera_bug/Topic(var/href,var/list/href_list) if(usr != loc) usr.unset_machine() - usr.reset_view(null) + usr.reset_perspective(null) usr << browse(null, "window=camerabug") return usr.set_machine(src) @@ -195,7 +195,7 @@ if(C) track_mode = BUGMODE_MONITOR current = C - usr.reset_view(null) + usr.reset_perspective(null) interact() if("track" in href_list) var/atom/A = locate(href_list["track"]) @@ -214,7 +214,7 @@ interact() return if("close" in href_list) - usr.reset_view(null) + usr.reset_perspective(null) usr.unset_machine() current = null return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later @@ -231,16 +231,16 @@ current = C spawn(6) if(src.check_eye(usr)) - usr.reset_view(C) + usr.reset_perspective(C) interact() else usr.unset_machine() - usr.reset_view(null) + usr.reset_perspective(null) usr << browse(null, "window=camerabug") return else usr.unset_machine() - usr.reset_view(null) + usr.reset_perspective(null) interact() diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 41bfeb4d8f6..d3f13c284c1 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -83,7 +83,7 @@ A.loc = active_dummy.loc if(ismob(A)) var/mob/M = A - M.reset_view(null) + M.reset_perspective(null) /obj/effect/dummy/chameleon name = "" diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index cec1c106e48..52a9a343e6b 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -81,7 +81,7 @@ if(M.weakeyes) M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash if(M.flash_eyes(1, 1)) - M.confused += power + M.AdjustConfused(power) terrible_conversion_proc(M, user) M.Stun(1) visible_message("[user] blinds [M] with the flash!") @@ -96,7 +96,7 @@ to_chat(M, "[user] fails to blind you with the flash!") else if(M.flash_eyes()) - M.confused += power + M.AdjustConfused(power) /obj/item/device/flash/attack(mob/living/M, mob/user) if(!try_use_flash(user)) diff --git a/code/game/objects/items/devices/guitar.dm b/code/game/objects/items/devices/guitar.dm index b95cea0aae3..73831d1f468 100644 --- a/code/game/objects/items/devices/guitar.dm +++ b/code/game/objects/items/devices/guitar.dm @@ -33,6 +33,9 @@ song.ui_interact(user, ui_key, ui, force_open) +/obj/item/device/guitar/ui_data(mob/user, datum/topic_state/state = default_state) + return song.ui_data(user, state) + /obj/item/device/guitar/Topic(href, href_list) song.Topic(href, href_list) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index e37b267799b..51859fd27ac 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -99,15 +99,17 @@ /obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500) + ui.open() + ui.set_auto_update(1) + +/obj/item/device/radio/electropack/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["power"] = on data["freq"] = format_frequency(frequency) data["code"] = code - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) \ No newline at end of file + return data diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 74a32ebfe19..6078f855b61 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -108,6 +108,13 @@ var/global/list/default_medbay_channels = list( return ui_interact(user) /obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550) + ui.open() + ui.set_auto_update(1) + +/obj/item/device/radio/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["mic_status"] = broadcasting @@ -126,12 +133,7 @@ var/global/list/default_medbay_channels = list( if(syndie) data["useSyndMode"] = 1 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/item/device/radio/proc/list_channels(var/mob/user) @@ -749,6 +751,13 @@ var/global/list/default_medbay_channels = list( . = ..() /obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500) + ui.open() + ui.set_auto_update(1) + +/obj/item/device/radio/borg/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["mic_status"] = broadcasting @@ -769,12 +778,7 @@ var/global/list/default_medbay_channels = list( data["has_subspace"] = 1 data["subspace"] = subspace_transmission - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/item/device/radio/proc/config(op) if(radio_controller) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 4b3a656c02e..9a9edbb62ad 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -381,9 +381,7 @@ REAGENT SCANNER /obj/item/device/mass_spectrometer/New() ..() - var/datum/reagents/R = new/datum/reagents(5) - reagents = R - R.my_atom = src + create_reagents(5) /obj/item/device/mass_spectrometer/on_reagent_change() if(reagents.total_volume) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 9cd39c7a7d9..84b397780dc 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -90,26 +90,26 @@ ui_interact(user) /obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280) + // open the new ui window + ui.open() + // auto update every Master Controller tick + //ui.set_auto_update(1) - // this is the data which will be sent to the ui +/obj/item/device/transfer_valve/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["attachmentOne"] = tank_one ? tank_one.name : null data["attachmentTwo"] = tank_two ? tank_two.name : null data["valveAttachment"] = attached_device ? attached_device.name : null data["valveOpen"] = valve_open ? 1 : 0 - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - //ui.set_auto_update(1) + return data /obj/item/device/transfer_valve/Topic(href, href_list) ..() @@ -219,4 +219,4 @@ // this doesn't do anything but the timer etc. expects it to be here // eventually maybe have it update icon to show state (timer, prox etc.) like old bombs /obj/item/device/transfer_valve/proc/c_state() - return \ No newline at end of file + return diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index b019e2a9d95..d29e5e5ede4 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -187,8 +187,18 @@ var/list/world_uplinks = list() /* NANO UI FOR UPLINK WOOP WOOP */ -/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) var/title = "Remote Uplink" + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = state) + // open the new ui window + ui.open() + +/obj/item/device/uplink/hidden/ui_data(mob/user, datum/topic_state/state = inventory_state) var/data[0] data["welcome"] = welcome @@ -200,17 +210,7 @@ var/list/world_uplinks = list() data["nano_items"] = nanoui_items data += nanoui_data - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - + return data // Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button. /obj/item/device/uplink/hidden/interact(mob/user) diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm index 7a3d304309d..7802e832fde 100644 --- a/code/game/objects/items/devices/violin.dm +++ b/code/game/objects/items/devices/violin.dm @@ -38,5 +38,8 @@ song.ui_interact(user, ui_key, ui, force_open) +/obj/item/device/violin/ui_data(mob/user, datum/topic_state/state = default_state) + return song.ui_data(user, state) + /obj/item/device/violin/Topic(href, href_list) song.Topic(href, href_list) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 295a1538a65..01891d4c77a 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -38,9 +38,7 @@ item_state = "balloon-empty" /obj/item/toy/balloon/New() - var/datum/reagents/R = new/datum/reagents(10) - reagents = R - R.my_atom = src + create_reagents(10) /obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob) return diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index a0dcdaec042..0a503aa7cb9 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -83,7 +83,14 @@ RCD ui_interact(user) /obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) - var/list/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state) + ui.open() + ui.set_auto_update(1) + +/obj/item/weapon/rcd/ui_data(mob/user, datum/topic_state/state = inventory_state) + var/data[0] data["mode"] = mode data["door_type"] = door_type data["menu"] = menu @@ -100,12 +107,7 @@ RCD data["door_accesses"] = door_accesses_list - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/item/weapon/rcd/Topic(href, href_list, nowindow, state) if(..()) @@ -207,9 +209,9 @@ RCD var/obj/machinery/door/airlock/T = new door_type(A) T.autoclose = 1 if(one_access) - T.req_one_access = door_accesses + T.req_one_access = door_accesses.Copy() else - T.req_access = door_accesses + T.req_access = door_accesses.Copy() return 1 return 0 return 0 diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm index 7b8af53e388..6e57028472e 100644 --- a/code/game/objects/items/weapons/caution.dm +++ b/code/game/objects/items/weapons/caution.dm @@ -58,4 +58,4 @@ if(l && !(l.status & ORGAN_DESTROYED)) l.status |= ORGAN_DESTROYED if(r && !(r.status & ORGAN_DESTROYED)) - r.status |= ORGAN_DESTROYED \ No newline at end of file + r.status |= ORGAN_DESTROYED diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index a4420872e5e..eda6d74b296 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -408,8 +408,9 @@ H.adjustBruteLoss(tobehealed) user.visible_message("[defib] pings: Resuscitation successful.") playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0) - H.stat = 1 - H.update_revive() + H.update_revive(FALSE) + H.KnockOut(FALSE) + H.Paralyse(5) H.emote("gasp") if(tplus > tloss) H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100)))) @@ -527,8 +528,9 @@ H.adjustBruteLoss(tobehealed) user.visible_message("[user] pings: Resuscitation successful.") playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0) - H.stat = UNCONSCIOUS - H.update_revive() + H.update_revive(FALSE) + H.KnockOut(FALSE) + H.Paralyse(5) H.emote("gasp") if(tplus > tloss) H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100)))) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 6399a11c291..5714f5e4310 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -147,6 +147,7 @@ triggered = 1 visible_message("You hear a quiet click.") spawn(40) + var/cap = 0 if(result > MAX_EX_LIGHT_RANGE && result != 20) cap = 1 @@ -156,6 +157,13 @@ var/turf/epicenter = get_turf(src) explosion(epicenter, round(result*0.25), round(result*0.5), round(result), round(result*1.5), 1, cap) + var/turf/bombturf = get_turf(src) + var/area/A = get_area(bombturf) + bombers += "E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]" + message_admins("E20 detonated at [A.name] (JMP) with a roll of [result]. Triggered by: [key_name_admin(user)]") + log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]") + + /obj/item/weapon/dice/update_icon() overlays.Cut() overlays += "[src.icon_state][src.result]" diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 69a4d78643e..45aabc2c073 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -72,6 +72,7 @@ spawn(0) //Some mutations have sleeps in them, like monkey if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed var/prev_ue = M.dna.unique_enzymes + var/mutflags = 0 // UI in syringe. if(buf.types & DNA2_BUF_UI) if(!block) //isolated block? @@ -88,12 +89,13 @@ M.dna.SetUIValue(block,src.GetValue()) M.UpdateAppearance() if(buf.types & DNA2_BUF_SE) + mutflags = MUTCHK_FORCED if(!block) //isolated block? M.dna.SE = buf.dna.SE.Copy() M.dna.UpdateSE() else M.dna.SetSEValue(block,src.GetValue()) - domutcheck(M, null, 0) + domutcheck(M, null, mutflags) M.update_mutations() if(H) H.sync_organ_dna(assimilate = 0, old_ue = prev_ue) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index e6b0ff92c32..22b589c7517 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -91,7 +91,7 @@ G.state = GRAB_NECK G.hud.icon_state = "kill" G.hud.name = "kill" - M.silent += 1 + M.AdjustSilence(1) garrote_time = world.time + 10 processing_objects.Add(src) @@ -152,11 +152,11 @@ return - strangling.silent = max(strangling.silent, 3) // Non-improvised effects + strangling.Silence(3) // Non-improvised effects strangling.apply_damage(4, OXY, "head") /obj/item/weapon/twohanded/garrote/suicide_act(mob/user) user.visible_message("[user] is wrapping the [src] around \his neck and pulling the handles! It looks like \he's trying to commit suicide.") playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1) - return (OXYLOSS) \ No newline at end of file + return (OXYLOSS) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 6dcbef385b0..d503ca04a8f 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -55,9 +55,7 @@ for(var/mob/M in src) //Should only be one but whatever. M.loc = src.loc - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE + M.reset_perspective(null) qdel(src) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 9562f9442c7..4241c9c5c0c 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -51,12 +51,13 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) + M.EarDeaf(15) + M.AdjustEarDamage(rand(0, 5)) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 5)) to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF + M.BecomeDeaf() else if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index a464e5914ef..141f9b14f89 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -94,10 +94,7 @@ return if(M == occupant) // so that the guy inside can't eject himself -Agouri return - if(src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc + occupant.forceMove(loc) if(injecting) implant(src.occupant) injecting = 0 @@ -113,11 +110,8 @@ if(src.occupant) to_chat(usr, "The [src.name] is already occupied!") return - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src M.stop_pulling() - M.loc = src + M.forceMove(src) src.occupant = M src.add_fingerprint(usr) icon_state = "implantchair_on" diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 05a50200e7d..e966f5500e5 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -115,7 +115,7 @@ if(do_after(user, 50, target = H)) playsound(loc, "sound/weapons/bladeslice.ogg", 50, 1, -1) user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top. - H.losebreath += 10 //30 Oxy damage over time + H.AdjustLoseBreath(10) //30 Oxy damage over time H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors") var/turf/location = get_turf(H) if(istype(location, /turf/simulated)) diff --git a/code/game/objects/items/weapons/storage/artistic_toolbox.dm b/code/game/objects/items/weapons/storage/artistic_toolbox.dm index 81ba661115a..470c273bd69 100644 --- a/code/game/objects/items/weapons/storage/artistic_toolbox.dm +++ b/code/game/objects/items/weapons/storage/artistic_toolbox.dm @@ -138,8 +138,8 @@ affected_mob.setStaminaLoss(0) var/status = CANSTUN | CANWEAKEN | CANPARALYSE affected_mob.status_flags &= ~status - affected_mob.dizziness = max(0, affected_mob.dizziness-10) - affected_mob.drowsyness = max(0, affected_mob.drowsyness-10) + affected_mob.AdjustDizzy(-10) + affected_mob.AdjustDrowsy(-10) affected_mob.SetSleeping(0) stage = 1 switch(progenitor.hunger) @@ -181,4 +181,4 @@ affected_mob.adjustBruteLoss(5) if(ismob(progenitor.loc)) - progenitor.hunger++ \ No newline at end of file + progenitor.hunger++ diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 937cc3214a3..ef0cdfc329b 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -116,7 +116,7 @@ if(H.get_item_by_slot(slot_head) == src) if(H.internal) return - H.losebreath += 1 + H.AdjustLoseBreath(1) else storage_slots = 7 processing_objects.Remove(src) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 460498a874b..e848eec1aca 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -27,131 +27,132 @@ max_w_class = 2 max_combined_w_class = 14 - examine(mob/user) - if(..(user, 1)) - to_chat(user, text("The service panel is [src.open ? "open" : "closed"].")) +/obj/item/weapon/storage/secure/examine(mob/user) + if(..(user, 1)) + to_chat(user, text("The service panel is [open ? "open" : "closed"].")) - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(locked) - if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged)) - emag_act(user, W) +/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if(locked) + if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!emagged)) + emag_act(user, W) - if(istype(W, /obj/item/weapon/screwdriver)) - if(do_after(user, 20, target = src)) - src.open =! src.open - user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close"))) - return - if((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking)) - user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1) - src.l_hacking = 1 - if(do_after(usr, 100, target = src)) - if(prob(40)) - src.l_setshort = 1 - src.l_set = 0 - user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1) - sleep(80) - src.l_setshort = 0 - src.l_hacking = 0 - else - user.show_message(text("\red Unable to reset internal memory."), 1) - src.l_hacking = 0 - else src.l_hacking = 0 - return - //At this point you have exhausted all the special things to do when locked - // ... but it's still locked. + if(istype(W, /obj/item/weapon/screwdriver)) + if(do_after(user, 20, target = src)) + open = !open + user.show_message("You [open ? "open" : "close"] the service panel.", 1) return - // -> storage/attackby() what with handle insertion, etc - ..() - - emag_act(user as mob, weapon as obj) - if(!emagged) - emagged = 1 - src.overlays += image('icons/obj/storage.dmi', icon_sparking) - sleep(6) - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_locking) - locked = 0 - if(istype(weapon, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - to_chat(user, "You slice through the lock on [src].") - else - to_chat(user, "You short out the lock on [src].") - return - - - MouseDrop(over_object, src_location, over_location) - if(locked) - src.add_fingerprint(usr) - return - ..() - - - attack_self(mob/user as mob) - user.set_machine(src) - var/dat = text("[]
\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED")) - var/message = "Code" - if((src.l_set == 0) && (!src.emagged) && (!src.l_setshort)) - dat += text("

\n5-DIGIT PASSCODE NOT SET.
ENTER NEW PASSCODE.
") - if(src.emagged) - dat += text("

\nLOCKING SYSTEM ERROR - 1701") - if(src.l_setshort) - dat += text("

\nALERT: MEMORY SYSTEM ERROR - 6040 201") - message = text("[]", src.code) - if(!src.locked) - message = "*****" - dat += {"


\n>[message]
\n - 1- - 2- - 3
\n - 4- - 5- - 6
\n - 7- - 8- - 9
\n - R- - 0- - E
\n
"} - user << browse(dat, "window=caselock;size=300x280") - - Topic(href, href_list) - ..() - if((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1)) - return - if(href_list["type"]) - if(href_list["type"] == "E") - if((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR")) - src.l_code = src.code - src.l_set = 1 - else if((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1)) - src.locked = 0 - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_opened) - src.code = null + if((istype(W, /obj/item/device/multitool)) && (open == 1) && (!l_hacking)) + user.show_message("Now attempting to reset internal memory, please hold.", 1) + l_hacking = 1 + if(do_after(usr, 100, target = src)) + if(prob(40)) + l_setshort = 1 + l_set = 0 + user.show_message("Internal memory reset. Please give it a few seconds to reinitialize.", 1) + sleep(80) + l_setshort = 0 + l_hacking = 0 else - src.code = "ERROR" - else - if((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort)) - src.locked = 1 - src.overlays = null - src.code = null - src.close(usr) - else - src.code += text("[]", href_list["type"]) - if(length(src.code) > 5) - src.code = "ERROR" - src.add_fingerprint(usr) - for(var/mob/M in viewers(1, src.loc)) - if((M.client && M.machine == src)) - src.attack_self(M) - return + user.show_message("Unable to reset internal memory.", 1) + l_hacking = 0 + else + l_hacking = 0 + return + //At this point you have exhausted all the special things to do when locked + // ... but it's still locked. return + return ..() + +/obj/item/weapon/storage/secure/emag_act(user as mob, weapon as obj) + if(!emagged) + emagged = 1 + overlays += image('icons/obj/storage.dmi', icon_sparking) + sleep(6) + overlays = null + overlays += image('icons/obj/storage.dmi', icon_locking) + locked = 0 + if(istype(weapon, /obj/item/weapon/melee/energy/blade)) + var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + spark_system.set_up(5, 0, src.loc) + spark_system.start() + playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) + playsound(loc, "sparks", 50, 1) + to_chat(user, "You slice through the lock on [src].") + else + to_chat(user, "You short out the lock on [src].") + return + + +/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location) + if(locked) + add_fingerprint(usr) + to_chat(usr, "It's locked!") + return 0 + ..() + +/obj/item/weapon/storage/secure/attack_self(mob/user as mob) + user.set_machine(src) + var/dat = text("[]
\n\nLock Status: []", src, (locked ? "LOCKED" : "UNLOCKED")) + var/message = "Code" + if((l_set == 0) && (!emagged) && (!l_setshort)) + dat += text("

\n5-DIGIT PASSCODE NOT SET.
ENTER NEW PASSCODE.
") + if(emagged) + dat += text("

\nLOCKING SYSTEM ERROR - 1701") + if(l_setshort) + dat += text("

\nALERT: MEMORY SYSTEM ERROR - 6040 201") + message = text("[]", code) + if(!locked) + message = "*****" + dat += {"


\n>[message]
\n + 1- + 2- + 3
\n + 4- + 5- + 6
\n + 7- + 8- + 9
\n + R- + 0- + E
\n
"} + user << browse(dat, "window=caselock;size=300x280") + +/obj/item/weapon/storage/secure/Topic(href, href_list) + ..() + if(usr.incapacitated() || (get_dist(src, usr) > 1)) + return + if(href_list["type"]) + if(href_list["type"] == "E") + if((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR")) + l_code = code + l_set = 1 + else if((code == l_code) && (emagged == 0) && (l_set == 1)) + locked = 0 + overlays = null + overlays += image('icons/obj/storage.dmi', icon_opened) + code = null + else + code = "ERROR" + else + if((href_list["type"] == "R") && (emagged == 0) && (!l_setshort)) + locked = 1 + overlays = null + code = null + close(usr) + else + code += text("[]", href_list["type"]) + if(length(code) > 5) + code = "ERROR" + add_fingerprint(usr) + for(var/mob/M in viewers(1, loc)) + if((M.client && M.machine == src)) + attack_self(M) + return + return + /obj/item/weapon/storage/secure/can_be_inserted(obj/item/W as obj, stop_messages = 0) if(!locked) return ..() @@ -160,8 +161,10 @@ return 0 /obj/item/weapon/storage/secure/hear_talk(mob/living/M as mob, msg) + return /obj/item/weapon/storage/secure/hear_message(mob/living/M as mob, msg) + return // ----------------------------- // Secure Briefcase @@ -174,7 +177,7 @@ item_state = "sec-case" flags = CONDUCT hitsound = "swing_hit" - force = 8.0 + force = 8 throw_speed = 2 throw_range = 4 w_class = 4 @@ -182,36 +185,36 @@ max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) +/obj/item/weapon/storage/secure/briefcase/New() + ..() + handle_item_insertion(new /obj/item/weapon/paper, 1) + handle_item_insertion(new /obj/item/weapon/pen, 1) - attack_hand(mob/user as mob) - if((src.loc == user) && (src.locked == 1)) - to_chat(usr, "\red [src] is locked and cannot be opened!") - else if((src.loc == user) && (!src.locked)) - playsound(src.loc, "rustle", 50, 1, -5) - if(user.s_active) - user.s_active.close(user) //Close and re-open - src.show_to(user) - else - ..() - for(var/mob/M in range(1)) - if(M.s_active == src) - src.close(M) - src.orient2hud(user) - src.add_fingerprint(user) - return +/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user as mob) + if((loc == user) && (locked == 1)) + to_chat(usr, "[src] is locked and cannot be opened!") + else if((loc == user) && !locked) + playsound(loc, "rustle", 50, 1, -5) + if(user.s_active) + user.s_active.close(user) //Close and re-open + show_to(user) + else + ..() + for(var/mob/M in range(1)) + if(M.s_active == src) + close(M) + orient2hud(user) + add_fingerprint(user) + return //Syndie variant of Secure Briefcase. Contains space cash, slightly more robust. /obj/item/weapon/storage/secure/briefcase/syndie - force = 15.0 + force = 15 /obj/item/weapon/storage/secure/briefcase/syndie/New() + ..() for(var/i = 0, i < storage_slots - 2, i++) - new /obj/item/weapon/spacecash/c1000(src) - return ..() + handle_item_insertion(new /obj/item/weapon/spacecash/c1000, 1) // ----------------------------- // Secure Safe @@ -224,30 +227,17 @@ icon_opened = "safe0" icon_locking = "safeb" icon_sparking = "safespark" - force = 8.0 + force = 8 w_class = 5 max_w_class = 8 - anchored = 1.0 + anchored = 1 density = 0 cant_hold = list("/obj/item/weapon/storage/secure/briefcase") - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) - - attack_hand(mob/user as mob) - return attack_self(user) - -// Clown planet WMD storage -/obj/item/weapon/storage/secure/safe/clown - name="WMD Storage" - -/obj/item/weapon/storage/secure/safe/clown/New() - for(var/i=0;i<10;i++) - new /obj/item/weapon/reagent_containers/food/snacks/pie(src) - - -/obj/item/weapon/storage/secure/safe/HoS/New() +/obj/item/weapon/storage/secure/safe/New() ..() - //new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool) \ No newline at end of file + handle_item_insertion(new /obj/item/weapon/paper, 1) + handle_item_insertion(new /obj/item/weapon/pen, 1) + +/obj/item/weapon/storage/secure/safe/attack_hand(mob/user as mob) + return attack_self(user) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index ae28bd61d17..5dbcc68ab2b 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -80,11 +80,11 @@ /obj/item/weapon/tank/examine(mob/user) if(!..(user, 0)) return - + var/obj/icon = src if(istype(loc, /obj/item/assembly)) icon = loc - + if(!in_range(src, user)) if(icon == src) to_chat(user, "It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.") @@ -141,14 +141,24 @@ ui_interact(user) /obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) +/obj/item/weapon/tank/ui_data(mob/user, datum/topic_state/state = default_state) var/using_internal - if(istype(loc,/mob/living/carbon)) - var/mob/living/carbon/location = loc - if(location.internal==src) + if(iscarbon(loc)) + var/mob/living/carbon/C = loc + if(C.internal == src) using_internal = 1 - // this is the data which will be sent to the ui var/data[0] data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0) data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0) @@ -170,18 +180,7 @@ if(H.head && (H.head.flags & AIRTIGHT)) data["maskConnected"] = 1 - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/item/weapon/tank/Topic(href, href_list) if(..()) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 9f33ea61a04..20f8a0c610f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -105,10 +105,6 @@ if(M.buckled) continue - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.forceMove(src) itemcount++ @@ -411,3 +407,7 @@ ..() visible_message("[src] is blown apart by the bolt of electricity!", "You hear a metallic screeching sound.") qdel(src) + +/obj/structure/closet/get_remote_view_fullscreens(mob/user) + if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 640539e745b..fce3cd376e2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -47,7 +47,6 @@ New() ..() - new /obj/item/weapon/book/manual/faxes(src) new /obj/item/clothing/glasses/sunglasses(src) new /obj/item/clothing/head/hopcap(src) new /obj/item/weapon/cartridge/hop(src) @@ -103,7 +102,6 @@ new /obj/item/weapon/storage/backpack/security(src) else new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/weapon/book/manual/faxes(src) new /obj/item/weapon/cartridge/hos(src) new /obj/item/device/radio/headset/heads/hos/alt(src) new /obj/item/clothing/under/rank/head_of_security(src) diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index f08f0a6f7e5..3c198e4dd08 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -18,10 +18,7 @@ if(L.buckled) L.buckled = 0 L.anchored = 0 - if(L.client) - L.client.perspective = EYE_PERSPECTIVE - L.client.eye = src - L.loc = src + L.forceMove(src) L.disabilities += MUTE health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues intialTox = L.getToxLoss() @@ -74,9 +71,6 @@ M.forceMove(loc) M.disabilities -= MUTE M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE ..() diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm index 6badf7a6535..ffaff75288d 100644 --- a/code/game/objects/structures/crates_lockers/crittercrate.dm +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -25,21 +25,12 @@ for(var/i = 1, i <= amount, i++) new content_mob(loc) already_opened = 1 - ..() + . = ..() /obj/structure/closet/critter/close() ..() return 1 -/obj/structure/closet/critter/attack_hand(mob/user as mob) - src.add_fingerprint(user) - - if(src.loc == user.loc) - to_chat(user, "It won't budge!") - toggle() - else - toggle() - /obj/structure/closet/critter/corgi name = "corgi crate" content_mob = /mob/living/simple_animal/pet/corgi diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 68589112080..49175dfa9e3 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -8,9 +8,7 @@ var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite /obj/structure/mopbucket/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) janitorial_equipment += src /obj/structure/mopbucket/full/New() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index cf5c97ed593..68bd915ac77 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -12,7 +12,7 @@ /obj/structure/morgue name = "morgue" - desc = "Used to keep bodies in untill someone fetches them." + desc = "Used to keep bodies in until someone fetches them." icon = 'icons/obj/stationobjs.dmi' icon_state = "morgue1" density = 1 @@ -154,6 +154,10 @@ src.attack_hand(CM) +/obj/structure/morgue/get_remote_view_fullscreens(mob/user) + if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) + /* * Morgue tray */ @@ -393,6 +397,10 @@ to_chat(CM, "You attempt to slide yourself out of \the [src]...") src.attack_hand(CM) +/obj/structure/crematorium/get_remote_view_fullscreens(mob/user) + if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) + /* * Crematorium tray */ diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 563f9c5faa9..c28ebe05c55 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -113,6 +113,16 @@ repeat = 0 /datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + if(!instrumentObj) + return + + ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, force_open) + if(!ui) + ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500) + ui.open() + ui.set_auto_update(1) + +/datum/song/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["lines"] = lines @@ -125,15 +135,7 @@ data["minTempo"] = world.tick_lag data["maxTempo"] = 600 - if(!instrumentObj) - return - - ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /datum/song/Topic(href, href_list) if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || !usr.canmove || usr.restrained()) @@ -294,6 +296,9 @@ song.ui_interact(user, ui_key, ui, force_open) +/obj/structure/piano/ui_data(mob/user, datum/topic_state/state = default_state) + return song.ui_data(user, state) + /obj/structure/piano/Topic(href, href_list) song.Topic(href, href_list) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index eabfcba148b..fda770705d0 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -147,7 +147,7 @@ if(!(locate(/obj/structure/transit_tube) in loc)) mob.loc = loc mob.client.Move(get_step(loc, direction), direction) - mob.reset_view(null) + mob.reset_perspective(null) //if(moving && istype(loc, /turf/space)) // Todo: If you get out of a moving pod in space, you should move as well. @@ -161,7 +161,7 @@ if(station.icon_state == "open") mob.loc = loc mob.client.Move(get_step(loc, direction), direction) - mob.reset_view(null) + mob.reset_perspective(null) else station.open_animation() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index b27d3f6e4f8..bbbecf6695d 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -420,8 +420,7 @@ H.lip_style = null //Washes off lipstick H.lip_color = initial(H.lip_color) H.regenerate_icons() - user.drowsyness -= rand(2,3) //Washing your face wakes you up if you're falling asleep - user.drowsyness = Clamp(user.drowsyness, 0, INFINITY) + user.AdjustDrowsy(-rand(2,3)) //Washing your face wakes you up if you're falling asleep else user.clean_blood() @@ -459,4 +458,3 @@ icon_state = "puddle-splash" ..() icon_state = "puddle" - diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 121228b4d3f..a4ca220e5dd 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -73,7 +73,6 @@ var/ert_request_answered = 0 return 0 /mob/dead/observer/proc/JoinResponseTeam() - if(!send_emergency_team) to_chat(src, "No emergency response team is currently being sent.") return 0 @@ -82,35 +81,23 @@ var/ert_request_answered = 0 to_chat(src, "You are jobbanned from the emergency reponse team!") return 0 - var/player_age_check = check_client_age(src.client, responseteam_age) + var/player_age_check = check_client_age(client, responseteam_age) if(player_age_check && config.use_age_restriction_for_antags) to_chat(src, "This role is not yet available to you. You need to wait another [player_age_check] days.") return 0 - if(src.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(has_enabled_antagHUD == 1 && config.antag_hud_restricted) to_chat(src, "Upon using the antagHUD you forfeited the ability to join the round.") return 0 if(response_team_members.len > 6) to_chat(src, "The emergency response team is already full!") return 0 - - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "Response Team") - L.name = null - if(!src.client) - return - spawn(-1) - var/client/C = src.client - var/mob/living/carbon/human/new_commando = C.create_response_team(L.loc) - qdel(L) - new_commando.mind.key = src.key - new_commando.key = src.key - new_commando.update_icons() - return 1 + + return 1 /proc/trigger_armed_response_team(var/datum/response_team/response_team_type) - + response_team_members = list() active_team = response_team_type send_emergency_team = 1 @@ -118,24 +105,41 @@ var/ert_request_answered = 0 if(!ert_candidates.len) active_team.cannot_send_team() send_emergency_team = 0 - return - var/teamsize = 0 + return 0 + // Respawnable players get first dibs - for(var/mob/dead/observer/M in (ert_candidates & respawnable_list)) - teamsize += M.JoinResponseTeam() + for(var/mob/dead/observer/M in ert_candidates) + if((M in respawnable_list) && M.JoinResponseTeam()) + response_team_members |= M // If there's still open slots, non-respawnable players can fill them for(var/mob/dead/observer/M in (ert_candidates - respawnable_list)) - teamsize += M.JoinResponseTeam() - send_emergency_team = 0 - if (!teamsize) + if(M.JoinResponseTeam()) + response_team_members |= M + + if(!response_team_members.len) active_team.cannot_send_team() - return - active_team.announce_team() + send_emergency_team = 0 + return 0 -/client/proc/create_response_team(obj/spawn_location) + var/index = 1 + for(var/mob/M in response_team_members) + if(index > emergencyresponseteamspawn.len) + index = 1 + + var/client/C = M.client + var/mob/living/carbon/human/new_commando = C.create_response_team(emergencyresponseteamspawn[index]) + new_commando.mind.key = M.key + new_commando.key = M.key + new_commando.update_icons() + index++ + + send_emergency_team = 0 + active_team.announce_team() + return 1 + +/client/proc/create_response_team(var/turf/spawn_location) var/mob/living/carbon/human/M = new(null) var/obj/item/organ/external/head/head_organ = M.get_organ("head") - response_team_members |= M var/new_gender = alert(src, "Please select your gender.", "ERT Character Generation", "Male", "Female") @@ -157,15 +161,6 @@ var/ert_request_answered = 0 var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black - var/hair_style = "Bald" - var/facial_hair_style = "Shaved" - if(M.gender == MALE) - hair_style = pick(hair_styles_male_list) - facial_hair_style = pick(facial_hair_styles_list) - else - hair_style = pick(hair_styles_female_list) - if(prob(5)) - facial_hair_style = pick(facial_hair_styles_list) head_organ.r_facial = color2R(hair_c) head_organ.g_facial = color2G(hair_c) @@ -175,12 +170,14 @@ var/ert_request_answered = 0 head_organ.b_hair = color2B(hair_c) M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c)) M.s_tone = skin_tone - head_organ.h_style = hair_style - head_organ.f_style = facial_hair_style + head_organ.h_style = random_hair_style(M.gender, head_organ.species.name) + head_organ.f_style = random_facial_hair_style(M.gender, head_organ.species.name) M.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]" M.name = M.real_name M.age = rand(23,35) + M.regenerate_icons() + M.update_body() //Creates mind stuff. M.mind = new @@ -190,7 +187,7 @@ var/ert_request_answered = 0 M.mind.special_role = SPECIAL_ROLE_ERT if(!(M.mind in ticker.minds)) ticker.minds += M.mind //Adds them to regular mind list. - M.loc = spawn_location + M.forceMove(spawn_location) active_team.equip_officer(class, M) diff --git a/code/game/sound.dm b/code/game/sound.dm index fe5e361f16a..ed5f0d15b4c 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -40,7 +40,7 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, S) /mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, sound/S) - if(!src.client || ear_deaf > 0) + if(!src.client || !can_hear()) return if(!S) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index dcc05e5acfe..761e05f60c3 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -220,8 +220,13 @@ icon_state="catwalk[dirs]" /turf/simulated/floor/plating/airless/catwalk/attackby(obj/item/C, mob/user, params) + if(istype(C, /obj/item/stack/rods)) + return 1 + else if(istype(C, /obj/item/stack/tile)) + return 1 + if(..()) - return + return 1 if(!broken && isscrewdriver(C)) to_chat(user, "You unscrew the catwalk's rods.") diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index d1fb0326466..cb7cd8be813 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -23,7 +23,7 @@ var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through. var/engraving, engraving_quality //engraving on the wall - + var/sheet_type = /obj/item/stack/sheet/metal var/obj/item/stack/sheet/builtin_sheet = null @@ -39,16 +39,14 @@ /turf/simulated/wall/New() ..() - builtin_sheet = new sheet_type - + builtin_sheet = new sheet_type + /turf/simulated/wall/BeforeChange() - for(var/obj/effect/E in src) - // such quality code - if(E.name == "Wallrot") - qdel(E) + for(var/obj/effect/overlay/wall_rot/WR in src) + qdel(WR) . = ..() - + //Appearance /turf/simulated/wall/examine(mob/user) . = ..(user) @@ -139,7 +137,7 @@ O.loc = src ChangeTurf(/turf/simulated/floor/plating) - + /turf/simulated/wall/proc/break_wall() builtin_sheet.amount = 2 builtin_sheet.loc = src @@ -187,21 +185,12 @@ var/number_rots = rand(2,3) for(var/i=0, iYou burn away the fungi with \the [WT].") playsound(src, 'sound/items/Welder.ogg', 10, 1) - for(var/obj/effect/E in src) if(E.name == "Wallrot") - qdel(E) + for(var/obj/effect/overlay/wall_rot/WR in src) + qdel(WR) rotting = 0 return else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 1dbda894c52..49cfa1ace0f 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -29,8 +29,8 @@ if( WT.remove_fuel(0,user) ) to_chat(user, "You burn away the fungi with \the [WT].") playsound(src, 'sound/items/Welder.ogg', 10, 1) - for(var/obj/effect/E in src) if(E.name == "Wallrot") - qdel(E) + for(var/obj/effect/overlay/wall_rot/WR in src) + qdel(WR) rotting = 0 return else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 2c896f3dbdf..38abe4b5fd0 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -32,7 +32,7 @@ var/global/admin_ooc_colour = "#b82e00" if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use OOC (muted).") return - if(handle_spam_prevention(msg, MUTE_OOC)) + if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN)) return if(findtext(msg, "byond://")) to_chat(src, "Advertising other servers is not allowed.") @@ -61,16 +61,24 @@ var/global/admin_ooc_colour = "#b82e00" for(var/client/C in clients) if(C.prefs.toggles & CHAT_OOC) var/display_name = src.key + if(prefs.unlock_content) if(prefs.toggles & MEMBER_PUBLIC) var/icon/byond = icon('icons/member_content.dmi', "blag") display_name = "[bicon(byond)][display_name]" + + if(donator_level >= DONATOR_LEVEL_ONE) + if((prefs.toggles & DONATOR_PUBLIC)) + var/icon/donator = icon('icons/ooc_tag_16x.dmi', "donator") + display_name = "[bicon(donator)][display_name]" + if(holder) if(holder.fakekey) if(C.holder) display_name = "[holder.fakekey]/([src.key])" else display_name = holder.fakekey + to_chat(C, "OOC: [display_name]: [msg]") /proc/toggle_ooc() @@ -168,7 +176,7 @@ var/global/admin_ooc_colour = "#b82e00" if(prefs.muted & MUTE_OOC) to_chat(src, "You cannot use LOOC (muted).") return - if(handle_spam_prevention(msg,MUTE_OOC)) + if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN)) return if(findtext(msg, "byond://")) to_chat(src, "Advertising other servers is not allowed.") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ebd71d17374..3350a9f4432 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1,6 +1,5 @@ var/global/BSACooldown = 0 -var/global/floorIsLava = 0 var/global/nologevent = 0 //////////////////////////////// @@ -540,9 +539,9 @@ var/global/nologevent = 0 world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay) /datum/admins/proc/announce() - set category = "Special Verbs" + set category = "Admin" set name = "Announce" - set desc="Announce your desires to the world" + set desc = "Announce your desires to the world" if(!check_rights(R_ADMIN)) return @@ -1003,3 +1002,22 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space qdel(frommob) return 1 + +// Returns a list of the number of admins in various categories +// result[1] is the number of staff that match the rank mask and are active +// result[2] is the number of staff that do not match the rank mask +// result[3] is the number of staff that match the rank mask and are inactive +/proc/staff_countup(rank_mask = R_BAN) + var/list/result = list(0, 0, 0) + for(var/client/X in admins) + if(rank_mask && !check_rights_for(X, rank_mask)) + result[2]++ + continue + if(X.holder.fakekey) + result[2]++ + continue + if(X.is_afk()) + result[3]++ + continue + result[1]++ + return result diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 4b6dbd3a9a9..cb8a1bbd6a9 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -536,7 +536,7 @@ var/list/admin_verbs_snpc = list( #undef AUTOBANTIME /client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE - set category = "Special Verbs" + set category = "Event" set name = "Drop Bomb" set desc = "Cause an explosion of varying strength at your location." diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm index 87721320af5..72461ed6ae1 100644 --- a/code/modules/admin/buildmode.dm +++ b/code/modules/admin/buildmode.dm @@ -396,7 +396,8 @@ /proc/togglebuildmode(mob/M as mob in player_list) set name = "Toggle Build Mode" - set category = "Special Verbs" + set category = "Event" + if(M.client) if(istype(M.client.click_intercept,/datum/click_intercept/buildmode)) var/datum/click_intercept/buildmode/B = M.client.click_intercept @@ -404,7 +405,7 @@ log_admin("[key_name(usr)] has left build mode.") else new/datum/click_intercept/buildmode(M.client) - message_admins("[key_name(usr)] has entered build mode.") + message_admins("[key_name_admin(usr)] has entered build mode.") log_admin("[key_name(usr)] has entered build mode.") /datum/click_intercept/buildmode/InterceptClickOn(user,params,atom/object) //Click Intercept diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fbdeca51e8d..ef87ffe8820 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1597,11 +1597,11 @@ to_chat(usr, "This can only be used on instances of type /mob/living") return - if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") + if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") return if(BSACooldown) - to_chat(src.owner, "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!") + to_chat(owner, "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!") return BSACooldown = 1 @@ -1609,28 +1609,23 @@ BSACooldown = 0 to_chat(M, "You've been hit by bluespace artillery!") - log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(src.owner)]") - message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(src.owner)]") - - var/obj/effect/stop/S - S = new /obj/effect/stop - S.victim = M - S.loc = M.loc - spawn(20) - qdel(S) + log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(owner)]") + message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(owner)]") var/turf/simulated/floor/T = get_turf(M) if(istype(T)) - if(prob(80)) T.break_tile_to_plating() - else T.break_tile() + if(prob(80)) + T.break_tile_to_plating() + else + T.break_tile() - if(M.health == 1) + if(M.health <= 1) M.gib() else - M.adjustBruteLoss( min( 99 , (M.health - 1) ) ) + M.adjustBruteLoss(min(99,(M.health - 1))) M.Stun(20) M.Weaken(20) - M.stuttering = 20 + M.Stuttering(20) else if(href_list["CentcommReply"]) if(!check_rights(R_ADMIN)) @@ -2241,14 +2236,6 @@ qdel(O) for(var/obj/structure/grille/O in world) qdel(O) -/* for(var/obj/machinery/vehicle/pod/O in world) - for(var/mob/M in src) - M.loc = src.loc - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = M - qdel(O) - ok = 1*/ if("monkey") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","M") @@ -2492,18 +2479,20 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","LO") message_admins("[key_name_admin(usr)] has broke a lot of lights", 1) - lightsout(1,2) + var/datum/event/electrical_storm/E = new /datum/event/electrical_storm + E.lightsoutAmount = 2 if("blackout") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","BO") message_admins("[key_name_admin(usr)] broke all lights", 1) - lightsout(0,0) + for(var/obj/machinery/light/L in machines) + L.broken() if("whiteout") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","WO") - for(var/obj/machinery/light/L in world) - L.fix() message_admins("[key_name_admin(usr)] fixed all lights", 1) + for(var/obj/machinery/light/L in machines) + L.fix() if("floorlava") feedback_inc("admin_secrets_fun_used", 1) feedback_add_details("admin_secrets_fun_used", "LF") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index d78ef5dcde3..c17671995ff 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -24,7 +24,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(!msg) return - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) return msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN)) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index d711a3f5910..63241ce43c5 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -99,7 +99,7 @@ adminhelp(msg) //admin we are replying to has vanished, adminhelp instead return - if(src.handle_spam_prevention(msg,MUTE_ADMINHELP)) + if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) return //clean the message if it's not sent by a high-rank admin diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 67130872222..7c7569e5907 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -1,5 +1,5 @@ /client/proc/cmd_admin_say(msg as text) - set category = "Special Verbs" + set category = "Admin" set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite set hidden = 1 if(!check_rights(R_ADMIN)) return @@ -17,7 +17,7 @@ feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_mentor_say(msg as text) - set category = "Special Verbs" + set category = "Admin" set name = "Msay" set hidden = 1 diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 690cac87536..3874e26e9de 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -1,5 +1,5 @@ /client/proc/dsay(msg as text) - set category = "Special Verbs" + set category = "Admin" set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite set hidden = 1 diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index a64486b440c..59ea8992889 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -934,11 +934,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that for(var/obj/item/briefcase_item in sec_briefcase) qdel(briefcase_item) for(var/i=3, i>0, i--) - sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000 - sec_briefcase.contents += new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow - sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba - sec_briefcase.contents += new /obj/item/ammo_box/a357 - sec_briefcase.contents += new /obj/item/weapon/grenade/plastic/c4 + sec_briefcase.handle_item_insertion(new /obj/item/weapon/spacecash/c1000, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/gun/projectile/revolver/mateba, 1) + sec_briefcase.handle_item_insertion(new /obj/item/ammo_box/a357, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/grenade/plastic/c4, 1) // briefcase must be unlocked by setting the code. M.equip_to_slot_or_del(sec_briefcase, slot_l_hand) var/obj/item/weapon/implant/dust/DUST = new /obj/item/weapon/implant/dust(M) diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm index fb93cd3512d..6ebd6b1256a 100644 --- a/code/modules/admin/verbs/freeze.dm +++ b/code/modules/admin/verbs/freeze.dm @@ -7,13 +7,15 @@ //////////////////////////////////////////////////////////////////////////////// var/global/list/frozen_mob_list = list() /client/proc/freeze(var/mob/living/M as mob in mob_list) - set category = "Special Verbs" + set category = "Admin" set name = "Freeze" - if(!holder) - to_chat(src, "Error: Freeze: Only administrators may use this command.") + + if(!check_rights(R_ADMIN)) return - if(!istype(M)) return - if(!check_rights(R_ADMIN)) return + + if(!istype(M)) + return + if(M in frozen_mob_list) M.admin_unFreeze(src) else @@ -36,7 +38,7 @@ var/global/list/frozen_mob_list = list() anchored = 1 frozen = AO admin_prev_sleeping = sleeping - sleeping += 20000 + AdjustSleeping(20000) if(!(src in frozen_mob_list)) frozen_mob_list += src @@ -49,7 +51,7 @@ var/global/list/frozen_mob_list = list() anchored = 0 overlays -= frozen frozen = null - sleeping = admin_prev_sleeping + SetSleeping(admin_prev_sleeping) admin_prev_sleeping = null if(src in frozen_mob_list) frozen_mob_list -= src @@ -83,14 +85,15 @@ var/global/list/frozen_mob_list = list() //////////////////////////Freeze Mech /client/proc/freezemecha(var/obj/mecha/O as obj in mechas_list) - set category = "Special Verbs" + set category = "Admin" set name = "Freeze Mech" - if(!holder) - to_chat(src, "Only administrators may use this command.") - return + + if(!check_rights(R_ADMIN)) + return + var/obj/mecha/M = O if(!istype(M,/obj/mecha)) - to_chat(src, "This can only be used on Mechs!") + to_chat(src, "This can only be used on mechs!") return else if(usr) diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index e49a2f72939..86a899ab847 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -21,8 +21,8 @@ var/global/sent_syndicate_infiltration_team = 0 var/pick_manually = 0 if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.",,"Yes","No")=="Yes") pick_manually = 1 - var/list/teamsizeoptions = list(1,2,3,4,5) - var/teamsize = input(src, "How many team members, not counting the team leader?") as null|anything in teamsizeoptions + var/list/teamsizeoptions = list(2,3,4,5,6) + var/teamsize = input(src, "How many team members, including the team leader?") as null|anything in teamsizeoptions if(!(teamsize in teamsizeoptions)) alert("Invalid team size specified. Aborting.") return @@ -102,11 +102,11 @@ var/global/sent_syndicate_infiltration_team = 0 to_chat(new_syndicate_infiltrator, "As team leader, it is up to you to organize your team! Give the job to someone else if you can't handle it. Only your ID opens the exit door.") else to_chat(new_syndicate_infiltrator, "Your team leader is: [team_leader]. They are in charge!") - teamsize-- + teamsize-- to_chat(new_syndicate_infiltrator, "You have more helpful information stored in your Notes.") new_syndicate_infiltrator.mind.store_memory("Mission: [input] ") new_syndicate_infiltrator.mind.store_memory("Team Leader: [team_leader] ") - new_syndicate_infiltrator.mind.store_memory("Starting Equipment:
- Chameleon Jumpsuit ((right click to Change Color))
- Agent ID card ((disguise as another job))
- Uplink Implant ((top left of screen))
- Dust Implant ((destroys your body on death))
- Combat Gloves ((insulated, disguised as black gloves))
- Anything bought with your uplink implant") + new_syndicate_infiltrator.mind.store_memory("Starting Equipment:
- Syndicate Headset ((.h for your radio))
- Chameleon Jumpsuit ((right click to Change Color))
- Agent ID card ((disguise as another job))
- Uplink Implant ((top left of screen))
- Dust Implant ((destroys your body on death))
- Combat Gloves ((insulated, disguised as black gloves))
- Anything bought with your uplink implant") var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS] opshud.join_hud(new_syndicate_infiltrator.mind.current) ticker.mode.set_antag_hud(new_syndicate_infiltrator.mind.current, "hudoperative") @@ -145,8 +145,7 @@ var/global/sent_syndicate_infiltration_team = 0 var/datum/preferences/A = new() //Randomize appearance A.real_name = syndicate_infiltrator_name A.copy_to(new_syndicate_infiltrator) - - new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator) //Creates DNA. + new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator) //Creates mind stuff. new_syndicate_infiltrator.mind_initialize() @@ -154,7 +153,6 @@ var/global/sent_syndicate_infiltration_team = 0 new_syndicate_infiltrator.mind.special_role = "Syndicate Infiltrator" ticker.mode.traitors |= new_syndicate_infiltrator.mind //Adds them to extra antag list new_syndicate_infiltrator.equip_syndicate_infiltrator(syndicate_leader_selected, uplink_tc, is_mgmt) - qdel(spawn_location) return new_syndicate_infiltrator // --------------------------------------------------------------------------------------------------------- @@ -180,9 +178,6 @@ var/global/sent_syndicate_infiltration_team = 0 U.hidden_uplink.uses = 500 else U.hidden_uplink.uses = num_tc - // Storage - //var/obj/item/weapon/implant/storage/T = new /obj/item/weapon/implant/storage(src) - //T.implant(src) // Dust var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(src) D.implant(src) @@ -196,7 +191,7 @@ var/global/sent_syndicate_infiltration_team = 0 // Other gear equip_to_slot_or_del(new /obj/item/clothing/shoes/syndigaloshes(src), slot_shoes) - var/obj/item/weapon/card/id/syndicate/W = new(src) //Untrackable by AI + var/obj/item/weapon/card/id/syndicate/W = new(src) if (flag_mgmt) W.icon_state = "commander" else diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index b8ab9c23853..e9648119f42 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -269,8 +269,12 @@ client/proc/one_click_antag() return 1 /datum/admins/proc/makeAliens() - alien_infestation(3) - return 1 + var/datum/event/alien_infestation/E = new /datum/event/alien_infestation + E.spawncount = 3 + // TODO The fact we have to do this rather than just have events start + // when we ask them to, is bad. + E.processing = TRUE + return TRUE /* /datum/admins/proc/makeSpaceNinja() diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 03365b38385..486b95f5a1b 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -9,7 +9,7 @@ if(usr.client.prefs.muted & MUTE_PRAY) to_chat(usr, "\red You cannot pray (muted).") return - if(src.client.handle_spam_prevention(msg,MUTE_PRAY)) + if(client.handle_spam_prevention(msg, MUTE_PRAY, OOC_COOLDOWN)) return var/image/cross = image('icons/obj/storage.dmi',"bible") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b776eb9a649..79ee34fb635 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -139,7 +139,7 @@ feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_godmode(mob/M as mob in mob_list) - set category = "Special Verbs" + set category = "Admin" set name = "Godmode" if(!check_rights(R_ADMIN)) @@ -287,7 +287,7 @@ Works kind of like entering the game with a new character. Character receives a Traitors and the like can also be revived with the previous role mostly intact. /N */ /client/proc/respawn_character() - set category = "Special Verbs" + set category = "Event" set name = "Respawn Character" set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into." @@ -520,7 +520,7 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list) - set category = "Special Verbs" + set category = "Event" set name = "Rejuvenate" if(!check_rights(R_REJUVINATE)) @@ -659,7 +659,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return /client/proc/cmd_admin_emp(atom/O as obj|mob|turf in view()) - set category = "Special Verbs" + set category = "Event" set name = "EM Pulse" if(!check_rights(R_DEBUG|R_EVENT)) @@ -682,7 +682,7 @@ Traitors and the like can also be revived with the previous role mostly intact. return /client/proc/cmd_admin_gib(mob/M as mob in mob_list) - set category = "Special Verbs" + set category = "Admin" set name = "Gib" if(!check_rights(R_ADMIN|R_EVENT)) @@ -722,7 +722,7 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list) - set category = "Special Verbs" + set category = "Admin" set name = "Check Contents" if(!check_rights(R_ADMIN)) @@ -734,7 +734,7 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/toggle_view_range() - set category = "Special Verbs" + set category = "Admin" set name = "Change View Range" set desc = "switches between 1x and custom views" @@ -806,7 +806,7 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("[key_name_admin(usr)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.") /client/proc/cmd_admin_attack_log(mob/M as mob in mob_list) - set category = "Special Verbs" + set category = "Admin" set name = "Attack Log" if(!check_rights(R_ADMIN)) @@ -875,7 +875,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Reset Telecomms Scripts" set desc = "Blanks all telecomms scripts from all telecomms servers" - if(!check_rights(R_ADMIN, 1, src)) + if(!check_rights(R_ADMIN)) return var/confirm = alert(src, "You sure you want to blank all NTSL scripts?", "Confirm", "Yes", "No") diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 00263352325..9eb71904de5 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -7,18 +7,26 @@ var/last_fire = 0 var/reload_cooldown = 180 // 3 minute cooldown var/area/targetarea - + light_color = LIGHT_COLOR_LIGHTBLUE /obj/machinery/computer/artillerycontrol/attack_ai(user as mob) to_chat(user, "Access denied.") return - + /obj/machinery/computer/artillerycontrol/attack_hand(user as mob) ui_interact(user) - + /obj/machinery/computer/artillerycontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/computer/artillerycontrol/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + var/time_to_wait = round(reload_cooldown - ((world.time / 10) - last_fire), 1) var/mins = round(time_to_wait / 60) var/seconds = time_to_wait - (60*mins) @@ -30,32 +38,26 @@ else data["target"] = "No Lock" - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + return data - if(!ui) - ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) - /obj/machinery/computer/artillerycontrol/Topic(href, href_list) if(..()) return 1 - - if(href_list["area"]) + + if(href_list["area"]) var/A A = input("Select the target area.", "Select Area", A) in ghostteleportlocs|null var/area/thearea = ghostteleportlocs[A] if(..() || !istype(thearea)) return - + targetarea = thearea - + if(href_list["fire"]) var/delta = (world.time / 10) - last_fire if(reload_cooldown > delta) return 1 - + command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1) var/list/L = list() @@ -64,7 +66,7 @@ var/loc = pick(L) explosion(loc,2,5,11) last_fire = world.time / 10 - + nanomanager.update_uis(src) /obj/structure/artilleryplaceholder diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index c1cbd07daee..bb243c3e6aa 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -4,8 +4,9 @@ //////////////// var/datum/admins/holder = null - var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming. - var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent. + var/last_message = "" //contains the last message sent by this client - used to protect against copy-paste spamming. + var/last_message_count = 0 //contains a number of how many times a message identical to last_message was sent. + var/last_message_time = 0 //holds the last time (based on world.time) a message was sent ///////// //OTHER// @@ -88,4 +89,7 @@ // Their chat window, sort of important. // See /goon/code/datums/browserOutput.dm - var/datum/chatOutput/chatOutput \ No newline at end of file + var/datum/chatOutput/chatOutput + + // Donator stuff. + var/donator_level = DONATOR_LEVEL_NONE \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 7a668e375fc..0209b16c40e 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -233,19 +233,25 @@ return 0 return 1 -/client/proc/handle_spam_prevention(var/message, var/mute_type) - if(config.automute_on && !holder && src.last_message == message) - src.last_message_count++ - if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE) - to_chat(src, "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied.") - cmd_admin_mute(src.mob, mute_type, 1) +/client/proc/handle_spam_prevention(var/message, var/mute_type, var/throttle = 0) + if(throttle) + if((last_message_time + throttle > world.time) && !check_rights(R_ADMIN, 0)) + var/wait_time = round(((last_message_time + throttle) - world.time) / 10, 1) + to_chat(src, "You are sending messages to quickly. Please wait [wait_time] [wait_time == 1 ? "second" : "seconds"] before sending another message.") return 1 - if(src.last_message_count >= SPAM_TRIGGER_WARNING) - to_chat(src, "\red You are nearing the spam filter limit for identical messages.") + last_message_time = world.time + if(config.automute_on && !check_rights(R_ADMIN, 0) && last_message == message) + last_message_count++ + if(last_message_count >= SPAM_TRIGGER_AUTOMUTE) + to_chat(src, "You have exceeded the spam filter limit for identical messages. An auto-mute was applied.") + cmd_admin_mute(mob, mute_type, 1) + return 1 + if(last_message_count >= SPAM_TRIGGER_WARNING) + to_chat(src, "You are nearing the spam filter limit for identical messages.") return 0 else last_message = message - src.last_message_count = 0 + last_message_count = 0 return 0 //This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc. @@ -299,6 +305,8 @@ admins += src holder.owner = src + donator_check() + //preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum) prefs = preferences_datums[ckey] if(!prefs) @@ -372,10 +380,27 @@ return ..() +/client/proc/donator_check() + if(IsGuestKey(key)) + return + + establish_db_connection() + if(!dbcon.IsConnected()) + return + + //Donator stuff. + var/DBQuery/query_donor_select = dbcon.NewQuery("SELECT ckey, tier, active FROM `[format_table_name("donators")]` WHERE ckey = '[ckey]'") + query_donor_select.Execute() + while(query_donor_select.NextRow()) + if(!text2num(query_donor_select.item[3])) + // Inactive donator. + donator_level = DONATOR_LEVEL_NONE + return + donator_level = text2num(query_donor_select.item[2]) + break /client/proc/log_client_to_db() - - if( IsGuestKey(src.key) ) + if(IsGuestKey(key)) return establish_db_connection() @@ -412,7 +437,7 @@ var/watchreason = check_watchlist(ckey) if(watchreason) message_admins("Notice: [key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]") - send2adminirc("Watchlist - [key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]") + send2irc(config.admin_notify_irc, "Watchlist - [key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]") //Just the standard check to see if it's actually a number if(sql_id) diff --git a/code/modules/client/preference/loadout/loadout.dm b/code/modules/client/preference/loadout/loadout.dm index 010fc54564c..b42c5d5abf1 100644 --- a/code/modules/client/preference/loadout/loadout.dm +++ b/code/modules/client/preference/loadout/loadout.dm @@ -4,6 +4,7 @@ var/list/gear_datums = list() /datum/loadout_category var/category = "" var/list/gear = list() + var/donor_only = FALSE /datum/loadout_category/New(cat) category = cat @@ -33,6 +34,8 @@ var/list/gear_datums = list() if(!loadout_categories[use_category]) loadout_categories[use_category] = new /datum/loadout_category(use_category) var/datum/loadout_category/LC = loadout_categories[use_category] + if(initial(G.donor_only)) + LC.donor_only = TRUE gear_datums[use_name] = new geartype LC.gear[use_name] = gear_datums[use_name] @@ -54,6 +57,7 @@ var/list/gear_datums = list() var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned. var/subtype_path = /datum/gear //for skipping organizational subtypes (optional) var/subtype_cost_overlap = TRUE //if subtypes can take points at the same time + var/donor_only = FALSE // if it's only available to donors /datum/gear/New() ..() @@ -76,4 +80,4 @@ var/list/gear_datums = list() var/item = new gd.path(gd.location) for(var/datum/gear_tweak/gt in gear_tweaks) gt.tweak_item(item, metadata["[gt]"]) - return item \ No newline at end of file + return item diff --git a/code/modules/client/preference/loadout/loadout_donor.dm b/code/modules/client/preference/loadout/loadout_donor.dm new file mode 100644 index 00000000000..edf7e173730 --- /dev/null +++ b/code/modules/client/preference/loadout/loadout_donor.dm @@ -0,0 +1,90 @@ +/datum/gear/donor + donor_only = TRUE + sort_category = "Donor" + subtype_path = /datum/gear/donor + +/datum/gear/donor/furgloves + display_name = "Fur Gloves" + path = /obj/item/clothing/gloves/furgloves + +/datum/gear/donor/furboots + display_name = "Fur Boots" + path = /obj/item/clothing/shoes/furboots + +/datum/gear/donor/noble_boot + display_name = "Noble Boots" + path = /obj/item/clothing/shoes/fluff/noble_boot + +/datum/gear/donor/furcape + display_name = "Fur Cape" + path = /obj/item/clothing/suit/furcape + cost = 2 + +/datum/gear/donor/furcoat + display_name = "Fur Coat" + path = /obj/item/clothing/suit/furcoat + cost = 2 + +/datum/gear/donor/lord_admiral + display_name = "Lord Admiral Coat" + path = /obj/item/clothing/suit/lordadmiral + +/datum/gear/donor/lord_admiral_hat + display_name = "Lord Admiral Hat" + path = /obj/item/clothing/head/lordadmiralhat + +/datum/gear/donor/kamina + display_name = "Spiky Orange-tinted Shades" + path = /obj/item/clothing/glasses/fluff/kamina + +/datum/gear/donor/green + display_name = "Spiky Green-tinted Shades" + path = /obj/item/clothing/glasses/fluff/kamina/green + +/datum/gear/donor/hipster + display_name = "Hipster Glasses" + path = /obj/item/clothing/glasses/regular/hipster + +/datum/gear/donor/threedglasses + display_name = "Threed Glasses" + path = /obj/item/clothing/glasses/threedglasses + +/datum/gear/donor/blacksombrero + display_name = "Black Sombrero" + path = /obj/item/clothing/head/fluff/blacksombrero + +/datum/gear/donor/guardhelm + display_name = "Plastic Guard helm" + path = /obj/item/clothing/head/fluff/guardhelm + +/datum/gear/donor/goldtophat + display_name = "Gold-trimmed Top Hat" + path = /obj/item/clothing/head/fluff/goldtophat + +/datum/gear/donor/goldtophat/red + display_name = "Red Gold-trimmed Top Hat" + path = /obj/item/clothing/head/fluff/goldtophat/red + +/datum/gear/donor/goldtophat/blue + display_name = "Blue Gold-trimmed Top Hat" + path = /obj/item/clothing/head/fluff/goldtophat/blue + +/datum/gear/donor/mushhat + display_name = "Mushroom Hat" + path = /obj/item/clothing/head/fluff/mushhat + +/datum/gear/donor/furcap + display_name = "Fur Cap" + path = /obj/item/clothing/head/furcap + +/datum/gear/donor/mouse + display_name = "Mouse Headband" + path = /obj/item/clothing/head/kitty/mouse + +/datum/gear/donor/fawkes + display_name = "Guy Fawkes mask" + path = /obj/item/clothing/mask/fawkes + +/datum/gear/donor/noble_clothes + display_name = "Noble Clothes" + path = /obj/item/clothing/under/noble_clothes diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 72ec8f101d2..c049852e3be 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -61,7 +61,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts #define MAX_SAVE_SLOTS 20 // Save slots for regular players #define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members -#define MAX_GEAR_COST config.max_loadout_points #define TAB_CHAR 0 #define TAB_GAME 1 @@ -73,6 +72,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used // var/savefile_version = 0 var/max_save_slots = MAX_SAVE_SLOTS + var/max_gear_slots = 0 //non-preference stuff var/warns = 0 @@ -212,11 +212,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts /datum/preferences/New(client/C) b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") + + max_gear_slots = config.max_loadout_points if(istype(C)) if(!IsGuestKey(C.key)) unlock_content = C.IsByondMember() if(unlock_content) max_save_slots = MAX_SAVE_SLOTS_MEMBER + if(C.donator_level >= DONATOR_LEVEL_ONE) + max_gear_slots += 5 + var/loaded_preferences_successfully = load_preferences(C) if(loaded_preferences_successfully) if(load_character(C)) @@ -249,7 +254,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts switch(current_tab) if(TAB_CHAR) // Character Settings - dat += "
" + dat += "
" dat += "
" dat += "Name: " dat += "[real_name]" @@ -428,6 +433,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "OOC notes: Edit
" if(unlock_content) dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" + if(user.client.donator_level >= DONATOR_LEVEL_ONE) + dat += "Donator Publicity: [(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]
" dat += "Randomized character slot: [randomslot ? "Yes" : "No"]
" dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
" @@ -464,14 +471,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts total_cost += G.cost var/fcolor = "#3366CC" - if(total_cost < MAX_GEAR_COST) + if(total_cost < max_gear_slots) fcolor = "#E67300" dat += "" - dat += "" + dat += "" dat += "
[total_cost]/[MAX_GEAR_COST] loadout points spent. \[Clear Loadout\]
[total_cost]/[max_gear_slots] loadout points spent. \[Clear Loadout\]
" var/firstcat = 1 for(var/category in loadout_categories) + var/datum/loadout_category/LC = loadout_categories[category] + if(LC.donor_only) + if(user.client.donator_level < DONATOR_LEVEL_TWO) // level two donators get the donator loadout, so don't show it to anyone with less than that + continue if(firstcat) firstcat = 0 else @@ -1097,6 +1108,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(TG.display_name in gear) gear -= TG.display_name else + if(TG.donor_only) + if(user.client.donator_level < DONATOR_LEVEL_TWO) // donator items are locked to > tier 2 + //they normally can't even get this far- but just in case of href exploits, we check them here + return var/total_cost = 0 var/list/type_blacklist = list() for(var/gear_name in gear) @@ -1108,7 +1123,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts type_blacklist += G.subtype_path total_cost += G.cost - if((total_cost + TG.cost) <= MAX_GEAR_COST) + if((total_cost + TG.cost) <= max_gear_slots) gear += TG.display_name else if(href_list["gear"] && href_list["tweak"]) @@ -1875,6 +1890,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(unlock_content) toggles ^= MEMBER_PUBLIC + if("donor_public") + if(user.client.donator_level >= DONATOR_LEVEL_ONE) + toggles ^= DONATOR_PUBLIC + if("gender") if(gender == MALE) gender = FEMALE @@ -2079,37 +2098,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts I.robotize() character.dna.b_type = b_type - if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT) - character.dna.SetSEState(FATBLOCK,1,1) - character.mutations += FAT - character.mutations += OBESITY - character.overeatduration = 600 - - if(disabilities & DISABILITY_FLAG_NEARSIGHTED) - character.dna.SetSEState(GLASSESBLOCK,1,1) - character.disabilities|=NEARSIGHTED - - if(disabilities & DISABILITY_FLAG_EPILEPTIC) - character.dna.SetSEState(EPILEPSYBLOCK,1,1) - character.disabilities|=EPILEPSY - - if(disabilities & DISABILITY_FLAG_DEAF) - character.dna.SetSEState(DEAFBLOCK,1,1) - character.disabilities|=DEAF - - if(disabilities & DISABILITY_FLAG_BLIND) - character.dna.SetSEState(BLINDBLOCK,1,1) - character.disabilities|=BLIND - - if(disabilities & DISABILITY_FLAG_MUTE) - character.dna.SetSEState(MUTEBLOCK,1,1) - character.disabilities |= MUTE - - S.handle_dna(character) - - if(character.dna.dirtySE) - character.dna.UpdateSE() - domutcheck(character) // Wheelchair necessary? var/obj/item/organ/external/l_foot = character.get_organ("l_foot") @@ -2150,6 +2138,38 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts character.change_eye_color(r_eyes, g_eyes, b_eyes) + if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT) + character.dna.SetSEState(FATBLOCK,1,1) + character.mutations += FAT + character.mutations += OBESITY + character.overeatduration = 600 + + if(disabilities & DISABILITY_FLAG_NEARSIGHTED) + character.dna.SetSEState(GLASSESBLOCK,1,1) + character.disabilities |= NEARSIGHTED + + if(disabilities & DISABILITY_FLAG_EPILEPTIC) + character.dna.SetSEState(EPILEPSYBLOCK,1,1) + character.disabilities |= EPILEPSY + + if(disabilities & DISABILITY_FLAG_DEAF) + character.dna.SetSEState(DEAFBLOCK,1,1) + character.disabilities |= DEAF + + if(disabilities & DISABILITY_FLAG_BLIND) + character.dna.SetSEState(BLINDBLOCK,1,1) + character.disabilities |= BLIND + + if(disabilities & DISABILITY_FLAG_MUTE) + character.dna.SetSEState(MUTEBLOCK,1,1) + character.disabilities |= MUTE + + S.handle_dna(character) + + if(character.dna.dirtySE) + character.dna.UpdateSE() + domutcheck(character, null, MUTCHK_FORCED) + character.dna.ready_dna(character, flatten_SE = 0) character.sync_organ_dna(assimilate=1) character.UpdateAppearance() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index e2acbed5f66..2e3eebe28a9 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -151,6 +151,8 @@ var/emagged = 0 var/vision_flags = 0 var/darkness_view = 0//Base human is 2 + var/invis_override = 0 + var/invis_view = SEE_INVISIBLE_LIVING var/invisa_view = 0 var/color_view = null//overrides client.color while worn strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets @@ -343,6 +345,7 @@ BLIND // can't see anything src.loc = user user.wear_mask = null user.put_in_hands(src) + H.wear_mask_update(src, toggle_off = mask_adjusted) usr.update_inv_wear_mask() usr.update_inv_head() for(var/X in actions) @@ -707,4 +710,3 @@ BLIND // can't see anything for(var/obj/item/clothing/accessory/A in accessories) A.emp_act(severity) ..() - diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 9945079b1a5..51d6c78274d 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -6,7 +6,6 @@ //slot_flags = SLOT_EYES //var/vision_flags = 0 //var/darkness_view = 0//Base human is 2 - //var/invisa_view = 0 var/prescription = 0 var/prescription_upgradable = 0 var/see_darkness = 1 @@ -360,7 +359,9 @@ to_chat(usr, "You push the [src] up out of your face.") flash_protect = 0 tint = 0 - usr.update_inv_glasses() + var/mob/living/carbon/user = usr + user.update_inv_glasses() + user.update_tint() for(var/X in actions) var/datum/action/A = X @@ -411,11 +412,12 @@ var/mob/living/carbon/human/M = src.loc to_chat(M, "\red The Optical Thermal Scanner overloads and blinds you!") if(M.glasses == src) - M.eye_blind = 3 - M.eye_blurry = 5 - M.disabilities |= NEARSIGHTED - spawn(100) - M.disabilities &= ~NEARSIGHTED + M.EyeBlind(3) + M.EyeBlurry(5) + if(!(M.disabilities & NEARSIGHTED)) + M.BecomeNearsighted() + spawn(100) + M.CureNearsighted() ..() /obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index eb04efcc380..67e4f697eff 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -67,6 +67,8 @@ to_chat(usr, "You push the [src] up out of your face.") flash_protect = 0 tint = 0 + var/mob/living/carbon/C = usr + C.update_tint() usr.update_inv_head() //so our mob-overlays update for(var/X in actions) diff --git a/code/modules/clothing/patreon/glasses.dm b/code/modules/clothing/patreon/glasses.dm new file mode 100644 index 00000000000..8f795b212a2 --- /dev/null +++ b/code/modules/clothing/patreon/glasses.dm @@ -0,0 +1,21 @@ +/* + Donator Glasses Loadout for Patreon +*/ +//Kamina shades +/obj/item/clothing/glasses/fluff/kamina + name = "Spiky Orange-tinted Shades" + desc = "Row row!" + icon_state = "gar" + item_state = "gar" + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/eyes.dmi' + ) + + +//Green Kamina shades +/obj/item/clothing/glasses/fluff/kamina/green + name = "Spiky Green-tinted Shades" + desc = "Fight the power!" + icon_state = "garm" + item_state = "garm" \ No newline at end of file diff --git a/code/modules/clothing/patreon/hats.dm b/code/modules/clothing/patreon/hats.dm new file mode 100644 index 00000000000..bfcc69972e4 --- /dev/null +++ b/code/modules/clothing/patreon/hats.dm @@ -0,0 +1,63 @@ +/* + Donator Loadout for Patreon +*/ + +//mushroom hat +/obj/item/clothing/head/fluff/mushhat + name = "Mushroom Hat" + desc = "A horrifying display of Nanotrasen's ruthless pursuit in being the forefront of fashion. Or genocide." + icon_state = "mushhat" + item_state = "mushhat" + flags = BLOCKHAIR + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/head.dmi' + ) + +//gold top hat and recolours +/obj/item/clothing/head/fluff/goldtophat + name = "Gold-trimmed Top Hat" + desc = "Poshness incarnate." + icon_state = "goldtophat" + item_state = "goldtophat" + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/head.dmi' + ) + + +/obj/item/clothing/head/fluff/goldtophat/blue + name = "Gold-trimmed Blue Top Hat" + desc = "Poshness incarnate. With blue." + icon_state = "goldtophatblue" + item_state = "goldtophatblue" + +/obj/item/clothing/head/fluff/goldtophat/red + name = "Gold-trimmed Red Top Hat" + desc = "Poshness incarnate. With red." + icon_state = "goldtophatred" + item_state = "goldtophatred" + +//medieval guard helm +/obj/item/clothing/head/fluff/guardhelm + name = "Plastic Guard helm" + desc = "A plastic re-creation of a medieval-era headwear worn by extremely bored recruits of the local army. Kintergarden only." + icon_state = "guardhelm" + item_state = "guardhelm" + flags = BLOCKHAIR + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/head.dmi' + ) + +//black sombrero +/obj/item/clothing/head/fluff/blacksombrero + name = "Black sombrero" + desc = "A rare identifying hat of the infamous ancient renegade gang known as 'El Loco Pocos'" + icon_state = "blacksombrero" + item_state = "blacksombrero" + flags = BLOCKHAIR + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/head.dmi' + ) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 6fad0961ab4..1c8bd73c47f 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -189,15 +189,11 @@ to_chat(H, "You deploy your hardsuit helmet, sealing you off from the world.") H.update_inv_head() -/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/suit/space/rig/attackby(obj/item/W, mob/user, params) if(!isliving(user)) return - if(istype(src.loc,/mob/living)) - to_chat(user, "How do you propose to modify a hardsuit while it is being worn?") - return - - if(istype(W,/obj/item/weapon/screwdriver)) + if(istype(W,/obj/item/weapon/screwdriver) && can_modify(user)) if(!helmet) to_chat(user, "\The [src] does not have a helmet installed.") else @@ -213,7 +209,7 @@ boots = null return - else if(istype(W,/obj/item/clothing/head/helmet/space)) + else if(istype(W,/obj/item/clothing/head/helmet/space) && can_modify(user)) if(!attached_helmet) to_chat(user, "\The [src] does not have a helmet mount.") return @@ -226,7 +222,7 @@ src.helmet = W return - else if(istype(W,/obj/item/clothing/shoes/magboots)) + else if(istype(W,/obj/item/clothing/shoes/magboots) && can_modify(user)) if(!attached_boots) to_chat(user, "\The [src] does not have boot mounts.") return @@ -242,6 +238,13 @@ return ..() ..() + +/obj/item/clothing/suit/space/rig/proc/can_modify(mob/living/user) + if(isliving(loc)) + to_chat(user, "You can not modify the hardsuit while it is being worn.") + return 0 + + return 1 //Engineering rig /obj/item/clothing/head/helmet/space/rig/engineering diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index fccf464607b..7e5dfcad115 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -504,11 +504,18 @@ cell.use(cost*10) return 1 -/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/nano_state = inventory_state) +/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) if(!user) return - var/list/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = state) + ui.open() + ui.set_auto_update(1) + +/obj/item/weapon/rig/ui_data(mob/user, datum/topic_state/state = inventory_state) + var/data[0] data["primarysystem"] = null if(selected_module) @@ -575,12 +582,7 @@ if(module_list.len) data["modules"] = module_list - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/item/weapon/rig/update_icon(var/update_mob_icon) @@ -936,11 +938,6 @@ if(wearer.notransform || !wearer.canmove) return - if(locate(/obj/effect/stop/, wearer.loc)) - for(var/obj/effect/stop/S in wearer.loc) - if(S.victim == wearer) - return - if(!wearer.lastarea) wearer.lastarea = get_area(wearer.loc) diff --git a/code/modules/computer3/bios.dm b/code/modules/computer3/bios.dm index 564156540d3..e8f1b1f8c4c 100644 --- a/code/modules/computer3/bios.dm +++ b/code/modules/computer3/bios.dm @@ -77,7 +77,7 @@ user.unset_machine() return null - user.reset_view(S.current) + user.reset_perspective(S.current) return 1 /* diff --git a/code/modules/computer3/computers/camera.dm b/code/modules/computer3/computers/camera.dm index 52001231647..76fdc4d3d2d 100644 --- a/code/modules/computer3/computers/camera.dm +++ b/code/modules/computer3/computers/camera.dm @@ -237,7 +237,7 @@ computer.update_icon() for(var/mob/living/L in viewers(1)) if(!istype(L,/mob/living/silicon/ai) && L.machine == src) - L.reset_view(null) + L.reset_perspective(null) Reset() @@ -245,7 +245,7 @@ current = null for(var/mob/living/L in viewers(1)) if(!istype(L,/mob/living/silicon/ai) && L.machine == src) - L.reset_view(null) + L.reset_perspective(null) interact() if(!interactable()) @@ -265,7 +265,7 @@ return if(computer.camnet.verify_machine(current)) - usr.reset_view(current) + usr.reset_perspective(current) if(world.time - last_camera_refresh > 50 || !camera_list) last_camera_refresh = world.time @@ -302,13 +302,13 @@ var/obj/machinery/camera/C = locate(href_list["show"]) if(istype(C) && C.status) current = C - usr.reset_view(C) + usr.reset_perspective(C) interact() return if("keyselect" in href_list) current = null - usr.reset_view(null) + usr.reset_perspective(null) key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key) camera_list = null update_icon() diff --git a/code/modules/computer3/computers/message.dm b/code/modules/computer3/computers/message.dm index 3864082a8cb..35e981a4a7a 100644 --- a/code/modules/computer3/computers/message.dm +++ b/code/modules/computer3/computers/message.dm @@ -104,7 +104,7 @@ if(!auth) dat += "

Please authenticate with the server in order to show additional options." else - dat += "

Reg, #514 forbids sending messages to a Head of Staff containing Erotic Rendering Properties." + dat += "

Reg, #514 forbids sending messages containing Erotic Rendering Properties." //Message Logs if(1) diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 6f946146aa4..288dcfcd9c5 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -71,12 +71,11 @@ /obj/item/clothing/suit/armor/vest = 1, /obj/item/robot_parts/l_leg = 1, /obj/item/robot_parts/r_leg = 1, - /obj/item/stack/sheet/metal = 5, - /obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/metal = 1, + /obj/item/stack/cable_coil = 1, /obj/item/weapon/gun/energy/gun/advtaser = 1, /obj/item/weapon/stock_parts/cell = 1, - /obj/item/device/assembly/prox_sensor = 1, - /obj/item/robot_parts/r_arm = 1) + /obj/item/device/assembly/prox_sensor = 1) tools = list(/obj/item/weapon/weldingtool, /obj/item/weapon/screwdriver) time = 60 category = CAT_ROBOT diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index c7126795143..63875ee04ee 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -225,6 +225,28 @@ to_chat(target, "You comb your tail with the [src].") used = 1 +/obj/item/device/fluff/cardgage_helmet_kit //captain cardgage: Richard Ulery + name = "welding helmet modkit" + desc = "Some spraypaint and a stencil, perfect for painting flames onto a welding helmet!" + icon_state = "modkit" + w_class = 2 + force = 0 + throwforce = 0 + +/obj/item/device/fluff/cardgage_helmet_kit/afterattack(atom/target, mob/user, proximity) + if(!proximity || !ishuman(user) || user.lying) + return + + if(istype(target, /obj/item/clothing/head/welding)) + to_chat(user, "You modify the appearance of [target].") + + var/obj/item/clothing/head/welding/flamedecal/P = new(get_turf(target)) + transfer_fingerprints_to(P) + qdel(target) + qdel(src) + return + to_chat(user, "You can't modify [target]!") + #define USED_MOD_HELM 1 #define USED_MOD_SUIT 2 @@ -336,7 +358,7 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.head == src) - H.slurring = max(3, H.slurring) //always slur + H.Slur(3) //always slur /obj/item/clothing/head/beret/fluff/linda //Epic_Charger: Linda Clark name = "Green beret" @@ -424,6 +446,11 @@ /obj/item/clothing/head/hood/fluff/linda //Epic_Charger: Linda Clark icon_state = "greenhood" +/obj/item/clothing/suit/armor/shodanscoat // RazekPraxis: SHODAN + name = "SHODAN's Captain's Coat" + desc = "A black coat with gold trim and an old US Chevron printed on the back. Edgy." + icon_state = "shodancoat" + //////////// Uniforms //////////// /obj/item/clothing/under/fluff/kharshai // Kharshai: Athena Castile name = "Castile formal outfit" @@ -433,6 +460,15 @@ item_state = "castile_dress" item_color = "castile_dress" +/obj/item/clothing/under/fluff/elishirt // FlattestGuitar9: Eli Randolph + name = "casual dress shirt" + desc = "A soft, white dress shirt paired up with black suit pants. The set looks comfortable." + icon = 'icons/obj/custom_items.dmi' + icon_state = "elishirt" + item_state = "elishirt" + item_color = "elishirt" + displays_id = 0 + /obj/item/clothing/under/psysuit/fluff/isaca_sirius_1 // Xilia: Isaca Sirius name = "Isaca's suit" desc = "Black, comfortable and nicely fitting suit. Made not to hinder the wearer in any way. Made of some exotic fabric. And some strange glowing jewel at the waist. Name labels says; Property of Isaca Sirius; The Seeder." @@ -619,3 +655,8 @@ suit_adjusted = 1 species_fit = null sprite_sheets = null + +/obj/item/weapon/storage/backpack/fluff/krich_back //lizardzsi: Krichahka + name = "Voxcaster" + desc = "Battered, Sol-made military radio backpack that had its speakers fried from playing Vox opera. The words 'Swift-Talon' are crudely scratched onto its side." + icon_state = "voxcaster_fluff" diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 5a3a5814a70..1b238acea6e 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -76,10 +76,16 @@ /obj/machinery/computer/account_database/attack_hand(mob/user as mob) ui_interact(user) -/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640) + ui.open() +/obj/machinery/computer/account_database/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["src"] = UID() data["id_inserted"] = !!held_card data["id_card"] = held_card ? text("[held_card.registered_name], [held_card.assignment]") : "-----" @@ -122,11 +128,7 @@ if(accounts.len > 0) data["accounts"] = accounts - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/account_database/Topic(href, href_list) if(..()) diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 05054f468dd..3bc26b52799 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -1,5 +1,3 @@ -/var/global/sent_aliens_to_station = 0 - /datum/event/alien_infestation announceWhen = 400 var/spawncount = 1 @@ -7,8 +5,8 @@ /datum/event/alien_infestation/setup() announceWhen = rand(announceWhen, announceWhen + 50) - spawncount = rand(1, 2) - sent_aliens_to_station = 1 + if(prob(50)) + spawncount++ /datum/event/alien_infestation/announce() if(successSpawn) diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index d7877676b21..a3f302cff9f 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -6,7 +6,7 @@ var/armor = H.getarmor(type = "rad") if((H.species.flags & RADIMMUNE) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected continue - H.hallucination += rand(50, 100) + H.AdjustHallucinate(rand(50, 100)) /datum/event/mass_hallucination/announce() - command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file + command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index ffc4882a055..4c120db79e0 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -279,11 +279,11 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir) var/target_dist = get_dist(src,target) if(target_dist<=3) //"Eaten" - target.sleeping = 20 + target.Sleeping(20) target.hal_crit = 1 target.hal_screwyhud = 1 spawn(rand(50,100)) - target.sleeping = 0 + target.SetSleeping(0) target.hal_crit = 0 target.hal_screwyhud = 0 @@ -480,7 +480,7 @@ Gunshots/explosions/opening doors/less rare audio (done) my_target.show_message("[src.name] has attacked [my_target] with [weapon_name]!", 1) my_target.staminaloss += 30 if(prob(20)) - my_target.eye_blurry += 3 + my_target.AdjustEyeBlurry(3) if(prob(33)) if(!locate(/obj/effect/overlay) in my_target.loc) fake_blood(my_target) @@ -752,11 +752,11 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite halimage = null if("death") //Fake death - src.sleeping = 20 + Sleeping(20) hal_crit = 1 hal_screwyhud = 1 spawn(rand(50,100)) - src.sleeping = 0 + SetSleeping(0) hal_crit = 0 hal_screwyhud = 0 if("husks") diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index c1bcd68e9cb..eedae606007 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -81,7 +81,7 @@ refill = reagents.get_master_reagent_id() refillName = reagents.get_master_reagent_name() - var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + var/trans = reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, " You transfer [trans] units of the solution to [target].") if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell @@ -102,22 +102,22 @@ if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird return if(is_hot(I)) - if(src.reagents) - src.reagents.chem_temp += 15 + if(reagents) + reagents.chem_temp += 15 to_chat(user, "You heat [src] with [I].") - src.reagents.handle_reactions() + reagents.handle_reactions() /obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) if(!..(user, 1)) return - if(!reagents || reagents.total_volume==0) + if(!reagents || reagents.total_volume == 0) to_chat(user, " \The [src] is empty!") - else if(reagents.total_volume<=src.volume/4) + else if(reagents.total_volume <= volume/4) to_chat(user, " \The [src] is almost empty!") - else if(reagents.total_volume<=src.volume*0.66) + else if(reagents.total_volume <= volume*0.66) to_chat(user, " \The [src] is half full!")// We're all optimistic, right?! - else if(reagents.total_volume<=src.volume*0.90) + else if(reagents.total_volume <= volume*0.90) to_chat(user, " \The [src] is almost full!") else to_chat(user, " \The [src] is full!") diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 8928c5e8c57..53130d972f4 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -22,9 +22,9 @@ else user.drop_item() user.put_in_active_hand(B) - B.icon_state = src.icon_state + B.icon_state = icon_state - var/icon/I = new('icons/obj/drinks.dmi', src.icon_state) + var/icon/I = new('icons/obj/drinks.dmi', icon_state) I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1) I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) B.icon = I @@ -99,11 +99,11 @@ //Display an attack message. if(target != user) - target.visible_message("[user] has hit [target][head_attack_message] with a bottle of [src.name]!", \ - "[user] has hit [target][head_attack_message] with a bottle of [src.name]!") + target.visible_message("[user] has hit [target][head_attack_message] with a bottle of [name]!", \ + "[user] has hit [target][head_attack_message] with a bottle of [name]!") else - user.visible_message("[target] hits \himself with a bottle of [src.name][head_attack_message]!", \ - "[target] hits \himself with a bottle of [src.name][head_attack_message]!") + user.visible_message("[target] hits \himself with a bottle of [name][head_attack_message]!", \ + "[target] hits \himself with a bottle of [name][head_attack_message]!") //Attack logs add_logs(user, target, "attacked", src) @@ -284,7 +284,7 @@ desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by rioters and revolutionaries. Light and toss." icon_state = "vodkabottle" list_reagents = list() - var/list/accelerants = list(/datum/reagent/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston, + var/list/accelerants = list(/datum/reagent/consumable/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston, /datum/reagent/napalm,/datum/reagent/hellwater,/datum/reagent/plasma,/datum/reagent/plasma_dust) var/active = 0 diff --git a/code/modules/food_and_drinks/drinks/drinks/cans.dm b/code/modules/food_and_drinks/drinks/drinks/cans.dm index 6d72ec2221c..89deed5dedd 100644 --- a/code/modules/food_and_drinks/drinks/drinks/cans.dm +++ b/code/modules/food_and_drinks/drinks/drinks/cans.dm @@ -9,7 +9,7 @@ /obj/item/weapon/reagent_containers/food/drinks/cans/attack_self(mob/user) if(canopened == 0) - playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1) + playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) to_chat(user, "You open the drink with an audible pop!") canopened = 1 flags |= OPENCONTAINER @@ -32,7 +32,7 @@ if(canopened == 0) to_chat(user, "You need to open the drink!") return - else if(M == user && !src.reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head") + else if(M == user && !reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head") user.visible_message("[user] crushes ["\the [src]"] on \his forehead!", "You crush \the [src] on your forehead.") crush(user) return diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index bc1442038e9..0412c93626b 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -36,523 +36,12 @@ reagents.clear_reagents() extinguish() -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() // *scream - if(reagents.reagent_list.len > 0) - switch(reagents.get_master_reagent_id()) - if("beer") - icon_state = "beerglass" - name = "Beer glass" - desc = "A freezing pint of beer" - if("cider") - icon_state = "rewriter" - name = "Cider" - desc = "a refreshing glass of traditional cider" - if("beer2") - icon_state = "beerglass" - name = "Beer glass" - desc = "A freezing pint of beer" - if("ale") - icon_state = "aleglass" - name = "Ale glass" - desc = "A freezing pint of delicious Ale" - if("milk") - icon_state = "glass_white" - name = "Glass of milk" - desc = "White and nutritious goodness!" - if("cream") - icon_state = "glass_white" - name = "Glass of cream" - desc = "Ewwww..." - if("chocolate") - icon_state = "chocolateglass" - name = "Glass of chocolate" - desc = "Tasty" - if("hot_coco") - icon_state = "hot_coco" - name = "Glass of hot coco" - desc = "Delicious and cozy" - if("lemonjuice") - icon_state = "lemonglass" - name = "Glass of lemonjuice" - desc = "Sour..." - if("cola") - icon_state = "glass_brown" - name = "Glass of Space Cola" - desc = "A glass of refreshing Space Cola" - if("nuka_cola") - icon_state = "nuka_colaglass" - name = "Nuka Cola" - desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" - if("orangejuice") - icon_state = "glass_orange" - name = "Glass of Orange juice" - desc = "Vitamins! Yay!" - if("tomatojuice") - icon_state = "glass_red" - name = "Glass of Tomato juice" - desc = "Are you sure this is tomato juice?" - if("blood") - icon_state = "glass_red" - name = "Glass of Tomato juice" - desc = "Are you sure this is tomato juice?" - if("limejuice") - icon_state = "glass_green" - name = "Glass of Lime juice" - desc = "A glass of sweet-sour lime juice." - if("whiskey") - icon_state = "whiskeyglass" - name = "Glass of whiskey" - desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." - if("gin") - icon_state = "ginvodkaglass" - name = "Glass of gin" - desc = "A crystal clear glass of Griffeater gin." - if("vodka") - icon_state = "ginvodkaglass" - name = "Glass of vodka" - desc = "The glass contain wodka. Xynta." - if("sake") - icon_state = "ginvodkaglass" - name = "Glass of Sake" - desc = "A glass of Sake." - if("goldschlager") - icon_state = "ginvodkaglass" - name = "Glass of goldschlager" - desc = "100 proof that teen girls will drink anything with gold in it." - if("wine") - icon_state = "wineglass" - name = "Glass of wine" - desc = "A very classy looking drink." - if("cognac") - icon_state = "cognacglass" - name = "Glass of cognac" - desc = "Damn, you feel like some kind of French aristocrat just by holding this." - if("kahlua") - icon_state = "kahluaglass" - name = "Glass of RR coffee Liquor" - desc = "DAMN, THIS THING LOOKS ROBUST" - if("vermouth") - icon_state = "vermouthglass" - name = "Glass of Vermouth" - desc = "You wonder why you're even drinking this straight." - if("triple_citrus") - icon_state = "triplecitrus" - name = "Glass of Triplecitrus Juice" - desc = "As colorful and healthy as it is delicious." - if("mojito") - icon_state = "mojito" - name = "Glass of Mojito" - desc = "Fresh from Spesscuba." - if("tequila") - icon_state = "tequilaglass" - name = "Glass of Tequila" - desc = "Now all that's missing is the weird colored shades!" - if("patron") - icon_state = "patronglass" - name = "Glass of Patron" - desc = "Drinking patron in the bar, with all the subpar ladies." - if("rum") - icon_state = "rumglass" - name = "Glass of Rum" - desc = "Now you want to Pray for a pirate suit, don't you?" - if("absinthe") - icon_state = "absinthebottle" - name = "Glass of Absinthe" - desc = "The green fairy is going to get you now!" - if("gintonic") - icon_state = "gintonicglass" - name = "Gin and Tonic" - desc = "A mild but still great cocktail. Drink up, like a true Englishman." - if("ginsonic") - icon_state = "ginsonic" - name = "Gin and Sonic" - desc = "An extremely high amperage drink. Absolutely not for the true Englishman." - if("whiskeycola") - icon_state = "whiskeycolaglass" - name = "Whiskey Cola" - desc = "An innocent-looking mixture of cola and Whiskey. Delicious." - if("whiterussian") - icon_state = "whiterussianglass" - name = "White Russian" - desc = "A very nice looking drink. But that's just, like, your opinion, man." - if("screwdrivercocktail") - icon_state = "screwdriverglass" - name = "Screwdriver" - desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." - if("bloodymary") - icon_state = "bloodymaryglass" - name = "Bloody Mary" - desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." - if("martini") - icon_state = "martiniglass" - name = "Classic Martini" - desc = "Damn, the bartender even stirred it, not shook it." - if("vodkamartini") - icon_state = "martiniglass" - name = "Vodka martini" - desc ="A bastardisation of the classic martini. Still great." - if("gargleblaster") - icon_state = "gargleblasterglass" - name = "Pan-Galactic Gargle Blaster" - desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." - if("bravebull") - icon_state = "bravebullglass" - name = "Brave Bull" - desc = "Tequila and Coffee liquor, brought together in a mouthwatering mixture. Drink up." - if("tequilasunrise") - icon_state = "tequilasunriseglass" - name = "Tequila Sunrise" - desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." - if("toxinsspecial") - icon_state = "toxinsspecialglass" - name = "Toxins Special" - desc = "Whoah, this thing is on FIRE" - if("beepskysmash") - icon_state = "beepskysmashglass" - name = "Beepsky Smash" - desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." - if("doctorsdelight") - icon_state = "doctorsdelightglass" - name = "Doctor's Delight" - desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." - if("manlydorf") - icon_state = "manlydorfglass" - name = "The Manly Dorf" - desc = "A manly concotion made from Ale and Beer. Intended for true men only." - if("irishcream") - icon_state = "irishcreamglass" - name = "Irish Cream" - desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" - if("cubalibre") - icon_state = "cubalibreglass" - name = "Cuba Libre" - desc = "A classic mix of rum and cola." - if("b52") - icon_state = "b52glass" - name = "B-52" - desc = "Kahlua, Irish Cream, and congac. You will get bombed." - if("atomicbomb") - icon_state = "atomicbombglass" - name = "Atomic Bomb" - desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." - if("longislandicedtea") - icon_state = "longislandicedteaglass" - name = "Long Island Iced Tea" - desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - if("threemileisland") - icon_state = "threemileislandglass" - name = "Three Mile Island Ice Tea" - desc = "A glass of this is sure to prevent a meltdown." - if("margarita") - icon_state = "margaritaglass" - name = "Margarita" - desc = "On the rocks with salt on the rim. Arriba~!" - if("blackrussian") - icon_state = "blackrussianglass" - name = "Black Russian" - desc = "For the lactose-intolerant. Still as classy as a White Russian." - if("vodkatonic") - icon_state = "vodkatonicglass" - name = "Vodka and Tonic" - desc = "For when a gin and tonic isn't russian enough." - if("manhattan") - icon_state = "manhattanglass" - name = "Manhattan" - desc = "The Detective's undercover drink of choice. He never could stomach gin..." - if("manhattan_proj") - icon_state = "proj_manhattanglass" - name = "Manhattan Project" - desc = "A scienitst drink of choice, for thinking how to blow up the station." - if("ginfizz") - icon_state = "ginfizzglass" - name = "Gin Fizz" - desc = "Refreshingly lemony, deliciously dry." - if("irishcoffee") - icon_state = "irishcoffeeglass" - name = "Irish Coffee" - desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." - if("suicider") - icon_state = "suicider" - name = "Suicider" - desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - if("whiskeysoda") - icon_state = "whiskeysodaglass2" - name = "Whiskey Soda" - desc = "Ultimate refreshment." - if("tonic") - icon_state = "glass_clear" - name = "Glass of Tonic Water" - desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." - if("sodawater") - icon_state = "glass_clear" - name = "Glass of Soda Water" - desc = "Soda water. Why not make a scotch and soda?" - if("water") - icon_state = "glass_clear" - name = "Glass of Water" - desc = "The father of all refreshments." - if("spacemountainwind") - icon_state = "Space_mountain_wind_glass" - name = "Glass of Space Mountain Wind" - desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." - if("thirteenloko") - icon_state = "thirteen_loko_glass" - name = "Glass of Thirteen Loko" - desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass" - if("dr_gibb") - icon_state = "dr_gibb_glass" - name = "Glass of Dr. Gibb" - desc = "Dr. Gibb. Not as dangerous as the name might imply." - if("space_up") - icon_state = "space-up_glass" - name = "Glass of Space-up" - desc = "Space-up. It helps keep your cool." - if("moonshine") - icon_state = "glass_clear" - name = "Moonshine" - desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - if("soymilk") - icon_state = "glass_white" - name = "Glass of soy milk" - desc = "White and nutritious soy goodness!" - if("berryjuice") - icon_state = "berryjuice" - name = "Glass of berry juice" - desc = "Berry juice. Or maybe its jam. Who cares?" - if("poisonberryjuice") - icon_state = "poisonberryjuice" - name = "Glass of poison berry juice" - desc = "A glass of deadly juice." - if("carrotjuice") - icon_state = "carrotjuice" - name = "Glass of carrot juice" - desc = "It is just like a carrot but without crunching." - if("potato") - icon_state = "glass_brown" - name = "Glass of potato juice" - desc = "Who in the hell requests this? Gross!" - if("banana") - icon_state = "banana" - name = "Glass of banana juice" - desc = "The raw essence of a banana. HONK" - if("bahama_mama") - icon_state = "bahama_mama" - name = "Bahama Mama" - desc = "Tropic cocktail" - if("singulo") - icon_state = "singulo" - name = "Singulo" - desc = "A blue-space beverage." - if("alliescocktail") - icon_state = "alliescocktail" - name = "Allies cocktail" - desc = "A drink made from your allies." - if("antifreeze") - icon_state = "antifreeze" - name = "Anti-freeze" - desc = "The ultimate refreshment." - if("barefoot") - icon_state = "b&p" - name = "Barefoot" - desc = "Barefoot and pregnant" - if("demonsblood") - icon_state = "demonsblood" - name = "Demons Blood" - desc = "Just looking at this thing makes the hair at the back of your neck stand up." - if("booger") - icon_state = "booger" - name = "Booger" - desc = "Ewww..." - if("snowwhite") - icon_state = "snowwhite" - name = "Snow White" - desc = "A cold refreshment." - if("aloe") - icon_state = "aloe" - name = "Aloe" - desc = "Very, very, very good." - if("andalusia") - icon_state = "andalusia" - name = "Andalusia" - desc = "A nice, strange named drink." - if("sbiten") - icon_state = "sbitenglass" - name = "Sbiten" - desc = "A spicy mix of Vodka and Spice. Very hot." - if("red_mead") - icon_state = "red_meadglass" - name = "Red Mead" - desc = "A True Vikings Beverage, though its color is strange." - if("mead") - icon_state = "meadglass" - name = "Mead" - desc = "A Vikings Beverage, though a cheap one." - if("iced_beer") - icon_state = "iced_beerglass" - name = "Iced Beer" - desc = "A beer so frosty, the air around it freezes." - if("grog") - icon_state = "grogglass" - name = "Grog" - desc = "A fine and cepa drink for Space." - if("soy_latte") - icon_state = "soy_latte" - name = "Soy Latte" - desc = "A nice and refrshing beverage while you are reading." - if("cafe_latte") - icon_state = "cafe_latte" - name = "Cafe Latte" - desc = "A nice, strong and refreshing beverage while you are reading." - if("cafe_mocha") - icon_state = "cafe_latte" - name = "Cafe Mocha" - desc = "The perfect blend of coffe, milk, and chocolate." - if("acidspit") - icon_state = "acidspitglass" - name = "Acid Spit" - desc = "A drink from Nanotrasen. Made from live aliens." - if("amasec") - icon_state = "amasecglass" - name = "Amasec" - desc = "Always handy before COMBAT!!!" - if("neurotoxin") - icon_state = "neurotoxinglass" - name = "Neurotoxin" - desc = "A drink that is guaranteed to knock you silly." - if("hippiesdelight") - icon_state = "hippiesdelightglass" - name = "Hippie's Delight" - desc = "A drink enjoyed by people during the 1960's." - if("bananahonk") - icon_state = "bananahonkglass" - name = "Banana Honk" - desc = "A drink from Banana Heaven." - if("silencer") - icon_state = "silencerglass" - name = "Silencer" - desc = "A drink from mime Heaven." - if("nothing") - icon_state = "nothing" - name = "Nothing" - desc = "Absolutely nothing." - if("devilskiss") - icon_state = "devilskiss" - name = "Devils Kiss" - desc = "Creepy time!" - if("changelingsting") - icon_state = "changelingsting" - name = "Changeling Sting" - desc = "A stingy drink." - if("irishcarbomb") - icon_state = "irishcarbomb" - name = "Irish Car Bomb" - desc = "An irish car bomb." - if("syndicatebomb") - icon_state = "syndicatebomb" - name = "Syndicate Bomb" - desc = "A syndicate bomb." - if("erikasurprise") - icon_state = "erikasurprise" - name = "Erika Surprise" - desc = "The surprise is, it's green!" - if("driestmartini") - icon_state = "driestmartiniglass" - name = "Driest Martini" - desc = "Only for the experienced. You think you see sand floating in the glass." - if("ice") - icon_state = "iceglass" - name = "Glass of ice" - desc = "Generally, you're supposed to put something else in there too..." - if("icecoffee") - icon_state = "icedcoffeeglass" - name = "Iced Coffee" - desc = "A drink to perk you up and refresh you!" - if("coffee") - icon_state = "glass_brown" - name = "Glass of coffee" - desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." - if("bilk") - icon_state = "glass_brown" - name = "Glass of bilk" - desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." - if("fuel") - icon_state = "dr_gibb_glass" - name = "Glass of welder fuel" - desc = "Unless you are an industrial tool, this is probably not safe for consumption." - if("brownstar") - icon_state = "brownstar" - name = "Brown Star" - desc = "Its not what it sounds like..." - if("tea") - icon_state = "glass_brown" - name = "Glass of Tea" - desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?" - if("icetea") - icon_state = "icetea" - name = "Iced Tea" - desc = "No relation to a certain rap artist/ actor." - if("milkshake") - icon_state = "milkshake" - name = "Milkshake" - desc = "Glorious brainfreezing mixture." - if("lemonade") - icon_state = "lemonade" - name = "Lemonade" - desc = "Oh the nostalgia..." - if("kiraspecial") - icon_state = "kiraspecial" - name = "Kira Special" - desc = "Long live the guy who everyone had mistaken for a girl. Baka!" - if("rewriter") - icon_state = "rewriter" - name = "Rewriter" - desc = "The secert of the sanctuary of the Libarian..." - if("applejack") - icon_state = "cognacglass" - name = "Glass of applejack" - desc = "When cider isn't strong enough, you gotta jack it." - if("jackrose") - icon_state = "patronglass" - name = "Jack Rose" - desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s." - if("synthanol") - icon_state = "synthanolglass" - name = "Glass of Synthanol" - desc = "The equivalent of alcohol for synthetic crewmembers. They'd find it awful if they had tastebuds too." - if("robottears") - icon_state = "robottearsglass" - name = "Glass of Robot Tears" - desc = "No robots were hurt in the making of this drink." - if("trinary") - icon_state = "trinaryglass" - name = "Glass of Trinary" - desc = "Colorful drink made for synthetic crewmembers. It doesn't seem like it would taste well." - if("servo") - icon_state = "servoglass" - name = "Glass of Servo" - desc = "Chocolate - based drink made for IPCs. Not sure if anyone's actually tried out the recipe." - if("synthnsoda") - icon_state = "synthnsodaglass" - name = "Glass of Synth 'n Soda" - desc = "Classic drink altered to fit the tastes of a robot. Bad idea to drink if you're made of carbon." - if("synthignon") - icon_state = "synthignonglass" - name = "Glass of Synthignon" - desc = "Someone mixed good wine and robot booze. Romantic, but atrocious." - if("uplink") - icon_state = "uplinkglass" - name = "Glass of Uplink" - desc = "An exquisite mix of the finest liquoirs and synthanol. Meant only for synthetics." - if("holywater") - icon_state = "glass_clear" - name = "Glass of Water" - desc = "The father of all refreshments." - - - else - icon_state ="glass_brown" - name = "Glass of ..what?" - desc = "You can't really tell what this is." +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() + if(reagents.reagent_list.len) + var/datum/reagent/R = reagents.get_master_reagent() + icon_state = R.drink_icon + name = R.drink_name + desc = R.drink_desc else icon_state = "glass_empty" name = "glass" diff --git a/code/modules/food_and_drinks/food/candy.dm b/code/modules/food_and_drinks/food/candy.dm index d13eb7ec145..32a4a584a88 100644 --- a/code/modules/food_and_drinks/food/candy.dm +++ b/code/modules/food_and_drinks/food/candy.dm @@ -13,9 +13,6 @@ icon = 'icons/obj/food/candy.dmi' icon_state = "candy" -/obj/item/weapon/reagent_containers/food/snacks/candy/New() - ..() - // *********************************************************** // Candy Ingredients / Flavorings / Byproduct // *********************************************************** @@ -25,76 +22,53 @@ desc = "Such sweet, fattening food." icon_state = "chocolatebar" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/chocolatebar/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/caramel name = "Caramel" desc = "Chewy and dense, yet it practically melts in your mouth!" icon_state = "caramel" filling_color = "#DB944D" - -/obj/item/weapon/reagent_containers/food/snacks/candy/caramel/New() - ..() - reagents.add_reagent("cream", 2) - reagents.add_reagent("sugar", 2) bitesize = 2 + list_reagents = list("cream" = 2, "sugar" = 2) + /obj/item/weapon/reagent_containers/food/snacks/candy/toffee name = "Toffee" desc = "A hard, brittle candy with a distinctive taste." icon_state = "toffee" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/toffee/New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/nougat name = "Nougat" desc = "A soft, chewy candy commonly found in candybars." icon_state = "nougat" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/taffy name = "Saltwater Taffy" desc = "Old fashioned saltwater taffy. Chewy!" icon_state = "candy1" filling_color = "#7D5F46" + bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/taffy/New() ..() icon_state = pick("candy1", "candy2", "candy3", "candy4", "candy5") - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) - bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/candy/fudge name = "Fudge" desc = "Chocolate fudge, a timeless classic treat." icon_state = "fudge" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/fudge/New() - ..() - reagents.add_reagent("cream", 3) - reagents.add_reagent("chocolate",6) bitesize = 3 + list_reagents = list("cream" = 3, "chocolate" = 6) /obj/item/weapon/reagent_containers/food/snacks/candy/fudge/peanut name = "Peanut Fudge" @@ -113,10 +87,7 @@ desc = "An extra creamy fudge with bits of real chocolate cookie mixed in. Crunchy!" icon_state = "fudge_cookies_n_cream" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/fudge/cookies_n_cream/New() - ..() - reagents.add_reagent("cream", 3) + list_reagents = list("cream" = 6, "chocolate" = 6) /obj/item/weapon/reagent_containers/food/snacks/candy/fudge/turtle name = "Turtle Fudge" @@ -132,24 +103,16 @@ name = "Donor Candy" desc = "A little treat for blood donors." trash = /obj/item/trash/candy - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor/New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("sugar", 3) bitesize = 5 + list_reagents = list("nutriment" = 10, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/candy_corn name = "candy corn" desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." icon_state = "candycorn" filling_color = "#FFFCB0" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candy_corn/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sugar", 2) bitesize = 2 + list_reagents = list("nutriment" = 4, "sugar" = 2) // *********************************************************** // Candy Products (plain / unflavored) @@ -161,11 +124,8 @@ icon_state = "cottoncandy_plain" trash = /obj/item/weapon/c_tube filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/New() - ..() - reagents.add_reagent("sugar", 15) - bitesize = 3 + bitesize = 4 + list_reagents = list("sugar" = 15) /obj/item/weapon/reagent_containers/food/snacks/candy/candybar name = "candy" @@ -173,92 +133,64 @@ icon_state = "candy" trash = /obj/item/trash/candy filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candybar/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",5) bitesize = 3 + list_reagents = list("nutriment" = 2, "chocolate" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/candycane name = "candy cane" desc = "A festive mint candy cane." icon_state = "candycane" filling_color = "#F2F2F2" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candycane/New() - ..() - reagents.add_reagent("minttoxin", 1) - reagents.add_reagent("sugar", 5) bitesize = 2 + list_reagents = list("minttoxin" = 1, "sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear name = "gummy bear" desc = "A small edible bear. It's squishy and chewy!" icon_state = "gbear" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm name = "gummy worm" desc = "An edible worm, made from gelatin." icon_state = "gworm" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas." icon_state = "jbean" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/jawbreaker name = "jawbreaker" desc = "An unbelievably hard candy. The name is fitting." icon_state = "jawbreaker" filling_color = "#ED0758" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jawbreaker/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 0.1 //this is gonna take a while, you'll be working at this all shift. + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/cash name = "candy cash" desc = "Not legal tender. Tasty though." icon_state = "candy_cash" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cash/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate", 4) bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/coin name = "chocolate coin" desc = "Probably won't work in the vending machines." icon_state = "choc_coin" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/coin/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) bitesize = 3 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/gum name = "bubblegum" @@ -266,22 +198,15 @@ icon_state = "bubblegum" trash = /obj/item/trash/gum filling_color = "#FF7495" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gum/New() - ..() - reagents.add_reagent("sugar", 5) bitesize = 0.2 + list_reagents = list("sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/sucker name = "sucker" desc = "For being such a good sport!" icon_state = "sucker" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/sucker/New() - ..() - reagents.add_reagent("sugar", 10) - bitesize = 1 + list_reagents = list("sugar" = 10) // *********************************************************** // Gummy Bear Flavors @@ -292,91 +217,56 @@ desc = "A small edible bear. It's red!" icon_state = "gbear_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/blue name = "gummy bear" desc = "A small edible bear. It's blue!" icon_state = "gbear_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/poison name = "gummy bear" desc = "A small edible bear. It's blue!" icon_state = "gbear_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/green name = "gummy bear" desc = "A small edible bear. It's green!" icon_state = "gbear_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/green/New() - ..() - reagents.add_reagent("limejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/yellow name = "gummy bear" desc = "A small edible bear. It's yellow!" icon_state = "gbear_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/orange name = "gummy bear" desc = "A small edible bear. It's orange!" icon_state = "gbear_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/purple name = "gummy bear" desc = "A small edible bear. It's purple!" icon_state = "gbear_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/wtf name = "gummy bear" desc = "A small bear. Wait... what?" icon_state = "gbear_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Gummy Worm Flavors @@ -387,91 +277,56 @@ desc = "An edible worm, made from gelatin. It's red!" icon_state = "gworm_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/blue name = "gummy worm" desc = "An edible worm, made from gelatin. It's blue!" icon_state = "gworm_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/poison name = "gummy worm" desc = "An edible worm, made from gelatin. It's blue!" icon_state = "gworm_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/green name = "gummy worm" desc = "An edible worm, made from gelatin. It's green!" icon_state = "gworm_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/green/New() - ..() - reagents.add_reagent("limejuice", 10) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/yellow name = "gummy worm" desc = "An edible worm, made from gelatin. It's yellow!" icon_state = "gworm_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/orange name = "gummy worm" desc = "An edible worm, made from gelatin. It's orange!" icon_state = "gworm_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/purple name = "gummy worm" desc = "An edible worm, made from gelatin. It's purple!" icon_state = "gworm_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/wtf name = "gummy worm" desc = "An edible worm. Did it just move?" icon_state = "gworm_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Jelly Bean Flavors @@ -482,146 +337,91 @@ desc = "A candy bean, guarenteed to not give you gas. It's red!" icon_state = "jbean_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/blue name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's blue!" icon_state = "jbean_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/poison name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's blue!" icon_state = "jbean_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/green name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's green!" icon_state = "jbean_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/green/New() - ..() - reagents.add_reagent("limejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/yellow name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's yellow!" icon_state = "jbean_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/orange name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's orange!" icon_state = "jbean_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/purple name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's purple!" icon_state = "jbean_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/chocolate name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's chocolate!" icon_state = "jbean_choc" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/chocolate/New() - ..() - reagents.add_reagent("chocolate",2) - bitesize = 3 + list_reagents = list("sugar" = 10, "chocolate" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/popcorn name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's popcorn flavored!" icon_state = "jbean_popcorn" filling_color = "#664330" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/popcorn/New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/cola name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Cola flavored!" icon_state = "jbean_cola" filling_color = "#102000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/cola/New() - ..() - reagents.add_reagent("cola", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cola" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/drgibb name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Dr. Gibb flavored!" icon_state = "jbean_cola" filling_color = "#102000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/drgibb/New() - ..() - reagents.add_reagent("dr_gibb", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "dr_gibb" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/coffee name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Coffee flavored!" icon_state = "jbean_choc" filling_color = "#482000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/coffee/New() - ..() - reagents.add_reagent("coffee", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "coffee" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/wtf name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. You aren't sure what color it is." icon_state = "jbean_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Cotton Candy Flavors @@ -633,11 +433,7 @@ icon_state = "cottoncandy_red" trash = /obj/item/weapon/c_tube filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/red/New() - ..() - reagents.add_reagent("cherryjelly", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/blue name = "cotton candy" @@ -645,11 +441,7 @@ icon_state = "cottoncandy_blue" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/blue/New() - ..() - reagents.add_reagent("berryjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "berryjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/poison name = "cotton candy" @@ -657,14 +449,7 @@ icon_state = "cottoncandy_blue" trash = /obj/item/weapon/c_tube filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("poisonberryjuice" = 20) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/green name = "cotton candy" @@ -672,11 +457,7 @@ icon_state = "cottoncandy_green" trash = /obj/item/weapon/c_tube filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/green/New() - ..() - reagents.add_reagent("limejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "limejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/yellow name = "cotton candy" @@ -684,11 +465,7 @@ icon_state = "cottoncandy_yellow" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "lemonjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/orange name = "cotton candy" @@ -696,11 +473,7 @@ icon_state = "cottoncandy_orange" trash = /obj/item/weapon/c_tube filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/orange/New() - ..() - reagents.add_reagent("orangejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "orangejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/purple name = "cotton candy" @@ -708,11 +481,7 @@ icon_state = "cottoncandy_purple" trash = /obj/item/weapon/c_tube filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/purple/New() - ..() - reagents.add_reagent("grapejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "grapejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/pink name = "cotton candy" @@ -720,11 +489,7 @@ icon_state = "cottoncandy_pink" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/pink/New() - ..() - reagents.add_reagent("watermelonjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "watermelonjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/rainbow name = "cotton candy" @@ -732,14 +497,7 @@ icon_state = "cottoncandy_rainbow" trash = /obj/item/weapon/c_tube filling_color = "#C8A5DC" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/rainbow/New() - ..() - reagents.add_reagent("omnizine", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("omnizine" = 20) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/bad_rainbow name = "cotton candy" @@ -747,14 +505,7 @@ icon_state = "cottoncandy_rainbow" trash = /obj/item/weapon/c_tube filling_color = "#32127A" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/bad_rainbow/New() - ..() - reagents.add_reagent("sulfonal", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("sulfonal" = 20) // *********************************************************** // Candybar Flavors diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index 931e84b892b..d7ffca96843 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -82,7 +82,7 @@ if(target.reagents.total_volume >= target.reagents.maximum_volume) to_chat(user, "you can't add anymore to [target]!") return - var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + var/trans = reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, "You transfer [trans] units of the condiment to [target].") /obj/item/weapon/reagent_containers/food/condiment/on_reagent_change() @@ -223,7 +223,7 @@ return else to_chat(user, "You tear open [src] above [target] and the condiments drip onto it.") - src.reagents.trans_to(target, amount_per_transfer_from_this) + reagents.trans_to(target, amount_per_transfer_from_this) qdel(src) /obj/item/weapon/reagent_containers/food/condiment/pack/on_reagent_change() diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 78651f97b0c..77e3f22a1e8 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -1,4 +1,4 @@ -/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich/S = new(get_turf(user)) S.attackby(W,user, params) @@ -6,13 +6,13 @@ else ..() -/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/burger/S = new(get_turf(user)) S.attackby(W,user, params) qdel(src) -/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/pizza/S = new(get_turf(user)) S.attackby(W,user, params) @@ -21,7 +21,7 @@ ..() -/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/pasta/S = new(get_turf(user)) S.attackby(W,user, params) @@ -30,7 +30,7 @@ ..() -/obj/item/trash/plate/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/trash/plate/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/fullycustom/S = new(get_turf(user)) S.attackby(W,user, params) @@ -44,7 +44,7 @@ icon = 'icons/obj/food/food.dmi' icon_state = "soup" -/obj/item/trash/bowl/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/trash/bowl/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/soup/S = new(get_turf(user)) @@ -54,7 +54,6 @@ ..() /obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich - /obj/item/weapon/reagent_containers/food/snacks/customizable name = "sandwich" desc = "A sandwich! A timeless classic." icon_state = "breadslice" @@ -79,12 +78,7 @@ trash = /obj/item/trash/plate bitesize = 2 var/list/ingredients = list() - - New() - ..() - - reagents.add_reagent("nutriment", 8) - + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/customizable/pizza name = "personal pizza" @@ -323,7 +317,7 @@ toptype = new /obj/item/weapon/reagent_containers/food/snacks/bun() /obj/item/weapon/reagent_containers/food/snacks/customizable/attackby(obj/item/I, mob/user, params) - if(src.contents.len > sandwich_limit) + if(contents.len > sandwich_limit) to_chat(user, "If you put anything else in or on [src] it's going to make a mess.") return if(!istype(I, /obj/item/weapon/reagent_containers/food/snacks)) @@ -351,7 +345,7 @@ for(var/obj/item/O in ingredients) i++ if(!fullycustom) - var/image/I = new(src.icon, "[baseicon]_filling") + var/image/I = new(icon, "[baseicon]_filling") if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) var/obj/item/weapon/reagent_containers/food/snacks/food = O if(!food.filling_color == "#FFFFFF") @@ -372,7 +366,7 @@ overlays += O.overlays if(top) - var/image/T = new(src.icon, "[baseicon]_top") + var/image/T = new(icon, "[baseicon]_top") T.pixel_x = pick(list(-1,0,1)) T.pixel_y = (ingredients.len * 2)+1 overlays += T @@ -388,24 +382,6 @@ to_chat(user, " You think you can see [whatsinside] in there.") -/* -/obj/item/weapon/reagent_containers/food/snacks/customizable/attack(mob/M as mob, mob/user as mob, def_zone) //SNOOOOOOOWFLAAAAAAAAAAAAAAAAAKES - - var/obj/item/shard - for(var/obj/item/O in contents) - if(istype(O,/obj/item/weapon/shard)) - shard = O - break - - var/mob/living/H - if(istype(M,/mob/living)) - H = M - - if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable. - to_chat(H, "\red You lacerate your mouth on a [shard.name] in the sandwich!") - H.adjustBruteLoss(5) //TODO: Target head if human. - ..() -*/ /obj/item/weapon/reagent_containers/food/snacks/customizable/proc/newname() var/unsorteditems[0] @@ -487,7 +463,7 @@ sendback = "[pick(list("absurd","colossal","enormous","ridiculous","massive","oversized","cardiac-arresting","pipe-clogging","edible but sickening","sickening","gargantuan","mega","belly-burster","chest-burster"))] [basename]" return sendback -/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(var/list/unsorted, var/highest) +/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(list/unsorted, highest) var/sorted[0] for(var/i = 1, i<= highest, i++) for(var/it in unsorted) diff --git a/code/modules/food_and_drinks/food/meat.dm b/code/modules/food_and_drinks/food/meat.dm index 76de76530ea..4635f6eb9b1 100644 --- a/code/modules/food_and_drinks/food/meat.dm +++ b/code/modules/food_and_drinks/food/meat.dm @@ -4,16 +4,11 @@ icon_state = "meat" health = 180 filling_color = "#FF1C1C" - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) -/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if( \ - istype(W, /obj/item/weapon/kitchen/knife) || \ - istype(W, /obj/item/weapon/scalpel) \ - ) +/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/kitchen/knife) || istype(W, /obj/item/weapon/scalpel)) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) @@ -49,6 +44,4 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/ham name = "Ham" desc = "Taste like bacon." - New() - ..() - reagents.add_reagent("porktonium", 10) + list_reagents = list("protein" = 3, "porktonium" = 10) \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/seafood.dm b/code/modules/food_and_drinks/food/seafood.dm index 410c225247c..c0a95d39315 100644 --- a/code/modules/food_and_drinks/food/seafood.dm +++ b/code/modules/food_and_drinks/food/seafood.dm @@ -5,12 +5,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/salmonmeat name = "raw salmon" @@ -18,11 +14,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/salmonsteak name = "Salmon steak" @@ -31,14 +24,8 @@ icon_state = "salmonsteak" trash = /obj/item/trash/plate filling_color = "#7A3D11" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 - + bitesize = 3 + list_reagents = list("nutriment" = 4, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/catfishmeat name = "raw catfish" @@ -46,11 +33,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishfingers name = "Fish Fingers" @@ -58,15 +42,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfingers" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("carpotoxin", 3) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishburger name = "Fillet -o- Carp Sandwich" @@ -74,12 +51,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishburger" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/cubancarp name = "Cuban Carp" @@ -88,13 +61,8 @@ icon_state = "cubancarp" trash = /obj/item/trash/plate filling_color = "#E9ADFF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - reagents.add_reagent("capsaicin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3, "capsaicin" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishandchips name = "Fish and Chips" @@ -102,168 +70,117 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishandchips" filling_color = "#E3D796" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/sashimi name = "carp sashimi" desc = "Celebrate surviving attack from hostile alien lifeforms by hospitalising yourself." icon = 'icons/obj/food/seafood.dmi' icon_state = "sashimi" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("toxin", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "toxin" = 5) /obj/item/weapon/reagent_containers/food/snacks/fried_shrimp name = "fried shrimp" desc = "Just one of the many things you can do with shrimp!" icon = 'icons/obj/food/seafood.dmi' icon_state = "shrimp_fried" - - New() - ..() - reagents.add_reagent("nutriment", 2) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiled_shrimp name = "boiled shrimp" desc = "Just one of the many things you can do with shrimp!" icon = 'icons/obj/food/seafood.dmi' icon_state = "shrimp_cooked" - - New() - ..() - reagents.add_reagent("nutriment", 2) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Ebi name = "Ebi Sushi" desc = "A simple sushi consisting of cooked shrimp and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Ebi" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Ikura name = "Ikura Sushi" desc = "A simple sushi consisting of salmon roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Ikura" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Sake name = "Sake Sushi" desc = "A simple sushi consisting of raw salmon and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Sake" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_SmokedSalmon name = "Smoked Salmon Sushi" desc = "A simple sushi consisting of cooked salmon and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_SmokedSalmon" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tamago name = "Tamago Sushi" desc = "A simple sushi consisting of egg and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Tamago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Inari name = "Inari Sushi" desc = "A piece of fried tofu stuffed with rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Inari" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Masago name = "Masago Sushi" desc = "A simple sushi consisting of goldfish roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Masago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tobiko name = "Tobiko Sushi" desc = "A simple sushi consisting of shark roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Masago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_TobikoEgg name = "Tobiko and Egg Sushi" desc = "A sushi consisting of shark roe and an egg." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_TobikoEgg" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tai name = "Tai Sushi" desc = "A simple sushi consisting of catfish and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Tai" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Unagi name = "Unagi Sushi" desc = "A simple sushi consisting of eel and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Hokki" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 \ No newline at end of file + bitesize = 3 + list_reagents = list("nutriment" = 2) \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index d403b4aae4b..49cd0c1fa3b 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -4,7 +4,6 @@ desc = "yummy" icon = 'icons/obj/food/food.dmi' icon_state = null - bitesize = 1 var/bitecount = 0 var/trash = null var/slice_path @@ -38,10 +37,10 @@ /obj/item/weapon/reagent_containers/food/snacks/proc/Post_Consume(mob/living/M) return -/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) +/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user) return -/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) +/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M, mob/user, def_zone) if(reagents && !reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it. to_chat(user, "None of [src] left, oh no!") M.unEquip(src) //so icons update :[ @@ -64,11 +63,11 @@ if(bitecount==0) return else if(bitecount==1) - to_chat(user, "\blue \The [src] was bitten by someone!") + to_chat(user, "[src] was bitten by someone!") else if(bitecount<=3) - to_chat(user, "\blue \The [src] was bitten [bitecount] times!") + to_chat(user, "[src] was bitten [bitecount] times!") else - to_chat(user, "\blue \The [src] was bitten multiple times!") + to_chat(user, "[src] was bitten multiple times!") /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user, params) @@ -93,10 +92,10 @@ "You scoop up some [src] with \the [U]!" \ ) - src.bitecount++ + bitecount++ U.overlays.Cut() var/image/I = new(U.icon, "loadedfood") - I.color = src.filling_color + I.color = filling_color U.overlays += I var/obj/item/weapon/reagent_containers/food/snacks/collected = new type @@ -136,7 +135,7 @@ else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) if(!iscarbon(user)) return 1 - to_chat(user, "\red You slip [W] inside [src].") + to_chat(user, "You slip [W] inside [src].") user.unEquip(W) if((user.client && user.s_active != src)) user.client.screen -= W @@ -147,28 +146,28 @@ else return 1 if( \ - !isturf(src.loc) || \ - !(locate(/obj/structure/table) in src.loc) && \ - !(locate(/obj/machinery/optable) in src.loc) && \ - !(locate(/obj/item/weapon/storage/bag/tray) in src.loc) \ + !isturf(loc) || \ + !(locate(/obj/structure/table) in loc) && \ + !(locate(/obj/machinery/optable) in loc) && \ + !(locate(/obj/item/weapon/storage/bag/tray) in loc) \ ) - to_chat(user, "\red You cannot slice [src] here! You need a table or at least a tray to do it.") + to_chat(user, "You cannot slice [src] here! You need a table or at least a tray to do it.") return 1 var/slices_lost = 0 if(!inaccurate) user.visible_message( \ - "\blue [user] slices \the [src]!", \ - "\blue You slice \the [src]!" \ + "[user] slices [src]!", \ + "You slice [src]!" \ ) else user.visible_message( \ - "\blue [user] crudely slices \the [src] with [W]!", \ - "\blue You crudely slice \the [src] with your [W]!" \ + "[user] crudely slices [src] with [W]!", \ + "You crudely slice [src] with your [W]!" \ ) slices_lost = rand(1,min(1,round(slices_num/2))) var/reagents_per_slice = reagents.total_volume/slices_num for(var/i=1 to (slices_num-slices_lost)) - var/obj/slice = new slice_path (src.loc) + var/obj/slice = new slice_path (loc) reagents.trans_to(slice,reagents_per_slice) qdel(src) @@ -185,19 +184,19 @@ M.changeNext_move(CLICK_CD_MELEE) if(iscorgi(M)) if(bitecount >= 4) - M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","You swallow up the last part of \the [src].") - playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where [src] was")].","You swallow up the last part of [src].") + playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) var/mob/living/simple_animal/pet/corgi/C = M C.adjustBruteLoss(-5) C.adjustFireLoss(-5) qdel(src) else - M.visible_message("[M] takes a bite of \the [src].","You take a bite of \the [src].") - playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + M.visible_message("[M] takes a bite of [src].","You take a bite of [src].") + playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) bitecount++ else if(ismouse(M)) var/mob/living/simple_animal/mouse/N = M - to_chat(N, text("\blue You nibble away at [src].")) + to_chat(N, text("You nibble away at [src].")) if(prob(50)) N.visible_message("[N] nibbles away at [src].", "") //N.emote("nibbles away at the [src]") @@ -255,49 +254,8 @@ icon_state = "aesirsalad" trash = /obj/item/trash/snack_bowl filling_color = "#468C00" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 8) - bitesize = 3 - -/* -/obj/item/weapon/reagent_containers/food/snacks/candy - name = "candy" - desc = "Nougat, love it or hate it." - icon_state = "candy" - trash = /obj/item/trash/candy - filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("sugar", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor - name = "Donor Candy" - desc = "A little treat for blood donors." - trash = /obj/item/trash/candy - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("sugar", 3) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/candy_corn - name = "candy corn" - desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." - icon_state = "candy_corn" - filling_color = "#FFFCB0" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sugar", 2) - bitesize = 2 -*/ + bitesize = 3 + list_reagents = list("nutriment" = 8, "omnizine" = 8) /obj/item/weapon/reagent_containers/food/snacks/chips name = "chips" @@ -305,12 +263,7 @@ icon_state = "chips" trash = /obj/item/trash/chips filling_color = "#E8C31E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 1 + list_reagents = list("nutriment" = 3, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/cornchips name = "corn chips" @@ -318,123 +271,79 @@ icon_state = "chips" trash = /obj/item/trash/chips filling_color = "#E8C31E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/cookie name = "cookie" desc = "COOKIE!!!" icon_state = "COOKIE!!!" filling_color = "#DBC94F" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 1 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/chocolatebar name = "Chocolate Bar" desc = "Such sweet, fattening food." icon_state = "chocolatebar" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/choc_pile //for reagent chocolate being spilled on turfs name = "Pile of Chocolate" desc = "A pile of pure chocolate pieces." icon_state = "cocoa" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("chocolate",5) //no longer can be used to generate the reagent infinitely - bitesize = 2 + bitesize = 2 + list_reagents = list("chocolate" = 5) /obj/item/weapon/reagent_containers/food/snacks/chocolateegg name = "Chocolate Egg" desc = "Such sweet, fattening food." icon_state = "chocolateegg" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("chocolate",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/donut name = "donut" desc = "Goes great with Robust Coffee." icon_state = "donut1" filling_color = "#D9C386" + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/donut/normal name = "donut" desc = "Goes great with Robust Coffee." icon_state = "donut1" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - src.bitesize = 3 - if(prob(30)) - src.icon_state = "donut2" - src.name = "frosted donut" - reagents.add_reagent("sprinkles", 2) + list_reagents = list("nutriment" = 3, "sprinkles" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal/New() + ..() + if(prob(30)) + icon_state = "donut2" + name = "frosted donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/sprinkles name = "frosted donut" icon_state = "donut2" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 3) + list_reagents = list("nutriment" = 3, "sprinkles" = 3) /obj/item/weapon/reagent_containers/food/snacks/donut/chaos name = "Chaos Donut" desc = "Like life, it never quite tastes the same." icon_state = "donut1" filling_color = "#ED11E6" + bitesize = 10 - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sprinkles", 1) - bitesize = 10 - var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(chaosselect) - if(1) - reagents.add_reagent("nutriment", 3) - if(2) - reagents.add_reagent("capsaicin", 3) - if(3) - reagents.add_reagent("frostoil", 3) - if(4) - reagents.add_reagent("sprinkles", 3) - if(5) - reagents.add_reagent("plasma", 3) - if(6) - reagents.add_reagent("chocolate", 3) - if(7) - reagents.add_reagent("slimejelly", 3) - if(8) - reagents.add_reagent("banana", 3) - if(9) - reagents.add_reagent("berryjuice", 3) - if(10) - reagents.add_reagent("omnizine", 3) - if(prob(30)) - src.icon_state = "donut2" - src.name = "Frosted Chaos Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos/New() + ..() + var/extra_reagent = pick("nutriment", "capsaicin", "frostoil", "sprinkles", "plasma", "chocolate", "slimejelly", "banana", "berryjuice", "omnizine") + reagents.add_reagent("[extra_reagent]", 3) + if(prob(30)) + icon_state = "donut2" + name = "Frosted Chaos Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/jelly @@ -442,85 +351,75 @@ desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "berryjuice" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("berryjuice", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly name = "Jelly Donut" desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "slimejelly" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("slimejelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly name = "Jelly Donut" desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "cherryjelly" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("cherryjelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/egg name = "egg" desc = "An egg!" icon_state = "egg" filling_color = "#FDFFD1" + list_reagents = list("protein" = 1, "egg" = 5) - New() +/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) + ..() + var/turf/T = get_turf(hit_atom) + new/obj/effect/decal/cleanable/egg_smudge(T) + if(reagents) + reagents.reaction(hit_atom, TOUCH) + qdel(src) + +/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W, mob/user, params) + if(istype( W, /obj/item/toy/crayon )) + var/obj/item/toy/crayon/C = W + var/clr = C.colourName + + if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) + to_chat(usr, "The egg refuses to take on this color!") + return + + to_chat(usr, "You color \the [src] [clr]") + icon_state = "egg-[clr]" + item_color = clr + else ..() - reagents.add_reagent("protein", 1) - reagents.add_reagent("egg", 5) - - throw_impact(atom/hit_atom) - ..() - var/turf/T = get_turf(hit_atom) - new/obj/effect/decal/cleanable/egg_smudge(T) - if(reagents) - reagents.reaction(hit_atom, TOUCH) - qdel(src) - - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype( W, /obj/item/toy/crayon )) - var/obj/item/toy/crayon/C = W - var/clr = C.colourName - - if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) - to_chat(usr, "\blue The egg refuses to take on this color!") - return - - to_chat(usr, "\blue You color \the [src] [clr]") - icon_state = "egg-[clr]" - item_color = clr - else - ..() /obj/item/weapon/reagent_containers/food/snacks/egg/blue icon_state = "egg-blue" @@ -559,25 +458,14 @@ desc = "A fried egg, with a touch of salt and pepper." icon_state = "friedegg" filling_color = "#FFDF78" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("egg", 5) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 1 + list_reagents = list("nutriment" = 2, "egg" = 5, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/boiledegg name = "Boiled egg" desc = "A hard boiled egg." icon_state = "egg" filling_color = "#FFFFFF" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("egg", 5) + list_reagents = list("nutriment" = 2, "egg" = 5) /obj/item/weapon/reagent_containers/food/snacks/organ @@ -586,11 +474,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "appendix" filling_color = "#E00D34" - - New() - ..() - reagents.add_reagent("protein", 4) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 4) /obj/item/weapon/reagent_containers/food/snacks/appendix //yes, this is the same as meat. I might do something different in future @@ -599,11 +484,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "appendix" filling_color = "#E00D34" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed name = "inflamed appendix" @@ -616,179 +498,125 @@ icon_state = "tofu" desc = "We all love tofu." filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("plantmatter" = 3) /obj/item/weapon/reagent_containers/food/snacks/fried_tofu name = "Fried Tofu" icon_state = "tofu" desc = "Proof that even vegetarians crave unhealthy foods." filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/tofurkey name = "Tofurkey" desc = "A fake turkey made from tofu." icon_state = "tofurkey" filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 12) - reagents.add_reagent("ether", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 12, "ether" = 3) /obj/item/weapon/reagent_containers/food/snacks/stuffing name = "Stuffing" desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" icon_state = "stuffing" filling_color = "#C9AC83" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice name = "huge mushroom slice" desc = "A slice from a huge mushroom." icon_state = "hugemushroomslice" filling_color = "#E0D7C5" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - reagents.add_reagent("psilocybin", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("plantmatter" = 3, "psilocybin" = 3) /obj/item/weapon/reagent_containers/food/snacks/tomatomeat name = "tomato slice" desc = "A slice from a huge tomato" icon_state = "tomatomeat" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/bearmeat name = "bear meat" desc = "A very manly slab of meat." icon_state = "bearmeat" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 12) - reagents.add_reagent("methamphetamine", 5) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 12, "methamphetamine" = 5) /obj/item/weapon/reagent_containers/food/snacks/xenomeat name = "meat" desc = "A slab of meat" icon_state = "xenomeat" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/spidermeat name = "spider meat" desc = "A slab of spider meat." icon_state = "spidermeat" - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("toxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/lizardmeat name = "mutant lizard meat" desc = "Seems to be a slab of meat from some mutant lizard thing?" icon_state = "xenomeat" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("toxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/spiderleg name = "spider leg" desc = "A still twitching leg of a giant spider... you don't really want to eat this, do you?" icon_state = "spiderleg" - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("toxin", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 2, "toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/meatball name = "Meatball" desc = "A great meal all round." icon_state = "meatball" filling_color = "#DB0000" - New() - ..() - reagents.add_reagent("protein", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/sausage name = "Sausage" desc = "A piece of mixed, long meat." icon_state = "sausage" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("porktonium", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 6, "porktonium" = 10) /obj/item/weapon/reagent_containers/food/snacks/donkpocket name = "Donk-pocket" desc = "The food of choice for the seasoned traitor." icon_state = "donkpocket" filling_color = "#DEDEAB" - - New() - ..() - reagents.add_reagent("nutriment", 4) + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket name = "Warm Donk-pocket" desc = "The food of choice for the seasoned traitor." icon_state = "donkpocket" filling_color = "#DEDEAB" + list_reagents = list("nutriment" = 4) - New() - ..() - reagents.add_reagent("nutriment", 4) - - Post_Consume(mob/living/M) - M.reagents.add_reagent("omnizine", 15) +/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket/Post_Consume(mob/living/M) + M.reagents.add_reagent("omnizine", 15) /obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak name = "Lightly Warm Donk-pocket" desc = "The food of choice for the seasoned traitor. This one is lukewarm." icon_state = "donkpocket" filling_color = "#DEDEAB" - -/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("weak_omnizine", 3) + list_reagents = list("nutriment" = 4, "weak_omnizine" = 3) /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket name = "Donk-pocket" @@ -796,42 +624,31 @@ icon_state = "donkpocket" filling_color = "#DEDEAB" bitesize = 100 //nom the whole thing at once. + list_reagents = list("nutriment" = 1) - New() - ..() - reagents.add_reagent("nutriment", 1) - - Post_Consume(mob/living/M) - M.reagents.add_reagent("omnizine", 15) - M.reagents.add_reagent("teporone", 15) - M.reagents.add_reagent("synaptizine", 15) - M.reagents.add_reagent("salglu_solution", 15) - M.reagents.add_reagent("salbutamol", 15) - M.reagents.add_reagent("methamphetamine", 15) +/obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket/Post_Consume(mob/living/M) + M.reagents.add_reagent("omnizine", 15) + M.reagents.add_reagent("teporone", 15) + M.reagents.add_reagent("synaptizine", 15) + M.reagents.add_reagent("salglu_solution", 15) + M.reagents.add_reagent("salbutamol", 15) + M.reagents.add_reagent("methamphetamine", 15) /obj/item/weapon/reagent_containers/food/snacks/brainburger name = "brainburger" desc = "A strange looking burger. It looks almost sentient." icon_state = "brainburger" filling_color = "#F2B6EA" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("prions", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "prions" = 10) /obj/item/weapon/reagent_containers/food/snacks/ghostburger name = "Ghost Burger" desc = "Spooky! It doesn't look very filling." icon_state = "ghostburger" filling_color = "#FFF2FF" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/human var/hname = "" @@ -842,52 +659,38 @@ name = "-burger" desc = "A bloody burger." icon_state = "hburger" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/cheeseburger name = "cheeseburger" desc = "The cheese adds a good flavor." icon_state = "cheeseburger" - New() - ..() - reagents.add_reagent("nutriment", 2) + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/monkeyburger name = "burger" desc = "The cornerstone of every nutritious breakfast." icon_state = "hburger" filling_color = "#D63C3C" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/tofuburger name = "Tofu Burger" desc = "What.. is that meat?" icon_state = "tofuburger" filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/roburger name = "roburger" desc = "The lettuce is the only organic component. Beep." icon_state = "roburger" filling_color = "#CCCCCC" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("nanomachines", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "nanomachines" = 10) /obj/item/weapon/reagent_containers/food/snacks/roburgerbig name = "roburger" @@ -895,49 +698,32 @@ icon_state = "roburger" filling_color = "#CCCCCC" volume = 100 - - New() - ..() - reagents.add_reagent("nanomachines", 100) - bitesize = 0.1 + bitesize = 0.1 + list_reagents = list("nanomachines" = 100) /obj/item/weapon/reagent_containers/food/snacks/xenoburger name = "xenoburger" desc = "Smells caustic. Tastes like heresy." icon_state = "xburger" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/clownburger name = "Clown Burger" desc = "This tastes funny..." icon_state = "clownburger" filling_color = "#FF00FF" - - New() - ..() -/* - var/datum/disease/F = new /datum/disease/pierrot_throat(0) - var/list/data = list("viruses"= list(F)) - reagents.add_reagent("blood", 4, data) -*/ - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/mimeburger name = "Mime Burger" desc = "Its taste defies language." icon_state = "mimeburger" filling_color = "#FFFFFF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/omelette name = "Omelette Du Fromage" @@ -945,23 +731,15 @@ icon_state = "omelette" trash = /obj/item/trash/plate filling_color = "#FFF9A8" - - //var/herp = 0 - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 1 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/muffin name = "Muffin" desc = "A delicious and spongy little cake" icon_state = "muffin" filling_color = "#E0CF9B" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/pie name = "Banana Cream Pie" @@ -969,17 +747,13 @@ icon_state = "pie" trash = /obj/item/trash/plate filling_color = "#FBFFB8" - -/obj/item/weapon/reagent_containers/food/snacks/pie/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("banana",5) bitesize = 3 + list_reagents = list("nutriment" = 4, "banana" = 5) /obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom) ..() - new/obj/effect/decal/cleanable/pie_smudge(src.loc) - src.visible_message("\red [src.name] splats.","\red You hear a splat.") + new/obj/effect/decal/cleanable/pie_smudge(loc) + visible_message("[src] splats.","You hear a splat.") qdel(src) /obj/item/weapon/reagent_containers/food/snacks/berryclafoutis @@ -987,11 +761,8 @@ desc = "No black birds, this is a good sign." icon_state = "berryclafoutis" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("berryjuice", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "berryjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/waffles name = "waffles" @@ -999,11 +770,8 @@ icon_state = "waffles" trash = /obj/item/trash/waffles filling_color = "#E6DEB5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/eggplantparm name = "Eggplant Parmigiana" @@ -1011,11 +779,8 @@ icon_state = "eggplantparm" trash = /obj/item/trash/plate filling_color = "#4D2F5E" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/soylentgreen name = "Soylent Green" @@ -1023,11 +788,8 @@ icon_state = "soylent_green" trash = /obj/item/trash/waffles filling_color = "#B8E6B5" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/soylenviridians name = "Soylen Virdians" @@ -1035,12 +797,8 @@ icon_state = "soylent_yellow" trash = /obj/item/trash/waffles filling_color = "#E6FA61" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatpie name = "Meat-pie" @@ -1048,11 +806,8 @@ desc = "An old barber recipe, very delicious!" trash = /obj/item/trash/plate filling_color = "#948051" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/tofupie name = "Tofu-pie" @@ -1060,42 +815,31 @@ desc = "A delicious tofu pie." trash = /obj/item/trash/plate filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/amanita_pie name = "amanita pie" desc = "Sweet and tasty poison pie." icon_state = "amanita_pie" filling_color = "#FFCCCC" - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("amanitin", 3) - reagents.add_reagent("psilocybin", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 5, "amanitin" = 3, "psilocybin" = 1) /obj/item/weapon/reagent_containers/food/snacks/plump_pie name = "plump pie" desc = "I bet you love stuff made out of plump helmets!" icon_state = "plump_pie" filling_color = "#B8279B" + bitesize = 2 + list_reagents = list("nutriment" = 8) - New() - ..() - if(prob(10)) - name = "exceptional plump pie" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plump_pie/New() + ..() + if(prob(10)) + name = "exceptional plump pie" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" // What + reagents.add_reagent("omnizine", 5) /obj/item/weapon/reagent_containers/food/snacks/xemeatpie name = "Xeno-pie" @@ -1103,11 +847,8 @@ desc = "A delicious meatpie. Probably heretical." trash = /obj/item/trash/plate filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/wingfangchu name = "Wing Fang Chu" @@ -1115,12 +856,8 @@ icon_state = "wingfangchu" trash = /obj/item/trash/snack_bowl filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/human/kabob name = "-kabob" @@ -1128,11 +865,8 @@ desc = "A human meat, on a stick." trash = /obj/item/stack/rods filling_color = "#A85340" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/monkeykabob name = "Meat-kabob" @@ -1140,11 +874,8 @@ desc = "Delicious meat, on a stick." trash = /obj/item/stack/rods filling_color = "#A85340" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/tofukabob name = "Tofu-kabob" @@ -1152,11 +883,8 @@ desc = "Vegan meat, on a stick." trash = /obj/item/stack/rods filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/popcorn name = "Popcorn" @@ -1165,18 +893,18 @@ trash = /obj/item/trash/popcorn var/unpopped = 0 filling_color = "#FFFAD4" + bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 + list_reagents = list("nutriment" = 2) - New() - ..() - unpopped = rand(1,10) - reagents.add_reagent("nutriment", 2) - bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 - On_Consume(mob/M, mob/user) - if(prob(unpopped)) //lol ...what's the point? - to_chat(user, "\red You bite down on an un-popped kernel!") - unpopped = max(0, unpopped-1) - ..() +/obj/item/weapon/reagent_containers/food/snacks/popcorn/New() + ..() + unpopped = rand(1,10) +/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume(mob/M, mob/user) + if(prob(unpopped)) //lol ...what's the point? + to_chat(user, "You bite down on an un-popped kernel!") + unpopped = max(0, unpopped-1) + ..() /obj/item/weapon/reagent_containers/food/snacks/sosjerky name = "Scaredy's Private Reserve Beef Jerky" @@ -1184,11 +912,8 @@ desc = "Beef jerky made from the finest space cows." trash = /obj/item/trash/sosjerky filling_color = "#631212" - - New() - ..() - reagents.add_reagent("protein", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 4) /obj/item/weapon/reagent_containers/food/snacks/pistachios name = "Pistachios" @@ -1196,11 +921,7 @@ desc = "A snack of deliciously salted pistachios. A perfectly valid choice..." trash = /obj/item/trash/pistachios filling_color = "#BAD145" - - New() - ..() - reagents.add_reagent("plantmatter", 6) - reagents.add_reagent("sodiumchloride", 1) + list_reagents = list("plantmatter" = 6, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/no_raisin name = "4no Raisins" @@ -1208,21 +929,15 @@ desc = "Best raisins in the universe. Not sure why." trash = /obj/item/trash/raisins filling_color = "#343834" - - New() - ..() - reagents.add_reagent("plantmatter", 6) + list_reagents = list("plantmatter" = 6) /obj/item/weapon/reagent_containers/food/snacks/spacetwinkie name = "Space Twinkie" icon_state = "space_twinkie" desc = "Guaranteed to survive longer then you will." filling_color = "#FFE591" - - New() - ..() - reagents.add_reagent("sugar", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("sugar" = 4) /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers name = "Cheesie Honkers" @@ -1230,79 +945,53 @@ desc = "Bite sized cheesie snacks that will honk all over your mouth" trash = /obj/item/trash/cheesie filling_color = "#FFA305" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("fake_cheese", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4, "fake_cheese" = 2) /obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein name = "chow mein" desc = "What is in this anyways?" icon_state = "chinese1" - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("beans", 3) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "beans" = 3, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/tao name = "Admiral Yamamoto carp" desc = "Tastes like chicken." icon_state = "chinese2" - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("protein", 2) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4, "protein" = 2, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles name = "chinese newdles" desc = "Made fresh, weekly!" icon_state = "chinese3" - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/rice name = "fried rice" desc = "A timeless classic." icon_state = "chinese4" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("rice", 3) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3, "rice" = 3, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/syndicake name = "Syndi-Cakes" icon_state = "syndi_cakes" desc = "An extremely moist snack cake that tastes just as good after being nuked." filling_color = "#FF5D05" - trash = /obj/item/trash/syndi_cakes - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("salglu_solution", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "salglu_solution" = 5) /obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato name = "Loaded Baked Potato" desc = "Totally baked." icon_state = "loadedbakedpotato" filling_color = "#9C7A68" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/fries name = "Space Fries" @@ -1310,11 +999,8 @@ icon_state = "fries" trash = /obj/item/trash/plate filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/soydope name = "Soy Dope" @@ -1322,22 +1008,15 @@ icon_state = "soydope" trash = /obj/item/trash/plate filling_color = "#C4BF76" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/spagetti name = "Spagetti" desc = "A bundle of raw spaghetti." icon_state = "spagetti" filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 1 + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/cheesyfries name = "Cheesy Fries" @@ -1345,38 +1024,30 @@ icon_state = "cheesyfries" trash = /obj/item/trash/plate filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/fortunecookie name = "Fortune cookie" desc = "A true prophecy in each cookie!" icon_state = "fortune_cookie" filling_color = "#E8E79E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/badrecipe name = "Burned mess" desc = "Someone should be demoted from chef for this." icon_state = "badrecipe" filling_color = "#211F02" + bitesize = 2 + list_reagents = list("????" = 5, "carbon" = 3) - New() - ..() - reagents.add_reagent("????", 5) - reagents.add_reagent("carbon", 3) - bitesize = 2 - - // it's burned! it should start off being classed as any cooktype that burns - cooktype["grilled"] = 1 - cooktype["deep fried"] = 1 +/obj/item/weapon/reagent_containers/food/snacks/badrecipe/New() + ..() + // it's burned! it should start off being classed as any cooktype that burns + cooktype["grilled"] = 1 + cooktype["deep fried"] = 1 /obj/item/weapon/reagent_containers/food/snacks/meatsteak name = "Meat steak" @@ -1384,13 +1055,8 @@ icon_state = "meatstake" trash = /obj/item/trash/plate filling_color = "#7A3D11" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff name = "Spacy Liberty Duff" @@ -1398,12 +1064,8 @@ icon_state = "spacylibertyduff" trash = /obj/item/trash/snack_bowl filling_color = "#42B873" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("psilocybin", 6) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "psilocybin" = 6) /obj/item/weapon/reagent_containers/food/snacks/amanitajelly name = "Amanita Jelly" @@ -1411,13 +1073,8 @@ icon_state = "amanitajelly" trash = /obj/item/trash/snack_bowl filling_color = "#ED0758" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("amanitin", 6) - reagents.add_reagent("psilocybin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "amanitin" = 6, "psilocybin" = 3) /obj/item/weapon/reagent_containers/food/snacks/poppypretzel name = "Poppy pretzel" @@ -1425,12 +1082,7 @@ icon_state = "poppypretzel" bitesize = 2 filling_color = "#916E36" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 - + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/meatballsoup name = "Meatball soup" @@ -1438,50 +1090,32 @@ icon_state = "meatballsoup" trash = /obj/item/trash/snack_bowl filling_color = "#785210" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/slimesoup name = "slime soup" desc = "If no water is available, you may substitute tears." icon_state = "slimesoup" filling_color = "#C4DBA0" - - New() - ..() - reagents.add_reagent("slimejelly", 5) - reagents.add_reagent("water", 10) - bitesize = 5 + bitesize = 5 + list_reagents = list("slimejelly" = 5, "water" = 10) /obj/item/weapon/reagent_containers/food/snacks/bloodsoup name = "Tomato soup" desc = "Smells like copper" icon_state = "tomatosoup" filling_color = "#FF0000" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("blood", 10) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 2, "blood" = 10, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/clownstears name = "Clown's Tears" desc = "Not very funny." icon_state = "clownstears" filling_color = "#C4FBFF" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("banana", 5) - reagents.add_reagent("water", 10) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 4, "banana" = 5, "water" = 10) /obj/item/weapon/reagent_containers/food/snacks/vegetablesoup name = "Vegetable soup" @@ -1489,12 +1123,8 @@ icon_state = "vegetablesoup" trash = /obj/item/trash/snack_bowl filling_color = "#AFC4B5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/nettlesoup name = "Nettle soup" @@ -1502,13 +1132,8 @@ icon_state = "nettlesoup" trash = /obj/item/trash/snack_bowl filling_color = "#AFC4B5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - reagents.add_reagent("omnizine", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5, "omnizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/mysterysoup name = "Mystery soup" @@ -1516,46 +1141,46 @@ icon_state = "mysterysoup" trash = /obj/item/trash/snack_bowl filling_color = "#F082FF" + bitesize = 5 - New() - ..() - var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(mysteryselect) - if(1) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - if(2) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - if(3) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 5) - reagents.add_reagent("omnizine", 5) - if(4) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 10) - if(5) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("banana", 10) - if(6) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blood", 10) - if(7) - reagents.add_reagent("slimejelly", 10) - reagents.add_reagent("water", 10) - if(8) - reagents.add_reagent("carbon", 10) - reagents.add_reagent("toxin", 10) - if(9) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - if(10) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("oculine", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup/New() + ..() + var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(mysteryselect) + if(1) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + if(2) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + if(3) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("omnizine", 5) + if(4) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 10) + if(5) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("banana", 10) + if(6) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blood", 10) + if(7) + reagents.add_reagent("slimejelly", 10) + reagents.add_reagent("water", 10) + if(8) + reagents.add_reagent("carbon", 10) + reagents.add_reagent("toxin", 10) + if(9) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + if(10) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("oculine", 5) /obj/item/weapon/reagent_containers/food/snacks/wishsoup name = "Wish Soup" @@ -1563,14 +1188,14 @@ icon_state = "wishsoup" trash = /obj/item/trash/snack_bowl filling_color = "#D1F4FF" + bitesize = 5 + list_reagents = list("water" = 10) - New() - ..() - reagents.add_reagent("water", 10) - bitesize = 5 - if(prob(25)) - src.desc = "A wish come true!" - reagents.add_reagent("nutriment", 8) +/obj/item/weapon/reagent_containers/food/snacks/wishsoup/New() + ..() + if(prob(25)) + desc = "A wish come true!" // hue + reagents.add_reagent("nutriment", 8) /obj/item/weapon/reagent_containers/food/snacks/hotchili name = "Hot Chili" @@ -1578,50 +1203,31 @@ icon_state = "hotchili" trash = /obj/item/trash/snack_bowl filling_color = "#FF3C00" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 - + bitesize = 5 + list_reagents = list("nutriment" = 6, "capsaicin" = 3, "tomatojuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/coldchili name = "Cold Chili" desc = "This slush is barely a liquid!" icon_state = "coldchili" filling_color = "#2B00FF" - trash = /obj/item/trash/snack_bowl - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 6, "frostoil" = 3, "tomatojuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/raw_bacon name = "raw bacon" desc = "It's fleshy and pink!" icon_state = "raw_bacon" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("porktonium", 10) + list_reagents = list("nutriment" = 1, "porktonium" = 10) /obj/item/weapon/reagent_containers/food/snacks/bacon name = "bacon" desc = "It looks juicy and tastes amazing!" icon_state = "bacon2" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("porktonium", 10) - reagents.add_reagent("msg", 4) - + list_reagents = list("nutriment" = 4, "porktonium" = 10, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/telebacon name = "Tele Bacon" @@ -1629,15 +1235,16 @@ icon_state = "bacon" var/obj/item/device/radio/beacon/bacon/baconbeacon bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("porktonium", 10) - baconbeacon = new /obj/item/device/radio/beacon/bacon(src) - On_Consume(mob/M, mob/user) - if(!reagents.total_volume) - baconbeacon.loc = user - baconbeacon.digest_delay() + list_reagents = list("nutriment" = 4, "porktonium" = 10) + +/obj/item/weapon/reagent_containers/food/snacks/telebacon/New() + ..() + baconbeacon = new /obj/item/device/radio/beacon/bacon(src) + +/obj/item/weapon/reagent_containers/food/snacks/telebacon/On_Consume(mob/M, mob/user) + if(!reagents.total_volume) + baconbeacon.loc = user + baconbeacon.digest_delay() /obj/item/weapon/reagent_containers/food/snacks/monkeycube @@ -1647,13 +1254,11 @@ bitesize = 12 filling_color = "#ADAC7F" var/monkey_type = "Monkey" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/New() - ..() - reagents.add_reagent("protein",10) + list_reagents = list("protein" = 10) /obj/item/weapon/reagent_containers/food/snacks/monkeycube/afterattack(obj/O, mob/user, proximity) - if(!proximity) return + if(!proximity) + return if(istype(O,/obj/structure/sink) && !wrapped) to_chat(user, "You place [src] under a stream of water...") user.drop_item() @@ -1737,22 +1342,16 @@ desc = "This is absolutely Ei Nath." icon_state = "spellburger" filling_color = "#D505FF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/bigbiteburger name = "Big Bite Burger" desc = "Forget the Big Mac. THIS is the future!" icon_state = "bigbiteburger" filling_color = "#E3D681" - - New() - ..() - reagents.add_reagent("nutriment", 14) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 14) /obj/item/weapon/reagent_containers/food/snacks/enchiladas name = "Enchiladas" @@ -1760,12 +1359,8 @@ icon_state = "enchiladas" trash = /obj/item/trash/tray filling_color = "#A36A1F" - - New() - ..() - reagents.add_reagent("nutriment",8) - reagents.add_reagent("capsaicin", 6) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "capsaicin" = 6) /obj/item/weapon/reagent_containers/food/snacks/burrito name = "Burrito" @@ -1773,10 +1368,7 @@ icon_state = "burrito" trash = /obj/item/trash/plate filling_color = "#A36A1F" - -/obj/item/weapon/reagent_containers/food/snacks/burrito/New() - ..() - reagents.add_reagent("nutriment", 5) + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/chimichanga name = "Chimichanga" @@ -1784,11 +1376,7 @@ icon_state = "chimichanga" trash = /obj/item/trash/plate filling_color = "#A36A1F" - -/obj/item/weapon/reagent_containers/food/snacks/chimichanga/New() - ..() - reagents.add_reagent("omnizine", 4) //Deadpool reference. Deal with it. - reagents.add_reagent("cheese", 2) + list_reagents = list("omnizine" = 4, "cheese" = 2) //Deadpool reference. Deal with it. /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight name = "monkey's Delight" @@ -1796,27 +1384,16 @@ icon_state = "monkeysdelight" trash = /obj/item/trash/tray filling_color = "#5C3C11" - - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("banana", 5) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 6 + bitesize = 6 + list_reagents = list("nutriment" = 10, "banana" = 5, "blackpepper" = 1, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/baguette name = "Baguette" desc = "Bon appetit!" icon_state = "baguette" filling_color = "#E3D796" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "blackpepper" = 1, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/sandwich name = "Sandwich" @@ -1824,11 +1401,8 @@ icon_state = "sandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich name = "Toasted Sandwich" @@ -1836,12 +1410,8 @@ icon_state = "toastedsandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carbon", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "carbon" = 2) /obj/item/weapon/reagent_containers/food/snacks/grilledcheese name = "Grilled Cheese Sandwich" @@ -1849,11 +1419,8 @@ icon_state = "toastedsandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 7) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 7) //why make a regualr sandwhich when you can make grilled cheese, with this nutriment value? /obj/item/weapon/reagent_containers/food/snacks/tomatosoup name = "Tomato Soup" @@ -1861,12 +1428,8 @@ icon_state = "tomatosoup" trash = /obj/item/trash/snack_bowl filling_color = "#D92929" - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 5, "tomatojuice" = 10) /obj/item/weapon/reagent_containers/food/snacks/rofflewaffles name = "Roffle Waffles" @@ -1874,26 +1437,16 @@ icon_state = "rofflewaffles" trash = /obj/item/trash/waffles filling_color = "#FF00F7" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("psilocybin", 8) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "psilocybin" = 8) /obj/item/weapon/reagent_containers/food/snacks/stew name = "Stew" desc = "A nice and warm stew. Healthy and strong." icon_state = "stew" filling_color = "#9E673A" - - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("oculine", 5) - reagents.add_reagent("water", 5) - bitesize = 10 + bitesize = 10 + list_reagents = list("nutriment" = 10, "tomatojuice" = 5, "oculine" = 5, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast name = "Jellied Toast" @@ -1901,63 +1454,44 @@ icon_state = "jellytoast" trash = /obj/item/trash/plate filling_color = "#B572AB" - - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 1, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 1, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger name = "Jelly Burger" desc = "Culinary delight..?" icon_state = "jellyburger" filling_color = "#B572AB" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 5, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 5, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/milosoup name = "Milosoup" desc = "The universes best soup! Yum!!!" icon_state = "milosoup" trash = /obj/item/trash/snack_bowl - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat name = "Stewed Soy Meat" desc = "Even non-vegetarians will LOVE this!" icon_state = "stewedsoymeat" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/boiledspagetti name = "Boiled Spagetti" @@ -1965,11 +1499,8 @@ icon_state = "spagettiboiled" trash = /obj/item/trash/plate filling_color = "#FCEE81" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiledrice name = "Boiled Rice" @@ -1977,11 +1508,8 @@ icon_state = "boiledrice" trash = /obj/item/trash/snack_bowl filling_color = "#FFFBDB" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/ricepudding name = "Rice Pudding" @@ -1989,11 +1517,8 @@ icon_state = "rpudding" trash = /obj/item/trash/snack_bowl filling_color = "#FFFBDB" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/pastatomato name = "Spagetti" @@ -2001,12 +1526,8 @@ icon_state = "pastatomato" trash = /obj/item/trash/plate filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 10) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 6, "tomatojuice" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti name = "Spagetti & Meatballs" @@ -2014,35 +1535,24 @@ icon_state = "meatballspagetti" trash = /obj/item/trash/plate filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("synaptizine", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8, "synaptizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/spesslaw name = "Spesslaw" desc = "A lawyers favourite" icon_state = "spesslaw" filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("synaptizine", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8, "synaptizine" = 10) /obj/item/weapon/reagent_containers/food/snacks/poppypretzel name = "Poppy Pretzel" desc = "A large soft pretzel full of POP!" icon_state = "poppypretzel" filling_color = "#AB7D2E" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/carrotfries name = "Carrot Fries" @@ -2050,68 +1560,48 @@ icon_state = "carrotfries" trash = /obj/item/trash/plate filling_color = "#FAA005" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - reagents.add_reagent("oculine", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 3, "oculine" = 3) /obj/item/weapon/reagent_containers/food/snacks/superbiteburger name = "Super Bite Burger" desc = "This is a mountain of a burger. FOOD!" icon_state = "superbiteburger" filling_color = "#CCA26A" - - New() - ..() - reagents.add_reagent("nutriment", 50) - bitesize = 10 + bitesize = 10 + list_reagents = list("nutriment" = 50) /obj/item/weapon/reagent_containers/food/snacks/candiedapple name = "Candied Apple" desc = "An apple coated in sugary sweetness." icon_state = "candiedapple" filling_color = "#F21873" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3) // A candy apple without sugar... /obj/item/weapon/reagent_containers/food/snacks/applepie name = "Apple Pie" desc = "A pie containing sweet sweet love... or apple." icon_state = "applepie" filling_color = "#E0EDC5" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 - + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/cherrypie name = "Cherry Pie" desc = "Taste so good, make a grown man cry." icon_state = "cherrypie" filling_color = "#FF525A" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/twobread name = "Two Bread" desc = "It is very bitter and winy." icon_state = "twobread" filling_color = "#DBCC9A" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich name = "Jelly Sandwich" @@ -2119,41 +1609,28 @@ icon_state = "jellysandwich" trash = /obj/item/trash/plate filling_color = "#9E3A78" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 2, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 2, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/boiledslimecore name = "Boiled Slime Core" desc = "A boiled red thing." icon_state = "boiledrorocore" - New() - ..() - reagents.add_reagent("slimejelly", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/mint name = "mint" desc = "it is only wafer thin." icon_state = "mint" filling_color = "#F2F2F2" - - New() - ..() - reagents.add_reagent("minttoxin", 1) - bitesize = 1 + list_reagents = list("minttoxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/mushroomsoup name = "chantrelle soup" @@ -2161,29 +1638,24 @@ icon_state = "mushroomsoup" trash = /obj/item/trash/snack_bowl filling_color = "#E386BF" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit name = "plump helmet biscuit" desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour." icon_state = "phelmbiscuit" filling_color = "#CFB4C4" + bitesize = 2 + list_reagents = list("nutriment" = 5) - New() - ..() - if(prob(10)) - name = "exceptional plump helmet biscuit" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit/New() + ..() + if(prob(10)) + name = "exceptional plump helmet biscuit" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" // Is this a reference? + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("omnizine", 5) /obj/item/weapon/reagent_containers/food/snacks/chawanmushi name = "chawanmushi" @@ -2191,11 +1663,7 @@ icon_state = "chawanmushi" trash = /obj/item/trash/snack_bowl filling_color = "#F0F2E4" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 1 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/beetsoup name = "beet soup" @@ -2203,24 +1671,24 @@ icon_state = "beetsoup" trash = /obj/item/trash/snack_bowl filling_color = "#FAC9FF" + bitesize = 2 + list_reagents = list("nutriment" = 8) - New() - ..() - switch(rand(1,6)) - if(1) - name = "borsch" - if(2) - name = "bortsch" - if(3) - name = "borstch" - if(4) - name = "borsh" - if(5) - name = "borshch" - if(6) - name = "borscht" - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/beetsoup/New() + ..() + switch(rand(1,6)) + if(1) + name = "borsch" + if(2) + name = "bortsch" + if(3) + name = "borstch" + if(4) + name = "borsh" + if(5) + name = "borshch" + if(6) + name = "borscht" /obj/item/weapon/reagent_containers/food/snacks/herbsalad name = "herb salad" @@ -2228,11 +1696,8 @@ icon_state = "herbsalad" trash = /obj/item/trash/snack_bowl filling_color = "#76B87F" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/validsalad name = "valid salad" @@ -2240,12 +1705,8 @@ icon_state = "validsalad" trash = /obj/item/trash/snack_bowl filling_color = "#76B87F" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8, "omnizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/appletart name = "golden apple streusel tart" @@ -2253,33 +1714,24 @@ icon_state = "gappletart" trash = /obj/item/trash/plate filling_color = "#FFFF00" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("gold", 5) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8, "gold" = 5) /obj/item/weapon/reagent_containers/food/snacks/dough_ball name = "ball of raw dough" desc = "A ball of raw dough, ready to be molded into new recipes." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "dough" - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/weapon/kitchen/rollingpin)) - user.visible_message( \ - "[user] flattens the dough with the rolling pin!", \ - "\blue You flatten the dough with your rolling pin!" \ - ) - new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src.loc) - qdel(src) + list_reagents = list("nutriment" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/dough_ball/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W,/obj/item/weapon/kitchen/rollingpin)) + user.visible_message( \ + "[user] flattens the dough with the rolling pin!", \ + "You flatten the dough with your rolling pin!" \ + ) + new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(loc) + qdel(src) /////////////////////////////////////////////////Sliceable//////////////////////////////////////// // All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels @@ -2293,10 +1745,7 @@ icon_state = "flatdough" slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice slices_num = 3 - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice name = "slice of dough" @@ -2312,11 +1761,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice slices_num = 5 filling_color = "#FF7575" - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice name = "meatbread slice" @@ -2333,11 +1779,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice slices_num = 5 filling_color = "#8AFF75" - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice name = "xenomeatbread slice" @@ -2353,12 +1796,8 @@ icon_state = "spidermeatbread" slice_path = /obj/item/weapon/reagent_containers/food/snacks/spidermeatbreadslice slices_num = 5 - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("toxin", 15) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10, "toxin" = 15) /obj/item/weapon/reagent_containers/food/snacks/spidermeatbreadslice name = "spider meat bread slice" @@ -2366,9 +1805,7 @@ icon_state = "xenobreadslice" trash = /obj/item/trash/plate bitesize = 2 - New() - ..() - reagents.add_reagent("toxin", 2) + list_reagents = list("toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread name = "Banana-nut bread" @@ -2377,11 +1814,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice slices_num = 5 filling_color = "#EDE5AD" - New() - ..() - reagents.add_reagent("banana", 20) - reagents.add_reagent("nutriment", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("banana" = 20, "nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice name = "Banana-nut bread slice" @@ -2398,10 +1832,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice slices_num = 5 filling_color = "#F7FFE0" - New() - ..() - reagents.add_reagent("nutriment", 30) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 30) /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice name = "Tofubread slice" @@ -2411,7 +1843,6 @@ filling_color = "#F7FFE0" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake name = "Carrot Cake" desc = "A favorite desert of a certain wascally wabbit. Not a lie." @@ -2419,11 +1850,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice slices_num = 5 filling_color = "#FFD675" - New() - ..() - reagents.add_reagent("nutriment", 25) - reagents.add_reagent("oculine", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 25, "oculine" = 10) /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice name = "Carrot Cake slice" @@ -2440,12 +1868,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/braincakeslice slices_num = 5 filling_color = "#E6AEDB" - New() - ..() - reagents.add_reagent("protein", 15) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("mannitol", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 15, "nutriment" = 10, "mannitol" = 10) /obj/item/weapon/reagent_containers/food/snacks/braincakeslice name = "Brain Cake slice" @@ -2462,10 +1886,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice slices_num = 5 filling_color = "#FAF7AF" - New() - ..() - reagents.add_reagent("nutriment", 25) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 25) /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice name = "Cheese Cake slice" @@ -2482,9 +1904,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice slices_num = 5 filling_color = "#F7EDD5" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice name = "Vanilla Cake slice" @@ -2501,9 +1921,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice slices_num = 5 filling_color = "#FADA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice name = "Orange Cake slice" @@ -2520,9 +1938,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/limecakeslice slices_num = 5 filling_color = "#CBFA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/limecakeslice name = "Lime Cake slice" @@ -2539,9 +1955,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice slices_num = 5 filling_color = "#FAFA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice name = "Lemon Cake slice" @@ -2558,10 +1972,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice slices_num = 5 filling_color = "#805930" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("chocolate",20) + list_reagents = list("nutriment" = 20, "chocolate" = 20) /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice name = "Chocolate Cake slice" @@ -2578,11 +1989,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge slices_num = 5 filling_color = "#FFF700" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("cheese", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 20, "cheese" = 20) /obj/item/weapon/reagent_containers/food/snacks/cheesewedge name = "Cheese wedge" @@ -2597,12 +2005,7 @@ icon_state = "weirdcheesewedge" filling_color = "#00FF33" bitesize = 2 - New() - ..() - reagents.add_reagent("mercury", 5) - reagents.add_reagent("lsd", 5) - reagents.add_reagent("ethanol", 5) - reagents.add_reagent("weird_cheese", 5) + list_reagents = list("mercury" = 5, "lsd" = 5, "ethanol" = 5, "weird_cheese" = 5) /obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake name = "Birthday Cake" @@ -2611,11 +2014,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice slices_num = 5 filling_color = "#FFD6D6" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("sprinkles", 10) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 20, "sprinkles" = 10) /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice name = "Birthday Cake slice" @@ -2632,14 +2032,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/breadslice slices_num = 6 filling_color = "#FFE396" - - New() - ..() - reagents.add_reagent("nutriment", 6) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/breadslice name = "Bread slice" @@ -2648,10 +2042,7 @@ trash = /obj/item/trash/plate filling_color = "#D27332" bitesize = 2 - - New() - ..() - reagents.add_reagent("bread", 5) + list_reagents = list("bread" = 5) /obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread name = "Cream Cheese Bread" @@ -2660,10 +2051,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice slices_num = 5 filling_color = "#FFF896" - New() - ..() - reagents.add_reagent("nutriment", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice name = "Cream Cheese Bread slice" @@ -2673,7 +2062,6 @@ filling_color = "#FFF896" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/watermelonslice name = "Watermelon Slice" desc = "A slice of watery goodness." @@ -2681,7 +2069,6 @@ filling_color = "#FF3867" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake name = "Apple Cake" desc = "A cake centred with Apple" @@ -2689,9 +2076,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/applecakeslice slices_num = 5 filling_color = "#EBF5B8" - New() - ..() - reagents.add_reagent("nutriment", 15) + list_reagents = list("nutriment" = 15) /obj/item/weapon/reagent_containers/food/snacks/applecakeslice name = "Apple Cake slice" @@ -2708,10 +2093,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice slices_num = 5 filling_color = "#F5B951" - - New() - ..() - reagents.add_reagent("nutriment", 15) + list_reagents = list("nutriment" = 15) /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice name = "Pumpkin Pie slice" @@ -2726,10 +2108,7 @@ desc = "It's a salted cracker." icon_state = "cracker" filling_color = "#F5DEB8" - - New() - ..() - reagents.add_reagent("nutriment", 1) + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/rawcutlet name = "raw cutlet" @@ -2737,17 +2116,16 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawcutlet" bitesize = 1 - New() - ..() - reagents.add_reagent("protein", 1) - attackby(obj/item/weapon/W, mob/user, params) - if(istype(W,/obj/item/weapon/kitchen/knife)) - user.visible_message( \ - "[user] cuts the raw cutlet with the knife!", \ - "You cut the raw cutlet with your knife!" \ - ) - new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(src.loc) - qdel(src) + list_reagents = list("protein" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W,/obj/item/weapon/kitchen/knife)) + user.visible_message( \ + "[user] cuts the raw cutlet with the knife!", \ + "You cut the raw cutlet with your knife!" \ + ) + new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(loc) + qdel(src) /////////////////////////////////////////////////PIZZA//////////////////////////////////////// @@ -2762,11 +2140,8 @@ icon_state = "pizzamargherita" slice_path = /obj/item/weapon/reagent_containers/food/snacks/margheritaslice slices_num = 6 - New() - ..() - reagents.add_reagent("nutriment", 40) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 40, "tomatojuice" = 6) /obj/item/weapon/reagent_containers/food/snacks/margheritaslice name = "Margherita slice" @@ -2781,12 +2156,8 @@ icon_state = "meatpizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("protein", 30) - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 30, "nutriment" = 20, "tomatojuice" = 6) /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice name = "Meatpizza slice" @@ -2801,11 +2172,8 @@ icon_state = "mushroompizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("plantmatter", 25) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 25, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice name = "Mushroompizza slice" @@ -2820,13 +2188,8 @@ icon_state = "vegetablepizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("plantmatter", 20) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("tomatojuice", 6) - reagents.add_reagent("oculine", 12) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 20, "nutriment" = 10, "tomatojuice" = 6, "oculine" = 12) /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice name = "Vegetable pizza slice" @@ -2898,18 +2261,16 @@ icon_state = "pizzabox[boxes.len+1]" -/obj/item/pizzabox/attack_hand( mob/user as mob ) - - if( open && pizza ) - user.put_in_hands( pizza ) - - to_chat(user, "\red You take the [src.pizza] out of the [src].") - src.pizza = null +/obj/item/pizzabox/attack_hand(mob/user) + if(open && pizza) + user.put_in_hands(pizza) + to_chat(user, "You take the [pizza] out of the [src].") + pizza = null update_icon() return - if( boxes.len > 0 ) - if( user.get_inactive_hand() != src ) + if(boxes.len > 0) + if(user.get_inactive_hand() != src) ..() return @@ -2917,15 +2278,14 @@ boxes -= box user.put_in_hands( box ) - to_chat(user, "\red You remove the topmost [src] from your hand.") + to_chat(user, "You remove the topmost [src] from your hand.") box.update_icon() update_icon() return ..() -/obj/item/pizzabox/attack_self( mob/user as mob ) - - if( boxes.len > 0 ) +/obj/item/pizzabox/attack_self(mob/user) + if(boxes.len > 0) return open = !open @@ -2935,11 +2295,11 @@ update_icon() -/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob , params) - if( istype(I, /obj/item/pizzabox/) ) +/obj/item/pizzabox/attackby( obj/item/I, mob/user, params) + if(istype(I, /obj/item/pizzabox/)) var/obj/item/pizzabox/box = I - if( !box.open && !src.open ) + if(!box.open && !open) // Make a list of all boxes to be added var/list/boxestoadd = list() boxestoadd += box @@ -2951,36 +2311,36 @@ box.loc = src box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit - src.boxes.Add( boxestoadd ) + boxes.Add( boxestoadd ) box.update_icon() update_icon() - to_chat(user, "\red You put the [box] ontop of the [src]!") + to_chat(user, "You put the [box] ontop of the [src]!") else - to_chat(user, "\red The stack is too high!") + to_chat(user, "The stack is too high!") else - to_chat(user, "\red Close the [box] first!") + to_chat(user, "Close the [box] first!") return - if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name + if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/)) // Long ass fucking object name - if( src.open ) + if(open) user.drop_item() I.loc = src - src.pizza = I + pizza = I update_icon() - to_chat(user, "\red You put the [I] in the [src]!") + to_chat(user, "You put the [I] in the [src]!") else - to_chat(user, "\red You try to push the [I] through the lid but it doesn't work!") + to_chat(user, "You try to push the [I] through the lid but it doesn't work!") return - if( istype(I, /obj/item/weapon/pen/) ) + if(istype(I, /obj/item/weapon/pen/)) - if( src.open ) + if(open) return var/t = input("Enter what you want to add to the tag:", "Write", null, null) as text @@ -3017,110 +2377,63 @@ name = "egg wrap" desc = "The precursor to Pigs in a Blanket." icon_state = "wrap" - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/beans name = "tin of beans" desc = "Musical fruit in a slightly less musical container." icon_state = "beans" - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("beans",10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10, "beans" = 10) /obj/item/weapon/reagent_containers/food/snacks/benedict name = "eggs benedict" desc = "There is only one egg on this, how rude." icon_state = "benedict" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("egg", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "egg" = 3) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" desc = "Fresh footlong ready to go down on." icon_state = "hotdog" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("ketchup", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "ketchup" = 3) /obj/item/weapon/reagent_containers/food/snacks/meatbun name = "meat bun" desc = "Has the potential to not be Dog." icon_state = "meatbun" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 6 + bitesize = 6 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich name = "icecream sandwich" desc = "Portable Ice-cream in it's own packaging." icon_state = "icecreamsandwich" - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("ice", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/notasandwich name = "not-a-sandwich" desc = "Something seems to be wrong with this, you can't quite figure what. Maybe it's his moustache." icon_state = "notasandwich" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/sugarcookie name = "sugar cookie" desc = "Just like your little sister used to make." icon_state = "sugarcookie" - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sugar", 5) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/friedbanana name = "Fried Banana" desc = "Goreng Pisang, also known as fried bananas." icon_state = "friedbanana" - New() - ..() - reagents.add_reagent("sugar", 5) - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("cornoil", 4) - -/obj/item/weapon/reagent_containers/food/snacks/tofurkey - name = "Tofurkey" - desc = "A fake turkey made from tofu." - icon_state = "tofurkey" - New() - ..() - reagents.add_reagent("nutriment", 12) - reagents.add_reagent("ether", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/stuffing - name = "Stuffing" - desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" - icon_state = "stuffing" - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("sugar" = 5, "nutriment" = 8, "cornoil" = 4) /obj/item/weapon/reagent_containers/food/snacks/dionaroast name = "roast diona" @@ -3128,46 +2441,31 @@ icon_state = "dionaroast" trash = /obj/item/trash/plate filling_color = "#75754B" - - New() - ..() - reagents.add_reagent("plantmatter", 4) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("radium", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 4, "nutriment" = 2, "radium" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiledspiderleg name = "boiled spider leg" desc = "A giant spider's leg that's still twitching after being cooked. Gross!" icon_state = "spiderlegcooked" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("toxin", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/spidereggs name = "spider eggs" desc = "A cluster of juicy spider eggs. A great side dish for when you care not for your health." icon_state = "spidereggs" - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("toxin", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 2, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/spidereggsham name = "green eggs and ham" desc = "Would you eat them on a train? Would you eat them on a plane? Would you eat them on a state of the art corporate deathtrap floating through space?" icon_state = "spidereggsham" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("toxin", 3) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 6, "sodiumchloride" = 1, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/sliceable/turkey name = "Turkey" @@ -3175,11 +2473,8 @@ icon_state = "turkey" slice_path = /obj/item/weapon/reagent_containers/food/snacks/turkeyslice slices_num = 6 - New() - ..() - reagents.add_reagent("protein", 24) - reagents.add_reagent("nutriment", 18) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 24, "nutriment" = 18) /obj/item/weapon/reagent_containers/food/snacks/turkeyslice name = "turkey serving" @@ -3196,56 +2491,41 @@ trash = /obj/item/trash/plate filling_color = "#D6D9C1" bitesize = 2 - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("gravy", 5) - reagents.add_reagent("mashedpotatoes", 10) - bitesize = 2 + list_reagents = list("nutriment" = 5, "gravy" = 5, "mashedpotatoes" = 10) ////////////////////////////////ICE CREAM/////////////////////////////////// /obj/item/weapon/reagent_containers/food/snacks/icecream - name = "ice cream" - desc = "Delicious ice cream." - icon = 'icons/obj/kitchen.dmi' - icon_state = "icecream_cone" - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("sugar",1) - bitesize = 1 - update_icon() + name = "ice cream" + desc = "Delicious ice cream." + icon = 'icons/obj/kitchen.dmi' + icon_state = "icecream_cone" + list_reagents = list("nutriment" = 1, "sugar" = 1) - update_icon() - overlays.Cut() - var/image/filling = image('icons/obj/kitchen.dmi', src, "icecream_color") - filling.icon += mix_color_from_reagents(reagents.reagent_list) - overlays += filling +/obj/item/weapon/reagent_containers/food/snacks/icecream/New() + ..() + update_icon() + +/obj/item/weapon/reagent_containers/food/snacks/icecream/update_icon() + overlays.Cut() + var/image/filling = image('icons/obj/kitchen.dmi', src, "icecream_color") + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling /obj/item/weapon/reagent_containers/food/snacks/icecream/icecreamcone - name = "ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cone" - volume = 50 - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sugar",6) - reagents.add_reagent("ice",2) - bitesize = 3 + name = "ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cone" + volume = 50 + bitesize = 3 + list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/icecream/icecreamcup - name = "chocolate ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cup" - volume = 50 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("chocolate",8) - reagents.add_reagent("ice",2) - bitesize = 6 + name = "chocolate ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cup" + volume = 50 + bitesize = 6 + list_reagents = list("nutriment" = 5, "chocolate" = 8, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/cereal name = "box of cereal" @@ -3253,18 +2533,15 @@ icon = 'icons/obj/food/food.dmi' icon_state = "cereal_box" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) + /obj/item/weapon/reagent_containers/food/snacks/deepfryholder name = "Deep Fried Foods Holder Obj" desc = "If you can see this description the code for the deep fryer fucked up." icon = 'icons/obj/food/food.dmi' icon_state = "deepfried_holder_icon" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/dough name = "dough" @@ -3272,9 +2549,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "dough" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) // Dough + rolling pin = flat dough /obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/I, mob/user, params) @@ -3296,9 +2571,7 @@ icon_state = "flat dough" slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice slices_num = 3 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice name = "dough slice" @@ -3306,29 +2579,22 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "doughslice" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 1) + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/bun name = "bun" desc = "The base for any self-respecting burger." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "bun" - bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/taco name = "taco" desc = "Take a bite!" icon_state = "taco" bitesize = 3 - New() - ..() - reagents.add_reagent("nutriment", 7) + list_reagents = list("nutriment" = 7) /obj/item/weapon/reagent_containers/food/snacks/cutlet name = "cutlet" @@ -3336,9 +2602,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "cutlet" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 2) + list_reagents = list("protein" = 2) /obj/item/weapon/reagent_containers/food/snacks/rawmeatball name = "raw meatball" @@ -3346,18 +2610,14 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawmeatball" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 2) + list_reagents = list("protein" = 2) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" desc = "Unrelated to dogs, maybe." icon_state = "hotdog" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 6) + list_reagents = list("protein" = 6) /obj/item/weapon/reagent_containers/food/snacks/flatbread name = "flatbread" @@ -3365,9 +2625,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "flatbread" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/rawsticks name = "raw potato sticks" @@ -3375,18 +2633,14 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawsticks" bitesize = 2 - New() - ..() - reagents.add_reagent("plantmatter", 3) + list_reagents = list("plantmatter" = 3) /obj/item/weapon/reagent_containers/food/snacks/ectoplasm name = "ectoplasm" desc = "A luminescent blob of what scientists refer to as 'ghost goo'." icon = 'icons/obj/wizard.dmi' icon_state = "ectoplasm" - New() - ..() - reagents.add_reagent("ectoplasm", 10) + list_reagents = list("ectoplasm" = 10) /obj/item/weapon/reagent_containers/food/snacks/liquidfood name = "\improper LiquidFood Ration" @@ -3394,12 +2648,8 @@ icon_state = "liquidfood" trash = /obj/item/trash/liquidfood filling_color = "#A8A8A8" - - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("iron", 3) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 20, "iron" = 3) /obj/item/weapon/reagent_containers/food/snacks/tastybread @@ -3408,8 +2658,5 @@ icon_state = "tastybread" trash = /obj/item/trash/tastybread filling_color = "#A66829" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index b71bb0be2d4..fafa983cf1d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -52,13 +52,13 @@ else overlays += image('icons/obj/kitchen.dmi', "gridle") -/obj/machinery/gibber/relaymove(mob/user as mob) +/obj/machinery/gibber/relaymove(mob/user) if(locked) return go_out() -/obj/machinery/gibber/attack_hand(mob/user as mob) +/obj/machinery/gibber/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return @@ -73,7 +73,7 @@ else startgibbing(user) -/obj/machinery/gibber/attackby(obj/item/P as obj, mob/user as mob, params) +/obj/machinery/gibber/attackby(obj/item/P, mob/user, params) if(istype(P, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = P if(G.state < 2) @@ -126,7 +126,7 @@ return user.visible_message("[user] starts to put [victim] into the gibber!") - src.add_fingerprint(user) + add_fingerprint(user) if(do_after(user, 30, target = victim) && user.Adjacent(src) && victim.Adjacent(user) && !occupant) user.visible_message("[user] stuffs [victim] into the gibber!") @@ -155,7 +155,7 @@ return for(var/obj/O in src) - O.loc = src.loc + O.loc = loc occupant.forceMove(get_turf(src)) occupant = null @@ -212,11 +212,11 @@ /obj/machinery/gibber/proc/startgibbing(var/mob/user, var/UserOverride=0) if(!istype(user) && !UserOverride) - log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") + log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") return if(UserOverride) - msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (JMP)") + msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (JMP)") if(operating) return @@ -236,7 +236,7 @@ var/slab_name = occupant.name var/slab_count = 3 var/slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human //gibber can only gib humans on paracode, no need to check meat type - var/slab_nutrition = src.occupant.nutrition / 15 + var/slab_nutrition = occupant.nutrition / 15 slab_nutrition /= slab_count @@ -352,7 +352,7 @@ feedinTopanim() return 1 -/obj/machinery/gibber/autogibber/proc/ejectclothes(var/mob/living/carbon/human/H) +/obj/machinery/gibber/autogibber/proc/ejectclothes(mob/living/carbon/human/H) if(!istype(H)) return 0 if(H != occupant) return 0 //only using H as a shortcut to typecast for(var/obj/O in H) @@ -367,7 +367,7 @@ if(O.flags & NODROP) qdel(O) //they are already dead by now H.unEquip(O) - O.loc = src.loc + O.loc = loc O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) sleep(1) @@ -375,7 +375,7 @@ if(C.flags & NODROP) qdel(C) H.unEquip(C) - C.loc = src.loc + C.loc = loc C.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) sleep(1) @@ -385,7 +385,7 @@ var/spats = 0 //keeps track of how many items get spit out. Don't show a message if none are found. for(var/obj/O in src) if(istype(O)) - O.loc = src.loc + O.loc = loc O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) spats++ sleep(1) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 5fbd65deddc..59f9ec60d12 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -24,10 +24,7 @@ /obj/machinery/icemachine/New() - var/datum/reagents/R = new/datum/reagents(500) - reagents = R - R.my_atom = src - + create_reagents(500) /obj/machinery/icemachine/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/reagent_containers/glass)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm index f0fb01efad2..19da4fb85ac 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm @@ -63,11 +63,11 @@ var/list/ingredients_source = list( while(ingredients.len < 11) ingredients.Add(5) -/obj/machinery/icecream_vat/attack_hand(mob/user as mob) +/obj/machinery/icecream_vat/attack_hand(mob/user) user.set_machine(src) interact(user) -/obj/machinery/icecream_vat/interact(mob/user as mob) +/obj/machinery/icecream_vat/interact(mob/user) var/dat dat += "Dispense vanilla icecream There is [ingredients[ICECREAM_VANILLA]] scoops of vanilla icecream left (made from milk and ice).
" dat += "Dispense strawberry icecream There is [ingredients[FLAVOUR_STRAWBERRY]] dollops of strawberry flavouring left (obtained from berry juice.
" @@ -91,7 +91,7 @@ var/list/ingredients_source = list( popup.set_content(dat) popup.open(0) -/obj/machinery/icecream_vat/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/icecream_vat/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/reagent_containers)) if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/icecream)) var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = O @@ -99,7 +99,7 @@ var/list/ingredients_source = list( if(ingredients[ICECREAM_VANILLA] > 0) var/flavour_name = get_icecream_flavour_string(dispense_flavour) if(dispense_flavour < 11 && ingredients[dispense_flavour] > 0) - src.visible_message("[bicon(src)] [user] scoops delicious [flavour_name] flavoured icecream into [I].") + visible_message("[bicon(src)] [user] scoops delicious [flavour_name] flavoured icecream into [I].") ingredients[dispense_flavour] -= 1 ingredients[ICECREAM_VANILLA] -= 1 @@ -127,7 +127,7 @@ var/list/ingredients_source = list( else var/obj/item/weapon/reagent_containers/R = O if(R.reagents) - src.visible_message("[user] has emptied all of [R] into [src].") + visible_message("[user] has emptied all of [R] into [src].") for(var/datum/reagent/current_reagent in R.reagents.reagent_list) if(ingredients_source[current_reagent.id]) add(ingredients_source[current_reagent.id], current_reagent.volume / 2) @@ -151,7 +151,7 @@ var/list/ingredients_source = list( ingredients[INGR_FLOUR] -= amount ingredients[INGR_SUGAR] -= amount ingredients[CONE_WAFFLE] += amount - src.visible_message("[user] cooks up some waffle cones.") + visible_message("[user] cooks up some waffle cones.") else to_chat(user, "You require sugar and flour to make waffle cones.") if(CONE_CHOC) @@ -160,7 +160,7 @@ var/list/ingredients_source = list( ingredients[CONE_WAFFLE] -= amount ingredients[FLAVOUR_CHOCOLATE] -= amount ingredients[CONE_CHOC] += amount - src.visible_message("[user] cooks up some chocolate cones.") + visible_message("[user] cooks up some chocolate cones.") else to_chat(user, "You require waffle cones and chocolate flavouring to make chocolate cones.") if(ICECREAM_VANILLA) @@ -169,7 +169,7 @@ var/list/ingredients_source = list( ingredients[INGR_ICE] -= amount ingredients[INGR_MILK] -= amount ingredients[ICECREAM_VANILLA] += amount - src.visible_message("[user] whips up some vanilla icecream.") + visible_message("[user] whips up some vanilla icecream.") else to_chat(user, "You require milk and ice to make vanilla icecream.") updateDialog() @@ -179,7 +179,7 @@ var/list/ingredients_source = list( return if(href_list["dispense"]) dispense_flavour = text2num(href_list["dispense"]) - src.visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.") + visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.") if(href_list["cone"]) var/dispense_cone = text2num(href_list["cone"]) @@ -187,11 +187,11 @@ var/list/ingredients_source = list( var/cone_name = get_icecream_flavour_string(dispense_cone) if(ingredients[dispense_cone] >= 1) ingredients[dispense_cone] -= 1 - var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(src.loc) + var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(loc) I.cone_type = cone_name I.icon_state = "icecream_cone_[cone_name]" I.desc = "Delicious [cone_name] cone, but no ice cream." - src.visible_message("[usr] dispenses a crunchy [cone_name] cone from [src].") + visible_message("[usr] dispenses a crunchy [cone_name] cone from [src].") else to_chat(usr, "There are no [cone_name] cones left!") updateDialog() @@ -202,7 +202,7 @@ var/list/ingredients_source = list( if(href_list["eject"]) if(held_container) - held_container.forceMove(src.loc) + held_container.forceMove(loc) held_container = null updateDialog() @@ -231,7 +231,7 @@ var/list/ingredients_source = list( /obj/item/weapon/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour) var/flavour_name = get_icecream_flavour_string(flavour) name = "[flavour_name] icecream" - src.overlays += "icecream_[flavour_name]" + overlays += "icecream_[flavour_name]" desc = "Delicious [cone_type] cone with a dollop of [flavour_name] ice cream." ice_creamed = 1 diff --git a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm index e1cb054690f..03ceb5c0034 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm @@ -35,7 +35,7 @@ return -/obj/machinery/juicer/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/juicer/attackby(obj/item/O, mob/user, params) if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) if(beaker) @@ -46,9 +46,9 @@ return 0 O.forceMove(src) beaker = O - src.verbs += /obj/machinery/juicer/verb/detach + verbs += /obj/machinery/juicer/verb/detach update_icon() - src.updateUsrDialog() + updateUsrDialog() return 0 if(!is_type_in_list(O, allowed_items)) to_chat(user, "It doesn't look like that contains any juice.") @@ -57,24 +57,24 @@ to_chat(user, "\the [O] is stuck to your hand, you cannot put it in \the [src]") return 0 O.forceMove(src) - src.updateUsrDialog() + updateUsrDialog() return 0 -/obj/machinery/juicer/attack_ai(mob/user as mob) +/obj/machinery/juicer/attack_ai(mob/user) return 0 -/obj/machinery/juicer/attack_hand(mob/user as mob) +/obj/machinery/juicer/attack_hand(mob/user) user.set_machine(src) interact(user) -/obj/machinery/juicer/interact(mob/user as mob) // The microwave Menu +/obj/machinery/juicer/interact(mob/user) // The microwave Menu var/is_chamber_empty = 0 var/is_beaker_ready = 0 var/processing_chamber = "" var/beaker_contents = "" for(var/i in allowed_items) - for(var/obj/item/O in src.contents) + for(var/obj/item/O in contents) if(!istype(O,i)) continue processing_chamber+= "some [O]
" @@ -119,7 +119,7 @@ if("detach") detach() - src.updateUsrDialog() + updateUsrDialog() return /obj/machinery/juicer/verb/detach() @@ -130,8 +130,8 @@ return if(!beaker) return - src.verbs -= /obj/machinery/juicer/verb/detach - beaker.forceMove(src.loc) + verbs -= /obj/machinery/juicer/verb/detach + beaker.forceMove(loc) beaker = null update_icon() @@ -159,8 +159,8 @@ return if(!beaker || beaker.reagents.total_volume >= beaker.reagents.maximum_volume) return - playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) - for(var/obj/item/weapon/reagent_containers/food/snacks/O in src.contents) + playsound(loc, 'sound/machines/juicer.ogg', 50, 1) + for(var/obj/item/weapon/reagent_containers/food/snacks/O in contents) var/r_id = get_juice_id(O) beaker.reagents.add_reagent(r_id,get_juice_amount(O)) qdel(O) diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 648f228bb54..ef7591e3955 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -32,8 +32,7 @@ ********************/ /obj/machinery/kitchen_machine/New() - reagents = new/datum/reagents(100) - reagents.my_atom = src + create_reagents(100) if(!available_recipes) available_recipes = new acceptable_items = new @@ -56,7 +55,7 @@ * Item Adding ********************/ -/obj/machinery/kitchen_machine/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/kitchen_machine/attackby(obj/item/O, mob/user, params) if(operating) return if(!broken && dirty < 100) @@ -77,8 +76,8 @@ default_deconstruction_crowbar(O) - if(src.broken > 0) - if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver + if(broken > 0) + if(broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver user.visible_message( \ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ @@ -88,8 +87,8 @@ "[user] fixes part of \the [src].", \ "You have fixed part of \the [src]." \ ) - src.broken = 1 // Fix it a bit - else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench + broken = 1 // Fix it a bit + else if(broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench user.visible_message( \ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ @@ -99,14 +98,14 @@ "[user] fixes \the [src].", \ "You have fixed \the [src]." \ ) - src.icon_state = off_icon - src.broken = 0 // Fix it! - src.dirty = 0 // just to be sure - src.flags = OPENCONTAINER + icon_state = off_icon + broken = 0 // Fix it! + dirty = 0 // just to be sure + flags = OPENCONTAINER else to_chat(user, "It's broken!") return 1 - else if(src.dirty==100) // The machine is all dirty so can't be used! + else if(dirty==100) // The machine is all dirty so can't be used! if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them user.visible_message( \ "[user] starts to clean \the [src].", \ @@ -117,10 +116,10 @@ "[user] has cleaned \the [src].", \ "You have cleaned \the [src]." \ ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = off_icon - src.flags = OPENCONTAINER + dirty = 0 // It's clean! + broken = 0 // just to be sure + icon_state = off_icon + flags = OPENCONTAINER else //Otherwise bad luck!! to_chat(user, "It's dirty!") return 1 @@ -161,12 +160,12 @@ else to_chat(user, "You have no idea what you can cook with this [O].") return 1 - src.updateUsrDialog() + updateUsrDialog() -/obj/machinery/kitchen_machine/attack_ai(mob/user as mob) +/obj/machinery/kitchen_machine/attack_ai(mob/user) return 0 -/obj/machinery/kitchen_machine/attack_hand(mob/user as mob) +/obj/machinery/kitchen_machine/attack_hand(mob/user) user.set_machine(src) interact(user) @@ -174,15 +173,15 @@ * Machine Menu * ********************/ -/obj/machinery/kitchen_machine/interact(mob/user as mob) // The microwave Menu +/obj/machinery/kitchen_machine/interact(mob/user) // The microwave Menu if(panel_open || !anchored) return var/dat = "" - if(src.broken > 0) + if(broken > 0) dat = {"Bzzzzttttt"} - else if(src.operating) - dat = {"[pick(src.cook_verbs)] in progress!
Please wait...!
"} - else if(src.dirty==100) + else if(operating) + dat = {"[pick(cook_verbs)] in progress!
Please wait...!
"} + else if(dirty==100) dat = {"This [src] is dirty!
Please clean it before use!
"} else var/list/items_counts = new @@ -237,7 +236,7 @@ var/datum/browser/popup = new(user, name, name, 400, 400) popup.set_content(dat) popup.open(0) - onclose(user, "[src.name]") + onclose(user, "[name]") return @@ -298,14 +297,14 @@ byproduct = recipe.get_byproduct() stop() if(cooked) - cooked.forceMove(src.loc) + cooked.forceMove(loc) for(var/i=1,i\The [src] turns on.
", "You hear \a [src].") - src.operating = 1 - src.icon_state = on_icon - src.updateUsrDialog() + visible_message("\The [src] turns on.", "You hear \a [src].") + operating = 1 + icon_state = on_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/abort() - src.operating = 0 // Turn it off again aferwards - src.icon_state = off_icon - src.updateUsrDialog() + operating = 0 // Turn it off again aferwards + icon_state = off_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/stop() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.operating = 0 // Turn it off again aferwards - src.icon_state = off_icon - src.updateUsrDialog() + playsound(loc, 'sound/machines/ding.ogg', 50, 1) + operating = 0 // Turn it off again aferwards + icon_state = off_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/dispose() for(var/obj/O in contents) - O.forceMove(src.loc) - if(src.reagents.total_volume) - src.dirty++ - src.reagents.clear_reagents() + O.forceMove(loc) + if(reagents.total_volume) + dirty++ + reagents.clear_reagents() to_chat(usr, "You dispose of \the [src]'s contents.") - src.updateUsrDialog() + updateUsrDialog() /obj/machinery/kitchen_machine/proc/muck_start() - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound - src.icon_state = dirty_icon // Make it look dirty!! + playsound(loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound + icon_state = dirty_icon // Make it look dirty!! /obj/machinery/kitchen_machine/proc/muck_finish() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.visible_message("\The [src] gets covered in muck!") - src.dirty = 100 // Make it dirty so it can't be used util cleaned - src.flags = null //So you can't add condiments - src.icon_state = dirty_icon // Make it look dirty too - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() + playsound(loc, 'sound/machines/ding.ogg', 50, 1) + visible_message("\The [src] gets covered in muck!") + dirty = 100 // Make it dirty so it can't be used util cleaned + flags = null //So you can't add condiments + icon_state = dirty_icon // Make it look dirty too + operating = 0 // Turn it off again aferwards + updateUsrDialog() /obj/machinery/kitchen_machine/proc/broke() var/datum/effect/system/spark_spread/s = new s.set_up(2, 1, src) s.start() - src.icon_state = broken_icon // Make it look all busted up and shit - src.visible_message("The [src] breaks!") //Let them know they're stupid - src.broken = 2 // Make it broken so it can't be used util fixed - src.flags = null //So you can't add condiments - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() + icon_state = broken_icon // Make it look all busted up and shit + visible_message("The [src] breaks!") //Let them know they're stupid + broken = 2 // Make it broken so it can't be used util fixed + flags = null //So you can't add condiments + operating = 0 // Turn it off again aferwards + updateUsrDialog() /obj/machinery/kitchen_machine/proc/fail() var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) @@ -382,7 +381,7 @@ if(id) amount+=O.reagents.get_reagent_amount(id) qdel(O) - src.reagents.clear_reagents() + reagents.clear_reagents() ffuu.reagents.add_reagent("carbon", amount) ffuu.reagents.add_reagent("????", amount/10) ffuu.forceMove(get_turf(src)) @@ -392,8 +391,8 @@ return usr.set_machine(src) - if(src.operating) - src.updateUsrDialog() + if(operating) + updateUsrDialog() return switch(href_list["action"]) diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index dc283e65d6c..e70ac59209e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -33,7 +33,7 @@ cube_production = cubes_made required_grind = req_grind -/obj/machinery/monkey_recycler/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) return @@ -62,7 +62,7 @@ cycle_through = 0 to_chat(user, "You change the monkeycube type to [initial(cube_type.name)].") - if(src.stat != 0) //NOPOWER etc + if(stat != 0) //NOPOWER etc return if(istype(O, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = O @@ -76,11 +76,11 @@ user.drop_item() qdel(target) to_chat(user, "You stuff the monkey in the machine.") - playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) + playsound(loc, 'sound/machines/juicer.ogg', 50, 1) var/offset = prob(50) ? -2 : 2 animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking use_power(500) - src.grinded++ + grinded++ sleep(50) pixel_x = initial(pixel_x) to_chat(user, "The machine now has [grinded] monkey\s worth of material stored.") @@ -90,15 +90,15 @@ to_chat(user, "The machine only accepts monkeys!") return -/obj/machinery/monkey_recycler/attack_hand(var/mob/user as mob) - if(src.stat != 0) //NOPOWER etc +/obj/machinery/monkey_recycler/attack_hand(mob/user) + if(stat != 0) //NOPOWER etc return if(grinded >= required_grind) to_chat(user, "The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube.") - playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1) + playsound(loc, 'sound/machines/hiss.ogg', 50, 1) grinded -= required_grind for(var/i = 0, i < cube_production, i++) // Forgot to fix this bit the first time through - new cube_type(src.loc) + new cube_type(loc) to_chat(user, "The machine's display flashes that it has [grinded] monkey\s worth of material left.") else // I'm not sure if the \s macro works with a word in between; I'll play it safe to_chat(user, "The machine needs at least [required_grind] monkey\s worth of material to compress [cube_production] monkey\s. It only has [grinded].") diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 796e8c4bd4b..6a47eb94ff5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -60,7 +60,7 @@ food_choices.Remove(U) for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/cook/V = new U - src.food_choices += V + food_choices += V return /obj/machinery/cooking/candy @@ -75,5 +75,5 @@ food_choices.Remove(U) for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/candy)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/V = new U - src.food_choices += V + food_choices += V return diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index d2b810dc7bb..5183fe6a4fa 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -58,9 +58,9 @@ var/time = 40 /datum/food_processor_process/proc/process_food(loc, what, obj/machinery/processor/processor) - if(src.output && loc && processor) + if(output && loc && processor) for(var/i = 0, i < processor.rating_amount, i++) - new src.output(loc) + new output(loc) if(what) qdel(what) @@ -154,9 +154,9 @@ return P return 0 -/obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/processor/attackby(obj/item/O, mob/user, params) - if(src.processing) + if(processing) to_chat(user, "\the [src] is already processing something!") return 1 @@ -191,25 +191,25 @@ what.loc = src return -/obj/machinery/processor/attack_hand(var/mob/user as mob) +/obj/machinery/processor/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) //no power or broken return - if(src.processing) + if(processing) to_chat(user, "\the [src] is already processing something!") return 1 - if(src.contents.len == 0) + if(contents.len == 0) to_chat(user, "\the [src] is empty.") return 1 - src.processing = 1 + processing = 1 user.visible_message("[user] turns on [src].", \ "You turn on [src].", \ "You hear a food processor.") - playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) + playsound(loc, 'sound/machines/blender.ogg', 50, 1) use_power(500) var/total_time = 0 - for(var/O in src.contents) + for(var/O in contents) var/datum/food_processor_process/P = select_recipe(O) if(!P) log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.") @@ -217,14 +217,14 @@ total_time += P.time sleep(total_time / rating_speed) - for(var/O in src.contents) + for(var/O in contents) var/datum/food_processor_process/P = select_recipe(O) if(!P) log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.") continue - P.process_food(src.loc, O, src) - src.processing = 0 + P.process_food(loc, O, src) + processing = 0 - src.visible_message("\the [src] has finished processing.", \ + visible_message("\the [src] has finished processing.", \ "\the [src] has finished processing.", \ "You hear a food processor stopping.") diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index fa4dcfaf851..d9b540cbde4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -317,10 +317,17 @@ * SmartFridge Menu ********************/ -/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) user.set_machine(src) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500) + ui.open() + +/obj/machinery/smartfridge/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["contents"] = null data["electrified"] = seconds_electrified > 0 data["shoot_inventory"] = shoot_inventory @@ -337,11 +344,7 @@ if(items.len > 0) data["contents"] = items - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/smartfridge/Topic(href, href_list) if(..()) return 0 diff --git a/code/modules/food_and_drinks/recipes/recipes_candy.dm b/code/modules/food_and_drinks/recipes/recipes_candy.dm index 2ab54fc0e27..98f969a17ec 100644 --- a/code/modules/food_and_drinks/recipes/recipes_candy.dm +++ b/code/modules/food_and_drinks/recipes/recipes_candy.dm @@ -78,6 +78,11 @@ items = list(/obj/item/weapon/reagent_containers/food/snacks/egg) result = /obj/item/weapon/reagent_containers/food/snacks/candy/nougat +/datum/recipe/candy/nougat/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + // *********************************************************** // Base Candy Recipes (unflavored / plain) // *********************************************************** diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index 4c459b737ff..5845e860c9d 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -89,6 +89,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/fishfingers +/datum/recipe/grill/fishfingers/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/fishfingers/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/grill/cutlet items = list( /obj/item/weapon/reagent_containers/food/snacks/rawcutlet diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 0f58955a2bf..5903e191b4e 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -205,10 +205,11 @@ reagents = list("water" = 5, "vodka" = 5) fruit = list("amanita" = 3) result = /obj/item/weapon/reagent_containers/food/snacks/amanitajelly - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..(container) - being_cooked.reagents.del_reagent("amanitin") - return being_cooked + +/datum/recipe/microwave/amanitajelly/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..() + being_cooked.reagents.del_reagent("amanitin") + return being_cooked /datum/recipe/microwave/meatballsoup reagents = list("water" = 10) @@ -538,10 +539,11 @@ datum/recipe/microwave/slimesandwich /datum/recipe/microwave/herbsalad fruit = list("ambrosia" = 3, "apple" = 1) result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..(container) - being_cooked.reagents.del_reagent("toxin") - return being_cooked + +/datum/recipe/microwave/herbsalad/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked /datum/recipe/microwave/aesirsalad fruit = list("ambrosiadeus" = 3, "goldapple" = 1) @@ -553,10 +555,11 @@ datum/recipe/microwave/slimesandwich /obj/item/weapon/reagent_containers/food/snacks/meatball, ) result = /obj/item/weapon/reagent_containers/food/snacks/validsalad - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..(container) - being_cooked.reagents.del_reagent("toxin") - return being_cooked + +/datum/recipe/microwave/validsalad/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked ////////////////////////////FOOD ADDITTIONS/////////////////////////////// diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index 9ee3ff3343e..d20c06e260f 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -176,20 +176,22 @@ /obj/item/weapon/paper, ) result = /obj/item/weapon/reagent_containers/food/snacks/fortunecookie - make_food(var/obj/container as obj) + +/datum/recipe/oven/fortunecookie/make_food(obj/container) + var/obj/item/weapon/paper/paper = locate() in container + paper.loc = null //prevent deletion + var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..() + paper.loc = being_cooked + being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn + return being_cooked + +/datum/recipe/oven/fortunecookie/check_items(obj/container) + . = ..() + if(.) var/obj/item/weapon/paper/paper = locate() in container - paper.loc = null //prevent deletion - var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..(container) - paper.loc = being_cooked - being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn - return being_cooked - check_items(var/obj/container as obj) - . = ..() - if(.) - var/obj/item/weapon/paper/paper = locate() in container - if(!paper || !paper.info) - return -1 - return . + if(!paper || !paper.info) + return -1 + return . /datum/recipe/oven/pizzamargherita fruit = list("tomato" = 1) @@ -293,6 +295,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread +/datum/recipe/oven/bread/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/applepie fruit = list("apple" = 1) items = list( @@ -377,6 +384,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/appletart +/datum/recipe/oven/appletart/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/appletart/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/cracker reagents = list("sodiumchloride" = 1) items = list( @@ -392,6 +404,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/sugarcookie +/datum/recipe/oven/sugarcookie/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/flatbread items = list( /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm index 005be6c1f7e..b6c943dbdab 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm @@ -31,7 +31,7 @@ /datum/crafting_recipe/cherrysandwich name = "Cherry Jelly Sandwich" reqs = list( - /datum/reagent/cherryjelly = 5, + /datum/reagent/consumable/cherryjelly = 5, /obj/item/weapon/reagent_containers/food/snacks/breadslice = 2, ) result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry @@ -49,7 +49,7 @@ /datum/crafting_recipe/jellyburger name = "Cherry Jelly Burger" reqs = list( - /datum/reagent/cherryjelly = 5, + /datum/reagent/consumable/cherryjelly = 5, /obj/item/weapon/reagent_containers/food/snacks/bun = 1, ) result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index bc6692d72b1..712f368a078 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -13,9 +13,7 @@ ..() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src + create_reagents(50) //Handle some post-spawn var stuff. if(planttype) @@ -98,7 +96,7 @@ to_chat(M, "You are stunned by the powerful acid of the Deathnettle!") add_logs(user, M, "attacked", src) - M.eye_blurry += force/7 + M.AdjustEyeBlurry(force/7) if(prob(20)) M.Paralyse(force / 6) M.Weaken(force / 15) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 42323841094..c50503d7aa5 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -157,11 +157,17 @@ degrade_upper = 70 - (tier * 10) //Tier 1: 60, Tier 4: 30 /obj/machinery/botany/extractor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(!user) return - var/list/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/botany/extractor/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] var/list/geneMasks[0] for(var/gene_tag in plant_controller.gene_tag_list) @@ -190,12 +196,7 @@ data["hasGenetics"] = 0 data["sourceName"] = 0 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/botany/Topic(href, href_list) @@ -308,11 +309,17 @@ degrade_upper = 11 - tier //Tier 1: 10, Tier 4: 6 /obj/machinery/botany/editor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(!user) return - var/list/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/botany/editor/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] data["activity"] = active @@ -340,12 +347,7 @@ else data["loaded"] = 0 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/botany/editor/Topic(href, href_list) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index e9c63ed8794..72bf80c58de 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -380,10 +380,12 @@ //--FalseIncarnate /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label() - set name = "Remove Label" set category = "Object" set src in view(1) + + if(usr.incapacitated()) + return if(labelled) to_chat(usr, "You remove the label.") @@ -397,6 +399,9 @@ set name = "Set Light" set category = "Object" set src in view(1) + + if(usr.incapacitated()) + return var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10) if(new_light) diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 2f41c6cdb5c..4086403c6e0 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -13,19 +13,23 @@ origin_tech = "magnets=1;biotech=1" var/form_title var/last_data + var/print_cooldown = 0 + var/cooldown_length = 50 // Five seconds /obj/item/device/analyzer/plant_analyzer/proc/print_report_verb() set name = "Print Plant Report" set category = "Object" set src = usr - if(usr.stat || usr.restrained() || usr.lying) + if(usr.incapacitated()) return + print_report(usr) /obj/item/device/analyzer/plant_analyzer/Topic(href, href_list) if(..()) - return + return 1 + if(href_list["print"]) print_report(usr) @@ -33,6 +37,11 @@ if(!last_data) to_chat(user, "There is no scan data to print.") return + if(print_cooldown > world.time) + to_chat(user, "The printer is still cooling down.") + return + print_cooldown = world.time + cooldown_length + playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src)) P.name = "paper - [form_title]" diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm index e8c047c98bc..bdd73533c82 100644 --- a/code/modules/karma/karma.dm +++ b/code/modules/karma/karma.dm @@ -84,7 +84,7 @@ var/list/karma_spenders = list() /mob/verb/spend_karma_list() set name = "Award Karma" set desc = "Let the gods know whether someone's been nice. Can only be used once per round." - set category = "Special Verbs" + set category = "OOC" if(!can_give_karma()) return @@ -113,7 +113,7 @@ var/list/karma_spenders = list() /mob/verb/spend_karma(var/mob/M) set name = "Award Karma to Player" set desc = "Let the gods know whether someone's been nice. Can only be used once per round." - set category = "Special Verbs" + set category = "OOC" if(!M) to_chat(usr, "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing.") @@ -144,8 +144,8 @@ var/list/karma_spenders = list() /client/verb/check_karma() set name = "Check Karma" - set category = "Special Verbs" set desc = "Reports how much karma you have accrued." + set category = "OOC" var/currentkarma=verify_karma() to_chat(usr, {"
You have [currentkarma] available."}) diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index 9b589878475..e1a577e24fa 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -88,7 +88,7 @@ D.visible_message("[A] pounds [D] on the chest!", \ "[A] slams your chest! You can't breathe!") playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1) - D.losebreath += 5 + D.AdjustLoseBreath(5) D.adjustOxyLoss(10) return 1 @@ -97,7 +97,7 @@ "[A] karate chops your neck, rendering you unable to speak for a short time!") playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1) D.apply_damage(5, BRUTE) - D.silent += 10 + D.AdjustSilence(10) return 1 datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) @@ -170,4 +170,4 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi name = "krav maga gloves" desc = "These gloves can teach you to perform Krav Maga using nanochips." icon_state = "fightgloves" - item_state = "fightgloves" \ No newline at end of file + item_state = "fightgloves" diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index bc4e15eb598..960844a063a 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -66,7 +66,7 @@ D.visible_message("[A] knees [D] in the stomach!", \ "[A] winds you with a knee in the stomach!") D.audible_message("[D] gags!") - D.losebreath += 3 + D.AdjustLoseBreath(3) D.Stun(2) playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) if(prob(80)) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index f7ee5816d6e..3f2784a1bf4 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -105,34 +105,30 @@ i++ /obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params) - if(!powered()) - return - if(istype(W,/obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/I = usr.get_active_hand() - if(istype(I) && !istype(inserted_id)) - if(!user.drop_item()) - return - I.loc = src - inserted_id = I - interact(user) - return - if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W)) updateUsrDialog() return - if(exchange_parts(user, W)) return - if(panel_open) if(istype(W, /obj/item/weapon/crowbar)) empty_content() default_deconstruction_crowbar(W) return - if(default_unfasten_wrench(user, W)) return - + if(istype(W,/obj/item/weapon/card/id)) + if(!powered()) + return + else + var/obj/item/weapon/card/id/I = usr.get_active_hand() + if(istype(I) && !istype(inserted_id)) + if(!user.drop_item()) + return + I.forceMove(src) + inserted_id = I + interact(user) + return ..() /obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O) @@ -437,18 +433,6 @@ return /obj/machinery/mineral/equipment_vendor/attackby(obj/item/I as obj, mob/user as mob, params) - if(istype(I, /obj/item/weapon/mining_voucher)) - RedeemVoucher(I, user) - return - if(istype(I,/obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/C = usr.get_active_hand() - if(istype(C) && !istype(inserted_id)) - if(!usr.drop_item()) - return - C.loc = src - inserted_id = C - interact(user) - return if(default_deconstruction_screwdriver(user, "mining-open", "mining", I)) updateUsrDialog() return @@ -456,6 +440,24 @@ if(istype(I, /obj/item/weapon/crowbar)) default_deconstruction_crowbar(I) return 1 + if(istype(I, /obj/item/weapon/mining_voucher)) + if(!powered()) + return + else + RedeemVoucher(I, user) + return + if(istype(I,/obj/item/weapon/card/id)) + if(!powered()) + return + else + var/obj/item/weapon/card/id/C = usr.get_active_hand() + if(istype(C) && !istype(inserted_id)) + if(!usr.drop_item()) + return + C.forceMove(src) + inserted_id = C + interact(user) + return ..() /obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 06e47411001..23598f55f09 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -257,9 +257,6 @@ /obj/item/device/mobcapsule/proc/dump_contents(mob/user) if(captured) captured.forceMove(get_turf(src)) - if(captured.client) - captured.client.eye = captured.client.mob - captured.client.perspective = MOB_PERSPECTIVE captured = null /obj/item/device/mobcapsule/attack_self(mob/user) @@ -536,4 +533,4 @@ if(do_after(user, 20, target = src)) new /obj/item/stack/rods(loc) qdel(src) - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 50a9527326a..f158534475e 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -28,7 +28,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(disabilities & BLIND || blinded) //blind people can't see dumbass + if(!has_vision()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -65,7 +65,7 @@ if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src)) message = "[message]" - if(disabilities & DEAF || ear_deaf) + if(!can_hear()) if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set if(speaker == src) to_chat(src, "You cannot hear yourself speak!") @@ -95,7 +95,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(disabilities & BLIND || blinded) //blind people can't see dumbass + if(!has_vision()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -182,7 +182,7 @@ formatted = language.format_message_radio(message, verb) else formatted = "[verb], \"[message]\"" - if(disabilities & DEAF || ear_deaf) + if(!can_hear()) if(prob(20)) to_chat(src, "You feel your headset vibrate but can hear nothing from it!") else if(track) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index ed867cd5178..d23df61e993 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -22,7 +22,7 @@ var/atom/movable/mob_container mob_container = M mob_container.forceMove(get_turf(src)) - M.reset_view() + M.reset_perspective() qdel(src) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 81b54bcc3a6..c9e410d9e9b 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -605,7 +605,7 @@ return ..() // Can we speak this language, as opposed to just understanding it? -/mob/proc/can_speak(datum/language/speaking) +/mob/proc/can_speak_language(datum/language/speaking) return (universal_speak || (speaking && speaking.flags & INNATE) || speaking in src.languages) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 9e91abdd3e4..ca520ba9289 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -27,7 +27,7 @@ var/heat_protection = 0.5 var/leaping = 0 ventcrawler = 2 - + var/list/alien_organs = list() /mob/living/carbon/alien/New() @@ -163,8 +163,8 @@ show_stat_emergency_shuttle_eta() -/mob/living/carbon/alien/SetStunned(amount) - ..(amount) +/mob/living/carbon/alien/SetStunned(amount, updating = 1, force = 0) + ..() if(!(status_flags & CANSTUN) && amount) // add some movement delay move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10 diff --git a/code/modules/mob/living/carbon/alien/alien_defenses.dm b/code/modules/mob/living/carbon/alien/alien_defenses.dm index 3949948b0f3..c6e2bcc510d 100644 --- a/code/modules/mob/living/carbon/alien/alien_defenses.dm +++ b/code/modules/mob/living/carbon/alien/alien_defenses.dm @@ -16,7 +16,7 @@ In all, this is a lot like the monkey code. /N switch(M.a_intent) if(I_HELP) - sleeping = max(0,sleeping-5) + AdjustSleeping(-5) resting = 0 AdjustParalysis(-3) AdjustStunned(-3) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 28439ab0ff2..4292f101eb5 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -125,6 +125,7 @@ Doesn't work on other aliens/AI.*/ A.xo = U.x - T.x A.fire() A.newtonian_move(get_dir(U, T)) + newtonian_move(get_dir(U, T)) return /mob/living/carbon/alien/humanoid/proc/resin() // -- TLE diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm index 958742b3e61..1249c0f462c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm @@ -6,9 +6,7 @@ icon_state = "aliend_s" /mob/living/carbon/alien/humanoid/drone/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(src.name == "alien drone") src.name = text("alien drone ([rand(1, 1000)])") src.real_name = src.name diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 60a7e4e2f1a..bc1e1e4f56d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -6,9 +6,7 @@ icon_state = "alienh_s" /mob/living/carbon/alien/humanoid/hunter/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien hunter") name = text("alien hunter ([rand(1, 1000)])") real_name = name @@ -108,7 +106,7 @@ sleep(2)//Runtime prevention (infinite bump() calls on hulks) step_towards(src,L) else - weakened = 2 + Weaken(2, 1, 1) toggle_leap(0) pounce_cooldown = !pounce_cooldown @@ -116,7 +114,7 @@ pounce_cooldown = !pounce_cooldown else if(A.density && !A.CanPass(src)) visible_message("[src] smashes into [A]!", "[src] smashes into [A]!") - weakened = 2 + Weaken(2, 1, 1) if(leaping) leaping = 0 diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index 186577a1908..2644ef8a306 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -35,9 +35,7 @@ overlays += I /mob/living/carbon/alien/humanoid/sentinel/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien sentinel") name = text("alien sentinel ([rand(1, 1000)])") real_name = name diff --git a/code/modules/mob/living/carbon/alien/humanoid/empress.dm b/code/modules/mob/living/carbon/alien/humanoid/empress.dm index 346247c8e10..d50befa47f0 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/empress.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/empress.dm @@ -31,9 +31,7 @@ overlays += I /mob/living/carbon/alien/humanoid/empress/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) //there should only be one queen for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 876cae4b312..b99cde337d6 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -16,9 +16,7 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/humanoid/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src + create_reagents(1000) if(name == "alien") name = text("alien ([rand(1, 1000)])") real_name = name @@ -96,13 +94,15 @@ f_loss += 60 - adjustEarDamage(30, 120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(3.0) b_loss += 30 if(prob(50) && !shielded) Paralyse(1) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) @@ -298,4 +298,4 @@ return initial(pixel_x) /mob/living/carbon/alien/humanoid/get_permeability_protection() - return 0.8 \ No newline at end of file + return 0.8 diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 4cccb6e57ed..e6a2f6567c2 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -57,18 +57,17 @@ if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 - silent = 0 + SetSilence(0) else //ALIVE. LIGHTS ARE ON if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 - stat = DEAD - silent = 0 + SetSilence(0) return 1 //UNCONSCIOUS. NO-ONE IS HOME - if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) ) - if( health <= 20 && prob(1) ) + if((getOxyLoss() > 50) || (config.health_threshold_crit >= health)) + if(health <= 20 && prob(1)) spawn(0) emote("gasp") if(!reagents.has_reagent("epinephrine")) @@ -76,14 +75,12 @@ Paralyse(3) if(paralysis) - AdjustParalysis(-1) blinded = 1 stat = UNCONSCIOUS else if(sleeping) - sleeping = max(sleeping-1, 0) blinded = 1 stat = UNCONSCIOUS - if( prob(10) && health ) + if(prob(10) && health) spawn(0) emote("hiss") //CONSCIOUS @@ -98,36 +95,25 @@ if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - adjustEarDamage(-0.05, 0) - - //Other - if(stunned) - AdjustStunned(-1) - if(!stunned) - update_icons() - - if(weakened) - weakened = max(weakened-1,0) - if(!weakened) - update_icons() + AdjustEarDamage(-0.05) if(stuttering) - stuttering = max(stuttering-1, 0) + AdjustStuttering(-1) if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) if(druggy) - druggy = max(druggy-1, 0) - return 1 \ No newline at end of file + AdjustDruggy(-1) + return 1 diff --git a/code/modules/mob/living/carbon/alien/humanoid/login.dm b/code/modules/mob/living/carbon/alien/humanoid/login.dm deleted file mode 100644 index 914371a969d..00000000000 --- a/code/modules/mob/living/carbon/alien/humanoid/login.dm +++ /dev/null @@ -1,6 +0,0 @@ -/mob/living/carbon/alien/humanoid/Login() - ..() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - return diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 0fcec18e8ad..11914d3c0ee 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -10,9 +10,7 @@ ventcrawler = 0 /mob/living/carbon/alien/humanoid/queen/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) //there should only be one queen for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 8e9e0dea576..c7c8c1cefa8 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -15,9 +15,7 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/larva/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien larva") name = "alien larva ([rand(1, 1000)])" real_name = name @@ -88,13 +86,15 @@ f_loss += 60 - adjustEarDamage(30,120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(3.0) b_loss += 30 if(prob(50)) Paralyse(1) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 76ceef6ad2e..447f65c6744 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -17,12 +17,12 @@ if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 - silent = 0 + SetSilence(0) else //ALIVE. LIGHTS ARE ON if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 - silent = 0 + SetSilence(0) return 1 //UNCONSCIOUS. NO-ONE IS HOME @@ -35,11 +35,9 @@ Paralyse(3) if(paralysis) - AdjustParalysis(-2) blinded = 1 stat = UNCONSCIOUS else if(sleeping) - sleeping = max(sleeping-1, 0) blinded = 1 stat = UNCONSCIOUS if( prob(10) && health ) @@ -57,32 +55,25 @@ if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. - adjustEarDamage(-0.05,0) - - //Other - if(stunned) - AdjustStunned(-1) - - if(weakened) - weakened = max(weakened-1,0) + AdjustEarDamage(-0.05) if(stuttering) - stuttering = max(stuttering-1, 0) + AdjustStuttering(-1) if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) if(druggy) - druggy = max(druggy-1, 0) - return 1 \ No newline at end of file + AdjustDruggy(-1) + return 1 diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index cf602694233..80585fad863 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -31,21 +31,31 @@ return 1 /mob/living/carbon/alien/update_sight() - if(stat == DEAD || (XRAY in mutations)) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + sight = SEE_MOBS + if(nightvision) see_in_dark = 8 + see_invisible = SEE_INVISIBLE_MINIMUM + else + see_in_dark = 4 see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if(stat != DEAD) - sight |= SEE_MOBS - sight &= ~SEE_TURFS - sight &= ~SEE_OBJS - if(nightvision) - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_MINIMUM - else if(!nightvision) - see_in_dark = 4 - see_invisible = 45 - if(see_override) - see_invisible = see_override + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) + sight |= E.vision_flags + if(E.dark_view) + see_in_dark = max(see_in_dark, E.dark_view) + if(E.see_invisible) + see_invisible = min(see_invisible, E.see_invisible) + + if(see_override) + see_invisible = see_override diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 996687ee4b0..555fcff29da 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -8,45 +8,43 @@ icon = 'icons/obj/surgery.dmi' icon_state = "brain1" - New() - var/datum/reagents/R = new/datum/reagents(330) - reagents = R - R.my_atom = src - ..() +/mob/living/carbon/brain/New() + create_reagents(330) + ..() - Destroy() - if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting. - if(stat!=DEAD) //If not dead. - death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA - ghostize() //Ghostize checks for key so nothing else is necessary. - return ..() +/mob/living/carbon/brain/Destroy() + if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting. + if(stat!=DEAD) //If not dead. + death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA + ghostize() //Ghostize checks for key so nothing else is necessary. + return ..() - say_understands(var/other)//Goddamn is this hackish, but this say code is so odd - if(istype(other, /mob/living/silicon/ai)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/decoy)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/pai)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/robot)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/carbon/human)) +/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd + if(istype(other, /mob/living/silicon/ai)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else return 1 - if(istype(other, /mob/living/carbon/slime)) + if(istype(other, /mob/living/silicon/decoy)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else return 1 - return ..() + if(istype(other, /mob/living/silicon/pai)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else + return 1 + if(istype(other, /mob/living/silicon/robot)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else + return 1 + if(istype(other, /mob/living/carbon/human)) + return 1 + if(istype(other, /mob/living/carbon/slime)) + return 1 + return ..() /mob/living/carbon/brain/update_canmove(delay_action_updates = 0) @@ -100,8 +98,8 @@ I'm using this for Stat to give it a more nifty interface to work with /mob/living/carbon/brain/can_safely_leave_loc() return 0 //You're not supposed to be ethereal jaunting, brains -/mob/living/carbon/brain/adjustEarDamage() +/mob/living/carbon/brain/SetEarDamage() // no ears to damage or heal return -/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal - return \ No newline at end of file +/mob/living/carbon/brain/SetEarDeaf() + return diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index fa466759bcc..e3ffe2074a7 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -21,7 +21,8 @@ /obj/item/organ/internal/brain/surgeryize() if(!owner) return - owner.setEarDamage(0,0) //Yeah, didn't you...hear? The ears are totally inside the brain. + owner.SetEarDeaf(0) + owner.SetEarDamage(0) //Yeah, didn't you...hear? The ears are totally inside the brain. /obj/item/organ/internal/brain/xeno name = "xenomorph brain" diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 40273bf66ad..e61f8750901 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -52,32 +52,15 @@ if(stat == DEAD) blinded = 1 - silent = 0 + SetSilence(0) else if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life))) death() - blinded =1 - silent = 0 + blinded = 1 + SetSilence(0) return 1 . = 1 -/mob/living/carbon/brain/handle_vision() - ..() - - if(stat == 2 || (XRAY in src.mutations)) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if(stat != 2) - sight &= ~SEE_TURFS - sight &= ~SEE_MOBS - sight &= ~SEE_OBJS - see_in_dark = 2 - see_invisible = SEE_INVISIBLE_LIVING - handle_hud_icons_health() - /mob/living/carbon/brain/breathe() return diff --git a/code/modules/mob/living/carbon/brain/login.dm b/code/modules/mob/living/carbon/brain/login.dm index e90297dfe5b..622ae74656a 100644 --- a/code/modules/mob/living/carbon/brain/login.dm +++ b/code/modules/mob/living/carbon/brain/login.dm @@ -1,3 +1,3 @@ /mob/living/carbon/brain/Login() ..() - sleeping = 0 \ No newline at end of file + SetSleeping(0) diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 4f76dce16bd..3b5b415964d 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -185,7 +185,7 @@ src.brainmob.loc = src src.brainmob.container = src src.brainmob.stat = 0 - src.brainmob.silent = 0 + src.brainmob.SetSilence(0) dead_mob_list -= src.brainmob ..() diff --git a/code/modules/mob/living/carbon/brain/update_status.dm b/code/modules/mob/living/carbon/brain/update_status.dm new file mode 100644 index 00000000000..2532edfe37d --- /dev/null +++ b/code/modules/mob/living/carbon/brain/update_status.dm @@ -0,0 +1,8 @@ +/mob/living/carbon/brain/update_stat() + if(status_flags & GODMODE) + return + // if(health <= min_health) + if(health <= config.health_threshold_dead) + if(stat != DEAD) + death() + // Put brain(organ) damaging code here diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 688508c4bf3..a26b5e967af 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -158,13 +158,13 @@ "You feel a powerful shock coursing through your body!", \ "You hear a heavy electrical crack." \ ) - jitteriness += 1000 //High numbers for violent convulsions + AdjustJitter(1000) //High numbers for violent convulsions do_jitter_animation(jitteriness) - stuttering += 2 + AdjustStuttering(2) if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) Stun(2) spawn(20) - jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less + AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) Stun(3) Weaken(3) @@ -268,7 +268,7 @@ if(istype(src,/mob/living/carbon/human) && src:w_uniform) var/mob/living/carbon/human/H = src H.w_uniform.add_fingerprint(M) - src.sleeping = max(0,src.sleeping-5) + AdjustSleeping(-5) if(src.sleeping == 0) src.resting = 0 AdjustParalysis(-3) @@ -327,8 +327,8 @@ E.damage += rand(12, 16) if(E.damage > E.min_bruised_damage) - eye_blind += damage - eye_blurry += damage * rand(3, 6) + AdjustEyeBlind(damage) + AdjustEyeBlurry(damage * rand(3, 6)) if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2) if(!(E.status & ORGAN_ROBOT)) @@ -537,6 +537,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, thrown_thing = throwable_mob var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors var/turf/end_T = get_turf(target) + throwable_mob.forceMove(start_T) if(start_T && end_T) var/start_T_descriptor = "tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]" var/end_T_descriptor = "tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]" @@ -742,7 +743,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, /mob/living/carbon/resist_fire() fire_stacks -= 5 - weakened = max(weakened, 3)//We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy. + Weaken(3, 1, 1) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy. update_canmove() spin(32,2) visible_message("[src] rolls on the floor, trying to put themselves out!", \ @@ -1038,3 +1039,49 @@ so that different stomachs can handle things in different ways VB*/ /mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0) if(hud_used && hud_used.internals) hud_used.internals.icon_state = "internal[internal_state]" + +//to recalculate and update the mob's total tint from tinted equipment it's wearing. +/mob/living/carbon/proc/update_tint() + if(!tinted_weldhelh) + return + var/tinttotal = get_total_tint() + if(tinttotal >= TINT_BLIND) + overlay_fullscreen("tint", /obj/screen/fullscreen/blind) + else if(tinttotal >= TINT_IMPAIR) + overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2) + else + clear_fullscreen("tint", 0) + +/mob/living/carbon/proc/get_total_tint() + . = 0 + if(istype(head, /obj/item/clothing/head)) + var/obj/item/clothing/head/HT = head + . += HT.tint + if(wear_mask) + . += wear_mask.tint + +/mob/living/carbon/human/get_total_tint() + . = ..() + if(glasses) + var/obj/item/clothing/glasses/G = glasses + . += G.tint + + +//handle stuff to update when a mob equips/unequips a mask. +/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1) + update_inv_wear_mask() + +/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1) + if(C.tint || initial(C.tint)) + update_tint() + update_inv_wear_mask() + +//handle stuff to update when a mob equips/unequips a headgear. +/mob/living/carbon/proc/head_update(obj/item/I, forced) + if(istype(I, /obj/item/clothing)) + var/obj/item/clothing/C = I + if(C.tint || initial(C.tint)) + update_tint() + if(I.flags_inv & HIDEMASK || forced) + update_inv_wear_mask() + update_inv_head() diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index b0ccdc8381d..f8a9b38d098 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -1,9 +1,9 @@ /mob/living/carbon/death(gibbed) - losebreath = 0 + SetLoseBreath(0) med_hud_set_health() med_hud_set_status() if(reagents) reagents.death_metabolize(src) - ..(gibbed) \ No newline at end of file + ..(gibbed) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index eb58d39ea7c..ad1ab28c435 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -43,6 +43,7 @@ H.h_style = hair_style update_hair() + update_inv_glasses() return 1 /mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 4e8ab049927..89c35870cad 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -97,8 +97,8 @@ emote("deathgasp") //let the world KNOW WE ARE DEAD stat = DEAD - dizziness = 0 - jitteriness = 0 + SetDizzy(0) + SetJitter(0) heart_attack = 0 //Handle species-specific deaths. diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 0746cb30b2c..37826ae0a10 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -10,7 +10,7 @@ act = copytext(act, 1, t1) var/muzzled = is_muzzled() - if(disabilities & MUTE || silent) + if(!can_speak()) muzzled = 1 //var/m_type = 1 @@ -313,7 +313,7 @@ M = null if(M) - if(lying || weakened) + if(lying) message = "[src] flops and flails around on the floor." else message = "[src] flips in [M]'s general direction." @@ -378,7 +378,7 @@ message = "[src] faints." if(src.sleeping) return //Can't faint while asleep - src.sleeping += 1 + AdjustSleeping(2) m_type = 1 if("cough", "coughs") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 561e60a3522..cd0e9d751c9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -31,9 +31,7 @@ if(mind) mind.name = real_name - var/datum/reagents/R = new/datum/reagents(330) - reagents = R - R.my_atom = src + create_reagents(330) prev_gender = gender // Debug for plural genders make_blood() @@ -51,9 +49,6 @@ dna.real_name = real_name sync_organ_dna(1) - if(species) - species.handle_dna(src) - UpdateAppearance() /mob/living/carbon/human/OpenCraftingMenu() @@ -352,7 +347,8 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - adjustEarDamage(30, 120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(prob(70) && !shielded) Paralyse(10) @@ -376,7 +372,8 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) if(prob(50) && !shielded) Paralyse(10) @@ -491,8 +488,7 @@ O.show_message(text("The [M.name] has shocked []!", src), 1) Weaken(power) - if(stuttering < power) - stuttering = power + Stuttering(power) Stun(power) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread @@ -715,16 +711,27 @@ var/obj/item/device/pda/pda = wear_id if(istype(pda) && pda.id) id = pda.id - + if(check_hands) if(istype(get_active_hand(), /obj/item/weapon/card/id)) id = get_active_hand() else if(istype(get_inactive_hand(), /obj/item/weapon/card/id)) - id = get_inactive_hand() + id = get_inactive_hand() if(istype(id)) return id + + +/mob/living/carbon/human/update_sight() + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + species.update_sight(src) + //Removed the horrible safety parameter. It was only being used by ninja code anyways. //Now checks siemens_coefficient of the affected area by default /mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0) @@ -1595,6 +1602,7 @@ dna.real_name = real_name species.handle_post_spawn(src) + species.handle_dna(src) //Give them whatever special dna business they got. spawn(0) overlays.Cut() @@ -1739,7 +1747,7 @@ if(last_special > world.time) return - if(stat || paralysis || stunned || weakened || lying || restrained() || buckled) + if(!canmove) to_chat(src, "You cannot leap in your current state.") return @@ -1793,7 +1801,7 @@ if(last_special > world.time) return - if(stat || paralysis || stunned || weakened || lying) + if(!canmove) to_chat(src, "\red You cannot do that in your current state.") return @@ -1993,7 +2001,7 @@ if(istype(pda)) var/obj/item/weapon/card/id/id = pda.id if(istype(id) && id.is_untrackable()) - return 0 + return 0 if(istype(head, /obj/item/clothing/head)) var/obj/item/clothing/head/hat = head if(hat.blockTracking) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 37aa720042e..a0e84e1a7db 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -267,7 +267,7 @@ emp_act visible_message("[src] has been knocked down!", \ "[src] has been knocked down!") apply_effect(5, WEAKEN, armor) - confused += 15 + AdjustConfused(15) if(prob(I.force + ((100 - health)/2)) && src != user && I.damtype == BRUTE) ticker.mode.remove_revolutionary(mind) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 50f1e7cd342..2f07fdacd07 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -201,3 +201,12 @@ I use this to standardize shadowling dethrall code return null var/obj/item/organ/internal/O = get_int_organ(organ_name) return O.parent_organ + +/mob/living/carbon/human/has_organic_damage() + var/odmg = 0 + for(var/obj/item/organ/external/O in organs) + if(O.status & ORGAN_ROBOT) + odmg += O.brute_dam + odmg += O.burn_dam + return (health < (100 - odmg)) + diff --git a/code/modules/mob/living/carbon/human/interactive/interactive.dm b/code/modules/mob/living/carbon/human/interactive/interactive.dm index 1862062e4cf..2dfc4f8d24e 100644 --- a/code/modules/mob/living/carbon/human/interactive/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive/interactive.dm @@ -167,7 +167,7 @@ /client/proc/customiseSNPC(mob/living/carbon/human/interactive/T in npc_master.botPool_l) set name = "Customize SNPC" - set desc = "Customise the SNPC" + set desc = "Customize the SNPC" set category = "Debug" if(!holder) @@ -403,7 +403,7 @@ if(!hud_used) hud_used = new /datum/hud/human(src) -/mob/living/carbon/human/interactive/New() +/mob/living/carbon/human/interactive/New(var/new_loc, var/new_species = null) ..() snpc_list += src @@ -916,7 +916,7 @@ TARGET = null return 1 - if(!(get_turf(src) in validHome)) + if(!(get_turf(src) in validHome) && validHome.len) tryWalk(pick(get_area_turfs(job2area(myjob)))) return 1 return 0 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 88b81dcef4a..2c13cb4fd7b 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -111,6 +111,13 @@ update_inv_gloves() else if(I == glasses) glasses = null + var/obj/item/clothing/glasses/G = I + if(G.tint) + update_tint() + if(G.prescription) + clear_fullscreen("nearsighted") + if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view) + update_sight() update_inv_glasses() else if(I == head) head = null @@ -118,6 +125,7 @@ update_hair() //rebuild hair update_fhair() update_head_accessory() + head_update(I) update_inv_head() else if(I == r_ear) r_ear = null @@ -140,6 +148,7 @@ if(internal) internal = null update_internals_hud_icon(0) + wear_mask_update(I, toggle_off = FALSE) sec_hud_set_ID() update_inv_wear_mask() else if(I == wear_id) @@ -203,6 +212,7 @@ update_head_accessory(redraw_mob) if(hud_list.len) sec_hud_set_ID() + wear_mask_update(W, toggle_off = TRUE) update_inv_wear_mask(redraw_mob) if(slot_handcuffed) handcuffed = W @@ -247,6 +257,14 @@ update_inv_ears(redraw_mob) if(slot_glasses) glasses = W + var/obj/item/clothing/glasses/G = W + if(G.tint) + update_tint() + if(G.prescription) + if(disabilities & NEARSIGHTED) + overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) + if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view) + update_sight() update_inv_glasses(redraw_mob) if(slot_gloves) gloves = W @@ -257,6 +275,7 @@ update_hair(redraw_mob) //rebuild hair update_fhair(redraw_mob) update_head_accessory(redraw_mob) + head_update(W) update_inv_head(redraw_mob) if(slot_shoes) shoes = W diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 78e9098f434..052d528df0b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1,8 +1,5 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay -#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully - /mob/living/carbon/human var/pressure_alert = 0 @@ -12,11 +9,9 @@ var/exposedtimenow = 0 var/firstexposed = 0 var/heartbeat = 0 - var/tinttotal = 0 // Total level of visually impairing items /mob/living/carbon/human/Life() fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it. - tinttotal = tintcheck() //here as both hud updates and status updates call it life_tick++ in_stasis = 0 @@ -86,8 +81,8 @@ // If we have the gene for being crazy, have random events. if(dna.GetSEState(HALLUCINATIONBLOCK)) - if(prob(1) && hallucination < 1) - hallucination += 20 + if(prob(1)) + Hallucinate(20) if(disabilities & COUGHING) if((prob(5) && paralysis <= 1)) @@ -111,9 +106,9 @@ if(disabilities & NERVOUS) speech_problem_flag = 1 if(prob(10)) - stuttering = max(10, stuttering) + Stuttering(10) - if(getBrainLoss() >= 60 && stat != 2) + if(getBrainLoss() >= 60 && stat != DEAD) speech_problem_flag = 1 if(prob(3)) var/list/s1 = list("IM A PONY NEEEEEEIIIIIIIIIGH", @@ -152,8 +147,8 @@ if(getBrainLoss() >= 100 && stat != 2) //you lapse into a coma and die without immediate aid; RIP. -Fox Weaken(20) - losebreath += 10 - silent += 2 + AdjustLoseBreath(10) + AdjustSilence(2) if(getBrainLoss() >= 120 && stat != 2) //they died from stupidity--literally. -Fox visible_message("[src] goes limp, their facial expression utterly blank.") @@ -281,10 +276,10 @@ var/datum/gas_mixture/breath if(health <= config.health_threshold_crit) - losebreath++ + AdjustLoseBreath(1) if(losebreath > 0) - losebreath-- + AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") if(istype(loc, /obj/)) @@ -696,20 +691,20 @@ overeatduration -= 2 if(drowsyness) - drowsyness-- - eye_blurry = max(2, eye_blurry) + AdjustDrowsy(-1) + EyeBlurry(2) if(prob(5)) - sleeping += 1 + AdjustSleeping(1) Paralyse(5) - confused = max(0, confused - 1) + AdjustConfused(-1) // decrement dizziness counter, clamped to 0 if(resting) - dizziness = max(0, dizziness - 15) - jitteriness = max(0, jitteriness - 15) + AdjustDizzy(-15) + AdjustJitter(-15) else - dizziness = max(0, dizziness - 3) - jitteriness = max(0, jitteriness - 3) + AdjustDizzy(-3) + AdjustJitter(-3) if(species && species.flags & NO_INTORGANS) return @@ -744,8 +739,7 @@ alcohol_strength *= 5 if(alcohol_strength >= slur_start) //slurring - if(!slurring) slurring = 1 - slurring = drunk + Slur(drunk) if(alcohol_strength >= brawl_start) //the drunken martial art if(!istype(martial_art, /datum/martial_art/drunk_brawling)) var/datum/martial_art/drunk_brawling/F = new @@ -754,18 +748,17 @@ if(istype(martial_art, /datum/martial_art/drunk_brawling)) martial_art.remove(src) if(alcohol_strength >= confused_start && prob(33)) //confused walking - if(!confused) confused = 1 - confused = max(confused+(3/sober_str),0) + if(!confused) Confused(1) + AdjustConfused(3/sober_str) if(alcohol_strength >= blur_start) //blurry eyes - eye_blurry = max(eye_blurry, 10/sober_str) - drowsyness = max(drowsyness, 0) + EyeBlurry(10/sober_str) if(!isSynthetic()) //stuff only for non-synthetics if(alcohol_strength >= vomit_start) //vomiting if(prob(8)) fakevomit() if(alcohol_strength >= pass_out) - Paralyse(5 / sober_str) - drowsyness = max(drowsyness, 30/sober_str) + Paralyse(5/sober_str) + Drowsy(30/sober_str) if(L) L.take_damage(0.1, 1) adjustToxLoss(0.1) @@ -789,7 +782,7 @@ /mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside for(var/A in reagents.reagent_list) var/datum/reagent/R = A - if(istype(R, /datum/reagent/ethanol)) + if(istype(R, /datum/reagent/consumable/ethanol)) return 1 return 0 @@ -837,14 +830,14 @@ vision = get_int_organ(species.vision_organ) if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means. - eye_blind = 0 + SetEyeBlind(0) blinded = 0 - eye_blurry = 0 + SetEyeBlurry(0) else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind. - eye_blind = 1 + EyeBlind(2) blinded = 1 - eye_blurry = 1 + EyeBlurry(2) else //blindness @@ -852,34 +845,34 @@ blinded = 1 else if(eye_blind) // Blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster - eye_blurry = max(eye_blurry-3, 0) + AdjustEyeBlurry(-3) blinded = 1 //blurry sight if(vision.is_bruised()) // Vision organs impaired? Permablurry. - eye_blurry = 1 + EyeBlurry(2) if(eye_blurry) // Blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster - adjustEarDamage(-0.15,0) - setEarDamage(-1, max(ear_deaf, 1)) + AdjustEarDamage(-0.15) + EarDeaf(1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - adjustEarDamage(-0.05,0) + AdjustEarDamage(-0.05) if(flying) animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) @@ -896,12 +889,12 @@ else //dead blinded = 1 - silent = 0 + SetSilence(0) /mob/living/carbon/human/handle_vision() if(machine) - if(!machine.check_eye(src)) reset_view(null) + if(!machine.check_eye(src)) reset_perspective(null) else var/isRemoteObserve = 0 if((REMOTE_VIEW in mutations) && remoteview_target) @@ -926,7 +919,7 @@ if(!isRemoteObserve && client && !client.adminobs) remoteview_target = null - reset_view(null) + reset_perspective(null) species.handle_vision(src) @@ -995,8 +988,8 @@ if(shock_stage >= 30) if(shock_stage == 30) custom_emote(1,"is having trouble keeping their eyes open.") - eye_blurry = max(2, eye_blurry) - stuttering = max(stuttering, 5) + EyeBlurry(2) + Stuttering(5) if(shock_stage == 40) to_chat(src, ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")) @@ -1183,8 +1176,7 @@ if(!heart_attack) return else - if(losebreath < 3) - losebreath += 2 + AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) adjustOxyLoss(5) adjustBruteLoss(1) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index d8434a87223..5fe7d44ab6d 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -189,7 +189,7 @@ if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit H.Paralyse(3) // 3 gives them one second to wake up and run away a bit! if(SA_pp > SA_sleep_min) // Enough to make us sleep as well - H.sleeping = min(H.sleeping+2, 10) + H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10) else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning if(prob(20)) spawn(0) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 540cbca31f1..99441a7b9f0 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -46,6 +46,7 @@ var/siemens_coeff = 1 //base electrocution coefficient + var/invis_sight = SEE_INVISIBLE_LIVING var/darksight = 2 var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. @@ -307,7 +308,7 @@ if(!H.co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so. H.co2overloadtime = world.time else if(world.time - H.co2overloadtime > 120) - H.Paralyse(3) + H.Paralyse(5) H.adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good! H.adjustOxyLoss(8) @@ -316,6 +317,7 @@ H.emote("cough") else H.clear_alert("co2") + H.co2overloadtime = 0 if(atmos_requirements["min_co2"]) //species breathes this gas, so they got their air H.failed_last_breath = 0 H.adjustOxyLoss(-5) @@ -334,7 +336,8 @@ if(SA_pp > atmos_requirements["sa_para"]) // Enough to make us paralysed for a bit H.Paralyse(3) // 3 gives them one second to wake up and run away a bit! if(SA_pp > atmos_requirements["sa_sleep"]) // Enough to make us sleep as well - H.sleeping = max(H.sleeping + 2, 10) + // This value is large because breaths are taken only once every 4 life ticks. + H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10) else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning if(prob(20)) spawn(0) @@ -470,118 +473,7 @@ return 0 /datum/species/proc/handle_vision(mob/living/carbon/human/H) - if(H.stat == DEAD) - H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) - H.see_in_dark = 8 - if(!H.druggy) - H.see_invisible = SEE_INVISIBLE_LEVEL_TWO - return - - H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) - - H.see_in_dark = darksight //set their variables to default, modify them later - H.see_invisible = SEE_INVISIBLE_LIVING - - if(H.mind && H.mind.vampire) - if(H.mind.vampire.get_ability(/datum/vampire_passive/full)) - H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - H.see_in_dark = 8 - H.see_invisible = SEE_INVISIBLE_MINIMUM - else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision)) - H.sight |= SEE_MOBS - - - if(XRAY in H.mutations) - H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - H.see_in_dark = 8 - - H.see_invisible = SEE_INVISIBLE_MINIMUM - - - if(H.seer == 1) - var/obj/effect/rune/R = locate() in H.loc - if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) - H.see_invisible = SEE_INVISIBLE_OBSERVER - else - H.see_invisible = SEE_INVISIBLE_LIVING - H.seer = 0 - - //This checks how much the mob's eyewear impairs their vision - if(H.tinttotal >= TINT_IMPAIR) - if(tinted_weldhelh) - H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2) - if(H.tinttotal >= TINT_BLIND) - H.eye_blind = max(H.eye_blind, 1) - else - H.clear_fullscreen("tint") - - var/minimum_darkness_view = INFINITY - if(H.glasses) - if(istype(H.glasses, /obj/item/clothing/glasses)) - var/obj/item/clothing/glasses/G = H.glasses - H.sight |= G.vision_flags - - if(G.darkness_view) - H.see_in_dark = G.darkness_view - minimum_darkness_view = G.darkness_view - - if(!G.see_darkness) - H.see_invisible = SEE_INVISIBLE_MINIMUM - - if(H.head) - if(istype(H.head, /obj/item/clothing/head)) - var/obj/item/clothing/head/hat = H.head - H.sight |= hat.vision_flags - - if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet. - H.see_in_dark = hat.darkness_view - - if(!hat.see_darkness) - H.see_invisible = SEE_INVISIBLE_MINIMUM - - //switch(hat.HUDType) - // if(SECHUD) - // process_sec_hud(H,1) - // if(MEDHUD) - // process_med_hud(H,1) - // if(ANTAGHUD) - // process_antag_hud(H) - - if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey - var/obj/item/weapon/rig/rig = H.back - if(rig.visor) - if(!rig.helmet || (H.head && rig.helmet == H.head)) - if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) - var/obj/item/clothing/glasses/G = rig.visor.vision.glasses - if(istype(G)) - H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision. - if(G.vision_flags) // MESONS - H.sight |= G.vision_flags - - if(!G.see_darkness) - H.see_invisible = SEE_INVISIBLE_MINIMUM - - //switch(G.HUDType) - // if(SECHUD) - // process_sec_hud(H,1) - // if(MEDHUD) - // process_med_hud(H,1) - // if(ANTAGHUD) - // process_antag_hud(H) - - if(H.vision_type) - H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight) - H.see_invisible = H.vision_type.see_invisible - if(H.vision_type.light_sensitive) - H.weakeyes = 1 - H.sight |= H.vision_type.sight_flags - - if(H.see_override) //Override all - H.see_invisible = H.see_override - - if(!H.client) - return 1 - + // Right now this just handles blind, blurry, and similar states if(H.blinded || H.eye_blind) H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind) H.throw_alert("blind", /obj/screen/alert/blind) @@ -684,3 +576,92 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(!(organ_slot in has_organ)) return null return has_organ[organ_slot] + + +/datum/species/proc/update_sight(mob/living/carbon/human/H) + H.sight = initial(H.sight) + H.see_in_dark = darksight + H.see_invisible = invis_sight + + if(H.client.eye != H) + var/atom/A = H.client.eye + if(A.update_remote_sight(H)) //returns 1 if we override all other sight updates. + return + + if(H.mind && H.mind.vampire) + if(H.mind.vampire.get_ability(/datum/vampire_passive/full)) + H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + H.see_in_dark = 8 + H.see_invisible = SEE_INVISIBLE_MINIMUM + else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision)) + H.sight |= SEE_MOBS + + for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs) + H.sight |= E.vision_flags + if(E.dark_view) + H.see_in_dark = E.dark_view + if(E.see_invisible) + H.see_invisible = min(H.see_invisible, E.see_invisible) + + + if(H.seer == 1) + var/obj/effect/rune/R = locate() in H.loc + if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) + H.see_invisible = SEE_INVISIBLE_OBSERVER + else + H.see_invisible = SEE_INVISIBLE_LIVING + H.seer = 0 + + var/lesser_darkview_bonus = INFINITY + // my glasses, I can't see without my glasses + if(H.glasses) + var/obj/item/clothing/glasses/G = H.glasses + H.sight |= G.vision_flags + lesser_darkview_bonus = G.darkness_view + if(G.invis_override) + H.see_invisible = G.invis_override + else + H.see_invisible = min(G.invis_view, H.see_invisible) + + // better living through hat trading + if(H.head) + if(istype(H.head, /obj/item/clothing/head)) + var/obj/item/clothing/head/hat = H.head + H.sight |= hat.vision_flags + + if(hat.darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet. + lesser_darkview_bonus = min(hat.darkness_view,lesser_darkview_bonus) + + if(!hat.see_darkness) + H.see_invisible = SEE_INVISIBLE_MINIMUM + + if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey + var/obj/item/weapon/rig/rig = H.back + if(rig.visor) + if(!rig.helmet || (H.head && rig.helmet == H.head)) + if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) + var/obj/item/clothing/glasses/G = rig.visor.vision.glasses + if(istype(G)) + H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision. + if(G.vision_flags) // MESONS + H.sight |= G.vision_flags + + if(!G.see_darkness) + H.see_invisible = SEE_INVISIBLE_MINIMUM + + if(lesser_darkview_bonus != INFINITY) + H.see_in_dark = max(lesser_darkview_bonus, H.see_in_dark) + + if(H.vision_type) + H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight) + H.see_invisible = H.vision_type.see_invisible + if(H.vision_type.light_sensitive) + H.weakeyes = 1 + H.sight |= H.vision_type.sight_flags + + if(XRAY in H.mutations) + H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + H.see_in_dark = max(H.see_in_dark, 8) + + if(H.see_override) //Override all + H.see_invisible = H.see_override diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 037e5234d27..48555229aad 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -395,6 +395,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1) //Reset our head accessory overlays_standing[HEAD_ACCESSORY_LAYER] = null + overlays_standing[HEAD_ACC_OVER_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) @@ -408,9 +409,8 @@ var/global/list/damage_icon_parts = list() //base icons var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(head_organ.ha_style && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY)) - var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style] + var/datum/sprite_accessory/head_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style] if(head_accessory_style && head_accessory_style.species_allowed) if(head_organ.species.name in head_accessory_style.species_allowed) var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s") @@ -418,11 +418,14 @@ var/global/list/damage_icon_parts = list() head_accessory_s.Blend(rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc), ICON_ADD) head_accessory_standing = head_accessory_s //head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY) //Having it this way preserves animations. Useful for animated antennae. + + if(head_accessory_style.over_hair) //Select which layer to use based on the properties of the head accessory style. + overlays_standing[HEAD_ACC_OVER_LAYER] = image(head_accessory_standing) + else + overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing) else //warning("Invalid ha_style for [species.name]: [ha_style]") - overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing) - if(update_icons) update_icons() @@ -446,7 +449,7 @@ var/global/list/damage_icon_parts = list() //var/icon/debrained_s = new /icon("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s") if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()))) - var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style] + var/datum/sprite_accessory/hair/hair_style = hair_styles_list[head_organ.h_style] //if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN // hair_standing.Blend(debrained_s, ICON_OVERLAY) if(hair_style && hair_style.species_allowed) @@ -477,7 +480,8 @@ var/global/list/damage_icon_parts = list() //FACIAL HAIR OVERLAY /mob/living/carbon/human/proc/update_fhair(var/update_icons=1) //Reset our facial hair - overlays_standing[FHAIR_LAYER] = null + overlays_standing[FHAIR_LAYER] = null + overlays_standing[FHAIR_OVER_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) @@ -493,7 +497,7 @@ var/global/list/damage_icon_parts = list() var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s") if(head_organ.f_style) - var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style] + var/datum/sprite_accessory/facial_hair/facial_hair_style = facial_hair_styles_list[head_organ.f_style] if(facial_hair_style && facial_hair_style.species_allowed) if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.flags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics... var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") @@ -509,11 +513,14 @@ var/global/list/damage_icon_parts = list() facial_s.Blend(facial_secondary_s, ICON_OVERLAY) face_standing.Blend(facial_s, ICON_OVERLAY) + + if(facial_hair_style.over_hair) //Select which layer to use based on the properties of the facial hair style. + overlays_standing[FHAIR_OVER_LAYER] = image(face_standing) + else + overlays_standing[FHAIR_LAYER] = image(face_standing) else //warning("Invalid f_style for [species.name]: [f_style]") - overlays_standing[FHAIR_LAYER] = image(face_standing) - if(update_icons) update_icons() /mob/living/carbon/human/update_mutations(var/update_icons=1) @@ -736,6 +743,8 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_glasses(var/update_icons=1) + overlays_standing[GLASSES_LAYER] = null + overlays_standing[GLASSES_OVER_LAYER] = null if(client && hud_used) var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses] @@ -743,20 +752,26 @@ var/global/list/damage_icon_parts = list() inv.update_icon() if(glasses) + var/image/new_glasses + var/obj/item/organ/external/head/head_organ = get_organ("head") if(client && hud_used && hud_used.hud_shown) if(hud_used.inventory_shown) //if the inventory is open ... glasses.screen_loc = ui_glasses //...draw the item in the inventory screen client.screen += glasses //Either way, add the item to the HUD if(glasses.icon_override) - overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") - else if(glasses.sprite_sheets && glasses.sprite_sheets[species.name]) - overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.name], "icon_state" = "[glasses.icon_state]") + new_glasses = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") + else if(glasses.sprite_sheets && glasses.sprite_sheets[head_organ.species.name]) + new_glasses = image("icon" = glasses.sprite_sheets[head_organ.species.name], "icon_state" = "[glasses.icon_state]") else - overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + new_glasses = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + + var/datum/sprite_accessory/hair/hair_style = hair_styles_list[head_organ.h_style] + if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value. + overlays_standing[GLASSES_OVER_LAYER] = new_glasses + else + overlays_standing[GLASSES_LAYER] = new_glasses - else - overlays_standing[GLASSES_LAYER] = null if(update_icons) update_icons() /mob/living/carbon/human/update_inv_ears(var/update_icons=1) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 985047a8284..91661304144 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -49,10 +49,10 @@ var/datum/gas_mixture/breath if(health <= config.health_threshold_crit) - losebreath++ + AdjustLoseBreath(1) if(losebreath > 0) - losebreath-- + AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") if(istype(loc, /obj/)) @@ -165,7 +165,7 @@ if(SA_partialpressure > SA_para_min) Paralyse(3) if(SA_partialpressure > SA_sleep_min) - sleeping = max(sleeping+2, 10) + AdjustSleeping(2, bound_lower = 0, bound_upper = 10) else if(SA_partialpressure > 0.01) if(prob(20)) spawn(0) emote(pick("giggle","laugh")) @@ -319,30 +319,27 @@ C.pixel_x -= pixel_x_diff C.pixel_y -= pixel_y_diff src = oldsrc - dizziness = max(dizziness - restingpwr, 0) + AdjustDizzy(-restingpwr) if(drowsyness) - drowsyness = max(drowsyness - restingpwr, 0) - eye_blurry = max(2, eye_blurry) + AdjustDrowsy(-restingpwr) + EyeBlurry(2) if(prob(5)) - sleeping += 1 + AdjustSleeping(1) Paralyse(5) if(confused) - confused = max(0, confused - 1) + AdjustConfused(-1) //Jitteryness if(jitteriness) do_jitter_animation(jitteriness) - jitteriness = max(jitteriness - restingpwr, 0) + AdjustJitter(-restingpwr) if(hallucination) spawn handle_hallucinations() - if(hallucination<=2) - hallucination = 0 - else - hallucination -= 2 + AdjustHallucinate(-2) /mob/living/carbon/handle_sleeping() if(..()) @@ -352,8 +349,8 @@ spawn(0) emote("snore") // Keep SSD people asleep - if(player_logged && sleeping < 2) - sleeping = 2 + if(player_logged) + Sleeping(2) return sleeping @@ -412,27 +409,33 @@ return 1 /mob/living/carbon/update_sight() + if(!client) + return if(stat == DEAD) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else - sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) - if(XRAY in mutations) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO + grant_death_vision() + return - else - see_in_dark = 2 - see_invisible = SEE_INVISIBLE_LIVING + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) - if(see_override) - see_invisible = see_override + if(XRAY in mutations) + grant_xray_vision() + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) + sight |= E.vision_flags + if(E.dark_view) + see_in_dark = max(see_in_dark,E.dark_view) + if(E.see_invisible) + see_invisible = min(see_invisible, E.see_invisible) + + if(see_override) + see_invisible = see_override /mob/living/carbon/handle_hud_icons() diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index b51e0084ee3..6e3221c19fa 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -208,25 +208,25 @@ if(src.stuttering) src.stuttering = 0 if(src.eye_blind) - src.eye_blind = 0 + src.SetEyeBlind(0) src.blinded = 1 - if(src.ear_deaf > 0) src.ear_deaf = 0 + if(src.ear_deaf > 0) SetEarDeaf(0) if(src.ear_damage < 25) - src.ear_damage = 0 + SetEarDamage(0) src.density = !( src.lying ) if(src.disabilities & BLIND) src.blinded = 1 if(src.disabilities & DEAF) - src.ear_deaf = 1 + EarDeaf(1) if(src.eye_blurry > 0) - src.eye_blurry = 0 + SetEyeBlurry(0) if(src.druggy > 0) - src.druggy = 0 + SetDruggy(0) return 1 diff --git a/code/modules/mob/living/carbon/update_status.dm b/code/modules/mob/living/carbon/update_status.dm new file mode 100644 index 00000000000..3b0d3a045fc --- /dev/null +++ b/code/modules/mob/living/carbon/update_status.dm @@ -0,0 +1,17 @@ +/mob/living/carbon/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) +// if(health <= min_health) + if(health <= config.health_threshold_dead) + death() + return +// if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health) + if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit) + if(stat == CONSCIOUS) + KnockOut() + else + if(stat == UNCONSCIOUS) + // updating=FALSE because `WakeUp` will handle canmove up for us + StopResting(updating=FALSE) + WakeUp() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 921080c989a..ffd1fb9cd60 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -57,17 +57,16 @@ rad_damage = max(effect * ((100-run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm."))/100),0) radiation += rad_damage if(SLUR) - slurring = max(slurring,(effect * blocked)) + Slur(effect * blocked) if(STUTTER) - if(status_flags & CANSTUN) // stun is usually associated with stutter - stuttering = max(stuttering,(effect * blocked)) + Stuttering(effect * blocked) if(EYE_BLUR) - eye_blurry = max(eye_blurry,(effect * blocked)) + EyeBlurry(effect * blocked) if(DROWSY) - drowsyness = max(drowsyness,(effect * blocked)) + Drowsy(effect * blocked) if(JITTER) if(status_flags & CANSTUN) - jitteriness = max(jitteriness,(effect * blocked)) + Jitter(effect * blocked) updatehealth() return 1 diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index e17d9af6250..c5ce705ba17 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -3,4 +3,4 @@ clear_fullscreens() update_action_buttons_icon() - ..(gibbed) \ No newline at end of file + ..(gibbed) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index a151a062bce..5deb73d219f 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -117,14 +117,14 @@ /mob/living/proc/handle_stunned() if(stunned) - AdjustStunned(-1) + AdjustStunned(-1, updating = 1, force = 1) if(!stunned) update_icons() return stunned /mob/living/proc/handle_weakened() if(weakened) - AdjustWeakened(-1) + AdjustWeakened(-1, updating = 1, force = 1) if(!weakened) update_icons() return weakened @@ -136,22 +136,22 @@ /mob/living/proc/handle_silent() if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) return silent /mob/living/proc/handle_drugged() if(druggy) - druggy = max(druggy-1, 0) + AdjustDruggy(-1) return druggy /mob/living/proc/handle_slurring() if(slurring) - slurring = max(slurring-1, 0) + AdjustSlur(-1) return slurring /mob/living/proc/handle_paralysed() if(paralysis) - AdjustParalysis(-1) + AdjustParalysis(-1, updating = 1, force = 1) return paralysis /mob/living/proc/handle_sleeping() @@ -164,7 +164,7 @@ /mob/living/proc/handle_slowed() if(slowed) - slowed = max(slowed-1, 0) + AdjustSlowed(-1) return slowed /mob/living/proc/handle_drunk() @@ -175,19 +175,20 @@ /mob/living/proc/handle_disabilities() //Eyes if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own - eye_blind = max(eye_blind, 1) + EyeBlind(1) else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else // deafness heals slowly over time, unless ear_damage is over 100 if(ear_damage < 100) - adjustEarDamage(-0.05,-1) + AdjustEarDamage(-0.05) + AdjustEarDeaf(-1) //this handles hud updates. Calls update_vision() and handle_hud_icons() /mob/living/proc/handle_regular_hud_updates() @@ -229,14 +230,32 @@ if(machine) if(!machine.check_eye(src)) - reset_view(null) + reset_perspective(null) else if(!remote_view && !client.adminobs) - reset_view(null) + reset_perspective(null) /mob/living/proc/update_sight() return +// Gives a mob the vision of being dead +/mob/living/proc/grant_death_vision() + sight |= SEE_TURFS + sight |= SEE_MOBS + sight |= SEE_OBJS + see_in_dark = 8 + see_invisible = SEE_INVISIBLE_OBSERVER + +// See through walls, dark, etc. +// basically the same as death vision except you can't +// see ghosts +/mob/living/proc/grant_xray_vision() + sight |= SEE_TURFS + sight |= SEE_MOBS + sight |= SEE_OBJS + see_in_dark = 8 + see_invisible = SEE_INVISIBLE_LEVEL_TWO + /mob/living/proc/handle_hud_icons() handle_hud_icons_health() return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e52d0a71cac..0605c716b48 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -269,19 +269,6 @@ var/obj/item/organ/external/def_zone = ran_zone(t) return def_zone - -//damage/heal the mob ears and adjust the deaf amount -/mob/living/adjustEarDamage(damage, deaf) - ear_damage = max(0, ear_damage + damage) - ear_deaf = max(0, ear_deaf + deaf) - -//pass a negative argument to skip one of the variable -/mob/living/setEarDamage(damage, deaf) - if(damage >= 0) - ear_damage = damage - if(deaf >= 0) - ear_deaf = deaf - // heal ONE external organ, organ gets randomly selected from damaged ones. /mob/living/proc/heal_organ_damage(var/brute, var/burn) adjustBruteLoss(-brute) @@ -308,6 +295,10 @@ adjustFireLoss(burn) src.updatehealth() +/mob/living/proc/has_organic_damage() + return (maxHealth - health) + + /mob/living/proc/restore_all_organs() return @@ -331,14 +322,6 @@ C.reagents.clear_reagents() C.reagents.addiction_list.Cut() -/mob/living/proc/update_revive() // handles revival through other means than cloning or adminbus (defib, IPC repair) - stat = CONSCIOUS - dead_mob_list -= src - living_mob_list |= src - mob_list |= src - setEarDamage(-1,0) - timeofdeath = 0 - /mob/living/proc/rejuvenate() var/mob/living/carbon/human/human_mob = null //Get this declared for use later. @@ -349,25 +332,33 @@ setBrainLoss(0) setStaminaLoss(0) SetSleeping(0) - SetParalysis(0) - SetStunned(0) - SetWeakened(0) - slowed = 0 - losebreath = 0 - dizziness = 0 - jitteriness = 0 - confused = 0 - drowsyness = 0 + SetParalysis(0, 1, 1) + SetStunned(0, 1, 1) + SetWeakened(0, 1, 1) + SetSlowed(0) + SetLoseBreath(0) + SetDizzy(0) + SetJitter(0) + SetConfused(0) + SetDrowsy(0) radiation = 0 - druggy = 0 - hallucination = 0 + SetDruggy(0) + SetHallucinate(0) + blinded = 0 nutrition = 400 bodytemperature = 310 - disabilities = 0 - blinded = 0 - eye_blind = 0 - eye_blurry = 0 - setEarDamage(0,0) + CureBlind() + CureNearsighted() + CureMute() + CureDeaf() + CureTourettes() + CureEpilepsy() + CureCoughing() + CureNervous() + SetEyeBlind(0) + SetEyeBlurry(0) + SetEarDamage(0) + SetEarDeaf(0) heal_overall_damage(1000, 1000) ExtinguishMob() fire_stacks = 0 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 62dc4f26f3a..3a090576351 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -15,8 +15,6 @@ var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this. - var/hallucination = 0 //Directly affects how long a mob will hallucinate for - var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out. @@ -32,7 +30,6 @@ var/update_slimes = 1 var/implanting = 0 //Used for the mind-slave implant - var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU. var/floating = 0 var/mob_size = MOB_SIZE_HUMAN var/nightvision = 0 diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index 90a640187e1..6235aecf2c4 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -6,6 +6,6 @@ if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts. mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. //This causes instant sleep and tags a player as SSD. See life.dm for furthering SSD. - if(sleeping < 2 && mind.active) - sleeping = 2 - player_logged = 1 \ No newline at end of file + if(mind.active) + Sleeping(2) + player_logged = 1 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 95f9362684b..00a141f60f8 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -42,6 +42,8 @@ var/list/ai_verbs_default = list( density = 1 status_flags = CANSTUN|CANPARALYSE|CANPUSH mob_size = MOB_SIZE_LARGE + sight = SEE_TURFS | SEE_MOBS | SEE_OBJS + see_in_dark = 8 can_strip = 0 var/list/network = list("SS13","Telecomms","Research Outpost","Mining Outpost") var/obj/machinery/camera/current = null @@ -427,7 +429,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/check_eye(var/mob/user as mob) if(!current) return null - user.reset_view(current) + user.reset_perspective(current) return 1 /mob/living/silicon/ai/blob_act() @@ -606,15 +608,18 @@ var/list/ai_verbs_default = list( adjustBruteLoss(damage) updatehealth() -/mob/living/silicon/ai/reset_view(atom/A) - if(current) - current.set_light(0) - if(istype(A,/obj/machinery/camera)) +/mob/living/silicon/ai/reset_perspective(atom/A) + if(camera_light_on) + light_cameras() + if(istype(A, /obj/machinery/camera)) current = A - ..() - if(istype(A,/obj/machinery/camera)) - if(camera_light_on) A.set_light(AI_CAMERA_LUMINOSITY) - else A.set_light(0) + + . = ..() + if(.) + if(!A && isturf(loc) && eyeobj) + client.eye = eyeobj + client.perspective = MOB_PERSPECTIVE + eyeobj.get_remote_view_fullscreens(src) /mob/living/silicon/ai/proc/botcall() set category = "AI Commands" @@ -1163,4 +1168,4 @@ var/list/ai_verbs_default = list( to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.") view_core() //A BYOND bug requires you to be viewing your core before your verbs update verbs += /mob/living/silicon/ai/proc/choose_modules - malf_picker = new /datum/module_picker \ No newline at end of file + malf_picker = new /datum/module_picker diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index 71d80df9e02..eeeeed8e8bb 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -114,7 +114,7 @@ var/turf/t = turf if(obscuredTurfs[t]) if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) + t.obscured = image('icons/effects/cameravis.dmi', t, null, 15) obscured += t.obscured for(var/eye in seenby) diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 6599c31c5ce..fe0924880f2 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -1,3 +1,8 @@ +#define POWER_RESTORATION_OFF 0 +#define POWER_RESTORATION_START 1 +#define POWER_RESTORATION_SEARCH_APC 2 +#define POWER_RESTORATION_APC_FOUND 3 + /mob/living/silicon/ai/Life() //doesn't call parent because it's a horrible mess if(stat == DEAD) @@ -6,7 +11,7 @@ var/turf/T = get_turf(src) if(stat != CONSCIOUS) //ai's fucked cameraFollow = null - reset_view(null) + reset_perspective(null) unset_machine() updatehealth() @@ -16,11 +21,16 @@ death() return 0 - if(malfhack) - if(malfhack.aidisabled) - to_chat(src, "ERROR: APC access disabled, hack attempt canceled.") - malfhacking = 0 - malfhack = null + if(!eyeobj || qdeleted(eyeobj) || !eyeobj.loc) + view_core() + + if(machine) + machine.check_eye(src) + + if(malfhack && malfhack.aidisabled) + to_chat(src, "ERROR: APC access disabled, hack attempt canceled.") + malfhacking = 0 + malfhack = null if(aiRestorePowerRoutine) adjustOxyLoss(1) @@ -29,22 +39,9 @@ handle_stunned() - var/is_blind = 0 //THIS WAS JUST FUCKING 'blind' WHICH CONFLICTED WITH A NORMAL VARIABLE var/area/my_area = get_area(src) - if(istype(my_area)) - if(!my_area.power_equip && !is_type_in_list(loc, list(/obj/item, /obj/mecha))) - is_blind = 1 //HOW THE FUCK DID THAT EVEN COMPILE JESUS CHRIST - if(!is_blind) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if(see_override) - see_invisible = see_override + if(!lacks_power()) if(aiRestorePowerRoutine == 2) to_chat(src, "Alert cancelled. Power has been restored without our assistance.") @@ -57,18 +54,12 @@ else - sight &= ~SEE_TURFS - sight &= ~SEE_MOBS - sight &= ~SEE_OBJS - overlay_fullscreen("blind", /obj/screen/fullscreen/blind) - see_in_dark = 0 - see_invisible = SEE_INVISIBLE_LIVING - - if(((!my_area.power_equip) || istype(T, /turf/space)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha))) + if(lacks_power()) if(!aiRestorePowerRoutine) aiRestorePowerRoutine = 1 + update_sight() to_chat(src, "You have lost power!") if(!is_special_character(src)) set_zeroth_law("") @@ -78,7 +69,7 @@ sleep(50) my_area = get_area(src) T = get_turf(src) - if(my_area && my_area.power_equip && !istype(T, /turf/space)) + if(!lacks_power()) to_chat(src, "Alert cancelled. Power has been restored without our assistance.") aiRestorePowerRoutine = 0 return @@ -115,12 +106,11 @@ aiRestorePowerRoutine = 2 return - if(my_area.power_equip) - if(!istype(T, /turf/space)) - to_chat(src, "Alert cancelled. Power has been restored without our assistance.") - aiRestorePowerRoutine = 0 - clear_fullscreen("blind") - return + if(!lacks_power()) + to_chat(src, "Alert cancelled. Power has been restored without our assistance.") + aiRestorePowerRoutine = 0 + clear_fullscreen("blind") + return switch(PRP) if(1) @@ -170,4 +160,17 @@ if(client) var/client/C = client for(var/mob/living/carbon/human/H in view(eyeobj, 14)) - C.images += H.hud_list[NATIONS_HUD] \ No newline at end of file + C.images += H.hud_list[NATIONS_HUD] + +/mob/living/silicon/ai/update_sight() + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) + if(aiRestorePowerRoutine) + sight = sight&~SEE_TURFS + sight = sight&~SEE_MOBS + sight = sight&~SEE_OBJS + see_in_dark = 0 + + if(see_override) + see_invisible = see_override diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm index acc6220bc46..00945ad84b7 100644 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ b/code/modules/mob/living/silicon/ai/logout.dm @@ -2,9 +2,5 @@ ..() for(var/obj/machinery/ai_status_display/O in world) //change status O.mode = 0 - if(!isturf(loc)) - if(client) - client.eye = loc - client.perspective = EYE_PERSPECTIVE src.view_core() - return \ No newline at end of file + return diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 8cf6863eafb..2a3b39c1c9b 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -82,7 +82,7 @@ var/const/VOX_PATH = "sound/vox_fem/" for(var/mob/M in player_list) if(M.client) var/turf/T = get_turf(M) - if(T && T.z == z_level && !isdeaf(M)) + if(T && T.z == z_level && M.can_hear()) M << voice else only_listener << voice diff --git a/code/modules/mob/living/silicon/ai/update_status.dm b/code/modules/mob/living/silicon/ai/update_status.dm new file mode 100644 index 00000000000..4fa060abf39 --- /dev/null +++ b/code/modules/mob/living/silicon/ai/update_status.dm @@ -0,0 +1,10 @@ +/mob/living/silicon/ai/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) + if(health <= config.health_threshold_dead) + death() + return + else if(stat == UNCONSCIOUS) + WakeUp() + //diag_hud_set_status() diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm index bd93fd6c3c4..01240adf942 100644 --- a/code/modules/mob/living/silicon/login.dm +++ b/code/modules/mob/living/silicon/login.dm @@ -1,5 +1,5 @@ /mob/living/silicon/Login() - sleeping = 0 + SetSleeping(0) if(mind && ticker && ticker.mode) ticker.mode.remove_revolutionary(mind, 1) ticker.mode.remove_cultist(mind, 1) @@ -9,4 +9,4 @@ ticker.mode.remove_thrall(mind, 0) ticker.mode.remove_shadowling(mind) ticker.mode.remove_abductor(mind) - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 7979ad150b4..43249060652 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -137,7 +137,7 @@ /mob/living/silicon/pai/check_eye(var/mob/user as mob) if(!src.current) return null - user.reset_view(src.current) + user.reset_perspective(src.current) return 1 /mob/living/silicon/pai/blob_act() @@ -261,7 +261,7 @@ usr:cameraFollow = null if(!C) src.unset_machine() - src.reset_view(null) + src.reset_perspective(null) return 0 if(stat == 2 || !C.status || !(src.network in C.network)) return 0 @@ -269,7 +269,7 @@ src.set_machine(src) src:current = C - src.reset_view(C) + src.reset_perspective(C) return 1 /mob/living/silicon/pai/verb/reset_record_view() @@ -288,7 +288,7 @@ /mob/living/silicon/pai/cancel_camera() set category = "pAI Commands" set name = "Cancel Camera View" - src.reset_view(null) + src.reset_perspective(null) src.unset_machine() src:cameraFollow = null @@ -297,7 +297,7 @@ /mob/living/silicon/pai/proc/pai_network_change() set category = "pAI Commands" set name = "Change Camera Network" - src.reset_view(null) + src.reset_perspective(null) src.unset_machine() src:cameraFollow = null var/cameralist[0] @@ -363,9 +363,6 @@ var/obj/item/device/pda/holder = card.loc holder.pai = null - if(client) - client.perspective = EYE_PERSPECTIVE - client.eye = src forceMove(get_turf(card)) card.forceMove(src) @@ -487,9 +484,7 @@ visible_message("[src] neatly folds inwards, compacting down to a rectangular card.", "You neatly fold inwards, compacting down to a rectangular card.") stop_pulling() - if(client) - client.perspective = EYE_PERSPECTIVE - client.eye = card + reset_perspective(card) // If we are being held, handle removing our holder from their inv. var/obj/item/weapon/holder/H = loc diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 539832d9c08..ed5ba8ce49a 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -37,19 +37,23 @@ var/global/list/default_pai_software = list() ui_interact(src) -/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - if(user != src) - if(ui) ui.set_status(STATUS_CLOSE, 0) - return - +/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = self_state) if(ui_key != "main") var/datum/pai_software/S = software[ui_key] if(S && !S.toggle) S.on_ui_interact(src, ui, force_open) else - if(ui) ui.set_status(STATUS_CLOSE, 0) + if(ui) + ui.set_status(STATUS_CLOSE, 0) return + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600, state = state) + ui.open() + ui.set_auto_update(1) + +/mob/living/silicon/pai/ui_data(mob/user, datum/topic_state/state = self_state) var/data[0] // Software we have bought @@ -84,12 +88,7 @@ var/global/list/default_pai_software = list() data["emotions"] = emotions data["current_emotion"] = card.current_emotion - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /mob/living/silicon/pai/Topic(href, href_list) if(..()) @@ -122,4 +121,4 @@ var/global/list/default_pai_software = list() var/img = text2num(href_list["image"]) if(1 <= img && img <= 9) card.setEmotion(img) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/silicon/pai/update_status.dm b/code/modules/mob/living/silicon/pai/update_status.dm new file mode 100644 index 00000000000..155ecc84a28 --- /dev/null +++ b/code/modules/mob/living/silicon/pai/update_status.dm @@ -0,0 +1,3 @@ +/mob/living/silicon/pai/update_stat() + if(health <= 0) + death(gibbed = 0) diff --git a/code/modules/mob/living/silicon/robot/drone/update_status.dm b/code/modules/mob/living/silicon/robot/drone/update_status.dm new file mode 100644 index 00000000000..97d2214c2e2 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/drone/update_status.dm @@ -0,0 +1,10 @@ +//Easiest to check this here, then check again in the robot proc. +//Standard robots use config for crit, which is somewhat excessive for these guys. +//Drones killed by damage will gib. +/mob/living/silicon/robot/drone/update_stat() + if(status_flags & GODMODE) + return + if(health <= -35 && stat != DEAD) + gib() + return + return ..() diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index d843203ebc3..4e05ff4a402 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -17,6 +17,7 @@ if(istype(O,/obj/item/borg/sight)) var/obj/item/borg/sight/S = O sight_mode &= ~S.sight_mode + update_sight() if(client) client.screen -= O @@ -52,6 +53,7 @@ if((cell.charge * 100 / cell.maxcharge) < B.powerneeded) to_chat(src, "Not enough power to activate [B.name]!") return + var/activated_thingy = null if(!module_state_1) O.mouse_opacity = initial(O.mouse_opacity) module_state_1 = O @@ -59,8 +61,7 @@ O.plane = HUD_PLANE O.screen_loc = inv1.screen_loc contents += O - if(istype(module_state_1,/obj/item/borg/sight)) - sight_mode |= module_state_1:sight_mode + activated_thingy = O else if(!module_state_2) O.mouse_opacity = initial(O.mouse_opacity) module_state_2 = O @@ -68,8 +69,7 @@ O.plane = HUD_PLANE O.screen_loc = inv2.screen_loc contents += O - if(istype(module_state_2,/obj/item/borg/sight)) - sight_mode |= module_state_2:sight_mode + activated_thingy = O else if(!module_state_3) O.mouse_opacity = initial(O.mouse_opacity) module_state_3 = O @@ -77,11 +77,12 @@ O.plane = HUD_PLANE O.screen_loc = inv3.screen_loc contents += O - if(istype(module_state_3,/obj/item/borg/sight)) - sight_mode |= module_state_3:sight_mode + activated_thingy = O else to_chat(src, "You need to disable a module first!") - src.update_icons() + if(istype(activated_thingy,/obj/item/borg/sight)) + update_sight() + update_icons() /mob/living/silicon/robot/proc/uneq_active() uneq_module(module_active) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index b2c8857f040..afa2d0667c4 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -62,7 +62,7 @@ if(sleeping) Paralyse(3) - sleeping-- + AdjustSleeping(-1) if(resting) Weaken(5) @@ -90,7 +90,7 @@ stat = UNCONSCIOUS if(!paralysis > 0) - eye_blind = 0 + SetEyeBlind(0) else stat = CONSCIOUS @@ -98,7 +98,7 @@ diag_hud_set_health() diag_hud_set_status() else //dead - eye_blind = 1 + SetEyeBlind(0) //update the state of modules and components here if(stat != CONSCIOUS) @@ -120,32 +120,38 @@ return 1 /mob/living/silicon/robot/update_sight() - if(stat == DEAD || sight_mode & BORGXRAY) + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + + if(sight_mode & BORGMESON) sight |= SEE_TURFS + see_invisible = min(see_invisible, SEE_INVISIBLE_MINIMUM) + see_in_dark = 1 + + if(sight_mode & BORGXRAY) + sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + see_invisible = SEE_INVISIBLE_LIVING + see_in_dark = 8 + + if(sight_mode & BORGTHERM) sight |= SEE_MOBS - sight |= SEE_OBJS + see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING) see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else - see_in_dark = 8 - if(sight_mode & BORGMESON && sight_mode & BORGTHERM) - sight |= SEE_TURFS - sight |= SEE_MOBS - see_invisible = SEE_INVISIBLE_MINIMUM - else if(sight_mode & BORGMESON) - sight |= SEE_TURFS - see_invisible = SEE_INVISIBLE_MINIMUM - see_in_dark = 1 - else if(sight_mode & BORGTHERM) - sight |= SEE_MOBS - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if(stat != DEAD) - sight &= ~SEE_MOBS - sight &= ~SEE_TURFS - sight &= ~SEE_OBJS - see_invisible = SEE_INVISIBLE_LEVEL_TWO - if(see_override) - see_invisible = see_override + + if(see_override) + see_invisible = see_override /mob/living/silicon/robot/handle_hud_icons() update_items() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 335ecbcd1f6..02d3401c080 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -84,7 +84,7 @@ var/list/robot_verbs_default = list( var/ionpulse = 0 // Jetpack-like effect. var/ionpulse_on = 0 // Jetpack-like effect. var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect. - + var/datum/action/item_action/toggle_research_scanner/scanner = null /mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0) @@ -960,11 +960,11 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/proc/allowed(obj/item/I) var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob dummy.req_access = req_access - + if(dummy.check_access(I)) qdel(dummy) return 1 - + qdel(dummy) return 0 @@ -1456,3 +1456,15 @@ var/list/robot_verbs_default = list( disable_component("comms", 160) if(2) disable_component("comms", 60) +/mob/living/silicon/robot/rejuvenate() + ..() + var/brute = 1000 + var/burn = 1000 + var/list/datum/robot_component/borked_parts = get_damaged_components(brute,burn,1) + for(var/datum/robot_component/borked_part in borked_parts) + brute = borked_part.brute_damage + burn = borked_part.electronics_damage + borked_part.installed = 1 + borked_part.wrapped = new borked_part.external_type + borked_part.heal_damage(brute,burn) + borked_part.install() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/update_status.dm b/code/modules/mob/living/silicon/robot/update_status.dm new file mode 100644 index 00000000000..a28aae28278 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/update_status.dm @@ -0,0 +1,21 @@ +// No args for restraints because robots don't have those +/mob/living/silicon/robot/incapacitated() + if(stat || lockcharge || weakened || stunned || paralysis || !is_component_functioning("actuator")) + return 1 + +/mob/living/silicon/robot/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) + if(health <= -maxHealth) //die only once + death() + return + if(!is_component_functioning("actuator") || paralysis || sleeping || stunned || weakened || getOxyLoss() > maxHealth * 0.5) + if(stat == CONSCIOUS) + KnockOut() + else + if(stat == UNCONSCIOUS) + WakeUp() + // diag_hud_set_status() + // diag_hud_set_health() + // update_health_hud() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 75bbec89a1b..469b6e86574 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -152,7 +152,7 @@ //Silicon mob language procs -/mob/living/silicon/can_speak(datum/language/speaking) +/mob/living/silicon/can_speak_language(datum/language/speaking) return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language /mob/living/silicon/add_language(var/language, var/can_speak=1) @@ -355,8 +355,8 @@ /////////////////////////////////// EAR DAMAGE //////////////////////////////////// -/mob/living/silicon/adjustEarDamage() +/mob/living/silicon/SetEarDamage() return -/mob/living/silicon/setEarDamage() - return \ No newline at end of file +/mob/living/silicon/SetEarDeaf() + return diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 92fe2c761bc..4eafbf50065 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -26,6 +26,7 @@ var/mob/living/carbon/oldpatient = null var/oldloc = null var/last_found = 0 + var/last_warning = 0 var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages var/injection_amount = 15 //How much reagent do we inject at a time? var/heal_threshold = 10 //Start healing when they have this much damage in a category @@ -253,6 +254,12 @@ oldpatient = user /mob/living/simple_animal/bot/medbot/process_scan(mob/living/carbon/human/H) + if(buckled) + if((last_warning + 300) < world.time) + speak("Movement restrained! Unit on standby!") + playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0) + last_warning = world.time + return if(H.stat == 2) return @@ -368,6 +375,9 @@ if(declare_crit && C.health <= 0) //Critical condition! Call for help! declare(C) + if(!C.has_organic_damage()) + return 0 + //If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS. if((reagent_glass) && (use_beaker) && ((C.getBruteLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getOxyLoss() >= (heal_threshold + 15)))) for(var/datum/reagent/R in reagent_glass.reagents.reagent_list) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 9fcc921a4c9..17adfa19c54 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -393,9 +393,8 @@ passenger = M load = M can_buckle = FALSE - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src + // Not sure why this is done + reset_perspective(src) return TRUE return FALSE @@ -423,9 +422,7 @@ if(ismob(load)) var/mob/M = load - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = M + M.reset_perspective(null) unbuckle_mob() if(load) @@ -452,9 +449,7 @@ AM.pixel_y = initial(AM.pixel_y) if(ismob(AM)) var/mob/M = AM - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = M + M.reset_perspective(null) /mob/living/simple_animal/bot/mulebot/call_bot() ..() diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index fdad2a9e37b..d713c6dcf23 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -95,11 +95,6 @@ construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall) force_threshold = 11 - -/mob/living/simple_animal/construct/armoured/Life() - weakened = 0 - return ..() - /mob/living/simple_animal/construct/armoured/bullet_act(var/obj/item/projectile/P) if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)) var/reflectchance = 80 - round(P.damage/3) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 9284372f1ef..f3ed8a34f51 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -239,6 +239,9 @@ return if(istype(target, /obj/mecha/working/ripley)) var/obj/mecha/D = target + if(D.icon_state != "ripley-open") + to_chat(user, "You can't add armour onto the mech while someone is inside!") + return var/list/damage_absorption = D.damage_absorption if(damage_absorption["brute"] > 0.3) damage_absorption["brute"] = max(damage_absorption["brute"] - 0.1, 0.3) @@ -247,17 +250,11 @@ damage_absorption["laser"] = damage_absorption["laser"] - 0.025 to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") qdel(src) - if(D.icon_state == "ripley-open") - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") - D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." - else - to_chat(user, "You can't add armour onto the mech while someone is inside!") + D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") + D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." if(damage_absorption.["brute"] == 0.3) - if(D.icon_state == "ripley-open") - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") - D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." - else - to_chat(user, "You can't add armour onto the mech while someone is inside!") + D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") + D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." else to_chat(user, "You can't improve [D] any further!") return diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 6b90853c3d9..41ca671bc56 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -118,11 +118,11 @@ for(var/atom/check in check_list) for(var/mob/living/M in viewers(world.view + 1, check) - src) if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege) - if(!M.eye_blind) + if(M.has_vision()) return M for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you if(M.occupant && M.occupant.client) - if(!M.occupant.eye_blind) + if(M.occupant.has_vision()) return M.occupant return null @@ -185,7 +185,7 @@ continue var/turf/T = get_turf(L.loc) if(T && T in targets) - L.eye_blind = max(L.eye_blind, 4) + L.EyeBlind(4) return //Toggle Night Vision diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 90cb13de26b..cd06b8c85f5 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -709,8 +709,24 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return -/mob/living/simple_animal/adjustEarDamage() +/mob/living/simple_animal/update_sight() + if(!client) + return + if(stat == DEAD) + grant_death_vision() + return + + see_invisible = initial(see_invisible) + see_in_dark = initial(see_in_dark) + sight = initial(sight) + + if(client.eye != src) + var/atom/A = client.eye + if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. + return + +/mob/living/simple_animal/SetEarDamage() return -/mob/living/simple_animal/setEarDamage() - return \ No newline at end of file +/mob/living/simple_animal/SetEarDeaf() + return diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index b21c3110b1d..6a18da90aaa 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -212,9 +212,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, //||Fur and Fur Products || -/obj - var/f_amt = 0 // registers fur amount as an object variable - /obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets) name = "pile of fur" @@ -223,38 +220,40 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, icon = 'icons/mob/tribbles.dmi' icon_state = "sheet-fur" origin_tech = "materials=2" - f_amt = 1000 max_amount = 50 + /obj/item/clothing/ears/earmuffs/tribblemuffs //earmuffs but with tribbles name = "earmuffs" desc = "Protects your hearing from loud noises, and quiet ones as well." icon = 'icons/mob/tribbles.dmi' icon_state = "tribblemuffs" item_state = "tribblemuffs" - f_amt = 2000 +/* The advanced cold protection of the non-coat items has been removed, so as not + to give patreon donors an unfair advantage - the winter coat provides equivalent + cold protection +*/ /obj/item/clothing/gloves/furgloves desc = "These gloves are warm and furry." name = "fur gloves" icon = 'icons/mob/tribbles.dmi' icon_state = "furglovesico" item_state = "furgloves" - f_amt = 3000 - - cold_protection = HANDS - min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT + transfer_prints = TRUE + transfer_blood = TRUE + siemens_coefficient = 0 +// Equivalent to a winter coat's hood /obj/item/clothing/head/furcap name = "fur cap" desc = "A warm furry cap." icon = 'icons/mob/tribbles.dmi' icon_state = "furcap" item_state = "furcap" - f_amt = 5000 cold_protection = HEAD - min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT + min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT /obj/item/clothing/shoes/furboots name = "fur boots" @@ -262,11 +261,8 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, icon = 'icons/mob/tribbles.dmi' icon_state = "furboots" item_state = "furboots" - f_amt = 4000 - - cold_protection = FEET - min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT +// As a donator piece of clothing, this is now in line with the winter coat /obj/item/clothing/suit/furcoat name = "fur coat" desc = "A trenchcoat made from fur. You could put an oxygen tank in one of the pockets." @@ -274,11 +270,10 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, icon_state = "furcoat" item_state = "furcoat" blood_overlay_type = "armor" - f_amt = 15000 - body_parts_covered = UPPER_TORSO|LEGS|ARMS|LOWER_TORSO + body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO allowed = list (/obj/item/weapon/tank/emergency_oxygen) - cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT + cold_protection = UPPER_TORSO | LOWER_TORSO | ARMS + min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT /obj/item/clothing/suit/furcape name = "fur cape" @@ -287,7 +282,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, icon_state = "furcape" item_state = "furcape" blood_overlay_type = "armor" - f_amt = 10000 - body_parts_covered = UPPER_TORSO|LEGS|ARMS - cold_protection = UPPER_TORSO | LEGS | ARMS - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT + body_parts_covered = UPPER_TORSO|ARMS + cold_protection = UPPER_TORSO | ARMS + min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm new file mode 100644 index 00000000000..f04196f9fc9 --- /dev/null +++ b/code/modules/mob/living/stat_states.dm @@ -0,0 +1,51 @@ +// There, now `stat` is a proper state-machine + +/mob/living/proc/KnockOut(updating = 1) + if(stat == DEAD) + log_runtime(EXCEPTION("KnockOut called on a dead mob."), src) + return 0 + else if(stat == UNCONSCIOUS) + return 0 + add_logs(src, null, "fallen unconscious at [atom_loc_line(get_turf(src))]", admin=0) + stat = UNCONSCIOUS + if(updating) + // update_blind_effects() + update_canmove() + return 1 + +/mob/living/proc/WakeUp(updating = 1) + if(stat == DEAD) + log_runtime(EXCEPTION("WakeUp called on a dead mob."), src) + return 0 + else if(stat == CONSCIOUS) + return 0 + add_logs(src, null, "woken up at [atom_loc_line(get_turf(src))]", admin=0) + stat = CONSCIOUS + if(updating) + // update_blind_effects() + update_canmove() + return 1 + +/mob/living/proc/can_be_revived() + . = TRUE + // if(health <= min_health) + if(health <= config.health_threshold_dead) + return FALSE + +// death() is used to make a mob die + +// handles revival through other means than cloning or adminbus (defib, IPC repair) +/mob/living/proc/update_revive(updating = TRUE) + if(stat != DEAD) + return + if(!can_be_revived()) + return + add_logs(src, null, "came back to life at [atom_loc_line(get_turf(src))]", admin=0) + stat = CONSCIOUS + dead_mob_list -= src + living_mob_list += src + timeofdeath = null + if(updating) + update_canmove() + // update_blind_effects() + updatehealth() diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm new file mode 100644 index 00000000000..45207fd5426 --- /dev/null +++ b/code/modules/mob/living/status_procs.dm @@ -0,0 +1,513 @@ +//Here are the procs used to modify status effects of a mob. + +// We use these to automatically apply their effects when they are changed, as +// opposed to setting them manually and having to either wait for the next `Life` +// or update by hand + +// The `updating` argument is only available on effects that cause a visual/physical effect on the mob itself +// when applied, such as Stun, Weaken, and Jitter - stuff like Blindness, which has a client-side effect, +// lacks this argument. + +// Ideally, code should only read the vars in this file, and not ever directly +// modify them + +// If you want a mob type to ignore a given status effect, just override the corresponding +// `SetSTATE` proc - since all of the other procs are wrappers around that, +// calling them will have no effect + +// BOOLEAN STATES + +/* + * EyesBlocked + Your eyes are covered somehow + * EarsBlocked + Your ears are covered somehow + * Resting + You are lying down of your own volition + * Flying + For some reason or another you can move while not touching the ground +*/ + + +// STATUS EFFECTS +// All of these decrement over time - at a rate of 1 per life cycle unless otherwise noted +// Status effects sorted alphabetically: +/* + * Confused * + Movement is scrambled + * Dizzy * + The screen goes all warped + * Drowsy + You begin to yawn, and have a chance of incrementing "Paralysis" + * Druggy * + A trippy overlay appears. + * Drunk * + Essentially what your "BAC" is - the higher it is, the more alcohol you have in you + * EarDamage * + Doesn't do much, but if it's 25+, you go deaf. Heals much slower than other statuses - 0.05 normally + * EarDeaf * + You cannot hear. Prevents EarDamage from healing naturally. + * EyeBlind * + You cannot see. Prevents EyeBlurry from healing naturally. + * EyeBlurry * + A hazy overlay appears on your screen. + * Hallucination * + Your character will imagine various effects happening to them, vividly. + * Jitter * + Your character will visibly twitch. Higher values amplify the effect. + * LoseBreath * + Your character is unable to breathe. + * Paralysis * + Your character is knocked out. + * Silent * + Your character is unable to speak. + * Sleeping * + Your character is asleep. + * Slowed * + Your character moves slower. + * Slurring * + Your character cannot enunciate clearly. + * Stunned * + Your character is unable to move, and drops stuff in their hands. They keep standing, though. + * Stuttering * + Your character stutters parts of their messages. + * Weakened * + Your character collapses, but is still conscious. +*/ + +// DISABILITIES +// These are more permanent than the above. +// Disabilities sorted alphabetically +/* + * Blind (32) + Can't see. EyeBlind does not heal when this is active. + * Coughing (4) + Cough occasionally, causing you to drop your items + * Deaf (128) + Can't hear. EarDeaf does not heal when this is active + * Epilepsy (2) + Occasionally go "Epileptic", causing you to become very twitchy, drop all items, and fall to the floor + * Mute (64) + Cannot talk. + * Nearsighted (1) + My glasses! I can't see without my glasses! (Nearsighted overlay when not wearing prescription eyewear) + * Nervous (16) + Occasionally begin to stutter. + * Tourettes (8) + SHIT (say bad words, and drop stuff occasionally) +*/ + +/mob/living + + // Booleans + var/resting = FALSE + + /* + STATUS EFFECTS + */ + +/mob // On `/mob` for now, to support legacy code + var/confused = 0 + var/dizziness = 0 + var/drowsyness = 0 + var/druggy = 0 + var/drunk = 0 + var/ear_damage = 0 + var/ear_deaf = 0 + var/eye_blind = 0 + var/eye_blurry = 0 + var/hallucination = 0 + var/jitteriness = 0 + var/losebreath = 0 + var/paralysis = 0 + var/silent = 0 + var/sleeping = 0 + var/slowed = 0 + var/slurring = 0 + var/stunned = 0 + var/stuttering = 0 + var/weakened = 0 + +/mob/living + // Bitfields + var/disabilities = 0 + +// RESTING + +/mob/living/proc/StartResting(updating = 1) + var/val_change = !resting + resting = TRUE + if(updating && val_change) + update_canmove() + +/mob/living/proc/StopResting(updating = 1) + var/val_change = !!resting + resting = FALSE + if(updating && val_change) + update_canmove() + +/mob/living/proc/StartFlying() + var/val_change = !flying + flying = TRUE + if(val_change) + update_animations() + +/mob/living/proc/StopFlying() + var/val_change = !!flying + flying = FALSE + if(val_change) + update_animations() + + +// SCALAR STATUS EFFECTS + +// CONFUSED + +/mob/living/Confused(amount) + SetConfused(max(confused, amount)) + +/mob/living/SetConfused(amount) + confused = max(amount, 0) + +/mob/living/AdjustConfused(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(confused, amount, bound_lower, bound_upper) + SetConfused(new_value) + +// DIZZY + +/mob/living/Dizzy(amount) + SetDizzy(max(dizziness, amount)) + +/mob/living/SetDizzy(amount) + dizziness = max(amount, 0) + +/mob/living/AdjustDizzy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(dizziness, amount, bound_lower, bound_upper) + SetDizzy(new_value) + +// DROWSY + +/mob/living/Drowsy(amount) + SetDrowsy(max(drowsyness, amount)) + +/mob/living/SetDrowsy(amount) + drowsyness = max(amount, 0) + +/mob/living/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(drowsyness, amount, bound_lower, bound_upper) + SetDrowsy(new_value) + +// DRUNK + +/mob/living/Drunk(amount) + SetDrunk(max(drunk, amount)) + +/mob/living/SetDrunk(amount) + drunk = max(amount, 0) + +/mob/living/AdjustDrunk(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(drunk, amount, bound_lower, bound_upper) + SetDrunk(new_value) + +// DRUGGY + +/mob/living/Druggy(amount) + SetDruggy(max(druggy, amount)) + +/mob/living/SetDruggy(amount) + var/old_val = druggy + druggy = max(amount, 0) + // We transitioned to/from 0, so update the druggy overlays + if((old_val == 0 || druggy == 0) && (old_val != druggy)) + update_druggy_effects() + +/mob/living/AdjustDruggy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(druggy, amount, bound_lower, bound_upper) + SetDruggy(new_value) + +// EAR_DAMAGE + +/mob/living/EarDamage(amount) + SetEarDamage(max(ear_damage, amount)) + +/mob/living/SetEarDamage(amount) + ear_damage = max(amount, 0) + +/mob/living/AdjustEarDamage(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(ear_damage, amount, bound_lower, bound_upper) + SetEarDamage(new_value) + +// EAR_DEAF + +/mob/living/EarDeaf(amount) + SetEarDeaf(max(ear_deaf, amount)) + +/mob/living/SetEarDeaf(amount) + ear_deaf = max(amount, 0) + +/mob/living/AdjustEarDeaf(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(ear_deaf, amount, bound_lower, bound_upper) + SetEarDeaf(new_value) + +// EYE_BLIND + +/mob/living/EyeBlind(amount) + SetEyeBlind(max(eye_blind, amount)) + +/mob/living/SetEyeBlind(amount) + var/old_val = eye_blind + eye_blind = max(amount, 0) + // We transitioned to/from 0, so update the eye blind overlays + if((old_val == 0 || eye_blind == 0) && (old_val != eye_blind)) + update_blind_effects() + +/mob/living/AdjustEyeBlind(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(eye_blind, amount, bound_lower, bound_upper) + SetEyeBlind(new_value) + +// EYE_BLURRY + +/mob/living/EyeBlurry(amount) + SetEyeBlurry(max(eye_blurry, amount)) + +/mob/living/SetEyeBlurry(amount) + var/old_val = eye_blurry + eye_blurry = max(amount, 0) + // We transitioned to/from 0, so update the eye blur overlays + if((old_val == 0 || eye_blurry == 0) && (old_val != eye_blurry)) + update_blurry_effects() + +/mob/living/AdjustEyeBlurry(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(eye_blurry, amount, bound_lower, bound_upper) + SetEyeBlurry(new_value) + +// HALLUCINATION + +/mob/living/Hallucinate(amount) + SetHallucinate(max(hallucination, amount)) + +/mob/living/SetHallucinate(amount) + hallucination = max(amount, 0) + +/mob/living/AdjustHallucinate(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(hallucination, amount, bound_lower, bound_upper) + SetHallucinate(new_value) + +// JITTER + +/mob/living/Jitter(amount, force = 0) + SetJitter(max(jitteriness, amount), force) + +/mob/living/SetJitter(amount, force = 0) + // Jitter is also associated with stun + if(status_flags & CANSTUN || force) + jitteriness = max(amount, 0) + +/mob/living/AdjustJitter(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) + var/new_value = directional_bounded_sum(jitteriness, amount, bound_lower, bound_upper) + SetJitter(new_value, force) + +// LOSE_BREATH + +/mob/living/LoseBreath(amount) + SetLoseBreath(max(losebreath, amount)) + +/mob/living/SetLoseBreath(amount) + losebreath = max(amount, 0) + +/mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(losebreath, amount, bound_lower, bound_upper) + SetLoseBreath(new_value) + +// PARALYSE + +/mob/living/Paralyse(amount, updating = 1, force = 0) + SetParalysis(max(paralysis, amount), updating, force) + +/mob/living/SetParalysis(amount, updating = 1, force = 0) + if(status_flags & CANPARALYSE || force) + paralysis = max(amount, 0) + if(updating) + update_canmove() + update_stat() + +/mob/living/AdjustParalysis(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(paralysis, amount, bound_lower, bound_upper) + SetParalysis(new_value, updating, force) + +// SILENT + +/mob/living/Silence(amount) + SetSilence(max(silent, amount)) + +/mob/living/SetSilence(amount) + silent = max(amount, 0) + +/mob/living/AdjustSilence(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(silent, amount, bound_lower, bound_upper) + SetSilence(new_value) + +// SLEEPING + +/mob/living/Sleeping(amount, updating = 1) + SetSleeping(max(sleeping, amount), updating) + +/mob/living/SetSleeping(amount, updating = 1) + sleeping = max(amount, 0) + update_sleeping_effects() + if(updating) + update_stat() + update_canmove() + +/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1) + var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper) + SetSleeping(new_value, updating) + +// SLOWED + +/mob/living/Slowed(amount, updating = 1) + SetSlowed(max(slowed, amount), updating) + +/mob/living/SetSlowed(amount, updating = 1) + slowed = max(amount, 0) + +/mob/living/AdjustSlowed(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1) + var/new_value = directional_bounded_sum(slowed, amount, bound_lower, bound_upper) + SetSlowed(new_value, updating) + +// SLURRING + +/mob/living/Slur(amount) + SetSlur(max(slurring, amount)) + +/mob/living/SetSlur(amount) + slurring = max(amount, 0) + +/mob/living/AdjustSlur(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(slurring, amount, bound_lower, bound_upper) + SetSlur(new_value) + +// STUN + +/mob/living/Stun(amount, updating = 1, force = 0) + SetStunned(max(stunned, amount), updating, force) + +/mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" + if(status_flags & CANSTUN || force) + stunned = max(amount, 0) + if(updating) + update_canmove() + +/mob/living/AdjustStunned(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(stunned, amount, bound_lower, bound_upper) + SetStunned(new_value, updating, force) + +// STUTTERING + + +/mob/living/Stuttering(amount, force = 0) + SetStuttering(max(stuttering, amount), force) + +/mob/living/SetStuttering(amount, force = 0) + //From mob/living/apply_effect: "Stuttering is often associated with Stun" + if(status_flags & CANSTUN || force) + stuttering = max(amount, 0) + +/mob/living/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) + var/new_value = directional_bounded_sum(stuttering, amount, bound_lower, bound_upper) + SetStuttering(new_value, force) + +// WEAKEN + +/mob/living/Weaken(amount, updating = 1, force = 0) + SetWeakened(max(weakened, amount), updating, force) + +/mob/living/SetWeakened(amount, updating = 1, force = 0) + if(status_flags & CANWEAKEN || force) + weakened = max(amount, 0) + if(updating) + update_canmove() //updates lying, canmove and icons + +/mob/living/AdjustWeakened(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(weakened, amount, bound_lower, bound_upper) + SetWeakened(new_value, updating, force) + +// +// DISABILITIES +// + +// Blind + +/mob/living/proc/BecomeBlind() + var/val_change = !(disabilities & BLIND) + disabilities |= BLIND + if(val_change) + update_blind_effects() + +/mob/living/proc/CureBlind() + var/val_change = !!(disabilities & BLIND) + disabilities &= ~BLIND + if(val_change) + update_blind_effects() + +// Coughing + +/mob/living/proc/BecomeCoughing() + disabilities |= COUGHING + +/mob/living/proc/CureCoughing() + disabilities &= ~COUGHING + +// Deaf + +/mob/living/proc/BecomeDeaf() + disabilities |= DEAF + +/mob/living/proc/CureDeaf() + disabilities &= ~DEAF + +// Epilepsy + +/mob/living/proc/BecomeEpilepsy() + disabilities |= EPILEPSY + +/mob/living/proc/CureEpilepsy() + disabilities &= ~EPILEPSY + +// Mute + +/mob/living/proc/BecomeMute() + disabilities |= MUTE + +/mob/living/proc/CureMute() + disabilities &= ~MUTE + +// Nearsighted + +/mob/living/proc/BecomeNearsighted() + var/val_change = !(disabilities & NEARSIGHTED) + disabilities |= NEARSIGHTED + if(val_change) + update_nearsighted_effects() + +/mob/living/proc/CureNearsighted() + var/val_change = !!(disabilities & NEARSIGHTED) + disabilities &= ~NEARSIGHTED + if(val_change) + update_nearsighted_effects() + +// Nervous + +/mob/living/proc/BecomeNervous() + disabilities |= NERVOUS + +/mob/living/proc/CureNervous() + disabilities &= ~NERVOUS + +// Tourettes + +/mob/living/proc/BecomeTourettes() + disabilities |= TOURETTES + +/mob/living/proc/CureTourettes() + disabilities &= ~TOURETTES diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm new file mode 100644 index 00000000000..f817b03482e --- /dev/null +++ b/code/modules/mob/living/update_status.dm @@ -0,0 +1,97 @@ +/mob/living/update_blind_effects() + if(!has_vision()) + overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + throw_alert("blind", /obj/screen/alert/blind) + return 1 + else + clear_fullscreen("blind") + clear_alert("blind") + return 0 + +/mob/living/update_blurry_effects() + if(eyes_blurred()) + overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) + return 1 + else + clear_fullscreen("blurry") + return 0 + +/mob/living/update_druggy_effects() + if(druggy) + overlay_fullscreen("high", /obj/screen/fullscreen/high) + throw_alert("high", /obj/screen/alert/high) + else + clear_fullscreen("high") + clear_alert("high") + +/mob/living/update_nearsighted_effects() + if(disabilities & NEARSIGHTED) + overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) + else + clear_fullscreen("nearsighted") + +/mob/living/update_sleeping_effects() + if(sleeping) + throw_alert("asleep", /obj/screen/alert/asleep) + else + clear_alert("asleep") + +// Querying status of the mob + +// Whether the mob can hear things +/mob/living/can_hear() + return !(ear_deaf || (disabilities & DEAF)) + +// Whether the mob is able to see +/mob/living/has_vision() + return !(eye_blind || (disabilities & BLIND) || stat) + +// Whether the mob is capable of talking +/mob/living/can_speak() + return !(silent || (disabilities & MUTE) || is_muzzled()) + +// Whether the mob is capable of standing or not +/mob/living/proc/can_stand() + return !(weakened || paralysis || stat || (status_flags & FAKEDEATH)) + +// Whether the mob is capable of actions or not +/mob/living/incapacitated(ignore_restraints = 0, ignore_grab = 0, ignore_lying = 0) + if(stat || paralysis || stunned || (weakened && lying) || (!ignore_restraints && restrained()) || (!ignore_lying && lying)) + return 1 + +// wonderful proc names, I know - used to check whether the blur overlay +// should show or not +/mob/living/proc/eyes_blurred() + return eye_blurry + +//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. +/mob/living/update_canmove(delay_action_updates = 0) + var/fall_over = !can_stand() + var/buckle_lying = !(buckled && !buckled.buckle_lying) + if(fall_over || resting || stunned) + drop_r_hand() + drop_l_hand() + else + lying = 0 + canmove = 1 + if(buckled) + lying = 90 * buckle_lying + else if((fall_over || resting) && !lying) + fall(fall_over) + + canmove = !(fall_over || resting || stunned || buckled) + density = !lying + if(lying) + if(layer == initial(layer)) + layer = MOB_LAYER - 0.2 + else + if(layer == MOB_LAYER - 0.2) + layer = initial(layer) + + update_transform() + if(!delay_action_updates) + update_action_buttons_icon() + return canmove + +/mob/living/proc/update_stamina() + return diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index fcf53fd3cba..8cc51882ebf 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -43,12 +43,7 @@ sight |= SEE_SELF ..() - if(loc && !isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - else - client.eye = src - client.perspective = MOB_PERSPECTIVE + reset_perspective(loc) if(ckey in deadmins) diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index d83a5efe339..b9fed474cdf 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -3,15 +3,19 @@ unset_machine() player_list -= src log_access("Logout: [key_name(src)]") - if(admin_datums[src.ckey]) - if(ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing. - var/admins_number = admins.len - + // `holder` is nil'd out by now, so we check the `admin_datums` array directly + //Only report this stuff if we are currently playing. + if(admin_datums[ckey] && ticker && ticker.current_state == GAME_STATE_PLAYING) + var/datum/admins/temp_admin = admin_datums[ckey] + // Triggers on people with banhammer power only - no mentors tripping the alarm + if(temp_admin.rights & R_BAN) message_admins("Admin logout: [key_name_admin(src)]") - if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell. - send2adminirc("[key_name(src)] logged out - no more admins online.") + var/list/admincounter = staff_countup(R_BAN) + if(admincounter[1] == 0) // No active admins + send2irc(config.admin_notify_irc, "[key_name(src)] logged out - No active admins, [admincounter[2]] non-admin staff, [admincounter[3]] inactive staff.") + ..() - - callHook("mob_logout", list("client" = client, "mob" = src)) - - return 1 \ No newline at end of file + + callHook("mob_logout", list("client" = client, "mob" = src)) + + return 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4a292328fb6..ddb4d2beb60 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -62,22 +62,22 @@ if(!client) return if(type) - if(type & 1 && (disabilities & BLIND || blinded || paralysis) )//Vision related + if(type & 1 && !has_vision())//Vision related if(!( alt )) return else msg = alt type = alt_type - if(type & 2 && (disabilities & DEAF || ear_deaf))//Hearing related + if(type & 2 && !can_hear())//Hearing related if(!( alt )) return else msg = alt type = alt_type - if((type & 1 && disabilities & BLIND)) + if(type & 1 && !has_vision()) return // Added voice muffling for Issue 41. - if(stat == UNCONSCIOUS || (sleeping > 0 && stat != 2)) + if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD)) to_chat(src, "... You can almost hear someone talking ...") else to_chat(src, msg) @@ -163,13 +163,6 @@ // handle_typing_indicator() return - -/mob/proc/restrained() - return - -/mob/proc/incapacitated() - return - //This proc is called whenever someone clicks an inventory ui slot. /mob/proc/attack_ui(slot) var/obj/item/W = get_active_hand() @@ -494,7 +487,8 @@ var/list/slot_equipment_priority = list( \ return 0 //Unsupported slot //END HUMAN -/mob/proc/reset_view(atom/A) +// If you're looking for `reset_perspective`, that's a synonym for this proc. +/mob/proc/reset_perspective(atom/A) if(client) if(istype(A, /atom/movable)) client.perspective = EYE_PERSPECTIVE @@ -506,8 +500,33 @@ var/list/slot_equipment_priority = list( \ else client.perspective = EYE_PERSPECTIVE client.eye = loc - return + return 1 +/mob/living/reset_perspective(atom/A) + . = ..() + if(.) + // Above check means the mob has a client + update_sight() + if(client.eye != src) + var/atom/AT = client.eye + AT.get_remote_view_fullscreens(src) + else + clear_fullscreen("remote_view", 0) + update_pipe_vision() + +/mob/dead/reset_perspective(atom/A) + if(client) + if(ismob(client.eye) && (client.eye != src)) + // Note to self: Use `client.eye` for ghost following in place + // of periodic ghost updates + var/mob/target = client.eye + target.following_mobs -= src + . = ..() + if(.) + // Allows sharing HUDs with ghosts + if(hud_used) + client.screen = list() + hud_used.show_hud(hud_used.hud_version) /mob/proc/show_inv(mob/user) user.set_machine(src) @@ -800,7 +819,7 @@ var/list/slot_equipment_priority = list( \ /mob/verb/cancel_camera() set name = "Cancel Camera View" set category = "OOC" - reset_view(null) + reset_perspective(null) unset_machine() if(istype(src, /mob/living)) if(src:cameraFollow) @@ -1031,36 +1050,6 @@ var/list/slot_equipment_priority = list( \ if(restrained()) return 0 return 1 -//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. -/mob/proc/update_canmove(delay_action_updates = 0) - var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH) - var/buckle_lying = !(buckled && !buckled.buckle_lying) - if(ko || resting || stunned) - drop_r_hand() - drop_l_hand() - else - lying = 0 - canmove = 1 - if(buckled) - lying = 90 * buckle_lying - else - if((ko || resting) && !lying) - fall(ko) - - canmove = !(ko || resting || stunned || buckled) - density = !lying - if(lying) - if(layer == initial(layer)) - layer = MOB_LAYER - 0.2 - else - if(layer == MOB_LAYER - 0.2) - layer = initial(layer) - - update_transform() - if(!delay_action_updates) - update_action_buttons_icon() - return canmove - /mob/proc/fall(var/forced) drop_l_hand() drop_r_hand() @@ -1101,77 +1090,6 @@ var/list/slot_equipment_priority = list( \ /mob/proc/activate_hand(selhand) return -/mob/proc/Jitter(amount) - jitteriness = max(jitteriness, amount, 0) - -/mob/proc/Dizzy(amount) - dizziness = max(dizziness, amount, 0) - -/mob/proc/AdjustDrunk(amount) - drunk = max(drunk + amount, 0) - -/mob/proc/Stun(amount) - SetStunned(max(stunned, amount)) - -/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" - if(status_flags & CANSTUN) - stunned = max(amount, 0) - update_canmove() - else if(stunned) - stunned = 0 - update_canmove() - -/mob/proc/AdjustStunned(amount) - SetStunned(stunned + amount) - -/mob/proc/Weaken(amount) - SetWeakened(max(weakened, amount)) - -/mob/proc/SetWeakened(amount) - if(status_flags & CANWEAKEN) - weakened = max(amount, 0) - update_canmove() //updates lying, canmove and icons - else if(weakened) - weakened = 0 - update_canmove() - -/mob/proc/AdjustWeakened(amount) - SetWeakened(weakened + amount) - -/mob/proc/Paralyse(amount) - SetParalysis(max(paralysis, amount)) - -/mob/proc/SetParalysis(amount) - if(status_flags & CANPARALYSE) - paralysis = max(amount, 0) - update_canmove() - else if(paralysis) - paralysis = 0 - update_canmove() - -/mob/proc/AdjustParalysis(amount) - SetParalysis(paralysis + amount) - -/mob/proc/Sleeping(amount) - SetSleeping(max(sleeping, amount)) - -/mob/proc/SetSleeping(amount) - sleeping = max(amount, 0) - update_canmove() - -/mob/proc/AdjustSleeping(amount) - SetSleeping(sleeping + amount) - -/mob/proc/Resting(amount) - SetResting(max(resting, amount)) - -/mob/proc/SetResting(amount) - resting = max(amount, 0) - update_canmove() - -/mob/proc/AdjustResting(amount) - SetResting(resting + amount) - /mob/proc/get_species() return "" @@ -1365,13 +1283,6 @@ mob/proc/yank_out_object() location.add_vomit_floor(src, 1) playsound(location, 'sound/effects/splat.ogg', 50, 1) - -/mob/proc/adjustEarDamage() - return - -/mob/proc/setEarDamage() - return - /mob/proc/AddSpell(obj/effect/proc_holder/spell/S) mob_spell_list += S S.action.Grant(src) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f7bd04906ea..6cb582e94c1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -33,18 +33,11 @@ var/obj/machinery/machine = null var/other_mobs = null var/memory = "" - var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/next_move = null var/notransform = null //Carbon var/other = 0.0 var/hand = null - var/eye_blind = 0 //Carbon - var/eye_blurry = 0 //Carbon - var/ear_deaf = 0 //Carbon - var/ear_damage = 0 //Carbon - var/stuttering = 0 //Carbon - var/slurring = 0 //Carbon var/real_name = null var/flavor_text = "" var/med_record = "" @@ -53,11 +46,6 @@ var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0 - var/druggy = 0 //Carbon - var/confused = 0 //Carbon - var/drunk = 0 - var/sleeping = 0 //Carbon - var/resting = 0 //Carbon var/lying = 0 var/lying_prev = 0 var/canmove = 1 @@ -77,19 +65,11 @@ var/bodytemperature = 310.055 //98.7 F - var/drowsyness = 0.0//Carbon - var/dizziness = 0//Carbon - var/jitteriness = 0//Carbon var/flying = 0 var/charges = 0.0 var/nutrition = 400.0//Carbon var/overeatduration = 0 // How long this guy is overeating //Carbon - var/paralysis = 0 - var/stunned = 0 - var/weakened = 0 - var/slowed = 0 - var/losebreath = 0 //Carbon var/intent = null//Living var/shakecamera = 0 var/a_intent = I_HELP//Living diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 90f84b7fc74..a22d9bf3c6b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -175,9 +175,9 @@ if(state >= GRAB_KILL) //affecting.apply_effect(STUTTER, 5) //would do this, but affecting isn't declared as mob/living for some stupid reason. - affecting.stuttering = max(affecting.stuttering, 5) //It will hamper your voice, being choked and all. + affecting.Stuttering(5) //It will hamper your voice, being choked and all. affecting.Weaken(5) //Should keep you down unless you get help. - affecting.losebreath = max(affecting.losebreath + 2, 3) + affecting.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) adjust_position() @@ -290,7 +290,7 @@ msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]") assailant.next_move = world.time + 10 - affecting.losebreath += 1 + affecting.AdjustLoseBreath(1) affecting.set_dir(WEST) adjust_position() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 5ef68a4135e..b39d014e4cc 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -75,12 +75,6 @@ proc/iscuffed(A) return 1 return 0 -proc/isdeaf(A) - if(istype(A, /mob)) - var/mob/M = A - return (M.disabilities & DEAF) || M.ear_deaf - return 0 - proc/hassensorlevel(A, var/level) var/mob/living/carbon/human/H = A if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under)) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 4c210f6f8f8..d99fc342c2b 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -148,7 +148,7 @@ view = world.view //Reset the view winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]") viewingCanvas = 0 - mob.reset_view() + mob.reset_perspective() if(mob.hud_used) mob.hud_used.show_hud(HUD_STYLE_STANDARD) @@ -162,11 +162,6 @@ if(!mob) return - if(locate(/obj/effect/stop/, mob.loc)) - for(var/obj/effect/stop/S in mob.loc) - if(S.victim == mob) - return - if(mob.stat==DEAD) return // handle possible spirit movement diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index dd48c1ce1a4..f8a73364264 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -565,3 +565,7 @@ /mob/new_player/is_ready() return ready && ..() + +// No hearing announcements +/mob/new_player/can_hear() + return 0 diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index f0bcbfe0312..efaf84798d1 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -291,11 +291,20 @@ if(current_species && (current_species.bodyflags & HAS_TAIL)) var/tail_icon var/tail_icon_state + var/tail_shift_x + var/tail_shift_y + var/blend_mode = ICON_ADD if(body_accessory) var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory] tail_icon = accessory.icon tail_icon_state = accessory.icon_state + if(accessory.blend_mode) + blend_mode = accessory.blend_mode + if(accessory.pixel_x_offset) + tail_shift_x = accessory.pixel_x_offset + if(accessory.pixel_y_offset) + tail_shift_y = accessory.pixel_y_offset else tail_icon = "icons/effects/species.dmi" if(coloured_tail) @@ -303,10 +312,14 @@ else tail_icon_state = "[current_species.tail]_s" - var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state) + var/icon/temp = new/icon("icon" = tail_icon, "icon_state" = tail_icon_state) + if(tail_shift_x) + temp.Shift(EAST, tail_shift_x) + if(tail_shift_y) + temp.Shift(NORTH, tail_shift_y) if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR)) - temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) + temp.Blend(rgb(r_skin, g_skin, b_skin), blend_mode) if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS)) var/tail_marking = m_styles["tail"] diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 0e8f3456335..2e40b49db36 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -65,19 +65,23 @@ /datum/sprite_accessory/hair icon = 'icons/mob/human_face.dmi' // default icon for all hairs + var/glasses_over //Hair styles with hair that don't overhang the arms of glasses should have glasses_over set to a positive value. /datum/sprite_accessory/hair/bald name = "Bald" icon_state = "bald" species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran") + glasses_over = 1 /datum/sprite_accessory/hair/short name = "Short Hair" // try to capatilize the names please~ icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you + glasses_over = 1 /datum/sprite_accessory/hair/cut name = "Cut Hair" icon_state = "hair_c" + glasses_over = 1 /datum/sprite_accessory/hair/long name = "Shoulder-length Hair" @@ -123,6 +127,7 @@ name = "Ponytail male" icon_state = "hair_ponytailm" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/ponytail2 name = "Ponytail female" @@ -132,16 +137,19 @@ /datum/sprite_accessory/hair/ponytail3 name = "Ponytail alt" icon_state = "hair_ponytail3" + glasses_over = 1 /datum/sprite_accessory/hair/sideponytail name = "Side Ponytail" icon_state = "hair_stail" gender = FEMALE + glasses_over = 1 /datum/sprite_accessory/hair/highponytail name = "High Ponytail" icon_state = "hair_highponytail" gender = FEMALE + glasses_over = 1 /datum/sprite_accessory/hair/wisp name = "Wisp" @@ -157,11 +165,13 @@ icon_state = "hair_pompadour" gender = MALE species_allowed = list("Human", "Slime People", "Unathi") + glasses_over = 1 /datum/sprite_accessory/hair/quiff name = "Quiff" icon_state = "hair_quiff" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/bedhead name = "Bedhead" @@ -197,6 +207,7 @@ name = "Bowl" icon_state = "hair_bowlcut" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/braid2 name = "Long Braid" @@ -219,20 +230,24 @@ icon_state = "hair_buzzcut" gender = MALE species_allowed = list("Human", "Slime People", "Unathi") + glasses_over = 1 /datum/sprite_accessory/hair/crew name = "Crewcut" icon_state = "hair_crewcut" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/combover name = "Combover" icon_state = "hair_combover" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/devillock name = "Devil Lock" icon_state = "hair_devilock" + glasses_over = 1 /datum/sprite_accessory/hair/dreadlocks name = "Dreadlocks" @@ -249,6 +264,7 @@ /datum/sprite_accessory/hair/afro2 name = "Afro 2" icon_state = "hair_afro2" + glasses_over = 1 /datum/sprite_accessory/hair/afro_large name = "Big Afro" @@ -259,6 +275,7 @@ name = "Flat Top" icon_state = "hair_sergeant" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/emo name = "Emo" @@ -276,31 +293,37 @@ name = "Hitop" icon_state = "hair_hitop" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/mohawk name = "Mohawk" icon_state = "hair_d" species_allowed = list("Human", "Slime People", "Unathi") + glasses_over = 1 /datum/sprite_accessory/hair/jensen name = "Adam Jensen Hair" icon_state = "hair_jensen" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/cia name = "CIA" icon_state = "hair_cia" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/mulder name = "Mulder" icon_state = "hair_mulder" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/gelled name = "Gelled Back" icon_state = "hair_gelled" gender = FEMALE + glasses_over = 1 /datum/sprite_accessory/hair/gentle name = "Gentle" @@ -311,6 +334,7 @@ name = "Spiky" icon_state = "hair_spikey" species_allowed = list("Human", "Slime People", "Unathi") + glasses_over = 1 /datum/sprite_accessory/hair/kusanagi name = "Kusanagi Hair" @@ -320,6 +344,7 @@ name = "Pigtails" icon_state = "hair_kagami" gender = FEMALE + glasses_over = 1 /datum/sprite_accessory/hair/himecut name = "Hime Cut" @@ -335,6 +360,7 @@ name = "Odango" icon_state = "hair_odango" gender = FEMALE + glasses_over = 1 /datum/sprite_accessory/hair/ombre name = "Ombre" @@ -349,11 +375,13 @@ /datum/sprite_accessory/hair/skinhead name = "Skinhead" icon_state = "hair_skinhead" + glasses_over = 1 /datum/sprite_accessory/hair/balding name = "Balding Hair" icon_state = "hair_e" gender = MALE // turnoff! + glasses_over = 1 /datum/sprite_accessory/hair/longemo name = "Long Emo" @@ -385,6 +413,7 @@ name = "Unshaven Mohawk" icon_state = "hair_unshavenmohawk" gender = MALE + glasses_over = 1 /datum/sprite_accessory/hair/drills name = "Twincurls" @@ -401,6 +430,7 @@ /datum/sprite_accessory/hair/ipc species_allowed = list("Machine") + glasses_over = 1 /datum/sprite_accessory/hair/ipc/ipc_screen_pink name = "Pink IPC Screen" @@ -547,6 +577,7 @@ /datum/sprite_accessory/hair/unathi species_allowed = list("Unathi") + glasses_over = 1 /datum/sprite_accessory/hair/unathi/una_horns name = "Unathi Horns" @@ -593,6 +624,7 @@ /datum/sprite_accessory/hair/tajara species_allowed = list("Tajaran") + glasses_over = 1 /datum/sprite_accessory/hair/tajara/taj_hair_clean name = "Tajara Clean" @@ -601,11 +633,13 @@ /datum/sprite_accessory/hair/tajara/taj_hair_bangs name = "Tajara Bangs" icon_state = "hair_bangs" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_braid name = "Tajara Braid" icon_state = "hair_tbraid" secondary_theme = "beads" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_shaggy name = "Tajara Shaggy" @@ -642,22 +676,27 @@ /datum/sprite_accessory/hair/tajara/taj_hair_curls name = "Tajara Curly" icon_state = "hair_curly" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_retro name = "Tajaran Ladies' Retro" icon_state = "hair_ladies_retro" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_victory name = "Tajara Victory Curls" icon_state = "hair_victory" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_bob name = "Tajara Bob" icon_state = "hair_tbob" + glasses_over = null /datum/sprite_accessory/hair/tajara/taj_hair_fingercurl name = "Tajara Finger Curls" icon_state = "hair_fingerwave" + glasses_over = null /datum/sprite_accessory/hair/vulpkanin species_allowed = list("Vulpkanin") @@ -694,6 +733,7 @@ /datum/sprite_accessory/hair/vulpkanin/vulp_hair_bun name = "Bun" icon_state = "bun" + glasses_over = 1 /datum/sprite_accessory/hair/vulpkanin/vulp_hair_jagged name = "Jagged" @@ -706,6 +746,7 @@ /datum/sprite_accessory/hair/vulpkanin/vulp_hair_hawk name = "Hawk" icon_state = "hawk" + glasses_over = 1 /datum/sprite_accessory/hair/vulpkanin/vulp_hair_anita name = "Anita" @@ -718,6 +759,7 @@ /datum/sprite_accessory/hair/vulpkanin/vulp_hair_spike name = "Spike" icon_state = "spike" + glasses_over = 1 /datum/sprite_accessory/hair/vulpkanin/vulp_hair_braided name = "Braided" @@ -726,6 +768,7 @@ /datum/sprite_accessory/hair/vox species_allowed = list("Vox") + glasses_over = 1 /datum/sprite_accessory/hair/vox/vox_quills_short name = "Short Vox Quills" @@ -787,6 +830,7 @@ /datum/sprite_accessory/hair/wryn species_allowed = list("Wryn") + glasses_over = 1 /datum/sprite_accessory/hair/wryn/wry_antennae_default name = "Antennae" @@ -794,6 +838,7 @@ /datum/sprite_accessory/hair/nucleation species_allowed = list("Nucleation") + glasses_over = 1 /datum/sprite_accessory/hair/nucleation/nuc_crystals name = "Nucleation Crystals" @@ -835,6 +880,7 @@ /datum/sprite_accessory/facial_hair icon = 'icons/mob/human_face.dmi' gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P) + var/over_hair /datum/sprite_accessory/facial_hair/shaved name = "Shaved" @@ -1024,6 +1070,7 @@ /datum/sprite_accessory/facial_hair/unathi species_allowed = list("Unathi") gender = NEUTER + over_hair = 1 /datum/sprite_accessory/facial_hair/unathi/una_spines_long name = "Long Spines" @@ -1594,6 +1641,7 @@ icon = 'icons/mob/body_accessory.dmi' species_allowed = list("Unathi", "Vulpkanin", "Tajaran", "Machine") icon_state = "accessory_none" + var/over_hair /datum/sprite_accessory/head_accessory/none name = "None" @@ -1602,6 +1650,7 @@ /datum/sprite_accessory/head_accessory/unathi species_allowed = list("Unathi") + over_hair = 1 /datum/sprite_accessory/head_accessory/unathi/simple name = "Simple" @@ -1701,6 +1750,7 @@ /datum/sprite_accessory/head_accessory/ipc species_allowed = list("Machine") + over_hair = 1 /datum/sprite_accessory/head_accessory/ipc/ipc_antennae name = "Antennae" diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index f280bec0ce1..d010bdfa135 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -142,7 +142,7 @@ if(length(message) >= 2) var/language_prefix = trim_right(lowertext(copytext(message, 1 ,4))) var/datum/language/L = language_keys[language_prefix] - if(can_speak(L)) + if(can_speak_language(L)) return L return null diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm new file mode 100644 index 00000000000..7358486deee --- /dev/null +++ b/code/modules/mob/status_procs.dm @@ -0,0 +1,202 @@ +// A bunch of empty procs for all the status procs in living/status_procs.dm, because +// I can't be bothered to deal with all the merge conflicts it would cause to +// typecast every mob in the codebase correctly + +/mob/proc/Confused() + return + +/mob/proc/SetConfused() + return + +/mob/proc/AdjustConfused() + return + + +/mob/proc/Dizzy() + return + +/mob/proc/SetDizzy() + return + +/mob/proc/AdjustDizzy() + return + + +/mob/proc/Drowsy() + return + +/mob/proc/SetDrowsy() + return + +/mob/proc/AdjustDrowsy() + return + + +/mob/proc/Drunk() + return + +/mob/proc/SetDrunk() + return + +/mob/proc/AdjustDrunk() + return + + +/mob/proc/Druggy() + return + +/mob/proc/SetDruggy() + return + +/mob/proc/AdjustDruggy() + return + + +/mob/proc/EarDamage() + return + +/mob/proc/SetEarDamage() + return + +/mob/proc/AdjustEarDamage() + return + + +/mob/proc/EarDeaf() + return + +/mob/proc/SetEarDeaf() + return + +/mob/proc/AdjustEarDeaf() + return + + +/mob/proc/EyeBlind() + return + +/mob/proc/SetEyeBlind() + return + +/mob/proc/AdjustEyeBlind() + return + + +/mob/proc/EyeBlurry() + return + +/mob/proc/SetEyeBlurry() + return + +/mob/proc/AdjustEyeBlurry() + return + + +/mob/proc/Hallucinate() + return + +/mob/proc/SetHallucinate() + return + +/mob/proc/AdjustHallucinate() + return + + +/mob/proc/Jitter() + return + +/mob/proc/SetJitter() + return + +/mob/proc/AdjustJitter() + return + + +/mob/proc/LoseBreath() + return + +/mob/proc/SetLoseBreath() + return + +/mob/proc/AdjustLoseBreath() + return + + +/mob/proc/Paralyse() + return + +/mob/proc/SetParalysis() + return + +/mob/proc/AdjustParalysis() + return + + +/mob/proc/Silence() + return + +/mob/proc/SetSilence() + return + +/mob/proc/AdjustSilence() + return + + +/mob/proc/Sleeping() + return + +/mob/proc/SetSleeping() + return + +/mob/proc/AdjustSleeping() + return + + +/mob/proc/Slowed() + return + +/mob/proc/SetSlowed() + return + +/mob/proc/AdjustSlowed() + return + + +/mob/proc/Slur() + return + +/mob/proc/SetSlur() + return + +/mob/proc/AdjustSlur() + return + + +/mob/proc/Stun() + return + +/mob/proc/SetStunned() + return + +/mob/proc/AdjustStunned() + return + + +/mob/proc/Stuttering() + return + +/mob/proc/SetStuttering() + return + +/mob/proc/AdjustStuttering() + return + + +/mob/proc/Weaken() + return + +/mob/proc/SetWeakened() + return + +/mob/proc/AdjustWeakened() + return diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm new file mode 100644 index 00000000000..b9245fc1b6e --- /dev/null +++ b/code/modules/mob/update_status.dm @@ -0,0 +1,65 @@ +// These are procs that cause immediate updates to features of the mob - prefixed with `update_` +// Procs that have a stacking effect depending on how many times they are called +// do not belong in this file - those go in `life.dm` instead, with the prefix `handle_` + +// OVERLAY/SIGHT PROCS + +// These return 0 if they are not applying an overlay, and 1 if they are + +// Call this to immediately apply blindness effects, instead of +// waiting for the next `Life` tick +/mob/proc/update_blind_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_blurry_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_druggy_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_nearsighted_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_sleeping_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_tint_effects() + // No handling for this on the mob level + return 0 + +// Procs that give information about the status of the mob + +/mob/proc/can_hear() + return 1 + +/mob/proc/has_vision() + return 1 + +/mob/proc/can_speak() + return 1 + +/mob/proc/incapacitated(ignore_restraints, ignore_grab) + return 0 + +/mob/proc/restrained(ignore_grab) + // All are created free + return 0 + +// Procs that update other things about the mob + +// Does various animations - Jitter, Flying, Spinning +/mob/proc/update_animations() + if(flying) + animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) + animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING) + +/mob/proc/update_stat() + return + +/mob/proc/update_canmove() + return 1 diff --git a/code/modules/nano/interaction/base.dm b/code/modules/nano/interaction/base.dm index 113c9e2878b..e4e5dd1a33b 100644 --- a/code/modules/nano/interaction/base.dm +++ b/code/modules/nano/interaction/base.dm @@ -14,10 +14,10 @@ /mob/proc/shared_nano_interaction() if(stat || !client) return STATUS_CLOSE // no updates, close the interface - else if(restrained() || lying || stunned || weakened) + else if(incapacitated()) return STATUS_UPDATE // update only (orange visibility) return STATUS_INTERACTIVE - + /mob/dead/observer/shared_nano_interaction() if(check_rights(R_ADMIN, 0, src)) return STATUS_INTERACTIVE // Admins are more equal diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm index b6a8a70780d..cf90b61bf29 100644 --- a/code/modules/nano/modules/alarm_monitor.dm +++ b/code/modules/nano/modules/alarm_monitor.dm @@ -56,6 +56,13 @@ return 1 /datum/nano_module/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state) + ui.open() + ui.set_auto_update(1) + +/datum/nano_module/alarm_monitor/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/categories[0] @@ -80,9 +87,4 @@ "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : "")) data["categories"] = categories - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index e43585243ae..ee776ba4467 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -29,20 +29,21 @@ alarm.ui_interact(usr, master_ui = ui_ref, state = TS) /datum/nano_module/atmos_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) - var/data[0] - data["alarms"] = air_alarm_repository.air_alarm_data(monitored_alarms) - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 900, 800, state = state) ui.add_template("mapContent", "atmos_control_map_content.tmpl") ui.add_template("mapHeader", "atmos_control_map_header.tmpl") ui.set_show_map(1) - ui.set_initial_data(data) ui.open() ui.set_auto_update(1) ui_ref = ui +/datum/nano_module/atmos_control/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + data["alarms"] = air_alarm_repository.air_alarm_data(monitored_alarms) + return data + /datum/nano_module/atmos_control/proc/generate_state(air_alarm) var/datum/topic_state/air_alarm/state = new() state.atmos_control = src diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index ce89f59947b..c5f8f6ecfb8 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -17,14 +17,7 @@ return 1 /datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - - var/data[0] - var/turf/T = get_turf(nano_host()) - - data["isAI"] = isAI(user) - data["crewmembers"] = crew_repository.health_data(T) - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800) @@ -33,8 +26,16 @@ // adding a template with the key "mapHeader" replaces the map header content ui.add_template("mapHeader", "crew_monitor_map_header.tmpl") - ui.set_initial_data(data) ui.open() // should make the UI auto-update; doesn't seem to? ui.set_auto_update(1) + +/datum/nano_module/crew_monitor/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + var/turf/T = get_turf(nano_host()) + + data["isAI"] = isAI(user) + data["crewmembers"] = crew_repository.health_data(T) + + return data diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 21c14077886..8bc9058db37 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -211,6 +211,13 @@ return 0 /datum/nano_module/appearance_changer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) + ui.open() + ui.set_auto_update(1) + +/datum/nano_module/appearance_changer/ui_data(mob/user, datum/topic_state/state = default_state) generate_data(check_whitelist, whitelist, blacklist) var/data[0] @@ -302,12 +309,8 @@ data["change_head_marking_color"] = can_change_markings("head") data["change_body_marking_color"] = can_change_markings("body") data["change_tail_marking_color"] = can_change_markings("tail") - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + + return data /datum/nano_module/appearance_changer/proc/update_dna() if(owner && (flags & APPEARANCE_UPDATE_DNA)) diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 9f10759dbe5..0d79f719677 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -148,6 +148,13 @@ return 0 /datum/nano_module/law_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner.name]"), 800, is_malf(user) ? 600 : 400, state = state) + ui.open() + ui.set_auto_update(1) + +/datum/nano_module/law_manager/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] owner.lawsync() @@ -176,12 +183,7 @@ data["channels"] = channels data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner.name]"), 800, is_malf(user) ? 600 : 400, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /datum/nano_module/law_manager/proc/package_laws(var/list/data, var/field, var/list/datum/ai_law/laws) var/packaged_laws[0] diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index 9b9ccc8a060..1ebe6e99c9f 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -12,6 +12,13 @@ powermonitor = nano_host() /datum/nano_module/power_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 700, state = state) + ui.open() + ui.set_auto_update(1) + +/datum/nano_module/power_monitor/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["powermonitor"] = powermonitor @@ -28,12 +35,7 @@ data["powerdemand"] = powermonitor.powernet.load data["apcs"] = apc_repository.apc_data(powermonitor) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 700, state = state) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /datum/nano_module/power_monitor/Topic(href, href_list) if(..()) diff --git a/code/modules/nano/nanoexternal.dm b/code/modules/nano/nanoexternal.dm index c463f895158..288a9df2255 100644 --- a/code/modules/nano/nanoexternal.dm +++ b/code/modules/nano/nanoexternal.dm @@ -28,7 +28,7 @@ /** * The ui_interact proc is used to open and update Nano UIs * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable + * ui_interact is currently defined for /datum * * @param user /mob The mob who is interacting with this ui * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") @@ -40,5 +40,16 @@ /datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/state = default_state) return +/** + * The ui_data proc is used to get data for the interface + * + * @param user /mob The mob who is viewing this ui + * @param state /datum/topic_state Current topic state of the UI + * + * @return list() + */ +/datum/proc/ui_data(mob/user, datum/topic_state/state = default_state) + return list() + // Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob /mob/var/list/open_uis = list() diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 355397ef6cf..2d0fe09c887 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -10,7 +10,7 @@ * Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data * * @param user /mob The mob who opened/owns the ui - * @param src_object /obj|/mob The obj or mob which the ui belongs to + * @param src_object /datum The datum which the ui belongs to * @param ui_key string A string key used for the ui * @param ui /datum/nanoui An existing instance of the ui (can be null) * @param data list The data to be passed to the ui, if it exists @@ -18,19 +18,17 @@ * * @return /nanoui Returns the found ui, for null if none exists */ -/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0) +/datum/nanomanager/proc/try_update_ui(var/mob/user, var/datum/src_object, ui_key, var/datum/nanoui/ui, var/force_open = 0) if(isnull(ui)) // no ui has been passed, so we'll search for one - { ui = get_open_ui(user, src_object, ui_key) - } + if(!isnull(ui)) - // The UI is already open + var/data = src_object.ui_data(user, ui.state) // Get data from src_object. if(!force_open) ui.push_data(data) - return ui else - //testing("nanomanager/try_update_ui mob [user.name] [src_object:name] [ui_key] [force_open] - forcing opening of ui") - ui.close() + ui.reinitialize(null, data) + return ui return null /** @@ -227,4 +225,4 @@ oldMob.open_uis.Cut() - return 1 // success \ No newline at end of file + return 1 // success diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index cd381a786de..be5ad871a36 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -46,7 +46,7 @@ nanoui is used to open and update nano browser uis // the map z level to display var/map_z_level = 1 // initial data, containing the full data structure, must be sent to the ui (the data structure cannot be extended later on) - var/list/initial_data[0] + var/list/initial_data = null // Initialize as null for proper ! usage in initial set up // set to 1 to update the ui automatically every master_controller tick var/is_auto_updating = 0 // the current status/visibility of the ui @@ -405,19 +405,34 @@ nanoui is used to open and update nano browser uis /datum/nanoui/proc/open() if(!user.client) return + var/window_size = "" if(width && height) window_size = "size=[width]x[height];" + update_status(0) if(status == STATUS_CLOSE) return + if(!initial_data) + set_initial_data(src_object.ui_data(user, state)) // Get the UI data. + user << browse(get_html(), "window=[window_id];[window_size][window_options]") winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map on_close_winset() //onclose(user, window_id) nanomanager.ui_opened(src) +/** + * Reinitialize the UI with + */ +/datum/nanoui/proc/reinitialize(template, list/data) + if(template) + add_template("main", template) + if(data) + set_initial_data(data) + open() + /** * Close this UI * diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 9aff6687f6e..27a671590db 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -57,7 +57,14 @@ var/list/alldepartments = list() to_chat(user, "You swipe the card through [src], but nothing happens.") /obj/machinery/photocopier/faxmachine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450) + ui.open() + +/obj/machinery/photocopier/faxmachine/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + if(scan) data["scan_name"] = scan.name else @@ -82,11 +89,7 @@ var/list/alldepartments = list() else data["respectcooldown"] = 0 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/photocopier/faxmachine/Topic(href, href_list) if(..()) @@ -128,7 +131,7 @@ var/list/alldepartments = list() var/list/combineddepartments = alldepartments if(long_range_enabled) combineddepartments += admin_departments - + if(emagged) combineddepartments += hidden_admin_departments diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index f0af50d8d9e..9de96b73129 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -8,6 +8,7 @@ gender = PLURAL icon = 'icons/obj/bureaucracy.dmi' icon_state = "paper" + item_state = "paper" throwforce = 0 w_class = 1 throw_range = 1 diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index fafa27a24f7..ed7c380c426 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -99,7 +99,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if((!istype(over_object, /obj/screen)) && can_use()) return attack_self(M) -/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) ui_tick++ var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main") var/auto_update = 1 @@ -115,8 +115,22 @@ var/global/list/obj/item/device/pda/PDAs = list() var/title = "Personal Data Assistant" - var/data[0] // This is the data that will be sent to the PDA + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600, state = state) + ui.set_state_key("pda") + // open the new ui window + ui.open() + + // auto update every Master Controller tick + ui.set_auto_update(auto_update) + +/obj/item/device/pda/ui_data(mob/user, datum/topic_state/state = inventory_state) + var/data[0] data["owner"] = owner // Who is your daddy... data["ownjob"] = ownjob // ...and what does he do? @@ -164,21 +178,7 @@ var/global/list/obj/item/device/pda/PDAs = list() "template" = current_app.template, "has_back" = current_app.has_back) - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600, state = inventory_state) - ui.set_state_key("pda") - - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - - // auto update every Master Controller tick - ui.set_auto_update(auto_update) + return data /obj/item/device/pda/attack_self(mob/user as mob) user.set_machine(src) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index b8ee00a9a5d..c91127d7f54 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -778,63 +778,64 @@ if(!user) return - var/list/data = list( - "locked" = is_locked(user), - "isOperating" = operating, - "externalPower" = main_status, - "powerCellStatus" = cell ? cell.percent() : null, - "chargeMode" = chargemode, - "chargingStatus" = charging, - "totalLoad" = round(lastused_equip + lastused_light + lastused_environ), - "coverLocked" = coverlocked, - "siliconUser" = istype(user, /mob/living/silicon), - "malfStatus" = get_malf_status(user), - - "powerChannels" = list( - list( - "title" = "Equipment", - "powerLoad" = round(lastused_equip), - "status" = equipment, - "topicParams" = list( - "auto" = list("eqp" = 3), - "on" = list("eqp" = 2), - "off" = list("eqp" = 1) - ) - ), - list( - "title" = "Lighting", - "powerLoad" = round(lastused_light), - "status" = lighting, - "topicParams" = list( - "auto" = list("lgt" = 3), - "on" = list("lgt" = 2), - "off" = list("lgt" = 1) - ) - ), - list( - "title" = "Environment", - "powerLoad" = round(lastused_environ), - "status" = environ, - "topicParams" = list( - "auto" = list("env" = 3), - "on" = list("env" = 2), - "off" = list("env" = 1) - ) - ) - ) - ) - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new one - ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, data["siliconUser"] ? 535 : 460) - // When the UI is first opened this is the data it will use - ui.set_initial_data(data) + ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460) ui.open() // Auto update every Master Controller tick ui.set_auto_update(1) +/obj/machinery/power/apc/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + data["locked"] = is_locked(user) + data["isOperating"] = operating + data["externalPower"] = main_status + data["powerCellStatus"] = cell ? cell.percent() : null + data["chargeMode"] = chargemode + data["chargingStatus"] = charging + data["totalLoad"] = round(lastused_equip + lastused_light + lastused_environ) + data["coverLocked"] = coverlocked + data["siliconUser"] = istype(user, /mob/living/silicon) + data["malfStatus"] = get_malf_status(user) + + var/powerChannels[0] + powerChannels[++powerChannels.len] = list( + "title" = "Equipment", + "powerLoad" = round(lastused_equip), + "status" = equipment, + "topicParams" = list( + "auto" = list("eqp" = 3), + "on" = list("eqp" = 2), + "off" = list("eqp" = 1) + ) + ) + powerChannels[++powerChannels.len] = list( + "title" = "Lighting", + "powerLoad" = round(lastused_light), + "status" = lighting, + "topicParams" = list( + "auto" = list("lgt" = 3), + "on" = list("lgt" = 2), + "off" = list("lgt" = 1) + ) + ) + powerChannels[++powerChannels.len] = list( + "title" = "Environment", + "powerLoad" = round(lastused_environ), + "status" = environ, + "topicParams" = list( + "auto" = list("env" = 3), + "on" = list("env" = 2), + "off" = list("env" = 1) + ) + ) + + data["powerChannels"] = powerChannels + + return data + /obj/machinery/power/apc/proc/report() return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])" diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index f86b17eaab7..0ff6289ea66 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -1,211 +1,241 @@ - /obj/machinery/power/generator name = "thermoelectric generator" desc = "It's a high efficiency thermoelectric generator." icon_state = "teg" - density = 1 anchored = 0 + density = 1 + use_power = 0 - use_power = 1 - idle_power_usage = 100 //Watts, I hope. Just enough to do the computer and display things. - - var/obj/machinery/atmospherics/binary/circulator/circ1 - var/obj/machinery/atmospherics/binary/circulator/circ2 + var/obj/machinery/atmospherics/binary/circulator/cold_circ + var/obj/machinery/atmospherics/binary/circulator/hot_circ + var/cold_dir = WEST + var/hot_dir = EAST + var/lastgen = 0 var/lastgenlev = -1 - - var/image/overlay_image - - var/power_multiplier = 1 // This is so admins can tweak how good it is to find a good balance for effort -> power - var/powercap = 500000 //Not a hard cap, but outputs above this have a 10% chance to cause the TeG to lose half it's power. - + var/lastcirc = "00" + /obj/machinery/power/generator/New() ..() + update_desc() + +/obj/machinery/power/generator/proc/update_desc() + desc = initial(desc) + " Its cold circulator is located on the [dir2text(cold_dir)] side, and its heat circulator is located on the [dir2text(hot_dir)] side." + +/obj/machinery/power/generator/Destroy() + disconnect() + return ..() + +/obj/machinery/power/generator/proc/disconnect() + if(cold_circ) + cold_circ.generator = null + if(hot_circ) + hot_circ.generator = null + if(powernet) + disconnect_from_network() - spawn(1) - reconnect() +/obj/machinery/power/generator/initialize() + ..() + connect() + +/obj/machinery/power/generator/proc/connect() + connect_to_network() + + var/obj/machinery/atmospherics/binary/circulator/circpath = /obj/machinery/atmospherics/binary/circulator + cold_circ = locate(circpath) in get_step(src, cold_dir) + hot_circ = locate(circpath) in get_step(src, hot_dir) -//generators connect in dir and reverse_dir(dir) directions -//mnemonic to determine circulator/generator directions: the cirulators orbit clockwise around the generator -//so a circulator to the NORTH of the generator connects first to the EAST, then to the WEST -//and a circulator to the WEST of the generator connects first to the NORTH, then to the SOUTH -//note that the circulator's outlet dir is it's always facing dir, and it's inlet is always the reverse -/obj/machinery/power/generator/proc/reconnect() - circ1 = null - circ2 = null - if(src.loc && anchored) - if(src.dir & (EAST|WEST)) - circ1 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,EAST) - circ2 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,WEST) + if(cold_circ && cold_circ.side == cold_dir) + cold_circ.generator = src + cold_circ.update_icon() + else + cold_circ = null - if(circ1 && circ2) - if(circ1.dir != SOUTH || circ2.dir != NORTH) - circ1 = null - circ2 = null + if(hot_circ && hot_circ.side == hot_dir) + hot_circ.generator = src + hot_circ.update_icon() + else + hot_circ = null - else if(src.dir & (NORTH|SOUTH)) - circ1 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,NORTH) - circ2 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,SOUTH) - - if(circ1 && circ2 && (circ1.dir != EAST || circ2.dir != WEST)) - circ1 = null - circ2 = null - -/obj/machinery/power/generator/proc/updateicon() - if(isnull(src.overlay_image)) - src.overlay_image = image('icons/obj/power.dmi') - - overlays.Cut() - if(!(stat & (NOPOWER|BROKEN))) + power_change() + update_icon() + updateDialog() + +/obj/machinery/power/generator/power_change() + if(!anchored) + stat |= NOPOWER + else + ..() + +/obj/machinery/power/generator/update_icon() + if(stat & (NOPOWER|BROKEN)) + overlays.Cut() + else + overlays.Cut() if(lastgenlev != 0) - src.overlay_image.icon_state = "teg-op[lastgenlev]" - overlays += src.overlay_image + overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]") -/obj/machinery/power/generator/process() - if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER)) + overlays += image('icons/obj/power.dmi', "teg-oc[lastcirc]") + +/obj/machinery/power/generator/process() + if(stat & (NOPOWER|BROKEN)) return + if(!cold_circ || !hot_circ) + return + + lastgen = 0 + + if(powernet) + + //log_debug("cold_circ and hot_circ pass") + + var/datum/gas_mixture/cold_air = cold_circ.return_transfer_air() + var/datum/gas_mixture/hot_air = hot_circ.return_transfer_air() + + //log_debug("hot_air = [hot_air]; cold_air = [cold_air];") + + if(cold_air && hot_air) + + //log_debug("hot_air = [hot_air] temperature = [hot_air.temperature]; cold_air = [cold_air] temperature = [hot_air.temperature];") + + //log_debug("coldair and hotair pass") + var/cold_air_heat_capacity = cold_air.heat_capacity() + var/hot_air_heat_capacity = hot_air.heat_capacity() + + var/delta_temperature = hot_air.temperature - cold_air.temperature + + //log_debug("delta_temperature = [delta_temperature]; cold_air_heat_capacity = [cold_air_heat_capacity]; hot_air_heat_capacity = [hot_air_heat_capacity]") + + if(delta_temperature > 0 && cold_air_heat_capacity > 0 && hot_air_heat_capacity > 0) + var/efficiency = 0.65 + + var/energy_transfer = delta_temperature * hot_air_heat_capacity * cold_air_heat_capacity / (hot_air_heat_capacity + cold_air_heat_capacity) + + var/heat = energy_transfer * (1 - efficiency) + lastgen = energy_transfer * efficiency + + //log_debug("lastgen = [lastgen]; heat = [heat]; delta_temperature = [delta_temperature]; hot_air_heat_capacity = [hot_air_heat_capacity]; cold_air_heat_capacity = [cold_air_heat_capacity];") + + hot_air.temperature = hot_air.temperature - energy_transfer / hot_air_heat_capacity + cold_air.temperature = cold_air.temperature + heat / cold_air_heat_capacity + + //log_debug("POWER: [lastgen] W generated at [efficiency * 100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]") + + add_avail(lastgen) + // update icon overlays only if displayed level has changed + + if(hot_air) + var/datum/gas_mixture/hot_circ_air1 = hot_circ.air1 + hot_circ_air1.merge(hot_air) + + if(cold_air) + var/datum/gas_mixture/cold_circ_air1 = cold_circ.air1 + cold_circ_air1.merge(cold_air) + + var/genlev = max(0, min( round(11 * lastgen / 100000), 11)) + var/circ = "[cold_circ && cold_circ.last_pressure_delta > 0 ? "1" : "0"][hot_circ && hot_circ.last_pressure_delta > 0 ? "1" : "0"]" + if((genlev != lastgenlev) || (circ != lastcirc)) + lastgenlev = genlev + lastcirc = circ + update_icon() + updateDialog() - var/datum/gas_mixture/air1 = circ1.return_transfer_air() - var/datum/gas_mixture/air2 = circ2.return_transfer_air() - lastgen = 0 - - if(air1 && air2) - var/air1_heat_capacity = air1.heat_capacity() - var/air2_heat_capacity = air2.heat_capacity() - var/delta_temperature = abs(air2.temperature - air1.temperature) - - if(delta_temperature > 0 && air1_heat_capacity > 0 && air2_heat_capacity > 0) - var/efficiency = 0.65 - var/energy_transfer = delta_temperature*air2_heat_capacity*air1_heat_capacity/(air2_heat_capacity+air1_heat_capacity) - var/heat = energy_transfer*(1-efficiency) - lastgen = energy_transfer*efficiency*0.05*power_multiplier - - if(air2.temperature > air1.temperature) - air2.temperature = air2.temperature - energy_transfer/air2_heat_capacity - air1.temperature = air1.temperature + heat/air1_heat_capacity - else - air2.temperature = air2.temperature + heat/air2_heat_capacity - air1.temperature = air1.temperature - energy_transfer/air1_heat_capacity - - //Transfer the air - if(air1) - circ1.air2.merge(air1) - if(air2) - circ2.air2.merge(air2) - - //Update the gas networks - if(circ1.parent2) - circ1.parent2.update = 1 - if(circ2.parent2) - circ2.parent2.update = 1 - - // update icon overlays and power usage only if displayed level has changed - if(lastgen > powercap && prob(10)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - lastgen *= 0.5 - var/genlev = max(0, min( round(11*lastgen / powercap), 11)) - if(lastgen > 100 && genlev == 0) - genlev = 1 - if(genlev != lastgenlev) - lastgenlev = genlev - updateicon() - add_avail(lastgen) - /obj/machinery/power/generator/attack_ai(mob/user) - if(stat & (BROKEN|NOPOWER)) return + return attack_hand(user) + +/obj/machinery/power/generator/attack_ghost(mob/user) + if(stat & (NOPOWER|BROKEN)) + return + interact(user) + +/obj/machinery/power/generator/attack_hand(mob/user) + if(..()) + user << browse(null, "window=teg") + return interact(user) /obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wrench)) anchored = !anchored - to_chat(user, "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.") - use_power = anchored - reconnect() + if(!anchored) + disconnect() + power_change() + else + connect() + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.") + else if(istype(W, /obj/item/device/multitool)) + if(cold_dir == WEST) + cold_dir = EAST + hot_dir = WEST + else + cold_dir = WEST + hot_dir = EAST + connect() + to_chat(user, "You reverse the generator's circulator settings. The cold circulator is now on the [dir2text(cold_dir)] side, and the heat circulator is now on the [dir2text(hot_dir)] side.") + update_desc() else - ..() + ..() + +/obj/machinery/power/generator/proc/get_menu(include_link = 1) + var/t = "" + if(!powernet) + t += "Unable to connect to the power network!" + t += "
Retry" + else if(cold_circ && hot_circ) + var/datum/gas_mixture/cold_circ_air1 = cold_circ.air1 + var/datum/gas_mixture/cold_circ_air2 = cold_circ.air2 + var/datum/gas_mixture/hot_circ_air1 = hot_circ.air1 + var/datum/gas_mixture/hot_circ_air2 = hot_circ.air2 -/obj/machinery/power/generator/attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER) || !anchored) return - interact(user) + t += "
" + t += "Output: [round(lastgen)] W" + + t += "
" + + t += "Cold loop
" + t += "Temperature Inlet: [round(cold_circ_air2.temperature, 0.1)] K / Outlet: [round(cold_circ_air1.temperature, 0.1)] K
" + t += "Pressure Inlet: [round(cold_circ_air2.return_pressure(), 0.1)] kPa / Outlet: [round(cold_circ_air1.return_pressure(), 0.1)] kPa
" + + t += "Hot loop
" + t += "Temperature Inlet: [round(hot_circ_air2.temperature, 0.1)] K / Outlet: [round(hot_circ_air1.temperature, 0.1)] K
" + t += "Pressure Inlet: [round(hot_circ_air2.return_pressure(), 0.1)] kPa / Outlet: [round(hot_circ_air1.return_pressure(), 0.1)] kPa
" + + t += "
" + else + t += "Unable to locate all parts!" + t += "
Retry" + if(include_link) + t += "
Close" + + return t /obj/machinery/power/generator/interact(mob/user) - if( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai))) - user.unset_machine() - user << browse(null, "window=teg") - return - user.set_machine(src) - var/t = "
Thermo-Electric Generator
" - - if(circ1 && circ2) - t += "Output : [round(lastgen)] W

" - - t += "Primary Circulator (top or right)
" - t += "Inlet Pressure: [round(circ1.air1.return_pressure(), 0.1)] kPa
" - t += "Inlet Temperature: [round(circ1.air1.temperature, 0.1)] K
" - t += "Outlet Pressure: [round(circ1.air2.return_pressure(), 0.1)] kPa
" - t += "Outlet Temperature: [round(circ1.air2.temperature, 0.1)] K
" - - t += "Secondary Circulator (bottom or left)
" - t += "Inlet Pressure: [round(circ2.air1.return_pressure(), 0.1)] kPa
" - t += "Inlet Temperature: [round(circ2.air1.temperature, 0.1)] K
" - t += "Outlet Pressure: [round(circ2.air2.return_pressure(), 0.1)] kPa
" - t += "Outlet Temperature: [round(circ2.air2.temperature, 0.1)] K
" - - else - t += "Unable to connect to circulators.
" - t += "Ensure both are in position and wrenched into place." - - t += "
" - t += "
" - t += "Refresh Close" - - user << browse(t, "window=teg;size=460x300") - onclose(user, "teg") + var/datum/browser/popup = new(user, "teg", "Thermo-Electric Generator", 460, 300) + popup.set_content(get_menu()) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() return 1 - /obj/machinery/power/generator/Topic(href, href_list) - ..() + if(..()) + return 0 if( href_list["close"] ) usr << browse(null, "window=teg") usr.unset_machine() return 0 - - updateDialog() + if( href_list["check"] ) + if(!powernet || !cold_circ || !hot_circ) + connect() return 1 - /obj/machinery/power/generator/power_change() ..() - updateicon() - - -/obj/machinery/power/generator/verb/rotate_clock() - set category = "Object" - set name = "Rotate Generator (Clockwise)" - set src in view(1) - - if(usr.stat || usr.restrained() || anchored) - return - - src.dir = turn(src.dir, 90) - -/obj/machinery/power/generator/verb/rotate_anticlock() - set category = "Object" - set name = "Rotate Generator (Counterclockwise)" - set src in view(1) - - if(usr.stat || usr.restrained() || anchored) - return - - src.dir = turn(src.dir, -90) \ No newline at end of file + update_icon() \ No newline at end of file diff --git a/code/modules/power/generator_type2.dm b/code/modules/power/generator_type2.dm deleted file mode 100644 index d1ff1f1079c..00000000000 --- a/code/modules/power/generator_type2.dm +++ /dev/null @@ -1,143 +0,0 @@ -/obj/machinery/power/generator_type2 - name = "thermoelectric generator" - desc = "It's a high efficiency thermoelectric generator." - icon_state = "teg" - anchored = 1 - density = 1 - use_power = 0 - - var/obj/machinery/atmospherics/unary/generator_input/input1 - var/obj/machinery/atmospherics/unary/generator_input/input2 - - var/lastgen = 0 - var/lastgenlev = -1 - - var/image/overlay_image - -/obj/machinery/power/generator_type2/New() - ..() - spawn(5) - input1 = locate(/obj/machinery/atmospherics/unary/generator_input) in get_step(src,turn(dir, 90)) - input2 = locate(/obj/machinery/atmospherics/unary/generator_input) in get_step(src,turn(dir, -90)) - if(!input1 || !input2) - stat |= BROKEN - updateicon() - - -/obj/machinery/power/generator_type2/proc/updateicon() - - if(isnull(src.overlay_image)) - src.overlay_image = image('icons/obj/power.dmi') - - overlays.Cut() - if(!(stat & (NOPOWER|BROKEN))) - - if(lastgenlev != 0) - src.overlay_image.icon_state = "teg-op[lastgenlev]" - overlays += src.overlay_image - -#define GENRATE 800 // generator output coefficient from Q - - -/obj/machinery/power/generator_type2/process() - if(!input1 || !input2) - return - - var/datum/gas_mixture/air1 = input1.return_exchange_air() - var/datum/gas_mixture/air2 = input2.return_exchange_air() - - - lastgen = 0 - - if(air1 && air2) - var/datum/gas_mixture/hot_air = air1 - var/datum/gas_mixture/cold_air = air2 - if(hot_air.temperature < cold_air.temperature) - hot_air = air2 - cold_air = air1 - - var/hot_air_heat_capacity = hot_air.heat_capacity() - var/cold_air_heat_capacity = cold_air.heat_capacity() - - var/delta_temperature = hot_air.temperature - cold_air.temperature - - if(delta_temperature > 1 && cold_air_heat_capacity > 0.01 && hot_air_heat_capacity > 0.01) - var/efficiency = (1 - cold_air.temperature/hot_air.temperature)*0.65 //65% of Carnot efficiency - - var/energy_transfer = delta_temperature*hot_air_heat_capacity*cold_air_heat_capacity/(hot_air_heat_capacity+cold_air_heat_capacity) - - var/heat = energy_transfer*(1-efficiency) - lastgen = energy_transfer*efficiency - - hot_air.temperature = hot_air.temperature - energy_transfer/hot_air_heat_capacity - cold_air.temperature = cold_air.temperature + heat/cold_air_heat_capacity - -// to_chat(world, "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]") - - input1.parent.update = 1 - input2.parent.update = 1 - - add_avail(lastgen) - // update icon overlays only if displayed level has changed - - var/genlev = max(0, min( round(11*lastgen / 100000), 11)) - if(genlev != lastgenlev) - lastgenlev = genlev - updateicon() - - src.updateDialog() - - -/obj/machinery/power/generator_type2/attack_ai(mob/user) - if(stat & (BROKEN|NOPOWER)) return - interact(user) - - -/obj/machinery/power/generator_type2/attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) return - interact(user) - - -/obj/machinery/power/generator_type2/interact(mob/user) - if( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai))) - user.unset_machine() - user << browse(null, "window=teg") - return - - user.set_machine(src) - - var/t = "
Thermo-Electric Generator
" - - t += "Output : [round(lastgen)] W

" - - t += "Cold loop
" - t += "Temperature: [round(input1.air_contents.temperature, 0.1)] K
" - t += "Pressure: [round(input1.air_contents.return_pressure(), 0.1)] kPa
" - - t += "Hot loop
" - t += "Temperature: [round(input2.air_contents.temperature, 0.1)] K
" - t += "Pressure: [round(input2.air_contents.return_pressure(), 0.1)] kPa
" - - t += "

Close" - - t += "
" - user << browse(t, "window=teg;size=460x300") - onclose(user, "teg") - return 1 - - -/obj/machinery/power/generator_type2/Topic(href, href_list) - ..() - - if( href_list["close"] ) - usr << browse(null, "window=teg") - usr.unset_machine() - return 0 - - return 1 - - -/obj/machinery/power/generator_type2/power_change() - ..() - updateicon() \ No newline at end of file diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index fdb9fe34ae1..4a35e57764c 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -321,7 +321,15 @@ if(IsBroken()) return + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/power/port_gen/pacman/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["active"] = active if(istype(user, /mob/living/silicon/ai)) data["is_ai"] = 1 @@ -329,6 +337,7 @@ data["is_ai"] = 1 else data["is_ai"] = 0 + data["output_set"] = power_output data["output_max"] = max_power_output data["output_safe"] = max_safe_output @@ -342,12 +351,7 @@ data["fuel_usage"] = active ? round((power_output / time_per_sheet) * 1000) : 0 data["fuel_type"] = sheet_name - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/power/port_gen/pacman/Topic(href, href_list) if(..()) diff --git a/code/modules/power/singularity/particle_accelerator/particle_chamber.dm b/code/modules/power/singularity/particle_accelerator/particle_chamber.dm index 8d8e23e9964..411c039d480 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_chamber.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_chamber.dm @@ -1,6 +1,6 @@ /obj/structure/particle_accelerator/fuel_chamber name = "EM Acceleration Chamber" - desc_holder = "This is where the Alpha particles are accelerated to radical speeds." + desc_holder = "This part is where the Alpha particles are accelerated to radical speeds." icon = 'icons/obj/machines/particle_accelerator.dmi' icon_state = "fuel_chamber" reference = "fuel_chamber" diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index ed4d300d7ab..ed2fb257015 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -2,7 +2,7 @@ /obj/machinery/particle_accelerator/control_box name = "Particle Accelerator Control Console" - desc = "This controls the density of the particles." + desc = "This part controls the density of the particles." icon = 'icons/obj/machines/particle_accelerator.dmi' icon_state = "control_box" reference = "control_box" diff --git a/code/modules/power/singularity/particle_accelerator/particle_emitter.dm b/code/modules/power/singularity/particle_accelerator/particle_emitter.dm index 8e260a1115d..cbfd212e873 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_emitter.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_emitter.dm @@ -2,7 +2,7 @@ /obj/structure/particle_accelerator/particle_emitter name = "EM Containment Grid" - desc_holder = "This launchs the Alpha particles, might not want to stand near this end." + desc_holder = "This part launches the Alpha particles. You might not want to stand near this end." icon = 'icons/obj/machines/particle_accelerator.dmi' icon_state = "none" var/fire_delay = 50 @@ -26,16 +26,16 @@ /obj/structure/particle_accelerator/particle_emitter/proc/set_delay(var/delay) if(delay && delay >= 0) - src.fire_delay = delay + fire_delay = delay return 1 return 0 /obj/structure/particle_accelerator/particle_emitter/proc/emit_particle(var/strength = 0) - if((src.last_shot + src.fire_delay) <= world.time) - src.last_shot = world.time + if((last_shot + fire_delay) <= world.time) + last_shot = world.time var/obj/effect/accelerated_particle/A = null - var/turf/T = get_step(src,dir) + var/turf/T = get_step(src, dir) switch(strength) if(0) A = new/obj/effect/accelerated_particle/weak(T, dir) @@ -46,6 +46,6 @@ if(3) A = new/obj/effect/accelerated_particle/powerful(T, dir) if(A) - A.dir = src.dir + A.dir = dir return 1 return 0 diff --git a/code/modules/power/singularity/particle_accelerator/particle_power.dm b/code/modules/power/singularity/particle_accelerator/particle_power.dm index e6deff37ddf..dafd19917da 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_power.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_power.dm @@ -1,6 +1,6 @@ /obj/structure/particle_accelerator/power_box name = "Particle Focusing EM Lens" - desc_holder = "This uses electromagnetic waves to focus the Alpha-Particles." + desc_holder = "This part uses electromagnetic waves to focus the Alpha particles." icon = 'icons/obj/machines/particle_accelerator.dmi' icon_state = "power_box" reference = "power_box" diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 4af4ccaeee4..62557e85384 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -363,8 +363,21 @@ if(stat & BROKEN) return - // this is the data which will be sent to the ui + + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/power/smes/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["nameTag"] = name_tag data["storedCapacity"] = round(100.0*charge/capacity, 0.1) data["charging"] = inputting @@ -383,18 +396,7 @@ else data["outputting"] = 0 // smes is not outputting - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/power/smes/Topic(href, href_list) if(..()) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index a6a54c75feb..98d899cdbca 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -389,8 +389,14 @@ ui_interact(user) /obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420) + ui.open() + ui.set_auto_update(1) - var/data = list() +/obj/machinery/power/solar_control/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] data["generated"] = round(lastgen) data["angle"] = cdir @@ -403,12 +409,7 @@ data["connected_panels"] = connected_panels.len data["connected_tracker"] = (connected_tracker ? 1 : 0) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/power/solar_control/attackby(I as obj, user as mob, params) if(istype(I, /obj/item/weapon/screwdriver)) @@ -535,4 +536,4 @@ /obj/item/weapon/paper/solar name = "paper- 'Going green! Setup your own solar array instructions.'" - info = "

Welcome

At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.

You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!

Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.

Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.

That's all to it, be safe, be green!

" \ No newline at end of file + info = "

Welcome

At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.

You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!

Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.

Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.

That's all to it, be safe, be green!

" diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 02cf5d674b0..8eaa784493d 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -125,7 +125,7 @@ if(ishuman(mob)) //Hilariously enough, running into a closet should make you get hit the hardest. var/mob/living/carbon/human/H = mob - H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) + H.AdjustHallucinate(max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1))))) var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) mob.apply_effect(rads, IRRADIATE) @@ -192,7 +192,7 @@ var/obj/item/organ/internal/eyes/eyes = l.get_int_organ(/obj/item/organ/internal/eyes) if(!istype(eyes)) continue - l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) ) + l.Hallucinate(min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src))))) for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) ) @@ -262,6 +262,13 @@ // This is purely informational UI that may be accessed by AIs or robots /obj/machinery/power/supermatter_shard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/power/supermatter_shard/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["integrity_percentage"] = round(get_integrity()) @@ -280,12 +287,7 @@ else data["detonating"] = 0 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/power/supermatter_shard/proc/transfer_energy() for(var/obj/machinery/power/rad_collector/R in rad_collectors) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 6ede088c4ce..6cafcce56c3 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -334,7 +334,6 @@ obj/item/weapon/gun/proc/newshot() /obj/item/weapon/gun/proc/rename_gun(mob/M) var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN) - if(src && input && !M.stat && in_range(M,src) && !M.restrained() && M.canmove) name = input to_chat(M, "You name the gun [input]. Say hello to your new friend.") diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index 0307755f3c7..b8f659eb09f 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -302,6 +302,4 @@ density = 0 /obj/effect/syringe_gun_dummy/New() - var/datum/reagents/R = new/datum/reagents(15) - reagents = R - R.my_atom = src + create_reagents(15) diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index affc16de296..884b97c8ffb 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -34,10 +34,6 @@ update_icon() chamber_round(0) - if(unique_rename) - if(istype(A, /obj/item/weapon/pen)) - rename_gun(user) - /obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user) var/num_unloaded = 0 chambered = null diff --git a/code/modules/projectiles/guns/projectile/saw.dm b/code/modules/projectiles/guns/projectile/saw.dm index 097f5fb4a58..d36ad1dd2c6 100644 --- a/code/modules/projectiles/guns/projectile/saw.dm +++ b/code/modules/projectiles/guns/projectile/saw.dm @@ -1,6 +1,6 @@ /obj/item/weapon/gun/projectile/automatic/l6_saw name = "\improper L6 SAW" - desc = "A heavily modified 7.62 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation." + desc = "A heavily modified 5.56 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the reciever below the designation." icon_state = "l6closed100" item_state = "l6closedmag" w_class = 5 diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 0ae9b10752e..9c3475d2141 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -23,18 +23,18 @@ /obj/item/projectile/bullet/weakbullet/booze/on_hit(atom/target, blocked = 0) if(..(target, blocked)) var/mob/living/M = target - M.dizziness += 20 - M.slurring += 20 - M.confused += 20 - M.eye_blurry += 20 - M.drowsyness += 20 - for(var/datum/reagent/ethanol/A in M.reagents.reagent_list) + M.AdjustDizzy(20) + M.AdjustSlur(20) + M.AdjustConfused(20) + M.AdjustEyeBlurry(20) + M.AdjustDrowsy(20) + for(var/datum/reagent/consumable/ethanol/A in M.reagents.reagent_list) M.AdjustParalysis(2) - M.dizziness += 10 - M.slurring += 10 - M.confused += 10 - M.eye_blurry += 10 - M.drowsyness += 10 + M.AdjustDizzy(10) + M.AdjustSlur(10) + M.AdjustConfused(10) + M.AdjustEyeBlurry(10) + M.AdjustDrowsy(10) A.volume += 5 //Because we can /obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down @@ -216,7 +216,7 @@ ..(target, blocked) if(iscarbon(target)) var/mob/living/carbon/M = target - M.silent = max(M.silent, 10) + M.Silence(10) else if(istype(target, /obj/mecha/combat/honker)) var/obj/mecha/chassis = target chassis.occupant_message("A mimetech anti-honk bullet has hit \the [chassis]!") diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 15b8f630dce..223dd4d29f6 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -186,7 +186,7 @@ if(ishuman(target)) var/mob/living/carbon/human/M = target M.adjustBrainLoss(20) - M.hallucination += 20 + M.AdjustHallucinate(20) /obj/item/projectile/clown name = "snap-pop" diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm deleted file mode 100644 index ddd53d98fdf..00000000000 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ /dev/null @@ -1,1215 +0,0 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 - -/obj/machinery/chem_dispenser - name = "chem dispenser" - density = 1 - anchored = 1 - icon = 'icons/obj/chemical.dmi' - icon_state = "dispenser" - use_power = 0 - idle_power_usage = 40 - var/ui_title = "Chem Dispenser 5000" - var/energy = 100 - var/max_energy = 100 - var/amount = 30 - var/obj/item/weapon/reagent_containers/beaker = null - var/recharged = 0 - var/hackedcheck = 0 - var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine", - "sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron", - "copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver") - var/list/hacked_reagents = list("toxin") - var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode." - var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode." - var/list/broken_requirements = list() - var/broken_on_spawn = 0 - var/recharge_delay = 5 - var/image/icon_beaker = null //cached overlay - - -/obj/machinery/chem_dispenser/proc/recharge() - if(stat & (BROKEN|NOPOWER)) return - var/addenergy = 1 - var/oldenergy = energy - energy = min(energy + addenergy, max_energy) - if(energy != oldenergy) - use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) - nanomanager.update_uis(src) // update all UIs attached to src - -/obj/machinery/chem_dispenser/power_change() - if(powered()) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - stat |= NOPOWER - nanomanager.update_uis(src) // update all UIs attached to src - -/obj/machinery/chem_dispenser/process() - - if(recharged < 0) - recharge() - recharged = recharge_delay - else - recharged -= 1 - -/obj/machinery/chem_dispenser/New() - ..() - recharge() - dispensable_reagents = sortList(dispensable_reagents) - - if(broken_on_spawn) - overlays.Cut() - var/amount = pick(3,3,4) - var/list/options = list() - options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." - options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it." - options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." - options[/obj/item/weapon/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." - options[/obj/item/weapon/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." - options[/obj/item/device/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it" - options[/obj/item/weapon/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" - options[/obj/item/device/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" - options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." - options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." - options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." - - while(amount > 0) - amount -= 1 - - var/index = pick(options) - broken_requirements[index] = options[index] - options -= index - - -/obj/machinery/chem_dispenser/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - -/obj/machinery/chem_dispenser/blob_act() - if(prob(50)) - qdel(src) - - /** - * The ui_interact proc is used to open and update Nano UIs - * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable - * - * @param user /mob The mob who is interacting with this ui - * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * - * @return nothing - */ - -/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - if(broken_requirements.len) - to_chat(user, "[src] is broken. [broken_requirements[broken_requirements[1]]]") - return - - - // this is the data which will be sent to the ui - var/data[0] - data["amount"] = amount - data["energy"] = round(energy) - data["maxEnergy"] = round(max_energy) - data["isBeakerLoaded"] = beaker ? 1 : 0 - - var beakerContents[0] - var beakerCurrentVolume = 0 - if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents.Add(list(list("name" = R.name, "id"=R.id, "volume" = R.volume))) // list in a list because Byond merges the first list... - beakerCurrentVolume += R.volume - data["beakerContents"] = beakerContents - - if(beaker) - data["beakerCurrentVolume"] = beakerCurrentVolume - data["beakerMaxVolume"] = beaker.volume - else - data["beakerCurrentVolume"] = null - data["beakerMaxVolume"] = null - - var chemicals[0] - for(var/re in dispensable_reagents) - var/datum/reagent/temp = chemical_reagents_list[re] - if(temp) - chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list... - data["chemicals"] = chemicals - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - -/obj/machinery/chem_dispenser/Topic(href, href_list) - if(..()) - return 1 - - if(href_list["amount"]) - amount = round(text2num(href_list["amount"]), 5) // round to nearest 5 - if(amount < 0) // Since the user can actually type the commands himself, some sanity checking - amount = 0 - if(amount > 100) - amount = 100 - - if(href_list["dispense"]) - if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null) - var/obj/item/weapon/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents - var/space = R.maximum_volume - R.total_volume - - R.add_reagent(href_list["dispense"], min(amount, energy * 10, space)) - energy = max(energy - min(amount, energy * 10, space) / 10, 0) - overlays.Cut() - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) - overlays += icon_beaker - - if(href_list["remove"]) - if(beaker) - if(href_list["removeamount"]) - var/amount = text2num(href_list["removeamount"]) - if(isnum(amount) && (amount > 0)) - var/obj/item/weapon/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents - var/id = href_list["remove"] - R.remove_reagent(id, amount) - - if(href_list["ejectBeaker"]) - if(beaker) - var/obj/item/weapon/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - overlays.Cut() - add_fingerprint(usr) - return 1 // update UIs attached to this object - -/obj/machinery/chem_dispenser/attackby(obj/item/weapon/reagent_containers/B, mob/user, params) - if(isrobot(user)) - return - - if(broken_requirements.len && B.type == broken_requirements[1]) - if(istype(B,/obj/item/stack)) - var/obj/item/stack/S = B - S.use(1) - else - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - qdel(B) - broken_requirements -= broken_requirements[1] - to_chat(user, "You fix [src].") - return - - if(beaker) - to_chat(user, "Something is already loaded into the machine.") - return - - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) - beaker = B - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - B.forceMove(src) - to_chat(user, "You set [B] on the machine.") - nanomanager.update_uis(src) // update all UIs attached to src - if(!icon_beaker) - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) - overlays += icon_beaker - return - -/obj/machinery/chem_dispenser/attackby(obj/item/weapon/B, mob/user, params) - ..() - if(istype(B, /obj/item/device/multitool)) - if(hackedcheck == 0) - to_chat(user, hack_message) - dispensable_reagents += hacked_reagents - hackedcheck = 1 - return - - else - to_chat(user, unhack_message) - dispensable_reagents -= hacked_reagents - hackedcheck = 0 - return - -/obj/machinery/chem_dispenser/attack_ai(mob/user) - return attack_hand(user) - -/obj/machinery/chem_dispenser/attack_ghost(mob/user) - return attack_hand(user) - -/obj/machinery/chem_dispenser/attack_hand(mob/user) - if(stat & BROKEN) - return - - ui_interact(user) - -/obj/machinery/chem_dispenser/soda - icon_state = "soda_dispenser" - name = "soda fountain" - desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." - ui_title = "Soda Dispens-o-matic" - energy = 100 - max_energy = 100 - dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", - "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", - "watermelonjuice", "carrotjuice", "potato", "berryjuice") - hack_message = "You change the mode from 'McNano' to 'Pizza King'." - unhack_message = "You change the mode from 'Pizza King' to 'McNano'." - hacked_reagents = list("thirteenloko") - -/obj/machinery/chem_dispenser/beer - icon_state = "booze_dispenser" - name = "booze dispenser" - ui_title = "Booze Portal 9001" - energy = 100 - max_energy = 100 - desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") - hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." - unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." - hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing") - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/obj/machinery/chem_dispenser/constructable - name = "portable chem dispenser" - icon = 'icons/obj/chemical.dmi' - icon_state = "minidispenser" - energy = 5 - max_energy = 5 - amount = 5 - recharge_delay = 10 - dispensable_reagents = list() - var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "water"), - list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"), - list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"), - list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel")) - -/obj/machinery/chem_dispenser/constructable/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator(null) - component_parts += new /obj/item/weapon/stock_parts/capacitor(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/cell/super(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null) - component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/RefreshParts() - var/time = 0 - var/temp_energy = 0 - var/i - for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - temp_energy += M.rating - temp_energy-- - max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest - for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts) - time += C.rating - for(var/obj/item/weapon/stock_parts/cell/P in component_parts) - time += round(P.maxcharge, 10000) / 10000 - recharge_delay = 10 / (time/2) //delay between recharges, double the usual time on lowest 33% less than usual on highest - for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) - for(i=1, i<=M.rating, i++) - dispensable_reagents = sortList(dispensable_reagents | special_reagents[i]) - -/obj/machinery/chem_dispenser/constructable/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/weapon/reagent_containers/glass)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - ..() - else - ..() - - if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) - return - - if(exchange_parts(user, I)) - return - - if(istype(I, /obj/item/weapon/wrench)) - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) - if(anchored) - anchored = 0 - to_chat(user, "[src] can now be moved.") - else if(!anchored) - anchored = 1 - to_chat(user, "[src] is now secured.") - - if(panel_open) - if(istype(I, /obj/item/weapon/crowbar)) - if(beaker) - var/obj/item/weapon/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - default_deconstruction_crowbar(I) - return 1 - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/obj/machinery/chem_master - name = "\improper ChemMaster 3000" - density = 1 - anchored = 1 - icon = 'icons/obj/chemical.dmi' - icon_state = "mixer0" - use_power = 1 - idle_power_usage = 20 - var/obj/item/weapon/reagent_containers/beaker = null - var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null - var/mode = 0 - var/condi = 0 - var/useramount = 30 // Last used amount - var/pillamount = 10 - var/patchamount = 10 - var/bottlesprite = "bottle" - var/pillsprite = "1" - var/client/has_sprites = list() - var/printing = null - -/obj/machinery/chem_master/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src - overlays += "waitlight" - -/obj/machinery/chem_master/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - -/obj/machinery/chem_master/blob_act() - if(prob(50)) - qdel(src) - -/obj/machinery/chem_master/power_change() - if(powered()) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - stat |= NOPOWER - -/obj/machinery/chem_master/attackby(obj/item/weapon/B, mob/user, params) - - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) - - if(beaker) - to_chat(user, "A beaker is already loaded into the machine.") - return - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - beaker = B - B.forceMove(src) - to_chat(user, "You add the beaker to the machine!") - nanomanager.update_uis(src) - icon_state = "mixer1" - - else if(istype(B, /obj/item/weapon/storage/pill_bottle)) - - if(loaded_pill_bottle) - to_chat(user, "A pill bottle is already loaded into the machine.") - return - - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - loaded_pill_bottle = B - B.forceMove(src) - to_chat(user, "You add the pill bottle into the dispenser slot!") - nanomanager.update_uis(src) - return - -/obj/machinery/chem_master/Topic(href, href_list) - if(..()) - return 1 - - add_fingerprint(usr) - usr.set_machine(src) - - - if(href_list["ejectp"]) - if(loaded_pill_bottle) - loaded_pill_bottle.forceMove(loc) - loaded_pill_bottle = null - else if(href_list["close"]) - usr << browse(null, "window=chem_master") - onclose(usr, "chem_master") - usr.unset_machine() - return - - if(href_list["print_p"]) - if(!(printing)) - printing = 1 - visible_message("[src] rattles and prints out a sheet of paper.") - playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) - P.info = "
Chemical Analysis

" - P.info += "Time of analysis: [worldtime2text(world.time)]

" - P.info += "Chemical name: [href_list["name"]]
" - if(href_list["name"] == "Blood") - var/datum/reagents/R = beaker.reagents - var/datum/reagent/blood/G - for(var/datum/reagent/F in R.reagent_list) - if(F.name == href_list["name"]) - G = F - break - var/B = G.data["blood_type"] - var/C = G.data["blood_DNA"] - P.info += "Description:
Blood Type: [B]
DNA: [C]" - else - P.info += "Description: [href_list["desc"]]" - P.info += "

Notes:
" - P.name = "Chemical Analysis - [href_list["name"]]" - printing = null - - if(beaker) - var/datum/reagents/R = beaker.reagents - if(href_list["analyze"]) - var/dat = "" - if(!condi) - if(href_list["name"] == "Blood") - var/datum/reagent/blood/G - for(var/datum/reagent/F in R.reagent_list) - if(F.name == href_list["name"]) - G = F - break - var/A = G.name - var/B = G.data["blood_type"] - var/C = G.data["blood_DNA"] - dat += "Chemmaster 3000Chemical infos:

Name:
[A]

Description:
Blood Type: [B]
DNA: [C]" - else - dat += "Chemmaster 3000Chemical infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]" - dat += "

(Print Analysis)
" - dat += "(Back)" - else - dat += "Condimaster 3000Condiment infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]


(Back)" - usr << browse(dat, "window=chem_master;size=575x400") - return - - else if(href_list["add"]) - - if(href_list["amount"]) - var/id = href_list["add"] - var/amount = text2num(href_list["amount"]) - R.trans_id_to(src, id, amount) - - else if(href_list["addcustom"]) - - var/id = href_list["addcustom"] - useramount = input("Select the amount to transfer.", 30, useramount) as num - useramount = isgoodnumber(useramount) - Topic(null, list("amount" = "[useramount]", "add" = "[id]")) - - else if(href_list["remove"]) - - if(href_list["amount"]) - var/id = href_list["remove"] - var/amount = text2num(href_list["amount"]) - if(mode) - reagents.trans_id_to(beaker, id, amount) - else - reagents.remove_reagent(id, amount) - - - else if(href_list["removecustom"]) - - var/id = href_list["removecustom"] - useramount = input("Select the amount to transfer.", 30, useramount) as num - useramount = isgoodnumber(useramount) - Topic(null, list("amount" = "[useramount]", "remove" = "[id]")) - - else if(href_list["toggle"]) - mode = !mode - - else if(href_list["main"]) - attack_hand(usr) - return - else if(href_list["eject"]) - if(beaker) - beaker.forceMove(get_turf(src)) - beaker = null - reagents.clear_reagents() - icon_state = "mixer0" - else if(href_list["createpill"] || href_list["createpill_multiple"]) - if(!condi) - var/count = 1 - if(href_list["createpill_multiple"]) - count = input("Select the number of pills to make.", 10, pillamount) as num|null - if(count == null) - return - count = isgoodnumber(count) - if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? - if(count <= 0) return - var/amount_per_pill = reagents.total_volume/count - if(amount_per_pill > 50) amount_per_pill = 50 - var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null - if(!name) - return - name = reject_bad_text(name) - while(count--) - var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] pill" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - P.icon_state = "pill"+pillsprite - reagents.trans_to(P,amount_per_pill) - if(loaded_pill_bottle) - if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) - P.forceMove(loaded_pill_bottle) - updateUsrDialog() - else - var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null - if(!name) - return - name = reject_bad_text(name) - var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(loc) - if(!name) name = reagents.get_master_reagent_name() - P.originalname = name - P.name = "[name] pack" - P.desc = "A small condiment pack. The label says it contains [name]." - reagents.trans_to(P,10) - else if(href_list["createpatch"] || href_list["createpatch_multiple"]) - if(!condi) - var/count = 1 - if(href_list["createpatch_multiple"]) - count = input("Select the number of patches to make.", 10, patchamount) as num|null - if(count == null) - return - count = isgoodnumber(count) - if(!count || count <= 0) - return - if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? - var/amount_per_patch = reagents.total_volume/count - if(amount_per_patch > 40) amount_per_patch = 40 - var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null - if(!name) - return - name = reject_bad_text(name) - var/is_medical_patch = chemical_safety_check(reagents) - while(count--) - var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] patch" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - reagents.trans_to(P,amount_per_patch) - if(is_medical_patch) - P.instant_application = 1 - P.icon_state = "bandaid_med" - else if(href_list["createbottle"]) - if(!condi) - var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null - if(!name) - return - name = reject_bad_text(name) - var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] bottle" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - P.icon_state = bottlesprite - reagents.trans_to(P,30) - else - var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(loc) - reagents.trans_to(P,50) - else if(href_list["change_pill"]) - #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites - var/dat = "" - var/j = 0 - for(var/i = 1 to MAX_PILL_SPRITE) - j++ - if(j == 1) - dat += "" - dat += "" - if(j == 5) - dat += "" - j = 0 - dat += "
" - usr << browse(dat, "window=chem_master_iconsel;size=225x193") - return - else if(href_list["change_bottle"]) - var/dat = "" - var/j = 0 - for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) - j++ - if(j == 1) - dat += "" - dat += "" - if(j == 5) - dat += "" - j = 0 - dat += "
" - usr << browse(dat, "window=chem_master_iconsel;size=225x193") - return - else if(href_list["pill_sprite"]) - pillsprite = href_list["pill_sprite"] - usr << browse(null, "window=chem_master_iconsel") - else if(href_list["bottle_sprite"]) - bottlesprite = href_list["bottle_sprite"] - usr << browse(null, "window=chem_master_iconsel") - - nanomanager.update_uis(src) - return - -/obj/machinery/chem_master/attack_ai(mob/user) - return attack_hand(user) - -/obj/machinery/chem_master/attack_ghost(mob/user) - return attack_hand(user) - -/obj/machinery/chem_master/attack_hand(mob/user) - if(..()) - return 1 - ui_interact(user) - return - -/obj/machinery/chem_master/ui_interact(mob/user, ui_key="main", datum/nanoui/ui = null, force_open = 1) - - var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) - assets.send(user) - - var/data = list() - - data["condi"] = condi - data["loaded_pill_bottle"] = (loaded_pill_bottle ? 1 : 0) - if(loaded_pill_bottle) - data["loaded_pill_bottle_contents_len"] = loaded_pill_bottle.contents.len - data["loaded_pill_bottle_storage_slots"] = loaded_pill_bottle.storage_slots - - data["beaker"] = (beaker ? 1 : 0) - if(beaker) - var/list/beaker_reagents_list = list() - data["beaker_reagents"] = beaker_reagents_list - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beaker_reagents_list[++beaker_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) - var/list/buffer_reagents_list = list() - data["buffer_reagents"] = buffer_reagents_list - for(var/datum/reagent/R in reagents.reagent_list) - buffer_reagents_list[++buffer_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) - - data["pillsprite"] = pillsprite - data["bottlesprite"] = bottlesprite - data["mode"] = mode - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400) - ui.set_initial_data(data) - ui.open() - -/obj/machinery/chem_master/proc/isgoodnumber(num) - if(isnum(num)) - if(num > 200) - num = 200 - else if(num < 0) - num = 1 - else - num = round(num) - return num - else - return 0 - -/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) - var/all_safe = 1 - for(var/datum/reagent/A in R.reagent_list) - if(!safe_chem_list.Find(A.id)) - all_safe = 0 - return all_safe - -/obj/machinery/chem_master/condimaster - name = "\improper CondiMaster 3000" - condi = 1 - -/obj/machinery/chem_master/constructable - name = "ChemMaster 2999" - desc = "Used to seperate chemicals and distribute them in a variety of forms." - -/obj/machinery/chem_master/constructable/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_master(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) - component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) - -/obj/machinery/chem_master/constructable/attackby(obj/item/B, mob/user, params) - - if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B)) - if(beaker) - beaker.forceMove(get_turf(src)) - beaker = null - reagents.clear_reagents() - if(loaded_pill_bottle) - loaded_pill_bottle.forceMove(get_turf(src)) - loaded_pill_bottle = null - return - - if(exchange_parts(user, B)) - return - - if(panel_open) - if(istype(B, /obj/item/weapon/crowbar)) - default_deconstruction_crowbar(B) - return 1 - else - to_chat(user, "You can't use the [name] while it's panel is opened!") - return 1 - else - ..() - -/obj/machinery/reagentgrinder - - name = "\improper All-In-One Grinder" - icon = 'icons/obj/kitchen.dmi' - icon_state = "juicer1" - layer = 2.9 - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 5 - active_power_usage = 100 - var/inuse = 0 - var/obj/item/weapon/reagent_containers/beaker = null - var/limit = 10 - - //IMPORTANT NOTE! A negative number is a multiplier, a positive number is a flat amount to add. 0 means equal to the amount of the original reagent - var/list/blend_items = list ( - - //Sheets - /obj/item/stack/sheet/mineral/plasma = list("plasma_dust" = 20), - /obj/item/stack/sheet/mineral/uranium = list("uranium" = 20), - /obj/item/stack/sheet/mineral/bananium = list("banana" = 20), - /obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20), - /obj/item/stack/sheet/mineral/silver = list("silver" = 20), - /obj/item/stack/sheet/mineral/gold = list("gold" = 20), - /obj/item/weapon/grown/novaflower = list("capsaicin" = 0), - - //archaeology! - ///obj/item/weapon/rocksliver = list("ground_rock" = 50), - - - //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! - /obj/item/weapon/reagent_containers/food = list(), - /obj/item/weapon/reagent_containers/honeycomb = list() - ) - - var/list/blend_tags = list ( - "nettle" = list("sacid" = 0), - "deathnettle" = list("facid" = 0), - "soybeans" = list("soymilk" = 0), - "tomato" = list("ketchup" = 0), - "wheat" = list("flour" = -5), - "rice" = list("rice" = -5), - "cherries" = list("cherryjelly" = 0), - ) - - var/list/juice_items = list ( - /obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list("watermelonjuice" = 0), - ) - - var/list/juice_tags = list ( - "tomato" = list("tomatojuice" = 0), - "carrot" = list("carrotjuice" = 0), - "berries" = list("berryjuice" = 0), - "banana" = list("banana" = 0), - "potato" = list("potato" = 0), - "lemon" = list("lemonjuice" = 0), - "orange" = list("orangejuice" = 0), - "lime" = list("limejuice" = 0), - "poisonberries" = list("poisonberryjuice" = 0), - "grapes" = list("grapejuice" = 0), - "corn" = list("cornoil" = 0), - ) - - var/list/holdingitems = list() - -/obj/machinery/reagentgrinder/New() - ..() - beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - return - -/obj/machinery/reagentgrinder/update_icon() - icon_state = "juicer"+num2text(!isnull(beaker)) - return - -/obj/machinery/reagentgrinder/attackby(obj/item/O, mob/user, params) - - if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks/shaker)) - - if(beaker) - return 1 - else - if(!user.drop_item()) - to_chat(user, "[O] is stuck to you!") - return - beaker = O - O.forceMove(src) - update_icon() - updateUsrDialog() - return 0 - - if(holdingitems && holdingitems.len >= limit) - to_chat(usr, "The machine cannot hold anymore items.") - return 1 - - //Fill machine with a plantbag! - if(istype(O, /obj/item/weapon/storage/bag/plants)) - var/obj/item/weapon/storage/bag/plants/PB = O - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents) - PB.remove_from_storage(G, src) - holdingitems += G - if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill - to_chat(user, "You empty [PB] into the All-In-One grinder.") - - updateUsrDialog() - return 0 - - - if(!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) - to_chat(user, "Cannot refine into a reagent.") - return 1 - - user.unEquip(O) - O.forceMove(src) - holdingitems += O - updateUsrDialog() - return 0 - -/obj/machinery/reagentgrinder/attack_ai(mob/user) - return 0 - -/obj/machinery/reagentgrinder/attack_hand(mob/user) - user.set_machine(src) - interact(user) - -/obj/machinery/reagentgrinder/interact(mob/user) // The microwave Menu - var/is_chamber_empty = 0 - var/is_beaker_ready = 0 - var/processing_chamber = "" - var/beaker_contents = "" - var/dat = "" - - if(!inuse) - for(var/obj/item/O in holdingitems) - processing_chamber += "\A [O.name]
" - - if(!processing_chamber) - is_chamber_empty = 1 - processing_chamber = "Nothing." - if(!beaker) - beaker_contents = "No beaker attached.
" - else - is_beaker_ready = 1 - beaker_contents = "The beaker contains:
" - var/anything = 0 - for(var/datum/reagent/R in beaker.reagents.reagent_list) - anything = 1 - beaker_contents += "[R.volume] - [R.name]
" - if(!anything) - beaker_contents += "Nothing
" - - - dat = {" - Processing chamber contains:
- [processing_chamber]
- [beaker_contents]
- "} - if(is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN))) - dat += "Grind the reagents
" - dat += "Juice the reagents

" - if(holdingitems && holdingitems.len > 0) - dat += "Eject the reagents
" - if(beaker) - dat += "Detach the beaker
" - else - dat += "Please wait..." - user << browse("All-In-One Grinder[dat]", "window=reagentgrinder") - onclose(user, "reagentgrinder") - return - -/obj/machinery/reagentgrinder/Topic(href, href_list) - if(..()) - return - usr.set_machine(src) - switch(href_list["action"]) - if("grind") - grind() - if("juice") - juice() - if("eject") - eject() - if("detach") - detach() - updateUsrDialog() - return - -/obj/machinery/reagentgrinder/proc/detach() - - if(usr.stat != 0) - return - if(!beaker) - return - beaker.forceMove(loc) - beaker = null - update_icon() - -/obj/machinery/reagentgrinder/proc/eject() - - if(usr.stat != 0) - return - if(holdingitems && holdingitems.len == 0) - return - - for(var/obj/item/O in holdingitems) - O.forceMove(loc) - holdingitems -= O - holdingitems = list() - -/obj/machinery/reagentgrinder/proc/is_allowed(obj/item/weapon/reagent_containers/O) - for(var/i in blend_items) - if(istype(O, i)) - return 1 - return 0 - -/obj/machinery/reagentgrinder/proc/get_allowed_by_id(obj/item/weapon/grown/O) - for(var/i in blend_items) - if(istype(O, i)) - return blend_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_id(obj/item/weapon/reagent_containers/food/snacks/O) - for(var/i in blend_items) - if(istype(O, i)) - return blend_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_id(obj/item/weapon/reagent_containers/food/snacks/O) - for(var/i in juice_items) - if(istype(O, i)) - return juice_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) - for(var/i in blend_tags) - if(O.seed.kitchen_tag == i) - return blend_tags[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) - for(var/i in juice_tags) - if(O.seed.kitchen_tag == i) - return juice_tags[i] - -/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(obj/item/weapon/grown/O) - if(!istype(O)) - return 5 - else if(O.potency == -1) - return 5 - else - return round(O.potency) - -/obj/machinery/reagentgrinder/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O) - if(!istype(O)) - return 5 - else if(O.potency == -1) - return 5 - else - return round(5*sqrt(O.potency)) - -/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O) - holdingitems -= O - qdel(O) - -/obj/machinery/reagentgrinder/proc/juice() - power_change() - if(stat & (NOPOWER|BROKEN)) - return - if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) - return - playsound(loc, 'sound/machines/juicer.ogg', 20, 1) - var/offset = prob(50) ? -2 : 2 - animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking - inuse = 1 - spawn(50) - pixel_x = initial(pixel_x) //return to its spot after shaking - inuse = 0 - interact(usr) - //Snacks - for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - var/allowed = null - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - allowed = get_allowed_juice_by_tag(O) - else - allowed = get_allowed_juice_by_id(O) - if(isnull(allowed)) - break - - for(var/r_id in allowed) - - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = get_juice_amount(O) - - beaker.reagents.add_reagent(r_id, min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - remove_object(O) - -/obj/machinery/reagentgrinder/proc/grind() - - power_change() - if(stat & (NOPOWER|BROKEN)) - return - if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) - return - playsound(loc, 'sound/machines/blender.ogg', 50, 1) - var/offset = prob(50) ? -2 : 2 - animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking - inuse = 1 - spawn(60) - pixel_x = initial(pixel_x) //return to its spot after shaking - inuse = 0 - interact(usr) - //Snacks and Plants - for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - var/allowed = null - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - allowed = get_allowed_snack_by_tag(O) - else - allowed = get_allowed_snack_by_id(O) - if(isnull(allowed)) - break - - for(var/r_id in allowed) - - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - if(amount <= 0) //Negative amounts are multipliers for the reagent amount (Example: "amount = -5" means "reagent_amount * 5") - if(amount == 0) - if(O.reagents != null && O.reagents.has_reagent("nutriment")) - beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space)) - O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) - if(O.reagents != null && O.reagents.has_reagent("plantmatter")) - beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("plantmatter"), space)) - O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) - else - if(O.reagents != null && O.reagents.has_reagent("nutriment")) - beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) - O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) - if(O.reagents != null && O.reagents.has_reagent("plantmatter")) - beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("plantmatter")*abs(amount)), space)) - O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) - - else - O.reagents.trans_id_to(beaker, r_id, min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - if(O.reagents.reagent_list.len == 0) - remove_object(O) - - //Sheets - for(var/obj/item/stack/sheet/O in holdingitems) - var/allowed = get_allowed_by_id(O) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - for(var/i = 1; i <= round(O.amount, 1); i++) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - beaker.reagents.add_reagent(r_id,min(amount, space)) - if(space < amount) - break - if(i == round(O.amount, 1)) - remove_object(O) - break - //Plants - for(var/obj/item/weapon/grown/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/allowed = get_allowed_by_id(O) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - if(amount == 0) - if(O.reagents != null && O.reagents.has_reagent(r_id)) - beaker.reagents.add_reagent(r_id,min(O.reagents.get_reagent_amount(r_id), space)) - else - beaker.reagents.add_reagent(r_id,min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - remove_object(O) - - //xenoarch - /*for(var/obj/item/weapon/rocksliver/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/allowed = get_allowed_by_id(O) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - remove_object(O)*/ - - //Everything else - Transfers reagents from it into beaker - for(var/obj/item/weapon/reagent_containers/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/amount = O.reagents.total_volume - O.reagents.trans_to(beaker, amount) - if(!O.reagents.total_volume) - remove_object(O) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/chemistry/colors.dm similarity index 80% rename from code/modules/reagents/Chemistry-Colours.dm rename to code/modules/reagents/chemistry/colors.dm index 176ec99c4d4..3d4ab41fe9c 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/chemistry/colors.dm @@ -1,31 +1,31 @@ -/* - * Returns: - * #RRGGBB(AA) on success, null on failure - */ -/proc/mix_color_from_reagents(const/list/reagent_list) - if(!istype(reagent_list)) - return - - var/color - var/reagent_color - var/vol_counter = 0 - var/vol_temp - // see libs/IconProcs/IconProcs.dm - for(var/datum/reagent/reagent in reagent_list) - if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"]) - reagent_color = reagent.data["blood_colour"] - else - reagent_color = reagent.color - - vol_temp = reagent.volume - vol_counter += vol_temp - - if(isnull(color)) - color = reagent.color - else if(length(color) >= length(reagent_color)) - color = BlendRGB(color, reagent_color, vol_temp/vol_counter) - else - color = BlendRGB(reagent_color, color, vol_temp/vol_counter) - return color - - +/* + * Returns: + * #RRGGBB(AA) on success, null on failure + */ +var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d11141","#00b159","#00aedb","#f37735","#ffc425","#008744","#0057e7","#d62d20","#ffa700") + +/proc/mix_color_from_reagents(const/list/reagent_list) + if(!istype(reagent_list)) + return + + var/color + var/reagent_color + var/vol_counter = 0 + var/vol_temp + // see libs/IconProcs/IconProcs.dm + for(var/datum/reagent/reagent in reagent_list) + if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"]) + reagent_color = reagent.data["blood_colour"] + else + reagent_color = reagent.color + + vol_temp = reagent.volume + vol_counter += vol_temp + + if(isnull(color)) + color = reagent.color + else if(length(color) >= length(reagent_color)) + color = BlendRGB(color, reagent_color, vol_temp/vol_counter) + else + color = BlendRGB(reagent_color, color, vol_temp/vol_counter) + return color \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/chemistry/holder.dm similarity index 80% rename from code/modules/reagents/Chemistry-Holder.dm rename to code/modules/reagents/chemistry/holder.dm index ecc9c9ddc18..9c0c14014e4 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -1,601 +1,730 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -var/const/TOUCH = 1 -var/const/INGEST = 2 - -/////////////////////////////////////////////////////////////////////////////////// - -/datum/reagents - var/list/datum/reagent/reagent_list = new/list() - var/total_volume = 0 - var/maximum_volume = 100 - var/atom/my_atom = null - var/chem_temp = 300 - var/list/datum/reagent/addiction_list = new/list() - -/datum/reagents/New(maximum=100) - maximum_volume = maximum - - //I dislike having these here but map-objects are initialised before world/New() is called. >_> - if(!chemical_reagents_list) - //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id - var/paths = subtypesof(/datum/reagent) - chemical_reagents_list = list() - for(var/path in paths) - var/datum/reagent/D = new path() - chemical_reagents_list[D.id] = D - if(!D.can_grow_in_plants) - plant_blocked_chems.Add(D.id) - if(!chemical_reactions_list) - //Chemical Reactions - Initialises all /datum/chemical_reaction into a list - // It is filtered into multiple lists within a list. - // For example: - // chemical_reaction_list["plasma"] is a list of all reactions relating to plasma - - var/paths = subtypesof(/datum/chemical_reaction) - chemical_reactions_list = list() - - for(var/path in paths) - - var/datum/chemical_reaction/D = new path() - var/list/reaction_ids = list() - - if(D && D.required_reagents && D.required_reagents.len) - for(var/reaction in D.required_reagents) - reaction_ids += reaction - - // Create filters based on each reagent id in the required reagents list - for(var/id in reaction_ids) - if(!chemical_reactions_list[id]) - chemical_reactions_list[id] = list() - chemical_reactions_list[id] += D - break // Don't bother adding ourselves to other reagent ids, it is redundant. - -/datum/reagents/proc/remove_any(amount=1) - var/total_transfered = 0 - var/current_list_element = 1 - - current_list_element = rand(1,reagent_list.len) - - while(total_transfered != amount) - if(total_transfered >= amount) - break - if(total_volume <= 0 || !reagent_list.len) - break - - if(current_list_element > reagent_list.len) current_list_element = 1 - var/datum/reagent/current_reagent = reagent_list[current_list_element] - - remove_reagent(current_reagent.id, min(1, amount - total_transfered)) - - current_list_element++ - total_transfered++ - update_total() - - handle_reactions() - return total_transfered - -/datum/reagents/proc/get_master_reagent_name() - var/the_name = null - var/the_volume = 0 - for(var/datum/reagent/A in reagent_list) - if(A.volume > the_volume) - the_volume = A.volume - the_name = A.name - - return the_name - -/datum/reagents/proc/get_master_reagent_id() - var/the_id = null - var/the_volume = 0 - for(var/datum/reagent/A in reagent_list) - if(A.volume > the_volume) - the_volume = A.volume - the_id = A.id - - return the_id - -/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred. - if(!target) - return - if(total_volume <= 0) - return - var/datum/reagents/R - if(istype(target, /obj)) - var/obj/O = target - if(!O.reagents ) - return - R = O.reagents - else if(isliving(target)) - var/mob/living/M = target - if(!M.reagents) - return - R = M.reagents - else if(istype(target, /datum/reagents)) - R = target - else - return - - amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) - var/part = amount / total_volume - var/trans_data = null - for(var/datum/reagent/current_reagent in reagent_list) - if(!current_reagent) - continue - if(current_reagent.id == "blood" && ishuman(target)) - var/mob/living/carbon/human/H = target - H.inject_blood(my_atom, amount) - continue - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = copy_data(current_reagent) - - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp) - remove_reagent(current_reagent.id, current_reagent_transfer) - - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - return amount - -/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0) - if(!target) - return - if(!target.reagents || total_volume<=0) - return - var/datum/reagents/R = target.reagents - amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) - var/part = amount / total_volume - var/trans_data = null - for(var/datum/reagent/current_reagent in reagent_list) - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = copy_data(current_reagent) - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) - - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - return amount - -/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N - if(!target) - return - if(!target.reagents || total_volume<=0 || !get_reagent_amount(reagent)) - return - - var/datum/reagents/R = target.reagents - if(get_reagent_amount(reagent) R.maximum_volume) return 0 - - current_list_element = rand(1,reagent_list.len) //Eh, bandaid fix. - - while(total_transfered != amount) - if(total_transfered >= amount) break //Better safe than sorry. - if(total_volume <= 0 || !reagent_list.len) break - if(R.total_volume >= R.maximum_volume) break - - if(current_list_element > reagent_list.len) current_list_element = 1 - var/datum/reagent/current_reagent = reagent_list[current_list_element] - if(preserve_data) - trans_data = current_reagent.data - R.add_reagent(current_reagent.id, (1 * multiplier), trans_data) - remove_reagent(current_reagent.id, 1) - - current_list_element++ - total_transfered++ - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - - return total_transfered -*/ - - -/datum/reagents/proc/conditional_update_move(atom/A, Running = 0) - for(var/datum/reagent/R in reagent_list) - R.on_move (A, Running) - update_total() - -/datum/reagents/proc/conditional_update(atom/A, ) - for(var/datum/reagent/R in reagent_list) - R.on_update (A) - update_total() - -/datum/reagents/proc/handle_reactions() - if(my_atom.flags & NOREACT) - return //Yup, no reactions here. No siree. - - var/reaction_occured = 0 - do - reaction_occured = 0 - for(var/datum/reagent/R in reagent_list) // Usually a small list - for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id - if(!reaction) - continue - - var/datum/chemical_reaction/C = reaction - var/total_required_reagents = C.required_reagents.len - var/total_matching_reagents = 0 - var/total_required_catalysts = C.required_catalysts.len - var/total_matching_catalysts= 0 - var/matching_container = 0 - var/matching_other = 0 - var/list/multipliers = new/list() - var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this) - var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this) - for(var/B in C.required_reagents) - if(!has_reagent(B, C.required_reagents[B])) - break - total_matching_reagents++ - multipliers += round(get_reagent_amount(B) / C.required_reagents[B]) - for(var/B in C.required_catalysts) - if(!has_reagent(B, C.required_catalysts[B])) - break - total_matching_catalysts++ - - if(!C.required_container) - matching_container = 1 - - else - if(my_atom.type == C.required_container) - matching_container = 1 - - if(!C.required_other) - matching_other = 1 - - else if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/M = my_atom - - if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this - matching_other = 1 - - if(min_temp == 0) - min_temp = chem_temp - - if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp) - var/multiplier = min(multipliers) - var/preserved_data = null - for(var/B in C.required_reagents) - if(!preserved_data) - preserved_data = get_data(B) - remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) - - var/created_volume = C.result_amount*multiplier - if(C.result) - feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") - multiplier = max(multiplier, 1) //this shouldnt happen ... - add_reagent(C.result, C.result_amount*multiplier) - set_data(C.result, preserved_data) - - //add secondary products - for(var/S in C.secondary_results) - add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) - - var/list/seen = viewers(4, get_turf(my_atom)) - for(var/mob/M in seen) - if(!C.no_message) - to_chat(M, "[bicon(my_atom)] [C.mix_message]") - - if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/ME2 = my_atom - ME2.Uses-- - if(ME2.Uses <= 0) // give the notification that the slime core is dead - for(var/mob/M in seen) - to_chat(M, "[bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.") - ME2.name = "used slime extract" - ME2.desc = "This extract has been used up." - - playsound(get_turf(my_atom), C.mix_sound, 80, 1) - - C.on_reaction(src, created_volume) - reaction_occured = 1 - break - - while(reaction_occured) - update_total() - return 0 - -/datum/reagents/proc/isolate_reagent(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id != reagent) - del_reagent(R.id) - update_total() - -/datum/reagents/proc/del_reagent(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - if(isliving(my_atom)) - var/mob/living/M = my_atom - R.reagent_deleted(M) - reagent_list -= A - qdel(A) - update_total() - my_atom.on_reagent_change() - return 0 - - - return 1 - -/datum/reagents/proc/update_total() - total_volume = 0 - for(var/datum/reagent/R in reagent_list) - if(R.volume < 0.1) - del_reagent(R.id) - else - total_volume += R.volume - - return 0 - -/datum/reagents/proc/clear_reagents() - for(var/datum/reagent/R in reagent_list) - del_reagent(R.id) - return 0 - -/datum/reagents/proc/reaction_check(mob/living/M, datum/reagent/R) - var/can_process = 0 - if(ishuman(M)) - var/mob/living/carbon/human/H = M - //Check if this mob's species is set and can process this type of reagent - if(H.species && H.species.reagent_tag) - if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN - can_process = 1 - if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG - can_process = 1 - //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater - if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) - can_process = 1 - if(H.species && H.species.exotic_blood) - if(R.id == H.species.exotic_blood) - can_process = 0 - //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) - else - if(R.process_flags != SYNTHETIC) - can_process = 1 - return can_process - -/datum/reagents/proc/reaction(atom/A, method=TOUCH, volume_modifier = 1) - switch(method) - if(TOUCH) - for(var/datum/reagent/R in reagent_list) - if(isliving(A)) - var/check = reaction_check(A, R) - if(!check) - continue - else - R.reaction_mob(A, TOUCH, R.volume*volume_modifier) - if(isturf(A)) - R.reaction_turf(A, R.volume*volume_modifier) - if(isobj(A)) - R.reaction_obj(A, R.volume*volume_modifier) - if(INGEST) - for(var/datum/reagent/R in reagent_list) - if(isliving(A)) - var/check = reaction_check(A, R) - if(!check) - continue - else - R.reaction_mob(A, INGEST, R.volume*volume_modifier) - if(isturf(A)) - R.reaction_turf(A, R.volume*volume_modifier) - if(isobj(A)) - R.reaction_obj(A, R.volume*volume_modifier) - -/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15) - for(var/r_id in list_reagents) - var/amt = list_reagents[r_id] - add_reagent(r_id, amt, data) - -/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300) - if(!isnum(amount)) - return 1 - update_total() - if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. - if(amount <= 0) - return 0 - chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems - - for(var/A in reagent_list) - - var/datum/reagent/R = A - if(R.id == reagent) - R.volume += amount - update_total() - my_atom.on_reagent_change() - R.on_merge(data) - handle_reactions() - return 0 - - var/datum/reagent/D = chemical_reagents_list[reagent] - if(D) - - var/datum/reagent/R = new D.type() - reagent_list += R - R.holder = src - R.volume = amount - if(data) - R.data = data - R.on_new(data) - - update_total() - my_atom.on_reagent_change() - handle_reactions() - return 0 - else - warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") - - handle_reactions() - - return 1 - -/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to - - if(!isnum(amount)) - return 1 - - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - R.volume -= amount - update_total() - if(!safety)//So it does not handle reactions when it need not to - handle_reactions() - my_atom.on_reagent_change() - return 0 - - return 1 - -/datum/reagents/proc/has_reagent(reagent, amount = -1) - - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - if(!amount) - return R - else - if(R.volume >= amount) - return R - else - return 0 - - return 0 - -/datum/reagents/proc/get_reagent_amount(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - return R.volume - - return 0 - -/datum/reagents/proc/get_reagents() - var/res = "" - for(var/datum/reagent/A in reagent_list) - if(res != "") res += "," - res += A.name - - return res - -/datum/reagents/proc/get_reagent(type) - . = locate(type) in reagent_list - -/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. - if(!isnum(amount)) - return 1 - - var/has_removed_reagent = 0 - - for(var/datum/reagent/R in reagent_list) - var/matches = 0 - // Switch between how we check the reagent type - if(strict) - if(R.type == reagent_type) - matches = 1 - else - if(istype(R, reagent_type)) - matches = 1 - // We found a match, proceed to remove the reagent. Keep looping, we might find other reagents of the same type. - if(matches) - // Have our other proc handle removement - has_removed_reagent = remove_reagent(R.id, amount, safety) - - return has_removed_reagent - -// Admin logging. -/datum/reagents/proc/get_reagent_ids(and_amount=0) - var/list/stuff = list() - for(var/datum/reagent/A in reagent_list) - if(and_amount) - stuff += "[get_reagent_amount(A.id)]U of [A.id]" - else - stuff += A.id - return english_list(stuff) - -//two helper functions to preserve data across reactions (needed for xenoarch) -/datum/reagents/proc/get_data(reagent_id) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) -// to_chat(world, "proffering a data-carrying reagent ([reagent_id])") - return D.data - -/datum/reagents/proc/set_data(reagent_id, new_data) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) -// to_chat(world, "reagent data set ([reagent_id])") - D.data = new_data - -/datum/reagents/proc/copy_data(datum/reagent/current_reagent) - if(!current_reagent || !current_reagent.data) - return null - if(!istype(current_reagent.data, /list)) - return current_reagent.data - - var/list/trans_data = current_reagent.data.Copy() - - // We do this so that introducing a virus to a blood sample - // doesn't automagically infect all other blood samples from - // the same donor. - // - // Technically we should probably copy all data lists, but - // that could possibly eat up a lot of memory needlessly - // if most data lists are read-only. - if(trans_data["viruses"]) - var/list/v = trans_data["viruses"] - trans_data["viruses"] = v.Copy() - - return trans_data - -/////////////////////////////////////////////////////////////////////////////////// - - -// Convenience proc to create a reagents holder for an atom -// Max vol is maximum volume of holder -atom/proc/create_reagents(max_vol) - reagents = new/datum/reagents(max_vol) - reagents.my_atom = src - -/datum/reagents/proc/get_reagent_from_id(id) - var/datum/reagent/result = null - for(var/datum/reagent/R in reagent_list) - if(R.id == id) - result = R - break - return result - -/datum/reagents/Destroy() - . = ..() - processing_objects.Remove(src) - for(var/datum/reagent/R in reagent_list) - qdel(R) - reagent_list.Cut() - reagent_list = null - if(my_atom && my_atom.reagents == src) - my_atom.reagents = null +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + +var/const/TOUCH = 1 +var/const/INGEST = 2 +#define ADDICTION_TIME 4800 //8 minutes + +/////////////////////////////////////////////////////////////////////////////////// + +/datum/reagents + var/list/datum/reagent/reagent_list = new/list() + var/total_volume = 0 + var/maximum_volume = 100 + var/atom/my_atom = null + var/chem_temp = 300 + var/list/datum/reagent/addiction_list = new/list() + +/datum/reagents/New(maximum=100) + maximum_volume = maximum + + //I dislike having these here but map-objects are initialised before world/New() is called. >_> + if(!chemical_reagents_list) + //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id + var/paths = subtypesof(/datum/reagent) + chemical_reagents_list = list() + for(var/path in paths) + var/datum/reagent/D = new path() + chemical_reagents_list[D.id] = D + if(!D.can_grow_in_plants) + plant_blocked_chems.Add(D.id) + if(!chemical_reactions_list) + //Chemical Reactions - Initialises all /datum/chemical_reaction into a list + // It is filtered into multiple lists within a list. + // For example: + // chemical_reaction_list["plasma"] is a list of all reactions relating to plasma + + var/paths = subtypesof(/datum/chemical_reaction) + chemical_reactions_list = list() + + for(var/path in paths) + + var/datum/chemical_reaction/D = new path() + var/list/reaction_ids = list() + + if(D && D.required_reagents && D.required_reagents.len) + for(var/reaction in D.required_reagents) + reaction_ids += reaction + + // Create filters based on each reagent id in the required reagents list + for(var/id in reaction_ids) + if(!chemical_reactions_list[id]) + chemical_reactions_list[id] = list() + chemical_reactions_list[id] += D + break // Don't bother adding ourselves to other reagent ids, it is redundant. + +/datum/reagents/proc/remove_any(amount=1) + var/total_transfered = 0 + var/current_list_element = 1 + + current_list_element = rand(1,reagent_list.len) + + while(total_transfered != amount) + if(total_transfered >= amount) + break + if(total_volume <= 0 || !reagent_list.len) + break + + if(current_list_element > reagent_list.len) current_list_element = 1 + var/datum/reagent/current_reagent = reagent_list[current_list_element] + + remove_reagent(current_reagent.id, min(1, amount - total_transfered)) + + current_list_element++ + total_transfered++ + update_total() + + handle_reactions() + return total_transfered + +/datum/reagents/proc/get_master_reagent() + var/the_reagent = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_reagent = A + + return the_reagent + +/datum/reagents/proc/get_master_reagent_name() + var/the_name = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_name = A.name + + return the_name + +/datum/reagents/proc/get_master_reagent_id() + var/the_id = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_id = A.id + + return the_id + +/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred. + if(!target) + return + if(total_volume <= 0) + return + var/datum/reagents/R + if(istype(target, /obj)) + var/obj/O = target + if(!O.reagents ) + return + R = O.reagents + else if(isliving(target)) + var/mob/living/M = target + if(!M.reagents) + return + R = M.reagents + else if(istype(target, /datum/reagents)) + R = target + else + return + + amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) + var/part = amount / total_volume + var/trans_data = null + for(var/datum/reagent/current_reagent in reagent_list) + if(!current_reagent) + continue + if(current_reagent.id == "blood" && ishuman(target)) + var/mob/living/carbon/human/H = target + H.inject_blood(my_atom, amount) + continue + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = copy_data(current_reagent) + + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp) + remove_reagent(current_reagent.id, current_reagent_transfer) + + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + return amount + +/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0) + if(!target) + return + if(!target.reagents || total_volume<=0) + return + var/datum/reagents/R = target.reagents + amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) + var/part = amount / total_volume + var/trans_data = null + for(var/datum/reagent/current_reagent in reagent_list) + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = copy_data(current_reagent) + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) + + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + return amount + +/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N + if(!target) + return + if(!target.reagents || total_volume<=0 || !get_reagent_amount(reagent)) + return + + var/datum/reagents/R = target.reagents + if(get_reagent_amount(reagent)= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0) + R.overdosed = 1 + R.overdose_start(M) + if(R.volume < R.overdose_threshold && R.overdosed) + R.overdosed = 0 + if(R.overdosed) + R.overdose_process(M, R.volume >= R.overdose_threshold*2 ? 2 : 1) + + for(var/A in addiction_list) + var/datum/reagent/R = A + if(M && R) + if(R.addiction_stage < 5) + if(prob(5)) + R.addiction_stage++ + switch(R.addiction_stage) + if(1) + R.addiction_act_stage1(M) + if(2) + R.addiction_act_stage2(M) + if(3) + R.addiction_act_stage3(M) + if(4) + R.addiction_act_stage4(M) + if(5) + R.addiction_act_stage5(M) + if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end + to_chat(M, "You no longer feel reliant on [R.name]!") + addiction_list.Remove(R) + update_total() + +/datum/reagents/proc/death_metabolize(mob/living/M) + if(!M) + return + if(M.stat != DEAD) //what part of DEATH_metabolize don't you get? + return + for(var/A in reagent_list) + var/datum/reagent/R = A + if(!istype(R)) + continue + if(M && R) + R.on_mob_death(M) + +/datum/reagents/proc/overdose_list() + var/od_chems[0] + for(var/datum/reagent/R in reagent_list) + if(R.overdosed) + od_chems.Add(R.id) + return od_chems + + +/datum/reagents/proc/reagent_on_tick() + for(var/datum/reagent/R in reagent_list) + R.on_tick() + return +/* + if(!target) return + var/total_transfered = 0 + var/current_list_element = 1 + var/datum/reagents/R = target.reagents + var/trans_data = null + //if(R.total_volume + amount > R.maximum_volume) return 0 + + current_list_element = rand(1,reagent_list.len) //Eh, bandaid fix. + + while(total_transfered != amount) + if(total_transfered >= amount) break //Better safe than sorry. + if(total_volume <= 0 || !reagent_list.len) break + if(R.total_volume >= R.maximum_volume) break + + if(current_list_element > reagent_list.len) current_list_element = 1 + var/datum/reagent/current_reagent = reagent_list[current_list_element] + if(preserve_data) + trans_data = current_reagent.data + R.add_reagent(current_reagent.id, (1 * multiplier), trans_data) + remove_reagent(current_reagent.id, 1) + + current_list_element++ + total_transfered++ + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + + return total_transfered +*/ + + +/datum/reagents/proc/conditional_update_move(atom/A, Running = 0) + for(var/datum/reagent/R in reagent_list) + R.on_move (A, Running) + update_total() + +/datum/reagents/proc/conditional_update(atom/A, ) + for(var/datum/reagent/R in reagent_list) + R.on_update (A) + update_total() + +/datum/reagents/proc/handle_reactions() + if(my_atom.flags & NOREACT) + return //Yup, no reactions here. No siree. + + var/reaction_occured = 0 + do + reaction_occured = 0 + for(var/datum/reagent/R in reagent_list) // Usually a small list + for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id + if(!reaction) + continue + + var/datum/chemical_reaction/C = reaction + var/total_required_reagents = C.required_reagents.len + var/total_matching_reagents = 0 + var/total_required_catalysts = C.required_catalysts.len + var/total_matching_catalysts= 0 + var/matching_container = 0 + var/matching_other = 0 + var/list/multipliers = new/list() + var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this) + var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this) + for(var/B in C.required_reagents) + if(!has_reagent(B, C.required_reagents[B])) + break + total_matching_reagents++ + multipliers += round(get_reagent_amount(B) / C.required_reagents[B]) + for(var/B in C.required_catalysts) + if(!has_reagent(B, C.required_catalysts[B])) + break + total_matching_catalysts++ + + if(!C.required_container) + matching_container = 1 + + else + if(my_atom.type == C.required_container) + matching_container = 1 + + if(!C.required_other) + matching_other = 1 + + else if(istype(my_atom, /obj/item/slime_extract)) + var/obj/item/slime_extract/M = my_atom + + if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this + matching_other = 1 + + if(min_temp == 0) + min_temp = chem_temp + + if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp) + var/multiplier = min(multipliers) + var/preserved_data = null + for(var/B in C.required_reagents) + if(!preserved_data) + preserved_data = get_data(B) + remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) + + var/created_volume = C.result_amount*multiplier + if(C.result) + feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") + multiplier = max(multiplier, 1) //this shouldnt happen ... + add_reagent(C.result, C.result_amount*multiplier) + set_data(C.result, preserved_data) + + //add secondary products + for(var/S in C.secondary_results) + add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) + + var/list/seen = viewers(4, get_turf(my_atom)) + for(var/mob/M in seen) + if(!C.no_message) + to_chat(M, "[bicon(my_atom)] [C.mix_message]") + + if(istype(my_atom, /obj/item/slime_extract)) + var/obj/item/slime_extract/ME2 = my_atom + ME2.Uses-- + if(ME2.Uses <= 0) // give the notification that the slime core is dead + for(var/mob/M in seen) + to_chat(M, "[bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.") + ME2.name = "used slime extract" + ME2.desc = "This extract has been used up." + + playsound(get_turf(my_atom), C.mix_sound, 80, 1) + + C.on_reaction(src, created_volume) + reaction_occured = 1 + break + + while(reaction_occured) + update_total() + return 0 + +/datum/reagents/proc/isolate_reagent(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id != reagent) + del_reagent(R.id) + update_total() + +/datum/reagents/proc/del_reagent(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + if(isliving(my_atom)) + var/mob/living/M = my_atom + R.on_mob_delete(M) + reagent_list -= A + qdel(A) + update_total() + my_atom.on_reagent_change() + return 0 + + + return 1 + +/datum/reagents/proc/update_total() + total_volume = 0 + for(var/datum/reagent/R in reagent_list) + if(R.volume < 0.1) + del_reagent(R.id) + else + total_volume += R.volume + + return 0 + +/datum/reagents/proc/clear_reagents() + for(var/datum/reagent/R in reagent_list) + del_reagent(R.id) + return 0 + +/datum/reagents/proc/reaction_check(mob/living/M, datum/reagent/R) + var/can_process = 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + //Check if this mob's species is set and can process this type of reagent + if(H.species && H.species.reagent_tag) + if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN + can_process = 1 + if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG + can_process = 1 + //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater + if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) + can_process = 1 + if(H.species && H.species.exotic_blood) + if(R.id == H.species.exotic_blood) + can_process = 0 + //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) + else + if(R.process_flags != SYNTHETIC) + can_process = 1 + return can_process + +/datum/reagents/proc/reaction(atom/A, method=TOUCH, volume_modifier = 1) + switch(method) + if(TOUCH) + for(var/datum/reagent/R in reagent_list) + if(isliving(A)) + var/check = reaction_check(A, R) + if(!check) + continue + else + R.reaction_mob(A, TOUCH, R.volume*volume_modifier) + if(isturf(A)) + R.reaction_turf(A, R.volume*volume_modifier) + if(isobj(A)) + R.reaction_obj(A, R.volume*volume_modifier) + if(INGEST) + for(var/datum/reagent/R in reagent_list) + if(isliving(A)) + var/check = reaction_check(A, R) + if(!check) + continue + else + R.reaction_mob(A, INGEST, R.volume*volume_modifier) + if(isturf(A)) + R.reaction_turf(A, R.volume*volume_modifier) + if(isobj(A)) + R.reaction_obj(A, R.volume*volume_modifier) + +/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15) + for(var/r_id in list_reagents) + var/amt = list_reagents[r_id] + add_reagent(r_id, amt, data) + +/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300) + if(!isnum(amount)) + return 1 + update_total() + if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. + if(amount <= 0) + return 0 + chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems + + for(var/A in reagent_list) + + var/datum/reagent/R = A + if(R.id == reagent) + R.volume += amount + update_total() + my_atom.on_reagent_change() + R.on_merge(data) + handle_reactions() + return 0 + + var/datum/reagent/D = chemical_reagents_list[reagent] + if(D) + + var/datum/reagent/R = new D.type() + reagent_list += R + R.holder = src + R.volume = amount + if(data) + R.data = data + R.on_new(data) + + update_total() + my_atom.on_reagent_change() + handle_reactions() + return 0 + else + warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") + + handle_reactions() + + return 1 + +/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to + + if(!isnum(amount)) + return 1 + + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + R.volume -= amount + update_total() + if(!safety)//So it does not handle reactions when it need not to + handle_reactions() + my_atom.on_reagent_change() + return 0 + + return 1 + +/datum/reagents/proc/has_reagent(reagent, amount = -1) + + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + if(!amount) + return R + else + if(R.volume >= amount) + return R + else + return 0 + + return 0 + +/datum/reagents/proc/get_reagent_amount(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + return R.volume + + return 0 + +/datum/reagents/proc/get_reagents() + var/res = "" + for(var/datum/reagent/A in reagent_list) + if(res != "") res += "," + res += A.name + + return res + +/datum/reagents/proc/get_reagent(type) + . = locate(type) in reagent_list + +/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. + if(!isnum(amount)) + return 1 + + var/has_removed_reagent = 0 + + for(var/datum/reagent/R in reagent_list) + var/matches = 0 + // Switch between how we check the reagent type + if(strict) + if(R.type == reagent_type) + matches = 1 + else + if(istype(R, reagent_type)) + matches = 1 + // We found a match, proceed to remove the reagent. Keep looping, we might find other reagents of the same type. + if(matches) + // Have our other proc handle removement + has_removed_reagent = remove_reagent(R.id, amount, safety) + + return has_removed_reagent + +// Admin logging. +/datum/reagents/proc/get_reagent_ids(and_amount=0) + var/list/stuff = list() + for(var/datum/reagent/A in reagent_list) + if(and_amount) + stuff += "[get_reagent_amount(A.id)]U of [A.id]" + else + stuff += A.id + return english_list(stuff) + +//two helper functions to preserve data across reactions (needed for xenoarch) +/datum/reagents/proc/get_data(reagent_id) + for(var/datum/reagent/D in reagent_list) + if(D.id == reagent_id) +// to_chat(world, "proffering a data-carrying reagent ([reagent_id])") + return D.data + +/datum/reagents/proc/set_data(reagent_id, new_data) + for(var/datum/reagent/D in reagent_list) + if(D.id == reagent_id) +// to_chat(world, "reagent data set ([reagent_id])") + D.data = new_data + +/datum/reagents/proc/copy_data(datum/reagent/current_reagent) + if(!current_reagent || !current_reagent.data) + return null + if(!istype(current_reagent.data, /list)) + return current_reagent.data + + var/list/trans_data = current_reagent.data.Copy() + + // We do this so that introducing a virus to a blood sample + // doesn't automagically infect all other blood samples from + // the same donor. + // + // Technically we should probably copy all data lists, but + // that could possibly eat up a lot of memory needlessly + // if most data lists are read-only. + if(trans_data["viruses"]) + var/list/v = trans_data["viruses"] + trans_data["viruses"] = v.Copy() + + return trans_data + +// For random item spawning. Takes a list of paths, and returns the same list without anything that contains admin only reagents +/proc/adminReagentCheck(list/incoming) + var/list/outgoing[0] + for(var/tocheck in incoming) + if(ispath(tocheck)) + var/check = new tocheck + if(istype(check, /atom)) + var/atom/reagentCheck = check + var/datum/reagents/reagents = reagentCheck.reagents + var/admin = 0 + for(var/reag in reagents.reagent_list) + var/datum/reagent/reagent = reag + if(reagent.admin_only) + admin = 1 + break + if(!(admin)) + outgoing += tocheck + else + outgoing += tocheck + return outgoing + +/////////////////////////////////////////////////////////////////////////////////// + + +// Convenience proc to create a reagents holder for an atom +// Max vol is maximum volume of holder +atom/proc/create_reagents(max_vol) + reagents = new/datum/reagents(max_vol) + reagents.my_atom = src + +/datum/reagents/proc/get_reagent_from_id(id) + var/datum/reagent/result = null + for(var/datum/reagent/R in reagent_list) + if(R.id == id) + result = R + break + return result + +/datum/reagents/Destroy() + . = ..() + processing_objects.Remove(src) + for(var/datum/reagent/R in reagent_list) + qdel(R) + reagent_list.Cut() + reagent_list = null + if(my_atom && my_atom.reagents == src) + my_atom.reagents = null \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm new file mode 100644 index 00000000000..acbdc19b659 --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -0,0 +1,376 @@ +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 + +/obj/machinery/chem_dispenser + name = "chem dispenser" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "dispenser" + use_power = 0 + idle_power_usage = 40 + var/ui_title = "Chem Dispenser 5000" + var/energy = 100 + var/max_energy = 100 + var/amount = 30 + var/obj/item/weapon/reagent_containers/beaker = null + var/recharged = 0 + var/hackedcheck = 0 + var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine", + "sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron", + "copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver") + var/list/hacked_reagents = list("toxin") + var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode." + var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode." + var/list/broken_requirements = list() + var/broken_on_spawn = 0 + var/recharge_delay = 5 + var/image/icon_beaker = null //cached overlay + + +/obj/machinery/chem_dispenser/proc/recharge() + if(stat & (BROKEN|NOPOWER)) return + var/addenergy = 1 + var/oldenergy = energy + energy = min(energy + addenergy, max_energy) + if(energy != oldenergy) + use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) + nanomanager.update_uis(src) // update all UIs attached to src + +/obj/machinery/chem_dispenser/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + nanomanager.update_uis(src) // update all UIs attached to src + +/obj/machinery/chem_dispenser/process() + + if(recharged < 0) + recharge() + recharged = recharge_delay + else + recharged -= 1 + +/obj/machinery/chem_dispenser/New() + ..() + recharge() + dispensable_reagents = sortList(dispensable_reagents) + + if(broken_on_spawn) + overlays.Cut() + var/amount = pick(3,3,4) + var/list/options = list() + options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." + options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it." + options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." + options[/obj/item/weapon/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." + options[/obj/item/weapon/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." + options[/obj/item/device/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it" + options[/obj/item/weapon/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" + options[/obj/item/device/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" + options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." + options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." + options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." + + while(amount > 0) + amount -= 1 + + var/index = pick(options) + broken_requirements[index] = options[index] + options -= index + + +/obj/machinery/chem_dispenser/ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + if(prob(50)) + qdel(src) + return + +/obj/machinery/chem_dispenser/blob_act() + if(prob(50)) + qdel(src) + + /** + * The ui_interact proc is used to open and update Nano UIs + * If ui_interact is not used then the UI will not update correctly + * ui_interact is currently defined for /atom/movable + * + * @param user /mob The mob who is interacting with this ui + * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") + * + * @return nothing + */ +/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) + if(broken_requirements.len) + to_chat(user, "[src] is broken. [broken_requirements[broken_requirements[1]]]") + return + + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655) + // open the new ui window + ui.open() + +/obj/machinery/chem_dispenser/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + + data["amount"] = amount + data["energy"] = round(energy) + data["maxEnergy"] = round(max_energy) + data["isBeakerLoaded"] = beaker ? 1 : 0 + + var/beakerContents[0] + var/beakerCurrentVolume = 0 + if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) + for(var/datum/reagent/R in beaker.reagents.reagent_list) + beakerContents.Add(list(list("name" = R.name, "id"=R.id, "volume" = R.volume))) // list in a list because Byond merges the first list... + beakerCurrentVolume += R.volume + data["beakerContents"] = beakerContents + + if(beaker) + data["beakerCurrentVolume"] = beakerCurrentVolume + data["beakerMaxVolume"] = beaker.volume + else + data["beakerCurrentVolume"] = null + data["beakerMaxVolume"] = null + + var/chemicals[0] + for(var/re in dispensable_reagents) + var/datum/reagent/temp = chemical_reagents_list[re] + if(temp) + chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list... + data["chemicals"] = chemicals + + return data + +/obj/machinery/chem_dispenser/Topic(href, href_list) + if(..()) + return 1 + + if(href_list["amount"]) + amount = round(text2num(href_list["amount"]), 5) // round to nearest 5 + if(amount < 0) // Since the user can actually type the commands himself, some sanity checking + amount = 0 + if(amount > 100) + amount = 100 + + if(href_list["dispense"]) + if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null) + var/obj/item/weapon/reagent_containers/glass/B = beaker + var/datum/reagents/R = B.reagents + var/space = R.maximum_volume - R.total_volume + + R.add_reagent(href_list["dispense"], min(amount, energy * 10, space)) + energy = max(energy - min(amount, energy * 10, space) / 10, 0) + overlays.Cut() + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker + + if(href_list["remove"]) + if(beaker) + if(href_list["removeamount"]) + var/amount = text2num(href_list["removeamount"]) + if(isnum(amount) && (amount > 0)) + var/obj/item/weapon/reagent_containers/glass/B = beaker + var/datum/reagents/R = B.reagents + var/id = href_list["remove"] + R.remove_reagent(id, amount) + + if(href_list["ejectBeaker"]) + if(beaker) + var/obj/item/weapon/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + overlays.Cut() + add_fingerprint(usr) + return 1 // update UIs attached to this object + +/obj/machinery/chem_dispenser/attackby(obj/item/weapon/reagent_containers/B, mob/user, params) + if(isrobot(user)) + return + + if(broken_requirements.len && B.type == broken_requirements[1]) + if(istype(B,/obj/item/stack)) + var/obj/item/stack/S = B + S.use(1) + else + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + qdel(B) + broken_requirements -= broken_requirements[1] + to_chat(user, "You fix [src].") + return + + if(beaker) + to_chat(user, "Something is already loaded into the machine.") + return + + if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) + beaker = B + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + B.forceMove(src) + to_chat(user, "You set [B] on the machine.") + nanomanager.update_uis(src) // update all UIs attached to src + if(!icon_beaker) + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker + return + +/obj/machinery/chem_dispenser/attackby(obj/item/weapon/B, mob/user, params) + ..() + if(istype(B, /obj/item/device/multitool)) + if(hackedcheck == 0) + to_chat(user, hack_message) + dispensable_reagents += hacked_reagents + hackedcheck = 1 + return + + else + to_chat(user, unhack_message) + dispensable_reagents -= hacked_reagents + hackedcheck = 0 + return + +/obj/machinery/chem_dispenser/attack_ai(mob/user) + return attack_hand(user) + +/obj/machinery/chem_dispenser/attack_ghost(mob/user) + return attack_hand(user) + +/obj/machinery/chem_dispenser/attack_hand(mob/user) + if(stat & BROKEN) + return + + ui_interact(user) + +/obj/machinery/chem_dispenser/soda + icon_state = "soda_dispenser" + name = "soda fountain" + desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." + ui_title = "Soda Dispens-o-matic" + energy = 100 + max_energy = 100 + dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", + "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", + "watermelonjuice", "carrotjuice", "potato", "berryjuice") + hack_message = "You change the mode from 'McNano' to 'Pizza King'." + unhack_message = "You change the mode from 'Pizza King' to 'McNano'." + hacked_reagents = list("thirteenloko") + +/obj/machinery/chem_dispenser/beer + icon_state = "booze_dispenser" + name = "booze dispenser" + ui_title = "Booze Portal 9001" + energy = 100 + max_energy = 100 + desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." + dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") + hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." + unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." + hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing") + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/obj/machinery/chem_dispenser/constructable + name = "portable chem dispenser" + icon = 'icons/obj/chemical.dmi' + icon_state = "minidispenser" + energy = 5 + max_energy = 5 + amount = 5 + recharge_delay = 10 + dispensable_reagents = list() + var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "water"), + list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"), + list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"), + list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel")) + +/obj/machinery/chem_dispenser/constructable/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/capacitor(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/cell/super(null) + RefreshParts() + +/obj/machinery/chem_dispenser/constructable/upgraded/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null) + component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null) + RefreshParts() + +/obj/machinery/chem_dispenser/constructable/RefreshParts() + var/time = 0 + var/temp_energy = 0 + var/i + for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) + temp_energy += M.rating + temp_energy-- + max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest + for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts) + time += C.rating + for(var/obj/item/weapon/stock_parts/cell/P in component_parts) + time += round(P.maxcharge, 10000) / 10000 + recharge_delay = 10 / (time/2) //delay between recharges, double the usual time on lowest 33% less than usual on highest + for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) + for(i=1, i<=M.rating, i++) + dispensable_reagents = sortList(dispensable_reagents | special_reagents[i]) + +/obj/machinery/chem_dispenser/constructable/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/weapon/reagent_containers/glass)) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + ..() + else + ..() + + if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) + return + + if(exchange_parts(user, I)) + return + + if(istype(I, /obj/item/weapon/wrench)) + playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + if(anchored) + anchored = 0 + to_chat(user, "[src] can now be moved.") + else if(!anchored) + anchored = 1 + to_chat(user, "[src] is now secured.") + + if(panel_open) + if(istype(I, /obj/item/weapon/crowbar)) + if(beaker) + var/obj/item/weapon/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + default_deconstruction_crowbar(I) + return 1 \ No newline at end of file diff --git a/code/modules/reagents/newchem/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm similarity index 95% rename from code/modules/reagents/newchem/chem_heater.dm rename to code/modules/reagents/chemistry/machinery/chem_heater.dm index 28d1f4c2afa..bd32fcee6cd 100644 --- a/code/modules/reagents/newchem/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -130,7 +130,15 @@ if(user.stat || user.restrained()) return + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui) + if(!ui) + ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270) + ui.open() + +/obj/machinery/chem_heater/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] + data["targetTemp"] = desired_temp data["isActive"] = on data["isBeakerLoaded"] = beaker ? 1 : 0 @@ -140,15 +148,10 @@ data["beakerMaxVolume"] = beaker ? beaker.volume : null //copy-pasted from chem dispenser - var beakerContents[0] + var/beakerContents[0] if(beaker) for(var/datum/reagent/R in beaker.reagents.reagent_list) beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list... data["beakerContents"] = beakerContents - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270) - ui.set_initial_data(data) - ui.open() \ No newline at end of file + return data \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm new file mode 100644 index 00000000000..3ef20cff9b3 --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -0,0 +1,416 @@ +/obj/machinery/chem_master + name = "\improper ChemMaster 3000" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "mixer0" + use_power = 1 + idle_power_usage = 20 + var/obj/item/weapon/reagent_containers/beaker = null + var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null + var/mode = 0 + var/condi = 0 + var/useramount = 30 // Last used amount + var/pillamount = 10 + var/patchamount = 10 + var/bottlesprite = "bottle" + var/pillsprite = "1" + var/client/has_sprites = list() + var/printing = null + +/obj/machinery/chem_master/New() + create_reagents(100) + overlays += "waitlight" + +/obj/machinery/chem_master/ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + if(prob(50)) + qdel(src) + return + +/obj/machinery/chem_master/blob_act() + if(prob(50)) + qdel(src) + +/obj/machinery/chem_master/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + +/obj/machinery/chem_master/attackby(obj/item/weapon/B, mob/user, params) + + if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) + + if(beaker) + to_chat(user, "A beaker is already loaded into the machine.") + return + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + beaker = B + B.forceMove(src) + to_chat(user, "You add the beaker to the machine!") + nanomanager.update_uis(src) + icon_state = "mixer1" + + else if(istype(B, /obj/item/weapon/storage/pill_bottle)) + + if(loaded_pill_bottle) + to_chat(user, "A pill bottle is already loaded into the machine.") + return + + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + loaded_pill_bottle = B + B.forceMove(src) + to_chat(user, "You add the pill bottle into the dispenser slot!") + nanomanager.update_uis(src) + return + +/obj/machinery/chem_master/Topic(href, href_list) + if(..()) + return 1 + + add_fingerprint(usr) + usr.set_machine(src) + + + if(href_list["ejectp"]) + if(loaded_pill_bottle) + loaded_pill_bottle.forceMove(loc) + loaded_pill_bottle = null + else if(href_list["close"]) + usr << browse(null, "window=chem_master") + onclose(usr, "chem_master") + usr.unset_machine() + return + + if(href_list["print_p"]) + if(!(printing)) + printing = 1 + visible_message("[src] rattles and prints out a sheet of paper.") + playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1) + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) + P.info = "
Chemical Analysis

" + P.info += "Time of analysis: [worldtime2text(world.time)]

" + P.info += "Chemical name: [href_list["name"]]
" + if(href_list["name"] == "Blood") + var/datum/reagents/R = beaker.reagents + var/datum/reagent/blood/G + for(var/datum/reagent/F in R.reagent_list) + if(F.name == href_list["name"]) + G = F + break + var/B = G.data["blood_type"] + var/C = G.data["blood_DNA"] + P.info += "Description:
Blood Type: [B]
DNA: [C]" + else + P.info += "Description: [href_list["desc"]]" + P.info += "

Notes:
" + P.name = "Chemical Analysis - [href_list["name"]]" + printing = null + + if(beaker) + var/datum/reagents/R = beaker.reagents + if(href_list["analyze"]) + var/dat = "" + if(!condi) + if(href_list["name"] == "Blood") + var/datum/reagent/blood/G + for(var/datum/reagent/F in R.reagent_list) + if(F.name == href_list["name"]) + G = F + break + var/A = G.name + var/B = G.data["blood_type"] + var/C = G.data["blood_DNA"] + dat += "Chemmaster 3000Chemical infos:

Name:
[A]

Description:
Blood Type: [B]
DNA: [C]" + else + dat += "Chemmaster 3000Chemical infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]" + dat += "

(Print Analysis)
" + dat += "(Back)" + else + dat += "Condimaster 3000Condiment infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]


(Back)" + usr << browse(dat, "window=chem_master;size=575x400") + return + + else if(href_list["add"]) + + if(href_list["amount"]) + var/id = href_list["add"] + var/amount = text2num(href_list["amount"]) + R.trans_id_to(src, id, amount) + + else if(href_list["addcustom"]) + + var/id = href_list["addcustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + Topic(null, list("amount" = "[useramount]", "add" = "[id]")) + + else if(href_list["remove"]) + + if(href_list["amount"]) + var/id = href_list["remove"] + var/amount = text2num(href_list["amount"]) + if(mode) + reagents.trans_id_to(beaker, id, amount) + else + reagents.remove_reagent(id, amount) + + + else if(href_list["removecustom"]) + + var/id = href_list["removecustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + Topic(null, list("amount" = "[useramount]", "remove" = "[id]")) + + else if(href_list["toggle"]) + mode = !mode + + else if(href_list["main"]) + attack_hand(usr) + return + else if(href_list["eject"]) + if(beaker) + beaker.forceMove(get_turf(src)) + beaker = null + reagents.clear_reagents() + icon_state = "mixer0" + else if(href_list["createpill"] || href_list["createpill_multiple"]) + if(!condi) + var/count = 1 + if(href_list["createpill_multiple"]) + count = input("Select the number of pills to make.", 10, pillamount) as num|null + if(count == null) + return + count = isgoodnumber(count) + if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? + if(count <= 0) return + var/amount_per_pill = reagents.total_volume/count + if(amount_per_pill > 50) amount_per_pill = 50 + var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null + if(!name) + return + name = reject_bad_text(name) + while(count--) + var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] pill" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + P.icon_state = "pill"+pillsprite + reagents.trans_to(P,amount_per_pill) + if(loaded_pill_bottle) + if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) + P.forceMove(loaded_pill_bottle) + updateUsrDialog() + else + var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null + if(!name) + return + name = reject_bad_text(name) + var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(loc) + if(!name) name = reagents.get_master_reagent_name() + P.originalname = name + P.name = "[name] pack" + P.desc = "A small condiment pack. The label says it contains [name]." + reagents.trans_to(P,10) + else if(href_list["createpatch"] || href_list["createpatch_multiple"]) + if(!condi) + var/count = 1 + if(href_list["createpatch_multiple"]) + count = input("Select the number of patches to make.", 10, patchamount) as num|null + if(count == null) + return + count = isgoodnumber(count) + if(!count || count <= 0) + return + if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? + var/amount_per_patch = reagents.total_volume/count + if(amount_per_patch > 40) amount_per_patch = 40 + var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null + if(!name) + return + name = reject_bad_text(name) + var/is_medical_patch = chemical_safety_check(reagents) + while(count--) + var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] patch" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + reagents.trans_to(P,amount_per_patch) + if(is_medical_patch) + P.instant_application = 1 + P.icon_state = "bandaid_med" + else if(href_list["createbottle"]) + if(!condi) + var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null + if(!name) + return + name = reject_bad_text(name) + var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] bottle" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + P.icon_state = bottlesprite + reagents.trans_to(P,30) + else + var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(loc) + reagents.trans_to(P,50) + else if(href_list["change_pill"]) + #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites + var/dat = "" + var/j = 0 + for(var/i = 1 to MAX_PILL_SPRITE) + j++ + if(j == 1) + dat += "" + dat += "" + if(j == 5) + dat += "" + j = 0 + dat += "
" + usr << browse(dat, "window=chem_master_iconsel;size=225x193") + return + else if(href_list["change_bottle"]) + var/dat = "" + var/j = 0 + for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) + j++ + if(j == 1) + dat += "" + dat += "" + if(j == 5) + dat += "" + j = 0 + dat += "
" + usr << browse(dat, "window=chem_master_iconsel;size=225x193") + return + else if(href_list["pill_sprite"]) + pillsprite = href_list["pill_sprite"] + usr << browse(null, "window=chem_master_iconsel") + else if(href_list["bottle_sprite"]) + bottlesprite = href_list["bottle_sprite"] + usr << browse(null, "window=chem_master_iconsel") + + nanomanager.update_uis(src) + return + +/obj/machinery/chem_master/attack_ai(mob/user) + return attack_hand(user) + +/obj/machinery/chem_master/attack_ghost(mob/user) + return attack_hand(user) + +/obj/machinery/chem_master/attack_hand(mob/user) + if(..()) + return 1 + ui_interact(user) + return + +/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) + var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) + assets.send(user) + + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400) + ui.open() + +/obj/machinery/chem_master/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + + data["condi"] = condi + data["loaded_pill_bottle"] = (loaded_pill_bottle ? 1 : 0) + if(loaded_pill_bottle) + data["loaded_pill_bottle_contents_len"] = loaded_pill_bottle.contents.len + data["loaded_pill_bottle_storage_slots"] = loaded_pill_bottle.storage_slots + + data["beaker"] = (beaker ? 1 : 0) + if(beaker) + var/list/beaker_reagents_list = list() + data["beaker_reagents"] = beaker_reagents_list + for(var/datum/reagent/R in beaker.reagents.reagent_list) + beaker_reagents_list[++beaker_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + var/list/buffer_reagents_list = list() + data["buffer_reagents"] = buffer_reagents_list + for(var/datum/reagent/R in reagents.reagent_list) + buffer_reagents_list[++buffer_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + + data["pillsprite"] = pillsprite + data["bottlesprite"] = bottlesprite + data["mode"] = mode + + return data + +/obj/machinery/chem_master/proc/isgoodnumber(num) + if(isnum(num)) + if(num > 200) + num = 200 + else if(num < 0) + num = 1 + else + num = round(num) + return num + else + return 0 + +/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) + var/all_safe = 1 + for(var/datum/reagent/A in R.reagent_list) + if(!safe_chem_list.Find(A.id)) + all_safe = 0 + return all_safe + +/obj/machinery/chem_master/condimaster + name = "\improper CondiMaster 3000" + condi = 1 + +/obj/machinery/chem_master/constructable + name = "ChemMaster 2999" + desc = "Used to seperate chemicals and distribute them in a variety of forms." + +/obj/machinery/chem_master/constructable/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_master(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) + +/obj/machinery/chem_master/constructable/attackby(obj/item/B, mob/user, params) + + if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B)) + if(beaker) + beaker.forceMove(get_turf(src)) + beaker = null + reagents.clear_reagents() + if(loaded_pill_bottle) + loaded_pill_bottle.forceMove(get_turf(src)) + loaded_pill_bottle = null + return + + if(exchange_parts(user, B)) + return + + if(panel_open) + if(istype(B, /obj/item/weapon/crowbar)) + default_deconstruction_crowbar(B) + return 1 + else + to_chat(user, "You can't use the [name] while it's panel is opened!") + return 1 + else + ..() \ No newline at end of file diff --git a/code/modules/reagents/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm similarity index 99% rename from code/modules/reagents/pandemic.dm rename to code/modules/reagents/chemistry/machinery/pandemic.dm index 1f801d0ace5..1aa72ac0918 100644 --- a/code/modules/reagents/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -293,5 +293,4 @@ ..() return else - ..() - return + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm new file mode 100644 index 00000000000..38cfdf4b0ae --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -0,0 +1,415 @@ +/obj/machinery/reagentgrinder + name = "\improper All-In-One Grinder" + icon = 'icons/obj/kitchen.dmi' + icon_state = "juicer1" + layer = 2.9 + density = 1 + anchored = 1 + use_power = 1 + idle_power_usage = 5 + active_power_usage = 100 + var/inuse = 0 + var/obj/item/weapon/reagent_containers/beaker = null + var/limit = 10 + + //IMPORTANT NOTE! A negative number is a multiplier, a positive number is a flat amount to add. 0 means equal to the amount of the original reagent + var/list/blend_items = list ( + + //Sheets + /obj/item/stack/sheet/mineral/plasma = list("plasma_dust" = 20), + /obj/item/stack/sheet/mineral/uranium = list("uranium" = 20), + /obj/item/stack/sheet/mineral/bananium = list("banana" = 20), + /obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20), + /obj/item/stack/sheet/mineral/silver = list("silver" = 20), + /obj/item/stack/sheet/mineral/gold = list("gold" = 20), + /obj/item/weapon/grown/novaflower = list("capsaicin" = 0), + + //archaeology! + ///obj/item/weapon/rocksliver = list("ground_rock" = 50), + + + //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! + /obj/item/weapon/reagent_containers/food = list(), + /obj/item/weapon/reagent_containers/honeycomb = list() + ) + + var/list/blend_tags = list ( + "nettle" = list("sacid" = 0), + "deathnettle" = list("facid" = 0), + "soybeans" = list("soymilk" = 0), + "tomato" = list("ketchup" = 0), + "wheat" = list("flour" = -5), + "rice" = list("rice" = -5), + "cherries" = list("cherryjelly" = 0), + ) + + var/list/juice_items = list ( + /obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list("watermelonjuice" = 0), + ) + + var/list/juice_tags = list ( + "tomato" = list("tomatojuice" = 0), + "carrot" = list("carrotjuice" = 0), + "berries" = list("berryjuice" = 0), + "banana" = list("banana" = 0), + "potato" = list("potato" = 0), + "lemon" = list("lemonjuice" = 0), + "orange" = list("orangejuice" = 0), + "lime" = list("limejuice" = 0), + "poisonberries" = list("poisonberryjuice" = 0), + "grapes" = list("grapejuice" = 0), + "corn" = list("cornoil" = 0), + ) + + var/list/holdingitems = list() + +/obj/machinery/reagentgrinder/New() + ..() + beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) + return + +/obj/machinery/reagentgrinder/update_icon() + icon_state = "juicer"+num2text(!isnull(beaker)) + return + +/obj/machinery/reagentgrinder/attackby(obj/item/O, mob/user, params) + + if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ + istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \ + istype(O,/obj/item/weapon/reagent_containers/food/drinks/shaker)) + + if(beaker) + return 1 + else + if(!user.drop_item()) + to_chat(user, "[O] is stuck to you!") + return + beaker = O + O.forceMove(src) + update_icon() + updateUsrDialog() + return 0 + + if(holdingitems && holdingitems.len >= limit) + to_chat(usr, "The machine cannot hold anymore items.") + return 1 + + //Fill machine with a plantbag! + if(istype(O, /obj/item/weapon/storage/bag/plants)) + var/obj/item/weapon/storage/bag/plants/PB = O + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents) + PB.remove_from_storage(G, src) + holdingitems += G + if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill + to_chat(user, "You empty [PB] into the All-In-One grinder.") + + updateUsrDialog() + return 0 + + + if(!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) + to_chat(user, "Cannot refine into a reagent.") + return 1 + + user.unEquip(O) + O.forceMove(src) + holdingitems += O + updateUsrDialog() + return 0 + +/obj/machinery/reagentgrinder/attack_ai(mob/user) + return 0 + +/obj/machinery/reagentgrinder/attack_hand(mob/user) + user.set_machine(src) + interact(user) + +/obj/machinery/reagentgrinder/interact(mob/user) // The microwave Menu + var/is_chamber_empty = 0 + var/is_beaker_ready = 0 + var/processing_chamber = "" + var/beaker_contents = "" + var/dat = "" + + if(!inuse) + for(var/obj/item/O in holdingitems) + processing_chamber += "\A [O.name]
" + + if(!processing_chamber) + is_chamber_empty = 1 + processing_chamber = "Nothing." + if(!beaker) + beaker_contents = "No beaker attached.
" + else + is_beaker_ready = 1 + beaker_contents = "The beaker contains:
" + var/anything = 0 + for(var/datum/reagent/R in beaker.reagents.reagent_list) + anything = 1 + beaker_contents += "[R.volume] - [R.name]
" + if(!anything) + beaker_contents += "Nothing
" + + + dat = {" + Processing chamber contains:
+ [processing_chamber]
+ [beaker_contents]
+ "} + if(is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN))) + dat += "Grind the reagents
" + dat += "Juice the reagents

" + if(holdingitems && holdingitems.len > 0) + dat += "Eject the reagents
" + if(beaker) + dat += "Detach the beaker
" + else + dat += "Please wait..." + user << browse("All-In-One Grinder[dat]", "window=reagentgrinder") + onclose(user, "reagentgrinder") + return + +/obj/machinery/reagentgrinder/Topic(href, href_list) + if(..()) + return + usr.set_machine(src) + switch(href_list["action"]) + if("grind") + grind() + if("juice") + juice() + if("eject") + eject() + if("detach") + detach() + updateUsrDialog() + return + +/obj/machinery/reagentgrinder/proc/detach() + + if(usr.stat != 0) + return + if(!beaker) + return + beaker.forceMove(loc) + beaker = null + update_icon() + +/obj/machinery/reagentgrinder/proc/eject() + + if(usr.stat != 0) + return + if(holdingitems && holdingitems.len == 0) + return + + for(var/obj/item/O in holdingitems) + O.forceMove(loc) + holdingitems -= O + holdingitems = list() + +/obj/machinery/reagentgrinder/proc/is_allowed(obj/item/weapon/reagent_containers/O) + for(var/i in blend_items) + if(istype(O, i)) + return 1 + return 0 + +/obj/machinery/reagentgrinder/proc/get_allowed_by_id(obj/item/weapon/grown/O) + for(var/i in blend_items) + if(istype(O, i)) + return blend_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_id(obj/item/weapon/reagent_containers/food/snacks/O) + for(var/i in blend_items) + if(istype(O, i)) + return blend_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_id(obj/item/weapon/reagent_containers/food/snacks/O) + for(var/i in juice_items) + if(istype(O, i)) + return juice_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) + for(var/i in blend_tags) + if(O.seed.kitchen_tag == i) + return blend_tags[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) + for(var/i in juice_tags) + if(O.seed.kitchen_tag == i) + return juice_tags[i] + +/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(obj/item/weapon/grown/O) + if(!istype(O)) + return 5 + else if(O.potency == -1) + return 5 + else + return round(O.potency) + +/obj/machinery/reagentgrinder/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O) + if(!istype(O)) + return 5 + else if(O.potency == -1) + return 5 + else + return round(5*sqrt(O.potency)) + +/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O) + holdingitems -= O + qdel(O) + +/obj/machinery/reagentgrinder/proc/juice() + power_change() + if(stat & (NOPOWER|BROKEN)) + return + if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) + return + playsound(loc, 'sound/machines/juicer.ogg', 20, 1) + var/offset = prob(50) ? -2 : 2 + animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking + inuse = 1 + spawn(50) + pixel_x = initial(pixel_x) //return to its spot after shaking + inuse = 0 + interact(usr) + //Snacks + for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + var/allowed = null + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + allowed = get_allowed_juice_by_tag(O) + else + allowed = get_allowed_juice_by_id(O) + if(isnull(allowed)) + break + + for(var/r_id in allowed) + + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = get_juice_amount(O) + + beaker.reagents.add_reagent(r_id, min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + remove_object(O) + +/obj/machinery/reagentgrinder/proc/grind() + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) + return + playsound(loc, 'sound/machines/blender.ogg', 50, 1) + var/offset = prob(50) ? -2 : 2 + animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking + inuse = 1 + spawn(60) + pixel_x = initial(pixel_x) //return to its spot after shaking + inuse = 0 + interact(usr) + //Snacks and Plants + for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + var/allowed = null + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + allowed = get_allowed_snack_by_tag(O) + else + allowed = get_allowed_snack_by_id(O) + if(isnull(allowed)) + break + + for(var/r_id in allowed) + + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + if(amount <= 0) //Negative amounts are multipliers for the reagent amount (Example: "amount = -5" means "reagent_amount * 5") + if(amount == 0) + if(O.reagents != null && O.reagents.has_reagent("nutriment")) + beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space)) + O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) + if(O.reagents != null && O.reagents.has_reagent("plantmatter")) + beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("plantmatter"), space)) + O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) + else + if(O.reagents != null && O.reagents.has_reagent("nutriment")) + beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) + O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) + if(O.reagents != null && O.reagents.has_reagent("plantmatter")) + beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("plantmatter")*abs(amount)), space)) + O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) + + else + O.reagents.trans_id_to(beaker, r_id, min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + if(O.reagents.reagent_list.len == 0) + remove_object(O) + + //Sheets + for(var/obj/item/stack/sheet/O in holdingitems) + var/allowed = get_allowed_by_id(O) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + for(var/i = 1; i <= round(O.amount, 1); i++) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + beaker.reagents.add_reagent(r_id,min(amount, space)) + if(space < amount) + break + if(i == round(O.amount, 1)) + remove_object(O) + break + //Plants + for(var/obj/item/weapon/grown/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/allowed = get_allowed_by_id(O) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + if(amount == 0) + if(O.reagents != null && O.reagents.has_reagent(r_id)) + beaker.reagents.add_reagent(r_id,min(O.reagents.get_reagent_amount(r_id), space)) + else + beaker.reagents.add_reagent(r_id,min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + remove_object(O) + + //xenoarch + /*for(var/obj/item/weapon/rocksliver/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/allowed = get_allowed_by_id(O) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + remove_object(O)*/ + + //Everything else - Transfers reagents from it into beaker + for(var/obj/item/weapon/reagent_containers/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/amount = O.reagents.total_volume + O.reagents.trans_to(beaker, amount) + if(!O.reagents.total_volume) + remove_object(O) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/chemistry/readme.dm similarity index 97% rename from code/modules/reagents/Chemistry-Readme.dm rename to code/modules/reagents/chemistry/readme.dm index cae0c31162c..1fe946a10d1 100644 --- a/code/modules/reagents/Chemistry-Readme.dm +++ b/code/modules/reagents/chemistry/readme.dm @@ -1,249 +1,249 @@ -/* -NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README. - -Structure: /////////////////// ////////////////////////// - // Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents. - /////////////////// ////////////////////////// - | | - The object that holds everything. V - reagent_list var (list) A List of datums, each datum is a reagent. - - | | | - V V V - - reagents (datums) Reagents. I.e. Water , antitoxins or mercury. - - -Random important notes: - - An objects on_reagent_change will be called every time the objects reagents change. - Useful if you want to update the objects icon etc. - -About the Holder: - - The holder (reagents datum) is the datum that holds a list of all reagents - currently in the object.It also has all the procs needed to manipulate reagents - - remove_any(amount) - This proc removes reagents from the holder until the passed amount - is matched. It'll try to remove some of ALL reagents contained. - - trans_to(obj/target, amount) - This proc equally transfers the contents of the holder to another - objects holder. You need to pass it the object (not the holder) you want - to transfer to and the amount you want to transfer. Its return value is the - actual amount transfered (if one of the objects is full/empty) - - trans_id_to(obj/target, reagent, amount) - Same as above but only for a specific reagent in the reagent list. - If the specified amount is greater than what is available, it will use - the amount of the reagent that is available. If no reagent exists, returns null. - - metabolize(mob/living/M) - This proc is called by the mobs life proc. It simply calls on_mob_life for - all contained reagents. You shouldnt have to use this one directly. - - handle_reactions() - This proc check all recipes and, on a match, uses them. - It will also call the recipe's on_reaction proc (for explosions or w/e). - Currently, this proc is automatically called by trans_to. - - Modified from the original to preserve reagent data across reactions (originally for xenoarchaeology) - - isolate_reagent(reagent) - Pass it a reagent id and it will remove all reagents but that one. - It's that simple. - - del_reagent(reagent) - Completely remove the reagent with the matching id. - - update_total() - This one simply updates the total volume of the holder. - (the volume of all reagents added together) - - clear_reagents() - This proc removes ALL reagents from the holder. - - reaction(atom/A, method=TOUCH, volume_modifier=0) - This proc calls the appropriate reaction procs of the reagents. - I.e. if A is an object, it will call the reagents reaction_obj - proc. The method var is used for reaction on mobs. It simply tells - us if the mob TOUCHed the reagent or if it INGESTed the reagent. - Since the volume can be checked in a reagents proc, you might want to - use the volume_modifier var to modifiy the passed value without actually - changing the volume of the reagents. - If you're not sure if you need to use this the answer is very most likely 'No'. - You'll want to use this proc whenever an atom first comes in - contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.) - More on the reaction in the reagent part of this readme. - - add_reagent(reagent, amount, data) - Attempts to add X of the matching reagent to the holder. - You wont use this much. Mostly in new procs for pre-filled - objects. - - remove_reagent(reagent, amount) - The exact opposite of the add_reagent proc. - - Modified from original to return the reagent's data, in order to preserve reagent data across reactions (originally for xenoarchaeology) - - has_reagent(reagent, amount) - Returns 1 if the holder contains this reagent. - Or 0 if not. - If you pass it an amount it will additionally check - if the amount is matched. This is optional. - - get_reagent_amount(reagent) - Returns the amount of the matching reagent inside the - holder. Returns 0 if the reagent is missing. - - overdose_list() - Returns a list of all the chemical IDs in the reagent holder that are overdosing - - Important variables: - - total_volume - This variable contains the total volume of all reagents in this holder. - - reagent_list - This is a list of all contained reagents. More specifically, references - to the reagent datums. - - maximum_volume - This is the maximum volume of the holder. - - my_atom - This is the atom the holder is 'in'. Useful if you need to find the location. - (i.e. for explosions) - - -About Reagents: - - Reagents are all the things you can mix and fille in bottles etc. This can be anything from - rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below. - - reaction_mob(mob/living/M, method=TOUCH) - This is called by the holder's reation proc. - This version is only called when the reagent - reacts with a mob. The method var can be either - TOUCH or INGEST. You'll want to put stuff like - acid-facemelting in here. Should only ever be - called, directly, on living mobs. - - reaction_obj(obj/O) - This is called by the holder's reation proc. - This version is called when the reagents reacts - with an object. You'll want to put stuff like - object melting in here ... or something. i dunno. - - reaction_turf(turf/T) - This is called by the holder's reation proc. - This version is called when the reagents reacts - with a turf. You'll want to put stuff like extra - slippery floors for lube or something in here. - - on_mob_life(mob/living/M) - This proc is called everytime the mobs life proc executes. - This is the place where you put damage for toxins , - drowsyness for sleep toxins etc etc. - You'll want to call the parents proc by using ..() . - If you dont, the chemical will stay in the mob forever - - unless you write your own piece of code to slowly remove it. - (Should be pretty easy, 1 line of code) - - Important variables: - - holder - This variable contains a reference to the holder the chemical is 'in' - - volume - This is the volume of the reagent. - - id - The id of the reagent - - name - The name of the reagent. - - data - This var can be used for whatever the fuck you want.You could use this - for DNA in a blood reagent or ... well whatever you want. - - color - This is a hexadecimal color that represents the reagent outside of containers, - you define it as "#RRGGBB", or, red green blue. You can also define it using the - rgb() proc, which returns a hexadecimal value too. The color is black by default. - - A good website for color calculations: http://www.psyclops.com/tools/rgb/ - - - - -About Recipes: - - Recipes are simple datums that contain a list of required reagents and a result. - They also have a proc that is called when the recipe is matched. - - on_reaction(datum/reagents/holder, created_volume) - This proc is called when the recipe is matched. - You'll want to add explosions etc here. - To find the location you'll have to do something - like get_turf(holder.my_atom) - - name & id - Should be pretty obvious. - - result - This var contains the id of the resulting reagent. - - required_reagents - This is a list of ids of the required reagents. - Each id also needs an associated value that gives us the minimum required amount - of that reagent. The handle_reaction proc can detect mutiples of the same recipes - so for most cases you want to set the required amount to 1. - - required_catalysts (Added May 2011) - This is a list of the ids of the required catalysts. - Functionally similar to required_reagents, it is a list of reagents that are required - for the reaction. However, unlike required_reagents, catalysts are NOT consumed. - They mearly have to be present in the container. - - result_amount - This is the amount of the resulting reagent this recipe will produce. - I recommend you set this to the total volume of all required reagent. - - required_container - The container the recipe has to take place in in order to happen. Leave this blank/null - if you want the reaction to happen anywhere. - - required_other - Basically like a reagent's data variable. You can set extra requirements for a - reaction with this. - - -About the Tools: - - By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. - system you'll need to add something like this in its new proc: - - var/datum/reagents/R = new/datum/reagents(100), <<< create a new datum, 100 is the maximum_volume of the new holder datum. - reagents = R, <<< assign the new datum to the objects reagents var - R.my_atom = src, <<< set the holders my_atom to src so that we know where we are. - - This can also be done by calling a convenience proc: - atom/proc/create_reagents(max_volume) - - Other important stuff: - - amount_per_transfer_from_this var - This var is mostly used by beakers and bottles. - It simply tells us how much to transfer when - 'pouring' our reagents into something else. - - atom/proc/is_open_container() - Checks atom/var/flags & OPENCONTAINER. - If this returns 1 , you can use syringes, beakers etc - to manipulate the contents of this object. - If it's 0, you'll need to write your own custom reagent - transfer code since you will not be able to use the standard - tools to manipulate it. - +/* +NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README. + +Structure: /////////////////// ////////////////////////// + // Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents. + /////////////////// ////////////////////////// + | | + The object that holds everything. V + reagent_list var (list) A List of datums, each datum is a reagent. + + | | | + V V V + + reagents (datums) Reagents. I.e. Water , antitoxins or mercury. + + +Random important notes: + + An objects on_reagent_change will be called every time the objects reagents change. + Useful if you want to update the objects icon etc. + +About the Holder: + + The holder (reagents datum) is the datum that holds a list of all reagents + currently in the object.It also has all the procs needed to manipulate reagents + + remove_any(amount) + This proc removes reagents from the holder until the passed amount + is matched. It'll try to remove some of ALL reagents contained. + + trans_to(obj/target, amount) + This proc equally transfers the contents of the holder to another + objects holder. You need to pass it the object (not the holder) you want + to transfer to and the amount you want to transfer. Its return value is the + actual amount transfered (if one of the objects is full/empty) + + trans_id_to(obj/target, reagent, amount) + Same as above but only for a specific reagent in the reagent list. + If the specified amount is greater than what is available, it will use + the amount of the reagent that is available. If no reagent exists, returns null. + + metabolize(mob/living/M) + This proc is called by the mobs life proc. It simply calls on_mob_life for + all contained reagents. You shouldnt have to use this one directly. + + handle_reactions() + This proc check all recipes and, on a match, uses them. + It will also call the recipe's on_reaction proc (for explosions or w/e). + Currently, this proc is automatically called by trans_to. + - Modified from the original to preserve reagent data across reactions (originally for xenoarchaeology) + + isolate_reagent(reagent) + Pass it a reagent id and it will remove all reagents but that one. + It's that simple. + + del_reagent(reagent) + Completely remove the reagent with the matching id. + + update_total() + This one simply updates the total volume of the holder. + (the volume of all reagents added together) + + clear_reagents() + This proc removes ALL reagents from the holder. + + reaction(atom/A, method=TOUCH, volume_modifier=0) + This proc calls the appropriate reaction procs of the reagents. + I.e. if A is an object, it will call the reagents reaction_obj + proc. The method var is used for reaction on mobs. It simply tells + us if the mob TOUCHed the reagent or if it INGESTed the reagent. + Since the volume can be checked in a reagents proc, you might want to + use the volume_modifier var to modifiy the passed value without actually + changing the volume of the reagents. + If you're not sure if you need to use this the answer is very most likely 'No'. + You'll want to use this proc whenever an atom first comes in + contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.) + More on the reaction in the reagent part of this readme. + + add_reagent(reagent, amount, data) + Attempts to add X of the matching reagent to the holder. + You wont use this much. Mostly in new procs for pre-filled + objects. + + remove_reagent(reagent, amount) + The exact opposite of the add_reagent proc. + - Modified from original to return the reagent's data, in order to preserve reagent data across reactions (originally for xenoarchaeology) + + has_reagent(reagent, amount) + Returns 1 if the holder contains this reagent. + Or 0 if not. + If you pass it an amount it will additionally check + if the amount is matched. This is optional. + + get_reagent_amount(reagent) + Returns the amount of the matching reagent inside the + holder. Returns 0 if the reagent is missing. + + overdose_list() + Returns a list of all the chemical IDs in the reagent holder that are overdosing + + Important variables: + + total_volume + This variable contains the total volume of all reagents in this holder. + + reagent_list + This is a list of all contained reagents. More specifically, references + to the reagent datums. + + maximum_volume + This is the maximum volume of the holder. + + my_atom + This is the atom the holder is 'in'. Useful if you need to find the location. + (i.e. for explosions) + + +About Reagents: + + Reagents are all the things you can mix and fille in bottles etc. This can be anything from + rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below. + + reaction_mob(mob/living/M, method=TOUCH) + This is called by the holder's reation proc. + This version is only called when the reagent + reacts with a mob. The method var can be either + TOUCH or INGEST. You'll want to put stuff like + acid-facemelting in here. Should only ever be + called, directly, on living mobs. + + reaction_obj(obj/O) + This is called by the holder's reation proc. + This version is called when the reagents reacts + with an object. You'll want to put stuff like + object melting in here ... or something. i dunno. + + reaction_turf(turf/T) + This is called by the holder's reation proc. + This version is called when the reagents reacts + with a turf. You'll want to put stuff like extra + slippery floors for lube or something in here. + + on_mob_life(mob/living/M) + This proc is called everytime the mobs life proc executes. + This is the place where you put damage for toxins , + drowsyness for sleep toxins etc etc. + You'll want to call the parents proc by using ..() . + If you dont, the chemical will stay in the mob forever - + unless you write your own piece of code to slowly remove it. + (Should be pretty easy, 1 line of code) + + Important variables: + + holder + This variable contains a reference to the holder the chemical is 'in' + + volume + This is the volume of the reagent. + + id + The id of the reagent + + name + The name of the reagent. + + data + This var can be used for whatever the fuck you want.You could use this + for DNA in a blood reagent or ... well whatever you want. + + color + This is a hexadecimal color that represents the reagent outside of containers, + you define it as "#RRGGBB", or, red green blue. You can also define it using the + rgb() proc, which returns a hexadecimal value too. The color is black by default. + + A good website for color calculations: http://www.psyclops.com/tools/rgb/ + + + + +About Recipes: + + Recipes are simple datums that contain a list of required reagents and a result. + They also have a proc that is called when the recipe is matched. + + on_reaction(datum/reagents/holder, created_volume) + This proc is called when the recipe is matched. + You'll want to add explosions etc here. + To find the location you'll have to do something + like get_turf(holder.my_atom) + + name & id + Should be pretty obvious. + + result + This var contains the id of the resulting reagent. + + required_reagents + This is a list of ids of the required reagents. + Each id also needs an associated value that gives us the minimum required amount + of that reagent. The handle_reaction proc can detect mutiples of the same recipes + so for most cases you want to set the required amount to 1. + + required_catalysts (Added May 2011) + This is a list of the ids of the required catalysts. + Functionally similar to required_reagents, it is a list of reagents that are required + for the reaction. However, unlike required_reagents, catalysts are NOT consumed. + They mearly have to be present in the container. + + result_amount + This is the amount of the resulting reagent this recipe will produce. + I recommend you set this to the total volume of all required reagent. + + required_container + The container the recipe has to take place in in order to happen. Leave this blank/null + if you want the reaction to happen anywhere. + + required_other + Basically like a reagent's data variable. You can set extra requirements for a + reaction with this. + + +About the Tools: + + By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. + system you'll need to add something like this in its new proc: + + var/datum/reagents/R = new/datum/reagents(100), <<< create a new datum, 100 is the maximum_volume of the new holder datum. + reagents = R, <<< assign the new datum to the objects reagents var + R.my_atom = src, <<< set the holders my_atom to src so that we know where we are. + + This can also be done by calling a convenience proc: + atom/proc/create_reagents(max_volume) + + Other important stuff: + + amount_per_transfer_from_this var + This var is mostly used by beakers and bottles. + It simply tells us how much to transfer when + 'pouring' our reagents into something else. + + atom/proc/is_open_container() + Checks atom/var/flags & OPENCONTAINER. + If this returns 1 , you can use syringes, beakers etc + to manipulate the contents of this object. + If it's 0, you'll need to write your own custom reagent + transfer code since you will not be able to use the standard + tools to manipulate it. + */ \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/_reagent_base.dm b/code/modules/reagents/chemistry/reagents.dm similarity index 53% rename from code/modules/reagents/oldchem/reagents/_reagent_base.dm rename to code/modules/reagents/chemistry/reagents.dm index fbf1398decb..367c747c4e0 100644 --- a/code/modules/reagents/oldchem/reagents/_reagent_base.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -1,3 +1,7 @@ +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 + /datum/reagent var/name = "Reagent" var/id = "reagent" @@ -6,7 +10,6 @@ var/reagent_state = SOLID var/list/data = null var/volume = 0 - var/nutriment_factor = 0 var/metabolization_rate = REAGENTS_METABOLISM //var/list/viruses = list() var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) @@ -20,6 +23,20 @@ //By default, all reagents will ONLY affect organics, not synthetics. Re-define in the reagent's definition if the reagent is meant to affect synths var/process_flags = ORGANIC var/admin_only = 0 + var/can_synth = 1 //whether or not a mech syringe gun and synthesize this reagent + var/overdose_threshold = 0 + var/addiction_chance = 0 + var/addiction_stage = 1 + var/last_addiction_dose = 0 + var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. + var/current_cycle = 1 + var/drink_icon = "glass_brown" // what icon state/name/description a drinking glass will use if this is the master reagent. + var/drink_name = "Glass of ..what?" + var/drink_desc = "You can't really tell what this is." + +/datum/reagent/Destroy() + . = ..() + holder = null /datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not. if(holder) //for catching rare runtimes @@ -61,20 +78,78 @@ /datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect return -// Called when two reagents of the same are mixing. -/datum/reagent/proc/on_merge(data) +// Called when this reagent is removed while inside a mob +/datum/reagent/proc/on_mob_delete(mob/living/M) return /datum/reagent/proc/on_move(mob/M) return -/datum/reagent/proc/on_update(atom/A) - return - // Called after add_reagents creates a new reagent. /datum/reagent/proc/on_new(data) return -/datum/reagent/Destroy() - . = ..() - holder = null \ No newline at end of file +// Called when two reagents of the same are mixing. +/datum/reagent/proc/on_merge(data) + return + +/datum/reagent/proc/on_update(atom/A) + return + +// Called every time reagent containers process. +/datum/reagent/proc/on_tick(data) + return + +// Called when the reagent container is hit by an explosion +/datum/reagent/proc/on_ex_act(severity) + return + +// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects +/datum/reagent/proc/overdose_process(mob/living/M, severity) + var/effect = rand(1, 100) - severity + if(effect <= 8) + M.adjustToxLoss(severity) + return effect + +/datum/reagent/proc/overdose_start(mob/living/M) + return + +/datum/reagent/proc/addiction_act_stage1(mob/living/M) + return + +/datum/reagent/proc/addiction_act_stage2(mob/living/M) + if(prob(8)) + M.emote("shiver") + if(prob(8)) + M.emote("sneeze") + if(prob(4)) + to_chat(M, "You feel a dull headache.") + +/datum/reagent/proc/addiction_act_stage3(mob/living/M) + if(prob(8)) + M.emote("twitch_s") + if(prob(8)) + M.emote("shiver") + if(prob(4)) + to_chat(M, "You begin craving [name]!") + +/datum/reagent/proc/addiction_act_stage4(mob/living/M) + if(prob(8)) + M.emote("twitch") + if(prob(4)) + to_chat(M, "You have the strong urge for some [name]!") + if(prob(4)) + to_chat(M, "You REALLY crave some [name]!") + +/datum/reagent/proc/addiction_act_stage5(mob/living/M) + if(prob(8)) + M.emote("twitch") + if(prob(6)) + to_chat(M, "Your stomach lurches painfully!") + M.visible_message("[M] gags and retches!") + M.Stun(rand(2,4)) + M.Weaken(rand(2,4)) + if(prob(5)) + to_chat(M, "You feel like you can't live without [name]!") + if(prob(5)) + to_chat(M, "You would DIE for some [name] right now!") \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/admin.dm b/code/modules/reagents/chemistry/reagents/admin.dm new file mode 100644 index 00000000000..a915ef8cd57 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/admin.dm @@ -0,0 +1,61 @@ +/datum/reagent/medicine/adminordrazine //An OP chemical for admins + name = "Adminordrazine" + id = "adminordrazine" + description = "It's magic. We don't have to explain it." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + process_flags = ORGANIC | SYNTHETIC //Adminbuse knows no bounds! + admin_only = 1 + can_synth = 0 + +/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M) + M.setCloneLoss(0) + M.setOxyLoss(0) + M.radiation = 0 + M.adjustBruteLoss(-5) + M.adjustFireLoss(-5) + M.adjustToxLoss(-5) + M.setBrainLoss(0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + for(var/name in H.internal_organs) + var/obj/item/organ/internal/I = H.get_int_organ(name) + I.damage = max(0, I.damage-5) + for(var/obj/item/organ/external/E in H.organs) + if(E.mend_fracture()) + E.perma_injury = 0 + M.SetEyeBlind(0) + M.CureNearsighted() + M.CureBlind() + M.CureMute() + M.CureDeaf() + M.CureEpilepsy() + M.CureTourettes() + M.CureCoughing() + M.CureNervous() + M.SetEyeBlurry(0) + M.SetWeakened(0) + M.SetStunned(0) + M.SetParalysis(0) + M.SetSilence(0) + M.SetHallucinate(0) + M.SetDizzy(0) + M.SetDrowsy(0) + M.SetStuttering(0) + M.SetSlur(0) + M.SetConfused(0) + M.SetSleeping(0) + M.SetJitter(0) + for(var/datum/disease/D in M.viruses) + if(D.severity == NONTHREAT) + continue + D.spread_text = "Remissive" + D.stage-- + if(D.stage < 1) + D.cure() + ..() + +/datum/reagent/medicine/adminordrazine/nanites + name = "Nanites" + id = "nanites" + description = "Nanomachines that aid in rapid cellular regeneration." \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm new file mode 100644 index 00000000000..536385d7614 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -0,0 +1,1116 @@ +//ALCOHOL WOO +/datum/reagent/consumable/ethanol + name = "Ethanol" //Parent class for all alcoholic reagents. + id = "ethanol" + description = "A well-known alcohol with a variety of applications." + reagent_state = LIQUID + nutriment_factor = 0 //So alcohol can fill you up! If they want to. + color = "#404030" // rgb: 64, 64, 48 + can_grow_in_plants = 0 //Alcoholic drinks won't be grown in plants (would "water down" random seed chems too much) + var/dizzy_adj = 3 + var/alcohol_perc = 1 //percentage of ethanol in a beverage 0.0 - 1.0 + +/datum/reagent/consumable/ethanol/on_mob_life(mob/living/M) + M.AdjustDrunk(alcohol_perc) + M.AdjustDizzy(dizzy_adj) + ..() + +/datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume) + if(istype(O,/obj/item/weapon/paper)) + var/obj/item/weapon/paper/paperaffected = O + paperaffected.clearpaper() + to_chat(usr, "The solution melts away the ink on the paper.") + if(istype(O,/obj/item/weapon/book)) + if(volume >= 5) + var/obj/item/weapon/book/affectedbook = O + affectedbook.dat = null + to_chat(usr, "The solution melts away the ink on the book.") + else + to_chat(usr, "It wasn't enough...") + +/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. + if(method == TOUCH) + M.adjust_fire_stacks(volume / 15) + + +/datum/reagent/consumable/ethanol/beer + name = "Beer" + id = "beer" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon ="beerglass" + drink_name = "Beer glass" + drink_desc = "A freezing pint of beer" + +/datum/reagent/consumable/ethanol/cider + name = "Cider" + id = "cider" + description = "An alcoholic beverage derived from apples." + color = "#174116" + alcohol_perc = 0.2 + drink_icon = "rewriter" + drink_name = "Cider" + drink_desc = "a refreshing glass of traditional cider" + +/datum/reagent/consumable/ethanol/whiskey + name = "Whiskey" + id = "whiskey" + description = "A superb and well-aged single-malt whiskey. Damn." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "whiskeyglass" + drink_name = "Glass of whiskey" + drink_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." + +/datum/reagent/consumable/ethanol/specialwhiskey + name = "Special Blend Whiskey" + id = "specialwhiskey" + description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + +/datum/reagent/consumable/ethanol/gin + name = "Gin" + id = "gin" + description = "It's gin. In space. I say, good sir." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 3 + alcohol_perc = 0.5 + drink_icon = "ginvodkaglass" + drink_name = "Glass of gin" + drink_desc = "A crystal clear glass of Griffeater gin." + +/datum/reagent/consumable/ethanol/absinthe + name = "Absinthe" + id = "absinthe" + description = "Watch out that the Green Fairy doesn't come for you!" + color = "#33EE00" // rgb: lots, ??, ?? + overdose_threshold = 30 + dizzy_adj = 5 + alcohol_perc = 0.7 + drink_icon = "absinthebottle" + drink_name = "Glass of Absinthe" + drink_desc = "The green fairy is going to get you now!" + +//copy paste from LSD... shoot me +/datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/M) + M.AdjustHallucinate(5) + ..() + +/datum/reagent/consumable/ethanol/absinthe/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + +/datum/reagent/consumable/ethanol/rum + name = "Rum" + id = "rum" + description = "Popular with the sailors. Not very popular with everyone else." + color = "#664300" // rgb: 102, 67, 0 + overdose_threshold = 30 + alcohol_perc = 0.4 + dizzy_adj = 5 + drink_icon = "rumglass" + drink_name = "Glass of Rum" + drink_desc = "Now you want to Pray for a pirate suit, don't you?" + +/datum/reagent/consumable/ethanol/rum/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + +/datum/reagent/consumable/ethanol/mojito + name = "Mojito" + id = "mojito" + description = "If it's good enough for Spesscuba, it's good enough for you." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "mojito" + drink_name = "Glass of Mojito" + drink_desc = "Fresh from Spesscuba." + +/datum/reagent/consumable/ethanol/vodka + name = "Vodka" + id = "vodka" + description = "Number one drink AND fueling choice for Russians worldwide." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "ginvodkaglass" + drink_name = "Glass of vodka" + drink_desc = "The glass contain wodka. Xynta." + +/datum/reagent/consumable/ethanol/sake + name = "Sake" + id = "sake" + description = "Anime's favorite drink." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "ginvodkaglass" + drink_name = "Glass of Sake" + drink_desc = "A glass of Sake." + +/datum/reagent/consumable/ethanol/tequila + name = "Tequila" + id = "tequila" + description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" + color = "#A8B0B7" // rgb: 168, 176, 183 + alcohol_perc = 0.4 + drink_icon = "tequilaglass" + drink_name = "Glass of Tequila" + drink_desc = "Now all that's missing is the weird colored shades!" + +/datum/reagent/consumable/ethanol/vermouth + name = "Vermouth" + id = "vermouth" + description = "You suddenly feel a craving for a martini..." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "vermouthglass" + drink_name = "Glass of Vermouth" + drink_desc = "You wonder why you're even drinking this straight." + +/datum/reagent/consumable/ethanol/wine + name = "Wine" + id = "wine" + description = "An premium alchoholic beverage made from distilled grape juice." + color = "#7E4043" // rgb: 126, 64, 67 + dizzy_adj = 2 + alcohol_perc = 0.2 + drink_icon = "wineglass" + drink_name = "Glass of wine" + drink_desc = "A very classy looking drink." + +/datum/reagent/consumable/ethanol/cognac + name = "Cognac" + id = "cognac" + description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "cognacglass" + drink_name = "Glass of cognac" + drink_desc = "Damn, you feel like some kind of French aristocrat just by holding this." + +/datum/reagent/consumable/ethanol/suicider //otherwise known as "I want to get so smashed my liver gives out and I die from alcohol poisoning". + name = "Suicider" + id = "suicider" + description = "An unbelievably strong and potent variety of Cider." + color = "#CF3811" + dizzy_adj = 20 + alcohol_perc = 1 //because that's a thing it's supposed to do, I guess + drink_icon = "suicider" + drink_name = "Suicider" + drink_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/consumable/ethanol/ale + name = "Ale" + id = "ale" + description = "A dark alchoholic beverage made by malted barley and yeast." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.1 + drink_icon = "aleglass" + drink_name = "Ale glass" + drink_desc = "A freezing pint of delicious Ale" + +/datum/reagent/consumable/ethanol/thirteenloko + name = "Thirteen Loko" + id = "thirteenloko" + description = "A potent mixture of caffeine and alcohol." + reagent_state = LIQUID + color = "#102000" // rgb: 16, 32, 0 + alcohol_perc = 0.3 + heart_rate_increase = 1 + drink_icon = "thirteen_loko_glass" + drink_name = "Glass of Thirteen Loko" + drink_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass" + +/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/M) + M.AdjustDrowsy(-7) + M.AdjustSleeping(-2) + if(M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.Jitter(5) + ..() + + +/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// + +/datum/reagent/consumable/ethanol/bilk + name = "Bilk" + id = "bilk" + description = "This appears to be beer mixed with milk. Disgusting." + reagent_state = LIQUID + color = "#895C4C" // rgb: 137, 92, 76 + alcohol_perc = 0.2 + drink_icon = "glass_brown" + drink_name = "Glass of bilk" + drink_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." + +/datum/reagent/consumable/ethanol/atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + description = "Nuclear proliferation never tasted so good." + reagent_state = LIQUID + color = "#666300" // rgb: 102, 99, 0 + alcohol_perc = 0.2 + drink_icon = "atomicbombglass" + drink_name = "Atomic Bomb" + drink_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." + +/datum/reagent/consumable/ethanol/threemileisland + name = "THree Mile Island Iced Tea" + id = "threemileisland" + description = "Made for a woman, strong enough for a man." + reagent_state = LIQUID + color = "#666340" // rgb: 102, 99, 64 + alcohol_perc = 0.2 + drink_icon = "threemileislandglass" + drink_name = "Three Mile Island Ice Tea" + drink_desc = "A glass of this is sure to prevent a meltdown." + +/datum/reagent/consumable/ethanol/goldschlager + name = "Goldschlager" + id = "goldschlager" + description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "ginvodkaglass" + drink_name = "Glass of goldschlager" + drink_desc = "100 proof that teen girls will drink anything with gold in it." + +/datum/reagent/consumable/ethanol/patron + name = "Patron" + id = "patron" + description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." + reagent_state = LIQUID + color = "#585840" // rgb: 88, 88, 64 + alcohol_perc = 0.4 + drink_icon = "patronglass" + drink_name = "Glass of Patron" + drink_desc = "Drinking patron in the bar, with all the subpar ladies." + +/datum/reagent/consumable/ethanol/gintonic + name = "Gin and Tonic" + id = "gintonic" + description = "An all time classic, mild cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "gintonicglass" + drink_name = "Gin and Tonic" + drink_desc = "A mild but still great cocktail. Drink up, like a true Englishman." + +/datum/reagent/consumable/ethanol/cuba_libre + name = "Cuba Libre" + id = "cubalibre" + description = "Rum, mixed with cola. Viva la revolution." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + alcohol_perc = 0.2 + drink_icon = "cubalibreglass" + drink_name = "Cuba Libre" + drink_desc = "A classic mix of rum and cola." + +/datum/reagent/consumable/ethanol/whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + description = "Whiskey, mixed with cola. Surprisingly refreshing." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + alcohol_perc = 0.3 + drink_icon = "whiskeycolaglass" + drink_name = "Whiskey Cola" + drink_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." + +/datum/reagent/consumable/ethanol/martini + name = "Classic Martini" + id = "martini" + description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "martiniglass" + drink_name = "Classic Martini" + drink_desc = "Damn, the bartender even stirred it, not shook it." + +/datum/reagent/consumable/ethanol/vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "martiniglass" + drink_name = "Vodka martini" + drink_desc ="A bastardisation of the classic martini. Still great." + +/datum/reagent/consumable/ethanol/white_russian + name = "White Russian" + id = "whiterussian" + description = "That's just, like, your opinion, man..." + reagent_state = LIQUID + color = "#A68340" // rgb: 166, 131, 64 + alcohol_perc = 0.3 + drink_icon = "whiterussianglass" + drink_name = "White Russian" + drink_desc = "A very nice looking drink. But that's just, like, your opinion, man." + +/datum/reagent/consumable/ethanol/screwdrivercocktail + name = "Screwdriver" + id = "screwdrivercocktail" + description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.3 + drink_icon = "screwdriverglass" + drink_name = "Screwdriver" + drink_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." + +/datum/reagent/consumable/ethanol/booger + name = "Booger" + id = "booger" + description = "Ewww..." + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.2 + drink_icon = "booger" + drink_name = "Booger" + drink_desc = "Ewww..." + +/datum/reagent/consumable/ethanol/bloody_mary + name = "Bloody Mary" + id = "bloodymary" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "bloodymaryglass" + drink_name = "Bloody Mary" + drink_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." + +/datum/reagent/consumable/ethanol/gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + description = "Whoah, this stuff looks volatile!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.7 //ouch + drink_icon = "gargleblasterglass" + drink_name = "Pan-Galactic Gargle Blaster" + drink_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." + +/datum/reagent/consumable/ethanol/brave_bull + name = "Brave Bull" + id = "bravebull" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "bravebullglass" + drink_name = "Brave Bull" + drink_desc = "Tequila and Coffee liquor, brought together in a mouthwatering mixture. Drink up." + +/datum/reagent/consumable/ethanol/tequila_sunrise + name = "Tequila Sunrise" + id = "tequilasunrise" + description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "tequilasunriseglass" + drink_name = "Tequila Sunrise" + drink_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." + +/datum/reagent/consumable/ethanol/toxins_special + name = "Toxins Special" + id = "toxinsspecial" + description = "This thing is FLAMING!. CALL THE DAMN SHUTTLE!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "toxinsspecialglass" + drink_name = "Toxins Special" + drink_desc = "Whoah, this thing is on FIRE" + +/datum/reagent/consumable/ethanol/toxins_special/on_mob_life(mob/living/M) + if(M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/beepsky_smash + name = "Beepsky Smash" + id = "beepskysmash" + description = "Deny drinking this and prepare for THE LAW." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "beepskysmashglass" + drink_name = "Beepsky Smash" + drink_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + +/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/M) + M.Stun(1) + ..() + +/datum/reagent/consumable/ethanol/irish_cream + name = "Irish Cream" + id = "irishcream" + description = "Whiskey-imbued cream, what else would you expect from the Irish." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "irishcreamglass" + drink_name = "Irish Cream" + drink_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" + +/datum/reagent/consumable/ethanol/manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "manlydorfglass" + drink_name = "The Manly Dorf" + drink_desc = "A manly concotion made from Ale and Beer. Intended for true men only." + +/datum/reagent/consumable/ethanol/longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "longislandicedteaglass" + drink_name = "Long Island Iced Tea" + drink_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + +/datum/reagent/consumable/ethanol/moonshine + name = "Moonshine" + id = "moonshine" + description = "You've really hit rock bottom now... your liver packed its bags and left last night." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.8 //yeeehaw + drink_icon = "glass_clear" + drink_name = "Moonshine" + drink_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/consumable/ethanol/b52 + name = "B-52" + id = "b52" + description = "Coffee, Irish Cream, and congac. You will get bombed." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "b52glass" + drink_name = "B-52" + drink_desc = "Kahlua, Irish Cream, and congac. You will get bombed." + +/datum/reagent/consumable/ethanol/irishcoffee + name = "Irish Coffee" + id = "irishcoffee" + description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "irishcoffeeglass" + drink_name = "Irish Coffee" + drink_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." + +/datum/reagent/consumable/ethanol/margarita + name = "Margarita" + id = "margarita" + description = "On the rocks with salt on the rim. Arriba~!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "margaritaglass" + drink_name = "Margarita" + drink_desc = "On the rocks with salt on the rim. Arriba~!" + +/datum/reagent/consumable/ethanol/black_russian + name = "Black Russian" + id = "blackrussian" + description = "For the lactose-intolerant. Still as classy as a White Russian." + reagent_state = LIQUID + color = "#360000" // rgb: 54, 0, 0 + alcohol_perc = 0.4 + drink_icon = "blackrussianglass" + drink_name = "Black Russian" + drink_desc = "For the lactose-intolerant. Still as classy as a White Russian." + +/datum/reagent/consumable/ethanol/manhattan + name = "Manhattan" + id = "manhattan" + description = "The Detective's undercover drink of choice. He never could stomach gin..." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "manhattanglass" + drink_name = "Manhattan" + drink_desc = "The Detective's undercover drink of choice. He never could stomach gin..." + +/datum/reagent/consumable/ethanol/manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + description = "A scienitst's drink of choice, for pondering ways to blow up the station." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "proj_manhattanglass" + drink_name = "Manhattan Project" + drink_desc = "A scienitst drink of choice, for thinking how to blow up the station." + +/datum/reagent/consumable/ethanol/whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "whiskeysodaglass2" + drink_name = "Whiskey Soda" + drink_desc = "Ultimate refreshment." + +/datum/reagent/consumable/ethanol/antifreeze + name = "Anti-freeze" + id = "antifreeze" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "antifreeze" + drink_name = "Anti-freeze" + drink_desc = "The ultimate refreshment." + +/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/M) + if(M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/barefoot + name = "Barefoot" + id = "barefoot" + description = "Barefoot and pregnant" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "b&p" + drink_name = "Barefoot" + drink_desc = "Barefoot and pregnant" + +/datum/reagent/consumable/ethanol/snowwhite + name = "Snow White" + id = "snowwhite" + description = "A cold refreshment" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "snowwhite" + drink_name = "Snow White" + drink_desc = "A cold refreshment." + +/datum/reagent/consumable/ethanol/demonsblood + name = "Demons Blood" + id = "demonsblood" + description = "AHHHH!!!!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 10 + alcohol_perc = 0.4 + drink_icon = "demonsblood" + drink_name = "Demons Blood" + drink_desc = "Just looking at this thing makes the hair at the back of your neck stand up." + +/datum/reagent/consumable/ethanol/vodkatonic + name = "Vodka and Tonic" + id = "vodkatonic" + description = "For when a gin and tonic isn't russian enough." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.3 + drink_icon = "vodkatonicglass" + drink_name = "Vodka and Tonic" + drink_desc = "For when a gin and tonic isn't russian enough." + +/datum/reagent/consumable/ethanol/ginfizz + name = "Gin Fizz" + id = "ginfizz" + description = "Refreshingly lemony, deliciously dry." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "ginfizzglass" + drink_name = "Gin Fizz" + drink_desc = "Refreshingly lemony, deliciously dry." + +/datum/reagent/consumable/ethanol/bahama_mama + name = "Bahama mama" + id = "bahama_mama" + description = "Tropic cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "bahama_mama" + drink_name = "Bahama Mama" + drink_desc = "Tropic cocktail" + +/datum/reagent/consumable/ethanol/singulo + name = "Singulo" + id = "singulo" + description = "A blue-space beverage!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + dizzy_adj = 15 + alcohol_perc = 0.7 + drink_icon = "singulo" + drink_name = "Singulo" + drink_desc = "A blue-space beverage." + +/datum/reagent/consumable/ethanol/sbiten + name = "Sbiten" + id = "sbiten" + description = "A spicy Vodka! Might be a little hot for the little guys!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "sbitenglass" + drink_name = "Sbiten" + drink_desc = "A spicy mix of Vodka and Spice. Very hot." + +/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/M) + if(M.bodytemperature < 360) + M.bodytemperature = min(360, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/devilskiss + name = "Devils Kiss" + id = "devilskiss" + description = "Creepy time!" + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.3 + drink_icon = "devilskiss" + drink_name = "Devils Kiss" + drink_desc = "Creepy time!" + +/datum/reagent/consumable/ethanol/red_mead + name = "Red Mead" + id = "red_mead" + description = "The true Viking drink! Even though it has a strange red color." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "red_meadglass" + drink_name = "Red Mead" + drink_desc = "A True Vikings Beverage, though its color is strange." + +/datum/reagent/consumable/ethanol/mead + name = "Mead" + id = "mead" + description = "A Vikings drink, though a cheap one." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "meadglass" + drink_name = "Mead" + drink_desc = "A Vikings Beverage, though a cheap one." + +/datum/reagent/consumable/ethanol/iced_beer + name = "Iced Beer" + id = "iced_beer" + description = "A beer which is so cold the air around it freezes." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "iced_beerglass" + drink_name = "Iced Beer" + drink_desc = "A beer so frosty, the air around it freezes." + +/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/M) + if(M.bodytemperature > 270) + M.bodytemperature = max(270, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/grog + name = "Grog" + id = "grog" + description = "Watered down rum, Nanotrasen approves!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "grogglass" + drink_name = "Grog" + drink_desc = "A fine and cepa drink for Space." + +/datum/reagent/consumable/ethanol/aloe + name = "Aloe" + id = "aloe" + description = "So very, very, very good." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "aloe" + drink_name = "Aloe" + drink_desc = "Very, very, very good." + +/datum/reagent/consumable/ethanol/andalusia + name = "Andalusia" + id = "andalusia" + description = "A nice, strange named drink." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "andalusia" + drink_name = "Andalusia" + drink_desc = "A nice, strange named drink." + +/datum/reagent/consumable/ethanol/alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + description = "A drink made from your allies." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "alliescocktail" + drink_name = "Allies cocktail" + drink_desc = "A drink made from your allies." + +/datum/reagent/consumable/ethanol/acid_spit + name = "Acid Spit" + id = "acidspit" + description = "A drink by Nanotrasen. Made from live aliens." + reagent_state = LIQUID + color = "#365000" // rgb: 54, 80, 0 + alcohol_perc = 0.3 + drink_icon = "acidspitglass" + drink_name = "Acid Spit" + drink_desc = "A drink from Nanotrasen. Made from live aliens." + +/datum/reagent/consumable/ethanol/amasec + name = "Amasec" + id = "amasec" + description = "Official drink of the Imperium." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "amasecglass" + drink_name = "Amasec" + drink_desc = "Always handy before COMBAT!!!" + +/datum/reagent/consumable/ethanol/neurotoxin + name = "Neuro-toxin" + id = "neurotoxin" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = LIQUID + color = "#2E2E61" // rgb: 46, 46, 97 + dizzy_adj = 6 + alcohol_perc = 0.7 + heart_rate_decrease = 1 + drink_icon = "neurotoxinglass" + drink_name = "Neurotoxin" + drink_desc = "A drink that is guaranteed to knock you silly." + +/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/M) + M.Weaken(3) + if(current_cycle >=55) + M.Druggy(55) + if(current_cycle >=200) + M.adjustToxLoss(2) + ..() + +/datum/reagent/consumable/ethanol/hippies_delight + name = "Hippie's Delight" + id = "hippiesdelight" + description = "You just don't get it maaaan." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + metabolization_rate = 0.2 * REAGENTS_METABOLISM + drink_icon = "hippiesdelightglass" + drink_name = "Hippie's Delight" + drink_desc = "A drink enjoyed by people during the 1960's." + +/datum/reagent/consumable/ethanol/hippies_delight/on_mob_life(mob/living/M) + M.Druggy(50) + switch(current_cycle) + if(1 to 5) + if(!M.stuttering) M.stuttering = 1 + M.Dizzy(10) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + if(!M.stuttering) M.stuttering = 1 + M.Jitter(20) + M.Dizzy(20) + M.Druggy(45) + if(prob(20)) M.emote(pick("twitch","giggle")) + if(10 to INFINITY) + if(!M.stuttering) M.stuttering = 1 + M.Jitter(40) + M.Dizzy(40) + M.Druggy(60) + if(prob(30)) M.emote(pick("twitch","giggle")) + ..() + +/datum/reagent/consumable/ethanol/changelingsting + name = "Changeling Sting" + id = "changelingsting" + description = "A stingy drink." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.7 + dizzy_adj = 5 + drink_icon = "changelingsting" + drink_name = "Changeling Sting" + drink_desc = "A stingy drink." + +/datum/reagent/consumable/ethanol/irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + description = "Mmm, tastes like chocolate cake..." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.3 + dizzy_adj = 5 + drink_icon = "irishcarbomb" + drink_name = "Irish Car Bomb" + drink_desc = "An irish car bomb." + +/datum/reagent/consumable/ethanol/syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + description = "A Syndicate bomb" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.2 + drink_icon = "syndicatebomb" + drink_name = "Syndicate Bomb" + drink_desc = "A syndicate bomb." + +/datum/reagent/consumable/ethanol/erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + description = "The surprise is, it's green!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.2 + drink_icon = "erikasurprise" + name = "Erika Surprise" + drink_desc = "The surprise is, it's green!" + +/datum/reagent/consumable/ethanol/driestmartini + name = "Driest Martini" + id = "driestmartini" + description = "Only for the experienced. You think you see sand floating in the glass." + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.5 + dizzy_adj = 10 + drink_icon = "driestmartiniglass" + drink_name = "Driest Martini" + drink_desc = "Only for the experienced. You think you see sand floating in the glass." + +/datum/reagent/consumable/ethanol/driestmartini/on_mob_life(mob/living/M) + if(current_cycle >= 55 && current_cycle < 115) + M.stuttering += 10 + ..() + +/datum/reagent/consumable/ethanol/kahlua + name = "Kahlua" + id = "kahlua" + description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "kahluaglass" + drink_name = "Glass of RR coffee Liquor" + drink_desc = "DAMN, THIS THING LOOKS ROBUST" + +/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/M) + M.AdjustDizzy(-5) + M.AdjustDrowsy(-3) + M.AdjustSleeping(-2) + M.Jitter(5) + ..() + +/datum/reagent/ginsonic + name = "Gin and sonic" + id = "ginsonic" + description = "GOTTA GET CRUNK FAST BUT LIQUOR TOO SLOW" + reagent_state = LIQUID + color = "#1111CF" + drink_icon = "ginsonic" + drink_name = "Gin and Sonic" + drink_desc = "An extremely high amperage drink. Absolutely not for the true Englishman." + +/datum/reagent/ginsonic/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(prob(25)) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + if(prob(8)) + M.reagents.add_reagent("methamphetamine",1.2) + var/sonic_message = pick("Gotta go fast!", "Time to speed, keed!", "I feel a need for speed!", "Let's juice.", "Juice time.", "Way Past Cool!") + if(prob(50)) + M.say("[sonic_message]") + else + to_chat(M, "[sonic_message ]") + ..() + +/datum/reagent/consumable/ethanol/applejack + name = "Applejack" + id = "applejack" + description = "A highly concentrated alcoholic beverage made by repeatedly freezing cider and removing the ice." + color = "#997A00" + alcohol_perc = 0.4 + drink_icon = "cognacglass" + drink_name = "Glass of applejack" + drink_desc = "When cider isn't strong enough, you gotta jack it." + +/datum/reagent/consumable/ethanol/jackrose + name = "Jack Rose" + id = "jackrose" + description = "A classic cocktail that had fallen out of fashion, but never out of taste," + color = "#664300" + alcohol_perc = 0.4 + drink_icon = "patronglass" + drink_name = "Jack Rose" + drink_desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s." + +/datum/reagent/consumable/ethanol/dragons_breath //inaccessible to players, but here for admin shennanigans + name = "Dragon's Breath" + id = "dragonsbreath" + description = "Possessing this stuff probably breaks the Geneva convention." + reagent_state = LIQUID + color = "#DC0000" + alcohol_perc = 1 + can_synth = 0 + +/datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST && prob(20)) + if(M.on_fire) + M.adjust_fire_stacks(3) + +/datum/reagent/consumable/ethanol/dragons_breath/on_mob_life(mob/living/M) + if(M.reagents.has_reagent("milk")) + to_chat(M, "The milk stops the burning. Ahhh.") + M.reagents.del_reagent("milk") + M.reagents.del_reagent("dragonsbreath") + return + if(prob(8)) + to_chat(M, "Oh god! Oh GODD!!") + if(prob(50)) + to_chat(M, "Your throat burns terribly!") + M.emote(pick("scream","cry","choke","gasp")) + M.Stun(1) + if(prob(8)) + to_chat(M, "Why!? WHY!?") + if(prob(8)) + to_chat(M, "ARGHHHH!") + if(prob(2 * volume)) + to_chat(M, "OH GOD OH GOD PLEASE NO!!
") + if(M.on_fire) + M.adjust_fire_stacks(5) + if(prob(50)) + to_chat(M, "IT BURNS!!!!") + M.visible_message("[M] is consumed in flames!") + M.dust() + return + ..() + +// ROBOT ALCOHOL PAST THIS POINT +// WOOO! + +/datum/reagent/consumable/ethanol/synthanol + name = "Synthanol" + id = "synthanol" + description = "A runny liquid with conductive capacities. Its effects on synthetics are similar to those of alcohol on organics." + reagent_state = LIQUID + color = "#1BB1FF" + process_flags = ORGANIC | SYNTHETIC + alcohol_perc = 0.5 + drink_icon = "synthanolglass" + drink_name = "Glass of Synthanol" + drink_desc = "The equivalent of alcohol for synthetic crewmembers. They'd find it awful if they had tastebuds too." + +/datum/reagent/consumable/ethanol/synthanol/on_mob_life(mob/living/M) + if(!M.isSynthetic()) + holder.remove_reagent(id, 3.6) //gets removed from organics very fast + if(prob(25)) + holder.remove_reagent(id, 15) + M.fakevomit() + ..() + +/datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume) + if(M.isSynthetic()) + return + if(method == INGEST) + to_chat(M, pick("That was awful!", "Yuck!")) + +/datum/reagent/consumable/ethanol/synthanol/robottears + name = "Robot Tears" + id = "robottears" + description = "An oily substance that an IPC could technically consider a 'drink'." + reagent_state = LIQUID + color = "#363636" + alcohol_perc = 0.25 + drink_icon = "robottearsglass" + drink_name = "Glass of Robot Tears" + drink_desc = "No robots were hurt in the making of this drink." + +/datum/reagent/consumable/ethanol/synthanol/trinary + name = "Trinary" + id = "trinary" + description = "A fruit drink meant only for synthetics, however that works." + reagent_state = LIQUID + color = "#adb21f" + alcohol_perc = 0.2 + drink_icon = "trinaryglass" + drink_name = "Glass of Trinary" + drink_desc = "Colorful drink made for synthetic crewmembers. It doesn't seem like it would taste well." + +/datum/reagent/consumable/ethanol/synthanol/servo + name = "Servo" + id = "servo" + description = "A drink containing some organic ingredients, but meant only for synthetics." + reagent_state = LIQUID + color = "#5b3210" + alcohol_perc = 0.25 + drink_icon = "servoglass" + drink_name = "Glass of Servo" + drink_desc = "Chocolate - based drink made for IPCs. Not sure if anyone's actually tried out the recipe." + +/datum/reagent/consumable/ethanol/synthanol/uplink + name = "Uplink" + id = "uplink" + description = "A potent mix of alcohol and synthanol. Will only work on synthetics." + reagent_state = LIQUID + color = "#e7ae04" + alcohol_perc = 0.15 + drink_icon = "uplinkglass" + drink_name = "Glass of Uplink" + drink_desc = "An exquisite mix of the finest liquoirs and synthanol. Meant only for synthetics." + +/datum/reagent/consumable/ethanol/synthanol/synthnsoda + name = "Synth 'n Soda" + id = "synthnsoda" + description = "The classic drink adjusted for a robot's tastes." + reagent_state = LIQUID + color = "#7204e7" + alcohol_perc = 0.25 + drink_icon = "synthnsodaglass" + drink_name = "Glass of Synth 'n Soda" + drink_desc = "Classic drink altered to fit the tastes of a robot. Bad idea to drink if you're made of carbon." + +/datum/reagent/consumable/ethanol/synthanol/synthignon + name = "Synthignon" + id = "synthignon" + description = "Someone mixed wine and alcohol for robots. Hope you're proud of yourself." + reagent_state = LIQUID + color = "#d004e7" + alcohol_perc = 0.25 + drink_icon = "synthignonglass" + drink_name = "Glass of Synthignon" + drink_desc = "Someone mixed good wine and robot booze. Romantic, but atrocious." \ No newline at end of file diff --git a/code/modules/reagents/newchem/Blob-Reagents.dm b/code/modules/reagents/chemistry/reagents/blob.dm similarity index 97% rename from code/modules/reagents/newchem/Blob-Reagents.dm rename to code/modules/reagents/chemistry/reagents/blob.dm index fa5e9747e34..895922c7542 100644 --- a/code/modules/reagents/newchem/Blob-Reagents.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -4,6 +4,7 @@ description = "" var/message = "The blob strikes you" //message sent to any mob hit by the blob var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt + can_synth = 0 /datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, volume, show_message, touch_protection) return round(volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. @@ -61,7 +62,7 @@ volume = ..() M.apply_damage(0.4*volume, BRUTE) M.apply_damage(1*volume, OXY) - M.losebreath += round(0.3*volume) + M.AdjustLoseBreath(round(0.3*volume)) /datum/reagent/blob/kinetic //does semi-random brute damage @@ -149,4 +150,4 @@ if(message_living && !issilicon(M)) totalmessage += message_living totalmessage += "!" - to_chat(M, "[totalmessage]") + to_chat(M, "[totalmessage]") \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/disease.dm b/code/modules/reagents/chemistry/reagents/disease.dm new file mode 100644 index 00000000000..f9fbf930e3e --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/disease.dm @@ -0,0 +1,186 @@ +/datum/reagent/spider_eggs + name = "spider eggs" + id = "spidereggs" + description = "A fine dust containing spider eggs. Oh gosh." + reagent_state = SOLID + color = "#FFFFFF" + can_synth = 0 + +/datum/reagent/spider_eggs/on_mob_life(mob/living/M) + if(volume > 2.5) + if(iscarbon(M)) + if(!M.get_int_organ(/obj/item/organ/internal/body_egg)) + new/obj/item/organ/internal/body_egg/spider_eggs(M) //Yes, even Xenos can fall victim to the plague that is spider infestation. + ..() + + +/datum/reagent/nanomachines + name = "Nanomachines" + id = "nanomachines" + description = "Microscopic construction robots." + color = "#535E66" // rgb: 83, 94, 102 + can_synth = 0 + +/datum/reagent/nanomachines/on_mob_life(mob/living/carbon/M) + if(volume > 1.5) + M.ForceContractDisease(new /datum/disease/transformation/robot(0)) + ..() + + +/datum/reagent/xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + color = "#535E66" // rgb: 83, 94, 102 + can_synth = 0 + +/datum/reagent/xenomicrobes/on_mob_life(mob/living/carbon/M) + if(volume > 1.5) + M.ContractDisease(new /datum/disease/transformation/xeno(0)) + ..() + +/datum/reagent/fungalspores + name = "Tubercle bacillus Cosmosis microbes" + id = "fungalspores" + description = "Active fungal spores." + color = "#92D17D" // rgb: 146, 209, 125 + can_synth = 0 + +/datum/reagent/fungalspores/on_mob_life(mob/living/carbon/M) + if(volume > 2.5) + M.ForceContractDisease(new /datum/disease/tuberculosis(0)) + ..() + +/datum/reagent/jagged_crystals + name = "Jagged Crystals" + id = "jagged_crystals" + description = "Rapid chemical decomposition has warped these crystals into twisted spikes." + reagent_state = SOLID + color = "#FA0000" // rgb: 250, 0, 0 + can_synth = 0 + +/datum/reagent/jagged_crystals/on_mob_life(mob/living/carbon/M) + M.ForceContractDisease(new /datum/disease/berserker(0)) + ..() + +/datum/reagent/salmonella + name = "Salmonella" + id = "salmonella" + description = "A nasty bacteria found in spoiled food." + reagent_state = LIQUID + color = "#1E4600" + can_synth = 0 + +/datum/reagent/salmonella/on_mob_life(mob/living/carbon/M) + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + ..() + +/datum/reagent/gibbis + name = "Gibbis" + id = "gibbis" + description = "Liquid gibbis." + reagent_state = LIQUID + color = "#FF0000" + can_synth = 0 + +/datum/reagent/gibbis/on_mob_life(mob/living/carbon/M) + if(volume > 2.5) + M.ForceContractDisease(new /datum/disease/gbs/curable(0)) + ..() + +/datum/reagent/prions + name = "Prions" + id = "prions" + description = "A disease-causing agent that is neither bacterial nor fungal nor viral and contains no genetic material." + reagent_state = LIQUID + color = "#FFFFFF" + can_synth = 0 + +/datum/reagent/prions/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + M.ForceContractDisease(new /datum/disease/kuru(0)) + ..() + +/datum/reagent/grave_dust + name = "Grave Dust" + id = "grave_dust" + description = "Moldy old dust taken from a grave site." + reagent_state = LIQUID + color = "#465046" + can_synth = 0 + +/datum/reagent/grave_dust/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + M.ForceContractDisease(new /datum/disease/vampire(0)) + ..() + +/datum/reagent/heartworms + name = "Space heartworms" + id = "heartworms" + description = "Aww, gross! These things can't be good for your heart. They're gunna eat it!" + reagent_state = SOLID + color = "#925D6C" + can_synth = 0 + +/datum/reagent/heartworms/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/internal/heart/ate_heart = H.get_int_organ(/obj/item/organ/internal/heart) + if(ate_heart) + ate_heart.remove(H) + qdel(ate_heart) + ..() + +/datum/reagent/concentrated_initro + name = "Concentrated Initropidril" + id = "concentrated_initro" + description = "A guaranteed heart-stopper!" + reagent_state = LIQUID + color = "#AB1CCF" + can_synth = 0 + +/datum/reagent/concentrated_initro/on_mob_life(mob/living/M) + if(volume >=5) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.heart_attack) + H.heart_attack = 1 // rip in pepperoni + +//virus foods + +/datum/reagent/consumable/virus_food + name = "Virus Food" + id = "virusfood" + description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#899613" // rgb: 137, 150, 19 + +/datum/reagent/mutagen/mutagenvirusfood + name = "mutagenic agar" + id = "mutagenvirusfood" + description = "mutates blood" + color = "#A3C00F" // rgb: 163,192,15 + +/datum/reagent/mutagen/mutagenvirusfood/sugar + name = "sucrose agar" + id = "sugarvirusfood" + color = "#41B0C0" // rgb: 65,176,192 + +/datum/reagent/medicine/diphenhydramine/diphenhydraminevirusfood + name = "virus rations" + id = "diphenhydraminevirusfood" + description = "mutates blood" + color = "#D18AA5" // rgb: 209,138,165 + +/datum/reagent/plasma_dust/plasmavirusfood + name = "virus plasma" + id = "plasmavirusfood" + description = "mutates blood" + color = "#A69DA9" // rgb: 166,157,169 + +/datum/reagent/plasma_dust/plasmavirusfood/weak + name = "weakened virus plasma" + id = "weakplasmavirusfood" + color = "#CEC3C6" // rgb: 206,195,198 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm b/code/modules/reagents/chemistry/reagents/drink_base.dm similarity index 73% rename from code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm rename to code/modules/reagents/chemistry/reagents/drink_base.dm index 1868489adb7..25484983a4f 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm +++ b/code/modules/reagents/chemistry/reagents/drink_base.dm @@ -1,9 +1,8 @@ -/datum/reagent/drink +/datum/reagent/consumable/drink name = "Drink" id = "drink" description = "Uh, some kind of drink." reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM color = "#E78108" // rgb: 231, 129, 8 var/adj_dizzy = 0 var/adj_drowsy = 0 @@ -11,12 +10,11 @@ var/adj_temp_hot = 0 var/adj_temp_cool = 0 -/datum/reagent/drink/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/on_mob_life(mob/living/M) if(adj_dizzy) - M.dizziness = max(0, M.dizziness + adj_dizzy) + M.AdjustDizzy(adj_dizzy) if(adj_drowsy) - M.drowsyness = max(0, M.drowsyness + adj_drowsy) + M.AdjustDrowsy(adj_drowsy) if(adj_sleepy) M.AdjustSleeping(adj_sleepy) if(adj_temp_hot) diff --git a/code/modules/reagents/chemistry/reagents/drink_cold.dm b/code/modules/reagents/chemistry/reagents/drink_cold.dm new file mode 100644 index 00000000000..ffd43a81840 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/drink_cold.dm @@ -0,0 +1,163 @@ +/datum/reagent/consumable/drink/cold + name = "Cold drink" + adj_temp_cool = 5 + +/datum/reagent/consumable/drink/cold/tonic + name = "Tonic Water" + id = "tonic" + description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." + color = "#664300" // rgb: 102, 67, 0 + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + drink_icon = "glass_clear" + drink_name = "Glass of Tonic Water" + drink_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." + +/datum/reagent/consumable/drink/cold/sodawater + name = "Soda Water" + id = "sodawater" + description = "A can of club soda. Why not make a scotch and soda?" + color = "#619494" // rgb: 97, 148, 148 + adj_dizzy = -5 + adj_drowsy = -3 + drink_icon = "glass_clear" + drink_name = "Glass of Soda Water" + drink_desc = "Soda water. Why not make a scotch and soda?" + +/datum/reagent/consumable/drink/cold/ice + name = "Ice" + id = "ice" + description = "Frozen water, your dentist wouldn't like you chewing this." + reagent_state = SOLID + color = "#619494" // rgb: 97, 148, 148 + adj_temp_cool = 0 + drink_icon = "iceglass" + drink_name = "Glass of ice" + drink_desc = "Generally, you're supposed to put something else in there too..." + +/datum/reagent/consumable/drink/cold/ice/on_mob_life(mob/living/M) + M.bodytemperature = max(M.bodytemperature - 5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) + ..() + +/datum/reagent/consumable/drink/cold/space_cola + name = "Cola" + id = "cola" + description = "A refreshing beverage." + reagent_state = LIQUID + color = "#100800" // rgb: 16, 8, 0 + adj_drowsy = -5 + drink_icon = "glass_brown" + drink_name = "Glass of Space Cola" + drink_desc = "A glass of refreshing Space Cola" + +/datum/reagent/consumable/drink/cold/nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + description = "Cola, cola never changes." + color = "#100800" // rgb: 16, 8, 0 + adj_sleepy = -2 + drink_icon = "nuka_colaglass" + drink_name = "Nuka Cola" + drink_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" + +/datum/reagent/consumable/drink/cold/nuka_cola/on_mob_life(mob/living/M) + M.Jitter(20) + M.Druggy(30) + M.AdjustDizzy(5) + M.SetDrowsy(0) + M.status_flags |= GOTTAGOFAST + ..() + +/datum/reagent/consumable/drink/cold/nuka_cola/on_mob_delete(mob/living/M) + M.status_flags &= ~GOTTAGOFAST + ..() + +/datum/reagent/consumable/drink/cold/spacemountainwind + name = "Space Mountain Wind" + id = "spacemountainwind" + description = "Blows right through you like a space wind." + color = "#102000" // rgb: 16, 32, 0 + adj_drowsy = -7 + adj_sleepy = -1 + drink_icon = "Space_mountain_wind_glass" + drink_name = "Glass of Space Mountain Wind" + drink_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." + +/datum/reagent/consumable/drink/cold/dr_gibb + name = "Dr. Gibb" + id = "dr_gibb" + description = "A delicious blend of 42 different flavours" + color = "#102000" // rgb: 16, 32, 0 + adj_drowsy = -6 + drink_icon = "dr_gibb_glass" + drink_name = "Glass of Dr. Gibb" + drink_desc = "Dr. Gibb. Not as dangerous as the name might imply." + +/datum/reagent/consumable/drink/cold/space_up + name = "Space-Up" + id = "space_up" + description = "Tastes like a hull breach in your mouth." + color = "#202800" // rgb: 32, 40, 0 + adj_temp_cool = 8 + drink_icon = "space-up_glass" + drink_name = "Glass of Space-up" + drink_desc = "Space-up. It helps keep your cool." + +/datum/reagent/consumable/drink/cold/lemon_lime + name = "Lemon Lime" + description = "A tangy substance made of 0.5% natural citrus!" + id = "lemon_lime" + color = "#878F00" // rgb: 135, 40, 0 + adj_temp_cool = 8 + +/datum/reagent/consumable/drink/cold/lemonade + name = "Lemonade" + description = "Oh the nostalgia..." + id = "lemonade" + color = "#FFFF00" // rgb: 255, 255, 0 + drink_icon = "lemonade" + drink_name = "Lemonade" + drink_desc = "Oh the nostalgia..." + +/datum/reagent/consumable/drink/cold/kiraspecial + name = "Kira Special" + description = "Long live the guy who everyone had mistaken for a girl. Baka!" + id = "kiraspecial" + color = "#CCCC99" // rgb: 204, 204, 153 + drink_icon = "kiraspecial" + drink_name = "Kira Special" + drink_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" + +/datum/reagent/consumable/drink/cold/brownstar + name = "Brown Star" + description = "It's not what it sounds like..." + id = "brownstar" + color = "#9F3400" // rgb: 159, 052, 000 + adj_temp_cool = 2 + drink_icon = "brownstar" + drink_name = "Brown Star" + drink_desc = "Its not what it sounds like..." + +/datum/reagent/consumable/drink/cold/milkshake + name = "Milkshake" + description = "Glorious brainfreezing mixture." + id = "milkshake" + color = "#AEE5E4" // rgb" 174, 229, 228 + adj_temp_cool = 9 + drink_icon = "milkshake" + drink_name = "Milkshake" + drink_desc = "Glorious brainfreezing mixture." + +/datum/reagent/consumable/drink/cold/rewriter + name = "Rewriter" + description = "The secert of the sanctuary of the Libarian..." + id = "rewriter" + color = "#485000" // rgb:72, 080, 0 + drink_icon = "rewriter" + drink_name = "Rewriter" + drink_desc = "The secert of the sanctuary of the Libarian..." + +/datum/reagent/consumable/drink/cold/rewriter/on_mob_life(mob/living/M) + M.Jitter(5) + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/drinks.dm b/code/modules/reagents/chemistry/reagents/drinks.dm new file mode 100644 index 00000000000..489eac3eb81 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -0,0 +1,362 @@ +/datum/reagent/consumable/drink/orangejuice + name = "Orange juice" + id = "orangejuice" + description = "Both delicious AND rich in Vitamin C, what more do you need?" + color = "#E78108" // rgb: 231, 129, 8 + drink_icon = "glass_orange" + drink_name = "Glass of Orange juice" + drink_desc = "Vitamins! Yay!" + +/datum/reagent/consumable/drink/orangejuicde/on_mob_life(mob/living/M) + if(M.getOxyLoss() && prob(30)) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/consumable/drink/tomatojuice + name = "Tomato Juice" + id = "tomatojuice" + description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" + color = "#731008" // rgb: 115, 16, 8 + drink_icon = "glass_red" + drink_name = "Glass of Tomato juice" + drink_desc = "Are you sure this is tomato juice?" + +/datum/reagent/consumable/drink/tomatojuice/on_mob_life(mob/living/M) + if(M.getFireLoss() && prob(20)) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/drink/limejuice + name = "Lime Juice" + id = "limejuice" + description = "The sweet-sour juice of limes." + color = "#365E30" // rgb: 54, 94, 48 + drink_icon = "glass_green" + drink_name = "Glass of Lime juice" + drink_desc = "A glass of sweet-sour lime juice." + +/datum/reagent/consumable/drink/limejuice/on_mob_life(mob/living/M) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) + ..() + +/datum/reagent/consumable/drink/carrotjuice + name = "Carrot juice" + id = "carrotjuice" + description = "It is just like a carrot but without crunching." + color = "#973800" // rgb: 151, 56, 0 + drink_icon = "carrotjuice" + drink_name = "Glass of carrot juice" + drink_desc = "It is just like a carrot but without crunching." + +/datum/reagent/consumable/drink/carrotjuicde/on_mob_life(mob/living/M) + M.AdjustEyeBlurry(-1) + M.AdjustEyeBlind(-1) + switch(current_cycle) + if(1 to 20) + //nothing + if(21 to INFINITY) + if(prob(current_cycle-10)) + M.disabilities &= ~NEARSIGHTED + ..() + +/datum/reagent/consumable/drink/doctor_delight + name = "The Doctor's Delight" + id = "doctorsdelight" + description = "A gulp a day keeps the MediBot away. That's probably for the best." + reagent_state = LIQUID + color = "#FF8CFF" // rgb: 255, 140, 255 + drink_icon = "doctorsdelightglass" + drink_name = "Doctor's Delight" + drink_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." + +/datum/reagent/consumable/drink/doctors_delight/on_mob_life(mob/living/M) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) + ..() + +/datum/reagent/consumable/drink/triple_citrus + name = "Triple Citrus" + id = "triple_citrus" + description = "A refreshing mixed drink of orange, lemon and lime juice." + reagent_state = LIQUID + color = "#23A046" + drink_icon = "triplecitrus" + drink_name = "Glass of Triplecitrus Juice" + drink_desc = "As colorful and healthy as it is delicious." + +/datum/reagent/consumable/drink/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + M.adjustToxLoss(-rand(1,2)) + +/datum/reagent/consumable/drink/berryjuice + name = "Berry Juice" + id = "berryjuice" + description = "A delicious blend of several different kinds of berries." + color = "#863333" // rgb: 134, 51, 51 + drink_icon = "berryjuice" + drink_name = "Glass of berry juice" + drink_desc = "Berry juice. Or maybe its jam. Who cares?" + +/datum/reagent/consumable/drink/poisonberryjuice + name = "Poison Berry Juice" + id = "poisonberryjuice" + description = "A tasty juice blended from various kinds of very deadly and toxic berries." + color = "#863353" // rgb: 134, 51, 83 + drink_icon = "poisonberryjuice" + drink_name = "Glass of poison berry juice" + drink_desc = "A glass of deadly juice." + +/datum/reagent/consumable/drink/poisonberryjuice/on_mob_life(mob/living/M) + M.adjustToxLoss(1) + ..() + +/datum/reagent/consumable/drink/watermelonjuice + name = "Watermelon Juice" + id = "watermelonjuice" + description = "Delicious juice made from watermelon." + color = "#863333" // rgb: 134, 51, 51 + +/datum/reagent/consumable/drink/lemonjuice + name = "Lemon Juice" + id = "lemonjuice" + description = "This juice is VERY sour." + color = "#863333" // rgb: 175, 175, 0 + drink_icon = "lemonglass" + drink_name = "Glass of lemonjuice" + drink_desc = "Sour..." + +/datum/reagent/consumable/drink/grapejuice + name = "Grape Juice" + id = "grapejuice" + description = "This juice is known to stain shirts." + color = "#993399" // rgb: 153, 51, 153 + +/datum/reagent/consumable/drink/banana + name = "Banana Juice" + id = "banana" + description = "The raw essence of a banana." + color = "#863333" // rgb: 175, 175, 0 + drink_icon = "banana" + drink_name = "Glass of banana juice" + drink_desc = "The raw essence of a banana. HONK" + +/datum/reagent/consumable/drink/banana/on_mob_life(mob/living/M) + if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/drink/nothing + name = "Nothing" + id = "nothing" + description = "Absolutely nothing." + drink_icon = "nothing" + drink_name = "Nothing" + drink_desc = "Absolutely nothing." + +/datum/reagent/consumable/drink/nothing/on_mob_life(mob/living/M) + if(ishuman(M) && M.job in list("Mime")) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/drink/potato_juice + name = "Potato Juice" + id = "potato" + description = "Juice of the potato. Bleh." + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + drink_icon = "glass_brown" + drink_name = "Glass of potato juice" + drink_desc = "Who in the hell requests this? Gross!" + +/datum/reagent/consumable/drink/milk + name = "Milk" + id = "milk" + description = "An opaque white liquid produced by the mammary glands of mammals." + color = "#DFDFDF" // rgb: 223, 223, 223 + drink_icon = "glass_white" + drink_name = "Glass of milk" + drink_desc = "White and nutritious goodness!" + +/datum/reagent/consumable/drink/milk/on_mob_life(mob/living/M) + if(M.getBruteLoss() && prob(20)) + M.adjustBruteLoss(-1) + if(holder.has_reagent("capsaicin")) + holder.remove_reagent("capsaicin", 2) + ..() + +/datum/reagent/consumable/drink/milk/soymilk + name = "Soy Milk" + id = "soymilk" + description = "An opaque white liquid made from soybeans." + color = "#DFDFC7" // rgb: 223, 223, 199 + drink_name = "Glass of soy milk" + drink_desc = "White and nutritious soy goodness!" + +/datum/reagent/consumable/drink/milk/cream + name = "Cream" + id = "cream" + description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" + color = "#DFD7AF" // rgb: 223, 215, 175 + drink_name = "Glass of cream" + drink_desc = "Ewwww..." + +/datum/reagent/consumable/drink/milk/chocolate_milk + name = "Chocolate milk" + id ="chocolate_milk" + description = "Chocolate-flavored milk, tastes like being a kid again." + color = "#85432C" + +/datum/reagent/consumable/drink/hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And coco beans." + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#403010" // rgb: 64, 48, 16 + adj_temp_hot = 5 + drink_icon = "hot_coco" + drink_name = "Glass of hot coco" + drink_desc = "Delicious and cozy" + +/datum/reagent/consumable/drink/coffee + name = "Coffee" + id = "coffee" + description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." + color = "#482000" // rgb: 72, 32, 0 + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + adj_temp_hot = 25 + overdose_threshold = 45 + addiction_chance = 1 // It's true. + heart_rate_increase = 1 + drink_icon = "glass_brown" + drink_name = "Glass of coffee" + drink_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + +/datum/reagent/consumable/drink/coffee/on_mob_life(mob/living/M) + if(holder.has_reagent("frostoil")) + holder.remove_reagent("frostoil", 5) + if(prob(50)) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + ..() + +/datum/reagent/consumable/drink/coffee/overdose_process(mob/living/M, severity) + if(volume > 45) + M.Jitter(5) + +/datum/reagent/consumable/drink/coffee/icecoffee + name = "Iced Coffee" + id = "icecoffee" + description = "Coffee and ice, refreshing and cool." + color = "#102838" // rgb: 16, 40, 56 + adj_temp_hot = 0 + adj_temp_cool = 5 + drink_icon = "icedcoffeeglass" + drink_name = "Iced Coffee" + drink_desc = "A drink to perk you up and refresh you!" + +/datum/reagent/consumable/drink/coffee/soy_latte + name = "Soy Latte" + id = "soy_latte" + description = "A nice and tasty beverage while you are reading your hippie books." + color = "#664300" // rgb: 102, 67, 0 + adj_sleepy = 0 + adj_temp_hot = 5 + drink_icon = "soy_latte" + drink_name = "Soy Latte" + drink_desc = "A nice and refrshing beverage while you are reading." + +/datum/reagent/consumable/drink/coffee/soy_latte/on_mob_life(mob/living/M) + ..() + M.SetSleeping(0) + if(M.getBruteLoss() && prob(20)) + M.adjustBruteLoss(-1) + +/datum/reagent/consumable/drink/coffee/cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + description = "A nice, strong and tasty beverage while you are reading." + color = "#664300" // rgb: 102, 67, 0 + adj_sleepy = 0 + adj_temp_hot = 5 + drink_icon = "cafe_latte" + drink_name = "Cafe Latte" + drink_desc = "A nice, strong and refreshing beverage while you are reading." + +/datum/reagent/consumable/drink/coffee/cafe_latte/on_mob_life(mob/living/M) + ..() + M.SetSleeping(0) + if(M.getBruteLoss() && prob(20)) + M.adjustBruteLoss(-1) + +/datum/reagent/consumable/drink/coffee/cafe_latte/cafe_mocha + name = "Cafe Mocha" + id = "cafe_mocha" + description = "The perfect blend of coffe, milk, and chocolate." + color = "#673629" + drink_name = "Cafe Mocha" + drink_desc = "The perfect blend of coffe, milk, and chocolate." + +/datum/reagent/consumable/drink/tea + name = "Tea" + id = "tea" + description = "Tasty black tea: It has antioxidants. It's good for you!" + color = "#101000" // rgb: 16, 16, 0 + adj_dizzy = -2 + adj_drowsy = -1 + adj_sleepy = -3 + adj_temp_hot = 20 + drink_icon = "glass_brown" + drink_name = "Glass of Tea" + drink_desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?" + +/datum/reagent/consumable/drink/tea/on_mob_life(mob/living/M) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) + ..() + +/datum/reagent/consumable/drink/tea/icetea + name = "Iced Tea" + id = "icetea" + description = "No relation to a certain rap artist/ actor." + color = "#104038" // rgb: 16, 64, 56 + adj_temp_hot = 0 + adj_temp_cool = 5 + drink_icon = "icetea" + drink_name = "Iced Tea" + drink_desc = "No relation to a certain rap artist/ actor." + +/datum/reagent/consumable/drink/bananahonk + name = "Banana Mama" + id = "bananahonk" + description = "A drink from Clown Heaven." + color = "#664300" // rgb: 102, 67, 0 + drink_icon = "bananahonkglass" + drink_name = "Banana Honk" + drink_desc = "A drink from Banana Heaven." + +/datum/reagent/consumable/drink/bananahonk/on_mob_life(mob/living/M) + if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/drink/silencer + name = "Silencer" + id = "silencer" + description = "A drink from Mime Heaven." + color = "#664300" // rgb: 102, 67, 0 + drink_icon = "silencerglass" + drink_name = "Silencer" + drink_desc = "A drink from mime Heaven." + +/datum/reagent/consumable/drink/silencer/on_mob_life(mob/living/M) + if(ishuman(M) && M.job in list("Mime")) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm similarity index 77% rename from code/modules/reagents/newchem/drugs.dm rename to code/modules/reagents/chemistry/reagents/drugs.dm index 99a637e4fca..3719c6f49b8 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -1,8 +1,88 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/serotrotium + name = "Serotrotium" + id = "serotrotium" + description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." + reagent_state = LIQUID + color = "#202040" // rgb: 20, 20, 40 + metabolization_rate = 0.25 * REAGENTS_METABOLISM -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/serotrotium/on_mob_life(mob/living/M) + if(ishuman(M)) + if(prob(7)) + M.emote(pick("twitch","drool","moan","gasp")) + ..() + + +/datum/reagent/lithium + name = "Lithium" + id = "lithium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + +/datum/reagent/lithium/on_mob_life(mob/living/M) + if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(5)) M.emote(pick("twitch","drool","moan")) + ..() + +/datum/reagent/lsd + name = "Lysergic acid diethylamide" + id = "lsd" + description = "A highly potent hallucinogenic substance. Far out, maaaan." + reagent_state = LIQUID + color = "#0000D8" + +/datum/reagent/lsd/on_mob_life(mob/living/M) + M.Druggy(15) + M.AdjustHallucinate(10) + ..() + +/datum/reagent/space_drugs + name = "Space drugs" + id = "space_drugs" + description = "An illegal chemical compound used as drug." + reagent_state = LIQUID + color = "#9087A2" + metabolization_rate = 0.2 + addiction_chance = 65 + heart_rate_decrease = 1 + +/datum/reagent/space_drugs/on_mob_life(mob/living/M) + M.Druggy(15) + if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) + ..() + +/datum/reagent/psilocybin + name = "Psilocybin" + id = "psilocybin" + description = "A strong psycotropic derived from certain species of mushroom." + color = "#E700E7" // rgb: 231, 0, 231 + +/datum/reagent/psilocybin/on_mob_life(mob/living/M) + M.Druggy(30) + switch(current_cycle) + if(1 to 5) + M.Stuttering(1) + M.Dizzy(5) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + M.Stuttering(1) + M.Jitter(10) + M.Dizzy(10) + M.Druggy(35) + if(prob(20)) M.emote(pick("twitch","giggle")) + if(10 to INFINITY) + M.Stuttering(1) + M.Jitter(20) + M.Dizzy(20) + M.Druggy(40) + if(prob(30)) M.emote(pick("twitch","giggle")) + ..() /datum/reagent/nicotine name = "Nicotine" @@ -22,7 +102,7 @@ M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) - M.adjustStaminaLoss(-1*REM) + M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() /datum/reagent/nicotine/overdose_process(mob/living/M, severity) @@ -30,7 +110,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] looks nervous!") - M.confused += 15 + M.AdjustConfused(15) M.adjustToxLoss(2) M.Jitter(10) M.emote("twitch_s") @@ -55,7 +135,7 @@ M.Jitter(10) M.adjustToxLoss(5) M.Weaken(1) - M.confused += 33 + M.AdjustConfused(33) else if(effect <= 7) M.emote("collapse") to_chat(M, "Your heart is pounding!") @@ -90,7 +170,7 @@ if(prob(4)) to_chat(M, "You feel kinda awful!") M.adjustToxLoss(1) - M.jitteriness += 30 + M.AdjustJitter(30) M.emote(pick("groan", "moan")) ..() @@ -99,7 +179,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] looks confused!") - M.confused += 20 + M.AdjustConfused(20) M.Jitter(20) M.emote("scream") else if(effect <= 4) @@ -123,7 +203,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(8) M.Weaken(3) - M.confused += 25 + M.AdjustConfused(25) M.emote("scream") M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) @@ -133,22 +213,6 @@ M.adjustBruteLoss(5) M.emote("twitch_s") -/datum/chemical_reaction/crank - name = "Crank" - id = "crank" - result = "crank" - required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "fuel" = 1) - result_amount = 5 - mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." - mix_sound = 'sound/goonstation/effects/crystalshatter.ogg' - min_temp = 390 - -/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume) - var/turf/T = get_turf(holder.my_atom) - for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) - explosion(T,0,0,2) - /datum/reagent/krokodil name = "Krokodil" id = "krokodil" @@ -160,7 +224,7 @@ /datum/reagent/krokodil/on_mob_life(mob/living/M) - M.jitteriness -= 40 + M.AdjustJitter(-40) if(prob(25)) M.adjustBrainLoss(1) if(prob(15)) @@ -216,16 +280,6 @@ M.emote("shiver") M.bodytemperature -= 70 -/datum/chemical_reaction/krokodil - name = "Krokodil" - id = "krokodil" - result = "krokodil" - required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1) - result_amount = 6 - mix_message = "The mixture dries into a pale blue powder." - min_temp = 380 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - /datum/reagent/methamphetamine name = "Methamphetamine" id = "methamphetamine" @@ -241,8 +295,8 @@ if(prob(5)) M.emote(pick("twitch_s","blink_r","shiver")) if(current_cycle >= 25) - M.jitteriness += 5 - M.drowsyness = max(0, M.drowsyness-10) + M.AdjustJitter(5) + M.AdjustDrowsy(-10) M.AdjustParalysis(-2.5) M.AdjustStunned(-2.5) M.AdjustWeakened(-2.5) @@ -253,7 +307,7 @@ M.adjustBrainLoss(1.0) ..() -/datum/reagent/methamphetamine/reagent_deleted(mob/living/M) +/datum/reagent/methamphetamine/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOREALLYFAST ..() @@ -262,7 +316,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] can't seem to control their legs!") - M.confused += 20 + M.AdjustConfused(20) M.Weaken(4) else if(effect <= 4) M.visible_message("[M]'s hands flip out and flail everywhere!") @@ -282,39 +336,6 @@ else if(effect <= 7) M.emote("laugh") -/datum/chemical_reaction/methamphetamine - name = "methamphetamine" - id = "methamphetamine" - result = "methamphetamine" - required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) - result_amount = 4 - min_temp = 374 - -/datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.emote("gasp") - C.losebreath++ - C.reagents.add_reagent("toxin", 10) - C.reagents.add_reagent("neurotoxin2", 20) - -/datum/chemical_reaction/saltpetre - name = "saltpetre" - id = "saltpetre" - result = "saltpetre" - required_reagents = list("potassium" = 1, "nitrogen" = 1, "oxygen" = 3) - result_amount = 3 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/reagent/saltpetre - name = "Saltpetre" - id = "saltpetre" - description = "Volatile." - reagent_state = LIQUID - color = "#60A584" // rgb: 96, 165, 132 - /datum/reagent/bath_salts name = "Bath Salts" id = "bath_salts" @@ -342,15 +363,15 @@ M.SetWeakened(0) if(check < 30) M.emote(pick("twitch", "twitch_s", "scream", "drool", "grumble", "mumble")) - M.druggy = max(M.druggy, 15) + M.Druggy(15) if(check < 20) - M.confused += 10 + M.AdjustConfused(10) if(check < 8) M.reagents.add_reagent(pick("methamphetamine", "crank", "neurotoxin"), rand(1,5)) M.visible_message("[M] scratches at something under their skin!") M.adjustBruteLoss(5) else if(check < 16) - M.hallucination += 30 + M.AdjustHallucinate(30) else if(check < 24) to_chat(M, "They're coming for you!") else if(check < 28) @@ -373,7 +394,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] flails around like a lunatic!") - M.confused += 25 + M.AdjustConfused(25) M.Jitter(10) M.emote("scream") M.reagents.add_reagent("jagged_crystals", 5) @@ -383,7 +404,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(1) M.Stun(3) - M.eye_blurry = max(M.eye_blurry, 7) + M.EyeBlurry(7) M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) M.emote("faint") @@ -394,7 +415,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(1) M.Stun(3) - M.eye_blurry = max(M.eye_blurry, 7) + M.EyeBlurry(7) M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 4) M.visible_message("[M] convulses violently and falls to the floor!") @@ -411,32 +432,6 @@ M.reagents.add_reagent("jagged_crystals", 5) M.emote("twitch") -/datum/chemical_reaction/bath_salts - name = "bath_salts" - id = "bath_salts" - result = "bath_salts" - required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1) - result_amount = 6 - min_temp = 374 - mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh." - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/chemical_reaction/jenkem - name = "Jenkem" - id = "jenkem" - result = "jenkem" - required_reagents = list("toiletwater" = 1, "ammonia" = 1, "water" = 1) - result_amount = 3 - mix_message = "The mixture ferments into a filthy morass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/chemical_reaction/jenkem/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("jenkem", 25) - /datum/reagent/jenkem name = "Jenkem" id = "jenkem" @@ -452,13 +447,6 @@ M.adjustToxLoss(1) ..() -/datum/chemical_reaction/aranesp - name = "Aranesp" - id = "aranesp" - result = "aranesp" - required_reagents = list("epinephrine" = 1, "atropine" = 1, "insulin" = 1) - result_amount = 3 - /datum/reagent/aranesp name = "Aranesp" id = "aranesp" @@ -479,7 +467,7 @@ to_chat(M, "You cannot breathe!") M.adjustOxyLoss(15) M.Stun(1) - M.losebreath++ + M.AdjustLoseBreath(1) ..() /datum/reagent/thc @@ -489,7 +477,6 @@ reagent_state = LIQUID color = "#0FBE0F" - /datum/reagent/thc/on_mob_life(mob/living/M) M.stuttering += rand(0,2) if(prob(5)) @@ -497,10 +484,10 @@ if(prob(5)) to_chat(M, "[pick("You feel hungry.","Your stomach rumbles.","You feel cold.","You feel warm.")]") if(prob(4)) - M.confused = max(M.confused, 10) + M.Confused(10) if(volume >= 50 && prob(25)) if(prob(10)) - M.drowsyness = max(M.drowsyness, 10) + M.Drowsy(10) ..() /datum/reagent/fliptonium @@ -514,19 +501,6 @@ process_flags = ORGANIC | SYNTHETIC //Flipping for everyone! addiction_chance = 10 -/datum/chemical_reaction/fliptonium - name = "fliptonium" - id = "fliptonium" - result = "fliptonium" - required_reagents = list("ephedrine" = 1, "liquid_dark_matter" = 1, "chocolate" = 1, "ginsonic" = 1) - result_amount = 4 - mix_message = "The mixture swirls around excitedly!" - -/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST || method == TOUCH) - M.SpinAnimation(speed = 12, loops = -1) - ..() - /datum/reagent/fliptonium/on_mob_life(mob/living/M) if(current_cycle == 5) M.SpinAnimation(speed = 11, loops = -1) @@ -545,7 +519,7 @@ if(current_cycle == 50) M.SpinAnimation(speed = 4, loops = -1) - M.drowsyness = max(0, M.drowsyness-6) + M.AdjustDrowsy(-6) M.AdjustParalysis(-1.5) M.AdjustStunned(-1.5) M.AdjustWeakened(-1.5) @@ -553,7 +527,12 @@ M.SetSleeping(0) ..() -/datum/reagent/fliptonium/reagent_deleted(mob/living/M) +/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST || method == TOUCH) + M.SpinAnimation(speed = 12, loops = -1) + ..() + +/datum/reagent/fliptonium/on_mob_delete(mob/living/M) M.SpinAnimation(speed = 12, loops = -1) /datum/reagent/fliptonium/overdose_process(mob/living/M, severity) @@ -561,7 +540,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] can't seem to control their legs!") - M.confused += 33 + M.AdjustConfused(33) M.Weaken(2) else if(effect <= 4) M.visible_message("[M]'s hands flip out and flail everywhere!") @@ -592,20 +571,11 @@ description = "Ultra-Lube is an enhanced lubricant which induces effect similar to Methamphetamine in synthetic users by drastically reducing internal friction and increasing cooling capabilities." reagent_state = LIQUID color = "#1BB1FF" - process_flags = SYNTHETIC overdose_threshold = 20 addiction_chance = 60 metabolization_rate = 0.6 -/datum/chemical_reaction/lube/ultra - name = "Ultra-Lube" - id = "ultralube" - result = "ultralube" - required_reagents = list("lube" = 2, "formaldehyde" = 1, "cryostylane" = 1) - result_amount = 2 - mix_message = "The mixture darkens and appears to partially vaporize into a chilling aerosol." - /datum/reagent/lube/ultra/on_mob_life(mob/living/M) var/high_message = pick("You feel your servos whir!", "You feel like you need to go faster.", "You feel like you were just overclocked!") if(prob(1)) @@ -624,7 +594,7 @@ M.emote(pick("twitch", "shiver")) ..() -/datum/reagent/lube/ultra/reagent_deleted(mob/living/M) +/datum/reagent/lube/ultra/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOREALLYFAST ..() @@ -655,7 +625,7 @@ /datum/reagent/surge/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) + M.Druggy(15) var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.") if(prob(1)) if(prob(1)) @@ -680,13 +650,5 @@ B.pixel_x = rand(-20, 0) B.pixel_y = rand(-20, 0) B.icon = I - M.adjustFireLoss(rand(1,5)*REM) - M.adjustBruteLoss(rand(1,5)*REM) - -/datum/chemical_reaction/surge - name = "Surge" - id = "surge" - result = "surge" - required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 6 - mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity." + M.adjustFireLoss(rand(1,5)*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(rand(1,5)*REAGENTS_EFFECT_MULTIPLIER) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm new file mode 100644 index 00000000000..e2aef002060 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -0,0 +1,835 @@ +/////////////////////////Food Reagents//////////////////////////// +// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food +// condiments, additives, and such go. + +/datum/reagent/consumable + name = "Consumable" + id = "consumable" + var/nutriment_factor = 1 * REAGENTS_METABOLISM + var/diet_flags = DIET_OMNI | DIET_HERB | DIET_CARN + +/datum/reagent/consumable/on_mob_life(mob/living/M) + if(!(M.mind in ticker.mode.vampires)) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients + H.nutrition += nutriment_factor // For hunger and fatness + ..() + +/datum/reagent/consumable/nutriment // Pure nutriment, universally digestable and thus slightly less effective + name = "Nutriment" + id = "nutriment" + description = "A questionable mixture of various pure nutrients commonly found in processed foods." + reagent_state = SOLID + nutriment_factor = 12 * REAGENTS_METABOLISM + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M) + if(!(M.mind in ticker.mode.vampires)) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients + if(prob(50)) + M.adjustBruteLoss(-1) + if(H.species.exotic_blood) + H.vessel.add_reagent(H.species.exotic_blood, 0.4) + else + if(!(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.4) + ..() + +/datum/reagent/consumable/nutriment/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores + name = "Protein" + id = "protein" + description = "Various essential proteins and fats commonly found in animal flesh and blood." + nutriment_factor = 15 * REAGENTS_METABOLISM + diet_flags = DIET_CARN | DIET_OMNI + +/datum/reagent/consumable/nutriment/plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores + name = "Plant-matter" + id = "plantmatter" + description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce." + nutriment_factor = 15 * REAGENTS_METABOLISM + diet_flags = DIET_HERB | DIET_OMNI + +/datum/reagent/consumable/vitamin + name = "Vitamin" + id = "vitamin" + description = "All the best vitamins, minerals, and carbohydrates the body needs in pure form." + reagent_state = SOLID + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/consumable/vitamin/on_mob_life(mob/living/M) + if(prob(50)) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.exotic_blood) + H.vessel.add_reagent(H.species.exotic_blood, 0.5) + else + if(!(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.5) + ..() + +/datum/reagent/consumable/soysauce + name = "Soysauce" + id = "soysauce" + description = "A salty sauce made from the soy plant." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#792300" // rgb: 121, 35, 0 + +/datum/reagent/consumable/ketchup + name = "Ketchup" + id = "ketchup" + description = "Ketchup, catsup, whatever. It's tomato paste." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#731008" // rgb: 115, 16, 8 + +/datum/reagent/consumable/capsaicin + name = "Capsaicin Oil" + id = "capsaicin" + description = "This is what makes chilis hot." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + +/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 15) + M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("frostoil")) + holder.remove_reagent("frostoil", 5) + if(isslime(M)) + M.bodytemperature += rand(5,20) + if(15 to 25) + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(10,20) + if(25 to 35) + M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(15,20) + if(35 to INFINITY) + M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(20,25) + ..() + +/datum/reagent/consumable/condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + description = "This shit goes in pepperspray." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + +/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/M) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") + ..() + +/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/victim = M + var/mouth_covered = 0 + var/eyes_covered = 0 + var/obj/item/safe_thing = null + if( victim.wear_mask ) + if( victim.wear_mask.flags & MASKCOVERSEYES ) + eyes_covered = 1 + safe_thing = victim.wear_mask + if( victim.wear_mask.flags & MASKCOVERSMOUTH ) + mouth_covered = 1 + safe_thing = victim.wear_mask + if( victim.head ) + if( victim.head.flags & MASKCOVERSEYES ) + eyes_covered = 1 + safe_thing = victim.head + if( victim.head.flags & MASKCOVERSMOUTH ) + mouth_covered = 1 + safe_thing = victim.head + if(victim.glasses) + eyes_covered = 1 + if( !safe_thing ) + safe_thing = victim.glasses + if( eyes_covered && mouth_covered ) + to_chat(victim, "Your [safe_thing] protects you from the pepperspray!") + return + else if( mouth_covered ) // Reduced effects if partially protected + to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!") + if(prob(5)) + victim.emote("scream") + victim.EyeBlurry(3) + victim.EyeBlind(1) + victim.Confused(3) + victim.damageoverlaytemp = 60 + victim.Weaken(3) + victim.drop_item() + return + else if( eyes_covered ) // Eye cover is better than mouth cover + to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!") + victim.EyeBlurry(3) + victim.damageoverlaytemp = 30 + return + else // Oh dear :D + if(prob(5)) + victim.emote("scream") + to_chat(victim, "You're sprayed directly in the eyes with pepperspray!") + victim.EyeBlurry(5) + victim.EyeBlind(2) + victim.Confused(6) + victim.damageoverlaytemp = 75 + victim.Weaken(5) + victim.drop_item() + +/datum/reagent/consumable/frostoil + name = "Frost Oil" + id = "frostoil" + description = "A special oil that noticably chills the body. Extraced from Icepeppers." + reagent_state = LIQUID + color = "#8BA6E9" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/consumable/frostoil/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 15) + M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("capsaicin")) + holder.remove_reagent("capsaicin", 5) + if(isslime(M)) + M.bodytemperature -= rand(5,20) + if(15 to 25) + M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature -= rand(10,20) + if(25 to 35) + M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(prob(1)) + M.emote("shiver") + if(isslime(M)) + M.bodytemperature -= rand(15,20) + if(35 to INFINITY) + M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(prob(1)) + M.emote("shiver") + if(isslime(M)) + M.bodytemperature -= rand(20,25) + ..() + +/datum/reagent/consumable/frostoil/reaction_turf(turf/T, volume) + if(volume >= 5) + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(15,30)) + +/datum/reagent/consumable/sodiumchloride + name = "Salt" + id = "sodiumchloride" + description = "Sodium chloride, common table salt." + reagent_state = SOLID + color = "#B1B0B0" + overdose_threshold = 100 + +/datum/reagent/consumable/sodiumchloride/overdose_process(mob/living/M, severity) + if(prob(70)) + M.adjustBrainLoss(1) + ..() + +/datum/reagent/consumable/blackpepper + name = "Black Pepper" + id = "blackpepper" + description = "A powder ground from peppercorns. *AAAACHOOO*" + reagent_state = SOLID + +/datum/reagent/consumable/cocoa + name = "Cocoa Powder" + id = "cocoa" + description = "A fatty, bitter paste made from cocoa beans." + reagent_state = SOLID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And cocoa beans." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#403010" // rgb: 64, 48, 16 + +/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/M) + if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + +/datum/reagent/consumable/sprinkles + name = "Sprinkles" + id = "sprinkles" + description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." + color = "#FF00FF" // rgb: 255, 0, 255 + +/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M) + if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate")) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/cornoil + name = "Corn Oil" + id = "cornoil" + description = "An oil derived from various types of corn." + reagent_state = LIQUID + nutriment_factor = 20 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, volume) + if(!istype(T)) + return + if(volume >= 3) + T.MakeSlippery() + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot) + var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles()) + lowertemp.temperature = max(min(lowertemp.temperature-2000, lowertemp.temperature / 2), 0) + lowertemp.react() + T.assume_air(lowertemp) + qdel(hotspot) + +/datum/reagent/consumable/enzyme + name = "Denatured Enzyme" + id = "enzyme" + description = "Heated beyond usefulness, this enzyme is now worthless." + reagent_state = LIQUID + color = "#282314" // rgb: 54, 94, 48 + +/datum/reagent/consumable/dry_ramen + name = "Dry Ramen" + id = "dry_ramen" + description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water." + reagent_state = SOLID + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_ramen + name = "Hot Ramen" + id = "hot_ramen" + description = "The noodles are boiled, the flavors are artificial, just like being back in school." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/M) + if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + +/datum/reagent/consumable/hell_ramen + name = "Hell Ramen" + id = "hell_ramen" + description = "The noodles are boiled, the flavors are artificial, just like being back in school." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/M) + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + ..() + +/datum/reagent/consumable/flour + name = "flour" + id = "flour" + description = "This is what you rub all over yourself to pretend to be a ghost." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 0, 0, 0 + +/datum/reagent/consumable/flour/reaction_turf(turf/T, volume) + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/flour(T) + +/datum/reagent/consumable/rice + name = "Rice" + id = "rice" + description = "Enjoy the great taste of nothing." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 0, 0, 0 + +/datum/reagent/consumable/cherryjelly + name = "Cherry Jelly" + id = "cherryjelly" + description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." + reagent_state = LIQUID + color = "#801E28" // rgb: 128, 30, 40 + +/datum/reagent/consumable/egg + name = "Egg" + id = "egg" + description = "A runny and viscous mixture of clear and yellow fluids." + reagent_state = LIQUID + color = "#F0C814" + +/datum/reagent/consumable/egg/on_mob_life(mob/living/M) + if(prob(8)) + M.emote("fart") + if(prob(3)) + M.reagents.add_reagent("cholesterol", rand(1,2)) + ..() + +/datum/reagent/consumable/corn_starch + name = "Corn Starch" + id = "corn_starch" + description = "The powdered starch of maize, derived from the kernel's endosperm. Used as a thickener for gravies and puddings." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/corn_syrup + name = "Corn Syrup" + id = "corn_syrup" + description = "A sweet syrup derived from corn starch that has had its starches converted into maltose and other sugars." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/corn_syrup/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 1.2) + ..() + +/datum/reagent/consumable/vhfcs + name = "Very-high-fructose corn syrup" + id = "vhfcs" + description = "An incredibly sweet syrup, created from corn syrup treated with enzymes to convert its sugars into fructose." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/vhfcs/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 2.4) + ..() + +/datum/reagent/consumable/honey + name = "Honey" + id = "honey" + description = "A sweet substance produced by bees through partial digestion. Bee barf." + reagent_state = LIQUID + color = "#d3a308" + +/datum/reagent/consumable/honey/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 0.4) + if(prob(20)) + M.adjustBruteLoss(-3) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/chocolate + name = "Chocolate" + id = "chocolate" + description = "Chocolate is a delightful product derived from the seeds of the theobroma cacao tree." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM //same as pure cocoa powder, because it makes no sense that chocolate won't fill you up and make you fat + color = "#2E2418" + drink_icon = "chocolateglass" + drink_name = "Glass of chocolate" + drink_desc = "Tasty" + +/datum/reagent/consumable/chocolate/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 0.8) + ..() + +/datum/reagent/consumable/chocolate/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/choc_pile(T) + +/datum/reagent/consumable/mugwort + name = "Mugwort" + id = "mugwort" + description = "A rather bitter herb once thought to hold magical protective properties." + reagent_state = LIQUID + color = "#21170E" + +/datum/reagent/consumable/mugwort/on_mob_life(mob/living/M) + if(ishuman(M) && M.mind) + if(M.mind.special_role == SPECIAL_ROLE_WIZARD) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/consumable/porktonium + name = "Porktonium" + id = "porktonium" + description = "A highly-radioactive pork byproduct first discovered in hotdogs." + reagent_state = LIQUID + color = "#AB5D5D" + metabolization_rate = 0.2 + overdose_threshold = 133 + +/datum/reagent/consumable/porktonium/overdose_process(mob/living/M, severity) + if(prob(15)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("radium", 15) + M.reagents.add_reagent("cyanide", 10) + +/datum/reagent/consumable/chicken_soup + name = "Chicken soup" + id = "chicken_soup" + description = "An old household remedy for mild illnesses." + reagent_state = LIQUID + color = "#B4B400" + metabolization_rate = 0.2 + nutriment_factor = 2 + +/datum/reagent/consumable/cheese + name = "Cheese" + id = "cheese" + description = "Some cheese. Pour it out to make it solid." + reagent_state = SOLID + color = "#FFFF00" + metabolization_rate = 0 //heheheh + nutriment_factor = 0 + +/datum/reagent/consumable/cheese/on_mob_life(mob/living/M) + if(prob(3)) + M.reagents.add_reagent("cholesterol", rand(1,2)) + ..() + +/datum/reagent/consumable/cheese/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge(T) + +/datum/reagent/consumable/fake_cheese + name = "Cheese substitute" + id = "fake_cheese" + description = "A cheese-like substance derived loosely from actual cheese." + reagent_state = LIQUID + color = "#B2B139" + overdose_threshold = 50 + +/datum/reagent/consumable/fake_cheese/overdose_process(mob/living/M, severity) + if(prob(8)) + to_chat(M, "You feel something squirming in your stomach. Your thoughts turn to cheese and you begin to sweat.") + M.adjustToxLoss(rand(1,2)) + +/datum/reagent/consumable/weird_cheese + name = "Weird cheese" + id = "weird_cheese" + description = "Hell, I don't even know if this IS cheese. Whatever it is, it ain't normal. If you want to, pour it out to make it solid." + reagent_state = SOLID + color = "#50FF00" + metabolization_rate = 0 //heheheh + addiction_chance = 5 + nutriment_factor = 0 + +/datum/reagent/consumable/weird_cheese/on_mob_life(mob/living/M) + if(prob(5)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + ..() + +/datum/reagent/consumable/weird_cheese/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/weirdcheesewedge(T) + +/datum/reagent/consumable/beans + name = "Refried beans" + id = "beans" + description = "A dish made of mashed beans cooked with lard." + reagent_state = LIQUID + color = "#684435" + +/datum/reagent/consumable/beans/on_mob_life(mob/living/M) + if(prob(10)) + M.emote("fart") + ..() + +/datum/reagent/consumable/bread + name = "Bread" + id = "bread" + description = "Bread! Yep, bread." + reagent_state = SOLID + color = "#9C5013" + +/datum/reagent/consumable/soybeanoil + name = "Space-soybean oil" + id = "soybeanoil" + description = "An oil derived from extra-terrestrial soybeans." + reagent_state = LIQUID + color = "#B1B0B0" + +/datum/reagent/consumable/soybeanoil/on_mob_life(mob/living/M) + if(prob(10)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("porktonium", 5) + ..() + +/datum/reagent/consumable/hydrogenated_soybeanoil + name = "Partially hydrogenated space-soybean oil" + id = "hydrogenated_soybeanoil" + description = "An oil derived from extra-terrestrial soybeans, with additional hydrogen atoms added to convert it into a saturated form." + reagent_state = LIQUID + color = "#B1B0B0" + metabolization_rate = 0.2 + overdose_threshold = 75 + +/datum/reagent/consumable/hydrogenated_soybeanoil/on_mob_life(mob/living/M) + if(prob(15)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("porktonium", 5) + if(volume >= 75) + metabolization_rate = 0.4 + else + metabolization_rate = 0.2 + ..() + +/datum/reagent/consumable/hydrogenated_soybeanoil/overdose_process(mob/living/M, severity) + if(prob(33)) + to_chat(M, "You feel horribly weak.") + if(prob(10)) + to_chat(M, "You cannot breathe!") + M.adjustOxyLoss(5) + if(prob(5)) + to_chat(M, "You feel a sharp pain in your chest!") + M.adjustOxyLoss(25) + M.Stun(5) + M.Paralyse(10) + +/datum/reagent/consumable/meatslurry + name = "Meat Slurry" + id = "meatslurry" + description = "A paste comprised of highly-processed organic material. Uncomfortably similar to deviled ham spread." + reagent_state = LIQUID + color = "#EBD7D7" + +/datum/reagent/consumable/meatslurry/on_mob_life(mob/living/M) + if(prob(4)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + ..() + +/datum/reagent/consumable/meatslurry/reaction_turf(turf/T, volume) + if(volume >= 5 && prob(10) && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) + +/datum/reagent/consumable/mashedpotatoes + name = "Mashed potatoes" + id = "mashedpotatoes" + description = "A starchy food paste made from boiled potatoes." + reagent_state = SOLID + color = "#D6D9C1" + +/datum/reagent/consumable/gravy + name = "Gravy" + id = "gravy" + description = "A savory sauce made from a simple meat-dripping roux and milk." + reagent_state = LIQUID + color = "#B4641B" + +/datum/reagent/consumable/beff + name = "Beff" + id = "beff" + description = "An advanced blend of mechanically-recovered meat and textured synthesized protein product notable for its unusual crystalline grain when sliced." + reagent_state = SOLID + color = "#AC7E67" + +/datum/reagent/consumable/beff/on_mob_life(mob/living/M) + if(prob(5)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent(pick("blood", "corn_syrup", "synthflesh", "hydrogenated_soybeanoil", "porktonium", "toxic_slurry"), 0.8) + else if(prob(6)) + to_chat(M, "[pick("You feel ill.","Your stomach churns.","You feel queasy.","You feel sick.")]") + M.emote(pick("groan","moan")) + ..() + +/datum/reagent/consumable/pepperoni + name = "Pepperoni" + id = "pepperoni" + description = "An Italian-American variety of salami usually made from beef and pork" + reagent_state = SOLID + color = "#AC7E67" + +/datum/reagent/consumable/pepperoni/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(H.wear_mask) + to_chat(H, "The pepperoni bounces off your mask!") + return + + if(H.head) + to_chat(H, "Your mask protects you from the errant pepperoni!") + return + + if(prob(50)) + M.adjustBruteLoss(1) + playsound(M, 'sound/effects/woodhit.ogg', 50, 1) + to_chat(M, "A slice of pepperoni slaps you!") + else + M.emote("burp") + to_chat(M, "My goodness, that was tasty!") + + +///Food Related, but non-nutritious + +/datum/reagent/sugar + name = "Sugar" + id = "sugar" + description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 255, 255, 255 + overdose_threshold = 200 // Hyperglycaemic shock + +/datum/reagent/sugar/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(current_cycle >= 90) + M.AdjustJitter(2) + if(prob(50)) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + if(prob(4)) + M.reagents.add_reagent("epinephrine", 1.2) + ..() + +/datum/reagent/sugar/overdose_start(mob/living/M) + to_chat(M, "You pass out from hyperglycemic shock!") + M.emote("collapse") + ..() + +/datum/reagent/sugar/overdose_process(mob/living/M, severity) + M.Paralyse(3 * severity) + M.Weaken(4 * severity) + if(prob(8)) + M.adjustToxLoss(severity) + +/datum/reagent/questionmark // food poisoning + name = "????" + id = "????" + description = "A gross and unidentifiable substance." + reagent_state = LIQUID + color = "#63DE63" + +/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + M.Stun(2) + M.Weaken(2) + to_chat(M, "Ugh! Eating that was a terrible idea!") + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + +/datum/reagent/msg + name = "Monosodium glutamate" + id = "msg" + description = "Monosodium Glutamate is a sodium salt known chiefly for its use as a controversial flavor enhancer." + reagent_state = LIQUID + color = "#F5F5F5" + metabolization_rate = 0.2 + +/datum/reagent/msg/on_mob_life(mob/living/M) + if(prob(5)) + if(prob(10)) + M.adjustToxLoss(rand(2.4)) + if(prob(7)) + to_chat(M, "A horrible migraine overpowers you.") + M.Stun(rand(2,5)) + ..() + +/datum/reagent/msg/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + to_chat(M, "That tasted amazing!") + +/datum/reagent/cholesterol + name = "cholesterol" + id = "cholesterol" + description = "Pure cholesterol. Probably not very good for you." + reagent_state = LIQUID + color = "#FFFAC8" + +/datum/reagent/cholesterol/on_mob_life(mob/living/M) + if(volume >= 25 && prob(volume*0.15)) + to_chat(M, "Your chest feels [pick("weird","uncomfortable","nasty","gross","odd","unusual","warm")]!") + M.adjustToxLoss(rand(1,2)) + else if(volume >= 45 && prob(volume*0.08)) + to_chat(M, "Your chest [pick("hurts","stings","aches","burns")]!") + M.adjustToxLoss(rand(2,4)) + M.Stun(1) + else if(volume >= 150 && prob(volume*0.01)) + to_chat(M, "Your chest is burning with pain!") + M.Stun(1) + M.Weaken(1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.heart_attack) + H.heart_attack = 1 + ..() + +/datum/reagent/fungus + name = "Space fungus" + id = "fungus" + description = "Scrapings of some unknown fungus found growing on the station walls." + reagent_state = LIQUID + color = "#C87D28" + +/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + var/ranchance = rand(1,10) + if(ranchance == 1) + to_chat(M, "You feel very sick.") + M.reagents.add_reagent("toxin", rand(1,5)) + else if(ranchance <= 5) + to_chat(M, "That tasted absolutely FOUL.") + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + else + to_chat(M, "Yuck!") + +/datum/reagent/ectoplasm + name = "Ectoplasm" + id = "ectoplasm" + description = "A bizarre gelatinous substance supposedly derived from ghosts." + reagent_state = LIQUID + color = "#8EAE7B" + process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell + +/datum/reagent/ectoplasm/on_mob_life(mob/living/M) + var/spooky_message = pick("You notice something moving out of the corner of your eye, but nothing is there...", "Your eyes twitch, you feel like something you can't see is here...", "You've got the heebie-jeebies.", "You feel uneasy.", "You shudder as if cold...", "You feel something gliding across your back...") + if(prob(8)) + to_chat(M, "[spooky_message]") + ..() + +/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.") + to_chat(M, "[spooky_eat]") + +/datum/reagent/ectoplasm/reaction_turf(turf/T, volume) + if(volume >= 10 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(T) + +///Vomit/// + +/datum/reagent/consumable/bread/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/breadslice(T) + +/datum/reagent/vomit + name = "Vomit" + id = "vomit" + description = "Looks like someone lost their lunch. And then collected it. Yuck." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/vomit/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/vomit(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) + +/datum/reagent/greenvomit + name = "Green vomit" + id = "green_vomit" + description = "Whoa, that can't be natural. That's horrible." + reagent_state = LIQUID + color = "#78FF74" + +/datum/reagent/greenvomit/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/vomit/green(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) \ No newline at end of file diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm similarity index 56% rename from code/modules/reagents/newchem/medicine.dm rename to code/modules/reagents/chemistry/reagents/medicine.dm index 777c10ebfd7..b3b94ff7e88 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -1,10 +1,151 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/medicine + name = "Medicine" + id = "medicine" -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/medicine/hydrocodone + name = "Hydrocodone" + id = "hydrocodone" + description = "An extremely effective painkiller; may have long term abuse consequences." + reagent_state = LIQUID + color = "#C805DC" + metabolization_rate = 0.3 // Lasts 1.5 minutes for 15 units + shock_reduction = 200 -/datum/reagent/silver_sulfadiazine +/datum/reagent/medicine/hydrocodone/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.traumatic_shock < 100) + H.shock_stage = 0 + ..() + +/datum/reagent/medicine/sterilizine + name = "Sterilizine" + id = "sterilizine" + description = "Sterilizes wounds in preparation for surgery." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + //makes you squeaky clean +/datum/reagent/medicine/sterilizine/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.germ_level -= min(volume*20, M.germ_level) + +/datum/reagent/medicine/sterilizine/reaction_obj(obj/O, volume) + O.germ_level -= min(volume*20, O.germ_level) + +/datum/reagent/medicine/sterilizine/reaction_turf(turf/T, volume) + T.germ_level -= min(volume*20, T.germ_level) + +/datum/reagent/medicine/synaptizine + name = "Synaptizine" + id = "synaptizine" + description = "Synaptizine is used to treat neuroleptic shock. Can be used to help remove disabling symptoms such as paralysis." + reagent_state = LIQUID + color = "#FA46FA" + overdose_threshold = 40 + +/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + M.SetSleeping(0) + if(prob(50)) + M.adjustBrainLoss(-1.0) + ..() + +/datum/reagent/medicine/synaptizine/overdose_process(mob/living/M, severity) + var/effect = ..() + if(severity == 1) + if(effect <= 1) + M.visible_message("[M] suddenly and violently vomits!") + M.fakevomit(no_text = 1) + else if(effect <= 3) + M.emote(pick("groan","moan")) + if(effect <= 8) + M.adjustToxLoss(1) + else if(severity == 2) + if(effect <= 2) + M.visible_message("[M] suddenly and violently vomits!") + M.fakevomit(no_text = 1) + else if(effect <= 5) + M.visible_message("[M] staggers and drools, their eyes bloodshot!") + M.Dizzy(8) + M.Weaken(4) + if(effect <= 15) + M.adjustToxLoss(1) + +/datum/reagent/medicine/mitocholide + name = "Mitocholide" + id = "mitocholide" + description = "A specialized drug that stimulates the mitochondria of cells to encourage healing of internal organs." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + +/datum/reagent/medicine/mitocholide/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + //Mitocholide is hard enough to get, it's probably fair to make this all internal organs + for(var/name in H.internal_organs) + var/obj/item/organ/internal/I = H.get_int_organ(name) + if(I.damage > 0) + I.damage = max(I.damage-0.4, 0) + ..() + +/datum/reagent/medicine/mitocholide/reaction_obj(obj/O, volume) + if(istype(O, /obj/item/organ)) + var/obj/item/organ/Org = O + Org.rejuvenate() + +/datum/reagent/medicine/cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly." + reagent_state = LIQUID + color = "#0000C8" // rgb: 200, 165, 220 + heart_rate_decrease = 1 + +/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/M) + if(M.bodytemperature < 265) + M.adjustCloneLoss(-4) + M.adjustOxyLoss(-10) + M.adjustToxLoss(-3) + M.adjustBruteLoss(-12) + M.adjustFireLoss(-12) + M.status_flags &= ~DISFIGURED + ..() + +/datum/reagent/medicine/rezadone + name = "Rezadone" + id = "rezadone" + description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage." + reagent_state = SOLID + color = "#669900" // rgb: 102, 153, 0 + overdose_threshold = 30 + +/datum/reagent/medicine/rezadone/on_mob_life(mob/living/M) + M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. + M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + M.status_flags &= ~DISFIGURED + ..() + +/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + M.Dizzy(5) + M.Jitter(5) + +/datum/reagent/medicine/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + description = "An all-purpose antibiotic agent extracted from space fungus." + reagent_state = LIQUID + color = "#0AB478" + metabolization_rate = 0.2 + +/datum/reagent/medicine/silver_sulfadiazine name = "Silver Sulfadiazine" id = "silver_sulfadiazine" description = "This antibacterial compound is used to treat burn victims." @@ -12,7 +153,11 @@ color = "#F0C814" metabolization_rate = 3 -/datum/reagent/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/M) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustFireLoss(-volume) @@ -24,11 +169,7 @@ to_chat(M, "You feel sick...") ..() -/datum/reagent/silver_sulfadiazine/on_mob_life(mob/living/M) - M.adjustFireLoss(-2*REM) - ..() - -/datum/reagent/styptic_powder +/datum/reagent/medicine/styptic_powder name = "Styptic Powder" id = "styptic_powder" description = "Styptic (aluminium sulfate) powder helps control bleeding and heal physical wounds." @@ -36,7 +177,11 @@ color = "#C8A5DC" metabolization_rate = 3 -/datum/reagent/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/M) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustBruteLoss(-volume) @@ -49,11 +194,7 @@ to_chat(M, "You feel gross!") ..() -/datum/reagent/styptic_powder/on_mob_life(mob/living/M) - M.adjustBruteLoss(-2*REM) - ..() - -/datum/reagent/salglu_solution +/datum/reagent/medicine/salglu_solution name = "Saline-Glucose Solution" id = "salglu_solution" description = "This saline and glucose solution can help stabilize critically injured patients and cleanse wounds." @@ -62,24 +203,24 @@ penetrates_skin = 1 metabolization_rate = 0.15 -/datum/reagent/salglu_solution/on_mob_life(mob/living/M) +/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/M) if(prob(33)) - M.adjustBruteLoss(-2*REM) - M.adjustFireLoss(-2*REM) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD) && prob(33)) H.vessel.add_reagent("blood", 1) ..() -/datum/reagent/synthflesh +/datum/reagent/medicine/synthflesh name = "Synthflesh" id = "synthflesh" description = "A resorbable microfibrillar collagen and protein mixture that can rapidly heal injuries when applied topically." reagent_state = LIQUID color = "#FFEBEB" -/datum/reagent/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustBruteLoss(-1.5*volume) @@ -88,70 +229,27 @@ to_chat(M, "The synthetic flesh integrates itself into your wounds, healing you.") ..() -/datum/reagent/synthflesh/reaction_turf(turf/T, volume) //let's make a mess! +/datum/reagent/medicine/synthflesh/reaction_turf(turf/T, volume) //let's make a mess! if(volume >= 5 && !istype(T, /turf/space)) new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) -/datum/reagent/charcoal +/datum/reagent/medicine/charcoal name = "Charcoal" id = "charcoal" description = "Activated charcoal helps to absorb toxins." reagent_state = LIQUID color = "#000000" -/datum/reagent/charcoal/on_mob_life(mob/living/M) - M.adjustToxLoss(-1.5*REM) +/datum/reagent/medicine/charcoal/on_mob_life(mob/living/M) + M.adjustToxLoss(-1.5*REAGENTS_EFFECT_MULTIPLIER) if(prob(50)) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,1) ..() -/datum/chemical_reaction/charcoal - name = "Charcoal" - id = "charcoal" - result = "charcoal" - required_reagents = list("ash" = 1, "sodiumchloride" = 1) - result_amount = 2 - mix_message = "The mixture yields a fine black powder." - min_temp = 380 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/chemical_reaction/silver_sulfadiazine - name = "Silver Sulfadiazine" - id = "silver_sulfadiazine" - result = "silver_sulfadiazine" - required_reagents = list("ammonia" = 1, "silver" = 1, "sulfur" = 1, "oxygen" = 1, "chlorine" = 1) - result_amount = 5 - mix_message = "A strong and cloying odor begins to bubble from the mixture." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/salglu_solution - name = "Saline-Glucose Solution" - id = "salglu_solution" - result = "salglu_solution" - required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1) - result_amount = 3 - -/datum/chemical_reaction/synthflesh - name = "Synthflesh" - id = "synthflesh" - result = "synthflesh" - required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) - result_amount = 3 - mix_message = "The mixture knits together into a fibrous, bloody mass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/chemical_reaction/styptic_powder - name = "Styptic Powder" - id = "styptic_powder" - result = "styptic_powder" - required_reagents = list("aluminum" = 1, "hydrogen" = 1, "oxygen" = 1, "sacid" = 1) - result_amount = 4 - mix_message = "The solution yields an astringent powder." - -/datum/reagent/omnizine +/datum/reagent/medicine/omnizine name = "Omnizine" id = "omnizine" description = "Omnizine is a highly potent healing medication that can be used to treat a wide range of injuries." @@ -161,16 +259,16 @@ overdose_threshold = 30 addiction_chance = 5 -/datum/reagent/omnizine/on_mob_life(mob/living/M) - M.adjustToxLoss(-1*REM) - M.adjustOxyLoss(-1*REM) - M.adjustBruteLoss(-2*REM) - M.adjustFireLoss(-2*REM) +/datum/reagent/medicine/omnizine/on_mob_life(mob/living/M) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(prob(50)) - M.losebreath -= 1 + M.AdjustLoseBreath(-1) ..() -/datum/reagent/omnizine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/omnizine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) //lesser M.stuttering += 1 @@ -181,7 +279,7 @@ M.Weaken(4) else if(effect <= 3) M.visible_message("[M] completely spaces out for a moment.") - M.confused += 15 + M.AdjustConfused(15) else if(effect <= 5) M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) @@ -204,7 +302,7 @@ M.Dizzy(5) M.Weaken(3) -/datum/reagent/calomel +/datum/reagent/medicine/calomel name = "Calomel" id = "calomel" description = "This potent purgative rids the body of impurities. It is highly toxic however and close supervision is required." @@ -212,74 +310,48 @@ color = "#22AB35" metabolization_rate = 0.8 -/datum/reagent/calomel/on_mob_life(mob/living/M) +/datum/reagent/medicine/calomel/on_mob_life(mob/living/M) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,5) if(M.health > 20) - M.adjustToxLoss(5*REM) + M.adjustToxLoss(5*REAGENTS_EFFECT_MULTIPLIER) if(prob(6)) M.fakevomit() ..() -/datum/chemical_reaction/calomel - name = "Calomel" - id = "calomel" - result = "calomel" - required_reagents = list("mercury" = 1, "chlorine" = 1) - result_amount = 2 - min_temp = 374 - mix_message = "Stinging vapors rise from the solution." - -/datum/reagent/potass_iodide +/datum/reagent/medicine/potass_iodide name = "Potassium Iodide" id = "potass_iodide" description = "Potassium Iodide is a medicinal drug used to counter the effects of radiation poisoning." reagent_state = LIQUID color = "#B4DCBE" -/datum/reagent/potass_iodide/on_mob_life(mob/living/M) +/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M) if(prob(80)) M.radiation = max(0, M.radiation-1) ..() -/datum/chemical_reaction/potass_iodide - name = "Potassium Iodide" - id = "potass_iodide" - result = "potass_iodide" - required_reagents = list("potassium" = 1, "iodine" = 1) - result_amount = 2 - mix_message = "The solution settles calmly and emits gentle fumes." - -/datum/reagent/pen_acid +/datum/reagent/medicine/pen_acid name = "Pentetic Acid" id = "pen_acid" description = "Pentetic Acid is an aggressive chelation agent. May cause tissue damage. Use with caution." reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/pen_acid/on_mob_life(mob/living/M) +/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,4) M.radiation = max(0, M.radiation-7) if(prob(75)) - M.adjustToxLoss(-4*REM) + M.adjustToxLoss(-4*REAGENTS_EFFECT_MULTIPLIER) if(prob(33)) - M.adjustBruteLoss(1*REM) - M.adjustFireLoss(1*REM) + M.adjustBruteLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(1*REAGENTS_EFFECT_MULTIPLIER) ..() - return -/datum/chemical_reaction/pen_acid - name = "Pentetic Acid" - id = "pen_acid" - result = "pen_acid" - required_reagents = list("fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1) - result_amount = 6 - mix_message = "The substance becomes very still, emitting a curious haze." - -/datum/reagent/sal_acid +/datum/reagent/medicine/sal_acid name = "Salicylic Acid" id = "sal_acid" description = "This is a is a standard salicylate pain reliever and fever reducer." @@ -289,25 +361,16 @@ shock_reduction = 25 overdose_threshold = 25 -/datum/reagent/sal_acid/on_mob_life(mob/living/M) +/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/M) if(prob(55)) - M.adjustBruteLoss(-2*REM) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.traumatic_shock < 100) H.shock_stage = 0 ..() -/datum/chemical_reaction/sal_acid - name = "Salicyclic Acid" - id = "sal_acid" - result = "sal_acid" - required_reagents = list("sodium" = 1, "phenol" = 1, "carbon" = 1, "oxygen" = 1, "sacid" = 1) - result_amount = 5 - mix_message = "The mixture crystallizes." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/salbutamol +/datum/reagent/medicine/salbutamol name = "Salbutamol" id = "salbutamol" description = "Salbutamol is a common bronchodilation medication for asthmatics. It may help with other breathing problems as well." @@ -315,21 +378,12 @@ color = "#00FFFF" metabolization_rate = 0.2 -/datum/reagent/salbutamol/on_mob_life(mob/living/M) - M.adjustOxyLoss(-6*REM) - M.losebreath = max(0, M.losebreath-4) +/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/M) + M.adjustOxyLoss(-6*REAGENTS_EFFECT_MULTIPLIER) + M.AdjustLoseBreath(-4) ..() -/datum/chemical_reaction/salbutamol - name = "Salbutamol" - id = "salbutamol" - result = "salbutamol" - required_reagents = list("sal_acid" = 1, "lithium" = 1, "aluminum" = 1, "bromine" = 1, "ammonia" = 1) - result_amount = 5 - mix_message = "The solution bubbles freely, creating a head of bluish foam." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/perfluorodecalin +/datum/reagent/medicine/perfluorodecalin name = "Perfluorodecalin" id = "perfluorodecalin" description = "This experimental perfluoronated solvent has applications in liquid breathing and tissue oxygenation. Use with caution." @@ -338,27 +392,17 @@ metabolization_rate = 0.2 addiction_chance = 20 -/datum/reagent/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) - M.adjustOxyLoss(-25*REM) +/datum/reagent/medicine/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) + M.adjustOxyLoss(-25*REAGENTS_EFFECT_MULTIPLIER) if(volume >= 4) - M.losebreath = max(M.losebreath, 6) - M.silent = max(M.silent, 6) + M.LoseBreath(6) + M.Silence(6) if(prob(33)) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/chemical_reaction/perfluorodecalin - name = "Perfluorodecalin" - id = "perfluorodecalin" - result = "perfluorodecalin" - required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1) - result_amount = 3 - min_temp = 370 - mix_message = "The mixture rapidly turns into a dense pink liquid." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ephedrine +/datum/reagent/medicine/ephedrine name = "Ephedrine" id = "ephedrine" description = "Ephedrine is a plant-derived stimulant." @@ -368,14 +412,13 @@ overdose_threshold = 35 addiction_chance = 25 -/datum/reagent/ephedrine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) +/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) - M.adjustStaminaLoss(-1*REM) - if(M.losebreath > 5) - M.losebreath = max(5, M.losebreath-1) + M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.AdjustLoseBreath(-1, bound_lower = 5) if(M.oxyloss > 75) M.adjustOxyLoss(-1) if(M.health < 0 || M.health > 0 && prob(33)) @@ -384,7 +427,7 @@ M.adjustFireLoss(-1) ..() -/datum/reagent/ephedrine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) if(effect <= 1) @@ -405,15 +448,7 @@ if(effect <= 15) M.emote("collapse") -/datum/chemical_reaction/ephedrine - name = "Ephedrine" - id = "ephedrine" - result = "ephedrine" - required_reagents = list("sugar" = 1, "oil" = 1, "hydrogen" = 1, "diethylamine" = 1) - result_amount = 4 - mix_message = "The solution fizzes and gives off toxic fumes." - -/datum/reagent/diphenhydramine +/datum/reagent/medicine/diphenhydramine name = "Diphenhydramine" id = "diphenhydramine" description = "Anti-allergy medication. May cause drowsiness, do not operate heavy machinery while using this." @@ -421,28 +456,19 @@ color = "#5BCBE1" addiction_chance = 10 -/datum/reagent/diphenhydramine/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-20) +/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/M) + M.AdjustJitter(-20) M.reagents.remove_reagent("histamine",3) M.reagents.remove_reagent("itching_powder",3) if(prob(7)) M.emote("yawn") if(prob(3)) M.Stun(2) - M.drowsyness += 1 + M.AdjustDrowsy(1) M.visible_message("[M] looks a bit dazed.") ..() -/datum/chemical_reaction/diphenhydramine - name = "Diphenhydramine" - id = "diphenhydramine" - result = "diphenhydramine" - required_reagents = list("oil" = 1, "carbon" = 1, "bromine" = 1, "diethylamine" = 1, "ethanol" = 1) - result_amount = 4 - mix_message = "The mixture fizzes gently." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/morphine +/datum/reagent/medicine/morphine name = "Morphine" id = "morphine" description = "A strong but highly addictive opiate painkiller with sedative side effects." @@ -452,60 +478,50 @@ addiction_chance = 50 shock_reduction = 50 -/datum/reagent/morphine/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-25) +/datum/reagent/medicine/morphine/on_mob_life(mob/living/M) + M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) if(prob(7)) M.emote("yawn") if(16 to 35) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(36 to INFINITY) M.Paralyse(15) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.traumatic_shock < 100) H.shock_stage = 0 ..() -/datum/reagent/oculine/on_mob_life(mob/living/M) +/datum/reagent/medicine/oculine + name = "Oculine" + id = "oculine" + description = "Oculine is a saline eye medication with mydriatic and antibiotic effects." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/medicine/oculine/on_mob_life(mob/living/M) if(prob(80)) if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) E.damage = max(E.damage-1, 0) - M.eye_blurry = max(M.eye_blurry-1 , 0) - M.adjustEarDamage(-1,0) + M.AdjustEyeBlurry(-1) + M.AdjustEarDamage(-1) if(prob(50)) - M.disabilities &= ~NEARSIGHTED + M.CureNearsighted() if(prob(30)) - M.disabilities &= ~BLIND - M.eye_blind = 0 + M.CureBlind() + M.SetEyeBlind(0) if(M.ear_damage <= 25) if(prob(30)) - M.setEarDamage(-1,0) + M.SetEarDeaf(0) ..() -/datum/chemical_reaction/oculine - name = "Oculine" - id = "oculine" - result = "oculine" - required_reagents = list("atropine" = 1, "spaceacillin" = 1, "salglu_solution" = 1) - result_amount = 3 - mix_message = "The mixture settles, becoming a milky white." - -/datum/reagent/oculine - name = "Oculine" - id = "oculine" - description = "Oculine is a saline eye medication with mydriatic and antibiotic effects." - reagent_state = LIQUID - color = "#C8A5DC" - metabolization_rate = 0.4 - var/cycle_amount = 0 - -/datum/reagent/atropine +/datum/reagent/medicine/atropine name = "Atropine" id = "atropine" description = "Atropine is a potent cardiac resuscitant but it can causes confusion, dizzyness and hyperthermia." @@ -514,33 +530,24 @@ metabolization_rate = 0.2 overdose_threshold = 25 -/datum/reagent/atropine/on_mob_life(mob/living/M) - M.dizziness += 1 - M.confused = max(M.confused, 5) +/datum/reagent/medicine/atropine/on_mob_life(mob/living/M) + M.AdjustDizzy(1) + M.Confused(5) if(prob(4)) M.emote("collapse") - if(M.losebreath > 5) - M.losebreath = max(5, M.losebreath-5) + M.AdjustLoseBreath(-5, bound_lower = 5) if(M.oxyloss > 65) - M.adjustOxyLoss(-10*REM) + M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER) if(M.health < -25) M.adjustToxLoss(-1) - M.adjustBruteLoss(-3*REM) - M.adjustFireLoss(-3*REM) + M.adjustBruteLoss(-3*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-3*REAGENTS_EFFECT_MULTIPLIER) else if(M.health > -60) M.adjustToxLoss(1) M.reagents.remove_reagent("sarin", 20) ..() -/datum/chemical_reaction/atropine - name = "Atropine" - id = "atropine" - result = "atropine" - required_reagents = list("ethanol" = 1, "acetone" = 1, "diethylamine" = 1, "phenol" = 1, "sacid" = 1) - result_amount = 5 - mix_message = "A horrid smell like something died drifts from the mixture." - -/datum/reagent/epinephrine +/datum/reagent/medicine/epinephrine name = "Epinephrine" id = "epinephrine" description = "Epinephrine is a potent neurotransmitter, used in medical emergencies to halt anaphylactic shock and prevent cardiac arrest." @@ -549,8 +556,8 @@ metabolization_rate = 0.2 overdose_threshold = 20 -/datum/reagent/epinephrine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) +/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) if(prob(20)) M.AdjustParalysis(-1) if(prob(20)) @@ -562,17 +569,16 @@ if(prob(5)) M.adjustBrainLoss(-1) holder.remove_reagent("histamine", 15) - if(M.losebreath > 3) - M.losebreath-- + M.AdjustLoseBreath(-1, bound_lower = 3) if(M.oxyloss > 35) - M.adjustOxyLoss(-10*REM) + M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER) if(M.health < -10 && M.health > -65) - M.adjustToxLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/epinephrine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) if(effect <= 1) @@ -593,16 +599,7 @@ if(effect <= 15) M.emote("collapse") -/datum/chemical_reaction/epinephrine - name = "Epinephrine" - id = "epinephrine" - result = "epinephrine" - required_reagents = list("phenol" = 1, "acetone" = 1, "diethylamine" = 1, "oxygen" = 1, "chlorine" = 1, "hydrogen" = 1) - result_amount = 6 - mix_message = "Tiny white crystals precipitate out of the solution." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/strange_reagent +/datum/reagent/medicine/strange_reagent name = "Strange Reagent" id = "strange_reagent" description = "A glowing green fluid highly reminiscent of nuclear waste." @@ -610,7 +607,13 @@ color = "#A0E85E" metabolization_rate = 0.2 -/datum/reagent/strange_reagent/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/M) + if(prob(10)) + M.adjustBruteLoss(2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/M, method=TOUCH, volume) if(isanimal(M)) if(method == TOUCH) var/mob/living/simple_animal/SM = M @@ -642,59 +645,24 @@ add_logs(M, M, "revived", object="strange reagent") //Yes, the logs say you revived yourself. ..() -/datum/reagent/strange_reagent/on_mob_life(mob/living/M) - if(prob(10)) - M.adjustBruteLoss(2*REM) - M.adjustToxLoss(2*REM) - ..() - -/datum/chemical_reaction/strange_reagent - name = "Strange Reagent" - id = "strange_reagent" - result = "strange_reagent" - required_reagents = list("omnizine" = 1, "holywater" = 1, "mutagen" = 1) - result_amount = 3 - mix_message = "The substance begins moving on its own somehow." - -/datum/reagent/life - name = "Life" - id = "life" - description = "Can create a life form, however it is not guaranteed to be friendly. May want to have Security on hot standby." - reagent_state = LIQUID - color = "#C8A5DC" - metabolization_rate = 0.2 - -/datum/chemical_reaction/life - name = "Life" - id = "life" - result = null - required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1) - result_amount = 3 - min_temp = 374 - -/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) - chemical_mob_spawn(holder, 1, "Life") - -/datum/reagent/mannitol/on_mob_life(mob/living/M) - M.adjustBrainLoss(-3) - ..() - -/datum/chemical_reaction/mannitol - name = "Mannitol" - id = "mannitol" - result = "mannitol" - required_reagents = list("sugar" = 1, "hydrogen" = 1, "water" = 1) - result_amount = 3 - mix_message = "The mixture bubbles slowly, making a slightly sweet odor." - -/datum/reagent/mannitol +/datum/reagent/medicine/mannitol name = "Mannitol" id = "mannitol" description = "Mannitol is a sugar alcohol that can help alleviate cranial swelling." color = "#D1D1F1" -/datum/reagent/mutadone/on_mob_life(mob/living/carbon/human/M) - M.jitteriness = 0 +/datum/reagent/medicine/mannitol/on_mob_life(mob/living/M) + M.adjustBrainLoss(-3) + ..() + +/datum/reagent/medicine/mutadone + name = "Mutadone" + id = "mutadone" + description = "Mutadone is an experimental bromide that can cure genetic abnomalities." + color = "#5096C8" + +/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/human/M) + M.SetJitter(0) var/needs_update = M.mutations.len > 0 || M.disabilities > 0 if(needs_update) @@ -711,62 +679,38 @@ H.update_mutations() ..() -/datum/chemical_reaction/mutadone - name = "Mutadone" - id = "mutadone" - result = "mutadone" - required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1) - result_amount = 3 - mix_message = "A foul astringent liquid emerges from the reaction." - - -/datum/reagent/mutadone - name = "Mutadone" - id = "mutadone" - description = "Mutadone is an experimental bromide that can cure genetic abnomalities." - color = "#5096C8" - -/datum/reagent/antihol +/datum/reagent/medicine/antihol name = "Antihol" id = "antihol" description = "A medicine which quickly eliminates alcohol in the body." color = "#009CA8" -/datum/reagent/antihol/on_mob_life(mob/living/M) - M.slurring = 0 +/datum/reagent/medicine/antihol/on_mob_life(mob/living/M) + M.SetSlur(0) M.AdjustDrunk(-4) - M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1) + M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 8, 0, 1) if(M.toxloss <= 25) M.adjustToxLoss(-2.0) ..() -/datum/chemical_reaction/antihol - name = "antihol" - id = "antihol" - result = "antihol" - required_reagents = list("ethanol" = 1, "charcoal" = 1) - result_amount = 2 - mix_message = "A minty and refreshing smell drifts from the effervescent mixture." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/stimulants +/datum/reagent/medicine/stimulants name = "Stimulants" id = "stimulants" description = "Increases run speed and eliminates stuns, can heal minor damage. If overdosed it will deal toxin damage and stun." color = "#C8A5DC" - metabolization_rate = 0.4 + can_synth = 0 -/datum/reagent/stimulants/on_mob_life(mob/living/M) +/datum/reagent/medicine/stimulants/on_mob_life(mob/living/M) if(volume > 5) - M.adjustOxyLoss(-5*REM) - M.adjustToxLoss(-5*REM) - M.adjustBruteLoss(-10*REM) - M.adjustFireLoss(-10*REM) + M.adjustOxyLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-10*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-10*REAGENTS_EFFECT_MULTIPLIER) M.setStaminaLoss(0) - M.slowed = 0 - M.dizziness = max(0,M.dizziness-10) - M.drowsyness = max(0,M.drowsyness-10) - M.confused = 0 + M.SetSlowed(0) + M.AdjustDizzy(-10) + M.AdjustDrowsy(-10) + M.SetConfused(0) M.SetSleeping(0) var/status = CANSTUN | CANWEAKEN | CANPARALYSE M.status_flags &= ~status @@ -778,7 +722,7 @@ M.Stun(3) ..() -/datum/reagent/stimulants/reagent_deleted(mob/living/M) +/datum/reagent/medicine/stimulants/on_mob_delete(mob/living/M) M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE ..() @@ -789,57 +733,49 @@ color = "#C8A5DC" metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 60 + can_synth = 0 /datum/reagent/medicine/stimulative_agent/on_mob_life(mob/living/M) M.status_flags |= GOTTAGOFAST if(M.health < 50 && M.health > 0) - M.adjustOxyLoss(-1*REM) - M.adjustToxLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) M.AdjustParalysis(-3) M.AdjustStunned(-3) M.AdjustWeakened(-3) - M.adjustStaminaLoss(-5*REM) + M.adjustStaminaLoss(-5*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/medicine/stimulative_agent/reagent_deleted(mob/living/M) +/datum/reagent/medicine/stimulative_agent/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOFAST ..() /datum/reagent/medicine/stimulative_agent/overdose_process(mob/living/M, severity) if(prob(33)) - M.adjustStaminaLoss(2.5*REM) - M.adjustToxLoss(1*REM) - M.losebreath++ + M.adjustStaminaLoss(2.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.AdjustLoseBreath(1) -/datum/reagent/insulin +/datum/reagent/medicine/insulin name = "Insulin" id = "insulin" description = "A hormone generated by the pancreas responsible for metabolizing carbohydrates and fat in the bloodstream." reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/insulin/on_mob_life(mob/living/M) +/datum/reagent/medicine/insulin/on_mob_life(mob/living/M) M.reagents.remove_reagent("sugar", 5) ..() - -/datum/reagent/simethicone +/datum/reagent/medicine/simethicone name = "Simethicone" id = "simethicone" description = "This strange liquid seems to have no bubbles on the surface." color = "#14AA46" -/datum/chemical_reaction/Simethicone - name = "Simethicone" - id = "simethicone" - result = "simethicone" - required_reagents = list("hydrogen" = 1, "chlorine" = 1, "silicon" = 1, "oxygen" = 1) - result_amount = 4 - - -/datum/reagent/teporone +/datum/reagent/medicine/teporone name = "Teporone" id = "teporone" description = "This experimental plasma-based compound seems to regulate body temperature." @@ -848,30 +784,21 @@ addiction_chance = 20 overdose_threshold = 50 -/datum/reagent/teporone/on_mob_life(mob/living/M) +/datum/reagent/medicine/teporone/on_mob_life(mob/living/M) if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) else if(M.bodytemperature < 311) M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) ..() -/datum/chemical_reaction/teporone - name = "Teporone" - id = "teporone" - result = "teporone" - required_reagents = list("acetone" = 1, "silicon" = 1, "plasma" = 1) - result_amount = 2 - mix_message = "The mixture turns an odd lavender color." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/haloperidol +/datum/reagent/medicine/haloperidol name = "Haloperidol" id = "haloperidol" description = "Haloperidol is a powerful antipsychotic and sedative. Will help control psychiatric problems, but may cause brain damage." reagent_state = LIQUID color = "#FFDCFF" -/datum/reagent/haloperidol/on_mob_life(mob/living/M) +/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/M) M.reagents.remove_reagent("crank", 5) M.reagents.remove_reagent("methamphetamine", 5) M.reagents.remove_reagent("space_drugs", 5) @@ -882,135 +809,55 @@ M.reagents.remove_reagent("bath_salts", 5) M.reagents.remove_reagent("lsd", 5) M.reagents.remove_reagent("thc", 5) - M.druggy -= 5 - M.hallucination -= 5 - M.jitteriness -= 5 + M.AdjustDruggy(-5) + M.AdjustHallucinate(-5) + M.AdjustJitter(-5) if(prob(50)) - M.drowsyness = max(M.drowsyness, 3) + M.Drowsy(3) if(prob(10)) M.emote("drool") if(prob(20)) M.adjustBrainLoss(1) ..() -/datum/chemical_reaction/haloperidol - name = "Haloperidol" - id = "haloperidol" - result = "haloperidol" - required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminum" = 1, "potass_iodide" = 1, "oil" = 1) - result_amount = 4 - mix_message = "The chemicals mix into an odd pink slush." - - -/datum/reagent/ether +/datum/reagent/medicine/ether name = "Ether" id = "ether" description = "A strong anesthetic and sedative." reagent_state = LIQUID color = "#96DEDE" -/datum/reagent/ether/on_mob_life(mob/living/M) - M.jitteriness = max(M.jitteriness-25,0) +/datum/reagent/medicine/ether/on_mob_life(mob/living/M) + M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) if(prob(7)) M.emote("yawn") if(16 to 35) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(36 to INFINITY) M.Paralyse(15) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) ..() -/datum/chemical_reaction/ether - name = "Ether" - id = "ether" - result = "ether" - required_reagents = list("sacid" = 1, "ethanol" = 1, "oxygen" = 1) - result_amount = 1 - mix_message = "The mixture yields a pungent odor, which makes you tired." - -////////////////////////////// -// Synth-Meds // -////////////////////////////// - -//Degreaser: Mild Purgative / Lube Remover -/datum/reagent/degreaser - name = "Degreaser" - id = "degreaser" - description = "An industrial degreaser which can be used to clean residual build-up from machinery and surfaces." - reagent_state = LIQUID - color = "#CC7A00" - process_flags = SYNTHETIC - -/datum/chemical_reaction/degreaser - name = "Degreaser" - id = "degreaser" - result = "degreaser" - required_reagents = list("oil" = 1, "sterilizine" = 1) - result_amount = 2 - -/datum/reagent/degreaser/reaction_turf(turf/simulated/T, volume) - if(volume >= 1 && istype(T)) - if(T.wet) - T.MakeDry(TURF_WET_LUBE) - -/datum/reagent/degreaser/on_mob_life(mob/living/M) - if(prob(50)) //Same effects as coffee, to help purge ill effects like paralysis - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - M.confused = max(0, M.confused-5) - for(var/datum/reagent/R in M.reagents.reagent_list) - if(R != src) - if(R.id == "ultralube" || R.id == "lube") - //Flushes lube and ultra-lube even faster than other chems - M.reagents.remove_reagent(R.id, 5) - else - M.reagents.remove_reagent(R.id,1) - ..() - -//Liquid Solder: Mannitol -/datum/reagent/liquid_solder - name = "Liquid Solder" - id = "liquid_solder" - description = "A solution formulated to clean and repair damaged connections in posibrains while in use." - reagent_state = LIQUID - color = "#D7B395" - process_flags = SYNTHETIC - -/datum/reagent/liquid_solder/on_mob_life(mob/living/M) - M.adjustBrainLoss(-3) - ..() - -/datum/chemical_reaction/liquid_solder - name = "Liquid Solder" - id = "liquid_solder" - result = "liquid_solder" - required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) - result_amount = 3 - min_temp = 370 - mix_message = "The solution gently swirls with a metallic sheen." - - /datum/reagent/medicine/syndicate_nanites //Used exclusively by Syndicate medical cyborgs name = "Restorative Nanites" id = "syndicate_nanites" description = "Miniature medical robots that swiftly restore bodily damage. May begin to attack their host's cells in high amounts." reagent_state = SOLID color = "#555555" + can_synth = 0 /datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/M) - M.adjustBruteLoss(-5*REM) //A ton of healing - this is a 50 telecrystal investment. - M.adjustFireLoss(-5*REM) - M.adjustOxyLoss(-15*REM) - M.adjustToxLoss(-5*REM) - M.adjustBrainLoss(-15*REM) - M.adjustCloneLoss(-3*REM) + M.adjustBruteLoss(-5*REAGENTS_EFFECT_MULTIPLIER) //A ton of healing - this is a 50 telecrystal investment. + M.adjustFireLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-15*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBrainLoss(-15*REAGENTS_EFFECT_MULTIPLIER) + M.adjustCloneLoss(-3*REAGENTS_EFFECT_MULTIPLIER) ..() - -/datum/reagent/omnizine_diluted +/datum/reagent/medicine/omnizine_diluted name = "Diluted Omnizine" id = "weak_omnizine" description = "Slowly heals all damage types. A far weaker substitute than actual omnizine." @@ -1019,14 +866,14 @@ overdose_threshold = 30 metabolization_rate = 0.1 -/datum/reagent/omnizine_diluted/on_mob_life(mob/living/M) - M.adjustToxLoss(-0.5*REM) - M.adjustOxyLoss(-0.5*REM) - M.adjustBruteLoss(-0.5*REM) - M.adjustFireLoss(-0.5*REM) +/datum/reagent/medicine/omnizine_diluted/on_mob_life(mob/living/M) + M.adjustToxLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/omnizine_diluted/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/omnizine_diluted/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) //lesser M.stuttering += 1 @@ -1037,7 +884,7 @@ M.Weaken(4) else if(effect <= 3) M.visible_message("[M] completely spaces out for a moment.") - M.confused += 15 + M.AdjustConfused(15) else if(effect <= 5) M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) @@ -1059,3 +906,68 @@ M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) M.Weaken(3) + +//virus-specific symptom reagents + +/datum/reagent/medicine/synaphydramine + name = "Diphen-Synaptizine" + id = "synaphydramine" + description = "Reduces drowsiness and hallucinations while also purging histamine from the body." + color = "#EC536D" // rgb: 236, 83, 109 + +/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(holder.has_reagent("lsd")) + holder.remove_reagent("lsd", 5) + if(holder.has_reagent("histamine")) + holder.remove_reagent("histamine", 5) + M.AdjustHallucinate(-10) + if(prob(30)) + M.adjustToxLoss(1) + ..() + +////////////////////////////// +// Synth-Meds // +////////////////////////////// + +//Degreaser: Mild Purgative / Lube Remover +/datum/reagent/medicine/degreaser + name = "Degreaser" + id = "degreaser" + description = "An industrial degreaser which can be used to clean residual build-up from machinery and surfaces." + reagent_state = LIQUID + color = "#CC7A00" + process_flags = SYNTHETIC + +/datum/reagent/medicine/degreaser/on_mob_life(mob/living/M) + if(prob(50)) //Same effects as coffee, to help purge ill effects like paralysis + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + M.AdjustConfused(-5) + for(var/datum/reagent/R in M.reagents.reagent_list) + if(R != src) + if(R.id == "ultralube" || R.id == "lube") + //Flushes lube and ultra-lube even faster than other chems + M.reagents.remove_reagent(R.id, 5) + else + M.reagents.remove_reagent(R.id,1) + ..() + +/datum/reagent/medicine/degreaser/reaction_turf(turf/simulated/T, volume) + if(volume >= 1 && istype(T)) + if(T.wet) + T.MakeDry(TURF_WET_LUBE) + +//Liquid Solder: Mannitol +/datum/reagent/medicine/liquid_solder + name = "Liquid Solder" + id = "liquid_solder" + description = "A solution formulated to clean and repair damaged connections in posibrains while in use." + reagent_state = LIQUID + color = "#D7B395" + process_flags = SYNTHETIC + +/datum/reagent/medicine/liquid_solder/on_mob_life(mob/living/M) + M.adjustBrainLoss(-3) + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/other.dm b/code/modules/reagents/chemistry/reagents/misc.dm similarity index 57% rename from code/modules/reagents/newchem/other.dm rename to code/modules/reagents/chemistry/reagents/misc.dm index 2ff4a18c3d0..bb386d0215c 100644 --- a/code/modules/reagents/newchem/other.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -1,9 +1,189 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 -#define REM REAGENTS_EFFECT_MULTIPLIER +/*/datum/reagent/silicate + name = "Silicate" + id = "silicate" + description = "A compound that can be used to reinforce glass." + reagent_state = LIQUID + color = "#C7FFFF" // rgb: 199, 255, 255 -var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d11141","#00b159","#00aedb","#f37735","#ffc425","#008744","#0057e7","#d62d20","#ffa700") +/datum/reagent/silicate/reaction_obj(obj/O, volume) + if(istype(O, /obj/structure/window)) + if(O:silicate <= 200) + + O:silicate += volume + O:health += volume * 3 + + if(!O:silicateIcon) + var/icon/I = icon(O.icon,O.icon_state,O.dir) + + var/r = (volume / 100) + 1 + var/g = (volume / 70) + 1 + var/b = (volume / 50) + 1 + I.SetIntensity(r,g,b) + O.icon = I + O:silicateIcon = I + else + var/icon/I = O:silicateIcon + + var/r = (volume / 100) + 1 + var/g = (volume / 70) + 1 + var/b = (volume / 50) + 1 + I.SetIntensity(r,g,b) + O.icon = I + O:silicateIcon = I */ + + +/datum/reagent/oxygen + name = "Oxygen" + id = "oxygen" + description = "A colorless, odorless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/nitrogen + name = "Nitrogen" + id = "nitrogen" + description = "A colorless, odorless, tasteless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/hydrogen + name = "Hydrogen" + id = "hydrogen" + description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/potassium + name = "Potassium" + id = "potassium" + description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." + reagent_state = SOLID + color = "#A0A0A0" // rgb: 160, 160, 160 + + +/datum/reagent/sulfur + name = "Sulfur" + id = "sulfur" + description = "A chemical element." + reagent_state = SOLID + color = "#BF8C00" // rgb: 191, 140, 0 + + +/datum/reagent/sodium + name = "Sodium" + id = "sodium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/phosphorus + name = "Phosphorus" + id = "phosphorus" + description = "A chemical element." + reagent_state = SOLID + color = "#832828" // rgb: 131, 40, 40 + + +/datum/reagent/carbon + name = "Carbon" + id = "carbon" + description = "A chemical element." + reagent_state = SOLID + color = "#1C1300" // rgb: 30, 20, 0 + +/datum/reagent/carbon/reaction_turf(turf/T, volume) + if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T)) // Only add one dirt per turf. Was causing people to crash. + new /obj/effect/decal/cleanable/dirt(T) + +/datum/reagent/gold + name = "Gold" + id = "gold" + description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." + reagent_state = SOLID + color = "#F7C430" // rgb: 247, 196, 48 + + +/datum/reagent/silver + name = "Silver" + id = "silver" + description = "A lustrous metallic element regarded as one of the precious metals." + reagent_state = SOLID + color = "#D0D0D0" // rgb: 208, 208, 208 + + +/datum/reagent/aluminum + name = "Aluminum" + id = "aluminum" + description = "A silvery white and ductile member of the boron group of chemical elements." + reagent_state = SOLID + color = "#A8A8A8" // rgb: 168, 168, 168 + + +/datum/reagent/silicon + name = "Silicon" + id = "silicon" + description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." + reagent_state = SOLID + color = "#A8A8A8" // rgb: 168, 168, 168 + + +/datum/reagent/copper + name = "Copper" + id = "copper" + description = "A highly ductile metal." + color = "#6E3B08" // rgb: 110, 59, 8 + + +/datum/reagent/iron + name = "Iron" + id = "iron" + description = "Pure iron is a metal." + reagent_state = SOLID + color = "#C8A5DC" // rgb: 200, 165, 220 + +/datum/reagent/iron/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.8) + ..() + +//foam +/datum/reagent/fluorosurfactant + name = "Fluorosurfactant" + id = "fluorosurfactant" + description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." + reagent_state = LIQUID + color = "#9E6B38" // rgb: 158, 107, 56 + +// metal foaming agent +// this is lithium hydride. Add other recipies (e.g. LiH + H2O -> LiOH + H2) eventually +/datum/reagent/ammonia + name = "Ammonia" + id = "ammonia" + description = "A caustic substance commonly used in fertilizer or household cleaners." + reagent_state = GAS + color = "#404030" // rgb: 64, 64, 48 + +/datum/reagent/diethylamine + name = "Diethylamine" + id = "diethylamine" + description = "A secondary amine, useful as a plant nutrient and as building block for other compounds." + reagent_state = LIQUID + color = "#322D00" + +// Allows you to make planks from any plant that has this reagent in it. +// Also vines with this reagent are considered dense. +/datum/reagent/woodpulp + name = "Wood Pulp" + id = "woodpulp" + description = "A mass of wood fibers." + reagent_state = LIQUID + color = "#B97A57" /datum/reagent/oil name = "Oil" @@ -64,49 +244,12 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 M.adjustToxLoss(1.5) ..() -/datum/chemical_reaction/acetone - name = "acetone" - id = "acetone" - result = "acetone" - required_reagents = list("oil" = 1, "fuel" = 1, "oxygen" = 1) - result_amount = 3 - mix_message = "The smell of paint thinner assaults you as the solution bubbles." - -/datum/chemical_reaction/carpet - name = "carpet" - id = "carpet" - result = "carpet" - required_reagents = list("fungus" = 1, "blood" = 1) - result_amount = 2 - mix_message = "The substance turns thick and stiff, yet soft." - - -/datum/chemical_reaction/oil - name = "Oil" - id = "oil" - result = "oil" - required_reagents = list("fuel" = 1, "carbon" = 1, "hydrogen" = 1) - result_amount = 3 - mix_message = "An iridescent black chemical forms in the container." - -/datum/chemical_reaction/phenol - name = "phenol" - id = "phenol" - result = "phenol" - required_reagents = list("water" = 1, "chlorine" = 1, "oil" = 1) - result_amount = 3 - mix_message = "The mixture bubbles and gives off an unpleasant medicinal odor." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/ash - name = "Ash" - id = "ash" - result = "ash" - required_reagents = list("oil" = 1) - result_amount = 0.5 - min_temp = 480 - mix_sound = null - no_message = 1 +/datum/reagent/saltpetre + name = "Saltpetre" + id = "saltpetre" + description = "Volatile." + reagent_state = LIQUID + color = "#60A584" // rgb: 96, 165, 132 /datum/reagent/colorful_reagent name = "Colorful Reagent" @@ -115,14 +258,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#FFFFFF" -/datum/chemical_reaction/colorful_reagent - name = "colorful_reagent" - id = "colorful_reagent" - result = "colorful_reagent" - required_reagents = list("plasma" = 1, "radium" = 1, "space_drugs" = 1, "cryoxadone" = 1, "triple_citrus" = 1, "stabilizing_agent" = 1) - result_amount = 6 - mix_message = "The substance flashes multiple colors and emits the smell of a pocket protector." - /datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=TOUCH, volume) if(isanimal(M)) M.color = pick(random_color_list) @@ -138,40 +273,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 T.color = pick(random_color_list) ..() -/datum/chemical_reaction/corgium - name = "corgium" - id = "corgium" - result = null - required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1) - result_amount = 3 - min_temp = 374 - -/datum/reagent/corgium - name = "Corgium" - id = "corgium" - description = "Corgi in liquid form. Don't ask." - reagent_state = LIQUID - color = "#F9A635" - -/datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /mob/living/simple_animal/pet/corgi(location) - ..() - -/datum/chemical_reaction/flaptonium - name = "Flaptonium" - id = "flaptonium" - result = null - required_reagents = list("egg" = 1, "colorful_reagent" = 1, "chicken_soup" = 1, "strange_reagent" = 1, "blood" = 1) - result_amount = 5 - min_temp = 374 - mix_message = "The substance turns an airy sky-blue and foams up into a new shape." - -/datum/chemical_reaction/flaptonium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /mob/living/simple_animal/parrot(location) - ..() - /datum/reagent/hair_dye name = "Quantum Hair Dye" id = "hair_dye" @@ -179,13 +280,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#960096" -/datum/chemical_reaction/hair_dye - name = "hair_dye" - id = "hair_dye" - result = "hair_dye" - required_reagents = list("colorful_reagent" = 1, "hairgrownium" = 1) - result_amount = 2 - /datum/reagent/hair_dye/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -208,14 +302,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 color = "#5DDA5D" penetrates_skin = 1 -/datum/chemical_reaction/hairgrownium - name = "hairgrownium" - id = "hairgrownium" - result = "hairgrownium" - required_reagents = list("carpet" = 1, "synthflesh" = 1, "ephedrine" = 1) - result_amount = 3 - mix_message = "The liquid becomes slightly hairy." - /datum/reagent/hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -234,15 +320,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 color = "#5DD95D" penetrates_skin = 1 - -/datum/chemical_reaction/super_hairgrownium - name = "Super Hairgrownium" - id = "super_hairgrownium" - result = "super_hairgrownium" - required_reagents = list("iron" = 1, "methamphetamine" = 1, "hairgrownium" = 1) - result_amount = 3 - mix_message = "The liquid becomes amazingly furry and smells peculiar." - /datum/reagent/super_hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -275,14 +352,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = GAS color = "#D06E27" -/datum/chemical_reaction/fartonium - name = "Fartonium" - id = "fartonium" - result = "fartonium" - required_reagents = list("fake_cheese" = 1, "beans" = 1, "????" = 1, "egg" = 1) - result_amount = 2 - mix_message = "The substance makes a little 'toot' noise and starts to smell pretty bad." - /datum/reagent/fartonium/on_mob_life(mob/living/M) if(prob(66)) M.emote("fart") @@ -299,49 +368,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 M.adjustBruteLoss(4) ..() -/datum/chemical_reaction/soapification - name = "Soapification" - id = "soapification" - result = null - required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles - min_temp = 374 - result_amount = 1 - - -/datum/chemical_reaction/soapification/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/weapon/soap/homemade(location) - -/datum/chemical_reaction/candlefication - name = "Candlefication" - id = "candlefication" - result = null - required_reagents = list("liquidgibs" = 5, "oxygen" = 5) // - min_temp = 374 - result_amount = 1 - -/datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/candle(location) - -/datum/chemical_reaction/meatification - name = "Meatification" - id = "meatification" - result = null - required_reagents = list("liquidgibs" = 10, "nutriment" = 10, "carbon" = 10) - result_amount = 1 - -/datum/chemical_reaction/meatification/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/meatproduct(location) - -/datum/chemical_reaction/lye - name = "lye" - id = "lye" - result = "lye" - required_reagents = list("sodium" = 1, "hydrogen" = 1, "oxygen" = 1) - result_amount = 3 - /datum/reagent/hugs name = "Pure hugs" id = "hugs" @@ -356,9 +382,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#FF83A5" -/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume) - to_chat(M, "You feel loved!") - /datum/reagent/love/on_mob_life(mob/living/M) if(M.a_intent == I_HARM) M.a_intent = I_HELP @@ -378,13 +401,53 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 break ..() -/datum/chemical_reaction/love - name = "pure love" - id = "love" - result = "love" - required_reagents = list("hugs" = 1, "chocolate" = 1) - result_amount = 2 - mix_message = "The substance gives off a lovely scent!" +/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume) + to_chat(M, "You feel loved!") + +/datum/reagent/royal_bee_jelly + name = "royal bee jelly" + id = "royal_bee_jelly" + description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees." + color = "#00ff80" + +/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/M) + if(prob(2)) + M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz...")) + ..() + +/datum/reagent/toxin/coffeepowder + name = "Coffee Grounds" + id = "coffeepowder" + description = "Finely ground Coffee beans, used to make coffee." + reagent_state = SOLID + color = "#5B2E0D" // rgb: 91, 46, 13 + +/datum/reagent/toxin/teapowder + name = "Ground Tea Leaves" + id = "teapowder" + description = "Finely shredded Tea leaves, used for making tea." + reagent_state = SOLID + color = "#7F8400" // rgb: 127, 132, 0 + +//Reagents used for plant fertilizers. +/datum/reagent/toxin/fertilizer + name = "fertilizer" + id = "fertilizer" + description = "A chemical mix good for growing plants with." + reagent_state = LIQUID + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/toxin/fertilizer/eznutrient + name = "EZ Nutrient" + id = "eznutrient" + +/datum/reagent/toxin/fertilizer/left4zed + name = "Left-4-Zed" + id = "left4zed" + +/datum/reagent/toxin/fertilizer/robustharvest + name = "Robust Harvest" + id = "robustharvest" ///Alchemical Reagents @@ -421,22 +484,4 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 id = "triplepiss" description = "Ewwwwwwwww." reagent_state = LIQUID - color = "#857400" - -/datum/reagent/royal_bee_jelly - name = "royal bee jelly" - id = "royal_bee_jelly" - description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees." - color = "#00ff80" - -/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/M) - if(prob(2)) - M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz...")) - ..() - -/datum/chemical_reaction/royal_bee_jelly - name = "royal bee jelly" - id = "royal_bee_jelly" - result = "royal_bee_jelly" - required_reagents = list("mutagen" = 10, "honey" = 40) - result_amount = 5 \ No newline at end of file + color = "#857400" \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_paint.dm b/code/modules/reagents/chemistry/reagents/paint.dm similarity index 100% rename from code/modules/reagents/oldchem/reagents/reagents_paint.dm rename to code/modules/reagents/chemistry/reagents/paint.dm diff --git a/code/modules/reagents/newchem/paradise_pop.dm b/code/modules/reagents/chemistry/reagents/paradise_pop.dm similarity index 76% rename from code/modules/reagents/newchem/paradise_pop.dm rename to code/modules/reagents/chemistry/reagents/paradise_pop.dm index 055b96020db..17fdc2cb444 100644 --- a/code/modules/reagents/newchem/paradise_pop.dm +++ b/code/modules/reagents/chemistry/reagents/paradise_pop.dm @@ -1,4 +1,3 @@ - /* Paradise Pop reagents Created through the bottler machine via bottler_recipes, not through standard reactions @@ -10,7 +9,7 @@ //Paradise Punch: No effect, aside from maybe messages about how tasty it is or something -/datum/reagent/paradise_punch +/datum/reagent/consumable/drink/paradise_punch name = "Paradise Punch" id = "paradise_punch" description = "Tastes just how you'd think Paradise would if you could bottle it." @@ -18,14 +17,14 @@ color = "#cc0044" //Apple-pocalypse: Low chance to cause a goonchem vortex that pulls things within a very small radius (2 tiles?) towards the drinker -/datum/reagent/apple_pocalypse +/datum/reagent/consumable/drink/apple_pocalypse name = "Apple-pocalypse" id = "apple-pocalypse" description = "If doomsday came in fruit form, it'd probably be apples." reagent_state = LIQUID color = "#44FF44" -/datum/reagent/apple_pocalypse/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) goonchem_vortex(T, 0, 2, 1) @@ -33,61 +32,61 @@ ..() //Berry Banned: This one is tasty and safe to drink, might have a low chance of healing a random damage type? -/datum/reagent/berry_banned +/datum/reagent/consumable/drink/berry_banned name = "Berry Banned" id = "berry_banned" description = "Reason for ban: Excessive Flavor." reagent_state = LIQUID color = "#FF44FF" -/datum/reagent/berry_banned/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/berry_banned/on_mob_life(mob/living/M) if(prob(10)) var/heal_type = rand(0, 5) //still prefer the string version switch(heal_type) if(0) - M.adjustBruteLoss(-0.5*REM) + M.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(1) - M.adjustFireLoss(-0.5*REM) + M.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(2) - M.adjustToxLoss(-0.5*REM) + M.adjustToxLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(3) - M.adjustOxyLoss(-0.5*REM) + M.adjustOxyLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(4) - M.adjustCloneLoss(-0.5*REM) + M.adjustCloneLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(5) - M.adjustBrainLoss(-1*REM) + M.adjustBrainLoss(-1*REAGENTS_EFFECT_MULTIPLIER) to_chat(M, "You feel slightly rejuvinated!") ..() //Berry Banned 2: This one is tasty and toxic. Deals toxin damage and MAYBE plays the "BWOINK!" sound if it kills someone? -/datum/reagent/berry_banned2 +/datum/reagent/consumable/drink/berry_banned2 name = "Berry Banned" id = "berry_banned2" description = "Reason for ban: Excessive Flavor." reagent_state = LIQUID color = "#FF44FF" -/datum/reagent/berry_banned2/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/berry_banned2/on_mob_life(mob/living/M) if(prob(50)) - M.adjustToxLoss(2*REM) //double strength of poison berry juice alone, because it's concentrated (this is equal to the damage of normal toxin, less often) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) //double strength of poison berry juice alone, because it's concentrated (this is equal to the damage of normal toxin, less often) if(prob(10)) to_chat(M, "You feel slightly rejuvinated!") //meta this! ..() -/datum/reagent/berry_banned2/on_mob_death(mob/living/M) +/datum/reagent/consumable/drink/berry_banned2/on_mob_death(mob/living/M) M << sound('sound/effects/adminhelp.ogg',0,1,0,25) to_chat(M, "PM from-Administrator: BWOINK!") ..() //Blackeye Brew: Chance to make the drinker say greytider-themed things like "I thought clown was valid!" -/datum/reagent/blackeye_brew +/datum/reagent/consumable/drink/blackeye_brew name = "Blackeye Brew" id = "blackeye_brew" description = "Creamy, smooth flavor, just like the bald heads of the masses. Supposedly aged for 30 years." reagent_state = LIQUID color = "#4d2600" -/datum/reagent/blackeye_brew/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/blackeye_brew/on_mob_life(mob/living/M) if(prob(25)) var/list/tider_talk = list("CLOWN IS VALID, RIGHT?", "SHITMINS! SHITMINS! SHITMINS!", @@ -103,14 +102,14 @@ ..() //Grape Granade: causes the drinker to sometimes burp, has a low chance to cause a goonchem vortex that pushes things within a very small radius (1-2 tiles) away from the drinker -/datum/reagent/grape_granade +/datum/reagent/consumable/drink/grape_granade name = "Grape Granade" id = "grape_granade" description = "Exploding with grape flavor and a favorite among ERT members system-wide." reagent_state = LIQUID color = "#9933ff" -/datum/reagent/grape_granade/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) goonchem_vortex(T, 1, 1, 2) @@ -121,14 +120,14 @@ ..() //Meteor Malt: Sometimes causes screen shakes for the drinker like a meteor impact, low chance to add 1-5 units of a random mineral reagent to the drinker's blood (iron, copper, silver, gold, uranium, carbon, etc) -/datum/reagent/meteor_malt +/datum/reagent/consumable/drink/meteor_malt name = "Meteor Malt" id = "meteor_malt" description = "Soft drinks have been detected on collision course with your tastebuds." reagent_state = LIQUID color = "#cc9900" -/datum/reagent/meteor_malt/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/meteor_malt/on_mob_life(mob/living/M) if(prob(25)) M << sound('sound/effects/meteorimpact.ogg',0,1,0,25) shake_camera(M, 3, 1) @@ -136,4 +135,4 @@ var/amount = rand(1, 5) var/mineral = pick("copper", "iron", "gold", "carbon", "silver", "aluminum", "silicon", "sodiumchloride", "plasma") M.reagents.add_reagent(mineral, amount) - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm new file mode 100644 index 00000000000..a92982a8aaf --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -0,0 +1,302 @@ +/datum/reagent/fuel + name = "Welding fuel" + id = "fuel" + description = "A highly flammable blend of basic hydrocarbons, mostly Acetylene. Useful for both welding and organic chemistry, and can be fortified into a heavier oil." + reagent_state = LIQUID + color = "#060606" + drink_icon = "dr_gibb_glass" + drink_name = "Glass of welder fuel" + drink_desc = "Unless you are an industrial tool, this is probably not safe for consumption." + +/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 10) + return + ..() + +/datum/reagent/plasma + name = "Plasma" + id = "plasma" + description = "The liquid phase of an unusual extraterrestrial compound." + reagent_state = LIQUID + color = "#7A2B94" + +/datum/reagent/plasma/on_mob_life(mob/living/M) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + if(holder.has_reagent("epinephrine")) + holder.remove_reagent("epinephrine", 2) + if(iscarbon(M)) + var/mob/living/carbon/C = M + C.adjustPlasma(10) + ..() + +/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 5) + ..() + + +/datum/reagent/thermite + name = "Thermite" + id = "thermite" + description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." + reagent_state = SOLID + color = "#673910" // rgb: 103, 57, 16 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume) + if(volume >= 5 && istype(W)) + W.thermite = 1 + W.overlays.Cut() + W.overlays = image('icons/effects/effects.dmi',icon_state = "thermite") + +/datum/reagent/glycerol + name = "Glycerol" + id = "glycerol" + description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." + reagent_state = LIQUID + color = "#808080" // rgb: 128, 128, 128 + +/datum/reagent/stabilizing_agent + name = "Stabilizing Agent" + id = "stabilizing_agent" + description = "A chemical that stabilises normally volatile compounds, preventing them from reacting immediately." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/clf3 + name = "Chlorine Trifluoride" + id = "clf3" + description = "An extremely volatile substance, handle with the utmost care." + reagent_state = LIQUID + color = "#FF0000" + metabolization_rate = 4 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/clf3/on_mob_life(mob/living/M) + M.adjust_fire_stacks(2) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) + ..() + +/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume) + if(istype(T, /turf/simulated/floor/plating)) + var/turf/simulated/floor/plating/F = T + if(prob(1)) + F.ChangeTurf(/turf/space) + if(istype(T, /turf/simulated/floor/)) + var/turf/simulated/floor/F = T + if(prob(volume/10)) + F.make_plating() + if(istype(F, /turf/simulated/floor/)) + new /obj/effect/hotspot(F) + if(istype(T, /turf/simulated/wall/)) + var/turf/simulated/wall/W = T + if(prob(volume/10)) + W.ChangeTurf(/turf/simulated/floor) + if(istype(T, /turf/simulated/shuttle/)) + new /obj/effect/hotspot(T) + +/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.adjust_fire_stacks(min(volume/5, 10)) + M.IgniteMob() + M.bodytemperature += 30 + +/datum/reagent/sorium + name = "Sorium" + id = "sorium" + description = "Sends everything flying from the detonation point." + reagent_state = LIQUID + color = "#FFA500" + +/datum/reagent/liquid_dark_matter + name = "Liquid Dark Matter" + id = "liquid_dark_matter" + description = "Sucks everything into the detonation point." + reagent_state = LIQUID + color = "#800080" + +/datum/reagent/blackpowder + name = "Black Powder" + id = "blackpowder" + description = "Explodes. Violently." + reagent_state = LIQUID + color = "#000000" + metabolization_rate = 0.05 + penetrates_skin = 1 + +/datum/reagent/blackpowder/reaction_turf(turf/T, volume) //oh shit + if(volume >= 5 && !istype(T, /turf/space)) + if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in T) //let's not have hundreds of decals of black powder on the same turf + new /obj/effect/decal/cleanable/dirt/blackpowder(T) + +/* +/datum/reagent/blackpowder/on_ex_act() + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + sleep(rand(10,15)) + blackpowder_detonate(holder, volume) + holder.remove_reagent("blackpowder", volume) + return */ + +/datum/reagent/flash_powder + name = "Flash Powder" + id = "flash_powder" + description = "Makes a very bright flash." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/smoke_powder + name = "Smoke Powder" + id = "smoke_powder" + description = "Makes a large cloud of smoke that can carry reagents." + reagent_state = LIQUID + color = "#808080" + +/datum/reagent/sonic_powder + name = "Sonic Powder" + id = "sonic_powder" + description = "Makes a deafening noise." + reagent_state = LIQUID + color = "#0000FF" + +/datum/reagent/phlogiston + name = "Phlogiston" + id = "phlogiston" + description = "Catches you on fire and makes you ignite." + reagent_state = LIQUID + color = "#FF9999" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/phlogiston/on_mob_life(mob/living/M) + M.adjust_fire_stacks(1) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) + ..() + +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) + M.IgniteMob() + ..() + +/datum/reagent/napalm + name = "Napalm" + id = "napalm" + description = "Very flammable." + reagent_state = LIQUID + color = "#FF9999" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/napalm/on_mob_life(mob/living/M) + M.adjust_fire_stacks(1) + ..() + +/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.adjust_fire_stacks(min(volume/4, 20)) + +/datum/reagent/cryostylane + name = "Cryostylane" + id = "cryostylane" + description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the mob down to 0K." + color = "#B2B2FF" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube + if(M.reagents.has_reagent("oxygen")) + M.reagents.remove_reagent("oxygen", 1) + M.bodytemperature -= 30 + ..() + +/datum/reagent/cryostylane/on_tick() + if(holder.has_reagent("oxygen")) + holder.remove_reagent("oxygen", 1) + holder.chem_temp -= 10 + holder.handle_reactions() + ..() + +/datum/reagent/cryostylane/reaction_turf(turf/T, volume) + if(volume >= 5) + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(15,30)) + +/datum/reagent/pyrosium + name = "Pyrosium" + id = "pyrosium" + description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K." + color = "#B20000" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/pyrosium/on_mob_life(mob/living/M) + if(M.reagents.has_reagent("oxygen")) + M.reagents.remove_reagent("oxygen", 1) + M.bodytemperature += 30 + ..() + +/datum/reagent/pyrosium/on_tick() + if(holder.has_reagent("oxygen")) + holder.remove_reagent("oxygen", 1) + holder.chem_temp += 10 + holder.handle_reactions() + ..() + +/datum/reagent/firefighting_foam + name = "Firefighting foam" + id = "firefighting_foam" + description = "Carbon Tetrachloride is a foam used for fire suppression." + reagent_state = LIQUID + color = "#A0A090" + var/cooling_temperature = 3 // more effective than water + +/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume) +// Put out fire + if(method == TOUCH) + M.adjust_fire_stacks(-(volume / 5)) // more effective than water + M.ExtinguishMob() + +/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) + if(istype(O)) + O.extinguish() + +/datum/reagent/firefighting_foam/reaction_turf(turf/simulated/T, volume) + if(!istype(T)) + return + var/CT = cooling_temperature + new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot) + var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles()) + lowertemp.temperature = max(min(lowertemp.temperature-(CT*1000), lowertemp.temperature / CT), 0) + lowertemp.react() + T.assume_air(lowertemp) + qdel(hotspot) + +/datum/reagent/plasma_dust + name = "Plasma Dust" + id = "plasma_dust" + description = "A fine dust of plasma. This chemical has unusual mutagenic properties for viruses and slimes alike." + color = "#500064" // rgb: 80, 0, 100 + +/datum/reagent/plasma_dust/on_mob_life(mob/living/M) + M.adjustToxLoss(3) + if(iscarbon(M)) + var/mob/living/carbon/C = M + C.adjustPlasma(20) + ..() + +/datum/reagent/plasma_dust/reaction_obj(obj/O, volume) + if((!O) || (!volume)) + return 0 + O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + +/datum/reagent/plasma_dust/reaction_turf(turf/simulated/T, volume) + if(istype(T)) + T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + +/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 5) + return + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm similarity index 65% rename from code/modules/reagents/newchem/toxins.dm rename to code/modules/reagents/chemistry/reagents/toxins.dm index 56d64d9a62e..411e6a7bae5 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -1,8 +1,336 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/toxin + name = "Toxin" + id = "toxin" + description = "A Toxic chemical." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/toxin/on_mob_life(mob/living/M) + M.adjustToxLoss(2) + ..() + +/datum/reagent/spider_venom + name = "Spider venom" + id = "spidertoxin" + description = "A toxic venom injected by spacefaring arachnids." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/spider_venom/on_mob_life(mob/living/M) + M.adjustToxLoss(1.5) + ..() + +/datum/reagent/plasticide + name = "Plasticide" + id = "plasticide" + description = "Liquid plastic, do not eat." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/plasticide/on_mob_life(mob/living/M) + M.adjustToxLoss(1.5) + ..() + + +/datum/reagent/minttoxin + name = "Mint Toxin" + id = "minttoxin" + description = "Useful for dealing with undesirable customers." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/minttoxin/on_mob_life(mob/living/M) + if(FAT in M.mutations) + M.gib() + ..() + +/datum/reagent/slimejelly + name = "Slime Jelly" + id = "slimejelly" + description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." + reagent_state = LIQUID + color = "#801E28" // rgb: 128, 30, 40 + +/datum/reagent/slimejelly/on_mob_life(mob/living/M) + if(prob(10)) + to_chat(M, "Your insides are burning!") + M.adjustToxLoss(rand(20,60)*REAGENTS_EFFECT_MULTIPLIER) + else if(prob(40)) + M.adjustBruteLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/slimetoxin + name = "Mutation Toxin" + id = "mutationtoxin" + description = "A corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" // rgb: 19, 188, 94 + can_synth = 0 + +/datum/reagent/slimetoxin/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/human = M + if(human.species.name != "Shadow") + to_chat(M, "Your flesh rapidly mutates!") + to_chat(M, "You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.") + to_chat(M, "Your body reacts violently to light. \green However, it naturally heals in darkness.") + to_chat(M, "Aside from your new traits, you are mentally unchanged and retain your prior obligations.") + human.set_species("Shadow") + ..() + +/datum/reagent/aslimetoxin + name = "Advanced Mutation Toxin" + id = "amutationtoxin" + description = "An advanced corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" // rgb: 19, 188, 94 + can_synth = 0 + +/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method != TOUCH) + M.ForceContractDisease(new /datum/disease/transformation/slime(0)) + + +/datum/reagent/mercury + name = "Mercury" + id = "mercury" + description = "A chemical element." + reagent_state = LIQUID + color = "#484848" // rgb: 72, 72, 72 + metabolization_rate = 0.2 + penetrates_skin = 1 + +/datum/reagent/mercury/on_mob_life(mob/living/M) + if(prob(70)) + M.adjustBrainLoss(1) + ..() + +/datum/reagent/chlorine + name = "Chlorine" + id = "chlorine" + description = "A chemical element." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + penetrates_skin = 1 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/chlorine/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + ..() + +/datum/reagent/fluorine + name = "Fluorine" + id = "fluorine" + description = "A highly-reactive chemical element." + reagent_state = GAS + color = "#6A6054" + penetrates_skin = 1 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/fluorine/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/radium + name = "Radium" + id = "radium" + description = "Radium is an alkaline earth metal. It is extremely radioactive." + reagent_state = SOLID + color = "#C7C7C7" // rgb: 199,199,199 + penetrates_skin = 1 + +/datum/reagent/radium/on_mob_life(mob/living/M) + if(M.radiation < 80) + M.apply_effect(4, IRRADIATE, negate_armor = 1) + ..() + +/datum/reagent/radium/reaction_turf(turf/T, volume) + if(volume >= 3 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + +/datum/reagent/mutagen + name = "Unstable mutagen" + id = "mutagen" + description = "Might cause unpredictable mutations. Keep away from children." + reagent_state = LIQUID + color = "#04DF27" + metabolization_rate = 0.3 + +/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume) + if(!..()) + return + if(!M.dna) + return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + if((method==TOUCH && prob(33)) || method==INGEST) + randmutb(M) + domutcheck(M, null) + M.UpdateAppearance() + +/datum/reagent/mutagen/on_mob_life(mob/living/M) + if(!M.dna) + return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + M.apply_effect(2*REAGENTS_EFFECT_MULTIPLIER, IRRADIATE, negate_armor = 1) + if(prob(4)) + randmutb(M) + ..() + + +/datum/reagent/uranium + name ="Uranium" + id = "uranium" + description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." + reagent_state = SOLID + color = "#B8B8C0" // rgb: 184, 184, 192 + +/datum/reagent/uranium/on_mob_life(mob/living/M) + M.apply_effect(2, IRRADIATE, negate_armor = 1) + ..() + +/datum/reagent/uranium/reaction_turf(turf/T, volume) + if(volume >= 3 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + + +/datum/reagent/lexorin + name = "Lexorin" + id = "lexorin" + description = "Lexorin temporarily stops respiration. Causes tissue damage." + reagent_state = LIQUID + color = "#52685D" + metabolization_rate = 0.2 + +/datum/reagent/lexorin/on_mob_life(mob/living/M) + M.adjustToxLoss(1) + ..() + + +/datum/reagent/sacid + name = "Sulphuric acid" + id = "sacid" + description = "A strong mineral acid with the molecular formula H2SO4." + reagent_state = LIQUID + color = "#00D72B" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/sacid/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + ..() + +/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(volume > 25) + + if(H.wear_mask) + to_chat(H, "Your mask protects you from the acid!") + return + + if(H.head) + to_chat(H, "Your helmet protects you from the acid!") + return + + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(5, 10) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(5,10) + else + M.take_organ_damage(5,10) + + if(method == INGEST) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(volume < 10) + to_chat(M, "The greenish acidic substance stings you, but isn't concentrated enough to harm you!") + + if(volume >=10 && volume <=25) + if(!H.unacidable) + M.take_organ_damage(0,min(max(volume-10,2)*2,20)) + M.emote("scream") + + + if(volume > 25) + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(0, 20) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(0,20) + +/datum/reagent/sacid/reaction_obj(obj/O, volume) + if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) + if(!O.unacidable) + var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) + I.desc = "Looks like this was \an [O] some time ago." + O.visible_message("[O] melts.") + qdel(O) + +/datum/reagent/carpotoxin + name = "Carpotoxin" + id = "carpotoxin" + description = "A deadly neurotoxin produced by the dreaded spess carp." + reagent_state = LIQUID + color = "#003333" // rgb: 0, 51, 51 + +/datum/reagent/carpotoxin/on_mob_life(mob/living/M) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/staminatoxin + name = "Tirizene" + id = "tirizene" + description = "A toxin that affects the stamina of a person when injected into the bloodstream." + reagent_state = LIQUID + color = "#6E2828" + data = 13 + +/datum/reagent/staminatoxin/on_mob_life(mob/living/M) + M.adjustStaminaLoss(REAGENTS_EFFECT_MULTIPLIER * data) + data = max(data - 1, 3) + ..() + + +/datum/reagent/spore + name = "Spore Toxin" + id = "spore" + description = "A natural toxin produced by blob spores that inhibits vision when ingested." + color = "#9ACD32" + +/datum/reagent/spores/on_mob_life(mob/living/M) + M.adjustToxLoss(1) + M.damageoverlaytemp = 60 + M.EyeBlurry(3) + ..() + +/datum/reagent/beer2 //disguised as normal beer for use by emagged brobots + name = "Beer" + id = "beer2" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + color = "#664300" // rgb: 102, 67, 0 + metabolization_rate = 1.5 * REAGENTS_METABOLISM + drink_icon ="beerglass" + drink_name = "Beer glass" + drink_desc = "A freezing pint of beer" + +/datum/reagent/beer2/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 50) + M.Sleeping(2) + if(51 to INFINITY) + M.Sleeping(2) + M.adjustToxLoss((current_cycle - 50)*REAGENTS_EFFECT_MULTIPLIER) + ..() /datum/reagent/polonium name = "Polonium" @@ -12,12 +340,12 @@ color = "#CF3600" metabolization_rate = 0.1 penetrates_skin = 1 + can_synth = 0 /datum/reagent/polonium/on_mob_life(mob/living/M) M.apply_effect(8, IRRADIATE, negate_armor = 1) ..() - /datum/reagent/histamine name = "Histamine" id = "histamine" @@ -41,7 +369,7 @@ if(prob(10)) to_chat(M, "Your eyes itch.") M.emote(pick("blink", "sneeze")) - M.eye_blurry += 3 + M.AdjustEyeBlurry(3) if(prob(10)) M.visible_message("[M] scratches at an itch.") M.adjustBruteLoss(1) @@ -100,20 +428,11 @@ penetrates_skin = 1 /datum/reagent/formaldehyde/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) if(prob(10)) M.reagents.add_reagent("histamine",rand(5,15)) ..() -/datum/chemical_reaction/formaldehyde - name = "formaldehyde" - id = "formaldehyde" - result = "formaldehyde" - required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1) - result_amount = 3 - min_temp = 420 - mix_message = "Ugh, it smells like the morgue in here." - /datum/reagent/venom name = "Venom" id = "venom" @@ -122,6 +441,7 @@ color = "#CF3600" metabolization_rate = 0.2 overdose_threshold = 40 + can_synth = 0 /datum/reagent/venom/on_mob_life(mob/living/M) if(prob(25)) @@ -141,7 +461,7 @@ if(prob(4)) M.visible_message("[M] starts convulsing violently!", "You feel as if your body is tearing itself apart!") M.Weaken(15) - M.jitteriness += 1000 + M.AdjustJitter(1000) spawn(rand(20, 100)) M.gib() @@ -159,19 +479,19 @@ current_cycle++ return if(5 to 8) - M.dizziness += 1 - M.confused = max(M.confused, 10) + M.AdjustDizzy(1) + M.Confused(10) if(9 to 12) - M.drowsyness = max(M.drowsyness, 10) - M.dizziness += 1 - M.confused = max(M.confused, 20) + M.Drowsy(10) + M.AdjustDizzy(1) + M.Confused(20) if(13) M.emote("faint") if(14 to INFINITY) M.Paralyse(10) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) - M.jitteriness = max(0, M.jitteriness-30) + M.AdjustJitter(-30) if(M.getBrainLoss() <= 80) M.adjustBrainLoss(1) else @@ -182,16 +502,6 @@ M.adjustToxLoss(1) ..() -/datum/chemical_reaction/neurotoxin2 - name = "neurotoxin2" - id = "neurotoxin2" - result = "neurotoxin2" - required_reagents = list("space_drugs" = 1) - result_amount = 1 - min_temp = 674 - mix_sound = null - no_message = 1 - /datum/reagent/cyanide name = "Cyanide" id = "cyanide" @@ -202,12 +512,12 @@ penetrates_skin = 1 /datum/reagent/cyanide/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5*REM) + M.adjustToxLoss(1.5*REAGENTS_EFFECT_MULTIPLIER) if(prob(5)) M.emote("drool") if(prob(10)) to_chat(M, "You cannot breathe!") - M.losebreath += 1 + M.AdjustLoseBreath(1) M.emote("gasp") if(prob(8)) to_chat(M, "You feel horrendously weak!") @@ -215,23 +525,6 @@ M.adjustToxLoss(2) ..() -/datum/chemical_reaction/cyanide - name = "Cyanide" - id = "cyanide" - result = "cyanide" - required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1) - result_amount = 3 - min_temp = 380 - mix_message = "The mixture gives off a faint scent of almonds." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/cyanide/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("cyanide", 7) - /datum/reagent/itching_powder name = "Itching Powder" id = "itching_powder" @@ -261,25 +554,11 @@ to_chat(M, "AHHHHHH!") M.adjustBruteLoss(5) M.Weaken(5) - M.jitteriness += 6 + M.AdjustJitter(6) M.visible_message("[M] falls to the floor, scratching themselves violently!") M.emote("scream") ..() -/datum/chemical_reaction/itching_powder - name = "Itching Powder" - id = "itching_powder" - result = "itching_powder" - required_reagents = list("fuel" = 1, "ammonia" = 1, "fungus" = 1) - result_amount = 3 - mix_message = "The mixture congeals and dries up, leaving behind an abrasive powder." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/facid/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) - M.adjustFireLoss(1) - ..() - /datum/reagent/facid name = "Fluorosulfuric Acid" id = "facid" @@ -288,6 +567,11 @@ color = "#4141D2" process_flags = ORGANIC | SYNTHETIC +/datum/reagent/facid/on_mob_life(mob/living/M) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(1) + ..() + /datum/reagent/facid/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH || method == INGEST) if(ishuman(M)) @@ -338,22 +622,13 @@ O.visible_message("[O] melts.") qdel(O) -/datum/chemical_reaction/facid - name = "Fluorosulfuric Acid" - id = "facid" - result = "facid" - required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1) - result_amount = 4 - min_temp = 380 - mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container." - /datum/reagent/initropidril name = "Initropidril" id = "initropidril" description = "A highly potent cardiac poison - can kill within minutes." reagent_state = LIQUID color = "#7F10C0" - metabolization_rate = 0.4 + can_synth = 0 /datum/reagent/initropidril/on_mob_life(mob/living/M) if(prob(33)) @@ -364,11 +639,11 @@ if(prob(10)) to_chat(M, "You cannot breathe!") M.adjustOxyLoss(10) - M.losebreath++ + M.AdjustLoseBreath(1) if(prob(10)) to_chat(M, "Your chest is burning with pain!") M.adjustOxyLoss(10) - M.losebreath++ + M.AdjustLoseBreath(1) M.Stun(3) M.Weaken(2) if(ishuman(M)) @@ -377,30 +652,6 @@ H.heart_attack = 1 // rip in pepperoni ..() -/datum/chemical_reaction/initropidril - name = "Initropidril" - id = "initropidril" - result = "initropidril" - required_reagents = list("crank" = 1, "histamine" = 1, "krokodil" = 1, "bath_salts" = 1, "atropine" = 1, "nicotine" = 1, "morphine" = 1) - result_amount = 4 - mix_message = "A sweet and sugary scent drifts from the unpleasant milky substance." - - -/datum/reagent/concentrated_initro - name = "Concentrated Initropidril" - id = "concentrated_initro" - description = "A guaranteed heart-stopper!" - reagent_state = LIQUID - color = "#AB1CCF" - metabolization_rate = 0.4 - -/datum/reagent/concentrated_initro/on_mob_life(mob/living/M) - if(volume >=5) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 // rip in pepperoni - /datum/reagent/pancuronium name = "Pancuronium" id = "pancuronium" @@ -425,12 +676,12 @@ M.Weaken(20) if(prob(10)) M.emote(pick("drool", "tremble", "gasp")) - M.losebreath++ + M.AdjustLoseBreath(1) if(prob(9)) to_chat(M, "You can't [pick("move", "feel your legs", "feel your face", "feel anything")]!") if(prob(7)) to_chat(M, "You can't breathe!") - M.losebreath += 3 + M.AdjustLoseBreath(3) ..() /datum/reagent/sodium_thiopental @@ -440,20 +691,21 @@ reagent_state = LIQUID color = "#5F8BE1" metabolization_rate = 0.7 + can_synth = 0 /datum/reagent/sodium_thiopental/on_mob_life(mob/living/M) switch(current_cycle) if(1) M.emote("drool") - M.confused = max(M.confused, 5) + M.Confused(5) if(2 to 4) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(5) M.emote("faint") M.Weaken(5) if(6 to INFINITY) M.Paralyse(20) - M.jitteriness = max(0, M.jitteriness-50) + M.AdjustJitter(-50) if(prob(10)) M.emote("drool") M.adjustBrainLoss(1) @@ -467,6 +719,7 @@ color = "#646EA0" metabolization_rate = 0.8 penetrates_skin = 1 + can_synth = 0 /datum/reagent/ketamine/on_mob_life(mob/living/M) switch(current_cycle) @@ -474,7 +727,7 @@ if(prob(25)) M.emote("yawn") if(6 to 9) - M.eye_blurry += 5 + M.AdjustEyeBlurry(5) if(prob(35)) M.emote("yawn") if(10) @@ -492,30 +745,21 @@ color = "#6BA688" metabolization_rate = 0.1 -/datum/chemical_reaction/sulfonal - name = "sulfonal" - id = "sulfonal" - result = "sulfonal" - required_reagents = list("acetone" = 1, "diethylamine" = 1, "sulfur" = 1) - result_amount = 3 - mix_message = "The mixture gives off quite a stench." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - /datum/reagent/sulfonal/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-30) + M.AdjustJitter(-30) switch(current_cycle) if(1 to 10) if(prob(7)) M.emote("yawn") if(11 to 20) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(21) M.emote("faint") if(22 to INFINITY) if(prob(20)) M.emote("faint") M.Paralyse(5) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) M.adjustToxLoss(1) ..() @@ -526,7 +770,7 @@ reagent_state = LIQUID color = "#D9D9D9" -/datum/reagent/amanitin/reagent_deleted(mob/living/M) +/datum/reagent/amanitin/on_mob_delete(mob/living/M) M.adjustToxLoss(current_cycle*rand(2,4)) ..() @@ -538,13 +782,6 @@ color = "#D1DED1" metabolization_rate = 0.2 -/datum/chemical_reaction/lipolicide - name = "lipolicide" - id = "lipolicide" - result = "lipolicide" - required_reagents = list("mercury" = 1, "diethylamine" = 1, "ephedrine" = 1) - result_amount = 3 - /datum/reagent/lipolicide/on_mob_life(mob/living/M) if(!M.nutrition) switch(rand(1,3)) @@ -567,10 +804,11 @@ reagent_state = LIQUID color = "#C2D8CD" metabolization_rate = 0.05 + can_synth = 0 /datum/reagent/coniine/on_mob_life(mob/living/M) M.adjustToxLoss(2) - M.losebreath += 5 + M.AdjustLoseBreath(5) ..() /datum/reagent/curare @@ -590,7 +828,7 @@ if(prob(20)) M.emote(pick("drool", "pale", "gasp")) if(6 to 10) - M.eye_blurry += 5 + M.AdjustEyeBlurry(5) if(prob(8)) to_chat(M, "You feel [pick("weak", "horribly weak", "numb", "like you can barely move", "tingly")].") M.Stun(1) @@ -598,12 +836,12 @@ M.emote(pick("drool","pale", "gasp")) if(11 to INFINITY) M.Stun(30) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(prob(20)) M.emote(pick("drool", "faint", "pale", "gasp", "collapse")) else if(prob(8)) to_chat(M, "You can't [pick("breathe", "move", "feel your legs", "feel your face", "feel anything")]!") - M.losebreath++ + M.AdjustLoseBreath(1) ..() /datum/reagent/sarin @@ -616,42 +854,25 @@ penetrates_skin = 1 overdose_threshold = 25 -/datum/chemical_reaction/sarin - name = "sarin" - id = "sarin" - result = "sarin" - required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1) - result_amount = 3 - mix_message = "The mixture yields a colorless, odorless liquid." - min_temp = 374 - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 2)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("sarin", 4) - /datum/reagent/sarin/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 15) - M.jitteriness += 20 + M.AdjustJitter(20) if(prob(20)) M.emote(pick("twitch","twitch_s","quiver")) if(16 to 30) if(prob(25)) M.emote(pick("twitch","twitch","drool","quiver","tremble")) - M.eye_blurry += 5 - M.stuttering = max(M.stuttering, 5) + M.AdjustEyeBlurry(5) + M.Stuttering(5) if(prob(10)) - M.confused = max(M.confused, 15) + M.Confused(15) if(prob(15)) M.Stun(1) M.emote("scream") if(30 to 60) - M.eye_blurry += 5 - M.stuttering = max(M.stuttering, 5) + M.AdjustEyeBlurry(5) + M.Stuttering(5) if(prob(10)) M.Stun(1) M.emote(pick("twitch","twitch","drool","shake","tremble")) @@ -660,15 +881,15 @@ if(prob(5)) M.Weaken(3) M.visible_message("[M] has a seizure!") - M.jitteriness = 1000 + M.SetJitter(1000) if(prob(5)) to_chat(M, "You can't breathe!") M.emote(pick("gasp", "choke", "cough")) - M.losebreath++ + M.AdjustLoseBreath(1) if(61 to INFINITY) if(prob(15)) M.emote(pick("gasp", "choke", "cough","twitch", "shake", "tremble","quiver","drool", "twitch","collapse")) - M.losebreath = max(5, M.losebreath + 5) + M.LoseBreath(5) M.adjustToxLoss(1) M.adjustBrainLoss(1) M.Weaken(4) @@ -690,14 +911,11 @@ M.adjustToxLoss(2) ..() - // Clear off wallrot fungi -/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume) +/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume) // Clear off wallrot fungi if(istype(W) && W.rotting) + for(var/obj/effect/overlay/wall_rot/WR in W) + qdel(WR) W.rotting = 0 - for(var/obj/effect/overlay/O in W) - if(O.name == "Wallrot") // This is so awful - qdel(O) - W.visible_message("The fungi are completely dissolved by the solution!") /datum/reagent/atrazine/reaction_obj(obj/O, volume) @@ -727,14 +945,6 @@ D.adjustHealth(100) ..() -/datum/chemical_reaction/atrazine - name = "atrazine" - id = "atrazine" - result = "atrazine" - required_reagents = list("chlorine" = 1, "hydrogen" = 1, "nitrogen" = 1) - result_amount = 3 - mix_message = "The mixture gives off a harsh odor" - /datum/reagent/capulettium name = "Capulettium" id = "capulettium" @@ -743,27 +953,19 @@ color = "#60A584" heart_rate_stop = 1 -/datum/chemical_reaction/capulettium - name = "capulettium" - id = "capulettium" - result = "capulettium" - required_reagents = list("neurotoxin2" = 1, "chlorine" = 1, "hydrogen" = 1) - result_amount = 1 - mix_message = "The smell of death wafts up from the solution." - /datum/reagent/capulettium/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 5) - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) if(6 to 10) - M.drowsyness = max(M.drowsyness, 10) + M.Drowsy(10) if(11) M.Paralyse(10) M.visible_message("[M] seizes up and falls limp, their eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary. if(12 to 60) M.Paralyse(10) if(61 to INFINITY) - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) ..() /datum/reagent/capulettium_plus @@ -774,16 +976,8 @@ color = "#60A584" heart_rate_stop = 1 -/datum/chemical_reaction/capulettium_plus - name = "capulettium_plus" - id = "capulettium_plus" - result = "capulettium_plus" - required_reagents = list("capulettium" = 1, "ephedrine" = 1, "methamphetamine" = 1) - result_amount = 3 - mix_message = "The solution begins to slosh about violently by itself." - /datum/reagent/capulettium_plus/on_mob_life(mob/living/M) - M.silent = max(M.silent, 2) + M.Silence(2) ..() /datum/reagent/toxic_slurry @@ -840,6 +1034,10 @@ color = "#993333" process_flags = ORGANIC | SYNTHETIC +/datum/reagent/ants/on_mob_life(mob/living/M) + M.adjustBruteLoss(2) + ..() + /datum/reagent/ants/reaction_mob(mob/living/M, method=TOUCH, volume) //NOT THE ANTS if(iscarbon(M)) if(method == TOUCH || method==INGEST) @@ -847,11 +1045,6 @@ M.emote("scream") M.adjustBruteLoss(4) - -/datum/reagent/ants/on_mob_life(mob/living/M) - M.adjustBruteLoss(2) - ..() - /datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective. name = "Teslium" id = "teslium" @@ -868,20 +1061,4 @@ shock_timer = 0 M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you playsound(M, "sparks", 50, 1) - ..() - -/datum/chemical_reaction/teslium - name = "Teslium" - id = "teslium" - result = "teslium" - required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1) - result_amount = 3 - mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." - min_temp = 400 - mix_sound = null - -/datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(6, 1, location) - s.start() \ No newline at end of file + ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/chemistry/reagents/water.dm similarity index 85% rename from code/modules/reagents/oldchem/reagents/reagents_water.dm rename to code/modules/reagents/chemistry/reagents/water.dm index bbfcbeb8142..ef00ea54c61 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -15,6 +15,9 @@ color = "#0064C8" // rgb: 0, 100, 200 var/cooling_temperature = 2 process_flags = ORGANIC | SYNTHETIC + drink_icon = "glass_clear" + drink_name = "Glass of Water" + drink_desc = "The father of all refreshments." /datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume) // Put out fire @@ -133,6 +136,9 @@ id = "blood" reagent_state = LIQUID color = "#C80000" // rgb: 200, 0, 0 + drink_icon = "glass_red" + drink_name = "Glass of Tomato juice" + drink_desc = "Are you sure this is tomato juice?" /datum/reagent/blood/reaction_mob(mob/living/M, method=TOUCH, volume) if(data && data["viruses"]) @@ -262,29 +268,32 @@ reagent_state = LIQUID color = "#0064C8" // rgb: 0, 100, 200 process_flags = ORGANIC | SYNTHETIC + drink_icon = "glass_clear" + drink_name = "Glass of Water" + drink_desc = "The father of all refreshments." /datum/reagent/holywater/on_mob_life(mob/living/M) - M.jitteriness = max(M.jitteriness-5,0) + M.AdjustJitter(-5) if(current_cycle >= 30) // 12 units, 60 seconds @ metabolism 0.4 units & tick rate 2.0 sec - M.stuttering = min(M.stuttering+4, 20) + M.AdjustStuttering(4, bound_lower = 0, bound_upper = 20) M.Dizzy(5) if(iscultist(M) && prob(5)) M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu")) if(current_cycle >= 75 && prob(33)) // 30 units, 150 seconds - M.confused += 3 + M.AdjustConfused(3) if(isvampirethrall(M)) ticker.mode.remove_vampire_mind(M.mind) holder.remove_reagent(id, volume) - M.jitteriness = 0 - M.stuttering = 0 - M.confused = 0 + M.SetJitter(0) + M.SetStuttering(0) + M.SetConfused(0) return if(iscultist(M)) ticker.mode.remove_cultist(M.mind) holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better?? - M.jitteriness = 0 - M.stuttering = 0 - M.confused = 0 + M.SetJitter(0) + M.SetStuttering(0) + M.SetConfused(0) return if(ishuman(M) && M.mind && M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full) && prob(80)) switch(current_cycle) @@ -330,6 +339,47 @@ qdel(R) T.Bless() +/datum/reagent/fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke + name = "Unholy Water" + id = "unholywater" + description = "Something that shouldn't exist on this plane of existance." + process_flags = ORGANIC | SYNTHETIC //ethereal means everything processes it. + metabolization_rate = 1 + +/datum/reagent/fuel/unholywater/on_mob_life(mob/living/M) + M.adjustBrainLoss(3) + if(iscultist(M)) + M.status_flags |= GOTTAGOFAST + M.AdjustDrowsy(-5) + M.AdjustParalysis(-2) + M.AdjustStunned(-2) + M.AdjustWeakened(-2) + else + M.adjustToxLoss(2) + M.adjustFireLoss(2) + M.adjustOxyLoss(2) + M.adjustBruteLoss(2) + ..() + +/datum/reagent/fuel/unholywater/on_mob_delete(mob/living/M) + M.status_flags &= ~GOTTAGOFAST + ..() + +/datum/reagent/hellwater + name = "Hell Water" + id = "hell_water" + description = "YOUR FLESH! IT BURNS!" + process_flags = ORGANIC | SYNTHETIC //Admin-bus has no brakes! KILL THEM ALL. + metabolization_rate = 1 + can_synth = 0 + +/datum/reagent/hellwater/on_mob_life(mob/living/M) + M.fire_stacks = min(5, M.fire_stacks + 3) + M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire + M.adjustToxLoss(1) + M.adjustFireLoss(1) //Hence the other damages... ain't I a bastard? + M.adjustBrainLoss(5) + ..() /datum/reagent/liquidgibs name = "Liquid gibs" @@ -365,4 +415,4 @@ if(istype(O, /obj/item/clothing/shoes/galoshes)) var/t_loc = get_turf(O) qdel(O) - new /obj/item/clothing/shoes/galoshes/dry(t_loc) + new /obj/item/clothing/shoes/galoshes/dry(t_loc) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm new file mode 100644 index 00000000000..28994d10fb2 --- /dev/null +++ b/code/modules/reagents/chemistry/recipes.dm @@ -0,0 +1,81 @@ +/////////////////////////////////////////////////////////////////////////////////// +/datum/chemical_reaction + var/name = null + var/id = null + var/result = null + var/list/required_reagents = list() + var/list/required_catalysts = list() + + // Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things + var/atom/required_container = null // the container required for the reaction to happen + var/required_other = 0 // an integer required for the reaction to happen + + var/result_amount = 0 + var/secondary = 0 // set to nonzero if secondary reaction + var/list/secondary_results = list() //additional reagents produced by the reaction + var/min_temp = 0 //Minimum temperature required for the reaction to occur (heat to/above this). min_temp = 0 means no requirement + var/max_temp = 9999 //Maximum temperature allowed for the reaction to occur (cool to/below this). + var/mix_message = "The solution begins to bubble." + var/mix_sound = 'sound/effects/bubbles.ogg' + var/no_message = 0 + +/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume) + return + +var/list/chemical_mob_spawn_meancritters = list() // list of possible hostile mobs +var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs +/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_faction = "chemicalsummon") + if(holder && holder.my_atom) + if(chemical_mob_spawn_meancritters.len <= 0 || chemical_mob_spawn_nicecritters.len <= 0) + for(var/T in typesof(/mob/living/simple_animal)) + var/mob/living/simple_animal/SA = T + switch(initial(SA.gold_core_spawnable)) + if(CHEM_MOB_SPAWN_HOSTILE) + chemical_mob_spawn_meancritters += T + if(CHEM_MOB_SPAWN_FRIENDLY) + chemical_mob_spawn_nicecritters += T + var/atom/A = holder.my_atom + var/turf/T = get_turf(A) + var/area/my_area = get_area(T) + var/message = "A [reaction_name] reaction has occured in [my_area.name]. (JMP)" + message += " (VV)" + + var/mob/M = get(A, /mob) + if(M) + message += " - Carried By: [key_name_admin(M)](?) (FLW)" + else + message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]" + + message_admins(message, 0, 1) + + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + + for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) + C.flash_eyes() + for(var/i = 1, i <= amount_to_spawn, i++) + var/chosen + if(reaction_name == "Friendly Gold Slime") + chosen = pick(chemical_mob_spawn_nicecritters) + else + chosen = pick(chemical_mob_spawn_meancritters) + var/mob/living/simple_animal/C = new chosen + C.faction |= mob_faction + C.forceMove(get_turf(holder.my_atom)) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(C, pick(NORTH,SOUTH,EAST,WEST)) + +/proc/goonchem_vortex(turf/simulated/T, setting_type, range, pull_times) + for(var/atom/movable/X in orange(range, T)) + if(istype(X, /obj/effect)) + continue //stop pulling smoke and hotspots please + if(istype(X, /atom/movable)) + if((X) && !X.anchored) + if(setting_type) + playsound(T, 'sound/effects/bang.ogg', 25, 1) + for(var/i = 0, i < pull_times, i++) + step_away(X,T) + else + playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this. + for(var/i = 0, i < pull_times, i++) + step_towards(X,T) \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm b/code/modules/reagents/chemistry/recipes/drinks.dm similarity index 86% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm rename to code/modules/reagents/chemistry/recipes/drinks.dm index 1b69b88e071..d1866a2b2f1 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm +++ b/code/modules/reagents/chemistry/recipes/drinks.dm @@ -676,3 +676,96 @@ required_reagents = list("spacemountainwind" = 1, "coffee" = 1) result_amount = 2 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/ginsonic + name = "ginsonic" + id = "ginsonic" + result = "ginsonic" + required_reagents = list("gintonic" = 1, "methamphetamine" = 1) + result_amount = 2 + mix_message = "The drink turns electric blue and starts quivering violently." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/applejack + name = "applejack" + id = "applejack" + result = "applejack" + required_reagents = list("cider" = 2) + max_temp = 270 + result_amount = 1 + mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind." + mix_sound = null + +/datum/chemical_reaction/jackrose + name = "jackrose" + id = "jackrose" + result = "jackrose" + required_reagents = list("applejack" = 4, "lemonjuice" = 1) + result_amount = 5 + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/synthanol + name = "Synthanol" + id = "synthanol" + result = "synthanol" + required_reagents = list("lube" = 1, "plasma" = 1, "fuel" = 1) + result_amount = 3 + mix_message = "The chemicals mix to create shiny, blue substance." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/synthanol/robottears + name = "Robot Tears" + id = "robottears" + result = "robottears" + required_reagents = list("synthanol" = 1, "oil" = 1, "sodawater" = 1) + result_amount = 3 + mix_message = "The ingredients combine into a stiff, dark goo." + +/datum/chemical_reaction/synthanol/trinary + name = "Trinary" + id = "trinary" + result = "trinary" + required_reagents = list("synthanol" = 1, "limejuice" = 1, "orangejuice" = 1) + result_amount = 3 + mix_message = "The ingredients mix into a colorful substance." + +/datum/chemical_reaction/synthanol/servo + name = "Servo" + id = "servo" + result = "servo" + required_reagents = list("synthanol" = 2, "cream" = 1, "hot_coco" = 1) + result_amount = 4 + mix_message = "The ingredients mix into a dark brown substance." + +/datum/chemical_reaction/synthanol/uplink + name = "Uplink" + id = "uplink" + result = "uplink" + required_reagents = list("rum" = 1, "vodka" = 1, "tequila" = 1, "whiskey" = 1, "synthanol" = 1) + result_amount = 5 + mix_message = "The chemicals mix to create a shiny, orange substance." + +/datum/chemical_reaction/synthanol/synthnsoda + name = "Synth 'n Soda" + id = "synthnsoda" + result = "synthnsoda" + required_reagents = list("synthanol" = 1, "cola" = 1) + result_amount = 2 + mix_message = "The chemicals mix to create a smooth, fizzy substance." + +/datum/chemical_reaction/synthanol/synthignon + name = "Synthignon" + id = "synthignon" + result = "synthignon" + required_reagents = list("synthanol" = 1, "wine" = 1) + result_amount = 2 + mix_message = "The chemicals mix to create a fine, red substance." + +/datum/chemical_reaction/triple_citrus + name = "triple_citrus" + id = "triple_citrus" + result = "triple_citrus" + required_reagents = list("lemonjuice" = 1, "limejuice" = 1, "orangejuice" = 1) + result_amount = 3 + mix_message = "The citrus juices begin to blend together." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm new file mode 100644 index 00000000000..e44ace8f511 --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -0,0 +1,117 @@ +/datum/chemical_reaction/space_drugs + name = "Space Drugs" + id = "space_drugs" + result = "space_drugs" + required_reagents = list("mercury" = 1, "sugar" = 1, "lithium" = 1) + result_amount = 3 + mix_message = "Slightly dizzying fumes drift from the solution." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/crank + name = "Crank" + id = "crank" + result = "crank" + required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "fuel" = 1) + result_amount = 5 + mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." + mix_sound = 'sound/goonstation/effects/crystalshatter.ogg' + min_temp = 390 + +/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume) + var/turf/T = get_turf(holder.my_atom) + for(var/turf/turf in range(1,T)) + new /obj/effect/hotspot(turf) + explosion(T,0,0,2) + +/datum/chemical_reaction/krokodil + name = "Krokodil" + id = "krokodil" + result = "krokodil" + required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1) + result_amount = 6 + mix_message = "The mixture dries into a pale blue powder." + min_temp = 380 + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/methamphetamine + name = "methamphetamine" + id = "methamphetamine" + result = "methamphetamine" + required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) + result_amount = 4 + min_temp = 374 + +/datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.emote("gasp") + C.AdjustLoseBreath(1) + C.reagents.add_reagent("toxin", 10) + C.reagents.add_reagent("neurotoxin2", 20) + +/datum/chemical_reaction/bath_salts + name = "bath_salts" + id = "bath_salts" + result = "bath_salts" + required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1) + result_amount = 6 + min_temp = 374 + mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh." + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/jenkem + name = "Jenkem" + id = "jenkem" + result = "jenkem" + required_reagents = list("toiletwater" = 1, "ammonia" = 1, "water" = 1) + result_amount = 3 + mix_message = "The mixture ferments into a filthy morass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/jenkem/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("jenkem", 25) + +/datum/chemical_reaction/aranesp + name = "Aranesp" + id = "aranesp" + result = "aranesp" + required_reagents = list("epinephrine" = 1, "atropine" = 1, "insulin" = 1) + result_amount = 3 + +/datum/chemical_reaction/fliptonium + name = "fliptonium" + id = "fliptonium" + result = "fliptonium" + required_reagents = list("ephedrine" = 1, "liquid_dark_matter" = 1, "chocolate" = 1, "ginsonic" = 1) + result_amount = 4 + mix_message = "The mixture swirls around excitedly!" + +/datum/chemical_reaction/lsd + name = "Lysergic acid diethylamide" + id = "lsd" + result = "lsd" + required_reagents = list("diethylamine" = 1, "fungus" = 1) + result_amount = 3 + mix_message = "The mixture turns a rather unassuming color and settles." + +/datum/chemical_reaction/lube/ultra + name = "Ultra-Lube" + id = "ultralube" + result = "ultralube" + required_reagents = list("lube" = 2, "formaldehyde" = 1, "cryostylane" = 1) + result_amount = 2 + mix_message = "The mixture darkens and appears to partially vaporize into a chilling aerosol." + +/datum/chemical_reaction/surge + name = "Surge" + id = "surge" + result = "surge" + required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 6 + mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity." \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm b/code/modules/reagents/chemistry/recipes/food.dm similarity index 51% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm rename to code/modules/reagents/chemistry/recipes/food.dm index b43c9b344f1..02453d44e31 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm +++ b/code/modules/reagents/chemistry/recipes/food.dm @@ -89,34 +89,6 @@ required_reagents = list("flour" = 15, "water" = 5) required_catalysts = list("enzyme" = 5) -/datum/chemical_reaction/sodiumchloride - name = "Sodium Chloride" - id = "sodiumchloride" - result = "sodiumchloride" - required_reagents = list("sodium" = 1, "chlorine" = 1, "water" = 1) - result_amount = 3 - mix_message = "The solution crystallizes with a brief flare of light." - -/datum/chemical_reaction/ice - name = "Ice" - id = "ice" - result = "ice" - required_reagents = list("water" = 1) - result_amount = 1 - max_temp = 273 - mix_message = "Ice forms as the water freezes." - mix_sound = null - -/datum/chemical_reaction/water - name = "Water" - id = "water" - result = "water" - required_reagents = list("ice" = 1) - result_amount = 1 - min_temp = 301 // In Space.....ice melts at 82F...don't ask - mix_message = "Water pools as the ice melts." - mix_sound = null - /datum/chemical_reaction/dough name = "Dough" id = "dough" @@ -128,4 +100,101 @@ /datum/chemical_reaction/dough/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) for(var/i = 1, i <= created_volume, i++) - new /obj/item/weapon/reagent_containers/food/snacks/dough(location) \ No newline at end of file + new /obj/item/weapon/reagent_containers/food/snacks/dough(location) + +/datum/chemical_reaction/corn_syrup + name = "corn_syrup" + id = "corn_syrup" + result = "corn_syrup" + required_reagents = list("corn_starch" = 1, "sacid" = 1) + result_amount = 2 + min_temp = 374 + mix_message = "The mixture forms a viscous, clear fluid!" + +/datum/chemical_reaction/vhfcs + name = "vhfcs" + id = "vhfcs" + result = "vhfcs" + required_reagents = list("corn_syrup" = 1) + required_catalysts = list("enzyme" = 1) + result_amount = 1 + mix_message = "The mixture emits a sickly-sweet smell." + +/datum/chemical_reaction/cola + name = "cola" + id = "cola" + result = "cola" + required_reagents = list("carbon" = 1, "oxygen" = 1, "water" = 1, "sugar" = 1) + result_amount = 4 + mix_message = "The mixture begins to fizz." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/cheese + name = "cheese" + id = "cheese" + result = "cheese" + required_reagents = list("vomit" = 1, "milk" = 1) + result_amount = 1 + mix_message = "The mixture curdles up." + +/datum/chemical_reaction/cheese/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("A faint cheesy smell drifts through the air...") + +/datum/chemical_reaction/weird_cheese + name = "Weird cheese" + id = "weird_cheese" + result = "weird_cheese" + required_reagents = list("green_vomit" = 1, "milk" = 1) + result_amount = 1 + mix_message = "The disgusting mixture sloughs together horribly, emitting a foul stench." + mix_sound = 'sound/goonstation/misc/gurggle.ogg' + +/datum/chemical_reaction/weird_cheese/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("A horrible smell assaults your nose! What in space is it?") + +/datum/chemical_reaction/hydrogenated_soybeanoil + name = "Partially hydrogenated space-soybean oil" + id = "hydrogenated_soybeanoil" + result = "hydrogenated_soybeanoil" + required_reagents = list("soybeanoil" = 1, "hydrogen" = 1) + result_amount = 2 + min_temp = 520 + mix_message = "The mixture emits a burnt, oily smell." + +/datum/chemical_reaction/meatslurry + name = "Meat Slurry" + id = "meatslurry" + result = "meatslurry" + required_reagents = list("corn_starch" = 1, "blood" = 1) + result_amount = 2 + mix_message = "The mixture congeals into a bloody mass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/gravy + name = "Gravy" + id = "gravy" + result = "gravy" + required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1) + result_amount = 3 + min_temp = 374 + mix_message = "The substance thickens and takes on a meaty odor." + +/datum/chemical_reaction/beff + name = "Beff" + id = "beff" + result = "beff" + required_reagents = list("hydrogenated_soybeanoil" = 2, "meatslurry" = 1, "plasma" = 1) + result_amount = 4 + mix_message = "The mixture solidifies, taking a crystalline appearance." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/pepperoni + name = "Pepperoni" + id = "pepperoni" + result = "pepperoni" + required_reagents = list("beff" = 1, "saltpetre" = 1, "synthflesh" = 1) + result_amount = 2 + mix_message = "The beff and the synthflesh combine to form a smoky red log." + mix_sound = 'sound/effects/blobattack.ogg' \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm new file mode 100644 index 00000000000..1c22693513f --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -0,0 +1,274 @@ +/datum/chemical_reaction/hydrocodone + name = "Hydrocodone" + id = "hydrocodone" + result = "hydrocodone" + required_reagents = list("morphine" = 1, "sacid" = 1, "water" = 1, "oil" = 1) + result_amount = 2 + +/datum/chemical_reaction/mitocholide + name = "mitocholide" + id = "mitocholide" + result = "mitocholide" + required_reagents = list("synthflesh" = 1, "cryoxadone" = 1, "plasma" = 1) + result_amount = 3 + +/datum/chemical_reaction/cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + result = "cryoxadone" + required_reagents = list("cryostylane" = 1, "plasma" = 1, "acetone" = 1, "mutagen" = 1) + result_amount = 4 + mix_message = "The solution bubbles softly." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + result = "spaceacillin" + required_reagents = list("fungus" = 1, "ethanol" = 1) + result_amount = 2 + mix_message = "The solvent extracts an antibiotic compound from the fungus." + +/datum/chemical_reaction/rezadone + name = "Rezadone" + id = "rezadone" + result = "rezadone" + required_reagents = list("carpotoxin" = 1, "spaceacillin" = 1, "copper" = 1) + result_amount = 3 + +/datum/chemical_reaction/sterilizine + name = "Sterilizine" + id = "sterilizine" + result = "sterilizine" + required_reagents = list("antihol" = 2, "chlorine" = 1) + result_amount = 3 + +/datum/chemical_reaction/charcoal + name = "Charcoal" + id = "charcoal" + result = "charcoal" + required_reagents = list("ash" = 1, "sodiumchloride" = 1) + result_amount = 2 + mix_message = "The mixture yields a fine black powder." + min_temp = 380 + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/silver_sulfadiazine + name = "Silver Sulfadiazine" + id = "silver_sulfadiazine" + result = "silver_sulfadiazine" + required_reagents = list("ammonia" = 1, "silver" = 1, "sulfur" = 1, "oxygen" = 1, "chlorine" = 1) + result_amount = 5 + mix_message = "A strong and cloying odor begins to bubble from the mixture." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/salglu_solution + name = "Saline-Glucose Solution" + id = "salglu_solution" + result = "salglu_solution" + required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/synthflesh + name = "Synthflesh" + id = "synthflesh" + result = "synthflesh" + required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) + result_amount = 3 + mix_message = "The mixture knits together into a fibrous, bloody mass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/styptic_powder + name = "Styptic Powder" + id = "styptic_powder" + result = "styptic_powder" + required_reagents = list("aluminum" = 1, "hydrogen" = 1, "oxygen" = 1, "sacid" = 1) + result_amount = 4 + mix_message = "The solution yields an astringent powder." + +/datum/chemical_reaction/calomel + name = "Calomel" + id = "calomel" + result = "calomel" + required_reagents = list("mercury" = 1, "chlorine" = 1) + result_amount = 2 + min_temp = 374 + mix_message = "Stinging vapors rise from the solution." + +/datum/chemical_reaction/potass_iodide + name = "Potassium Iodide" + id = "potass_iodide" + result = "potass_iodide" + required_reagents = list("potassium" = 1, "iodine" = 1) + result_amount = 2 + mix_message = "The solution settles calmly and emits gentle fumes." + +/datum/chemical_reaction/pen_acid + name = "Pentetic Acid" + id = "pen_acid" + result = "pen_acid" + required_reagents = list("fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1) + result_amount = 6 + mix_message = "The substance becomes very still, emitting a curious haze." + +/datum/chemical_reaction/sal_acid + name = "Salicyclic Acid" + id = "sal_acid" + result = "sal_acid" + required_reagents = list("sodium" = 1, "phenol" = 1, "carbon" = 1, "oxygen" = 1, "sacid" = 1) + result_amount = 5 + mix_message = "The mixture crystallizes." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/salbutamol + name = "Salbutamol" + id = "salbutamol" + result = "salbutamol" + required_reagents = list("sal_acid" = 1, "lithium" = 1, "aluminum" = 1, "bromine" = 1, "ammonia" = 1) + result_amount = 5 + mix_message = "The solution bubbles freely, creating a head of bluish foam." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/perfluorodecalin + name = "Perfluorodecalin" + id = "perfluorodecalin" + result = "perfluorodecalin" + required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1) + result_amount = 3 + min_temp = 370 + mix_message = "The mixture rapidly turns into a dense pink liquid." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/ephedrine + name = "Ephedrine" + id = "ephedrine" + result = "ephedrine" + required_reagents = list("sugar" = 1, "oil" = 1, "hydrogen" = 1, "diethylamine" = 1) + result_amount = 4 + mix_message = "The solution fizzes and gives off toxic fumes." + +/datum/chemical_reaction/diphenhydramine + name = "Diphenhydramine" + id = "diphenhydramine" + result = "diphenhydramine" + required_reagents = list("oil" = 1, "carbon" = 1, "bromine" = 1, "diethylamine" = 1, "ethanol" = 1) + result_amount = 4 + mix_message = "The mixture fizzes gently." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/oculine + name = "Oculine" + id = "oculine" + result = "oculine" + required_reagents = list("atropine" = 1, "spaceacillin" = 1, "salglu_solution" = 1) + result_amount = 3 + mix_message = "The mixture settles, becoming a milky white." + +/datum/chemical_reaction/atropine + name = "Atropine" + id = "atropine" + result = "atropine" + required_reagents = list("ethanol" = 1, "acetone" = 1, "diethylamine" = 1, "phenol" = 1, "sacid" = 1) + result_amount = 5 + mix_message = "A horrid smell like something died drifts from the mixture." + +/datum/chemical_reaction/epinephrine + name = "Epinephrine" + id = "epinephrine" + result = "epinephrine" + required_reagents = list("phenol" = 1, "acetone" = 1, "diethylamine" = 1, "oxygen" = 1, "chlorine" = 1, "hydrogen" = 1) + result_amount = 6 + mix_message = "Tiny white crystals precipitate out of the solution." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/strange_reagent + name = "Strange Reagent" + id = "strange_reagent" + result = "strange_reagent" + required_reagents = list("omnizine" = 1, "holywater" = 1, "mutagen" = 1) + result_amount = 3 + mix_message = "The substance begins moving on its own somehow." + +/datum/chemical_reaction/life + name = "Life" + id = "life" + result = null + required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1) + result_amount = 3 + min_temp = 374 + +/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) + chemical_mob_spawn(holder, 1, "Life") + +/datum/chemical_reaction/mannitol + name = "Mannitol" + id = "mannitol" + result = "mannitol" + required_reagents = list("sugar" = 1, "hydrogen" = 1, "water" = 1) + result_amount = 3 + mix_message = "The mixture bubbles slowly, making a slightly sweet odor." + +/datum/chemical_reaction/mutadone + name = "Mutadone" + id = "mutadone" + result = "mutadone" + required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1) + result_amount = 3 + mix_message = "A foul astringent liquid emerges from the reaction." + +/datum/chemical_reaction/antihol + name = "antihol" + id = "antihol" + result = "antihol" + required_reagents = list("ethanol" = 1, "charcoal" = 1) + result_amount = 2 + mix_message = "A minty and refreshing smell drifts from the effervescent mixture." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/simethicone + name = "simethicone" + id = "simethicone" + result = "simethicone" + required_reagents = list("hydrogen" = 1, "chlorine" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 4 + +/datum/chemical_reaction/teporone + name = "Teporone" + id = "teporone" + result = "teporone" + required_reagents = list("acetone" = 1, "silicon" = 1, "plasma" = 1) + result_amount = 2 + mix_message = "The mixture turns an odd lavender color." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/haloperidol + name = "Haloperidol" + id = "haloperidol" + result = "haloperidol" + required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminum" = 1, "potass_iodide" = 1, "oil" = 1) + result_amount = 4 + mix_message = "The chemicals mix into an odd pink slush." + +/datum/chemical_reaction/ether + name = "Ether" + id = "ether" + result = "ether" + required_reagents = list("sacid" = 1, "ethanol" = 1, "oxygen" = 1) + result_amount = 1 + mix_message = "The mixture yields a pungent odor, which makes you tired." + +/datum/chemical_reaction/degreaser + name = "Degreaser" + id = "degreaser" + result = "degreaser" + required_reagents = list("oil" = 1, "sterilizine" = 1) + result_amount = 2 + +/datum/chemical_reaction/liquid_solder + name = "Liquid Solder" + id = "liquid_solder" + result = "liquid_solder" + required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) + result_amount = 3 + min_temp = 370 + mix_message = "The solution gently swirls with a metallic sheen." \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm new file mode 100644 index 00000000000..b97deb0ae8f --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -0,0 +1,482 @@ +// foam and foam precursor + +/datum/chemical_reaction/surfactant + name = "Foam surfactant" + id = "foam surfactant" + result = "fluorosurfactant" + required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) + result_amount = 5 + mix_message = "A head of foam results from the mixture's constant fizzing." + +/datum/chemical_reaction/foam + name = "Foam" + id = "foam" + result = null + required_reagents = list("fluorosurfactant" = 1, "water" = 1) + result_amount = 2 + +/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + holder.my_atom.visible_message("The solution spews out foam!") + + var/datum/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + + +/datum/chemical_reaction/metalfoam + name = "Metal Foam" + id = "metalfoam" + result = null + required_reagents = list("aluminum" = 3, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + + holder.my_atom.visible_message("The solution spews out a metalic foam!") + + var/datum/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, MFOAM_ALUMINUM) + s.start() + + +/datum/chemical_reaction/ironfoam + name = "Iron Foam" + id = "ironlfoam" + result = null + required_reagents = list("iron" = 3, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + + holder.my_atom.visible_message("= 5 && !istype(T, /turf/space)) - if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in T) //let's not have hundreds of decals of black powder on the same turf - new /obj/effect/decal/cleanable/dirt/blackpowder(T) - /datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread @@ -190,17 +136,6 @@ sleep(rand(20,30)) blackpowder_detonate(holder, created_volume) -/* -/datum/reagent/blackpowder/on_ex_act() - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() - sleep(rand(10,15)) - blackpowder_detonate(holder, volume) - holder.remove_reagent("blackpowder", volume) - return */ - /proc/blackpowder_detonate(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) var/ex_severe = round(created_volume / 100) @@ -213,20 +148,28 @@ spawn(0) qdel(holder.my_atom) -/datum/reagent/flash_powder - name = "Flash Powder" - id = "flash_powder" - description = "Makes a very bright flash." - reagent_state = LIQUID - color = "#FFFF00" - -/datum/chemical_reaction/flash_powder +datum/chemical_reaction/flash_powder name = "Flash powder" id = "flash_powder" result = "flash_powder" required_reagents = list("aluminum" = 1, "potassium" = 1, "sulfur" = 1, "chlorine" = 1) result_amount = 3 +/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume) + if(holder.has_reagent("stabilizing_agent")) + return + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + for(var/mob/living/carbon/C in viewers(5, location)) + if(C.flash_eyes()) + if(get_dist(C, location) < 4) + C.Weaken(5) + continue + C.Stun(5) + holder.remove_reagent("flash_powder", created_volume) + /datum/chemical_reaction/flash_powder_flash name = "Flash powder activation" id = "flash_powder_flash" @@ -246,29 +189,6 @@ continue C.Stun(5) - -/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume) - if(holder.has_reagent("stabilizing_agent")) - return - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() - for(var/mob/living/carbon/C in viewers(5, location)) - if(C.flash_eyes()) - if(get_dist(C, location) < 4) - C.Weaken(5) - continue - C.Stun(5) - holder.remove_reagent("flash_powder", created_volume) - -/datum/reagent/smoke_powder - name = "Smoke Powder" - id = "smoke_powder" - description = "Makes a large cloud of smoke that can carry reagents." - reagent_state = LIQUID - color = "#808080" - /datum/chemical_reaction/smoke_powder name = "smoke_powder" id = "smoke_powder" @@ -318,13 +238,6 @@ forbidden_reagents = list("stimulants") mix_sound = null -/datum/reagent/sonic_powder - name = "Sonic Powder" - id = "sonic_powder" - description = "Makes a deafening noise." - reagent_state = LIQUID - color = "#0000FF" - /datum/chemical_reaction/sonic_powder name = "sonic_powder" id = "sonic_powder" @@ -332,6 +245,35 @@ required_reagents = list("oxygen" = 1, "cola" = 1, "phosphorus" = 1) result_amount = 3 +/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume) + if(holder.has_reagent("stabilizing_agent")) + return + var/location = get_turf(holder.my_atom) + playsound(location, 'sound/effects/bang.ogg', 25, 1) + for(var/mob/living/M in hearers(5, location)) + var/ear_safety = 0 + var/distance = max(1,get_dist(src,T)) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(ishuman(C)) + var/mob/living/carbon/human/H = C + if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT))) + ear_safety++ + to_chat(C, "BANG") + if(!ear_safety) + M.Stun(max(10/distance, 3)) + M.Weaken(max(10/distance, 3)) + M.AdjustEarDamage(rand(0, 5)) + M.EarDeaf(15) + if(M.ear_damage >= 15) + to_chat(M, "Your ears start to ring badly!") + if(prob(M.ear_damage - 5)) + to_chat(M, "You can't hear anything!") + M.disabilities |= DEAF + else + if(M.ear_damage >= 5) + to_chat(M, "Your ears start to ring!") + holder.remove_reagent("sonic_powder", created_volume) /datum/chemical_reaction/sonic_powder_deafen name = "sonic_powder_deafen" @@ -356,53 +298,17 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) + M.AdjustEarDamage(rand(0, 5)) + M.EarDeaf(15) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 5)) to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF + M.BecomeDeaf() else if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") -/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume) - if(holder.has_reagent("stabilizing_agent")) - return - var/location = get_turf(holder.my_atom) - playsound(location, 'sound/effects/bang.ogg', 25, 1) - for(var/mob/living/M in hearers(5, location)) - var/ear_safety = 0 - var/distance = max(1,get_dist(src,T)) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT))) - ear_safety++ - to_chat(C, "BANG") - if(!ear_safety) - M.Stun(max(10/distance, 3)) - M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) - if(M.ear_damage >= 15) - to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) - to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF - else - if(M.ear_damage >= 5) - to_chat(M, "Your ears start to ring!") - holder.remove_reagent("sonic_powder", created_volume) - -/datum/reagent/phlogiston - name = "Phlogiston" - id = "phlogiston" - description = "Catches you on fire and makes you ignite." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/phlogiston name = "phlogiston" id = "phlogiston" @@ -417,32 +323,6 @@ for(var/turf/simulated/turf in range(min(created_volume/10,4),T)) new /obj/effect/hotspot(turf) -/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) - M.IgniteMob() - ..() - -/datum/reagent/phlogiston/on_mob_life(mob/living/M) - M.adjust_fire_stacks(1) - var/burndmg = max(0.3*M.fire_stacks, 0.3) - M.adjustFireLoss(burndmg) - ..() - -/datum/reagent/napalm - name = "Napalm" - id = "napalm" - description = "Very flammable." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/napalm/on_mob_life(mob/living/M) - M.adjust_fire_stacks(1) - ..() - -/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.adjust_fire_stacks(min(volume/4, 20)) - /datum/chemical_reaction/napalm name = "Napalm" id = "napalm" @@ -450,13 +330,6 @@ required_reagents = list("sugar" = 1, "fuel" = 1, "ethanol" = 1 ) result_amount = 1 -/datum/reagent/cryostylane - name = "Cryostylane" - id = "cryostylane" - description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the mob down to 0K." - color = "#B2B2FF" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/cryostylane name = "cryostylane" id = "cryostylane" @@ -465,31 +338,6 @@ result_amount = 3 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' -/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube - if(M.reagents.has_reagent("oxygen")) - M.reagents.remove_reagent("oxygen", 1) - M.bodytemperature -= 30 - ..() - -/datum/reagent/cryostylane/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp -= 10 - holder.handle_reactions() - ..() - -/datum/reagent/cryostylane/reaction_turf(turf/T, volume) - if(volume >= 5) - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,30)) - -/datum/reagent/pyrosium - name = "Pyrosium" - id = "pyrosium" - description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K." - color = "#B20000" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/pyrosium name = "pyrosium" id = "pyrosium" @@ -497,19 +345,6 @@ required_reagents = list("plasma" = 1, "radium" = 1, "phosphorus" = 1) result_amount = 3 -/datum/reagent/pyrosium/on_mob_life(mob/living/M) - if(M.reagents.has_reagent("oxygen")) - M.reagents.remove_reagent("oxygen", 1) - M.bodytemperature += 30 - ..() - -/datum/reagent/pyrosium/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp += 10 - holder.handle_reactions() - ..() - /datum/chemical_reaction/azide name = "azide" id = "azide" @@ -523,14 +358,6 @@ var/location = get_turf(holder.my_atom) explosion(location, 0, 1, 4) -/datum/reagent/firefighting_foam - name = "Firefighting foam" - id = "firefighting_foam" - description = "Carbon Tetrachloride is a foam used for fire suppression." - reagent_state = LIQUID - color = "#A0A090" - var/cooling_temperature = 3 // more effective than water - /datum/chemical_reaction/firefighting_foam name = "firefighting_foam" id = "firefighting_foam" @@ -540,29 +367,6 @@ mix_message = "The mixture bubbles gently." mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' -/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume) -// Put out fire - if(method == TOUCH) - M.adjust_fire_stacks(-(volume / 5)) // more effective than water - M.ExtinguishMob() - -/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) - if(istype(O)) - O.extinguish() - -/datum/reagent/firefighting_foam/reaction_turf(turf/simulated/T, volume) - if(!istype(T)) - return - var/CT = cooling_temperature - new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles()) - lowertemp.temperature = max(min(lowertemp.temperature-(CT*1000), lowertemp.temperature / CT), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) - /datum/chemical_reaction/clf3_firefighting name = "clf3_firefighting" id = "clf3_firefighting" @@ -593,30 +397,9 @@ holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") -/datum/reagent/plasma_dust - name = "Plasma Dust" - id = "plasma_dust" - description = "A fine dust of plasma. This chemical has unusual mutagenic properties for viruses and slimes alike." - color = "#500064" // rgb: 80, 0, 100 - -/datum/reagent/plasma_dust/on_mob_life(mob/living/M) - M.adjustToxLoss(3) - if(iscarbon(M)) - var/mob/living/carbon/C = M - C.adjustPlasma(20) - ..() - -/datum/reagent/plasma_dust/reaction_obj(obj/O, volume) - if((!O) || (!volume)) - return 0 - O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) - -/datum/reagent/plasma_dust/reaction_turf(turf/simulated/T, volume) - if(istype(T)) - T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) - -/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - return - ..() \ No newline at end of file +/datum/chemical_reaction/thermite + name = "Thermite" + id = "thermite" + result = "thermite" + required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) + result_amount = 3 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm similarity index 100% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm rename to code/modules/reagents/chemistry/recipes/slime_extracts.dm diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm new file mode 100644 index 00000000000..2181401b2da --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -0,0 +1,142 @@ +/datum/chemical_reaction/formaldehyde + name = "formaldehyde" + id = "formaldehyde" + result = "formaldehyde" + required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1) + result_amount = 3 + min_temp = 420 + mix_message = "Ugh, it smells like the morgue in here." + +/datum/chemical_reaction/neurotoxin2 + name = "neurotoxin2" + id = "neurotoxin2" + result = "neurotoxin2" + required_reagents = list("space_drugs" = 1) + result_amount = 1 + min_temp = 674 + mix_sound = null + no_message = 1 + +/datum/chemical_reaction/cyanide + name = "Cyanide" + id = "cyanide" + result = "cyanide" + required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1) + result_amount = 3 + min_temp = 380 + mix_message = "The mixture gives off a faint scent of almonds." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/cyanide/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("cyanide", 7) + +/datum/chemical_reaction/itching_powder + name = "Itching Powder" + id = "itching_powder" + result = "itching_powder" + required_reagents = list("fuel" = 1, "ammonia" = 1, "fungus" = 1) + result_amount = 3 + mix_message = "The mixture congeals and dries up, leaving behind an abrasive powder." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/facid + name = "Fluorosulfuric Acid" + id = "facid" + result = "facid" + required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1) + result_amount = 4 + min_temp = 380 + mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container." + +/datum/chemical_reaction/initropidril + name = "Initropidril" + id = "initropidril" + result = "initropidril" + required_reagents = list("crank" = 1, "histamine" = 1, "krokodil" = 1, "bath_salts" = 1, "atropine" = 1, "nicotine" = 1, "morphine" = 1) + result_amount = 4 + mix_message = "A sweet and sugary scent drifts from the unpleasant milky substance." + +/datum/chemical_reaction/sulfonal + name = "sulfonal" + id = "sulfonal" + result = "sulfonal" + required_reagents = list("acetone" = 1, "diethylamine" = 1, "sulfur" = 1) + result_amount = 3 + mix_message = "The mixture gives off quite a stench." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/lipolicide + name = "lipolicide" + id = "lipolicide" + result = "lipolicide" + required_reagents = list("mercury" = 1, "diethylamine" = 1, "ephedrine" = 1) + result_amount = 3 + +/datum/chemical_reaction/sarin + name = "sarin" + id = "sarin" + result = "sarin" + required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1) + result_amount = 3 + mix_message = "The mixture yields a colorless, odorless liquid." + min_temp = 374 + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 2)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("sarin", 4) + +/datum/chemical_reaction/atrazine + name = "atrazine" + id = "atrazine" + result = "atrazine" + required_reagents = list("chlorine" = 1, "hydrogen" = 1, "nitrogen" = 1) + result_amount = 3 + mix_message = "The mixture gives off a harsh odor" + +/datum/chemical_reaction/capulettium + name = "capulettium" + id = "capulettium" + result = "capulettium" + required_reagents = list("neurotoxin2" = 1, "chlorine" = 1, "hydrogen" = 1) + result_amount = 1 + mix_message = "The smell of death wafts up from the solution." + +/datum/chemical_reaction/capulettium_plus + name = "capulettium_plus" + id = "capulettium_plus" + result = "capulettium_plus" + required_reagents = list("capulettium" = 1, "ephedrine" = 1, "methamphetamine" = 1) + result_amount = 3 + mix_message = "The solution begins to slosh about violently by itself." + +/datum/chemical_reaction/teslium + name = "Teslium" + id = "teslium" + result = "teslium" + required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1) + result_amount = 3 + mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." + min_temp = 400 + mix_sound = null + +/datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(6, 1, location) + s.start() + +/datum/chemical_reaction/mutagen + name = "Unstable mutagen" + id = "mutagen" + result = "mutagen" + required_reagents = list("radium" = 1, "plasma" = 1, "chlorine" = 1) + result_amount = 3 + mix_message = "The substance turns neon green and bubbles unnervingly." \ No newline at end of file diff --git a/code/modules/reagents/newchem/disease.dm b/code/modules/reagents/newchem/disease.dm deleted file mode 100644 index def94ba9a2c..00000000000 --- a/code/modules/reagents/newchem/disease.dm +++ /dev/null @@ -1,320 +0,0 @@ -/datum/reagent/spider_eggs - name = "spider eggs" - id = "spidereggs" - description = "A fine dust containing spider eggs. Oh gosh." - reagent_state = SOLID - color = "#FFFFFF" - -/datum/reagent/spider_eggs/on_mob_life(mob/living/M) - if(volume > 2.5) - if(iscarbon(M)) - if(!M.get_int_organ(/obj/item/organ/internal/body_egg)) - new/obj/item/organ/internal/body_egg/spider_eggs(M) //Yes, even Xenos can fall victim to the plague that is spider infestation. - ..() - - -/datum/reagent/nanomachines - name = "Nanomachines" - id = "nanomachines" - description = "Microscopic construction robots." - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/nanomachines/on_mob_life(mob/living/carbon/M) - if(volume > 1.5) - M.ForceContractDisease(new /datum/disease/transformation/robot(0)) - ..() - - -/datum/reagent/xenomicrobes - name = "Xenomicrobes" - id = "xenomicrobes" - description = "Microbes with an entirely alien cellular structure." - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/xenomicrobes/on_mob_life(mob/living/carbon/M) - if(volume > 1.5) - M.ContractDisease(new /datum/disease/transformation/xeno(0)) - ..() - -/datum/reagent/fungalspores - name = "Tubercle bacillus Cosmosis microbes" - id = "fungalspores" - description = "Active fungal spores." - color = "#92D17D" // rgb: 146, 209, 125 - -/datum/reagent/fungalspores/on_mob_life(mob/living/carbon/M) - if(volume > 2.5) - M.ForceContractDisease(new /datum/disease/tuberculosis(0)) - ..() - -/datum/reagent/jagged_crystals - name = "Jagged Crystals" - id = "jagged_crystals" - description = "Rapid chemical decomposition has warped these crystals into twisted spikes." - reagent_state = SOLID - color = "#FA0000" // rgb: 250, 0, 0 - -/datum/reagent/jagged_crystals/on_mob_life(mob/living/carbon/M) - M.ForceContractDisease(new /datum/disease/berserker(0)) - ..() - -/datum/reagent/salmonella - name = "Salmonella" - id = "salmonella" - description = "A nasty bacteria found in spoiled food." - reagent_state = LIQUID - color = "#1E4600" - -/datum/reagent/salmonella/on_mob_life(mob/living/carbon/M) - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - ..() - -/datum/reagent/gibbis - name = "Gibbis" - id = "gibbis" - description = "Liquid gibbis." - reagent_state = LIQUID - color = "#FF0000" - -/datum/reagent/gibbis/on_mob_life(mob/living/carbon/M) - if(volume > 2.5) - M.ForceContractDisease(new /datum/disease/gbs/curable(0)) - ..() - -/datum/reagent/prions - name = "Prions" - id = "prions" - description = "A disease-causing agent that is neither bacterial nor fungal nor viral and contains no genetic material." - reagent_state = LIQUID - color = "#FFFFFF" - -/datum/reagent/prions/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - M.ForceContractDisease(new /datum/disease/kuru(0)) - ..() - -/datum/reagent/grave_dust - name = "Grave Dust" - id = "grave_dust" - description = "Moldy old dust taken from a grave site." - reagent_state = LIQUID - color = "#465046" - -/datum/reagent/grave_dust/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - M.ForceContractDisease(new /datum/disease/vampire(0)) - ..() - -/datum/reagent/heartworms - name = "Space heartworms" - id = "heartworms" - description = "Aww, gross! These things can't be good for your heart. They're gunna eat it!" - reagent_state = SOLID - color = "#925D6C" - -/datum/reagent/heartworms/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/internal/heart/ate_heart = H.get_int_organ(/obj/item/organ/internal/heart) - if(ate_heart) - ate_heart.remove(H) - qdel(ate_heart) - ..() - -//virus-specific symptom reagents - -/datum/reagent/synaphydramine - name = "Diphen-Synaptizine" - id = "synaphydramine" - description = "Reduces drowsiness and hallucinations while also purging histamine from the body." - color = "#EC536D" // rgb: 236, 83, 109 - -/datum/reagent/synaphydramine/on_mob_life(mob/living/M) - M.drowsyness = max(M.drowsyness-5, 0) - if(holder.has_reagent("lsd")) - holder.remove_reagent("lsd", 5) - if(holder.has_reagent("histamine")) - holder.remove_reagent("histamine", 5) - M.hallucination = max(0, M.hallucination - 10) - if(prob(30)) - M.adjustToxLoss(1) - ..() - -//virus food -/datum/reagent/virus_food - name = "Virus Food" - id = "virusfood" - description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#899613" // rgb: 137, 150, 19 - -/datum/reagent/virus_food/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor * REAGENTS_EFFECT_MULTIPLIER - ..() - -/datum/reagent/mutagen/mutagenvirusfood - name = "mutagenic agar" - id = "mutagenvirusfood" - description = "mutates blood" - color = "#A3C00F" // rgb: 163,192,15 - -/datum/reagent/mutagen/mutagenvirusfood/sugar - name = "sucrose agar" - id = "sugarvirusfood" - color = "#41B0C0" // rgb: 65,176,192 - -/datum/reagent/diphenhydramine/diphenhydraminevirusfood - name = "virus rations" - id = "diphenhydraminevirusfood" - description = "mutates blood" - color = "#D18AA5" // rgb: 209,138,165 - -/datum/reagent/plasma_dust/plasmavirusfood - name = "virus plasma" - id = "plasmavirusfood" - description = "mutates blood" - color = "#A69DA9" // rgb: 166,157,169 - -/datum/reagent/plasma_dust/plasmavirusfood/weak - name = "weakened virus plasma" - id = "weakplasmavirusfood" - color = "#CEC3C6" // rgb: 206,195,198 - -//reactions -/datum/chemical_reaction/virus_food - name = "Virus Food" - id = "virusfood" - result = "virusfood" - required_reagents = list("water" = 1, "milk" = 1, "oxygen" = 1) - result_amount = 3 - -/datum/chemical_reaction/virus_food_mutagen - name = "mutagenic agar" - id = "mutagenvirusfood" - result = "mutagenvirusfood" - required_reagents = list("mutagen" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_diphenhydramine - name = "virus rations" - id = "diphenhydraminevirusfood" - result = "diphenhydraminevirusfood" - required_reagents = list("diphenhydramine" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_plasma - name = "virus plasma" - id = "plasmavirusfood" - result = "plasmavirusfood" - required_reagents = list("plasma_dust" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_plasma_diphenhydramine - name = "weakened virus plasma" - id = "weakplasmavirusfood" - result = "weakplasmavirusfood" - required_reagents = list("diphenhydramine" = 1, "plasmavirusfood" = 1) - result_amount = 2 - -/datum/chemical_reaction/virus_food_mutagen_sugar - name = "sucrose agar" - id = "sugarvirusfood" - result = "sugarvirusfood" - required_reagents = list("sugar" = 1, "mutagenvirusfood" = 1) - result_amount = 2 - -/datum/chemical_reaction/virus_food_mutagen_salineglucose - name = "sucrose agar" - id = "salineglucosevirusfood" - result = "sugarvirusfood" - required_reagents = list("salglu_solution" = 1, "mutagenvirusfood" = 1) - result_amount = 2 - - -//mix virus -/datum/chemical_reaction/mix_virus - name = "Mix Virus" - id = "mixvirus" - required_reagents = list("virusfood" = 1) - required_catalysts = list("blood" = 1) - var/level_min = 0 - var/level_max = 2 - -/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Evolve(level_min, level_max) - - -/datum/chemical_reaction/mix_virus/mix_virus_2 - name = "Mix Virus 2" - id = "mixvirus2" - required_reagents = list("mutagen" = 1) - level_min = 2 - level_max = 4 - -/datum/chemical_reaction/mix_virus/mix_virus_3 - name = "Mix Virus 3" - id = "mixvirus3" - required_reagents = list("plasma_dust" = 1) - level_min = 4 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_4 - name = "Mix Virus 4" - id = "mixvirus4" - required_reagents = list("uranium" = 1) - level_min = 5 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_5 - name = "Mix Virus 5" - id = "mixvirus5" - required_reagents = list("mutagenvirusfood" = 1) - level_min = 3 - level_max = 3 - -/datum/chemical_reaction/mix_virus/mix_virus_6 - name = "Mix Virus 6" - id = "mixvirus6" - required_reagents = list("sugarvirusfood" = 1) - level_min = 4 - level_max = 4 - -/datum/chemical_reaction/mix_virus/mix_virus_7 - name = "Mix Virus 7" - id = "mixvirus7" - required_reagents = list("weakplasmavirusfood" = 1) - level_min = 5 - level_max = 5 - -/datum/chemical_reaction/mix_virus/mix_virus_8 - name = "Mix Virus 8" - id = "mixvirus8" - required_reagents = list("plasmavirusfood" = 1) - level_min = 6 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_9 - name = "Mix Virus 9" - id = "mixvirus9" - required_reagents = list("diphenhydraminevirusfood" = 1) - level_min = 1 - level_max = 1 - -/datum/chemical_reaction/mix_virus/rem_virus - name = "Devolve Virus" - id = "remvirus" - required_reagents = list("diphenhydramine" = 1) - required_catalysts = list("blood" = 1) - -/datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Devolve() \ No newline at end of file diff --git a/code/modules/reagents/newchem/drinks.dm b/code/modules/reagents/newchem/drinks.dm deleted file mode 100644 index b1f789b7f22..00000000000 --- a/code/modules/reagents/newchem/drinks.dm +++ /dev/null @@ -1,238 +0,0 @@ -/datum/reagent/ginsonic - name = "Gin and sonic" - id = "ginsonic" - description = "GOTTA GET CRUNK FAST BUT LIQUOR TOO SLOW" - reagent_state = LIQUID - color = "#1111CF" - -/datum/chemical_reaction/ginsonic - name = "ginsonic" - id = "ginsonic" - result = "ginsonic" - required_reagents = list("gintonic" = 1, "methamphetamine" = 1) - result_amount = 2 - mix_message = "The drink turns electric blue and starts quivering violently." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ginsonic/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) - if(prob(25)) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - if(prob(8)) - M.reagents.add_reagent("methamphetamine",1.2) - var/sonic_message = pick("Gotta go fast!", "Time to speed, keed!", "I feel a need for speed!", "Let's juice.", "Juice time.", "Way Past Cool!") - if(prob(50)) - M.say("[sonic_message]") - else - to_chat(M, "[sonic_message ]") - ..() - -/datum/reagent/ethanol/applejack - name = "Applejack" - id = "applejack" - description = "A highly concentrated alcoholic beverage made by repeatedly freezing cider and removing the ice." - color = "#997A00" - alcohol_perc = 0.4 - -/datum/chemical_reaction/applejack - name = "applejack" - id = "applejack" - result = "applejack" - required_reagents = list("cider" = 2) - max_temp = 270 - result_amount = 1 - mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind." - mix_sound = null - -/datum/reagent/ethanol/jackrose - name = "Jack Rose" - id = "jackrose" - description = "A classic cocktail that had fallen out of fashion, but never out of taste," - color = "#664300" - alcohol_perc = 0.4 - -/datum/chemical_reaction/jackrose - name = "jackrose" - id = "jackrose" - result = "jackrose" - required_reagents = list("applejack" = 4, "lemonjuice" = 1) - result_amount = 5 - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - - -/datum/reagent/ethanol/dragons_breath //inaccessible to players, but here for admin shennanigans - name = "Dragon's Breath" - id = "dragonsbreath" - description = "Possessing this stuff probably breaks the Geneva convention." - reagent_state = LIQUID - color = "#DC0000" - alcohol_perc = 1 - -/datum/reagent/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST && prob(20)) - if(M.on_fire) - M.adjust_fire_stacks(3) - -/datum/reagent/ethanol/dragons_breath/on_mob_life(mob/living/M) - if(M.reagents.has_reagent("milk")) - to_chat(M, "The milk stops the burning. Ahhh.") - M.reagents.del_reagent("milk") - M.reagents.del_reagent("dragonsbreath") - return - if(prob(8)) - to_chat(M, "Oh god! Oh GODD!!") - if(prob(50)) - to_chat(M, "Your throat burns terribly!") - M.emote(pick("scream","cry","choke","gasp")) - M.Stun(1) - if(prob(8)) - to_chat(M, "Why!? WHY!?") - if(prob(8)) - to_chat(M, "ARGHHHH!") - if(prob(2 * volume)) - to_chat(M, "OH GOD OH GOD PLEASE NO!!
") - if(M.on_fire) - M.adjust_fire_stacks(5) - if(prob(50)) - to_chat(M, "IT BURNS!!!!") - M.visible_message("[M] is consumed in flames!") - M.dust() - return - ..() - -// ROBOT ALCOHOL PAST THIS POINT -// WOOO! - - -/datum/reagent/ethanol/synthanol - name = "Synthanol" - id = "synthanol" - description = "A runny liquid with conductive capacities. Its effects on synthetics are similar to those of alcohol on organics." - reagent_state = LIQUID - color = "#1BB1FF" - process_flags = ORGANIC | SYNTHETIC - metabolization_rate = 0.4 - alcohol_perc = 0.5 - -/datum/chemical_reaction/synthanol - name = "Synthanol" - id = "synthanol" - result = "synthanol" - required_reagents = list("lube" = 1, "plasma" = 1, "fuel" = 1) - result_amount = 3 - mix_message = "The chemicals mix to create shiny, blue substance." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ethanol/synthanol/on_mob_life(mob/living/M) - if(!M.isSynthetic()) - holder.remove_reagent(id, 3.6) //gets removed from organics very fast - if(prob(25)) - holder.remove_reagent(id, 15) - M.fakevomit() - ..() - -/datum/reagent/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume) - if(M.isSynthetic()) - return - if(method == INGEST) - to_chat(M, pick("That was awful!", "Yuck!")) - -/datum/reagent/ethanol/synthanol/robottears - name = "Robot Tears" - id = "robottears" - description = "An oily substance that an IPC could technically consider a 'drink'." - reagent_state = LIQUID - color = "#363636" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/robottears - name = "Robot Tears" - id = "robottears" - result = "robottears" - required_reagents = list("synthanol" = 1, "oil" = 1, "sodawater" = 1) - result_amount = 3 - mix_message = "The ingredients combine into a stiff, dark goo." - -/datum/reagent/ethanol/synthanol/trinary - name = "Trinary" - id = "trinary" - description = "A fruit drink meant only for synthetics, however that works." - reagent_state = LIQUID - color = "#adb21f" - alcohol_perc = 0.2 - -/datum/chemical_reaction/synthanol/trinary - name = "Trinary" - id = "trinary" - result = "trinary" - required_reagents = list("synthanol" = 1, "limejuice" = 1, "orangejuice" = 1) - result_amount = 3 - mix_message = "The ingredients mix into a colorful substance." - -/datum/reagent/ethanol/synthanol/servo - name = "Servo" - id = "servo" - description = "A drink containing some organic ingredients, but meant only for synthetics." - reagent_state = LIQUID - color = "#5b3210" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/servo - name = "Servo" - id = "servo" - result = "servo" - required_reagents = list("synthanol" = 2, "cream" = 1, "hot_coco" = 1) - result_amount = 4 - mix_message = "The ingredients mix into a dark brown substance." - -/datum/reagent/ethanol/synthanol/uplink - name = "Uplink" - id = "uplink" - description = "A potent mix of alcohol and synthanol. Will only work on synthetics." - reagent_state = LIQUID - color = "#e7ae04" - alcohol_perc = 0.15 - -/datum/chemical_reaction/synthanol/uplink - name = "Uplink" - id = "uplink" - result = "uplink" - required_reagents = list("rum" = 1, "vodka" = 1, "tequila" = 1, "whiskey" = 1, "synthanol" = 1) - result_amount = 5 - mix_message = "The chemicals mix to create a shiny, orange substance." - -/datum/reagent/ethanol/synthanol/synthnsoda - name = "Synth 'n Soda" - id = "synthnsoda" - description = "The classic drink adjusted for a robot's tastes." - reagent_state = LIQUID - color = "#7204e7" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/synthnsoda - name = "Synth 'n Soda" - id = "synthnsoda" - result = "synthnsoda" - required_reagents = list("synthanol" = 1, "cola" = 1) - result_amount = 2 - mix_message = "The chemicals mix to create a smooth, fizzy substance." - -/datum/reagent/ethanol/synthanol/synthignon - name = "Synthignon" - id = "synthignon" - description = "Someone mixed wine and alcohol for robots. Hope you're proud of yourself." - reagent_state = LIQUID - color = "#d004e7" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/synthignon - name = "Synthignon" - id = "synthignon" - result = "synthignon" - required_reagents = list("synthanol" = 1, "wine" = 1) - result_amount = 2 - mix_message = "The chemicals mix to create a fine, red substance." - -// ROBOT ALCOHOL ENDS diff --git a/code/modules/reagents/newchem/food.dm b/code/modules/reagents/newchem/food.dm deleted file mode 100644 index 7f529b6b815..00000000000 --- a/code/modules/reagents/newchem/food.dm +++ /dev/null @@ -1,557 +0,0 @@ -/datum/reagent/questionmark // food poisoning - name = "????" - id = "????" - description = "A gross and unidentifiable substance." - reagent_state = LIQUID - color = "#63DE63" - metabolization_rate = 0.4 - -/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - M.Stun(2) - M.Weaken(2) - to_chat(M, "Ugh! Eating that was a terrible idea!") - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - -/datum/reagent/egg - name = "Egg" - id = "egg" - description = "A runny and viscous mixture of clear and yellow fluids." - reagent_state = LIQUID - color = "#F0C814" - -/datum/reagent/egg/on_mob_life(mob/living/M) - if(prob(8)) - M.emote("fart") - if(prob(3)) - M.reagents.add_reagent("cholesterol", rand(1,2)) - ..() - -/datum/reagent/triple_citrus - name = "Triple Citrus" - id = "triple_citrus" - description = "A refreshing mixed drink of orange, lemon and lime juice." - reagent_state = LIQUID - color = "#23A046" - -/datum/chemical_reaction/triple_citrus - name = "triple_citrus" - id = "triple_citrus" - result = "triple_citrus" - required_reagents = list("lemonjuice" = 1, "limejuice" = 1, "orangejuice" = 1) - result_amount = 3 - mix_message = "The citrus juices begin to blend together." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - M.adjustToxLoss(-rand(1,2)) - -/datum/reagent/corn_starch - name = "Corn Starch" - id = "corn_starch" - description = "The powdered starch of maize, derived from the kernel's endosperm. Used as a thickener for gravies and puddings." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/chemical_reaction/corn_syrup - name = "corn_syrup" - id = "corn_syrup" - result = "corn_syrup" - required_reagents = list("corn_starch" = 1, "sacid" = 1) - result_amount = 2 - min_temp = 374 - mix_message = "The mixture forms a viscous, clear fluid!" - -/datum/reagent/corn_syrup - name = "Corn Syrup" - id = "corn_syrup" - description = "A sweet syrup derived from corn starch that has had its starches converted into maltose and other sugars." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/corn_syrup/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 1.2) - ..() - -/datum/chemical_reaction/vhfcs - name = "vhfcs" - id = "vhfcs" - result = "vhfcs" - required_reagents = list("corn_syrup" = 1) - required_catalysts = list("enzyme" = 1) - result_amount = 1 - mix_message = "The mixture emits a sickly-sweet smell." - -/datum/reagent/vhfcs - name = "Very-high-fructose corn syrup" - id = "vhfcs" - description = "An incredibly sweet syrup, created from corn syrup treated with enzymes to convert its sugars into fructose." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/vhfcs/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 2.4) - ..() - -/datum/chemical_reaction/cola - name = "cola" - id = "cola" - result = "cola" - required_reagents = list("carbon" = 1, "oxygen" = 1, "water" = 1, "sugar" = 1) - result_amount = 4 - mix_message = "The mixture begins to fizz." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/honey - name = "Honey" - id = "honey" - description = "A sweet substance produced by bees through partial digestion. Bee barf." - reagent_state = LIQUID - color = "#d3a308" - -/datum/reagent/honey/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 0.4) - if(prob(20)) - M.heal_organ_damage(3,1) - ..() - -/datum/reagent/chocolate - name = "Chocolate" - id = "chocolate" - description = "Chocolate is a delightful product derived from the seeds of the theobroma cacao tree." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM //same as pure cocoa powder, because it makes no sense that chocolate won't fill you up and make you fat - color = "#2E2418" - -/datum/reagent/chocolate/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.reagents.add_reagent("sugar", 0.8) - ..() - -/datum/reagent/chocolate/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/choc_pile(T) - -/datum/reagent/mugwort - name = "Mugwort" - id = "mugwort" - description = "A rather bitter herb once thought to hold magical protective properties." - reagent_state = LIQUID - color = "#21170E" - -/datum/reagent/mugwort/on_mob_life(mob/living/M) - if(ishuman(M) && M.mind) - if(M.mind.special_role == SPECIAL_ROLE_WIZARD) - M.adjustToxLoss(-1*REM) - M.adjustOxyLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) - ..() - -/datum/reagent/porktonium - name = "Porktonium" - id = "porktonium" - description = "A highly-radioactive pork byproduct first discovered in hotdogs." - reagent_state = LIQUID - color = "#AB5D5D" - metabolization_rate = 0.2 - overdose_threshold = 133 - -/datum/reagent/porktonium/overdose_process(mob/living/M, severity) - if(prob(15)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("radium", 15) - M.reagents.add_reagent("cyanide", 10) - -/datum/reagent/fungus - name = "Space fungus" - id = "fungus" - description = "Scrapings of some unknown fungus found growing on the station walls." - reagent_state = LIQUID - color = "#C87D28" - -/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - var/ranchance = rand(1,10) - if(ranchance == 1) - to_chat(M, "You feel very sick.") - M.reagents.add_reagent("toxin", rand(1,5)) - else if(ranchance <= 5) - to_chat(M, "That tasted absolutely FOUL.") - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - else - to_chat(M, "Yuck!") - -/datum/reagent/chicken_soup - name = "Chicken soup" - id = "chicken_soup" - description = "An old household remedy for mild illnesses." - reagent_state = LIQUID - color = "#B4B400" - metabolization_rate = 0.2 - -/datum/reagent/chicken_soup/on_mob_life(mob/living/M) - M.nutrition += 2 - ..() - -/datum/reagent/msg - name = "Monosodium glutamate" - id = "msg" - description = "Monosodium Glutamate is a sodium salt known chiefly for its use as a controversial flavor enhancer." - reagent_state = LIQUID - color = "#F5F5F5" - metabolization_rate = 0.2 - -/datum/reagent/msg/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - to_chat(M, "That tasted amazing!") - - -/datum/reagent/msg/on_mob_life(mob/living/M) - if(prob(5)) - if(prob(10)) - M.adjustToxLoss(rand(2.4)) - if(prob(7)) - to_chat(M, "A horrible migraine overpowers you.") - M.Stun(rand(2,5)) - ..() - -/datum/reagent/cheese - name = "Cheese" - id = "cheese" - description = "Some cheese. Pour it out to make it solid." - reagent_state = SOLID - color = "#FFFF00" - metabolization_rate = 0 //heheheh - - -/datum/reagent/cheese/on_mob_life(mob/living/M) - if(prob(3)) - M.reagents.add_reagent("cholesterol", rand(1,2)) - ..() - -/datum/reagent/cheese/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge(T) - -/datum/chemical_reaction/cheese - name = "cheese" - id = "cheese" - result = "cheese" - required_reagents = list("vomit" = 1, "milk" = 1) - result_amount = 1 - mix_message = "The mixture curdles up." - -/datum/chemical_reaction/cheese/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("A faint cheesy smell drifts through the air...") - -/datum/reagent/fake_cheese - name = "Cheese substitute" - id = "fake_cheese" - description = "A cheese-like substance derived loosely from actual cheese." - reagent_state = LIQUID - color = "#B2B139" - overdose_threshold = 50 - -/datum/reagent/fake_cheese/overdose_process(mob/living/M, severity) - if(prob(8)) - to_chat(M, "You feel something squirming in your stomach. Your thoughts turn to cheese and you begin to sweat.") - M.adjustToxLoss(rand(1,2)) - -/datum/reagent/weird_cheese - name = "Weird cheese" - id = "weird_cheese" - description = "Hell, I don't even know if this IS cheese. Whatever it is, it ain't normal. If you want to, pour it out to make it solid." - reagent_state = SOLID - color = "#50FF00" - metabolization_rate = 0 //heheheh - addiction_chance = 5 - -/datum/reagent/weird_cheese/on_mob_life(mob/living/M) - if(prob(5)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - ..() - -/datum/reagent/weird_cheese/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/weirdcheesewedge(T) - -/datum/chemical_reaction/weird_cheese - name = "Weird cheese" - id = "weird_cheese" - result = "weird_cheese" - required_reagents = list("green_vomit" = 1, "milk" = 1) - result_amount = 1 - mix_message = "The disgusting mixture sloughs together horribly, emitting a foul stench." - mix_sound = 'sound/goonstation/misc/gurggle.ogg' - -/datum/chemical_reaction/weird_cheese/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("A horrible smell assaults your nose! What in space is it?") - -/datum/reagent/beans - name = "Refried beans" - id = "beans" - description = "A dish made of mashed beans cooked with lard." - reagent_state = LIQUID - color = "#684435" - -/datum/reagent/beans/on_mob_life(mob/living/M) - if(prob(10)) - M.emote("fart") - ..() - -/datum/reagent/bread - name = "Bread" - id = "bread" - description = "Bread! Yep, bread." - reagent_state = SOLID - color = "#9C5013" - -/datum/reagent/bread/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/breadslice(T) - -/datum/reagent/vomit - name = "Vomit" - id = "vomit" - description = "Looks like someone lost their lunch. And then collected it. Yuck." - reagent_state = LIQUID - color = "#FFFF00" - -/datum/reagent/vomit/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/vomit(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - -/datum/reagent/greenvomit - name = "Green vomit" - id = "green_vomit" - description = "Whoa, that can't be natural. That's horrible." - reagent_state = LIQUID - color = "#78FF74" - -/datum/reagent/greenvomit/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/vomit/green(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - - -/datum/reagent/ectoplasm - name = "Ectoplasm" - id = "ectoplasm" - description = "A bizarre gelatinous substance supposedly derived from ghosts." - reagent_state = LIQUID - color = "#8EAE7B" - process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell - -/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.") - to_chat(M, "[spooky_eat]") - -/datum/reagent/ectoplasm/on_mob_life(mob/living/M) - var/spooky_message = pick("You notice something moving out of the corner of your eye, but nothing is there...", "Your eyes twitch, you feel like something you can't see is here...", "You've got the heebie-jeebies.", "You feel uneasy.", "You shudder as if cold...", "You feel something gliding across your back...") - if(prob(8)) - to_chat(M, "[spooky_message]") - ..() - -/datum/reagent/ectoplasm/reaction_turf(turf/T, volume) - if(volume >= 10 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(T) - -/datum/reagent/soybeanoil - name = "Space-soybean oil" - id = "soybeanoil" - description = "An oil derived from extra-terrestrial soybeans." - reagent_state = LIQUID - color = "#B1B0B0" - -/datum/reagent/soybeanoil/on_mob_life(mob/living/M) - if(prob(10)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("porktonium", 5) - ..() - -/datum/reagent/hydrogenated_soybeanoil - name = "Partially hydrogenated space-soybean oil" - id = "hydrogenated_soybeanoil" - description = "An oil derived from extra-terrestrial soybeans, with additional hydrogen atoms added to convert it into a saturated form." - reagent_state = LIQUID - color = "#B1B0B0" - metabolization_rate = 0.2 - overdose_threshold = 75 - -/datum/reagent/hydrogenated_soybeanoil/on_mob_life(mob/living/M) - if(prob(15)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("porktonium", 5) - if(volume >= 75) - metabolization_rate = 0.4 - else - metabolization_rate = 0.2 - ..() - -/datum/reagent/hydrogenated_soybeanoil/overdose_process(mob/living/M, severity) - if(prob(33)) - to_chat(M, "You feel horribly weak.") - if(prob(10)) - to_chat(M, "You cannot breathe!") - M.adjustOxyLoss(5) - if(prob(5)) - to_chat(M, "You feel a sharp pain in your chest!") - M.adjustOxyLoss(25) - M.Stun(5) - M.Paralyse(10) - -/datum/chemical_reaction/hydrogenated_soybeanoil - name = "Partially hydrogenated space-soybean oil" - id = "hydrogenated_soybeanoil" - result = "hydrogenated_soybeanoil" - required_reagents = list("soybeanoil" = 1, "hydrogen" = 1) - result_amount = 2 - min_temp = 520 - mix_message = "The mixture emits a burnt, oily smell." - -/datum/reagent/meatslurry - name = "Meat Slurry" - id = "meatslurry" - description = "A paste comprised of highly-processed organic material. Uncomfortably similar to deviled ham spread." - reagent_state = LIQUID - color = "#EBD7D7" - -/datum/reagent/meatslurry/on_mob_life(mob/living/M) - if(prob(4)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - ..() - -/datum/reagent/meatslurry/reaction_turf(turf/T, volume) - if(volume >= 5 && prob(10) && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - -/datum/chemical_reaction/meatslurry - name = "Meat Slurry" - id = "meatslurry" - result = "meatslurry" - required_reagents = list("corn_starch" = 1, "blood" = 1) - result_amount = 2 - mix_message = "The mixture congeals into a bloody mass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/mashedpotatoes - name = "Mashed potatoes" - id = "mashedpotatoes" - description = "A starchy food paste made from boiled potatoes." - reagent_state = SOLID - color = "#D6D9C1" - -/datum/reagent/gravy - name = "Gravy" - id = "gravy" - description = "A savory sauce made from a simple meat-dripping roux and milk." - reagent_state = LIQUID - color = "#B4641B" - -/datum/chemical_reaction/gravy - name = "Gravy" - id = "gravy" - result = "gravy" - required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1) - result_amount = 3 - min_temp = 374 - mix_message = "The substance thickens and takes on a meaty odor." - -/datum/reagent/beff - name = "Beff" - id = "beff" - description = "An advanced blend of mechanically-recovered meat and textured synthesized protein product notable for its unusual crystalline grain when sliced." - reagent_state = SOLID - color = "#AC7E67" - -/datum/reagent/beff/on_mob_life(mob/living/M) - if(prob(5)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent(pick("blood", "corn_syrup", "synthflesh", "hydrogenated_soybeanoil", "porktonium", "toxic_slurry"), 0.8) - else if(prob(6)) - to_chat(M, "[pick("You feel ill.","Your stomach churns.","You feel queasy.","You feel sick.")]") - M.emote(pick("groan","moan")) - ..() - -/datum/chemical_reaction/beff - name = "Beff" - id = "beff" - result = "beff" - required_reagents = list("hydrogenated_soybeanoil" = 2, "meatslurry" = 1, "plasma" = 1) - result_amount = 4 - mix_message = "The mixture solidifies, taking a crystalline appearance." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/pepperoni - name = "Pepperoni" - id = "pepperoni" - description = "An Italian-American variety of salami usually made from beef and pork" - reagent_state = SOLID - color = "#AC7E67" - -/datum/reagent/pepperoni/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(H.wear_mask) - to_chat(H, "The pepperoni bounces off your mask!") - return - - if(H.head) - to_chat(H, "Your mask protects you from the errant pepperoni!") - return - - if(prob(50)) - M.adjustBruteLoss(1) - playsound(M, 'sound/effects/woodhit.ogg', 50, 1) - to_chat(M, "A slice of pepperoni slaps you!") - else - M.emote("burp") - to_chat(M, "My goodness, that was tasty!") - - -/datum/chemical_reaction/pepperoni - name = "Pepperoni" - id = "pepperoni" - result = "pepperoni" - required_reagents = list("beff" = 1, "saltpetre" = 1, "synthflesh" = 1) - result_amount = 2 - mix_message = "The beff and the synthflesh combine to form a smoky red log." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/cholesterol - name = "cholesterol" - id = "cholesterol" - description = "Pure cholesterol. Probably not very good for you." - reagent_state = LIQUID - color = "#FFFAC8" - -/datum/reagent/cholesterol/on_mob_life(mob/living/M) - if(volume >= 25 && prob(volume*0.15)) - to_chat(M, "Your chest feels [pick("weird","uncomfortable","nasty","gross","odd","unusual","warm")]!") - M.adjustToxLoss(rand(1,2)) - else if(volume >= 45 && prob(volume*0.08)) - to_chat(M, "Your chest [pick("hurts","stings","aches","burns")]!") - M.adjustToxLoss(rand(2,4)) - M.Stun(1) - else if(volume >= 150 && prob(volume*0.01)) - to_chat(M, "Your chest is burning with pain!") - M.Stun(1) - M.Weaken(1) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 - ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/newchem_procs.dm b/code/modules/reagents/newchem/newchem_procs.dm deleted file mode 100644 index 7ad083407d9..00000000000 --- a/code/modules/reagents/newchem/newchem_procs.dm +++ /dev/null @@ -1,212 +0,0 @@ -#define ADDICTION_TIME 4800 //8 minutes - -/datum/reagent - var/overdose_threshold = 0 - var/addiction_chance = 0 - var/addiction_stage = 1 - var/last_addiction_dose = 0 - var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. - var/current_cycle = 1 - -/datum/reagents/proc/metabolize(mob/living/M) - if(M) - chem_temp = M.bodytemperature - handle_reactions() - for(var/A in reagent_list) - var/datum/reagent/R = A - if(!istype(R)) // How are non-reagents ending up in the reagents_list? - continue - if(!R.holder) - continue - if(!M) - M = R.holder.my_atom - if(ishuman(M)) - var/mob/living/carbon/human/H = M - //Check if this mob's species is set and can process this type of reagent - var/can_process = 0 - //If we somehow avoided getting a species or reagent_tag set, we'll assume we aren't meant to process ANY reagents (CODERS: SET YOUR SPECIES AND TAG!) - if(H.species && H.species.reagent_tag) - if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN - can_process = 1 - if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG - can_process = 1 - //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater - if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) - can_process = 1 - - //If handle_reagents returns 0, it's doing the reagent removal on its own - var/species_handled = !(H.species.handle_reagents(H, R)) - can_process = can_process && !species_handled - //If the mob can't process it, remove the reagent at it's normal rate without doing any addictions, overdoses, or on_mob_life() for the reagent - if(can_process == 0) - if(!species_handled) - R.holder.remove_reagent(R.id, R.metabolization_rate) - continue - //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) - else - if(R.process_flags == SYNTHETIC) - R.holder.remove_reagent(R.id, R.metabolization_rate) - continue - //If you got this far, that means we can process whatever reagent this iteration is for. Handle things normally from here. - if(M && R) - R.on_mob_life(M) - if(R.volume >= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0) - R.overdosed = 1 - R.overdose_start(M) - if(R.volume < R.overdose_threshold && R.overdosed) - R.overdosed = 0 - if(R.overdosed) - R.overdose_process(M, R.volume >= R.overdose_threshold*2 ? 2 : 1) - - for(var/A in addiction_list) - var/datum/reagent/R = A - if(M && R) - if(R.addiction_stage < 5) - if(prob(5)) - R.addiction_stage++ - switch(R.addiction_stage) - if(1) - R.addiction_act_stage1(M) - if(2) - R.addiction_act_stage2(M) - if(3) - R.addiction_act_stage3(M) - if(4) - R.addiction_act_stage4(M) - if(5) - R.addiction_act_stage5(M) - if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end - to_chat(M, "You no longer feel reliant on [R.name]!") - addiction_list.Remove(R) - update_total() - -/datum/reagents/proc/death_metabolize(mob/living/M) - if(!M) - return - if(M.stat != DEAD) //what part of DEATH_metabolize don't you get? - return - for(var/A in reagent_list) - var/datum/reagent/R = A - if(!istype(R)) - continue - if(M && R) - R.on_mob_death(M) - -/datum/reagents/proc/overdose_list() - var/od_chems[0] - for(var/datum/reagent/R in reagent_list) - if(R.overdosed) - od_chems.Add(R.id) - return od_chems - - -/datum/reagents/proc/reagent_on_tick() - for(var/datum/reagent/R in reagent_list) - R.on_tick() - return - -// Called every time reagent containers process. -/datum/reagent/proc/on_tick(data) - return - -// Called when the reagent container is hit by an explosion -/datum/reagent/proc/on_ex_act(severity) - return - -// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects -/datum/reagent/proc/overdose_process(mob/living/M, severity) - var/effect = rand(1, 100) - severity - if(effect <= 8) - M.adjustToxLoss(severity) - return effect - -/datum/reagent/proc/overdose_start(mob/living/M) - return - -/datum/reagent/proc/addiction_act_stage1(mob/living/M) - return - -/datum/reagent/proc/addiction_act_stage2(mob/living/M) - if(prob(8)) - M.emote("shiver") - if(prob(8)) - M.emote("sneeze") - if(prob(4)) - to_chat(M, "You feel a dull headache.") - -/datum/reagent/proc/addiction_act_stage3(mob/living/M) - if(prob(8)) - M.emote("twitch_s") - if(prob(8)) - M.emote("shiver") - if(prob(4)) - to_chat(M, "You begin craving [name]!") - -/datum/reagent/proc/addiction_act_stage4(mob/living/M) - if(prob(8)) - M.emote("twitch") - if(prob(4)) - to_chat(M, "You have the strong urge for some [name]!") - if(prob(4)) - to_chat(M, "You REALLY crave some [name]!") - -/datum/reagent/proc/addiction_act_stage5(mob/living/M) - if(prob(8)) - M.emote("twitch") - if(prob(6)) - to_chat(M, "Your stomach lurches painfully!") - M.visible_message("[M] gags and retches!") - M.Stun(rand(2,4)) - M.Weaken(rand(2,4)) - if(prob(5)) - to_chat(M, "You feel like you can't live without [name]!") - if(prob(5)) - to_chat(M, "You would DIE for some [name] right now!") - -/datum/reagent/proc/reagent_deleted() - return - -var/list/chemical_mob_spawn_meancritters = list() // list of possible hostile mobs -var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs -/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_faction = "chemicalsummon") - if(holder && holder.my_atom) - if(chemical_mob_spawn_meancritters.len <= 0 || chemical_mob_spawn_nicecritters.len <= 0) - for(var/T in typesof(/mob/living/simple_animal)) - var/mob/living/simple_animal/SA = T - switch(initial(SA.gold_core_spawnable)) - if(CHEM_MOB_SPAWN_HOSTILE) - chemical_mob_spawn_meancritters += T - if(CHEM_MOB_SPAWN_FRIENDLY) - chemical_mob_spawn_nicecritters += T - var/atom/A = holder.my_atom - var/turf/T = get_turf(A) - var/area/my_area = get_area(T) - var/message = "A [reaction_name] reaction has occured in [my_area.name]. (JMP)" - message += " (VV)" - - var/mob/M = get(A, /mob) - if(M) - message += " - Carried By: [key_name_admin(M)](?) (FLW)" - else - message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]" - - message_admins(message, 0, 1) - - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) - C.flash_eyes() - for(var/i = 1, i <= amount_to_spawn, i++) - var/chosen - if(reaction_name == "Friendly Gold Slime") - chosen = pick(chemical_mob_spawn_nicecritters) - else - chosen = pick(chemical_mob_spawn_meancritters) - var/mob/living/simple_animal/C = new chosen - C.faction |= mob_faction - C.forceMove(get_turf(holder.my_atom)) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST)) - -#undef ADDICTION_TIME \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm b/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm deleted file mode 100644 index 3b4cc507415..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm +++ /dev/null @@ -1,23 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/datum/chemical_reaction - var/name = null - var/id = null - var/result = null - var/list/required_reagents = list() - var/list/required_catalysts = list() - - // Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things - var/atom/required_container = null // the container required for the reaction to happen - var/required_other = 0 // an integer required for the reaction to happen - - var/result_amount = 0 - var/secondary = 0 // set to nonzero if secondary reaction - var/list/secondary_results = list() //additional reagents produced by the reaction - var/min_temp = 0 //Minimum temperature required for the reaction to occur (heat to/above this). min_temp = 0 means no requirement - var/max_temp = 9999 //Maximum temperature allowed for the reaction to occur (cool to/below this). - var/mix_message = "The solution begins to bubble." - var/mix_sound = 'sound/effects/bubbles.ogg' - var/no_message = 0 - -/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume) - return \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm deleted file mode 100644 index afcd0d398ce..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm +++ /dev/null @@ -1,71 +0,0 @@ -//Anything for harm or hostile intents go here (explosions, EMPs, thermite, mutagen) -/datum/chemical_reaction/explosion_potassium - name = "Explosion" - id = "explosion_potassium" - result = null - required_reagents = list("water" = 1, "potassium" = 1) - result_amount = 2 - mix_message = "The mixture explodes!" - -/datum/chemical_reaction/explosion_potassium/on_reaction(datum/reagents/holder, created_volume) - var/datum/effect/system/reagents_explosion/e = new() - e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) - e.start() - holder.clear_reagents() - -/datum/chemical_reaction/emp_pulse - name = "EMP Pulse" - id = "emp_pulse" - result = null - required_reagents = list("uranium" = 1, "iron" = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense - result_amount = 2 - -/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - // 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes. - // 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades. - empulse(location, round(created_volume / 24), round(created_volume / 14), 1) - holder.clear_reagents() - -/datum/chemical_reaction/mutagen - name = "Unstable mutagen" - id = "mutagen" - result = "mutagen" - required_reagents = list("radium" = 1, "plasma" = 1, "chlorine" = 1) - result_amount = 3 - mix_message = "The substance turns neon green and bubbles unnervingly." - -/datum/chemical_reaction/thermite - name = "Thermite" - id = "thermite" - result = "thermite" - required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) - result_amount = 3 - -/datum/chemical_reaction/glycerol - name = "Glycerol" - id = "glycerol" - result = "glycerol" - required_reagents = list("cornoil" = 3, "sacid" = 1) - result_amount = 1 - -/datum/chemical_reaction/nitroglycerin - name = "Nitroglycerin" - id = "nitroglycerin" - result = "nitroglycerin" - required_reagents = list("glycerol" = 1, "facid" = 1, "sacid" = 1) - result_amount = 2 - -/datum/chemical_reaction/nitroglycerin/on_reaction(datum/reagents/holder, created_volume) - var/datum/effect/system/reagents_explosion/e = new() - e.set_up(round(created_volume/2, 1), holder.my_atom, 0, 0) - e.start() - holder.clear_reagents() - -/datum/chemical_reaction/condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - result = "condensedcapsaicin" - required_reagents = list("capsaicin" = 2) - required_catalysts = list("plasma" = 5) - result_amount = 1 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm deleted file mode 100644 index 0550813849c..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm +++ /dev/null @@ -1,44 +0,0 @@ -/datum/chemical_reaction/hydrocodone - name = "Hydrocodone" - id = "hydrocodone" - result = "hydrocodone" - required_reagents = list("morphine" = 1, "sacid" = 1, "water" = 1, "oil" = 1) - result_amount = 2 - -/datum/chemical_reaction/mitocholide - name = "mitocholide" - id = "mitocholide" - result = "mitocholide" - required_reagents = list("synthflesh" = 1, "cryoxadone" = 1, "plasma" = 1) - result_amount = 3 - -/datum/chemical_reaction/cryoxadone - name = "Cryoxadone" - id = "cryoxadone" - result = "cryoxadone" - required_reagents = list("cryostylane" = 1, "plasma" = 1, "acetone" = 1, "mutagen" = 1) - result_amount = 4 - mix_message = "The solution bubbles softly." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - result = "spaceacillin" - required_reagents = list("fungus" = 1, "ethanol" = 1) - result_amount = 2 - mix_message = "The solvent extracts an antibiotic compound from the fungus." - -/datum/chemical_reaction/rezadone - name = "Rezadone" - id = "rezadone" - result = "rezadone" - required_reagents = list("carpotoxin" = 1, "spaceacillin" = 1, "copper" = 1) - result_amount = 3 - -/datum/chemical_reaction/sterilizine - name = "Sterilizine" - id = "sterilizine" - result = "sterilizine" - required_reagents = list("antihol" = 2, "chlorine" = 1) - result_amount = 3 diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm deleted file mode 100644 index 8a5dedf218b..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm +++ /dev/null @@ -1,147 +0,0 @@ -// foam and foam precursor - -/datum/chemical_reaction/surfactant - name = "Foam surfactant" - id = "foam surfactant" - result = "fluorosurfactant" - required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) - result_amount = 5 - mix_message = "A head of foam results from the mixture's constant fizzing." - -/datum/chemical_reaction/foam - name = "Foam" - id = "foam" - result = null - required_reagents = list("fluorosurfactant" = 1, "water" = 1) - result_amount = 2 - -/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - holder.my_atom.visible_message("The solution spews out foam!") - - var/datum/effect/system/foam_spread/s = new() - s.set_up(created_volume, location, holder, 0) - s.start() - holder.clear_reagents() - - -/datum/chemical_reaction/metalfoam - name = "Metal Foam" - id = "metalfoam" - result = null - required_reagents = list("aluminum" = 3, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 5 - -/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - - holder.my_atom.visible_message("The solution spews out a metalic foam!") - - var/datum/effect/system/foam_spread/s = new() - s.set_up(created_volume, location, holder, MFOAM_ALUMINUM) - s.start() - - -/datum/chemical_reaction/ironfoam - name = "Iron Foam" - id = "ironlfoam" - result = null - required_reagents = list("iron" = 3, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 5 - -/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - - holder.my_atom.visible_message("= 5) - var/obj/item/weapon/book/affectedbook = O - affectedbook.dat = null - to_chat(usr, "The solution melts away the ink on the book.") - else - to_chat(usr, "It wasn't enough...") - -/datum/reagent/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. - if(method == TOUCH) - M.adjust_fire_stacks(volume / 15) - - -/datum/reagent/ethanol/beer - name = "Beer" - id = "beer" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/cider - name = "Cider" - id = "cider" - description = "An alcoholic beverage derived from apples." - color = "#174116" - alcohol_perc = 0.2 - -/datum/reagent/ethanol/whiskey - name = "Whiskey" - id = "whiskey" - description = "A superb and well-aged single-malt whiskey. Damn." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/specialwhiskey - name = "Special Blend Whiskey" - id = "specialwhiskey" - description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/gin - name = "Gin" - id = "gin" - description = "It's gin. In space. I say, good sir." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 3 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/absinthe - name = "Absinthe" - id = "absinthe" - description = "Watch out that the Green Fairy doesn't come for you!" - color = "#33EE00" // rgb: lots, ??, ?? - overdose_threshold = 30 - dizzy_adj = 5 - alcohol_perc = 0.7 - -//copy paste from LSD... shoot me -/datum/reagent/ethanol/absinthe/on_mob_life(mob/living/M) - M.hallucination += 5 - ..() - -/datum/reagent/ethanol/absinthe/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - -/datum/reagent/ethanol/rum - name = "Rum" - id = "rum" - description = "Popular with the sailors. Not very popular with everyone else." - color = "#664300" // rgb: 102, 67, 0 - overdose_threshold = 30 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/rum/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() - -/datum/reagent/ethanol/rum/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - -/datum/reagent/ethanol/mojito - name = "Mojito" - id = "mojito" - description = "If it's good enough for Spesscuba, it's good enough for you." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/vodka - name = "Vodka" - id = "vodka" - description = "Number one drink AND fueling choice for Russians worldwide." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/sake - name = "Sake" - id = "sake" - description = "Anime's favorite drink." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/tequila - name = "Tequila" - id = "tequila" - description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" - color = "#A8B0B7" // rgb: 168, 176, 183 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/vermouth - name = "Vermouth" - id = "vermouth" - description = "You suddenly feel a craving for a martini..." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/wine - name = "Wine" - id = "wine" - description = "An premium alchoholic beverage made from distilled grape juice." - color = "#7E4043" // rgb: 126, 64, 67 - dizzy_adj = 2 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/cognac - name = "Cognac" - id = "cognac" - description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/suicider //otherwise known as "I want to get so smashed my liver gives out and I die from alcohol poisoning". - name = "Suicider" - id = "suicider" - description = "An unbelievably strong and potent variety of Cider." - color = "#CF3811" - dizzy_adj = 20 - alcohol_perc = 1 //because that's a thing it's supposed to do, I guess - -/datum/reagent/ethanol/ale - name = "Ale" - id = "ale" - description = "A dark alchoholic beverage made by malted barley and yeast." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.1 - -/datum/reagent/ethanol/thirteenloko - name = "Thirteen Loko" - id = "thirteenloko" - description = "A potent mixture of caffeine and alcohol." - reagent_state = LIQUID - color = "#102000" // rgb: 16, 32, 0 - alcohol_perc = 0.3 - heart_rate_increase = 1 - -/datum/reagent/ethanol/thirteenloko/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.drowsyness = max(0, M.drowsyness-7) - M.AdjustSleeping(-2) - if(M.bodytemperature > 310) - M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.Jitter(5) - ..() - - -/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// - -/datum/reagent/ethanol/bilk - name = "Bilk" - id = "bilk" - description = "This appears to be beer mixed with milk. Disgusting." - reagent_state = LIQUID - color = "#895C4C" // rgb: 137, 92, 76 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/atomicbomb - name = "Atomic Bomb" - id = "atomicbomb" - description = "Nuclear proliferation never tasted so good." - reagent_state = LIQUID - color = "#666300" // rgb: 102, 99, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/threemileisland - name = "THree Mile Island Iced Tea" - id = "threemileisland" - description = "Made for a woman, strong enough for a man." - reagent_state = LIQUID - color = "#666340" // rgb: 102, 99, 64 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/goldschlager - name = "Goldschlager" - id = "goldschlager" - description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/patron - name = "Patron" - id = "patron" - description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." - reagent_state = LIQUID - color = "#585840" // rgb: 88, 88, 64 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/gintonic - name = "Gin and Tonic" - id = "gintonic" - description = "An all time classic, mild cocktail." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/cuba_libre - name = "Cuba Libre" - id = "cubalibre" - description = "Rum, mixed with cola. Viva la revolution." - reagent_state = LIQUID - color = "#3E1B00" // rgb: 62, 27, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/whiskey_cola - name = "Whiskey Cola" - id = "whiskeycola" - description = "Whiskey, mixed with cola. Surprisingly refreshing." - reagent_state = LIQUID - color = "#3E1B00" // rgb: 62, 27, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/martini - name = "Classic Martini" - id = "martini" - description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/vodkamartini - name = "Vodka Martini" - id = "vodkamartini" - description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/white_russian - name = "White Russian" - id = "whiterussian" - description = "That's just, like, your opinion, man..." - reagent_state = LIQUID - color = "#A68340" // rgb: 166, 131, 64 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/screwdrivercocktail - name = "Screwdriver" - id = "screwdrivercocktail" - description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/booger - name = "Booger" - id = "booger" - description = "Ewww..." - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/bloody_mary - name = "Bloody Mary" - id = "bloodymary" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/gargle_blaster - name = "Pan-Galactic Gargle Blaster" - id = "gargleblaster" - description = "Whoah, this stuff looks volatile!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.7 //ouch - -/datum/reagent/ethanol/brave_bull - name = "Brave Bull" - id = "bravebull" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/tequila_sunrise - name = "Tequila Sunrise" - id = "tequilasunrise" - description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/toxins_special - name = "Toxins Special" - id = "toxinsspecial" - description = "This thing is FLAMING!. CALL THE DAMN SHUTTLE!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/toxins_special/on_mob_life(mob/living/M) - if(M.bodytemperature < 330) - M.bodytemperature = min(330, M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/beepsky_smash - name = "Beepsky Smash" - id = "beepskysmash" - description = "Deny drinking this and prepare for THE LAW." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/beepsky_smash/on_mob_life(mob/living/M) - M.Stun(1) - ..() - -/datum/reagent/ethanol/irish_cream - name = "Irish Cream" - id = "irishcream" - description = "Whiskey-imbued cream, what else would you expect from the Irish." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/manly_dorf - name = "The Manly Dorf" - id = "manlydorf" - description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/longislandicedtea - name = "Long Island Iced Tea" - id = "longislandicedtea" - description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/moonshine - name = "Moonshine" - id = "moonshine" - description = "You've really hit rock bottom now... your liver packed its bags and left last night." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.8 //yeeehaw - -/datum/reagent/ethanol/b52 - name = "B-52" - id = "b52" - description = "Coffee, Irish Cream, and congac. You will get bombed." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/irishcoffee - name = "Irish Coffee" - id = "irishcoffee" - description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/margarita - name = "Margarita" - id = "margarita" - description = "On the rocks with salt on the rim. Arriba~!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/black_russian - name = "Black Russian" - id = "blackrussian" - description = "For the lactose-intolerant. Still as classy as a White Russian." - reagent_state = LIQUID - color = "#360000" // rgb: 54, 0, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/manhattan - name = "Manhattan" - id = "manhattan" - description = "The Detective's undercover drink of choice. He never could stomach gin..." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/manhattan_proj - name = "Manhattan Project" - id = "manhattan_proj" - description = "A scienitst's drink of choice, for pondering ways to blow up the station." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/whiskeysoda - name = "Whiskey Soda" - id = "whiskeysoda" - description = "Ultimate refreshment." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/antifreeze - name = "Anti-freeze" - id = "antifreeze" - description = "Ultimate refreshment." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/antifreeze/on_mob_life(mob/living/M) - if(M.bodytemperature < 330) - M.bodytemperature = min(330, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/barefoot - name = "Barefoot" - id = "barefoot" - description = "Barefoot and pregnant" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/snowwhite - name = "Snow White" - id = "snowwhite" - description = "A cold refreshment" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/demonsblood - name = "Demons Blood" - id = "demonsblood" - description = "AHHHH!!!!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 10 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/vodkatonic - name = "Vodka and Tonic" - id = "vodkatonic" - description = "For when a gin and tonic isn't russian enough." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/ginfizz - name = "Gin Fizz" - id = "ginfizz" - description = "Refreshingly lemony, deliciously dry." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/bahama_mama - name = "Bahama mama" - id = "bahama_mama" - description = "Tropic cocktail." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/singulo - name = "Singulo" - id = "singulo" - description = "A blue-space beverage!" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - dizzy_adj = 15 - alcohol_perc = 0.7 - -/datum/reagent/ethanol/sbiten - name = "Sbiten" - id = "sbiten" - description = "A spicy Vodka! Might be a little hot for the little guys!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/sbiten/on_mob_life(mob/living/M) - if(M.bodytemperature < 360) - M.bodytemperature = min(360, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/devilskiss - name = "Devils Kiss" - id = "devilskiss" - description = "Creepy time!" - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/red_mead - name = "Red Mead" - id = "red_mead" - description = "The true Viking drink! Even though it has a strange red color." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/mead - name = "Mead" - id = "mead" - description = "A Vikings drink, though a cheap one." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/iced_beer - name = "Iced Beer" - id = "iced_beer" - description = "A beer which is so cold the air around it freezes." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/iced_beer/on_mob_life(mob/living/M) - if(M.bodytemperature > 270) - M.bodytemperature = max(270, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/grog - name = "Grog" - id = "grog" - description = "Watered down rum, Nanotrasen approves!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/aloe - name = "Aloe" - id = "aloe" - description = "So very, very, very good." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/andalusia - name = "Andalusia" - id = "andalusia" - description = "A nice, strange named drink." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/alliescocktail - name = "Allies Cocktail" - id = "alliescocktail" - description = "A drink made from your allies." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/acid_spit - name = "Acid Spit" - id = "acidspit" - description = "A drink by Nanotrasen. Made from live aliens." - reagent_state = LIQUID - color = "#365000" // rgb: 54, 80, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/amasec - name = "Amasec" - id = "amasec" - description = "Official drink of the Imperium." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/neurotoxin - name = "Neuro-toxin" - id = "neurotoxin" - description = "A strong neurotoxin that puts the subject into a death-like state." - reagent_state = LIQUID - color = "#2E2E61" // rgb: 46, 46, 97 - dizzy_adj = 6 - alcohol_perc = 0.7 - heart_rate_decrease = 1 - -/datum/reagent/ethanol/neurotoxin/on_mob_life(mob/living/M) - M.weakened = max(M.weakened, 3) - if(current_cycle >=55) - M.druggy = max(M.druggy, 55) - if(current_cycle >=200) - M.adjustToxLoss(2) - ..() - -/datum/reagent/ethanol/changelingsting - name = "Changeling Sting" - id = "changelingsting" - description = "A stingy drink." - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.7 - -/datum/reagent/ethanol/changelingsting/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() - -/datum/reagent/ethanol/irishcarbomb - name = "Irish Car Bomb" - id = "irishcarbomb" - description = "Mmm, tastes like chocolate cake..." - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/irishcarbomb/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() - -/datum/reagent/ethanol/syndicatebomb - name = "Syndicate Bomb" - id = "syndicatebomb" - description = "A Syndicate bomb" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/erikasurprise - name = "Erika Surprise" - id = "erikasurprise" - description = "The surprise is, it's green!" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/driestmartini - name = "Driest Martini" - id = "driestmartini" - description = "Only for the experienced. You think you see sand floating in the glass." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/driestmartini/on_mob_life(mob/living/M) - M.dizziness +=10 - if(current_cycle >= 55 && current_cycle < 115) - M.stuttering += 10 - ..() - -/datum/reagent/ethanol/kahlua - name = "Kahlua" - id = "kahlua" - description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/kahlua/on_mob_life(mob/living/M) - M.dizziness = max(0, M.dizziness-5) - M.drowsyness = max(0, M.drowsyness-3) - M.AdjustSleeping(-2) - M.Jitter(5) - ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm deleted file mode 100644 index 26bad6c1665..00000000000 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ /dev/null @@ -1,285 +0,0 @@ -/datum/reagent/drink/orangejuice - name = "Orange juice" - id = "orangejuice" - description = "Both delicious AND rich in Vitamin C, what more do you need?" - color = "#E78108" // rgb: 231, 129, 8 - -/datum/reagent/drink/orangejuicde/on_mob_life(mob/living/M) - if(M.getOxyLoss() && prob(30)) - M.adjustOxyLoss(-1*REM) - ..() - -/datum/reagent/drink/tomatojuice - name = "Tomato Juice" - id = "tomatojuice" - description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" - color = "#731008" // rgb: 115, 16, 8 - -/datum/reagent/drink/tomatojuice/on_mob_life(mob/living/M) - if(M.getFireLoss() && prob(20)) - M.adjustFireLoss(-1) - ..() - -/datum/reagent/drink/limejuice - name = "Lime Juice" - id = "limejuice" - description = "The sweet-sour juice of limes." - color = "#365E30" // rgb: 54, 94, 48 - -/datum/reagent/drink/limejuice/on_mob_life(mob/living/M) - if(M.getToxLoss() && prob(20)) - M.adjustToxLoss(-1) - ..() - -/datum/reagent/drink/carrotjuice - name = "Carrot juice" - id = "carrotjuice" - description = "It is just like a carrot but without crunching." - color = "#973800" // rgb: 151, 56, 0 - -/datum/reagent/drink/carrotjuicde/on_mob_life(mob/living/M) - M.eye_blurry = max(M.eye_blurry-1 , 0) - M.eye_blind = max(M.eye_blind-1 , 0) - switch(current_cycle) - if(1 to 20) - //nothing - if(21 to INFINITY) - if(prob(current_cycle-10)) - M.disabilities &= ~NEARSIGHTED - ..() - -/datum/reagent/drink/doctor_delight - name = "The Doctor's Delight" - id = "doctorsdelight" - description = "A gulp a day keeps the MediBot away. That's probably for the best." - reagent_state = LIQUID - color = "#FF8CFF" // rgb: 255, 140, 255 - -/datum/reagent/drink/doctors_delight/on_mob_life(mob/living/M) - if(M.getToxLoss() && prob(20)) - M.adjustToxLoss(-1) - ..() - -/datum/reagent/drink/berryjuice - name = "Berry Juice" - id = "berryjuice" - description = "A delicious blend of several different kinds of berries." - color = "#863333" // rgb: 134, 51, 51 - -/datum/reagent/drink/poisonberryjuice - name = "Poison Berry Juice" - id = "poisonberryjuice" - description = "A tasty juice blended from various kinds of very deadly and toxic berries." - color = "#863353" // rgb: 134, 51, 83 - -/datum/reagent/drink/poisonberryjuice/on_mob_life(mob/living/M) - M.adjustToxLoss(1) - ..() - -/datum/reagent/drink/watermelonjuice - name = "Watermelon Juice" - id = "watermelonjuice" - description = "Delicious juice made from watermelon." - color = "#863333" // rgb: 134, 51, 51 - -/datum/reagent/drink/lemonjuice - name = "Lemon Juice" - id = "lemonjuice" - description = "This juice is VERY sour." - color = "#863333" // rgb: 175, 175, 0 - -/datum/reagent/drink/grapejuice - name = "Grape Juice" - id = "grapejuice" - description = "This juice is known to stain shirts." - color = "#993399" // rgb: 153, 51, 153 - -/datum/reagent/drink/banana - name = "Banana Juice" - id = "banana" - description = "The raw essence of a banana." - color = "#863333" // rgb: 175, 175, 0 - -/datum/reagent/drink/banana/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() - -/datum/reagent/drink/nothing - name = "Nothing" - id = "nothing" - description = "Absolutely nothing." - -/datum/reagent/drink/nothing/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(ishuman(M) && M.job in list("Mime")) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() - -/datum/reagent/drink/potato_juice - name = "Potato Juice" - id = "potato" - description = "Juice of the potato. Bleh." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/drink/milk - name = "Milk" - id = "milk" - description = "An opaque white liquid produced by the mammary glands of mammals." - color = "#DFDFDF" // rgb: 223, 223, 223 - -/datum/reagent/drink/milk/on_mob_life(mob/living/M) - if(M.getBruteLoss() && prob(20)) - M.adjustBruteLoss(-1) - if(holder.has_reagent("capsaicin")) - holder.remove_reagent("capsaicin", 2) - ..() - -/datum/reagent/drink/milk/soymilk - name = "Soy Milk" - id = "soymilk" - description = "An opaque white liquid made from soybeans." - color = "#DFDFC7" // rgb: 223, 223, 199 - -/datum/reagent/drink/milk/cream - name = "Cream" - id = "cream" - description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" - color = "#DFD7AF" // rgb: 223, 215, 175 - -/datum/reagent/drink/milk/chocolate_milk - name = "Chocolate milk" - id ="chocolate_milk" - description = "Chocolate-flavored milk, tastes like being a kid again." - color = "#85432C" - -/datum/reagent/drink/hot_coco - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And coco beans." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#403010" // rgb: 64, 48, 16 - adj_temp_hot = 5 - -/datum/reagent/drink/coffee - name = "Coffee" - id = "coffee" - description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." - color = "#482000" // rgb: 72, 32, 0 - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - adj_temp_hot = 25 - overdose_threshold = 45 - addiction_chance = 1 // It's true. - heart_rate_increase = 1 - -/datum/reagent/drink/coffee/on_mob_life(mob/living/M) - if(holder.has_reagent("frostoil")) - holder.remove_reagent("frostoil", 5) - if(prob(50)) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - ..() - -/datum/reagent/drink/coffee/overdose_process(mob/living/M, severity) - if(volume > 45) - M.Jitter(5) - -/datum/reagent/drink/coffee/icecoffee - name = "Iced Coffee" - id = "icecoffee" - description = "Coffee and ice, refreshing and cool." - color = "#102838" // rgb: 16, 40, 56 - adj_temp_hot = 0 - adj_temp_cool = 5 - -/datum/reagent/drink/coffee/soy_latte - name = "Soy Latte" - id = "soy_latte" - description = "A nice and tasty beverage while you are reading your hippie books." - color = "#664300" // rgb: 102, 67, 0 - adj_sleepy = 0 - adj_temp_hot = 5 - -/datum/reagent/drink/coffee/soy_latte/on_mob_life(mob/living/M) - ..() - M.SetSleeping(0) - if(M.getBruteLoss() && prob(20)) - M.adjustBruteLoss(-1) - -/datum/reagent/drink/coffee/cafe_latte - name = "Cafe Latte" - id = "cafe_latte" - description = "A nice, strong and tasty beverage while you are reading." - color = "#664300" // rgb: 102, 67, 0 - adj_sleepy = 0 - adj_temp_hot = 5 - -/datum/reagent/drink/coffee/cafe_latte/on_mob_life(mob/living/M) - ..() - M.SetSleeping(0) - if(M.getBruteLoss() && prob(20)) - M.adjustBruteLoss(-1) - -/datum/reagent/drink/coffee/cafe_latte/cafe_mocha - name = "Cafe Mocha" - id = "cafe_mocha" - description = "The perfect blend of coffe, milk, and chocolate." - color = "#673629" - -/datum/reagent/drink/tea - name = "Tea" - id = "tea" - description = "Tasty black tea: It has antioxidants. It's good for you!" - color = "#101000" // rgb: 16, 16, 0 - adj_dizzy = -2 - adj_drowsy = -1 - adj_sleepy = -3 - adj_temp_hot = 20 - -/datum/reagent/drink/tea/on_mob_life(mob/living/M) - if(M.getToxLoss() && prob(20)) - M.adjustToxLoss(-1) - ..() - -/datum/reagent/drink/tea/icetea - name = "Iced Tea" - id = "icetea" - description = "No relation to a certain rap artist/ actor." - color = "#104038" // rgb: 16, 64, 56 - adj_temp_hot = 0 - adj_temp_cool = 5 - -/datum/reagent/drink/bananahonk - name = "Banana Mama" - id = "bananahonk" - description = "A drink from Clown Heaven." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - -/datum/reagent/drink/bananahonk/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() - -/datum/reagent/drink/silencer - name = "Silencer" - id = "silencer" - description = "A drink from Mime Heaven." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - -/datum/reagent/drink/silencer/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(ishuman(M) && M.job in list("Mime")) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm deleted file mode 100644 index fe54ed97246..00000000000 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm +++ /dev/null @@ -1,124 +0,0 @@ -/datum/reagent/drink/cold - name = "Cold drink" - adj_temp_cool = 5 - -/datum/reagent/drink/cold/tonic - name = "Tonic Water" - id = "tonic" - description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." - color = "#664300" // rgb: 102, 67, 0 - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - -/datum/reagent/drink/cold/sodawater - name = "Soda Water" - id = "sodawater" - description = "A can of club soda. Why not make a scotch and soda?" - color = "#619494" // rgb: 97, 148, 148 - adj_dizzy = -5 - adj_drowsy = -3 - -/datum/reagent/drink/cold/ice - name = "Ice" - id = "ice" - description = "Frozen water, your dentist wouldn't like you chewing this." - reagent_state = SOLID - color = "#619494" // rgb: 97, 148, 148 - adj_temp_cool = 0 - -/datum/reagent/drink/cold/ice/on_mob_life(mob/living/M) - M.bodytemperature = max(M.bodytemperature - 5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) - ..() - -/datum/reagent/drink/cold/space_cola - name = "Cola" - id = "cola" - description = "A refreshing beverage." - reagent_state = LIQUID - color = "#100800" // rgb: 16, 8, 0 - adj_drowsy = -5 - -/datum/reagent/drink/cold/nuka_cola - name = "Nuka Cola" - id = "nuka_cola" - description = "Cola, cola never changes." - color = "#100800" // rgb: 16, 8, 0 - adj_sleepy = -2 - -/datum/reagent/drink/cold/nuka_cola/on_mob_life(mob/living/M) - M.Jitter(20) - M.druggy = max(M.druggy, 30) - M.dizziness +=5 - M.drowsyness = 0 - M.status_flags |= GOTTAGOFAST - ..() - -/datum/reagent/drink/cold/nuka_cola/reagent_deleted(mob/living/M) - M.status_flags &= ~GOTTAGOFAST - ..() - -/datum/reagent/drink/cold/spacemountainwind - name = "Space Mountain Wind" - id = "spacemountainwind" - description = "Blows right through you like a space wind." - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -7 - adj_sleepy = -1 - -/datum/reagent/drink/cold/dr_gibb - name = "Dr. Gibb" - id = "dr_gibb" - description = "A delicious blend of 42 different flavours" - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -6 - -/datum/reagent/drink/cold/space_up - name = "Space-Up" - id = "space_up" - description = "Tastes like a hull breach in your mouth." - color = "#202800" // rgb: 32, 40, 0 - adj_temp_cool = 8 - -/datum/reagent/drink/cold/lemon_lime - name = "Lemon Lime" - description = "A tangy substance made of 0.5% natural citrus!" - id = "lemon_lime" - color = "#878F00" // rgb: 135, 40, 0 - adj_temp_cool = 8 - -/datum/reagent/drink/cold/lemonade - name = "Lemonade" - description = "Oh the nostalgia..." - id = "lemonade" - color = "#FFFF00" // rgb: 255, 255, 0 - -/datum/reagent/drink/cold/kiraspecial - name = "Kira Special" - description = "Long live the guy who everyone had mistaken for a girl. Baka!" - id = "kiraspecial" - color = "#CCCC99" // rgb: 204, 204, 153 - -/datum/reagent/drink/cold/brownstar - name = "Brown Star" - description = "It's not what it sounds like..." - id = "brownstar" - color = "#9F3400" // rgb: 159, 052, 000 - adj_temp_cool = 2 - -/datum/reagent/drink/cold/milkshake - name = "Milkshake" - description = "Glorious brainfreezing mixture." - id = "milkshake" - color = "#AEE5E4" // rgb" 174, 229, 228 - adj_temp_cool = 9 - -/datum/reagent/drink/cold/rewriter - name = "Rewriter" - description = "The secert of the sanctuary of the Libarian..." - id = "rewriter" - color = "#485000" // rgb:72, 080, 0 - -/datum/reagent/drink/cold/rewriter/on_mob_life(mob/living/M) - M.Jitter(5) - ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/oldchem/reagents/reagents_admin.dm deleted file mode 100644 index ccc617d2aaa..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm +++ /dev/null @@ -1,76 +0,0 @@ -/datum/reagent/adminordrazine //An OP chemical for admins - name = "Adminordrazine" - id = "adminordrazine" - description = "It's magic. We don't have to explain it." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - process_flags = ORGANIC | SYNTHETIC //Adminbuse knows no bounds! - admin_only = 1 - -/datum/reagent/adminordrazine/on_mob_life(mob/living/carbon/M) - M.setCloneLoss(0) - M.setOxyLoss(0) - M.radiation = 0 - M.adjustBruteLoss(-5) - M.adjustFireLoss(-5) - M.adjustToxLoss(-5) - M.hallucination = 0 - M.setBrainLoss(0) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - for(var/name in H.internal_organs) - var/obj/item/organ/internal/I = H.get_int_organ(name) - I.damage = max(0, I.damage-5) - for(var/obj/item/organ/external/E in H.organs) - if(E.mend_fracture()) - E.perma_injury = 0 - M.disabilities = 0 - M.eye_blurry = 0 - M.eye_blind = 0 - M.SetWeakened(0) - M.SetStunned(0) - M.SetParalysis(0) - M.silent = 0 - M.dizziness = 0 - M.drowsyness = 0 - M.stuttering = 0 - M.slurring = 0 - M.confused = 0 - M.SetSleeping(0) - M.jitteriness = 0 - for(var/datum/disease/D in M.viruses) - if(D.severity == NONTHREAT) - continue - D.spread_text = "Remissive" - D.stage-- - if(D.stage < 1) - D.cure() - ..() - -/datum/reagent/adminordrazine/nanites - name = "Nanites" - id = "nanites" - description = "Nanomachines that aid in rapid cellular regeneration." - - -// For random item spawning. Takes a list of paths, and returns the same list without anything that contains admin only reagents - -/proc/adminReagentCheck(var/list/incoming) - var/list/outgoing[0] - for(var/tocheck in incoming) - if(ispath(tocheck)) - var/check = new tocheck - if(istype(check, /atom)) - var/atom/reagentCheck = check - var/datum/reagents/reagents = reagentCheck.reagents - var/admin = 0 - for(var/reag in reagents.reagent_list) - var/datum/reagent/reagent = reag - if(reagent.admin_only) - admin = 1 - break - if(!(admin)) - outgoing += tocheck - else - outgoing += tocheck - return outgoing \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm deleted file mode 100644 index 7cbc79b41b0..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm +++ /dev/null @@ -1,115 +0,0 @@ -/datum/reagent/serotrotium - name = "Serotrotium" - id = "serotrotium" - description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." - reagent_state = LIQUID - color = "#202040" // rgb: 20, 20, 40 - metabolization_rate = 0.25 * REAGENTS_METABOLISM - -/datum/reagent/serotrotium/on_mob_life(mob/living/M) - if(ishuman(M)) - if(prob(7)) - M.emote(pick("twitch","drool","moan","gasp")) - ..() - - -/datum/reagent/lithium - name = "Lithium" - id = "lithium" - description = "A chemical element." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - -/datum/reagent/lithium/on_mob_life(mob/living/M) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) - if(M.canmove && !M.restrained()) - step(M, pick(cardinal)) - if(prob(5)) M.emote(pick("twitch","drool","moan")) - ..() - - -/datum/reagent/hippies_delight - name = "Hippie's Delight" - id = "hippiesdelight" - description = "You just don't get it maaaan." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - metabolization_rate = 0.2 * REAGENTS_METABOLISM - -/datum/reagent/hippies_delight/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 50) - switch(current_cycle) - if(1 to 5) - if(!M.stuttering) M.stuttering = 1 - M.Dizzy(10) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(5 to 10) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(20) - M.Dizzy(20) - M.druggy = max(M.druggy, 45) - if(prob(20)) M.emote(pick("twitch","giggle")) - if(10 to INFINITY) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(40) - M.Dizzy(40) - M.druggy = max(M.druggy, 60) - if(prob(30)) M.emote(pick("twitch","giggle")) - ..() - -/datum/reagent/lsd - name = "Lysergic acid diethylamide" - id = "lsd" - description = "A highly potent hallucinogenic substance. Far out, maaaan." - reagent_state = LIQUID - color = "#0000D8" - -/datum/reagent/lsd/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) - M.hallucination += 10 - ..() - -/datum/reagent/space_drugs - name = "Space drugs" - id = "space_drugs" - description = "An illegal chemical compound used as drug." - reagent_state = LIQUID - color = "#9087A2" - metabolization_rate = 0.2 - addiction_chance = 65 - heart_rate_decrease = 1 - -/datum/reagent/space_drugs/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) - if(M.canmove && !M.restrained()) - step(M, pick(cardinal)) - if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) - ..() - -/datum/reagent/psilocybin - name = "Psilocybin" - id = "psilocybin" - description = "A strong psycotropic derived from certain species of mushroom." - color = "#E700E7" // rgb: 231, 0, 231 - -/datum/reagent/psilocybin/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 30) - switch(current_cycle) - if(1 to 5) - if(!M.stuttering) M.stuttering = 1 - M.Dizzy(5) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(5 to 10) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(10) - M.Dizzy(10) - M.druggy = max(M.druggy, 35) - if(prob(20)) M.emote(pick("twitch","giggle")) - if(10 to INFINITY) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(20) - M.Dizzy(20) - M.druggy = max(M.druggy, 40) - if(prob(30)) M.emote(pick("twitch","giggle")) - ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm deleted file mode 100644 index 52d33e21e07..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm +++ /dev/null @@ -1,81 +0,0 @@ -/datum/reagent/fuel - name = "Welding fuel" - id = "fuel" - description = "A highly flammable blend of basic hydrocarbons, mostly Acetylene. Useful for both welding and organic chemistry, and can be fortified into a heavier oil." - reagent_state = LIQUID - color = "#060606" - -/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) - return - ..() - -/datum/reagent/fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke - name = "Unholy Water" - id = "unholywater" - description = "Something that shouldn't exist on this plane of existance." - process_flags = ORGANIC | SYNTHETIC //ethereal means everything processes it. - metabolization_rate = 1 - -/datum/reagent/fuel/unholywater/on_mob_life(mob/living/M) - M.adjustBrainLoss(3) - if(iscultist(M)) - M.status_flags |= GOTTAGOFAST - M.drowsyness = max(M.drowsyness-5, 0) - M.AdjustParalysis(-2) - M.AdjustStunned(-2) - M.AdjustWeakened(-2) - else - M.adjustToxLoss(2) - M.adjustFireLoss(2) - M.adjustOxyLoss(2) - M.adjustBruteLoss(2) - ..() - -/datum/reagent/fuel/unholywater/reagent_deleted(mob/living/M) - M.status_flags &= ~GOTTAGOFAST - ..() - -/datum/reagent/plasma - name = "Plasma" - id = "plasma" - description = "The liquid phase of an unusual extraterrestrial compound." - reagent_state = LIQUID - color = "#7A2B94" - -/datum/reagent/plasma/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) - if(holder.has_reagent("epinephrine")) - holder.remove_reagent("epinephrine", 2) - if(iscarbon(M)) - var/mob/living/carbon/C = M - C.adjustPlasma(10) - ..() - -/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - ..() - - -/datum/reagent/thermite - name = "Thermite" - id = "thermite" - description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." - reagent_state = SOLID - color = "#673910" // rgb: 103, 57, 16 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume) - if(volume >= 5 && istype(W)) - W.thermite = 1 - W.overlays.Cut() - W.overlays = image('icons/effects/effects.dmi',icon_state = "thermite") - -/datum/reagent/glycerol - name = "Glycerol" - id = "glycerol" - description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." - reagent_state = LIQUID - color = "#808080" // rgb: 128, 128, 128 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_food.dm b/code/modules/reagents/oldchem/reagents/reagents_food.dm deleted file mode 100644 index 1dbe1f05a20..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_food.dm +++ /dev/null @@ -1,394 +0,0 @@ -/////////////////////////Food Reagents//////////////////////////// -// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food -// condiments, additives, and such go. -/datum/reagent/nutriment // Pure nutriment, universally digestable and thus slightly less effective - name = "Nutriment" - id = "nutriment" - description = "A questionable mixture of various pure nutrients commonly found in processed foods." - reagent_state = SOLID - nutriment_factor = 12 * REAGENTS_METABOLISM - color = "#664330" // rgb: 102, 67, 48 - var/diet_flags = DIET_OMNI | DIET_HERB | DIET_CARN - -/datum/reagent/nutriment/on_mob_life(mob/living/M) - if(!(M.mind in ticker.mode.vampires)) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients - H.nutrition += nutriment_factor // For hunger and fatness - if(prob(50)) - M.adjustBruteLoss(-1) - if(H.species.exotic_blood) - H.vessel.add_reagent(H.species.exotic_blood, 0.4) - else - if(!(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.4) - ..() - -/datum/reagent/nutriment/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores - name = "Protein" - id = "protein" - description = "Various essential proteins and fats commonly found in animal flesh and blood." - nutriment_factor = 15 * REAGENTS_METABOLISM - diet_flags = DIET_CARN | DIET_OMNI - -/datum/reagent/nutriment/plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores - name = "Plant-matter" - id = "plantmatter" - description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce." - nutriment_factor = 15 * REAGENTS_METABOLISM - diet_flags = DIET_HERB | DIET_OMNI - - -/datum/reagent/vitamin - name = "Vitamin" - id = "vitamin" - description = "All the best vitamins, minerals, and carbohydrates the body needs in pure form." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#664330" // rgb: 102, 67, 48 - -/datum/reagent/vitamin/on_mob_life(mob/living/M) //everyone needs vitamins, so this works on everyone, regardless of diet or if they're a vampire. - M.nutrition += nutriment_factor - if(prob(50)) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species.exotic_blood) - H.vessel.add_reagent(H.species.exotic_blood, 0.5) - else - if(!(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.5) - ..() - -/datum/reagent/soysauce - name = "Soysauce" - id = "soysauce" - description = "A salty sauce made from the soy plant." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#792300" // rgb: 121, 35, 0 - -/datum/reagent/ketchup - name = "Ketchup" - id = "ketchup" - description = "Ketchup, catsup, whatever. It's tomato paste." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#731008" // rgb: 115, 16, 8 - - -/datum/reagent/capsaicin - name = "Capsaicin Oil" - id = "capsaicin" - description = "This is what makes chilis hot." - reagent_state = LIQUID - color = "#B31008" // rgb: 179, 16, 8 - -/datum/reagent/capsaicin/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 15) - M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT - if(holder.has_reagent("frostoil")) - holder.remove_reagent("frostoil", 5) - if(isslime(M)) - M.bodytemperature += rand(5,20) - if(15 to 25) - M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(10,20) - if(25 to 35) - M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(15,20) - if(35 to INFINITY) - M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(20,25) - ..() - -/datum/reagent/frostoil - name = "Frost Oil" - id = "frostoil" - description = "A special oil that noticably chills the body. Extraced from Icepeppers." - reagent_state = LIQUID - color = "#8BA6E9" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/frostoil/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 15) - M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT - if(holder.has_reagent("capsaicin")) - holder.remove_reagent("capsaicin", 5) - if(isslime(M)) - M.bodytemperature -= rand(5,20) - if(15 to 25) - M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature -= rand(10,20) - if(25 to 35) - M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(prob(1)) - M.emote("shiver") - if(isslime(M)) - M.bodytemperature -= rand(15,20) - if(35 to INFINITY) - M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(prob(1)) - M.emote("shiver") - if(isslime(M)) - M.bodytemperature -= rand(20,25) - ..() - -/datum/reagent/frostoil/reaction_turf(turf/T, volume) - if(volume >= 5) - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,30)) - - -/datum/reagent/sodiumchloride - name = "Salt" - id = "sodiumchloride" - description = "Sodium chloride, common table salt." - reagent_state = SOLID - color = "#B1B0B0" - overdose_threshold = 100 - -/datum/reagent/sodiumchloride/overdose_process(mob/living/M, severity) - if(prob(70)) - M.adjustBrainLoss(1) - ..() - -/datum/reagent/blackpepper - name = "Black Pepper" - id = "blackpepper" - description = "A powder ground from peppercorns. *AAAACHOOO*" - reagent_state = SOLID - -/datum/reagent/cocoa - name = "Cocoa Powder" - id = "cocoa" - description = "A fatty, bitter paste made from cocoa beans." - reagent_state = SOLID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/cocoa/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/hot_coco - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And cocoa beans." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#403010" // rgb: 64, 48, 16 - -/datum/reagent/hot_coco/on_mob_life(mob/living/M) - if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/sprinkles - name = "Sprinkles" - id = "sprinkles" - description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FF00FF" // rgb: 255, 0, 255 - -/datum/reagent/sprinkles/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate")) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() - - -/datum/reagent/cornoil - name = "Corn Oil" - id = "cornoil" - description = "An oil derived from various types of corn." - reagent_state = LIQUID - nutriment_factor = 20 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/cornoil/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/cornoil/reaction_turf(turf/simulated/T, volume) - if(!istype(T)) - return - if(volume >= 3) - T.MakeSlippery() - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles()) - lowertemp.temperature = max(min(lowertemp.temperature-2000, lowertemp.temperature / 2), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) - - -/datum/reagent/enzyme - name = "Denatured Enzyme" - id = "enzyme" - description = "Heated beyond usefulness, this enzyme is now worthless." - reagent_state = LIQUID - color = "#282314" // rgb: 54, 94, 48 - - -/datum/reagent/dry_ramen - name = "Dry Ramen" - id = "dry_ramen" - description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/dry_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - - -/datum/reagent/hot_ramen - name = "Hot Ramen" - id = "hot_ramen" - description = "The noodles are boiled, the flavors are artificial, just like being back in school." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/hot_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() - - -/datum/reagent/hell_ramen - name = "Hell Ramen" - id = "hell_ramen" - description = "The noodles are boiled, the flavors are artificial, just like being back in school." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/hell_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT - ..() - - -/datum/reagent/flour - name = "flour" - id = "flour" - description = "This is what you rub all over yourself to pretend to be a ghost." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - -/datum/reagent/flour/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/flour/reaction_turf(turf/T, volume) - if(!istype(T, /turf/space)) - new /obj/effect/decal/cleanable/flour(T) - - -/datum/reagent/rice - name = "Rice" - id = "rice" - description = "Enjoy the great taste of nothing." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - -/datum/reagent/rice/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - - -/datum/reagent/cherryjelly - name = "Cherry Jelly" - id = "cherryjelly" - description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." - reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#801E28" // rgb: 128, 30, 40 - -/datum/reagent/cherryjelly/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/toxin/coffeepowder - name = "Coffee Grounds" - id = "coffeepowder" - description = "Finely ground Coffee beans, used to make coffee." - reagent_state = SOLID - color = "#5B2E0D" // rgb: 91, 46, 13 - -/datum/reagent/toxin/teapowder - name = "Ground Tea Leaves" - id = "teapowder" - description = "Finely shredded Tea leaves, used for making tea." - reagent_state = SOLID - color = "#7F8400" // rgb: 127, 132, 0 - -//Reagents used for plant fertilizers. -/datum/reagent/toxin/fertilizer - name = "fertilizer" - id = "fertilizer" - description = "A chemical mix good for growing plants with." - reagent_state = LIQUID - color = "#664330" // rgb: 102, 67, 48 - -/datum/reagent/toxin/fertilizer/eznutrient - name = "EZ Nutrient" - id = "eznutrient" - -/datum/reagent/toxin/fertilizer/left4zed - name = "Left-4-Zed" - id = "left4zed" - -/datum/reagent/toxin/fertilizer/robustharvest - name = "Robust Harvest" - id = "robustharvest" - - -/datum/reagent/sugar - name = "Sugar" - id = "sugar" - description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - reagent_state = SOLID - color = "#FFFFFF" // rgb: 255, 255, 255 - overdose_threshold = 200 // Hyperglycaemic shock - -/datum/reagent/sugar/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) - if(current_cycle >= 90) - M.jitteriness += 2 - if(prob(50)) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - if(prob(4)) - M.reagents.add_reagent("epinephrine", 1.2) - ..() - -/datum/reagent/sugar/overdose_start(mob/living/M) - to_chat(M, "You pass out from hyperglycemic shock!") - M.emote("collapse") - ..() - -/datum/reagent/sugar/overdose_process(mob/living/M, severity) - M.Paralyse(3 * severity) - M.Weaken(4 * severity) - if(prob(8)) - M.adjustToxLoss(severity) - diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm deleted file mode 100644 index cc5592dd42e..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_med.dm +++ /dev/null @@ -1,142 +0,0 @@ -/datum/reagent/hydrocodone - name = "Hydrocodone" - id = "hydrocodone" - description = "An extremely effective painkiller; may have long term abuse consequences." - reagent_state = LIQUID - color = "#C805DC" - metabolization_rate = 0.3 // Lasts 1.5 minutes for 15 units - shock_reduction = 200 - -/datum/reagent/hydrocodone/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.traumatic_shock < 100) - H.shock_stage = 0 - ..() - -/datum/reagent/sterilizine - name = "Sterilizine" - id = "sterilizine" - description = "Sterilizes wounds in preparation for surgery." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - - //makes you squeaky clean -/datum/reagent/sterilizine/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.germ_level -= min(volume*20, M.germ_level) - -/datum/reagent/sterilizine/reaction_obj(obj/O, volume) - O.germ_level -= min(volume*20, O.germ_level) - -/datum/reagent/sterilizine/reaction_turf(turf/T, volume) - T.germ_level -= min(volume*20, T.germ_level) - -/datum/reagent/synaptizine - name = "Synaptizine" - id = "synaptizine" - description = "Synaptizine is used to treat neuroleptic shock. Can be used to help remove disabling symptoms such as paralysis." - reagent_state = LIQUID - color = "#FA46FA" - overdose_threshold = 40 - -/datum/reagent/synaptizine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - M.SetSleeping(0) - if(prob(50)) - M.adjustBrainLoss(-1.0) - ..() - -/datum/reagent/synaptizine/overdose_process(mob/living/M, severity) - var/effect = ..() - if(severity == 1) - if(effect <= 1) - M.visible_message("[M] suddenly and violently vomits!") - M.fakevomit(no_text = 1) - else if(effect <= 3) - M.emote(pick("groan","moan")) - if(effect <= 8) - M.adjustToxLoss(1) - else if(severity == 2) - if(effect <= 2) - M.visible_message("[M] suddenly and violently vomits!") - M.fakevomit(no_text = 1) - else if(effect <= 5) - M.visible_message("[M] staggers and drools, their eyes bloodshot!") - M.Dizzy(8) - M.Weaken(4) - if(effect <= 15) - M.adjustToxLoss(1) - -/datum/reagent/mitocholide - name = "Mitocholide" - id = "mitocholide" - description = "A specialized drug that stimulates the mitochondria of cells to encourage healing of internal organs." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - -/datum/reagent/mitocholide/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - //Mitocholide is hard enough to get, it's probably fair to make this all internal organs - for(var/name in H.internal_organs) - var/obj/item/organ/internal/I = H.get_int_organ(name) - if(I.damage > 0) - I.damage = max(I.damage-0.4, 0) - ..() - -/datum/reagent/mitocholide/reaction_obj(obj/O, volume) - if(istype(O, /obj/item/organ)) - var/obj/item/organ/Org = O - Org.rejuvenate() - -/datum/reagent/cryoxadone - name = "Cryoxadone" - id = "cryoxadone" - description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly." - reagent_state = LIQUID - color = "#0000C8" // rgb: 200, 165, 220 - heart_rate_decrease = 1 - -/datum/reagent/cryoxadone/on_mob_life(mob/living/M) - if(M.bodytemperature < 265) - M.adjustCloneLoss(-4) - M.adjustOxyLoss(-10) - M.adjustToxLoss(-3) - M.adjustBruteLoss(-12) - M.adjustFireLoss(-12) - M.status_flags &= ~DISFIGURED - ..() - -/datum/reagent/rezadone - name = "Rezadone" - id = "rezadone" - description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage." - reagent_state = SOLID - color = "#669900" // rgb: 102, 153, 0 - overdose_threshold = 30 - -/datum/reagent/rezadone/on_mob_life(mob/living/M) - M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. - M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - M.status_flags &= ~DISFIGURED - ..() - -/datum/reagent/rezadone/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - M.Dizzy(5) - M.Jitter(5) - -/datum/reagent/spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - description = "An all-purpose antibiotic agent extracted from space fungus." - reagent_state = LIQUID - color = "#0AB478" - metabolization_rate = 0.2 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_misc.dm b/code/modules/reagents/oldchem/reagents/reagents_misc.dm deleted file mode 100644 index ff729dcdf3f..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_misc.dm +++ /dev/null @@ -1,189 +0,0 @@ -/*/datum/reagent/silicate - name = "Silicate" - id = "silicate" - description = "A compound that can be used to reinforce glass." - reagent_state = LIQUID - color = "#C7FFFF" // rgb: 199, 255, 255 - -/datum/reagent/silicate/reaction_obj(obj/O, volume) - if(istype(O, /obj/structure/window)) - if(O:silicate <= 200) - - O:silicate += volume - O:health += volume * 3 - - if(!O:silicateIcon) - var/icon/I = icon(O.icon,O.icon_state,O.dir) - - var/r = (volume / 100) + 1 - var/g = (volume / 70) + 1 - var/b = (volume / 50) + 1 - I.SetIntensity(r,g,b) - O.icon = I - O:silicateIcon = I - else - var/icon/I = O:silicateIcon - - var/r = (volume / 100) + 1 - var/g = (volume / 70) + 1 - var/b = (volume / 50) + 1 - I.SetIntensity(r,g,b) - O.icon = I - O:silicateIcon = I */ - - -/datum/reagent/oxygen - name = "Oxygen" - id = "oxygen" - description = "A colorless, odorless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/nitrogen - name = "Nitrogen" - id = "nitrogen" - description = "A colorless, odorless, tasteless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/hydrogen - name = "Hydrogen" - id = "hydrogen" - description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/potassium - name = "Potassium" - id = "potassium" - description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." - reagent_state = SOLID - color = "#A0A0A0" // rgb: 160, 160, 160 - - -/datum/reagent/sulfur - name = "Sulfur" - id = "sulfur" - description = "A chemical element." - reagent_state = SOLID - color = "#BF8C00" // rgb: 191, 140, 0 - - -/datum/reagent/sodium - name = "Sodium" - id = "sodium" - description = "A chemical element." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/phosphorus - name = "Phosphorus" - id = "phosphorus" - description = "A chemical element." - reagent_state = SOLID - color = "#832828" // rgb: 131, 40, 40 - - -/datum/reagent/carbon - name = "Carbon" - id = "carbon" - description = "A chemical element." - reagent_state = SOLID - color = "#1C1300" // rgb: 30, 20, 0 - -/datum/reagent/carbon/reaction_turf(turf/T, volume) - if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T)) // Only add one dirt per turf. Was causing people to crash. - new /obj/effect/decal/cleanable/dirt(T) - -/datum/reagent/gold - name = "Gold" - id = "gold" - description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." - reagent_state = SOLID - color = "#F7C430" // rgb: 247, 196, 48 - - -/datum/reagent/silver - name = "Silver" - id = "silver" - description = "A lustrous metallic element regarded as one of the precious metals." - reagent_state = SOLID - color = "#D0D0D0" // rgb: 208, 208, 208 - - -/datum/reagent/aluminum - name = "Aluminum" - id = "aluminum" - description = "A silvery white and ductile member of the boron group of chemical elements." - reagent_state = SOLID - color = "#A8A8A8" // rgb: 168, 168, 168 - - -/datum/reagent/silicon - name = "Silicon" - id = "silicon" - description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." - reagent_state = SOLID - color = "#A8A8A8" // rgb: 168, 168, 168 - - -/datum/reagent/copper - name = "Copper" - id = "copper" - description = "A highly ductile metal." - color = "#6E3B08" // rgb: 110, 59, 8 - - -/datum/reagent/iron - name = "Iron" - id = "iron" - description = "Pure iron is a metal." - reagent_state = SOLID - color = "#C8A5DC" // rgb: 200, 165, 220 - -/datum/reagent/iron/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.8) - ..() - - -//foam -/datum/reagent/fluorosurfactant - name = "Fluorosurfactant" - id = "fluorosurfactant" - description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." - reagent_state = LIQUID - color = "#9E6B38" // rgb: 158, 107, 56 - -// metal foaming agent -// this is lithium hydride. Add other recipies (e.g. LiH + H2O -> LiOH + H2) eventually -/datum/reagent/ammonia - name = "Ammonia" - id = "ammonia" - description = "A caustic substance commonly used in fertilizer or household cleaners." - reagent_state = GAS - color = "#404030" // rgb: 64, 64, 48 - -/datum/reagent/diethylamine - name = "Diethylamine" - id = "diethylamine" - description = "A secondary amine, useful as a plant nutrient and as building block for other compounds." - reagent_state = LIQUID - color = "#322D00" - - -// Ported from Bay as part of the Botany Update -// Allows you to make planks from any plant that has this reagent in it. -// Also vines with this reagent are considered dense. -/datum/reagent/woodpulp - name = "Wood Pulp" - id = "woodpulp" - description = "A mass of wood fibers." - reagent_state = LIQUID - color = "#B97A57" \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm deleted file mode 100644 index bbdf92b8693..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm +++ /dev/null @@ -1,414 +0,0 @@ -/datum/reagent/toxin - name = "Toxin" - id = "toxin" - description = "A Toxic chemical." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/toxin/on_mob_life(mob/living/M) - M.adjustToxLoss(2) - ..() - -/datum/reagent/spider_venom - name = "Spider venom" - id = "spidertoxin" - description = "A toxic venom injected by spacefaring arachnids." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/spider_venom/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5) - ..() - -/datum/reagent/plasticide - name = "Plasticide" - id = "plasticide" - description = "Liquid plastic, do not eat." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/plasticide/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5) - ..() - - -/datum/reagent/minttoxin - name = "Mint Toxin" - id = "minttoxin" - description = "Useful for dealing with undesirable customers." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/minttoxin/on_mob_life(mob/living/M) - if(FAT in M.mutations) - M.gib() - ..() - -/datum/reagent/slimejelly - name = "Slime Jelly" - id = "slimejelly" - description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." - reagent_state = LIQUID - color = "#801E28" // rgb: 128, 30, 40 - -/datum/reagent/slimejelly/on_mob_life(mob/living/M) - if(prob(10)) - to_chat(M, "Your insides are burning!") - M.adjustToxLoss(rand(20,60)*REM) - else if(prob(40)) - M.adjustBruteLoss(-5*REM) - ..() - -/datum/reagent/slimetoxin - name = "Mutation Toxin" - id = "mutationtoxin" - description = "A corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - -/datum/reagent/slimetoxin/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/human = M - if(human.species.name != "Shadow") - to_chat(M, "Your flesh rapidly mutates!") - to_chat(M, "You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.") - to_chat(M, "Your body reacts violently to light. \green However, it naturally heals in darkness.") - to_chat(M, "Aside from your new traits, you are mentally unchanged and retain your prior obligations.") - human.set_species("Shadow") - ..() - -/datum/reagent/aslimetoxin - name = "Advanced Mutation Toxin" - id = "amutationtoxin" - description = "An advanced corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - -/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method != TOUCH) - M.ForceContractDisease(new /datum/disease/transformation/slime(0)) - - -/datum/reagent/mercury - name = "Mercury" - id = "mercury" - description = "A chemical element." - reagent_state = LIQUID - color = "#484848" // rgb: 72, 72, 72 - metabolization_rate = 0.2 - penetrates_skin = 1 - -/datum/reagent/mercury/on_mob_life(mob/living/M) - if(prob(70)) - M.adjustBrainLoss(1) - ..() - -/datum/reagent/chlorine - name = "Chlorine" - id = "chlorine" - description = "A chemical element." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - penetrates_skin = 1 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/chlorine/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - ..() - -/datum/reagent/fluorine - name = "Fluorine" - id = "fluorine" - description = "A highly-reactive chemical element." - reagent_state = GAS - color = "#6A6054" - penetrates_skin = 1 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/fluorine/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - M.adjustToxLoss(1*REM) - ..() - -/datum/reagent/radium - name = "Radium" - id = "radium" - description = "Radium is an alkaline earth metal. It is extremely radioactive." - reagent_state = SOLID - color = "#C7C7C7" // rgb: 199,199,199 - metabolization_rate = 0.4 - penetrates_skin = 1 - -/datum/reagent/radium/on_mob_life(mob/living/M) - if(M.radiation < 80) - M.apply_effect(4, IRRADIATE, negate_armor = 1) - ..() - -/datum/reagent/radium/reaction_turf(turf/T, volume) - if(volume >= 3 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/greenglow(T) - -/datum/reagent/mutagen - name = "Unstable mutagen" - id = "mutagen" - description = "Might cause unpredictable mutations. Keep away from children." - reagent_state = LIQUID - color = "#04DF27" - metabolization_rate = 0.3 - -/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume) - if(!..()) - return - if(!M.dna) - return //No robots, AIs, aliens, Ians or other mobs should be affected by this. - if((method==TOUCH && prob(33)) || method==INGEST) - randmutb(M) - domutcheck(M, null) - M.UpdateAppearance() - -/datum/reagent/mutagen/on_mob_life(mob/living/M) - if(!M.dna) - return //No robots, AIs, aliens, Ians or other mobs should be affected by this. - M.apply_effect(2*REM, IRRADIATE, negate_armor = 1) - if(prob(4)) - randmutb(M) - ..() - - -/datum/reagent/uranium - name ="Uranium" - id = "uranium" - description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." - reagent_state = SOLID - color = "#B8B8C0" // rgb: 184, 184, 192 - -/datum/reagent/uranium/on_mob_life(mob/living/M) - M.apply_effect(2, IRRADIATE, negate_armor = 1) - ..() - -/datum/reagent/uranium/reaction_turf(turf/T, volume) - if(volume >= 3 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/greenglow(T) - - -/datum/reagent/lexorin - name = "Lexorin" - id = "lexorin" - description = "Lexorin temporarily stops respiration. Causes tissue damage." - reagent_state = LIQUID - color = "#52685D" - metabolization_rate = 0.2 - -/datum/reagent/lexorin/on_mob_life(mob/living/M) - M.adjustToxLoss(1) - ..() - - -/datum/reagent/sacid - name = "Sulphuric acid" - id = "sacid" - description = "A strong mineral acid with the molecular formula H2SO4." - reagent_state = LIQUID - color = "#00D72B" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/sacid/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - ..() - -/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(volume > 25) - - if(H.wear_mask) - to_chat(H, "Your mask protects you from the acid!") - return - - if(H.head) - to_chat(H, "Your helmet protects you from the acid!") - return - - if(!M.unacidable) - if(prob(75)) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - affecting.take_damage(5, 10) - H.UpdateDamageIcon() - H.emote("scream") - else - M.take_organ_damage(5,10) - else - M.take_organ_damage(5,10) - - if(method == INGEST) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(volume < 10) - to_chat(M, "The greenish acidic substance stings you, but isn't concentrated enough to harm you!") - - if(volume >=10 && volume <=25) - if(!H.unacidable) - M.take_organ_damage(0,min(max(volume-10,2)*2,20)) - M.emote("scream") - - - if(volume > 25) - if(!M.unacidable) - if(prob(75)) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - affecting.take_damage(0, 20) - H.UpdateDamageIcon() - H.emote("scream") - else - M.take_organ_damage(0,20) - -/datum/reagent/sacid/reaction_obj(obj/O, volume) - if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) - if(!O.unacidable) - var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - O.visible_message("[O] melts.") - qdel(O) - - -/datum/reagent/hellwater - name = "Hell Water" - id = "hell_water" - description = "YOUR FLESH! IT BURNS!" - process_flags = ORGANIC | SYNTHETIC //Admin-bus has no brakes! KILL THEM ALL. - metabolization_rate = 1 - -/datum/reagent/hellwater/on_mob_life(mob/living/M) - M.fire_stacks = min(5, M.fire_stacks + 3) - M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire - M.adjustToxLoss(1) - M.adjustFireLoss(1) //Hence the other damages... ain't I a bastard? - M.adjustBrainLoss(5) - ..() - - -/datum/reagent/carpotoxin - name = "Carpotoxin" - id = "carpotoxin" - description = "A deadly neurotoxin produced by the dreaded spess carp." - reagent_state = LIQUID - color = "#003333" // rgb: 0, 51, 51 - -/datum/reagent/carpotoxin/on_mob_life(mob/living/M) - M.adjustToxLoss(2*REM) - ..() - -/datum/reagent/staminatoxin - name = "Tirizene" - id = "tirizene" - description = "A toxin that affects the stamina of a person when injected into the bloodstream." - reagent_state = LIQUID - color = "#6E2828" - data = 13 - -/datum/reagent/staminatoxin/on_mob_life(mob/living/M) - M.adjustStaminaLoss(REM * data) - data = max(data - 1, 3) - ..() - - -/datum/reagent/spore - name = "Spore Toxin" - id = "spore" - description = "A natural toxin produced by blob spores that inhibits vision when ingested." - color = "#9ACD32" - -/datum/reagent/spores/on_mob_life(mob/living/M) - M.adjustToxLoss(1) - M.damageoverlaytemp = 60 - M.eye_blurry = max(M.eye_blurry, 3) - ..() - -/datum/reagent/beer2 //disguised as normal beer for use by emagged brobots - name = "Beer" - id = "beer2" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - color = "#664300" // rgb: 102, 67, 0 - metabolization_rate = 1.5 * REAGENTS_METABOLISM - -/datum/reagent/beer2/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 50) - M.AdjustSleeping(1) - if(51 to INFINITY) - M.AdjustSleeping(1) - M.adjustToxLoss((current_cycle - 50)*REM) - ..() - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/datum/reagent/condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - description = "This shit goes in pepperspray." - reagent_state = LIQUID - color = "#B31008" // rgb: 179, 16, 8 - -/datum/reagent/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/victim = M - var/mouth_covered = 0 - var/eyes_covered = 0 - var/obj/item/safe_thing = null - if( victim.wear_mask ) - if( victim.wear_mask.flags & MASKCOVERSEYES ) - eyes_covered = 1 - safe_thing = victim.wear_mask - if( victim.wear_mask.flags & MASKCOVERSMOUTH ) - mouth_covered = 1 - safe_thing = victim.wear_mask - if( victim.head ) - if( victim.head.flags & MASKCOVERSEYES ) - eyes_covered = 1 - safe_thing = victim.head - if( victim.head.flags & MASKCOVERSMOUTH ) - mouth_covered = 1 - safe_thing = victim.head - if(victim.glasses) - eyes_covered = 1 - if( !safe_thing ) - safe_thing = victim.glasses - if( eyes_covered && mouth_covered ) - to_chat(victim, "Your [safe_thing] protects you from the pepperspray!") - return - else if( mouth_covered ) // Reduced effects if partially protected - to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!") - if(prob(5)) - victim.emote("scream") - victim.eye_blurry = max(M.eye_blurry, 3) - victim.eye_blind = max(M.eye_blind, 1) - victim.confused = max(M.confused, 3) - victim.damageoverlaytemp = 60 - victim.Weaken(3) - victim.drop_item() - return - else if( eyes_covered ) // Eye cover is better than mouth cover - to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!") - victim.eye_blurry = max(M.eye_blurry, 3) - victim.damageoverlaytemp = 30 - return - else // Oh dear :D - if(prob(5)) - victim.emote("scream") - to_chat(victim, "You're sprayed directly in the eyes with pepperspray!") - victim.eye_blurry = max(M.eye_blurry, 5) - victim.eye_blind = max(M.eye_blind, 2) - victim.confused = max(M.confused, 6) - victim.damageoverlaytemp = 75 - victim.Weaken(5) - victim.drop_item() - -/datum/reagent/condensedcapsaicin/on_mob_life(mob/living/M) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") - ..() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index f8e6f626bb1..f46d4010e69 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -29,9 +29,7 @@ ..() if(!possible_transfer_amounts) verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT - var/datum/reagents/R = new/datum/reagents(volume) - reagents = R - R.my_atom = src + create_reagents(volume) processing_objects.Add(src) if(spawned_disease) var/datum/disease/F = new spawned_disease(0) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 634e0875aaf..c69c7b4a0ef 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -118,4 +118,4 @@ empty = 0 if(empty) - to_chat(user, "It is currently empty. Allow some time for the internal syntheszier to produce more.") + to_chat(user, "It is currently empty. Allow some time for the internal syntheszier to produce more.") \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index a22802a4a45..d46ba85c3c9 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -1,4 +1,3 @@ - //Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle @@ -331,4 +330,4 @@ name = "BVAK bottle" desc = "A small bottle containing Bio Virus Antidote Kit." icon_state = "wide_bottle" - list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10) + list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 32836a15cc9..60c924e0515 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -1,4 +1,4 @@ - //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// (Mixing)Glass. //////////////////////////////////////////////////////////////////////////////// /obj/item/weapon/reagent_containers/glass @@ -331,7 +331,7 @@ armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) slot_flags = SLOT_HEAD flags = OPENCONTAINER - + /obj/item/weapon/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() if(slot == slot_head && reagents.total_volume) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 6533dbf52c2..490f46e0a52 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -110,4 +110,4 @@ amount_per_transfer_from_this = 50 possible_transfer_amounts = list(50) volume = 50 - list_reagents = list("stimulants" = 50) + list_reagents = list("stimulants" = 50) \ No newline at end of file diff --git a/code/modules/reagents/newchem/patch.dm b/code/modules/reagents/reagent_containers/patch.dm similarity index 100% rename from code/modules/reagents/newchem/patch.dm rename to code/modules/reagents/reagent_containers/patch.dm diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 1da5f07b2e5..a6fd792e795 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -80,12 +80,6 @@ icon_state = "pill8" list_reagents = list("haloperidol" = 15) -/obj/item/weapon/reagent_containers/food/pill/paroxetine - name = "Paroxetine pill" - desc = "Heavy anti-depressant." - icon_state = "pill8" - list_reagents = list("paroxetine" = 15) - /obj/item/weapon/reagent_containers/food/pill/happy name = "Happy pill" desc = "Happy happy joy joy!" diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 3972f0a4a13..a706d443d90 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -216,4 +216,4 @@ if(istype(A, /obj/effect/blob)) // blob damage in blob code return - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index f5225daeae1..4c2d2caa6b8 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -16,9 +16,7 @@ return /obj/structure/reagent_dispensers/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src + create_reagents(1000) if(!possible_transfer_amounts) verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT ..() diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 2a36ba585df..1e56d9d6d57 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -300,7 +300,7 @@ /obj/machinery/conveyor_switch/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) return {" "} diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 232d2a9b3c5..feb350d4d91 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -128,10 +128,7 @@ for(var/mob/V in viewers(usr)) V.show_message("[usr] starts putting [GM.name] into the disposal.", 3) if(do_after(usr, 20, target = GM)) - if(GM.client) - GM.client.perspective = EYE_PERSPECTIVE - GM.client.eye = src - GM.loc = src + GM.forceMove(src) for(var/mob/C in viewers(src)) C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3) qdel(G) @@ -189,10 +186,7 @@ msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(target)] in a disposals unit") else return - if(target.client) - target.client.perspective = EYE_PERSPECTIVE - target.client.eye = src - target.loc = src + target.forceMove(src) for(var/mob/C in viewers(src)) if(C == user) @@ -215,14 +209,8 @@ // leave the disposal /obj/machinery/disposal/proc/go_out(mob/user) - - if(user.client) - user.client.eye = user.client.mob - user.client.perspective = MOB_PERSPECTIVE - user.loc = src.loc + user.forceMove(loc) update() - return - // ai as human but can't flush /obj/machinery/disposal/attack_ai(mob/user as mob) @@ -253,6 +241,13 @@ return /obj/machinery/disposal/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/disposal/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] var/pressure = Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 100) @@ -271,13 +266,7 @@ data["pumpstatus"] = "Idle" data["pressure"] = pressure_round - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - - if(!ui) - ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250) - ui.set_initial_data(data) - ui.open() - ui.set_auto_update(1) + return data /obj/machinery/disposal/Topic(href, href_list) if(usr.loc == src) @@ -488,6 +477,10 @@ if(current_size >= STAGE_FIVE) qdel(src) +/obj/machinery/disposal/get_remote_view_fullscreens(mob/user) + if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2) + // virtual disposal object // travels through pipes in lieu of actual items // contents will be items flushed by the disposal @@ -1355,11 +1348,7 @@ // check if mob has client, if so restore client view on eject /mob/pipe_eject(var/direction) - if(src.client) - src.client.perspective = MOB_PERSPECTIVE - src.client.eye = src - - return + reset_perspective(null) /obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction) var/list/dirs diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index c373513a5f1..702afa68f2f 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -953,7 +953,7 @@ desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles." id = "mech_plasma_cutter" build_type = MECHFAB - req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3, "combat" = 1, "plasma" = 2) + req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3, "combat" = 1, "plasmatech" = 2) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma materials = list(MAT_METAL=1500, MAT_GLASS=500, MAT_PLASMA=200) construction_time = 100 diff --git a/code/modules/research/designs/spacepod_designs.dm b/code/modules/research/designs/spacepod_designs.dm index 759af82404d..4638a1bb830 100644 --- a/code/modules/research/designs/spacepod_designs.dm +++ b/code/modules/research/designs/spacepod_designs.dm @@ -121,7 +121,7 @@ desc = "Allows for the construction of a spacepod mounted laser." id = "podgun_laser" build_type = PODFAB - req_tech = list("materials" = 3, "combat" = 3, "plasma" = 2) + req_tech = list("materials" = 3, "combat" = 3, "plasmatech" = 2) build_path = /obj/item/device/spacepod_equipment/weaponry/laser category = list("Pod_Weaponry") materials = list(MAT_METAL=10000,MAT_GLASS=5000,MAT_GOLD=1000,MAT_SILVER=2000) @@ -250,4 +250,4 @@ build_type = PODFAB materials = list(MAT_METAL=500) build_path = /obj/item/device/spacepod_key - category = list("Pod_Parts") \ No newline at end of file + category = list("Pod_Parts") diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 1fec6186c60..421f0cf8e92 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -680,7 +680,7 @@ warn_admins(user, "Flash") /obj/item/weapon/relic/proc/petSpray(mob/user) - var/message = "[src] begans to shake, and in the distance the sound of rampaging animals arises!" + var/message = "[src] begins to shake, and in the distance the sound of rampaging animals arises!" visible_message(message) to_chat(user, message) var/animals = rand(1,25) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 84fc3573bae..a39c6485fc7 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -647,7 +647,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - var/data = list() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "r_n_d.tmpl", src.name, 800, 550) + ui.open() + +/obj/machinery/computer/rdconsole/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] files.RefreshResearch() @@ -857,11 +863,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, loaded_chemical["volume"] = R.volume loaded_chemical["id"] = R.id - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "r_n_d.tmpl", src.name, 800, 550) - ui.set_initial_data(data) - ui.open() + return data //helper proc that guarantees the wait message will not freeze the UI /obj/machinery/computer/rdconsole/proc/add_wait_message(message, delay) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm index 373b5d9454f..0e83e5812c3 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm @@ -37,7 +37,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) /datum/artifact_effect/badfeeling/DoEffectAura() if(holder) @@ -50,7 +50,7 @@ to_chat(H, "[pick(drastic_messages)]") if(prob(10)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) return 1 /datum/artifact_effect/badfeeling/DoEffectPulse() @@ -64,7 +64,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) else if(prob(25)) - H.dizziness += rand(5,15) + H.AdjustDizzy(rand(5,15)) return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm index 08639dec98f..dd42c44204c 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm @@ -35,7 +35,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) /datum/artifact_effect/goodfeeling/DoEffectAura() if(holder) @@ -48,7 +48,7 @@ to_chat(H, "[pick(drastic_messages)]") if(prob(5)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) return 1 /datum/artifact_effect/goodfeeling/DoEffectPulse() @@ -62,7 +62,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) else if(prob(25)) - H.dizziness += rand(5,15) + H.AdjustDizzy(rand(5,15)) return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm index bbb16d76a3d..1f098ddfa6b 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm @@ -13,8 +13,8 @@ if(ishuman(toucher) && prob(weakness * 100)) var/mob/living/carbon/human/H = toucher to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness) - H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness) + H.AdjustDrowsy(rand(5,25) * weakness, bound_lower = 0, bound_upper = 50 * weakness) + H.AdjustEyeBlurry(rand(1,3) * weakness, bound_lower = 0, bound_upper = 50 * weakness) return 1 else if(isrobot(toucher)) to_chat(toucher, "\red SYSTEM ALERT: CPU cycles slowing down.") @@ -28,8 +28,8 @@ if(prob(weakness * 100)) if(prob(10)) to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness) - H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness) + H.AdjustDrowsy(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness) + H.AdjustEyeBlurry(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness) for(var/mob/living/silicon/robot/R in range(src.effectrange,holder)) to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.") return 1 @@ -41,8 +41,8 @@ var/weakness = GetAnomalySusceptibility(H) if(prob(weakness * 100)) to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness) - H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness) + H.AdjustDrowsy(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness) + H.AdjustEyeBlurry(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness) for(var/mob/living/silicon/robot/R in range(src.effectrange,holder)) to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.") return 1 diff --git a/code/modules/research/xenoarchaeology/finds/finds_special.dm b/code/modules/research/xenoarchaeology/finds/finds_special.dm index ce6fb4c2663..8ddcf27593b 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_special.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_special.dm @@ -194,7 +194,7 @@ 'sound/hallucinations/turn_around1.ogg',\ 'sound/hallucinations/turn_around2.ogg',\ ), 50, 1, -3) - M.sleeping = max(M.sleeping,rand(5,10)) + M.Sleeping(rand(5,10)) src.loc = null else processing_objects.Remove(src) diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm index 8bb917d3df4..c231912484b 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -112,11 +112,21 @@ coolant_purity = total_purity / fresh_coolant /obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(user.stat) return - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/radiocarbon_spectrometer/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["scanned_item"] = (scanned_item ? scanned_item.name : "") data["scanned_item_desc"] = (scanned_item ? (scanned_item.desc ? scanned_item.desc : "No information on record.") : "") @@ -141,19 +151,7 @@ data["radiation"] = round(radiation) data["t_left_radspike"] = round(t_left_radspike) data["rad_shield_on"] = rad_shield - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/radiocarbon_spectrometer/process() if(scanning) diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 4eb8d06ceb3..7b27642722b 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -76,7 +76,7 @@ origin.feed_slime_action.Remove(C) origin.monkey_recycle_action.Remove(C) //All of this stuff below could probably be a proc for all advanced cameras, only the action removal needs to be camera specific - remote_eye.user = null + remote_eye.eye_user = null if(C.client) C.client.perspective = MOB_PERSPECTIVE C.client.eye = src @@ -164,4 +164,4 @@ if(issmall(M) && M.stat) M.visible_message("[M] vanishes as they are reclaimed for recycling!") X.monkeys += 0.2 - qdel(M) \ No newline at end of file + qdel(M) diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index 8ff0ed6eb64..f2d36842504 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -3,7 +3,7 @@ desc = "This device is used to trigger station functions, which require more than one ID card to authenticate." icon = 'icons/obj/monitors.dmi' icon_state = "auth_off" - + var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made. var/event = "" var/screen = 1 @@ -15,13 +15,13 @@ var/mob/event_triggered_by var/mob/event_confirmed_by var/ert_reason = "Reason for ERT" - + anchored = 1 use_power = 1 idle_power_usage = 2 active_power_usage = 6 power_channel = ENVIRON - + req_access = list(access_keycard_auth) /obj/machinery/keycard_auth/attack_ai(mob/user as mob) @@ -54,7 +54,7 @@ icon_state = "auth_off" else stat |= NOPOWER - + /obj/machinery/keycard_auth/attack_ghost(mob/user) ui_interact(user) @@ -70,25 +70,26 @@ user.set_machine(src) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320) + ui.open() + +/obj/machinery/keycard_auth/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["screen"] = screen data["event"] = event data["ertreason"] = ert_reason - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/keycard_auth/Topic(href, href_list) if(..()) return 1 - + if(busy) to_chat(usr, "This device is busy.") return - + if(href_list["triggerevent"]) event = href_list["triggerevent"] screen = 2 diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 05240d477f3..474cbd91915 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -425,6 +425,12 @@ ui_interact(user) /obj/machinery/computer/ordercomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) + ui = nanomanager.try_update_ui(user, src, ui_key, ui) + if(!ui) + ui = new(user, src, ui_key, "order_console.tmpl", name, ORDER_SCREEN_WIDTH, ORDER_SCREEN_HEIGHT) + ui.open() + +/obj/machinery/computer/ordercomp/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["last_viewed_group"] = last_viewed_group @@ -474,11 +480,7 @@ data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home" data["timeleft"] = shuttle_master.supply.timeLeft(600) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - ui = new(user, src, ui_key, "order_console.tmpl", name, ORDER_SCREEN_WIDTH, ORDER_SCREEN_HEIGHT) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/ordercomp/Topic(href, href_list) if(..()) @@ -572,7 +574,12 @@ return /obj/machinery/computer/supplycomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - // data to send to ui + ui = nanomanager.try_update_ui(user, src, ui_key, ui) + if(!ui) + ui = new(user, src, ui_key, "supply_console.tmpl", name, SUPPLY_SCREEN_WIDTH, SUPPLY_SCREEN_HEIGHT) + ui.open() + +/obj/machinery/computer/supplycomp/ui_data(mob/user, datum/topic_state/state = default_state) var/data[0] data["last_viewed_group"] = last_viewed_group @@ -622,12 +629,7 @@ data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home" data["timeleft"] = shuttle_master.supply.timeLeft(600) data["can_launch"] = !shuttle_master.supply.canMove() - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - if(!ui) - ui = new(user, src, ui_key, "supply_console.tmpl", name, SUPPLY_SCREEN_WIDTH, SUPPLY_SCREEN_HEIGHT) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/computer/supplycomp/proc/is_authorized(user) if(allowed(user)) diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 55342fad0e6..427a6db798a 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -8,7 +8,9 @@ to_chat(usr, "Missing equipment or weapons.") my_atom.verbs -= text2path("[type]/proc/fire_weapons") return - my_atom.battery.use(shot_cost) + if(!my_atom.battery.use(shot_cost)) + to_chat(usr, "Insufficient charge to fire the weapons") + return var/olddir for(var/i = 0; i < shots_per; i++) if(olddir != my_atom.dir) diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 5a01cd5b09f..1c71f8837ee 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -141,6 +141,9 @@ qdel(ion_trail) ion_trail = null occupant_sanity_check() + if(pilot) + pilot.forceMove(get_turf(src)) + pilot = null if(passengers) for(var/mob/M in passengers) M.forceMove(get_turf(src)) @@ -226,29 +229,15 @@ health = max(0, health - damage) var/percentage = (health / initial(health)) * 100 occupant_sanity_check() - if(passengers && oldhealth > health && percentage <= 25 && percentage > 0) - var/sound/S = sound('sound/effects/engine_alert2.ogg') - S.wait = 0 //No queue - S.channel = 0 //Any channel - S.volume = 50 - for(var/mob/M in passengers) - M << S - if(passengers && oldhealth > health && !health) - var/sound/S = sound('sound/effects/engine_alert1.ogg') - S.wait = 0 - S.channel = 0 - S.volume = 50 - for(var/mob/M in passengers) - M << S + if(oldhealth > health && percentage <= 25 && percentage > 0) + play_sound_to_riders('sound/effects/engine_alert2.ogg') + if(oldhealth > health && !health) + play_sound_to_riders('sound/effects/engine_alert1.ogg') if(!health) spawn(0) - if(passengers) - for(var/mob/M in passengers) - to_chat(M, "Critical damage to the vessel detected, core explosion imminent!") + message_to_riders("Critical damage to the vessel detected, core explosion imminent!") for(var/i = 10, i >= 0; --i) - if(passengers) - for(var/mob/M in passengers) - to_chat(M, "[i]") + message_to_riders("[i]") if(i == 0) explosion(loc, 2, 4, 8) qdel(src) @@ -266,12 +255,13 @@ occupant_sanity_check() switch(severity) if(1) - for(var/mob/M in passengers) - var/mob/living/carbon/human/H = M - if(H) - H.forceMove(get_turf(src)) - H.ex_act(severity + 1) - to_chat(H, "You are forcefully thrown from \the [src]!") + if(passengers || pilot) + for(var/mob/M in passengers | pilot) + var/mob/living/carbon/human/H = M + if(H) + H.forceMove(get_turf(src)) + H.ex_act(severity + 1) + to_chat(H, "You are forcefully thrown from \the [src]!") qdel(ion_trail) qdel(src) if(2) @@ -283,27 +273,35 @@ /obj/spacepod/emp_act(severity) occupant_sanity_check() cargo_hold.emp_act(severity) - + if(battery && battery.charge > 0) battery.use((battery.charge / 2) / severity) deal_damage(80 / severity) if(empcounter < (40 / severity)) empcounter = 40 / severity - processing_objects.Add(src) - + processing_objects.Add(src) + switch(severity) if(1) - if(pilot) - to_chat(pilot, "The pod console flashes 'Heavy EMP WAVE DETECTED'.") - if(passengers) - for(var/mob/M in passengers) - to_chat(M, "The pod console flashes 'Heavy EMP WAVE DETECTED'.") + message_to_riders("The pod console flashes 'Heavy EMP WAVE DETECTED'.") if(2) - if(pilot) - to_chat(pilot, "The pod console flashes 'EMP WAVE DETECTED'.") - if(passengers) - for(var/mob/M in passengers) - to_chat(M, "The pod console flashes 'EMP WAVE DETECTED'.") + message_to_riders("The pod console flashes 'EMP WAVE DETECTED'.") + +/obj/spacepod/proc/play_sound_to_riders(mysound) + if(length(passengers | pilot) == 0) + return + var/sound/S = sound(mysound) + S.wait = 0 //No queue + S.channel = 0 //Any channel + S.volume = 50 + for(var/mob/M in passengers | pilot) + M << S + +/obj/spacepod/proc/message_to_riders(mymessage) + if(length(passengers | pilot) == 0) + return + for(var/mob/M in passengers | pilot) + to_chat(M, mymessage) /obj/spacepod/attackby(obj/item/W as obj, mob/user as mob, params) if(user.a_intent == I_HARM) diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index 406c1f83083..6c2f7354b43 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -55,7 +55,7 @@ user.visible_message(" [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ " Your hand slips, slicing [target]'s throat wth \the [tool]!" ) affected.createwound(CUT, 60) - target.losebreath += 4 + target.AdjustLoseBreath(4) return 0 @@ -83,7 +83,7 @@ /datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) user.visible_message(" [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \ " Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!") - target.losebreath += 4 + target.AdjustLoseBreath(4) return 0 /datum/surgery_step/face/fix_face diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 407a6b02777..1c66bd2c31b 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -8,6 +8,8 @@ w_class = 1 var/vision_flags = 0 + var/dark_view = 0 + var/see_invisible = 0 var/list/eye_colour = list(0,0,0) var/list/old_eye_colour = list(0,0,0) var/flash_protect = 0 @@ -18,15 +20,11 @@ ..() if(aug_message && !special) to_chat(owner, "[aug_message]") - M.sight |= vision_flags + M.update_sight() /obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0) . = ..() - M.sight ^= vision_flags - -/obj/item/organ/internal/cyberimp/eyes/on_life() - ..() - owner.sight |= vision_flags + M.update_sight() /obj/item/organ/internal/cyberimp/eyes/emp_act(severity) if(!owner) @@ -46,6 +44,8 @@ implant_color = "#000000" origin_tech = "materials=6;programming=4;biotech=6;magnets=5" vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS + dark_view = 8 + see_invisible = SEE_INVISIBLE_MINIMUM /obj/item/organ/internal/cyberimp/eyes/thermals name = "Thermals implant" diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index b860e3f062c..88f8078a2ba 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -133,9 +133,9 @@ if(crit_fail) return if(owner.stunned > STUN_SET_AMOUNT) - owner.stunned = STUN_SET_AMOUNT + owner.SetStunned(STUN_SET_AMOUNT) if(owner.weakened > STUN_SET_AMOUNT) - owner.weakened = STUN_SET_AMOUNT + owner.SetWeakened(STUN_SET_AMOUNT) /obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity) if(crit_fail) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 9034393bfe2..f71e9bff0be 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -101,7 +101,7 @@ else adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) if(prob(5)) - eye_blurry = max(eye_blurry, 6) + EyeBlurry(6) var/word = pick("dizzy","woozy","faint") to_chat(src, "You feel very [word].") if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD) diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 272adcad52c..03690ef3279 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -159,7 +159,7 @@ var/global/list/limb_icon_cache = list() gender = "f" else gender = "m" - if(limb_name == "head") + if(limb_name == "head" && !is_stump() && !(status & ORGAN_DESTROYED)) var/obj/item/organ/external/head/head_organ = src head_organ.handle_alt_icon() diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index bb408f51726..5dd4d570ee2 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -307,7 +307,7 @@ owner.drip(10) if(prob(4)) spawn owner.custom_emote(1, "gasps for air!") - owner.losebreath += 5 + owner.AdjustLoseBreath(5) /obj/item/organ/internal/kidneys name = "kidneys" @@ -327,7 +327,7 @@ // Coffee is really bad for you with busted kidneys. // This should probably be expanded in some way, but fucked if I know // what else kidneys can process in our reagent list. - var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list + var/datum/reagent/coffee = locate(/datum/reagent/consumable/drink/coffee) in owner.reagents.reagent_list if(coffee) if(is_bruised()) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) @@ -357,10 +357,10 @@ /obj/item/organ/internal/eyes/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) /obj/item/organ/internal/liver @@ -416,7 +416,7 @@ if(src.damage >= src.min_bruised_damage) for(var/datum/reagent/R in owner.reagents.reagent_list) // Ethanol and all drinks are bad - if(istype(R, /datum/reagent/ethanol)) + if(istype(R, /datum/reagent/consumable/ethanol)) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) // Can't cope with toxins at all @@ -493,6 +493,7 @@ slot = "brain_tumor" health = 3 var/organhonked = 0 + var/suffering_delay = 900 /obj/item/organ/internal/honktumor/New() ..() @@ -535,11 +536,11 @@ return if(organhonked < world.time) - organhonked = world.time+900 + organhonked = world.time + suffering_delay to_chat(owner, "HONK") - owner.sleeping = 0 - owner.stuttering = 20 - owner.adjustEarDamage(0, 30) + owner.SetSleeping(0) + owner.Stuttering(20) + owner.AdjustEarDeaf(30) owner.Weaken(3) owner << 'sound/items/AirHorn.ogg' if(prob(30)) diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index 23d2af69bf3..f0b4b912eaf 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -15,8 +15,8 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 if(world.time < next_pain_time && !force) return if(amount > 10 && istype(src,/mob/living/carbon/human)) - if(src:paralysis) - src:paralysis = max(0, src:paralysis-round(amount/10)) + if(paralysis) + AdjustParalysis(-round(amount/10)) if(amount > 50 && prob(amount / 5)) src:drop_item() var/msg @@ -132,4 +132,4 @@ mob/living/carbon/human/proc/handle_pain() toxDamageMessage = "Your body aches all over, it's driving you mad." if(toxDamageMessage && prob(toxMessageProb)) - src.custom_pain(toxDamageMessage, getToxLoss() >= 15) \ No newline at end of file + src.custom_pain(toxDamageMessage, getToxLoss() >= 15) diff --git a/code/modules/surgery/organs/subtypes/diona.dm b/code/modules/surgery/organs/subtypes/diona.dm index 0f75fe9f80f..a4b0d8fb92b 100644 --- a/code/modules/surgery/organs/subtypes/diona.dm +++ b/code/modules/surgery/organs/subtypes/diona.dm @@ -169,10 +169,10 @@ /obj/item/organ/internal/diona_receptor/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) //TODO:Make absorb rads on insert diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index 61b2f143f69..0f402a42e5d 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -142,10 +142,10 @@ /obj/item/organ/internal/optical_sensor/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) // Used for an MMI or posibrain being installed into a human. diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 1d1ef048f65..f86cf41bcd0 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -62,18 +62,6 @@ can_infect = 1 blood_level = 1 -/datum/surgery_step/internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - - if(!hasorgans(target)) - return 0 - - var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(affected) - return 1 - - return 0 - - /datum/surgery_step/internal/manipulate_organs name = "manipulate organs" @@ -92,15 +80,13 @@ allowed_tools = allowed_tools + implements_extract + implements_mend + implements_finsh - - -/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - +/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) I = null var/mob/living/carbon/human/H - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) H = target affected = H.get_organ(target_zone) + if(is_int_organ(tool)) current_type = "insert" I = tool @@ -115,6 +101,7 @@ if(target.get_int_organ(I)) to_chat(user, " \The [target] already has [I].") return -1 + if(affected) user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ "You start transplanting \the [tool] into [target]'s [affected.name].") @@ -135,30 +122,33 @@ var/msg = "[user] starts pulling [target]'s skin back into place with \the [tool]." var/self_msg = "You start pulling [target]'s skin back into place with \the [tool]." user.visible_message(msg, self_msg) - if(affected) + + if(H && affected) H.custom_pain("Something hurts horribly in your [affected.name]!",1) + else if(implement_type in implements_extract) current_type = "extract" var/list/organs = target.get_organs_zone(target_zone) if(!organs.len) to_chat(user, "There are no removeable organs in [target]'s [parse_zone(target_zone)]!") return -1 - else - for(var/obj/item/organ/internal/O in organs) - O.on_find(user) - organs -= O - organs[O.name] = O - I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs - if(I && user && target && user.Adjacent(target) && user.get_active_hand() == tool) - I = organs[I] - if(!I) return -1 - user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \ - "You start to separate [target]'s [I] with \the [tool] for removal." ) - if(affected) - H.custom_pain("The pain in your [affected.name] is living hell!",1) - else + for(var/obj/item/organ/internal/O in organs) + O.on_find(user) + organs -= O + organs[O.name] = O + + I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs + if(I && user && target && user.Adjacent(target) && user.get_active_hand() == tool) + I = organs[I] + if(!I) return -1 + user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \ + "You start to separate [target]'s [I] with \the [tool] for removal." ) + if(H && affected) + H.custom_pain("The pain in your [affected.name] is living hell!",1) + else + return -1 else if(implement_type in implements_mend) current_type = "mend" @@ -173,6 +163,7 @@ if(!hasorgans(target)) to_chat(user, "They do not have organs to mend!") return + for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage > 0) if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) @@ -186,14 +177,17 @@ else to_chat(user, "[I] does not appear to be damaged.") - H.custom_pain("The pain in your [affected.name] is living hell!",1) + + if(affected) + H.custom_pain("The pain in your [affected.name] is living hell!", 1) else if(istype(tool, /obj/item/weapon/reagent_containers/food/snacks/organ)) to_chat(user, "[tool] was biten by someone! It's too damaged to use!") return -1 + ..() -/datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) if(current_type == "mend") var/tool_name = "\the [tool]" if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) @@ -205,6 +199,7 @@ if(!hasorgans(target)) return + for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) I.surgeryize() @@ -217,7 +212,7 @@ user.visible_message(" [user] treats damage to [target]'s [I.name] with [tool_name].", \ " You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 - //return 1 + else if(current_type == "insert") I = tool user.drop_item() @@ -228,16 +223,17 @@ return 0 if(affected) - user.visible_message(" [user] has transplanted \the [tool] into [target]'s [affected.name].", \ + user.visible_message(" [user] has transplanted \the [tool] into [target]'s [affected.name].", " You have transplanted \the [tool] into [target]'s [affected.name].") else - user.visible_message(" [user] has transplanted \the [tool] into [target]'s [affected.name].", \ + user.visible_message(" [user] has transplanted \the [tool] into [target]'s [parse_zone(target_zone)].", " You have transplanted \the [tool] into [target]'s [parse_zone(target_zone)].") + I.status &= ~ORGAN_CUT_AWAY else if(current_type == "extract") if(I && I.owner == target) - user.visible_message(" [user] has separated and extracts [target]'s [I] with \the [tool]." , \ + user.visible_message(" [user] has separated and extracts [target]'s [I] with \the [tool].", " You have separated and extracted [target]'s [I] with \the [tool].") add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") @@ -251,9 +247,9 @@ else user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", "You can't extract anything from [target]'s [parse_zone(target_zone)]!") - else if(current_type == "finish") - if(affected.encased) + else if(current_type == "finish") + if(affected && affected.encased) var/msg = " [user] bends [target]'s [affected.encased] back into place with \the [tool]." var/self_msg = " You bend [target]'s [affected.encased] back into place with \the [tool]." user.visible_message(msg, self_msg) @@ -268,13 +264,14 @@ return 0 -/datum/surgery_step/internal/manipulate_organs/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/internal/manipulate_organs/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) if(current_type == "mend") if(!hasorgans(target)) return user.visible_message(" [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!", \ " Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!") + var/dam_amt = 2 if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) @@ -290,27 +287,33 @@ I.take_damage(dam_amt,0) return 0 - else if(current_type == "insert") + else if(current_type == "insert") user.visible_message(" [user]'s hand slips, damaging \the [tool]!", \ " Your hand slips, damaging \the [tool]!") var/obj/item/organ/internal/I = tool - if(istype(I) &&!(I.tough)) + if(istype(I) && !I.tough) I.take_damage(rand(3,5),0) + return 0 else if(current_type == "extract") if(I && I.owner == target) - user.visible_message(" [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ - " Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") - affected.createwound(BRUISE, 20) + if(affected) + user.visible_message(" [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ + " Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") + affected.createwound(BRUISE, 20) + else + user.visible_message(" [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!", \ + " Your hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!") else user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", "You can't extract anything from [target]'s [parse_zone(target_zone)]!") return 0 + else if(current_type == "finish") - if(affected.encased) + if(affected && affected.encased) var/msg = " [user]'s hand slips, bending [target]'s [affected.encased] the wrong way!" var/self_msg = " Your hand slips, bending [target]'s [affected.encased] the wrong way!" user.visible_message(msg, self_msg) @@ -319,7 +322,8 @@ var/msg = " [user]'s hand slips, tearing the skin!" var/self_msg = " Your hand slips, tearing skin!" user.visible_message(msg, self_msg) - affected.createwound(BRUISE, 20) + if(affected) + affected.createwound(BRUISE, 20) return 0 diff --git a/config/example/config.txt b/config/example/config.txt index 60c8b17980d..c8066d03833 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -248,6 +248,9 @@ GHOST_INTERACTION ## IRC channel to send adminhelps to. Leave blank to disable adminhelps-to-irc. #ADMIN_IRC #admin +## IRC channel to send direct messages to admins to. Leave blank to disable. +#ADMIN_NOTIFY_IRC #paradiseStaff + ## Path to the python2 executable on the system. Leave blank for default. ## Default is "python" on Windows, "/usr/bin/env python2" on UNIX. #PYTHON_PATH pythonw diff --git a/html/browser/common.css b/html/browser/common.css index 8c0a0253599..23b675f7fa2 100644 --- a/html/browser/common.css +++ b/html/browser/common.css @@ -339,4 +339,10 @@ div.notice { width: 100%; clear: both; +} +.charPreview +{ + -ms-interpolation-mode: nearest-neighbor; + width: 64px; + height:64px; } \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index 2d41f163168..df4b0981066 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,219 @@ -->
+

23 December 2016

+

Crazylemon64 updated:

+
    +
  • Welding overlays now update instantly
  • +
  • Being inside various structures will now obscure your vision
  • +
+

KasparoVy updated:

+
    +
  • Characters will now be correctly assigned their species' genetic quirks at spawn.
  • +
  • Cloning will now correctly assign a characters species' genetic quirks.
  • +
  • Changing a character's species (via C.M.A. or whatever might call the set_species proc) will now correctly assign their species' genetic quirks.
  • +
+ +

20 December 2016

+

TullyBurnalot updated:

+
    +
  • Neurotoxin Spit now causes the spitter to move in space
  • +
  • Proximity Wet Floor Sign Mines can no longer appear in Surplus Crates
  • +
+ +

14 December 2016

+

Fox McCloud updated:

+
    +
  • Fixes the personal crafting cost of ED-209's being too expensive
  • +
+ +

13 December 2016

+

TullyBurnalot updated:

+
    +
  • Medbots no longer run after injured mobs if buckled. They also inform nearby players of this
  • +
+ +

12 December 2016

+

Kyep updated:

+
    +
  • Xenomorph resin walls no longer take damage from disabler beams. Only proper BRUTE or BURN damage hurts them now.
  • +
+

TullyBurnalot updated:

+
    +
  • Throwing mobs behind you force moves them to behind you before actually throwing them, preventing throw-shoving
  • +
+ +

09 December 2016

+

KasparoVy updated:

+
    +
  • You can now define whether a hair style will cover glasses or not. Only long hair styles should cover glasses (default behaviour).
  • +
  • You can now define whether a facial hair style/head accessory will be rendered on top of hair or not.
  • +
  • Glasses no longer render on top of all hair styles, only sufficiently short ones.
  • +
+ +

08 December 2016

+

Kyep updated:

+
    +
  • Ensures cryo pods will properly auto-eject people whose organic parts (limbs) have been healed, but who still have damaged mechanical limbs.
  • +
  • Disabler shots no longer damage mechs.
  • +
  • On impact, both taser and disabler shots now produce a message saying that the mech is undamaged by them, instead of a message saying they 'hit'.
  • +
  • Fixed runtimes created when SIT, ERT, and some other mobs are spawned.
  • +
  • Fixed a bug causing SITs to be spawned with one less person than desired in some cases.
  • +
+ +

07 December 2016

+

Markolie updated:

+
    +
  • Verbs have been cleaned up: all karma verbs can now be found under "OOC" instead of "Special Verbs". Most admin verbs have been moved out of "Special Verbs" as well.
  • +
+

TullyBurnalot updated:

+
    +
  • Unpowered Mining Vendors no longer accept IDs
  • +
  • Ore Redemption Machine and Mining Vendor can now be deconstructed if unpowered
  • +
+ +

06 December 2016

+

Markolie updated:

+
    +
  • The track button on the AI crew monitor now works.
  • +
  • Permanent door electrification by alt-clicking a door as an AI or setting it manually now works again.
  • +
+ +

05 December 2016

+

KasparoVy updated:

+
    +
  • Resolves an issue where cloned vampires could no longer drain blood, burn in the chapel or use their powers properly.
  • +
+ +

04 December 2016

+

KasparoVy updated:

+
    +
  • Resolves an issue with changeling regenerative stasis where changelings who initiated it while alive and died during the waiting period did not come back to life. Now they will, as intended.
  • +
+ +

03 December 2016

+

Kyep updated:

+
    +
  • the anti-ERP warning message on PDA message consoles is now accurate.
  • +
+ +

01 December 2016

+

Crazylemon64 updated:

+
    +
  • Cryo tubes no longer let you excessively multiply the efficiency of touch chems
  • +
+

KasparoVy updated:

+
    +
  • The character preview icon in character creation is now more detailed and less blurry.
  • +
  • ID cards now show tails, body accessories and tail markings correctly.
  • +
+

Twinmold93 updated:

+
    +
  • Pilots of spacepods will no longer be sent to the void when the space pod is destroyed in any method.
  • +
  • Pilots of spacepods will now get the same warnings for damage/core destruction that passengers get.
  • +
+ +

29 November 2016

+

KasparoVy updated:

+
    +
  • Head, body and tail markings are now loaded correctly from genes (UI).
  • +
  • Changes to a person's skin-tone gene are now immediately apparent.
  • +
+ +

28 November 2016

+

Allfd updated:

+
    +
  • Fixes an issue with the processing of GitHub changelog emoji in the php webhook.
  • +
+

Crazylemon64 updated:

+
    +
  • The RCD no longer shall work as a remote permissions control
  • +
+

KasparoVy updated:

+
    +
  • Pressing the light switch in one OR will no longer turn off the lights for both.
  • +
  • The fire alarms in each OR now work independently of each-other.
  • +
  • The second operating room now has its own APC and wiring.
  • +
+ +

26 November 2016

+

Fox McCloud updated:

+
    +
  • Fixes faint emote doing nothing
  • +
  • Fixes Mickey Finn's Special Brew not functioning properly/not making you fall asleep
  • +
+ +

23 November 2016

+

Fethas updated:

+
    +
  • Fixes human jetpacks..maybe...
  • +
+

FlattestNerd updated:

+
    +
  • the e20 will now get logged when it goes BEWM, as it should.
  • +
+

Fox McCloud updated:

+
    +
  • Fixes double-breaking news newscaster
  • +
+ +

22 November 2016

+

KasparoVy updated:

+
    +
  • You now stutter when you're in shock/crit and when you've got the nervous disability as you used to.
  • +
+

Twinmold93 updated:

+
    +
  • Runtime caused by lack of settlers in the Orion arcade game.
  • +
+ +

20 November 2016

+

KasparoVy updated:

+
    +
  • The DNA SE injectors one can find in the abandoned mining crates now correctly activate/deactivate the powers they may contain.
  • +
+ +

15 November 2016

+

KasparoVy updated:

+
    +
  • Adding cable to multiple computer frames at the same time while not having the correct amount of cables will no longer cause busted coils with a negative number of cables.
  • +
+ +

13 November 2016

+

Fox McCloud updated:

+
    +
  • Fixes BSA having peculiar results.
  • +
+ +

07 November 2016

+

Crazylemon updated:

+
    +
  • Status effects should work a little more consistently now
  • +
+

Crazylemon64 updated:

+
    +
  • The mech-mounted plasma cutter can now be constructed again
  • +
  • Space pod lasers can now be constructed again
  • +
+

Fox McCloud updated:

+
    +
  • Fixes hunters not being weakened when crashing into a shield/wall
  • +
  • Fixes xeno stuns half the time intended
  • +
  • Fixes stopping, dropping, and rolling not properly weakening Xenos/Hulks
  • +
+

KasparoVy updated:

+
    +
  • Fixes a bug where changing your alt head required two icon updates to show.
  • +
  • Fixes a bug where you couldn't choose head marking styles that would ordinarily be available regardless of your alt head.
  • +
  • Fixes a bug where Tajara couldn't choose undergarments.
  • +
  • Resolves an issue with the Vulpkanin Jagged hairstyle missing a pixel.
  • +
+

Twinmold93 updated:

+
    +
  • Fixes a runtime issue caused by using the detective's scanner on the space hotel cleaver.
  • +
  • Scrubber pipe missing segment behind the operating theatres.
  • +
+

23 October 2016

KasparoVy updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 7f682f24250..ad60276d04f 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -3048,3 +3048,153 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. in sprite_accessories.dm. - imageadd: Adds mask sprites tweaked to fit the new Unathi alternate head to go along with the new alt. head mask fitting system. +2016-11-07: + Crazylemon: + - tweak: Status effects should work a little more consistently now + Crazylemon64: + - bugfix: The mech-mounted plasma cutter can now be constructed again + - bugfix: Space pod lasers can now be constructed again + Fox McCloud: + - bugfix: Fixes hunters not being weakened when crashing into a shield/wall + - bugfix: Fixes xeno stuns half the time intended + - bugfix: Fixes stopping, dropping, and rolling not properly weakening Xenos/Hulks + KasparoVy: + - bugfix: Fixes a bug where changing your alt head required two icon updates to + show. + - bugfix: Fixes a bug where you couldn't choose head marking styles that would ordinarily + be available regardless of your alt head. + - bugfix: Fixes a bug where Tajara couldn't choose undergarments. + - bugfix: Resolves an issue with the Vulpkanin Jagged hairstyle missing a pixel. + Twinmold93: + - bugfix: Fixes a runtime issue caused by using the detective's scanner on the space + hotel cleaver. + - bugfix: Scrubber pipe missing segment behind the operating theatres. +2016-11-13: + Fox McCloud: + - bugfix: Fixes BSA having peculiar results. +2016-11-15: + KasparoVy: + - bugfix: Adding cable to multiple computer frames at the same time while not having + the correct amount of cables will no longer cause busted coils with a negative + number of cables. +2016-11-20: + KasparoVy: + - bugfix: The DNA SE injectors one can find in the abandoned mining crates now correctly + activate/deactivate the powers they may contain. +2016-11-22: + KasparoVy: + - bugfix: You now stutter when you're in shock/crit and when you've got the nervous + disability as you used to. + Twinmold93: + - bugfix: Runtime caused by lack of settlers in the Orion arcade game. +2016-11-23: + Fethas: + - bugfix: Fixes human jetpacks..maybe... + FlattestNerd: + - tweak: the e20 will now get logged when it goes BEWM, as it should. + Fox McCloud: + - bugfix: Fixes double-breaking news newscaster +2016-11-26: + Fox McCloud: + - bugfix: Fixes faint emote doing nothing + - bugfix: Fixes Mickey Finn's Special Brew not functioning properly/not making you + fall asleep +2016-11-28: + Allfd: + - bugfix: Fixes an issue with the processing of GitHub changelog emoji in the php + webhook. + Crazylemon64: + - bugfix: The RCD no longer shall work as a remote permissions control + KasparoVy: + - bugfix: Pressing the light switch in one OR will no longer turn off the lights + for both. + - tweak: The fire alarms in each OR now work independently of each-other. + - rscadd: The second operating room now has its own APC and wiring. +2016-11-29: + KasparoVy: + - bugfix: Head, body and tail markings are now loaded correctly from genes (UI). + - bugfix: Changes to a person's skin-tone gene are now immediately apparent. +2016-12-01: + Crazylemon64: + - bugfix: Cryo tubes no longer let you excessively multiply the efficiency of touch + chems + KasparoVy: + - tweak: The character preview icon in character creation is now more detailed and + less blurry. + - bugfix: ID cards now show tails, body accessories and tail markings correctly. + Twinmold93: + - bugfix: Pilots of spacepods will no longer be sent to the void when the space + pod is destroyed in any method. + - bugfix: Pilots of spacepods will now get the same warnings for damage/core destruction + that passengers get. +2016-12-03: + Kyep: + - tweak: the anti-ERP warning message on PDA message consoles is now accurate. +2016-12-04: + KasparoVy: + - bugfix: Resolves an issue with changeling regenerative stasis where changelings + who initiated it while alive and died during the waiting period did not come + back to life. Now they will, as intended. +2016-12-05: + KasparoVy: + - bugfix: Resolves an issue where cloned vampires could no longer drain blood, burn + in the chapel or use their powers properly. +2016-12-06: + Markolie: + - bugfix: The track button on the AI crew monitor now works. + - bugfix: Permanent door electrification by alt-clicking a door as an AI or setting + it manually now works again. +2016-12-07: + Markolie: + - tweak: 'Verbs have been cleaned up: all karma verbs can now be found under "OOC" + instead of "Special Verbs". Most admin verbs have been moved out of "Special + Verbs" as well.' + TullyBurnalot: + - bugfix: Unpowered Mining Vendors no longer accept IDs + - bugfix: Ore Redemption Machine and Mining Vendor can now be deconstructed if unpowered +2016-12-08: + Kyep: + - bugfix: Ensures cryo pods will properly auto-eject people whose organic parts + (limbs) have been healed, but who still have damaged mechanical limbs. + - bugfix: Disabler shots no longer damage mechs. + - bugfix: On impact, both taser and disabler shots now produce a message saying + that the mech is undamaged by them, instead of a message saying they 'hit'. + - bugfix: Fixed runtimes created when SIT, ERT, and some other mobs are spawned. + - bugfix: Fixed a bug causing SITs to be spawned with one less person than desired + in some cases. +2016-12-09: + KasparoVy: + - rscadd: You can now define whether a hair style will cover glasses or not. Only + long hair styles should cover glasses (default behaviour). + - rscadd: You can now define whether a facial hair style/head accessory will be + rendered on top of hair or not. + - bugfix: Glasses no longer render on top of all hair styles, only sufficiently + short ones. +2016-12-12: + Kyep: + - bugfix: Xenomorph resin walls no longer take damage from disabler beams. Only + proper BRUTE or BURN damage hurts them now. + TullyBurnalot: + - bugfix: Throwing mobs behind you force moves them to behind you before actually + throwing them, preventing throw-shoving +2016-12-13: + TullyBurnalot: + - bugfix: Medbots no longer run after injured mobs if buckled. They also inform + nearby players of this +2016-12-14: + Fox McCloud: + - bugfix: Fixes the personal crafting cost of ED-209's being too expensive +2016-12-20: + TullyBurnalot: + - bugfix: Neurotoxin Spit now causes the spitter to move in space + - bugfix: Proximity Wet Floor Sign Mines can no longer appear in Surplus Crates +2016-12-23: + Crazylemon64: + - tweak: Welding overlays now update instantly + - tweak: Being inside various structures will now obscure your vision + KasparoVy: + - bugfix: Characters will now be correctly assigned their species' genetic quirks + at spawn. + - bugfix: Cloning will now correctly assign a characters species' genetic quirks. + - bugfix: Changing a character's species (via C.M.A. or whatever might call the + set_species proc) will now correctly assign their species' genetic quirks. diff --git a/html/changelogs/AutoChangeLog-pr-5811.yml b/html/changelogs/AutoChangeLog-pr-5811.yml deleted file mode 100644 index 33d9eb32a8b..00000000000 --- a/html/changelogs/AutoChangeLog-pr-5811.yml +++ /dev/null @@ -1,7 +0,0 @@ -author: KasparoVy -delete-after: True -changes: - - bugfix: "Fixes a bug where changing your alt head required two icon updates to show." - - bugfix: "Fixes a bug where you couldn't choose head marking styles that would ordinarily be available regardless of your alt head." - - bugfix: "Fixes a bug where Tajara couldn't choose undergarments." - - bugfix: "Resolves an issue with the Vulpkanin Jagged hairstyle missing a pixel." diff --git a/icons/effects/cameravis.dmi b/icons/effects/cameravis.dmi index 25dbc6c8e0e..378c19bad45 100644 Binary files a/icons/effects/cameravis.dmi and b/icons/effects/cameravis.dmi differ diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index f5384886dd0..7ea4f58b941 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index 02bbf79ad76..9d8462c03c5 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index e0cc9a7e997..b3af414cde5 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi index 3fe35fe7651..34e2a6ce696 100644 Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi index 590945e9e15..2753f52dfee 100644 Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ diff --git a/icons/mob/species/drask/helmet.dmi b/icons/mob/species/drask/helmet.dmi index 9e8953e4c4f..9c4ccd89c4b 100644 Binary files a/icons/mob/species/drask/helmet.dmi and b/icons/mob/species/drask/helmet.dmi differ diff --git a/icons/mob/species/drask/uniform.dmi b/icons/mob/species/drask/uniform.dmi index 66c5851122e..6610948f641 100644 Binary files a/icons/mob/species/drask/uniform.dmi and b/icons/mob/species/drask/uniform.dmi differ diff --git a/icons/mob/species/vox/back.dmi b/icons/mob/species/vox/back.dmi index 6ab32288475..0a88536cc83 100644 Binary files a/icons/mob/species/vox/back.dmi and b/icons/mob/species/vox/back.dmi differ diff --git a/icons/mob/species/vox/head.dmi b/icons/mob/species/vox/head.dmi index ae10eaa4b5c..21ed6e38001 100644 Binary files a/icons/mob/species/vox/head.dmi and b/icons/mob/species/vox/head.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 022ad5e407c..31be4923470 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 95a1a902aa0..74ef949dd10 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/atmospherics/circulator.dmi b/icons/obj/atmospherics/circulator.dmi new file mode 100644 index 00000000000..45f7a626ef6 Binary files /dev/null and b/icons/obj/atmospherics/circulator.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index a3d78f0a1c9..63af8386202 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 47a1c97a9a9..e45908cb152 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index a555009ae6a..4380c3a34bb 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/pipe-item.dmi b/icons/obj/pipe-item.dmi index 34fedaa560f..73d62edfaa8 100644 Binary files a/icons/obj/pipe-item.dmi and b/icons/obj/pipe-item.dmi differ diff --git a/icons/obj/pipes.dmi b/icons/obj/pipes.dmi index 45f79d9e66b..99e6e84d185 100644 Binary files a/icons/obj/pipes.dmi and b/icons/obj/pipes.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 5a1c5846e4e..9fe09e8694c 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/ooc_tag_16x.dmi b/icons/ooc_tag_16x.dmi new file mode 100644 index 00000000000..2165a593220 Binary files /dev/null and b/icons/ooc_tag_16x.dmi differ diff --git a/icons/turf/areas.dmi b/icons/turf/areas.dmi index 4baa2b25ae6..baf07678ed8 100755 Binary files a/icons/turf/areas.dmi and b/icons/turf/areas.dmi differ diff --git a/nano/assets/libraries.min.js b/nano/assets/libraries.min.js index 6e3405a7be4..9cb2d2f24f6 100644 --- a/nano/assets/libraries.min.js +++ b/nano/assets/libraries.min.js @@ -1,5 +1,5 @@ -!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=oe.type(e);return"function"===n||oe.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(oe.isFunction(t))return oe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return oe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pe.test(t))return oe.filter(t,e,n);t=oe.filter(t,e)}return oe.grep(e,function(e){return oe.inArray(e,t)>=0!==n})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t=xe[e]={};return oe.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function s(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1)):(he.detachEvent("onreadystatechange",a),e.detachEvent("onload",a))}function a(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(s(),oe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Ne,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?oe.parseJSON(n):n}catch(o){}oe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!oe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(oe.acceptData(e)){var o,r,s=oe.expando,a=e.nodeType,l=a?oe.cache:e,u=a?e[s]:e[s]&&s;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=a?e[s]=Y.pop()||oe.guid++:s),l[u]||(l[u]=a?{}:{toJSON:oe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[u]=oe.extend(l[u],t):l[u].data=oe.extend(l[u].data,t)),r=l[u],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[oe.camelCase(t)]=n),"string"==typeof t?(o=r[t],null==o&&(o=r[oe.camelCase(t)])):o=r,o}}function f(e,t,n){if(oe.acceptData(e)){var i,o,r=e.nodeType,s=r?oe.cache:e,a=r?e[oe.expando]:oe.expando;if(s[a]){if(t&&(i=n?s[a]:s[a].data)){oe.isArray(t)?t=t.concat(oe.map(t,oe.camelCase)):t in i?t=[t]:(t=oe.camelCase(t),t=t in i?[t]:t.split(" ")),o=t.length;for(;o--;)delete i[t[o]];if(n?!u(i):!oe.isEmptyObject(i))return}(n||(delete s[a].data,u(s[a])))&&(r?oe.cleanData([e],!0):ne.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function p(){return!0}function d(){return!1}function h(){try{return he.activeElement}catch(e){}}function g(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function m(e,t){var n,i,o=0,r=typeof e.getElementsByTagName!==Ce?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Ce?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[o]);o++)!t||oe.nodeName(i,t)?r.push(i):oe.merge(r,m(i,t));return void 0===t||t&&oe.nodeName(e,t)?oe.merge([e],r):r}function v(e){He.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return oe.nodeName(e,"table")&&oe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==oe.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Qe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,i=0;null!=(n=e[i]);i++)oe._data(n,"globalEval",!t||oe._data(t[i],"globalEval"))}function T(e,t){if(1===t.nodeType&&oe.hasData(e)){var n,i,o,r=oe._data(e),s=oe._data(t,r),a=r.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,o=a[n].length;o>i;i++)oe.event.add(t,n,a[n][i])}s.data&&(s.data=oe.extend({},s.data))}}function C(e,t){var n,i,o;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[oe.expando]){o=oe._data(t);for(i in o.events)oe.removeEvent(t,i,o.handle);t.removeAttribute(oe.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,x(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!oe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&He.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function _(t,n){var i,o=oe(n.createElement(t)).appendTo(n.body),r=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(o[0]))?i.display:oe.css(o[0],"display");return o.detach(),r}function N(e){var t=he,n=Ze[e];return n||(n=_(e,t),"none"!==n&&n||(Je=(Je||oe("