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/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 233cb1d7e74..318b751606d 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/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 dad6165400f..e6804ee1f96 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -196,7 +196,7 @@ //Human Overlays Indexes///////// #define MUTANTRACE_LAYER 1 -#define TAIL_UNDERLIMBS_LAYER 2 +#define TAIL_UNDERLIMBS_LAYER 2 //Tail split-rendering. #define LIMBS_LAYER 3 #define MARKINGS_LAYER 4 #define UNDERWEAR_LAYER 5 @@ -211,21 +211,24 @@ #define BELT_LAYER 14 //Possible make this an overlay of somethign required to wear a belt? #define SUIT_STORE_LAYER 15 #define BACK_LAYER 16 -#define HAIR_LAYER 17 //TODO: make part of head layer? -#define HEAD_ACCESSORY_LAYER 18 -#define FHAIR_LAYER 19 -#define TAIL_LAYER 20 //bs12 specific. this hack is probably gonna come back to haunt me -#define GLASSES_LAYER 21 -#define FACEMASK_LAYER 22 -#define HEAD_LAYER 23 -#define COLLAR_LAYER 24 -#define HANDCUFF_LAYER 25 -#define LEGCUFF_LAYER 26 -#define L_HAND_LAYER 27 -#define R_HAND_LAYER 28 -#define TARGETED_LAYER 29 //BS12: Layer for the target overlay from weapon targeting system -#define FIRE_LAYER 30 //If you're on fire -#define TOTAL_LAYERS 30 +#define HEAD_ACCESSORY_LAYER 17 +#define FHAIR_LAYER 18 +#define GLASSES_LAYER 19 +#define HAIR_LAYER 20 //TODO: make part of head layer? +#define HEAD_ACC_OVER_LAYER 21 //Select-layer rendering. +#define FHAIR_OVER_LAYER 22 //Select-layer rendering. +#define GLASSES_OVER_LAYER 23 //Select-layer rendering. +#define TAIL_LAYER 24 //bs12 specific. this hack is probably gonna come back to haunt me +#define FACEMASK_LAYER 25 +#define HEAD_LAYER 26 +#define COLLAR_LAYER 27 +#define HANDCUFF_LAYER 28 +#define LEGCUFF_LAYER 29 +#define L_HAND_LAYER 30 +#define R_HAND_LAYER 31 +#define TARGETED_LAYER 32 //BS12: Layer for the target overlay from weapon targeting system +#define FIRE_LAYER 33 //If you're on fire +#define TOTAL_LAYERS 33 ///Access Region Codes/// #define REGION_ALL 0 @@ -287,3 +290,11 @@ #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 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/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 de091cb8584..e0d25da3ffd 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1009,6 +1009,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/_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/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 88b631f5c18..9ac4a0eb4d6 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 6664c06dda0..53a927386bd 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1028,7 +1028,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/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/spell.dm b/code/datums/spell.dm index f16e1f6b263..332d96779e6 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -64,7 +64,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/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/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 59ca735f843..1bcc5bad5ef 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1554,6 +1554,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 c60d726236b..663d6c5a8f9 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -427,6 +427,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 0dd6c109170..f45f2daa07b 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 63c42687b67..0533afe2911 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -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" @@ -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(..()) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index f9e9c2678a5..36c9af1c48c 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -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 @@ -615,7 +619,7 @@ numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.remote_access_pin if(numbers.len>0) - to_chat(usr, "b>Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + 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) diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index a194ddfeed1..c42ac3e43e3 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -302,12 +302,12 @@ if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/)) to_chat(user, "Your mind is too busy with that telekinetic grab.") user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) return if(user.client.eye != user.client.mob) user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) return for(var/mob/living/L in targets) @@ -315,7 +315,7 @@ if(target) user.remoteview_target = target - user.reset_view(target) + user.reset_perspective(target) else user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 2585287528c..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) @@ -63,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/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index e60b7406675..8e288c39a70 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. @@ -100,6 +107,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 20133d972c8..ff08b31e700 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() diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm deleted file mode 100644 index eb5a0bb9ee4..00000000000 --- a/code/game/gamemodes/events.dm +++ /dev/null @@ -1,59 +0,0 @@ -/proc/alien_infestation(var/spawncount = 1) // -- TLE - //event_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. - event_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) - event_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/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 69d87a37b7f..b3319c34ecb 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/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 43892b6c474..5d9a880e12e 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -144,6 +144,9 @@ 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 diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 5c8dcecf05b..efd9e1ce01d 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -175,6 +175,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 @@ -201,12 +208,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/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/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 689fb350b0d..44565a6d157 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -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/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 fb49e6a5970..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]" @@ -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]" 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 5be99b2ab1c..603c0483129 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -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 f1d7149f9fa..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.can_see() || 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 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 b402d8825db..9494fd889d8 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 a46f6a97b50..f42650a8e86 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -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) @@ -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 != CONSCIOUS || stat & (NOPOWER|BROKEN)) + + if(stat & (NOPOWER|BROKEN)) return + 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 4c462b5a05c..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 @@ -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/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index 452408ccdaa..80f5e8be5d7 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -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 83f2dfef93f..a6eb360f45d 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -194,6 +194,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 @@ -224,13 +231,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 c36d4540336..08d7ded36ce 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/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 c8f93bc74ce..12dafd891e9 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' @@ -563,7 +564,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].") @@ -1126,7 +1129,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) @@ -1175,13 +1178,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 @@ -1264,7 +1263,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 @@ -1438,3 +1437,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/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 62760324f76..7e49136d3cf 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -97,3 +97,17 @@ icon = 'icons/effects/effects.dmi' icon_state = "admin" layer = 4.1 + +/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/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 fb617133d83..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.can_see() || !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/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 2cd98565967..36c94e08066 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -110,6 +110,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 @@ -128,12 +135,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) @@ -762,6 +764,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 @@ -782,12 +791,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/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/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/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 ed0092cf60d..26908f69180 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -58,13 +58,11 @@ for(var/mob/M in src) moveMob(M, loc) - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE /obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination) loc.Exited(M) M.loc = destination + M.reset_perspective(destination) if(isturf(loc)) loc.Entered(M, src, ignoreRest = 1) else @@ -122,10 +120,6 @@ if(M.buckled) continue - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - moveMob(M, src) itemcount++ @@ -428,3 +422,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) 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 3f49d3e3bde..c330ad11a01 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() @@ -76,12 +73,9 @@ O.loc = src.loc for(var/mob/living/M in src) - M.loc = src.loc + 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 /obj/structure/closet/statue/open() @@ -164,4 +158,4 @@ obj/structure/statue/angel icon_state = "angelseen" obj/structure/statue/corgi - icon_state = "corgi" \ No newline at end of file + icon_state = "corgi" 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/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 dcbb5c74c4d..72de785456e 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 @@ -1002,3 +1001,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 fda1382d4df..ba46a995ffd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -534,7 +534,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 fd2a3e49fc0..c001724316a 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)) @@ -2240,14 +2235,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") @@ -2491,18 +2478,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/freeze.dm b/code/modules/admin/verbs/freeze.dm index 920b24297ad..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 @@ -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 2a7c2d8b504..5768f87c4ee 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 - + event_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 4ae3e230762..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 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/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 18a0ffc9729..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 @@ -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" @@ -628,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 e3ed159904a..5ce9d28be35 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/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 7ee7509d8f1..53130d972f4 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -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/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/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/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 15458648513..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 diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 2446b74ad22..4c487d05afb 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -317,7 +317,14 @@ /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 @@ -334,11 +341,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", name, 400, 500) - ui.set_initial_data(data) - ui.open() + return data /obj/machinery/smartfridge/Topic(href, href_list) if(..()) return 0 @@ -410,4 +413,4 @@ to_chat(usr, "Access denied.") nanomanager.update_uis(src) return 0 - return ..() \ No newline at end of file + return ..() 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 0e557ea1d31..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) 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/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/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 56f71c94cb9..fb98f3a8c15 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 9e4f7289532..83e794b9d20 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -251,9 +251,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) @@ -530,4 +527,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 3a813b0a557..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(!can_see()) //blind people can't see dumbass + if(!has_vision()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -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(!can_see()) //blind people can't see dumbass + if(!has_vision()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) 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/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/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 c5cee9d3db4..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 diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index da93e43c13f..e6a2f6567c2 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -66,8 +66,8 @@ 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")) @@ -75,14 +75,12 @@ Paralyse(3) if(paralysis) - AdjustParalysis(-1) blinded = 1 stat = UNCONSCIOUS else if(sleeping) - AdjustSleeping(-1) blinded = 1 stat = UNCONSCIOUS - if( prob(10) && health ) + if(prob(10) && health) spawn(0) emote("hiss") //CONSCIOUS @@ -110,17 +108,6 @@ else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs AdjustEarDamage(-0.05) - //Other - if(stunned) - AdjustStunned(-1) - if(!stunned) - update_icons() - - if(weakened) - weakened = max(weakened-1,0) - if(!weakened) - update_icons() - if(stuttering) AdjustStuttering(-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 04a460ec710..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 diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 03cb2096963..447f65c6744 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -35,11 +35,9 @@ Paralyse(3) if(paralysis) - AdjustParalysis(-2) blinded = 1 stat = UNCONSCIOUS else if(sleeping) - AdjustSleeping(-1) blinded = 1 stat = UNCONSCIOUS if( prob(10) && health ) @@ -70,13 +68,6 @@ else if(ear_damage < 25) //ear damage heals slowly under this threshold. AdjustEarDamage(-0.05) - //Other - if(stunned) - AdjustStunned(-1) - - if(weakened) - AdjustWeakened(-1) - if(stuttering) AdjustStuttering(-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 7809e1fb947..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) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 74d096d9518..e61f8750901 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -62,22 +62,5 @@ . = 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/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 256aa562f72..a26b5e967af 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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/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/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index bd0c3538462..37826ae0a10 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -378,7 +378,7 @@ message = "[src] faints." if(src.sleeping) return //Can't faint while asleep - AdjustSleeping(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 0bf23e3cae6..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() @@ -716,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) @@ -1596,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() @@ -1994,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_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/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 471cb6bbf69..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 @@ -787,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 @@ -840,9 +835,9 @@ SetEyeBlurry(0) else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind. - EyeBlind(1) + EyeBlind(2) blinded = 1 - EyeBlurry(1) + EyeBlurry(2) else //blindness @@ -859,7 +854,7 @@ //blurry sight if(vision.is_bruised()) // Vision organs impaired? Permablurry. - EyeBlurry(1) + EyeBlurry(2) if(eye_blurry) // Blurry eyes heal slowly AdjustEyeBlurry(-1) @@ -899,7 +894,7 @@ /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) @@ -924,7 +919,7 @@ if(!isRemoteObserve && client && !client.adminobs) remoteview_target = null - reset_view(null) + reset_perspective(null) species.handle_vision(src) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 49d6d7fe245..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.AdjustSleeping(2, bound_lower = 0, bound_upper = 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 7b91d51261c..44636988941 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. var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning. @@ -305,7 +306,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) @@ -314,6 +315,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) @@ -332,7 +334,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.AdjustSleeping(2, bound_lower = 0, bound_upper = 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) @@ -468,118 +471,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.EyeBlind(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) @@ -682,3 +574,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 5e0841168e0..91661304144 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -409,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/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 308025e0204..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 @@ -151,7 +151,7 @@ /mob/living/proc/handle_paralysed() if(paralysis) - AdjustParalysis(-1) + AdjustParalysis(-1, updating = 1, force = 1) return paralysis /mob/living/proc/handle_sleeping() @@ -230,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 dd9e9f7cbd6..62102a2f662 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -287,6 +287,10 @@ adjustFireLoss(burn) src.updatehealth() +/mob/living/proc/has_organic_damage() + return (maxHealth - health) + + /mob/living/proc/restore_all_organs() return @@ -320,9 +324,9 @@ setBrainLoss(0) setStaminaLoss(0) SetSleeping(0) - SetParalysis(0) - SetStunned(0) - SetWeakened(0) + SetParalysis(0, 1, 1) + SetStunned(0, 1, 1) + SetWeakened(0, 1, 1) SetSlowed(0) SetLoseBreath(0) SetDizzy(0) 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/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/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 ca480d987f8..afa2d0667c4 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -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/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/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index d0e8e0e4bad..d749db16bf5 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.can_see()) + 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.can_see()) + if(M.occupant.has_vision()) return M.occupant return null diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index cc5b319c84f..24ad47a16cb 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -706,6 +706,22 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return +/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 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 index 49c91a10d99..f04196f9fc9 100644 --- a/code/modules/mob/living/stat_states.dm +++ b/code/modules/mob/living/stat_states.dm @@ -35,7 +35,7 @@ // 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() +/mob/living/proc/update_revive(updating = TRUE) if(stat != DEAD) return if(!can_be_revived()) @@ -45,6 +45,7 @@ dead_mob_list -= src living_mob_list += src timeofdeath = null - update_canmove() + 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 index bc12dfdeb87..45207fd5426 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -411,7 +411,7 @@ /mob/living/SetStuttering(amount, force = 0) //From mob/living/apply_effect: "Stuttering is often associated with Stun" if(status_flags & CANSTUN || force) - stuttering = max(stuttering, 0) + 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) diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index 5cbf7cae450..f817b03482e 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -1,5 +1,5 @@ /mob/living/update_blind_effects() - if(!can_see()) + if(!has_vision()) overlay_fullscreen("blind", /obj/screen/fullscreen/blind) throw_alert("blind", /obj/screen/alert/blind) return 1 @@ -43,7 +43,7 @@ return !(ear_deaf || (disabilities & DEAF)) // Whether the mob is able to see -/mob/living/can_see() +/mob/living/has_vision() return !(eye_blind || (disabilities & BLIND) || stat) // Whether the mob is capable of talking 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 e312ff9556b..ddb4d2beb60 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -62,7 +62,7 @@ if(!client) return if(type) - if(type & 1 && !can_see())//Vision related + if(type & 1 && !has_vision())//Vision related if(!( alt )) return else @@ -74,7 +74,7 @@ else msg = alt type = alt_type - if(type & 1 && !can_see()) + if(type & 1 && !has_vision()) return // Added voice muffling for Issue 41. if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD)) @@ -487,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 @@ -499,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) @@ -793,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) 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/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/update_status.dm b/code/modules/mob/update_status.dm index 3893085edb3..b9245fc1b6e 100644 --- a/code/modules/mob/update_status.dm +++ b/code/modules/mob/update_status.dm @@ -37,7 +37,7 @@ /mob/proc/can_hear() return 1 -/mob/proc/can_see() +/mob/proc/has_vision() return 1 /mob/proc/can_speak() 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 8f0621d0126..7e5f847419f 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/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 420733f7c76..e0be4e3c0a0 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -259,6 +259,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()) @@ -277,12 +284,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 275e2ec94e5..9c3475d2141 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -28,7 +28,7 @@ M.AdjustConfused(20) M.AdjustEyeBlurry(20) M.AdjustDrowsy(20) - for(var/datum/reagent/ethanol/A in M.reagents.reagent_list) + for(var/datum/reagent/consumable/ethanol/A in M.reagents.reagent_list) M.AdjustParalysis(2) M.AdjustDizzy(10) M.AdjustSlur(10) 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/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/chemistry/reagents/admin.dm similarity index 61% rename from code/modules/reagents/oldchem/reagents/reagents_admin.dm rename to code/modules/reagents/chemistry/reagents/admin.dm index 09636bd111f..a915ef8cd57 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm +++ b/code/modules/reagents/chemistry/reagents/admin.dm @@ -1,4 +1,4 @@ -/datum/reagent/adminordrazine //An OP chemical for admins +/datum/reagent/medicine/adminordrazine //An OP chemical for admins name = "Adminordrazine" id = "adminordrazine" description = "It's magic. We don't have to explain it." @@ -6,8 +6,9 @@ color = "#C8A5DC" // rgb: 200, 165, 220 process_flags = ORGANIC | SYNTHETIC //Adminbuse knows no bounds! admin_only = 1 + can_synth = 0 -/datum/reagent/adminordrazine/on_mob_life(mob/living/carbon/M) +/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M) M.setCloneLoss(0) M.setOxyLoss(0) M.radiation = 0 @@ -54,30 +55,7 @@ D.cure() ..() -/datum/reagent/adminordrazine/nanites +/datum/reagent/medicine/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 + 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 98% rename from code/modules/reagents/newchem/Blob-Reagents.dm rename to code/modules/reagents/chemistry/reagents/blob.dm index a7cfa32f403..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. @@ -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 83% rename from code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm rename to code/modules/reagents/chemistry/reagents/drink_base.dm index 6e30efb9423..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,8 +10,7 @@ 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.AdjustDizzy(adj_dizzy) if(adj_drowsy) @@ -25,4 +23,4 @@ if(adj_temp_cool) if(M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature - (adj_temp_cool * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() + ..() \ No newline at end of file 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/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/chemistry/reagents/drinks.dm similarity index 50% rename from code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm rename to code/modules/reagents/chemistry/reagents/drinks.dm index 869e9295bf5..489eac3eb81 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -1,43 +1,55 @@ -/datum/reagent/drink/orangejuice +/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/drink/orangejuicde/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/orangejuicde/on_mob_life(mob/living/M) if(M.getOxyLoss() && prob(30)) - M.adjustOxyLoss(-1*REM) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/drink/tomatojuice +/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/drink/tomatojuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/tomatojuice/on_mob_life(mob/living/M) if(M.getFireLoss() && prob(20)) M.adjustFireLoss(-1) ..() -/datum/reagent/drink/limejuice +/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/drink/limejuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/limejuice/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/carrotjuice +/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/drink/carrotjuicde/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/carrotjuicde/on_mob_life(mob/living/M) M.AdjustEyeBlurry(-1) M.AdjustEyeBlind(-1) switch(current_cycle) @@ -48,124 +60,167 @@ M.disabilities &= ~NEARSIGHTED ..() -/datum/reagent/drink/doctor_delight +/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/drink/doctors_delight/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/doctors_delight/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/berryjuice +/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/drink/poisonberryjuice +/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/drink/poisonberryjuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/poisonberryjuice/on_mob_life(mob/living/M) M.adjustToxLoss(1) ..() -/datum/reagent/drink/watermelonjuice +/datum/reagent/consumable/drink/watermelonjuice name = "Watermelon Juice" id = "watermelonjuice" description = "Delicious juice made from watermelon." color = "#863333" // rgb: 134, 51, 51 -/datum/reagent/drink/lemonjuice +/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/drink/grapejuice +/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/drink/banana +/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/drink/banana/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/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/drink/nothing +/datum/reagent/consumable/drink/nothing name = "Nothing" id = "nothing" description = "Absolutely nothing." + drink_icon = "nothing" + drink_name = "Nothing" + drink_desc = "Absolutely nothing." -/datum/reagent/drink/nothing/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/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/drink/potato_juice +/datum/reagent/consumable/drink/potato_juice name = "Potato Juice" id = "potato" description = "Juice of the potato. Bleh." - nutriment_factor = 2 * FOOD_METABOLISM + 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/drink/milk +/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/drink/milk/on_mob_life(mob/living/M) +/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/drink/milk/soymilk +/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/drink/milk/cream +/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/drink/milk/chocolate_milk +/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/drink/hot_coco +/datum/reagent/consumable/drink/hot_coco name = "Hot Chocolate" id = "hot_coco" description = "Made with love! And coco beans." - nutriment_factor = 2 * FOOD_METABOLISM + 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/drink/coffee +/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." @@ -177,8 +232,11 @@ 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/drink/coffee/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/coffee/on_mob_life(mob/living/M) if(holder.has_reagent("frostoil")) holder.remove_reagent("frostoil", 5) if(prob(50)) @@ -187,53 +245,64 @@ M.AdjustWeakened(-1) ..() -/datum/reagent/drink/coffee/overdose_process(mob/living/M, severity) +/datum/reagent/consumable/drink/coffee/overdose_process(mob/living/M, severity) if(volume > 45) M.Jitter(5) -/datum/reagent/drink/coffee/icecoffee +/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/drink/coffee/soy_latte +/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/drink/coffee/soy_latte/on_mob_life(mob/living/M) +/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/drink/coffee/cafe_latte +/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/drink/coffee/cafe_latte/on_mob_life(mob/living/M) +/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/drink/coffee/cafe_latte/cafe_mocha +/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/drink/tea +/datum/reagent/consumable/drink/tea name = "Tea" id = "tea" description = "Tasty black tea: It has antioxidants. It's good for you!" @@ -242,44 +311,52 @@ 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/drink/tea/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/tea/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/tea/icetea +/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/drink/bananahonk +/datum/reagent/consumable/drink/bananahonk name = "Banana Mama" id = "bananahonk" description = "A drink from Clown Heaven." - nutriment_factor = 1 * FOOD_METABOLISM color = "#664300" // rgb: 102, 67, 0 + drink_icon = "bananahonkglass" + drink_name = "Banana Honk" + drink_desc = "A drink from Banana Heaven." -/datum/reagent/drink/bananahonk/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/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/drink/silencer +/datum/reagent/consumable/drink/silencer name = "Silencer" id = "silencer" description = "A drink from Mime Heaven." - nutriment_factor = 1 * FOOD_METABOLISM color = "#664300" // rgb: 102, 67, 0 + drink_icon = "silencerglass" + drink_name = "Silencer" + drink_desc = "A drink from mime Heaven." -/datum/reagent/drink/silencer/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/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 80% rename from code/modules/reagents/newchem/drugs.dm rename to code/modules/reagents/chemistry/reagents/drugs.dm index bc5b10be569..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) @@ -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" @@ -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" @@ -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 ..() @@ -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.AdjustLoseBreath(1) - 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" @@ -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" @@ -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)) @@ -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) @@ -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) @@ -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 ..() @@ -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 60% rename from code/modules/reagents/newchem/medicine.dm rename to code/modules/reagents/chemistry/reagents/medicine.dm index a84ac83f385..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.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 @@ -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) +/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(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,12 +412,12 @@ overdose_threshold = 35 addiction_chance = 25 -/datum/reagent/ephedrine/on_mob_life(mob/living/M) +/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) + M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER) M.AdjustLoseBreath(-1, bound_lower = 5) if(M.oxyloss > 75) M.adjustOxyLoss(-1) @@ -383,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) @@ -404,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." @@ -420,7 +456,7 @@ color = "#5BCBE1" addiction_chance = 10 -/datum/reagent/diphenhydramine/on_mob_life(mob/living/M) +/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) @@ -432,16 +468,7 @@ 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." @@ -451,7 +478,7 @@ addiction_chance = 50 shock_reduction = 50 -/datum/reagent/morphine/on_mob_life(mob/living/M) +/datum/reagent/medicine/morphine/on_mob_life(mob/living/M) M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) @@ -468,7 +495,14 @@ 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 @@ -487,24 +521,7 @@ 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." @@ -513,32 +530,24 @@ metabolization_rate = 0.2 overdose_threshold = 25 -/datum/reagent/atropine/on_mob_life(mob/living/M) +/datum/reagent/medicine/atropine/on_mob_life(mob/living/M) M.AdjustDizzy(1) M.Confused(5) if(prob(4)) M.emote("collapse") 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." @@ -547,7 +556,7 @@ metabolization_rate = 0.2 overdose_threshold = 20 -/datum/reagent/epinephrine/on_mob_life(mob/living/M) +/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/M) M.AdjustDrowsy(-5) if(prob(20)) M.AdjustParalysis(-1) @@ -562,14 +571,14 @@ holder.remove_reagent("histamine", 15) 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) @@ -590,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." @@ -607,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 @@ -639,58 +645,23 @@ 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) +/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 @@ -708,57 +679,33 @@ 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) +/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.SetSlowed(0) M.AdjustDizzy(-10) @@ -775,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 ..() @@ -786,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.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." @@ -845,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) @@ -890,23 +820,14 @@ 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) +/datum/reagent/medicine/ether/on_mob_life(mob/living/M) M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) @@ -919,95 +840,24 @@ 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.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) - ..() - -//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." @@ -1016,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 @@ -1056,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 68% rename from code/modules/reagents/newchem/toxins.dm rename to code/modules/reagents/chemistry/reagents/toxins.dm index d8e8205b1f7..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" @@ -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)) @@ -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,7 +512,7 @@ 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)) @@ -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" @@ -266,20 +559,6 @@ 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)) @@ -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" @@ -440,6 +691,7 @@ 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) @@ -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) @@ -492,15 +745,6 @@ 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.AdjustJitter(-30) switch(current_cycle) @@ -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,6 +804,7 @@ reagent_state = LIQUID color = "#C2D8CD" metabolization_rate = 0.05 + can_synth = 0 /datum/reagent/coniine/on_mob_life(mob/living/M) M.adjustToxLoss(2) @@ -616,23 +854,6 @@ 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) @@ -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,14 +953,6 @@ 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) @@ -774,14 +976,6 @@ 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.Silence(2) ..() @@ -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 diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/chemistry/reagents/water.dm similarity index 86% rename from code/modules/reagents/oldchem/reagents/reagents_water.dm rename to code/modules/reagents/chemistry/reagents/water.dm index a2dd3eb7fc4..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,6 +268,9 @@ 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.AdjustJitter(-5) @@ -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" @@ -367,44 +309,6 @@ 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.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/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" @@ -419,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" @@ -452,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" @@ -467,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" @@ -499,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" @@ -525,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" @@ -542,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" @@ -595,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 - ..() +/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 cdc2d0b8d43..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.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) - ..() - -//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() diff --git a/code/modules/reagents/newchem/drinks.dm b/code/modules/reagents/newchem/drinks.dm deleted file mode 100644 index da07f7a995f..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.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/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.AdjustHallucinate(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 - dizzy_adj = 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.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/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(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 - dizzy_adj = 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 - dizzy_adj = 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 - dizzy_adj = 10 - -/datum/reagent/ethanol/driestmartini/on_mob_life(mob/living/M) - 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.AdjustDizzy(-5) - M.AdjustDrowsy(-3) - M.AdjustSleeping(-2) - M.Jitter(5) - ..() 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 26164571769..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(30) - M.AdjustDizzy(5) - M.SetDrowsy(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) - ..() 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 1fd0188287a..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(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/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")) - ..() 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 61228dfb2d0..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.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/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 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 de52805fef2..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_food.dm +++ /dev/null @@ -1,393 +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.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) 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 b0a09afc999..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.AdjustDrowsy(-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 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 0aae5e3f40e..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.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 - -/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.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/condensedcapsaicin/on_mob_life(mob/living/M) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") - ..() 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/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/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/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/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 18f0e51b2e2..5dd4d570ee2 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -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) @@ -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 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 f2087eebaa2..31bde9c5e4f 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-5601.yml b/html/changelogs/AutoChangeLog-pr-5601.yml deleted file mode 100644 index cd74a767312..00000000000 --- a/html/changelogs/AutoChangeLog-pr-5601.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: Crazylemon -delete-after: True -changes: - - tweak: "Status effects should work a little more consistently now" 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/html/changelogs/AutoChangeLog-pr-5826.yml b/html/changelogs/AutoChangeLog-pr-5826.yml deleted file mode 100644 index 62bc989c620..00000000000 --- a/html/changelogs/AutoChangeLog-pr-5826.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: Twinmold93 -delete-after: True -changes: - - bugfix: "Fixes a runtime issue caused by using the detective's scanner on the space hotel cleaver." 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 4c7a3707efd..9cf930476d5 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 9aed5172330..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 c0c5dbd8678..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 568fcce4443..74ef949dd10 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.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 5a198ee1e64..4380c3a34bb 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index d21263adf0f..bd09b38dcd4 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("