diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c00e2688f1..e14c5d1624 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -111,6 +111,9 @@ The use of the : operator to override type safety checks is not allowed. You mus ### Type paths must begin with a / eg: `/datum/thing`, not `datum/thing` +### Type paths must be lowercase +eg: `/datum/thing/blue`, not `datum/thing/BLUE` or `datum/thing/Blue` + ### Datum type paths must began with "datum" In DM, this is optional, but omitting it makes finding definitions harder. @@ -240,6 +243,8 @@ This prevents nesting levels from getting deeper then they need to be. * Queries must never specify the database, be it in code, or in text files in the repo. +* Primary keys are inherently immutable and you must never do anything to change the primary key of a row or entity. This includes preserving auto increment numbers of rows when copying data to a table in a conversion script. No amount of bitching about gaps in ids or out of order ids will save you from this policy. + ### Mapping Standards * TGM Format & Map Merge * All new maps submitted to the repo through a pull request must be in TGM format (unless there is a valid reason present to have it in the default BYOND format.) This is done using the [Map Merge](https://github.com/tgstation/tgstation/wiki/Map-Merger) utility included in the repo to convert the file to TGM format. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 949f1c4c44..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -[Round ID]: # (If you discovered this issue from playing tgstation hosted servers:) -[Round ID]: # (**INCLUDE THE ROUND ID**) -[Round ID]: # (It can be found in the Status panel or retrieved from https://atlantaned.space/statbus/round.php ! The round id let's us look up valuable information and logs for the round the bug happened.) - -[Testmerges]: # (If you believe the issue to be caused by a test merge [OOC tab -> Show Server Revision], report it in the pull request's comment section instead.) - -[Reproduction]: # (Explain your issue in detail, including the steps to reproduce it. Issues without proper reproduction steps or explanation are open to being ignored/closed by maintainers.) - -[For Admins]: # (Oddities induced by var-edits and other admin tools are not necessarily bugs. Verify that your issues occur under regular circumstances before reporting them.) \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..09f99f6c85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,20 @@ +--- +name: Bug report +about: Create a report to help reproduce and fix the issue +--- + +## Round ID: + + + +## Testmerges: + + + +## Reproduction: + + + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..2c9eb90c72 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,7 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +Please be aware that feature discussions most often take place on the Citadel Station Discord and should not be requested here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7855fd5782..f204eb0a72 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,16 @@ -[Changelogs]: # (Your PR should contain a detailed changelog of notable changes, titled and categorized appropriately. This includes, new features, sprites, sounds, balance changes, admin tools, map edits, removals, big refactors, config changes, hosting changes and important fixes. An example changelog has been provided below for you to edit. If you need additional help, read https://github.com/tgstation/tgstation/wiki/Changelogs) + + -:cl: optional name here +## About The Pull Request + + + +## Why It's Good For The Game + + + +## Changelog +:cl: add: Added new things add: Added more things del: Removed old things @@ -19,4 +29,5 @@ admin: messed with admin stuff server: something server ops should know /:cl: -[why]: # (Please add a short description [two lines down] of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding.) + + diff --git a/.travis.yml b/.travis.yml index 7138b23354..bef3a69ad7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: generic sudo: false +dist: xenial branches: except: - ___TGS3TempBranch @@ -14,6 +15,7 @@ matrix: packages: - python3 - python3-pip + - python3-setuptools cache: directories: - tgui/node_modules @@ -43,7 +45,8 @@ matrix: - gcc-multilib - g++-7 - g++-7-multilib - - libmariadbclient-dev:i386 + - libmariadb-client-lgpl-dev:i386 + - libmariadbd-dev cache: directories: - $HOME/.cargo diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index b3a0289761..738148c948 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -209,6 +209,8 @@ dir = 8 }, /obj/item/malf_upgrade, +/obj/item/disk/tech_disk/illegal, +/obj/structure/safe, /turf/open/floor/plating/asteroid/basalt/lava_land_surface, /area/ruin/unpowered/ash_walkers) "aB" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm index ba291fc258..945ea515c7 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm @@ -272,7 +272,13 @@ /obj/machinery/light, /turf/open/floor/plasteel/freezer, /area/ruin/powered/seedvault) - +"Z" = ( +/obj/item/disk/design_disk/plant_disk, +/obj/machinery/autolathe/hacked{ + desc = "This autolathe seems to have its safety light off." + }, +/turf/open/floor/plasteel/freezer, +/area/ruin/powered/seedvault) (1,1,1) = {" a a @@ -375,7 +381,7 @@ h h u R -u +Z Q a a diff --git a/_maps/RandomRuins/SpaceRuins/arcade.dmm b/_maps/RandomRuins/SpaceRuins/arcade.dmm new file mode 100644 index 0000000000..771c33c55b --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/arcade.dmm @@ -0,0 +1,711 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/turf/open/floor/plating/asteroid, +/area/ruin/powered) +"c" = ( +/turf/closed/mineral/random/high_chance, +/area/ruin/powered) +"d" = ( +/turf/closed/wall/mineral/titanium/survival/pod, +/area/ruin/powered) +"e" = ( +/obj/machinery/computer/arcade, +/turf/open/floor/engine, +/area/ruin/powered) +"f" = ( +/obj/machinery/light{ + dir = 1 + }, +/obj/machinery/vending/coffee, +/turf/open/floor/engine, +/area/ruin/powered) +"g" = ( +/obj/item/coin, +/obj/item/toy/plush/random, +/turf/open/floor/engine, +/area/ruin/powered) +"h" = ( +/obj/effect/mob_spawn/human/corpse/assistant, +/obj/effect/decal/cleanable/blood, +/obj/item/toy/plush/random, +/turf/open/floor/engine, +/area/ruin/powered) +"i" = ( +/obj/machinery/light{ + dir = 4 + }, +/obj/item/toy/plush/random, +/turf/open/floor/engine, +/area/ruin/powered) +"j" = ( +/obj/machinery/light{ + dir = 8 + }, +/turf/open/floor/engine, +/area/ruin/powered) +"k" = ( +/obj/item/coin/gold, +/turf/open/floor/engine, +/area/ruin/powered) +"l" = ( +/turf/open/floor/engine, +/area/ruin/powered) +"m" = ( +/obj/item/coin/iron, +/turf/open/floor/engine, +/area/ruin/powered) +"n" = ( +/obj/item/toy/plush/random, +/turf/open/floor/engine, +/area/ruin/powered) +"o" = ( +/obj/item/kitchen/knife{ + pixel_x = 5; + pixel_y = 11 + }, +/obj/item/toy/plush/random, +/turf/open/floor/engine, +/area/ruin/powered) +"p" = ( +/turf/closed/wall/mineral/titanium/survival/nodiagonal, +/area/ruin/powered) +"q" = ( +/turf/open/floor/light/colour_cycle/dancefloor_b, +/area/ruin/powered) +"r" = ( +/turf/open/floor/light/colour_cycle/dancefloor_a, +/area/ruin/powered) +"s" = ( +/obj/machinery/door/airlock/external/glass, +/obj/structure/fans/tiny, +/turf/open/floor/engine, +/area/ruin/powered) +"t" = ( +/obj/item/trash/chips, +/turf/open/floor/engine, +/area/ruin/powered) +"u" = ( +/obj/item/trash/cheesie, +/turf/open/floor/engine, +/area/ruin/powered) +"v" = ( +/obj/item/coin, +/turf/open/floor/engine, +/area/ruin/powered) +"w" = ( +/obj/item/coin/diamond, +/turf/open/floor/engine, +/area/ruin/powered) +"x" = ( +/obj/machinery/jukebox/disco/indestructible, +/turf/open/floor/light/colour_cycle/dancefloor_b, +/area/ruin/powered) +"y" = ( +/obj/machinery/light, +/turf/open/floor/engine, +/area/ruin/powered) +"z" = ( +/obj/machinery/light{ + dir = 4 + }, +/turf/open/floor/engine, +/area/ruin/powered) +"A" = ( +/obj/machinery/door/airlock/external/glass, +/turf/open/floor/engine, +/area/ruin/powered) +"B" = ( +/obj/machinery/vending/cola/random, +/turf/open/floor/engine, +/area/ruin/powered) +"C" = ( +/obj/machinery/vending/snack/random, +/turf/open/floor/engine, +/area/ruin/powered) +"D" = ( +/obj/item/trash/can, +/turf/open/floor/engine, +/area/ruin/powered) +"E" = ( +/obj/item/trash/sosjerky, +/turf/open/floor/engine, +/area/ruin/powered) +"F" = ( +/obj/structure/closet/crate/trashcart, +/turf/open/floor/plating/asteroid, +/area/ruin/powered) +"G" = ( +/obj/structure/chair/sofa/right, +/turf/open/floor/engine, +/area/ruin/powered) +"H" = ( +/obj/structure/chair/sofa/left, +/obj/item/bedsheet/ian, +/turf/open/floor/engine, +/area/ruin/powered) +"I" = ( +/obj/item/aiModule/toyAI, +/turf/open/floor/engine, +/area/ruin/powered) +"J" = ( +/obj/item/twohanded/dualsaber/toy, +/turf/open/floor/light/colour_cycle/dancefloor_b, +/area/ruin/powered) +"K" = ( +/obj/item/gun/energy/pumpaction/toy, +/turf/open/floor/engine, +/area/ruin/powered) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +b +b +b +b +a +a +a +a +a +a +a +a +a +a +a +a +"} +(3,1,1) = {" +a +a +a +b +b +b +b +b +b +b +b +a +a +a +b +b +b +b +a +a +"} +(4,1,1) = {" +a +a +a +b +b +b +b +b +b +b +b +a +a +b +b +b +b +b +b +a +"} +(5,1,1) = {" +a +a +a +b +b +c +c +c +c +b +b +b +b +b +b +c +c +c +b +b +"} +(6,1,1) = {" +a +a +a +b +c +c +c +c +c +b +b +b +b +c +c +c +c +c +c +b +"} +(7,1,1) = {" +a +a +a +b +c +c +d +d +d +d +d +d +d +d +d +d +c +c +c +b +"} +(8,1,1) = {" +a +a +a +b +c +c +d +e +j +l +l +K +j +G +B +d +c +c +b +b +"} +(9,1,1) = {" +a +a +a +b +c +c +d +e +k +l +v +l +l +H +C +d +c +c +b +a +"} +(10,1,1) = {" +a +a +b +b +c +c +d +e +l +I +l +l +l +k +B +d +c +c +b +a +"} +(11,1,1) = {" +a +a +b +c +c +c +d +e +l +l +w +l +y +d +d +p +c +b +b +a +"} +(12,1,1) = {" +a +a +b +c +c +c +d +e +m +J +r +q +l +A +l +s +b +b +b +a +"} +(13,1,1) = {" +a +b +b +c +c +c +d +f +l +r +x +r +l +d +d +d +b +b +b +a +"} +(14,1,1) = {" +a +b +b +c +c +c +d +e +l +q +r +q +D +A +l +s +b +b +b +a +"} +(15,1,1) = {" +a +b +b +b +c +c +d +e +t +u +l +E +y +d +d +p +b +b +b +a +"} +(16,1,1) = {" +a +b +b +b +c +c +d +e +g +n +t +k +l +l +B +d +c +b +b +a +"} +(17,1,1) = {" +a +b +b +c +c +c +d +e +h +o +D +l +D +l +C +d +c +c +b +b +"} +(18,1,1) = {" +a +a +b +c +c +c +d +e +i +n +E +l +z +m +B +d +c +c +c +b +"} +(19,1,1) = {" +a +a +b +c +c +c +d +d +d +d +d +d +d +d +d +d +c +c +c +b +"} +(20,1,1) = {" +a +a +b +b +c +c +c +c +c +c +b +F +b +c +c +c +c +c +c +b +"} +(21,1,1) = {" +a +a +a +b +c +c +c +c +c +c +b +b +b +c +c +c +c +c +b +b +"} +(22,1,1) = {" +a +a +a +b +b +c +c +c +c +b +b +b +b +b +b +c +c +b +b +a +"} +(23,1,1) = {" +a +a +a +a +b +b +b +b +b +b +a +b +b +b +b +b +b +b +a +a +"} +(24,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +b +b +b +b +b +a +a +a +"} +(25,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +b +b +a +a +a +a +"} diff --git a/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm b/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm new file mode 100644 index 0000000000..c64050ce3a --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm @@ -0,0 +1,731 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/turf/open/floor/plating/asteroid, +/area/ruin/powered) +"c" = ( +/turf/closed/mineral/random/high_chance, +/area/ruin/powered) +"d" = ( +/turf/closed/wall/r_wall/rust, +/area/ruin/powered) +"e" = ( +/obj/machinery/mecha_part_fabricator, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"f" = ( +/turf/closed/wall/rust, +/area/ruin/powered) +"g" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/stack/sheet/glass/fifty, +/obj/item/stack/sheet/metal/fifty, +/turf/open/floor/plasteel, +/area/ruin/powered) +"h" = ( +/obj/machinery/mecha_part_fabricator, +/obj/machinery/light{ + dir = 1 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"i" = ( +/obj/structure/table, +/obj/machinery/light{ + dir = 1 + }, +/obj/effect/decal/cleanable/dirt, +/obj/item/stack/sheet/glass/fifty, +/obj/item/stack/sheet/metal/fifty, +/turf/open/floor/plasteel, +/area/ruin/powered) +"j" = ( +/obj/structure/chair/sofa/right, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"k" = ( +/turf/open/floor/plasteel, +/area/ruin/powered) +"l" = ( +/obj/structure/chair/sofa/left, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"m" = ( +/obj/machinery/computer/rdconsole/production{ + dir = 4 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"n" = ( +/obj/effect/decal/cleanable/oil/streak, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"o" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"p" = ( +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"q" = ( +/obj/machinery/light{ + dir = 8 + }, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/aug_manipulator, +/turf/open/floor/plasteel, +/area/ruin/powered) +"r" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/organ/cyberimp/chest/reviver, +/turf/open/floor/plasteel, +/area/ruin/powered) +"s" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/organ/cyberimp/arm/surgery, +/turf/open/floor/plasteel, +/area/ruin/powered) +"t" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/storage/backpack/duffelbag/med/surgery, +/turf/open/floor/plasteel, +/area/ruin/powered) +"u" = ( +/obj/machinery/light{ + dir = 4 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"v" = ( +/obj/machinery/porta_turret/syndicate/energy{ + mode = 1 + }, +/turf/closed/wall/r_wall/rust, +/area/ruin/powered) +"w" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/computer/mech_bay_power_console{ + dir = 4 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"x" = ( +/obj/effect/decal/cleanable/oil, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"y" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1, +/turf/open/floor/plasteel, +/area/ruin/powered) +"z" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/storage/belt/utility/full, +/obj/item/clothing/glasses/welding, +/turf/open/floor/plasteel, +/area/ruin/powered) +"A" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/mmi/posibrain{ + pixel_y = 9 + }, +/obj/item/mmi, +/turf/open/floor/plasteel, +/area/ruin/powered) +"B" = ( +/obj/structure/table/optable, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"C" = ( +/obj/machinery/mech_bay_recharge_port, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"D" = ( +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/mech_bay_recharge_floor, +/area/ruin/powered) +"E" = ( +/obj/machinery/computer/operating{ + dir = 1 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"F" = ( +/obj/structure/table, +/obj/effect/decal/cleanable/dirt, +/obj/item/autosurgeon{ + name = "rusted autosurgeon"; + desc = "A device that automatically inserts an implant or organ into the user without the hassle of extensive surgery. It has a slot to insert an organ of implant. But this rusted version looks like it could only manage one implant...."; + uses = 1 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"G" = ( +/obj/machinery/light, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/airalarm{ + dir = 1; + pixel_y = -22 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"H" = ( +/obj/effect/decal/cleanable/oil, +/obj/machinery/light, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel, +/area/ruin/powered) +"I" = ( +/obj/machinery/door/airlock/external/glass, +/turf/open/floor/plasteel, +/area/ruin/powered) +"J" = ( +/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer1{ + dir = 4 + }, +/turf/open/floor/plating/asteroid, +/area/ruin/powered) +"K" = ( +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 4 + }, +/turf/closed/mineral/random/high_chance, +/area/ruin/powered) +"L" = ( +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 4 + }, +/turf/closed/wall/r_wall/rust, +/area/ruin/powered) +"M" = ( +/obj/structure/mecha_wreckage/ripley, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 4 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"N" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 4 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"O" = ( +/obj/machinery/turretid{ + lethal = 1; + pixel_y = -25; + req_access = null + }, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/cyan/hidden{ + dir = 5 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"P" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/components/unary/vent_pump/on, +/turf/open/floor/plasteel, +/area/ruin/powered) +"Q" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 1 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"R" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/cyan/hidden, +/turf/open/floor/plasteel, +/area/ruin/powered) +"S" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{ + dir = 9 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"T" = ( +/obj/effect/decal/cleanable/dirt, +/obj/machinery/atmospherics/components/unary/tank/air{ + dir = 8 + }, +/turf/open/floor/plasteel, +/area/ruin/powered) +"U" = ( +/obj/machinery/door/airlock/external/glass, +/obj/structure/fans/tiny, +/turf/open/floor/plasteel, +/area/ruin/powered) +"V" = ( +/obj/effect/decal/cleanable/dirt, +/obj/structure/reagent_dispensers/fueltank, +/turf/open/floor/plasteel, +/area/ruin/powered) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +a +a +b +b +b +b +a +a +a +a +a +a +a +a +a +a +"} +(3,1,1) = {" +a +a +a +a +b +b +c +c +c +c +J +b +b +a +a +a +a +a +a +a +"} +(4,1,1) = {" +a +a +a +b +c +c +c +c +c +c +K +c +b +b +b +a +a +a +a +a +"} +(5,1,1) = {" +a +a +b +c +c +d +d +d +d +d +L +d +c +c +b +a +a +a +a +a +"} +(6,1,1) = {" +a +a +b +c +d +d +m +q +w +C +M +d +d +c +b +a +a +a +a +a +"} +(7,1,1) = {" +a +b +b +c +d +e +n +o +x +D +N +f +d +v +b +a +a +a +a +a +"} +(8,1,1) = {" +a +b +c +c +d +g +o +o +y +Q +S +I +k +U +b +a +a +a +a +a +"} +(9,1,1) = {" +a +b +c +c +d +h +p +r +z +o +G +f +f +d +b +a +a +a +a +a +"} +(10,1,1) = {" +a +b +c +c +d +i +p +s +A +o +H +f +f +d +b +a +a +a +a +a +"} +(11,1,1) = {" +a +b +c +c +d +j +p +t +F +o +p +I +k +U +b +a +a +a +a +a +"} +(12,1,1) = {" +a +b +c +c +d +l +p +p +P +R +O +f +d +v +b +b +a +a +a +a +"} +(13,1,1) = {" +a +b +b +c +d +d +V +u +B +E +T +d +d +c +c +b +a +a +a +a +"} +(14,1,1) = {" +a +a +b +c +c +d +d +d +d +d +d +d +c +c +c +b +a +a +a +a +"} +(15,1,1) = {" +a +a +a +b +c +c +c +c +c +c +c +c +c +c +b +b +a +a +a +a +"} +(16,1,1) = {" +a +a +a +b +b +b +b +c +c +c +c +b +b +b +b +a +a +a +a +a +"} +(17,1,1) = {" +a +a +a +a +a +a +b +b +b +b +b +b +a +a +a +a +a +a +a +a +"} +(18,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(19,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(20,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/RandomRuins/SpaceRuins/bigape.dmm b/_maps/RandomRuins/SpaceRuins/bigape.dmm new file mode 100644 index 0000000000..09e85e129d --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/bigape.dmm @@ -0,0 +1,196 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/template_noop) +"c" = ( +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"d" = ( +/obj/structure/fans/tiny/invisible, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"e" = ( +/obj/item/reagent_containers/food/snacks/grown/banana, +/obj/item/reagent_containers/food/snacks/grown/banana, +/obj/item/reagent_containers/food/snacks/grown/banana, +/obj/item/reagent_containers/food/snacks/grown/banana, +/obj/item/reagent_containers/food/snacks/grown/banana, +/obj/structure/fans/tiny/invisible, +/obj/structure/closet/secure_closet/freezer, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"f" = ( +/obj/structure/chair/sofa/left{ + dir = 4 + }, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"g" = ( +/obj/item/flashlight/lamp/bananalamp{ + brightness_on = 10 + }, +/obj/structure/table/wood, +/obj/structure/fans/tiny/invisible, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"h" = ( +/obj/structure/table/wood, +/obj/machinery/computer/security/wooden_tv, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"i" = ( +/obj/structure/chair/sofa/right{ + dir = 4 + }, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"j" = ( +/obj/structure/sink/puddle, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"k" = ( +/obj/structure/chair/sofa{ + dir = 4 + }, +/mob/living/simple_animal/hostile/gorilla{ + AIStatus = null; + desc = "There is no need to be upset."; + dir = 4; + name = "Familiar Gorilla" + }, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"l" = ( +/obj/effect/overlay/palmtree_r, +/obj/structure/fans/tiny/invisible, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) +"m" = ( +/obj/item/grown/bananapeel, +/turf/open/floor/plating/beach/sand, +/area/ruin/powered) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +b +a +"} +(2,1,1) = {" +a +a +b +b +b +b +b +b +a +a +"} +(3,1,1) = {" +a +a +b +b +g +d +d +b +b +a +"} +(4,1,1) = {" +a +a +b +d +f +k +i +d +d +b +"} +(5,1,1) = {" +a +a +b +e +c +c +m +j +d +b +"} +(6,1,1) = {" +a +a +b +d +c +h +c +l +d +b +"} +(7,1,1) = {" +a +b +b +b +d +d +d +b +b +a +"} +(8,1,1) = {" +a +b +a +a +b +b +b +b +b +b +"} +(9,1,1) = {" +a +b +a +a +a +b +a +a +a +b +"} +(10,1,1) = {" +a +a +a +a +a +b +a +a +a +a +"} diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm index ef36495c58..e820b06f61 100644 --- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm @@ -2183,9 +2183,7 @@ /obj/effect/turf_decal/tile/purple{ dir = 8 }, -/turf/open/floor/plasteel/white{ - icon_state = "whitepurple" - }, +/turf/open/floor/plasteel/white, /area/ruin/space/has_grav/ancientstation/rnd) "fU" = ( /obj/effect/decal/cleanable/dirt, diff --git a/_maps/RandomRuins/SpaceRuins/originalcontent.dmm b/_maps/RandomRuins/SpaceRuins/originalcontent.dmm index 624aa03d7c..2945a06b25 100644 --- a/_maps/RandomRuins/SpaceRuins/originalcontent.dmm +++ b/_maps/RandomRuins/SpaceRuins/originalcontent.dmm @@ -742,6 +742,7 @@ /turf/open/indestructible/paper, /area/ruin/powered) "cc" = ( +/obj/item/book/granter/action/origami, /mob/living/simple_animal/hostile/boss/paper_wizard, /turf/open/indestructible/paper, /area/ruin/powered) @@ -912,6 +913,10 @@ }, /turf/open/indestructible/paper, /area/ruin/powered) +"Ns" = ( +/obj/item/paper/secretrecipe, +/turf/open/indestructible/paper, +/area/ruin/powered) (1,1,1) = {" aa @@ -2246,7 +2251,7 @@ ap az af al -aA +Ns bW ca af diff --git a/_maps/RandomRuins/SpaceRuins/spacehermit.dmm b/_maps/RandomRuins/SpaceRuins/spacehermit.dmm new file mode 100644 index 0000000000..341dcf7b99 --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/spacehermit.dmm @@ -0,0 +1,2941 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aa" = ( +/turf/template_noop, +/area/template_noop) +"ab" = ( +/turf/closed/mineral/random/low_chance, +/area/ruin/unpowered) +"ac" = ( +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"ad" = ( +/obj/machinery/hydroponics/soil, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"ae" = ( +/turf/closed/wall/mineral/titanium, +/area/ruin/powered) +"af" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"ag" = ( +/obj/structure/shuttle/engine/propulsion/right{ + dir = 4 + }, +/turf/closed/wall/mineral/titanium, +/area/ruin/powered) +"ah" = ( +/obj/structure/table/wood, +/obj/item/shovel, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"ai" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/template_noop) +"aj" = ( +/obj/machinery/computer/cryopod, +/turf/closed/wall/mineral/titanium, +/area/ruin/powered) +"ak" = ( +/obj/structure/fluff/empty_cryostasis_sleeper, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"al" = ( +/obj/machinery/status_display/shuttle, +/turf/closed/wall/mineral/titanium, +/area/ruin/powered) +"am" = ( +/obj/item/circuitboard/computer/rdconsole, +/obj/item/circuitboard/machine/protolathe/department/science, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"an" = ( +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"ao" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"ap" = ( +/obj/machinery/light{ + dir = 1 + }, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"aq" = ( +/obj/machinery/computer{ + desc = "A computer long since rendered non-functional due to lack of maintenance. Spitting out error messages."; + dir = 4; + name = "Broken Computer" + }, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"ar" = ( +/obj/machinery/door/airlock/titanium{ + name = "Escape Pod Airlock" + }, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"as" = ( +/obj/machinery/light, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"at" = ( +/obj/structure/shuttle/engine/propulsion/left{ + dir = 4 + }, +/turf/closed/wall/mineral/titanium, +/area/ruin/powered) +"au" = ( +/obj/item/seeds/tower, +/obj/item/seeds/tower, +/obj/item/seeds/tower, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"av" = ( +/obj/structure/table/wood, +/obj/item/paper/crumpled{ + info = "

So this is it, I guess.. Always thought I'd go out doing something stupid, but.. not like this.
Should anyone find this note, tell Jeremy Clarke he can kiss my ass. Launching the pod unprepared like that..
Well. Now that I'm keeling over here, I guess I should write how I came to be the last one standing here.
Four of us took this pod.. only three of us woke up though.. fourth pod is locked from the inside, we couldn't figure out how to get it open.
Me and the clown set up a farm s'we can survive at least a while.. though, he didn't seem to understand that man cannot live on banana alone.
Had a bunch of circuits on him for some reason when he eventually passed, whispered to me something about a chem dispenser.. I.. don't know what he meant by that. I was never good with machinary. Maybe he wanted space lube?
The assistant that we gave the space suit to go out and find help never came back.. I'm betting he found salvation and left us behind.. never can trust those grubby greytiders." + }, +/obj/item/pen, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aw" = ( +/obj/item/stack/sheet/mineral/wood, +/obj/item/stack/sheet/mineral/wood, +/obj/item/stack/sheet/mineral/wood, +/obj/item/stack/sheet/mineral/wood, +/obj/item/stack/sheet/mineral/wood, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"ax" = ( +/obj/item/twohanded/spear, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"ay" = ( +/obj/item/grown/log, +/obj/item/grown/log, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"az" = ( +/obj/structure/table/wood, +/obj/item/storage/bag/plants/portaseeder, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aA" = ( +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered) +"aB" = ( +/obj/item/seeds/banana, +/obj/item/seeds/banana, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aC" = ( +/obj/effect/mob_spawn/human/clown/corpse, +/obj/structure/fans/tiny/invisible, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aD" = ( +/obj/item/mining_scanner, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aE" = ( +/obj/machinery/status_display/shuttle, +/turf/closed/wall/mineral/titanium, +/area/ruin/unpowered) +"aF" = ( +/obj/item/pickaxe/emergency, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aG" = ( +/obj/structure/sink/puddle, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aH" = ( +/obj/structure/table/wood, +/obj/item/storage/firstaid/regular, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aI" = ( +/obj/effect/mob_spawn/human/corpse/assistant, +/turf/template_noop, +/area/template_noop) +"aJ" = ( +/obj/structure/table/wood, +/obj/item/storage/bag/ore, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aK" = ( +/obj/structure/reagent_dispensers/fueltank, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aL" = ( +/obj/structure/table/wood, +/obj/item/storage/toolbox/mechanical, +/obj/item/clothing/head/welding, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aM" = ( +/mob/living/simple_animal/hostile/carp, +/turf/template_noop, +/area/template_noop) +"aN" = ( +/obj/structure/mineral_door/sandstone, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aO" = ( +/mob/living/simple_animal/hostile/carp, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered) +"aP" = ( +/obj/item/stack/ore/gold, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aQ" = ( +/obj/item/stack/ore/gold, +/obj/item/stack/ore/gold, +/obj/item/stack/ore/gold, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aR" = ( +/obj/item/stack/ore/iron, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aS" = ( +/turf/closed/wall/mineral/iron, +/area/ruin/unpowered) +"aT" = ( +/obj/item/stack/ore/iron, +/obj/item/stack/ore/iron, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aU" = ( +/obj/item/flashlight/lamp, +/obj/structure/table/wood, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"aV" = ( +/obj/item/clothing/suit/space/orange, +/turf/template_noop, +/area/template_noop) +"aW" = ( +/obj/item/clothing/head/helmet/space/orange, +/turf/template_noop, +/area/template_noop) +"aX" = ( +/mob/living/simple_animal/hostile/carp/megacarp, +/turf/template_noop, +/area/template_noop) +"aY" = ( +/obj/effect/mob_spawn/human/hermit{ + flavour_text = "You've been late to awaken from your cryo slumber. Blasted machine, you set it to 10 days not 10 weeks! Where have the others gone while we were out? Did they manage to survive? These thoughts are dispelled by yet another recollection of how you got here... "; + job_description = "Space Hermit" + }, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"aZ" = ( +/turf/closed/wall/mineral/titanium, +/area/ruin/unpowered) +"ba" = ( +/obj/effect/spawner/structure/window/shuttle, +/turf/open/floor/mineral/titanium, +/area/ruin/unpowered) +"bb" = ( +/obj/structure/shuttle/engine/propulsion/left{ + dir = 4 + }, +/turf/closed/wall/mineral/titanium, +/area/ruin/unpowered) +"bc" = ( +/obj/item/circuitboard/machine/circuit_imprinter, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bd" = ( +/obj/item/grown/bananapeel, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"be" = ( +/obj/effect/mob_spawn/human/corpse/cargo_tech, +/obj/structure/fans/tiny/invisible, +/obj/effect/decal/cleanable/vomit, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bf" = ( +/obj/item/clothing/glasses/meson, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bg" = ( +/obj/item/stock_parts/matter_bin, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bh" = ( +/obj/item/circuitboard/machine/autolathe, +/turf/open/floor/mineral/titanium, +/area/ruin/powered) +"bi" = ( +/obj/item/stock_parts/manipulator, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bj" = ( +/obj/item/holosign_creator/atmos, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bk" = ( +/obj/structure/holosign/barrier/atmos, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bl" = ( +/obj/machinery/power/floodlight, +/obj/structure/cable{ + icon_state = "0-2" + }, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bm" = ( +/obj/structure/cable{ + icon_state = "1-4" + }, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bn" = ( +/obj/structure/cable{ + icon_state = "2-8" + }, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bo" = ( +/obj/structure/cable{ + icon_state = "1-2" + }, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bp" = ( +/obj/item/stack/ore/iron, +/obj/item/stack/ore/iron, +/obj/item/stack/ore/iron, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bq" = ( +/obj/structure/cable, +/obj/machinery/power/port_gen/pacman{ + active = 1; + anchored = 1; + sheets = 10 + }, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"br" = ( +/obj/item/stack/ore/iron, +/obj/item/stack/sheet/mineral/plasma, +/obj/item/stack/sheet/mineral/plasma, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) +"bs" = ( +/obj/item/flashlight/lamp/bananalamp, +/turf/open/floor/plating/asteroid, +/area/ruin/unpowered) + +(1,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +ac +aO +aA +aA +aA +aA +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} +(2,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +aA +aA +aA +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +aA +aA +aA +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +"} +(3,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aA +aa +aa +aa +aa +aW +aa +aM +aa +"} +(4,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +aV +aI +aX +aa +aa +"} +(5,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aA +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +aa +aa +aa +aa +"} +(6,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aM +aa +aa +aa +"} +(7,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aM +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +aa +aa +"} +(8,1,1) = {" +aa +aa +aa +aa +aa +aa +ab +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ae +af +ae +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +aa +"} +(9,1,1) = {" +aa +aa +aa +aa +aA +ab +ab +aA +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +af +aq +af +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +"} +(10,1,1) = {" +aa +aa +aa +aa +ab +ab +ab +ab +aA +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ae +ae +ao +ae +ae +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +"} +(11,1,1) = {" +aa +aa +aa +aA +ab +ab +ab +ab +aA +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +af +an +an +an +af +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(12,1,1) = {" +aa +aa +aa +aA +ab +ab +ab +ab +aA +aa +aa +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ae +ae +bh +an +an +ae +aZ +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(13,1,1) = {" +aa +aa +aa +aA +ab +ab +ab +ab +aA +aa +aa +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +af +aY +ao +ao +ao +ak +ba +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(14,1,1) = {" +aa +aa +aa +aa +ab +ab +ab +ab +aA +aa +aa +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +al +aj +ap +an +as +aj +aE +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(15,1,1) = {" +aa +aa +aa +aa +aA +ab +ab +aA +aa +aa +aa +aA +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +af +ak +ao +ao +ao +ak +ba +ac +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(16,1,1) = {" +aa +aa +aa +aa +aa +aa +ab +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ah +az +ab +ab +ab +ab +ab +ab +ab +ab +aR +ae +ae +an +an +an +ae +aZ +ac +ab +ab +ab +ab +ab +ab +ab +aA +aM +"} +(17,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ab +ab +ab +ab +ab +ab +ab +ab +aR +ag +ag +af +ar +af +at +bb +ac +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(18,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ad +ac +ac +ac +ac +ab +aH +aJ +aL +ab +ab +aT +ac +ac +ac +ac +ac +ac +ac +aR +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(19,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ad +au +ac +aB +am +ac +ac +ac +ac +ab +ab +ac +ac +ac +ac +ac +ac +ac +ac +bg +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(20,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ad +aw +bs +aC +ac +ac +ac +ac +ac +ab +ab +ab +ac +ac +ac +ac +ac +ac +ac +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(21,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aM +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ad +ax +ac +aD +aF +ac +ac +ac +ab +ab +ab +aU +bd +ac +ac +bl +bm +ac +ac +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(22,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ad +ay +ac +ac +ac +aG +ac +ac +ab +ab +ab +av +be +ac +ac +ac +bn +bo +bo +bq +ab +ab +ab +ab +ab +ab +ab +aA +aa +"} +(23,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ac +ac +ac +ac +ac +ab +ab +ab +bc +bf +ac +ac +ac +ac +ac +ac +br +ab +ab +ab +ab +ab +ab +aA +aa +aa +"} +(24,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ab +ac +ac +ac +ac +ac +ab +ab +ac +ac +ac +ac +ac +ac +ac +ac +ac +ab +ab +ab +ab +ab +ab +aA +aa +aa +"} +(25,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ac +ac +ac +aN +ac +ac +ac +ac +aR +ac +ac +ac +ac +ab +ab +ab +ab +ab +ab +aA +aa +aa +aa +"} +(26,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ac +ab +ab +ac +ac +ac +ac +ac +ac +ac +ac +ac +ac +ac +ab +ab +ab +ab +aa +aa +aa +aa +"} +(27,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aK +ab +ab +ac +ac +ac +ac +ac +ac +ac +bp +ac +ac +aR +ab +ab +ab +aA +aa +aa +aa +aM +"} +(28,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aP +ac +ac +ac +ac +ac +ac +ac +ac +ac +aR +ab +ab +ab +aA +aa +aa +aa +aa +"} +(29,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aQ +aP +ac +ac +aR +ac +ac +ac +ac +ab +ac +ab +ab +ab +aA +aa +aa +aa +aa +"} +(30,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ac +ac +aP +ac +bg +ab +ab +ab +ab +ab +aa +aa +aa +aa +aa +"} +(31,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +ac +ac +ac +ac +aS +ab +ab +ab +ab +aA +aa +aa +aa +ab +aA +"} +(32,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +bg +ac +ac +ac +ac +ac +aS +ab +ab +ab +ab +aA +aa +aa +aO +ab +ab +"} +(33,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ac +ac +bj +ac +ac +ac +aS +ab +ab +ab +ab +aA +aa +aA +ab +ab +ab +"} +(34,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aS +bi +ac +ac +ac +aS +aS +ab +ab +ab +ab +aA +aa +aA +ab +ab +aA +"} +(35,1,1) = {" +aa +aa +aa +aa +aa +aa +aA +aA +aa +aa +aa +aa +aM +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aS +ac +ac +ac +ac +aS +aS +ab +ab +ab +aA +aa +aa +aA +ab +ab +ab +"} +(36,1,1) = {" +aa +aa +aa +aa +aa +aa +ab +ab +aA +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aS +aS +aS +bk +bk +aS +aS +aS +aS +ab +ab +aA +aa +aa +aa +ab +ab +ab +"} +(37,1,1) = {" +aa +aa +aa +aa +aa +ab +ab +ab +ab +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aA +aA +aS +aS +aS +bk +aS +aS +aS +aA +aA +ab +aA +aa +aa +aa +aa +aA +aA +"} +(38,1,1) = {" +aa +aa +aa +aa +aa +ab +ab +ab +ab +ab +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aA +ai +ai +ai +ai +ai +ai +ai +ai +aA +aA +ab +aA +aa +aa +aa +aa +aa +aa +"} +(39,1,1) = {" +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aA +aa +aa +aa +ai +ai +ai +aa +ai +aa +aa +aA +ab +aA +aa +aa +aa +aa +aa +aa +"} +(40,1,1) = {" +aa +aa +aa +aa +aa +aa +aA +ab +ab +aA +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aa +aa +aa +aa +aa +aa +ai +aa +aa +ab +ab +aA +aa +aa +aa +aa +aa +aa +"} +(41,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aa +aa +aa +aa +aa +aa +aa +aa +aa +ab +ab +aA +aa +aa +aa +aa +aa +aa +"} +(42,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aA +aA +aA +aA +aA +aA +aA +ab +ab +ab +ab +ab +aa +aa +aa +aa +aa +aa +aa +aa +ab +aa +aa +aa +aa +aM +aa +aa +aa +"} +(43,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aA +aA +aA +ab +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} +(44,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ac +aa +aa +aa +"} +(45,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aM +aa +aa +aa +aa +ac +ab +ac +aa +aa +"} +(46,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aM +ab +ab +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ab +ab +ab +aa +aa +"} +(47,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ab +ab +ab +ab +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ab +ab +ab +aa +aa +"} +(48,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +ab +ab +ab +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +ab +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ac +ab +ac +aa +aa +"} +(49,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aA +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aA +aa +aa +aa +aa +aM +aa +aa +aa +aa +aa +aa +aa +ac +aa +aa +aa +aa +"} +(50,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +ab +aa +aa +aa +aa +"} diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index dcd2c47cb2..60c91e51bb 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -515,10 +515,13 @@ /turf/closed/wall, /area/security/main) "abq" = ( -/turf/closed/wall, +/turf/closed/wall/r_wall, /area/crew_quarters/heads/hos) "abr" = ( /obj/effect/spawner/structure/window/reinforced, +/obj/machinery/door/poddoor/preopen{ + id = "hos" + }, /turf/open/floor/plating, /area/crew_quarters/heads/hos) "abs" = ( @@ -846,8 +849,13 @@ }, /obj/structure/table/wood, /obj/item/reagent_containers/food/drinks/bottle/vodka/badminka, -/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass, -/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass, +/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass{ + pixel_x = -5; + pixel_y = 5 + }, +/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass{ + pixel_x = -5 + }, /turf/open/floor/carpet, /area/crew_quarters/heads/hos) "abX" = ( @@ -1449,6 +1457,9 @@ "adm" = ( /obj/structure/disposalpipe/segment, /obj/effect/spawner/structure/window/reinforced, +/obj/machinery/door/poddoor/preopen{ + id = "hos" + }, /turf/open/floor/plating, /area/crew_quarters/heads/hos) "adn" = ( @@ -1673,6 +1684,12 @@ "adM" = ( /obj/structure/cable{ icon_state = "4-8" + }, +/obj/machinery/button/door{ + id = "hos"; + name = "HoS Office Shutters"; + pixel_y = -25; + }, /turf/open/floor/carpet, /area/crew_quarters/heads/hos) @@ -2053,6 +2070,9 @@ "aex" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/effect/spawner/structure/window/reinforced, +/obj/machinery/door/poddoor/preopen{ + id = "hos" + }, /turf/open/floor/plating, /area/crew_quarters/heads/hos) "aey" = ( @@ -11691,7 +11711,7 @@ /area/maintenance/port/fore) "aAW" = ( /obj/structure/rack, -/obj/item/tank/jetpack/carbondioxide, +/obj/item/tank/jetpack/carbondioxide/eva, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, @@ -11815,7 +11835,7 @@ /obj/machinery/light{ dir = 8 }, -/obj/item/tank/jetpack/carbondioxide, +/obj/item/tank/jetpack/carbondioxide/eva, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, @@ -56882,12 +56902,6 @@ /obj/item/pen, /turf/open/floor/plasteel/white, /area/science/circuit) -"ium" = ( -/mob/living/simple_animal/bot/cleanbot{ - name = "C.L.E.A.N." - }, -/turf/open/floor/plasteel/white, -/area/medical/medbay/central) "izv" = ( /obj/machinery/vending/clothing, /obj/machinery/light/small{ @@ -57122,6 +57136,12 @@ }, /turf/open/floor/plating, /area/construction/mining/aux_base) +"lKX" = ( +/mob/living/simple_animal/bot/cleanbot{ + name = "C.L.E.A.N." + }, +/turf/open/floor/plasteel/white, +/area/medical/medbay/central) "lMg" = ( /obj/effect/turf_decal/stripes/line{ dir = 9 @@ -88468,7 +88488,7 @@ aaa aaf aaf aaa -abp +adR abP aco acO @@ -88982,7 +89002,7 @@ aaa aaa aaf aaa -abp +adR abO acq acq @@ -89496,15 +89516,15 @@ aaa aaa aaa aaf -abp +adR abR abP abP abP abP -abp -abp -abp +adR +adR +adR agA afU ahF @@ -94188,7 +94208,7 @@ blm bmL boi bpw -ium +lKX bsx btX bvj diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index c8e551b9fe..402633f42b 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -79373,12 +79373,12 @@ }, /obj/structure/window/reinforced, /obj/structure/rack, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = 4; pixel_y = -1 }, -/obj/item/tank/jetpack/carbondioxide, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva, +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = -4; pixel_y = 1 }, @@ -80186,11 +80186,11 @@ /area/engine/storage) "cEi" = ( /obj/structure/table/reinforced, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = 3; pixel_y = 3 }, -/obj/item/tank/jetpack/carbondioxide, +/obj/item/tank/jetpack/carbondioxide/eva, /obj/machinery/power/apc{ dir = 4; name = "Engineering Storage APC"; diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 78ffa3881c..1bcb5c20a8 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -47699,12 +47699,12 @@ }, /obj/structure/window/reinforced, /obj/structure/rack, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = 4; pixel_y = -1 }, -/obj/item/tank/jetpack/carbondioxide, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva, +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = -4; pixel_y = 1 }, diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index f9792a736e..7935a2a3f9 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -16464,8 +16464,8 @@ /area/storage/eva) "aNt" = ( /obj/structure/rack, -/obj/item/tank/jetpack/carbondioxide, -/obj/item/tank/jetpack/carbondioxide{ +/obj/item/tank/jetpack/carbondioxide/eva, +/obj/item/tank/jetpack/carbondioxide/eva{ pixel_x = -4; pixel_y = 1 }, @@ -35713,13 +35713,13 @@ /obj/structure/extinguisher_cabinet{ pixel_x = -26 }, -/obj/machinery/rnd/production/protolathe/department/medical, /obj/effect/turf_decal/tile/blue{ dir = 1 }, /obj/effect/turf_decal/tile/blue{ dir = 4 }, +/obj/machinery/rnd/production/techfab/department/medical, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "bEw" = ( diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index b5ba44d956..928837979c 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -1,8 +1,5 @@ //LISTMOS //indices of values in gas lists. -#define MOLES 1 -#define ARCHIVE 2 -#define GAS_META 3 #define META_GAS_SPECIFIC_HEAT 1 #define META_GAS_NAME 2 #define META_GAS_MOLES_VISIBLE 3 @@ -242,20 +239,25 @@ //HELPERS #define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity()) - -#define ADD_GAS(gas_id, out_list)\ - var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id]; out_list[gas_id] = tmp_gaslist.Copy(); - -#define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) }; - +#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that + once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */ //prefer this to gas_mixture/total_moles in performance critical areas #define TOTAL_MOLES(cached_gases, out_var)\ out_var = 0;\ for(var/total_moles_id in cached_gases){\ - out_var += cached_gases[total_moles_id][MOLES];\ + out_var += cached_gases[total_moles_id];\ } +//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance. +#define GAS_GARBAGE_COLLECT(GASGASGAS)\ + var/list/CACHE_GAS = GASGASGAS;\ + for(var/id in CACHE_GAS){\ + if(QUANTIZE(CACHE_GAS[id]) <= 0)\ + CACHE_GAS -= id;\ + } + +#define ARCHIVE_TEMPERATURE(gas) gas.temperature_archived = gas.temperature GLOBAL_LIST_INIT(pipe_paint_colors, list( "amethyst" = rgb(130,43,255), //supplymain diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 3841a086e9..3b67625191 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -136,6 +136,7 @@ #define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params) #define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target) #define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_key() +#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): () // /mob/living signals #define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index 9f3d38efa1..ee51fb6909 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -102,7 +102,8 @@ #define CAT_SANDWICH "Sandwiches" #define CAT_SOUP "Soups" #define CAT_SPAGHETTI "Spaghettis" -#define CAT_SUSHI "Fish" +#define CAT_FISH "Fish" +#define CAT_ICE "Frozen" #define RCD_FLOORWALL 1 #define RCD_AIRLOCK 2 diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index ad9aef5a8b..60148e0388 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -56,9 +56,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define FLYING (1<<1) #define VENTCRAWLING (1<<2) -// Flags for reagents -#define REAGENT_NOREACT (1<<0) - //Fire and Acid stuff, for resistance_flags #define LAVA_PROOF (1<<0) #define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat) diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index 2c7a66ce40..15c7af5749 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -16,3 +16,4 @@ #define DRINK_GOOD 2 #define DRINK_VERYGOOD 3 #define DRINK_FANTASTIC 4 +#define FOOD_AMAZING 5 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index be58b64f41..28e4e8f5ea 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -114,8 +114,9 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define TRANSITIONEDGE 7 //Distance from edge to move to another z-level -#define BE_CLOSE 1 //in the case of a silicon, to select if they need to be next to the atom -#define NO_DEXTERY 1 //if other mobs (monkeys, aliens, etc) can use this +#define BE_CLOSE TRUE //in the case of a silicon, to select if they need to be next to the atom +#define NO_DEXTERY TRUE //if other mobs (monkeys, aliens, etc) can use this +#define NO_TK TRUE //used by canUseTopic() //singularity defines @@ -218,6 +219,9 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) //Gets the turf this atom inhabits #define get_turf(A) (get_step(A, 0)) +//Same as above except gets the area instead +#define get_area(A) (isarea(A) ? A : get_step(A, 0)?.loc) + //Ghost orbit types: #define GHOST_ORBIT_CIRCLE "circle" #define GHOST_ORBIT_TRIANGLE "triangle" @@ -262,6 +266,15 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE)) +//pda icon reskins +#define PDA_SKIN_CLASSIC "Classic" +#define PDA_SKIN_ALT "Holographic" +#define PDA_SKIN_RUGGED "Rugged" +#define PDA_SKIN_MODERN "Modern" + +GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_SKIN_ALT = 'icons/obj/pda_alt.dmi', + PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi')) + //Color Defines #define OOC_COLOR "#002eb8" #define AOOC_COLOR "#b8002e" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 4b42595b48..1d1dda6d99 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -54,6 +54,10 @@ #define BODYPART_ORGANIC 1 #define BODYPART_ROBOTIC 2 +#define BODYPART_NOT_DISABLED 0 +#define BODYPART_DISABLED_DAMAGE 1 +#define BODYPART_DISABLED_PARALYSIS 2 + #define DEFAULT_BODYPART_ICON_ORGANIC 'icons/mob/human_parts_greyscale.dmi' #define DEFAULT_BODYPART_ICON_ROBOTIC 'icons/mob/augmentation/augments.dmi' diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index b72a14468f..1c36120a0c 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -23,6 +23,11 @@ #define STIMULUM_ABSOLUTE_DROP 0.00000335 #define REACTION_OPPRESSION_THRESHOLD 5 #define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense. +//Research point amounts +#define NOBLIUM_RESEARCH_AMOUNT 1000 +#define BZ_RESEARCH_AMOUNT 150 +#define MIASMA_RESEARCH_AMOUNT 160 +#define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties #define FUSION_ENERGY_THRESHOLD 3e9 //Amount of energy it takes to start a fusion reaction #define FUSION_TEMPERATURE_THRESHOLD 1000 //Temperature required to start a fusion reaction diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index f8f59a367f..c3682d905d 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -2,7 +2,7 @@ #define LIQUID 2 #define GAS 3 -// container_type defines +// reagents_flags defines #define INJECTABLE (1<<0) // Makes it possible to add reagents through droppers and syringes. #define DRAWABLE (1<<1) // Makes it possible to remove reagents through syringes. @@ -11,6 +11,7 @@ #define TRANSPARENT (1<<4) // Used on containers which you want to be able to see the reagents off. #define AMOUNT_VISIBLE (1<<5) // For non-transparent containers that still have the general amount of reagents in them visible. +#define NO_REACT (1<<6) // Applied to a reagent holder, the contents will not react with each other. // Is an open container for all intents and purposes. #define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT) diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index f54a0542f4..ecd1ef1e21 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -102,7 +102,6 @@ #define FIRE_PRIORITY_SPACEDRIFT 30 #define FIRE_PRIORITY_FIELDS 30 #define FIRE_PRIOTITY_SMOOTHING 35 -#define FIRE_PRIORITY_ORBIT 35 #define FIRE_PRIORITY_NETWORKS 40 #define FIRE_PRIORITY_OBJ 40 #define FIRE_PRIORITY_ACID 40 diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 5c2deae875..d490a76611 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -1,3 +1,61 @@ +// trait accessor defines +#define ADD_TRAIT(target, trait, source) \ + do { \ + var/list/_L; \ + if (!target.status_traits) { \ + target.status_traits = list(); \ + _L = target.status_traits; \ + _L[trait] = list(source); \ + } else { \ + _L = target.status_traits; \ + if (_L[trait]) { \ + _L[trait] |= list(source); \ + } else { \ + _L[trait] = list(source); \ + } \ + } \ + } while (0) +#define REMOVE_TRAIT(target, trait, sources) \ + do { \ + var/list/_L = target.status_traits; \ + var/list/_S; \ + if (sources && !islist(sources)) { \ + _S = list(sources); \ + } else { \ + _S = sources\ + }; \ + if (_L && _L[trait]) { \ + for (var/_T in _L[trait]) { \ + if ((!_S && (_T != ROUNDSTART_TRAIT)) || (_T in _S)) { \ + _L[trait] -= _T \ + } \ + };\ + if (!length(_L[trait])) { \ + _L -= trait \ + }; \ + if (!length(_L)) { \ + target.status_traits = null \ + }; \ + } \ + } while (0) +#define REMOVE_TRAITS_NOT_IN(target, sources) \ + do { \ + var/list/_L = target.status_traits; \ + var/list/_S = sources; \ + if (_L) { \ + for (var/_T in _L) { \ + _L[_T] &= _S;\ + if (!length(_L[_T])) { \ + _L -= _T } \ + };\ + if (!length(_L)) { \ + target.status_traits = null\ + };\ + }\ + } while (0) +#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE) +#define HAS_TRAIT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (source in target.status_traits[trait]) : FALSE) : FALSE) + //mob traits #define TRAIT_BLIND "blind" #define TRAIT_MUTE "mute" @@ -50,7 +108,15 @@ #define TRAIT_NOHARDCRIT "nohardcrit" #define TRAIT_NOSOFTCRIT "nosoftcrit" #define TRAIT_MINDSHIELD "mindshield" +#define TRAIT_PARALYSIS_L_ARM "para-l-arm" //These are used for brain-based paralysis, where replacing the limb won't fix it +#define TRAIT_PARALYSIS_R_ARM "para-r-arm" +#define TRAIT_PARALYSIS_L_LEG "para-l-leg" +#define TRAIT_PARALYSIS_R_LEG "para-r-leg" +#define TRAIT_STRONG_GRABBER "strong_grabber" +#define TRAIT_CALCIUM_HEALER "calcium_healer" + //non-mob traits +#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it #define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance" #define TRAIT_AGEUSIA "ageusia" @@ -72,7 +138,11 @@ #define TRAIT_CROCRIN_IMMUNE "crocin_immune" #define TRAIT_NYMPHO "nymphomania" #define TRAIT_MASO "masochism" +#define TRAIT_PARA "paraplegic" +#define TRAIT_EMPATH "empath" +#define TRAIT_FRIENDLY "friendly" #define TRAIT_ASSBLASTUSA "assblastusa" +#define TRAIT_CULT_EYES "cult_eyes" // common trait sources #define TRAIT_GENERIC "generic" @@ -95,4 +165,3 @@ #define STASIS_MUTE "stasis" #define GENETICS_SPELL "genetics_spell" #define EYES_COVERED "eyes_covered" -#define CULT_EYES "cult_eyes" diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index f05bf6f3e1..1f5b82f7bf 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -86,6 +86,8 @@ newA.contents += thing thing.change_area(old_area, newA) + newA.reg_in_areas_in_z() + var/list/firedoors = oldA.firedoors for(var/door in firedoors) var/obj/machinery/door/firedoor/FD = door diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 133d7eefc1..8f206f6765 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -8,12 +8,6 @@ #define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL)) #define CULT_POLL_WAIT 2400 -/proc/get_area(atom/A) - if(isarea(A)) - return A - var/turf/T = get_turf(A) - return T ? T.loc : null - /proc/get_area_name(atom/X, format_text = FALSE) var/area/A = isarea(X) ? X : get_area(X) if(!A) diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 8b77b170e0..d96ec76a7c 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -2,7 +2,7 @@ . = new_angle - old_angle Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT -/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3) +/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3, parallel = TRUE) if(!segments) return var/segment = 360/segments @@ -18,7 +18,11 @@ speed /= segments - animate(src, transform = matrices[1], time = speed, loops) + if(parallel) + animate(src, transform = matrices[1], time = speed, loops , flags = ANIMATION_PARALLEL) + else + animate(src, transform = matrices[1], time = speed, loops) + for(var/i in 2 to segments) //2 because 1 is covered above animate(transform = matrices[i], time = speed) //doesn't have an object argument because this is "Stacking" with the animate call above diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 51c814a5f9..9eb5400c52 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -170,7 +170,7 @@ "balls_amount" = 2, "balls_sack_size" = BALLS_SACK_SIZE_DEF, "balls_size" = BALLS_SIZE_DEF, - "balls_shape" = "Pair", + "balls_shape" = "Single", "balls_cum_rate" = CUM_RATE, "balls_cum_mult" = CUM_RATE_MULT, "balls_efficiency" = CUM_EFFICIENCY, diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm new file mode 100644 index 0000000000..f1208abdd3 --- /dev/null +++ b/code/__HELPERS/reagents.dm @@ -0,0 +1,74 @@ +/proc/chem_recipes_do_conflict(datum/chemical_reaction/r1, datum/chemical_reaction/r2) + //do the non-list tests first, because they are cheaper + if(r1.required_container != r2.required_container) + return FALSE + if(r1.is_cold_recipe == r2.is_cold_recipe) + if(r1.required_temp != r2.required_temp) + //one reaction requires a more extreme temperature than the other, so there is no conflict + return FALSE + else + var/datum/chemical_reaction/cold_one = r1.is_cold_recipe ? r1 : r2 + var/datum/chemical_reaction/warm_one = r1.is_cold_recipe ? r2 : r1 + if(cold_one.required_temp < warm_one.required_temp) + //the range of temperatures does not overlap, so there is no conflict + return FALSE + + //find the reactions with the shorter and longer required_reagents list + var/datum/chemical_reaction/long_req + var/datum/chemical_reaction/short_req + if(r1.required_reagents.len > r2.required_reagents.len) + long_req = r1 + short_req = r2 + else if(r1.required_reagents.len < r2.required_reagents.len) + long_req = r2 + short_req = r1 + else + //if they are the same length, sort instead by the length of the catalyst list + //this is important if the required_reagents lists are the same + if(r1.required_catalysts.len > r2.required_catalysts.len) + long_req = r1 + short_req = r2 + else + long_req = r2 + short_req = r1 + + + //check if the shorter reaction list is a subset of the longer one + var/list/overlap = r1.required_reagents & r2.required_reagents + if(overlap.len != short_req.required_reagents.len) + //there is at least one reagent in the short list that is not in the long list, so there is no conflict + return FALSE + + //check to see if the shorter reaction's catalyst list is also a subset of the longer reaction's catalyst list + //if the longer reaction's catalyst list is a subset of the shorter ones, that is fine + //if the reaction lists are the same, the short reaction will have the shorter required_catalysts list, so it will register as a conflict + var/list/short_minus_long_catalysts = short_req.required_catalysts - long_req.required_catalysts + if(short_minus_long_catalysts.len) + //there is at least one unique catalyst for the short reaction, so there is no conflict + return FALSE + + //if we got this far, the longer reaction will be impossible to create if the shorter one is earlier in GLOB.chemical_reactions_list, and will require the reagents to be added in a particular order otherwise + return TRUE + +/proc/get_chemical_reaction(id) + if(!GLOB.chemical_reactions_list) + return + for(var/reagent in GLOB.chemical_reactions_list) + for(var/datum/chemical_reaction/R in GLOB.chemical_reactions_list[reagent]) + if(R.id == id) + return R + +/proc/remove_chemical_reaction(datum/chemical_reaction/R) + if(!GLOB.chemical_reactions_list || !R) + return + for(var/rid in R.required_reagents) + GLOB.chemical_reactions_list[rid] -= R + +//see build_chemical_reactions_list in holder.dm for explanations +/proc/add_chemical_reaction(datum/chemical_reaction/R) + if(!GLOB.chemical_reactions_list || !R.id || !R.required_reagents || !R.required_reagents.len) + return + var/primary_reagent = R.required_reagents[1] + if(!GLOB.chemical_reactions_list[primary_reagent]) + GLOB.chemical_reactions_list[primary_reagent] = list() + GLOB.chemical_reactions_list[primary_reagent] += R diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 200e1f907f..b28e7b5807 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -70,3 +70,6 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) if(hour) hourT = " and [hour] hour[(hour != 1)? "s":""]" return "[day] day[(day != 1)? "s":""][hourT][minuteT][secondT]" + +/proc/daysSince(realtimev) + return round((world.realtime - realtimev) / (24 HOURS)) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 835a733752..c37e6fa531 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -115,9 +115,6 @@ GLOBAL_LIST_INIT(bitfields, list( "GOLIATH_RESISTANCE" = GOLIATH_RESISTANCE, "GOLIATH_WEAKNESS" = GOLIATH_WEAKNESS ), - "reagents_holder_flags" = list( - "REAGENT_NOREACT" = REAGENT_NOREACT - ), "flags_1" = list( "NOJAUNT_1" = NOJAUNT_1, "UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1, @@ -158,13 +155,14 @@ GLOBAL_LIST_INIT(bitfields, list( "SMOOTH_BORDER" = SMOOTH_BORDER, "SMOOTH_QUEUED" = SMOOTH_QUEUED, ), - "container_type" = list( + "reagents_holder_flags" = list( "INJECTABLE" = INJECTABLE, "DRAWABLE" = DRAWABLE, "REFILLABLE" = REFILLABLE, "DRAINABLE" = DRAINABLE, "TRANSPARENT" = TRANSPARENT, "AMOUNT_VISIBLE" = AMOUNT_VISIBLE, + "NO_REACT" = NO_REACT, ), "car_traits" = list( "CAN_KIDNAP" = CAN_KIDNAP, diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 8b0ac278cd..47b7e2ab62 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -40,6 +40,54 @@ GLOBAL_LIST_EMPTY(caps_list) GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things +GLOBAL_LIST_INIT(ai_core_display_screens, list( + ":thinking:", + "Alien", + "Angel", + "Banned", + "Bliss", + "Blue", + "Clown", + "Database", + "Dorf", + "Firewall", + "Fuzzy", + "Gentoo", + "Glitchman", + "Gondola", + "Goon", + "Hades", + "Heartline", + "Helios", + "House", + "Inverted", + "Matrix", + "Monochrome", + "Murica", + "Nanotrasen", + "Not Malf", + "President", + "Random", + "Rainbow", + "Red", + "Red October", + "Static", + "Syndicat Meow", + "TechDemon", + "Text", + "Too Deep", + "Triumvirate", + "Triumvirate-M", + "Weird")) + +/proc/resolve_ai_icon(input) + if(!input || !(input in GLOB.ai_core_display_screens)) + return "ai" + else + if(input == "Random") + input = pick(GLOB.ai_core_display_screens - "Random") + return "ai-[lowertext(input)]" + GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)) //Backpacks @@ -117,7 +165,7 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals", "CMO Office", "Chemistry", "Research", "RD Office", "Robotics", "HoP Office", "Library", "Chapel", "Theatre", "Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics", - "Circuitry", "Toxins", "Dormitories", "Virology", + "Circuitry", "Toxins", "Dormitories", "Virology", "Xenobiology", "Law Office","Detective's Office")) GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "") diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 36049de77b..0bd99825a2 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -44,6 +44,7 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/flashlight = 4, /obj/item/flashlight/pen = 1, /obj/item/flashlight/glowstick/random = 4, + /obj/effect/spawner/lootdrop/mre = 3, /obj/item/multitool = 2, /obj/item/radio/off = 2, /obj/item/t_scanner = 5, @@ -109,5 +110,8 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/reagent_containers/pill/floorpill = 1, /obj/item/storage/daki = 3, //VERY IMPORTANT CIT CHANGE - adds bodypillows to maint /obj/item/storage/pill_bottle/penis_enlargement = 2, + /obj/item/clothing/shoes/wheelys = 1, + /obj/item/clothing/shoes/kindleKicks = 1, + /obj/item/autosurgeon/penis = 1, "" = 3 )) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index fa0ecf117d..e7b2ae6cbe 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -18,3 +18,12 @@ GLOBAL_LIST_EMPTY(powernets) GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details + +// All religion stuff +GLOBAL_VAR(religion) +GLOBAL_VAR(deity) +GLOBAL_VAR(bible_name) +GLOBAL_VAR(bible_icon_state) +GLOBAL_VAR(bible_item_state) +GLOBAL_VAR(holy_weapon_type) +GLOBAL_VAR(holy_armor_type) \ No newline at end of file diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 0c01468712..7a495b95e7 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -23,6 +23,9 @@ return next_click = world.time + 1 + if(!can_interact_with(A)) + return + if(multicam_on) var/turf/T = get_turf(A) if(T) @@ -60,7 +63,6 @@ controlled_mech.click_action(A, src, params) //Override AI normal click behavior. return - return if(modifiers["shift"]) ShiftClickOn(A) return diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 03b951e6bb..df91223ed1 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -1,4 +1,7 @@ #define NEXT_PAGE_ID "__next__" +#define DEFAULT_CHECK_DELAY 20 + +GLOBAL_LIST_EMPTY(radial_menus) /obj/screen/radial icon = 'icons/mob/radial.dmi' @@ -10,14 +13,19 @@ icon_state = "radial_slice" var/choice var/next_page = FALSE + var/tooltips = FALSE /obj/screen/radial/slice/MouseEntered(location, control, params) . = ..() icon_state = "radial_slice_focus" + if(tooltips) + openToolTip(usr, src, params, title = name) /obj/screen/radial/slice/MouseExited(location, control, params) . = ..() icon_state = "radial_slice" + if(tooltips) + closeToolTip(usr) /obj/screen/radial/slice/Click(location, control, params) if(usr.client == parent.current_user) @@ -30,6 +38,14 @@ name = "Close Menu" icon_state = "radial_center" +/obj/screen/radial/center/MouseEntered(location, control, params) + . = ..() + icon_state = "radial_center_focus" + +/obj/screen/radial/center/MouseExited(location, control, params) + . = ..() + icon_state = "radial_center" + /obj/screen/radial/center/Click(location, control, params) if(usr.client == parent.current_user) parent.finished = TRUE @@ -48,6 +64,9 @@ var/atom/anchor var/image/menu_holder var/finished = FALSE + var/datum/callback/custom_check_callback + var/next_check = 0 + var/check_delay = DEFAULT_CHECK_DELAY var/radius = 32 var/starting_angle = 0 @@ -57,7 +76,7 @@ var/max_elements var/pages = 1 var/current_page = 1 - + var/hudfix_method = TRUE //TRUE to change anchor to user, FALSE to shift by py_shift var/py_shift = 0 var/entry_animation = TRUE @@ -75,7 +94,7 @@ restrict_to_dir(NORTH) //I was going to parse screen loc here but that's more effort than it's worth. //Sets defaults -//These assume 45 deg min_angle +//These assume 45 deg min_angle /datum/radial_menu/proc/restrict_to_dir(dir) switch(dir) if(NORTH) @@ -91,18 +110,19 @@ starting_angle = 180 ending_angle = 45 -/datum/radial_menu/proc/setup_menu() +/datum/radial_menu/proc/setup_menu(use_tooltips) if(ending_angle > starting_angle) zone = ending_angle - starting_angle else zone = 360 - starting_angle + ending_angle - + max_elements = round(zone / min_angle) var/paged = max_elements < choices.len if(elements.len < max_elements) var/elements_to_add = max_elements - elements.len for(var/i in 1 to elements_to_add) //Create all elements - var/obj/screen/radial/new_element = new /obj/screen/radial/slice + var/obj/screen/radial/slice/new_element = new /obj/screen/radial/slice + new_element.tooltips = use_tooltips new_element.parent = src elements += new_element @@ -163,7 +183,7 @@ else E.pixel_y = py E.pixel_x = px - + //Visuals E.alpha = 255 E.mouse_opacity = MOUSE_OPACITY_ICON @@ -183,7 +203,7 @@ E.next_page = FALSE if(choices_icons[choice_id]) E.add_overlay(choices_icons[choice_id]) - + /datum/radial_menu/New() close_button = new close_button.parent = src @@ -200,7 +220,7 @@ /datum/radial_menu/proc/get_next_id() return "c_[choices.len]" -/datum/radial_menu/proc/set_choices(list/new_choices) +/datum/radial_menu/proc/set_choices(list/new_choices, use_tooltips) if(choices.len) Reset() for(var/E in new_choices) @@ -211,7 +231,7 @@ var/I = extract_image(new_choices[E]) if(I) choices_icons[id] = I - setup_menu() + setup_menu(use_tooltips) /datum/radial_menu/proc/extract_image(E) @@ -220,7 +240,7 @@ MA.layer = ABOVE_HUD_LAYER MA.appearance_flags |= RESET_TRANSFORM return MA - + /datum/radial_menu/proc/next_page() if(pages > 1) @@ -243,28 +263,49 @@ if(current_user) current_user.images -= menu_holder -/datum/radial_menu/proc/wait() +/datum/radial_menu/proc/wait(atom/user, atom/anchor, require_near = FALSE) while (current_user && !finished && !selected_choice) + if(require_near && !in_range(anchor, user)) + return + if(custom_check_callback && next_check < world.time) + if(!custom_check_callback.Invoke()) + return + else + next_check = world.time + check_delay stoplag(1) /datum/radial_menu/Destroy() Reset() hide() + QDEL_NULL(custom_check_callback) . = ..() + /* - Presents radial menu to user anchored to anchor (or user if the anchor is currently in users screen) + Presents radial menu to user anchored to anchor (or user if the anchor is currently in users screen) Choices should be a list where list keys are movables or text used for element names and return value and list values are movables/icons/images used for element icons */ -/proc/show_radial_menu(mob/user,atom/anchor,list/choices) +/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE) + if(!user || !anchor || !length(choices)) + return + if(!uniqueid) + uniqueid = "defmenu_[REF(user)]_[REF(anchor)]" + + if(GLOB.radial_menus[uniqueid]) + return + var/datum/radial_menu/menu = new - if(!user) - user = usr + GLOB.radial_menus[uniqueid] = menu + if(radius) + menu.radius = radius + if(istype(custom_check)) + menu.custom_check_callback = custom_check menu.anchor = anchor menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud - menu.set_choices(choices) + menu.set_choices(choices, tooltips) menu.show_to(user) - menu.wait() + menu.wait(user, anchor, require_near) var/answer = menu.selected_choice qdel(menu) + GLOB.radial_menus -= uniqueid return answer \ No newline at end of file diff --git a/code/_onclick/hud/radial_persistent.dm b/code/_onclick/hud/radial_persistent.dm new file mode 100644 index 0000000000..0b5e8dc356 --- /dev/null +++ b/code/_onclick/hud/radial_persistent.dm @@ -0,0 +1,76 @@ +/* + A derivative of radial menu which persists onscreen until closed and invokes a callback each time an element is clicked +*/ + +/obj/screen/radial/persistent/center + name = "Close Menu" + icon_state = "radial_center" + +/obj/screen/radial/persistent/center/Click(location, control, params) + if(usr.client == parent.current_user) + parent.element_chosen(null,usr) + +/obj/screen/radial/persistent/center/MouseEntered(location, control, params) + . = ..() + icon_state = "radial_center_focus" + +/obj/screen/radial/persistent/center/MouseExited(location, control, params) + . = ..() + icon_state = "radial_center" + + + +/datum/radial_menu/persistent + var/uniqueid + var/datum/callback/select_proc_callback + +/datum/radial_menu/persistent/New() + close_button = new /obj/screen/radial/persistent/center + close_button.parent = src + + +/datum/radial_menu/persistent/element_chosen(choice_id,mob/user) + select_proc_callback.Invoke(choices_values[choice_id]) + + +/datum/radial_menu/persistent/proc/change_choices(list/newchoices, tooltips) + if(!newchoices.len) + return + Reset() + set_choices(newchoices,tooltips) + +/datum/radial_menu/persistent/Destroy() + QDEL_NULL(select_proc_callback) + GLOB.radial_menus -= uniqueid + Reset() + hide() + . = ..() + +/* + Creates a persistent radial menu and shows it to the user, anchored to anchor (or user if the anchor is currently in users screen). + Choices should be a list where list keys are movables or text used for element names and return value + and list values are movables/icons/images used for element icons + Select_proc is the proc to be called each time an element on the menu is clicked, and should accept the chosen element as its final argument + Clicking the center button will return a choice of null +*/ +/proc/show_radial_menu_persistent(mob/user, atom/anchor, list/choices, datum/callback/select_proc, uniqueid, radius, tooltips = FALSE) + if(!user || !anchor || !length(choices) || !select_proc) + return + if(!uniqueid) + uniqueid = "defmenu_[REF(user)]_[REF(anchor)]" + + if(GLOB.radial_menus[uniqueid]) + return + + var/datum/radial_menu/persistent/menu = new + menu.uniqueid = uniqueid + GLOB.radial_menus[uniqueid] = menu + if(radius) + menu.radius = radius + menu.select_proc_callback = select_proc + menu.anchor = anchor + menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud + menu.set_choices(choices, tooltips) + menu.show_to(user) + return menu + diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index d23d0905e9..2a14d232aa 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -64,7 +64,7 @@ to_chat(user, "You're too exhausted.") // CIT CHANGE - ditto return // CIT CHANGE - ditto - if(force && user.has_trait(TRAIT_PACIFISM)) + if(force && HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm other living beings!") return diff --git a/code/controllers/subsystem/augury.dm b/code/controllers/subsystem/augury.dm index 875f1ee7d3..1b1c7bc3b7 100644 --- a/code/controllers/subsystem/augury.dm +++ b/code/controllers/subsystem/augury.dm @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(augury) watchers -= w continue var/mob/dead/observer/O = w - if(biggest_doom && (!O.orbiting || O.orbiting.orbiting != biggest_doom)) + if(biggest_doom && (!O.orbiting || O.orbiting.parent != biggest_doom)) O.ManualFollow(biggest_doom) /datum/action/innate/augury diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index a2c60618ac..a365405ce6 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -256,10 +256,13 @@ GLOBAL_LIST_EMPTY(the_station_areas) /datum/controller/subsystem/mapping/proc/generate_station_area_list() var/list/station_areas_blacklist = typecacheof(list(/area/space, /area/mine, /area/ruin, /area/asteroid/nearstation)) for(var/area/A in world) - var/turf/picked = safepick(get_area_turfs(A.type)) - if(picked && is_station_level(picked.z)) - if(!(A.type in GLOB.the_station_areas) && !is_type_in_typecache(A, station_areas_blacklist)) - GLOB.the_station_areas.Add(A.type) + if (is_type_in_typecache(A, station_areas_blacklist)) + continue + if (!A.contents.len || !A.unique) + continue + var/turf/picked = A.contents[1] + if (is_station_level(picked.z)) + GLOB.the_station_areas += A.type if(!GLOB.the_station_areas.len) log_world("ERROR: Station areas list failed to generate!") @@ -495,4 +498,9 @@ GLOBAL_LIST_EMPTY(the_station_areas) clearing |= used_turfs //used turfs is an associative list, BUT, reserve_turfs() can still handle it. If the code above works properly, this won't even be needed as the turfs would be freed already. unused_turfs.Cut() used_turfs.Cut() - reserve_turfs(clearing) \ No newline at end of file + reserve_turfs(clearing) + +/datum/controller/subsystem/mapping/proc/reg_in_areas_in_z(list/areas) + for(var/B in areas) + var/area/A = B + A.reg_in_areas_in_z() diff --git a/code/controllers/subsystem/orbit.dm b/code/controllers/subsystem/orbit.dm deleted file mode 100644 index 45d280b601..0000000000 --- a/code/controllers/subsystem/orbit.dm +++ /dev/null @@ -1,44 +0,0 @@ -SUBSYSTEM_DEF(orbit) - name = "Orbits" - priority = FIRE_PRIORITY_ORBIT - wait = 2 - flags = SS_NO_INIT|SS_TICKER - - var/list/currentrun = list() - var/list/processing = list() - -/datum/controller/subsystem/orbit/stat_entry() - ..("P:[processing.len]") - - -/datum/controller/subsystem/orbit/fire(resumed = 0) - if (!resumed) - src.currentrun = processing.Copy() - - //cache for sanic speed (lists are references anyways) - var/list/currentrun = src.currentrun - - while (currentrun.len) - var/datum/orbit/O = currentrun[currentrun.len] - currentrun.len-- - if (!O) - processing -= O - if (MC_TICK_CHECK) - return - continue - if (!O.orbiter) - qdel(O) - if (MC_TICK_CHECK) - return - continue - if (O.lastprocess >= world.time) //we already checked recently - if (MC_TICK_CHECK) - return - continue - var/targetloc = get_turf(O.orbiting) - if (targetloc != O.lastloc || O.orbiter.loc != targetloc) - O.Check(targetloc) - if (MC_TICK_CHECK) - return - - diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 978eedb62f..455b53b1df 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -28,6 +28,7 @@ SUBSYSTEM_DEF(persistence) LoadPhotoPersistence() if(CONFIG_GET(flag/use_antag_rep)) LoadAntagReputation() + LoadRandomizedRecipes() return ..() /datum/controller/subsystem/persistence/proc/LoadSatchels() @@ -206,6 +207,7 @@ SUBSYSTEM_DEF(persistence) SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION. if(CONFIG_GET(flag/use_antag_rep)) CollectAntagReputation() + SaveRandomizedRecipes() /datum/controller/subsystem/persistence/proc/GetPhotoAlbums() var/album_path = file("data/photo_albums.json") @@ -371,3 +373,43 @@ SUBSYSTEM_DEF(persistence) fdel(FILE_ANTAG_REP) text2file(json_encode(antag_rep), FILE_ANTAG_REP) +/datum/controller/subsystem/persistence/proc/LoadRandomizedRecipes() + var/json_file = file("data/RandomizedChemRecipes.json") + var/json + if(fexists(json_file)) + json = json_decode(file2text(json_file)) + + for(var/randomized_type in subtypesof(/datum/chemical_reaction/randomized)) + var/datum/chemical_reaction/randomized/R = new randomized_type + var/loaded = FALSE + if(R.persistent && json) + var/list/recipe_data = json[R.id] + if(recipe_data && R.LoadOldRecipe(recipe_data) && (daysSince(R.created) <= R.persistence_period)) + loaded = TRUE + if(!loaded) //We do not have information for whatever reason, just generate new one + R.GenerateRecipe() + + if(!R.HasConflicts()) //Might want to try again if conflicts happened in the future. + add_chemical_reaction(R) + +/datum/controller/subsystem/persistence/proc/SaveRandomizedRecipes() + var/json_file = file("data/RandomizedChemRecipes.json") + var/list/file_data = list() + + //asert globchems done + for(var/randomized_type in subtypesof(/datum/chemical_reaction/randomized)) + var/datum/chemical_reaction/randomized/R = randomized_type + R = get_chemical_reaction(initial(R.id)) //ew, would be nice to add some simple tracking + if(R && R.persistent && R.id) + var/recipe_data = list() + recipe_data["timestamp"] = R.created + recipe_data["required_reagents"] = R.required_reagents + recipe_data["required_catalysts"] = R.required_catalysts + recipe_data["required_temp"] = R.required_temp + recipe_data["is_cold_recipe"] = R.is_cold_recipe + recipe_data["results"] = R.results + recipe_data["required_container"] = "[R.required_container]" + file_data["[R.id]"] = recipe_data + + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) diff --git a/code/controllers/subsystem/religion.dm b/code/controllers/subsystem/religion.dm deleted file mode 100644 index 1c3cd76da4..0000000000 --- a/code/controllers/subsystem/religion.dm +++ /dev/null @@ -1,11 +0,0 @@ -SUBSYSTEM_DEF(religion) - name = "Religion" - flags = SS_NO_FIRE|SS_NO_INIT - - var/religion - var/deity - var/bible_name - var/bible_icon_state - var/bible_item_state - var/holy_weapon_type - var/holy_armor_type diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm index de58c1a0d7..77ad712b99 100644 --- a/code/controllers/subsystem/throwing.dm +++ b/code/controllers/subsystem/throwing.dm @@ -116,7 +116,7 @@ SUBSYSTEM_DEF(throwing) return dist_travelled++ - + if (dist_travelled > MAX_THROWING_DIST) finalize() return @@ -154,7 +154,7 @@ SUBSYSTEM_DEF(throwing) /datum/thrownthing/proc/hitcheck() for (var/thing in get_turf(thrownthing)) var/atom/movable/AM = thing - if (AM == thrownthing) + if (AM == thrownthing || (AM == thrower && !ismob(thrownthing))) continue if (AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags_1 & ON_BORDER_1)) finalize(hit=TRUE, target=AM) diff --git a/code/datums/action.dm b/code/datums/action.dm index b7089279cb..f64a549b29 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -195,11 +195,16 @@ /datum/action/item_action/toggle_firemode name = "Toggle Firemode" -/datum/action/item_action/rcl +/datum/action/item_action/rcl_col name = "Change Cable Color" icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "rcl_rainbow" +/datum/action/item_action/rcl_gui + name = "Toggle Fast Wiring Gui" + icon_icon = 'icons/mob/actions/actions_items.dmi' + button_icon_state = "rcl_gui" + /datum/action/item_action/startchainsaw name = "Pull The Starting Cord" diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index afd53726db..f2fec3bb63 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -42,7 +42,7 @@ lose_text = "You feel smart again." /datum/brain_trauma/mild/dumbness/on_gain() - owner.add_trait(TRAIT_DUMB, TRAUMA_TRAIT) + ADD_TRAIT(owner, TRAIT_DUMB, TRAUMA_TRAIT) SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "dumb", /datum/mood_event/oblivious) ..() @@ -55,7 +55,7 @@ ..() /datum/brain_trauma/mild/dumbness/on_lose() - owner.remove_trait(TRAIT_DUMB, TRAUMA_TRAIT) + REMOVE_TRAIT(owner, TRAIT_DUMB, TRAUMA_TRAIT) owner.derpspeech = 0 SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "dumb") ..() diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index a8adbfbce8..d094c162d7 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -13,11 +13,11 @@ lose_text = "You suddenly remember how to speak." /datum/brain_trauma/severe/mute/on_gain() - owner.add_trait(TRAIT_MUTE, TRAUMA_TRAIT) + ADD_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT) ..() /datum/brain_trauma/severe/mute/on_lose() - owner.remove_trait(TRAIT_MUTE, TRAUMA_TRAIT) + REMOVE_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT) ..() /datum/brain_trauma/severe/aphasia @@ -60,18 +60,68 @@ /datum/brain_trauma/severe/paralysis name = "Paralysis" - desc = "Patient's brain can no longer control its motor functions." + desc = "Patient's brain can no longer control part of its motor functions." scan_desc = "cerebral paralysis" - gain_text = "You can't feel your body anymore!" - lose_text = "You can feel your limbs again!" + gain_text = "" + lose_text = "" + var/paralysis_type + var/list/paralysis_traits = list() + //for descriptions -/datum/brain_trauma/severe/paralysis/on_life() - owner.Knockdown(200, ignore_canknockdown = TRUE) +/datum/brain_trauma/severe/paralysis/New(specific_type) + if(specific_type) + paralysis_type = specific_type + if(!paralysis_type) + paralysis_type = pick("full","left","right","arms","legs","r_arm","l_arm","r_leg","l_leg") + var/subject + switch(paralysis_type) + if("full") + subject = "your body" + paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG) + if("left") + subject = "the left side of your body" + paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_L_LEG) + if("right") + subject = "the right side of your body" + paralysis_traits = list(TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_R_LEG) + if("arms") + subject = "your arms" + paralysis_traits = list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM) + if("legs") + subject = "your legs" + paralysis_traits = list(TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG) + if("r_arm") + subject = "your right arm" + paralysis_traits = list(TRAIT_PARALYSIS_R_ARM) + if("l_arm") + subject = "your left arm" + paralysis_traits = list(TRAIT_PARALYSIS_L_ARM) + if("r_leg") + subject = "your right leg" + paralysis_traits = list(TRAIT_PARALYSIS_R_LEG) + if("l_leg") + subject = "your left leg" + paralysis_traits = list(TRAIT_PARALYSIS_L_LEG) + + gain_text = "You can't feel [subject] anymore!" + lose_text = "You can feel [subject] again!" + +/datum/brain_trauma/severe/paralysis/on_gain() ..() + for(var/X in paralysis_traits) + ADD_TRAIT(owner, X, "trauma_paralysis") + owner.update_disabled_bodyparts() /datum/brain_trauma/severe/paralysis/on_lose() - owner.SetKnockdown(0) ..() + for(var/X in paralysis_traits) + REMOVE_TRAIT(owner, X, "trauma_paralysis") + owner.update_disabled_bodyparts() + +/datum/brain_trauma/severe/paralysis/paraplegic + //can_gain = FALSE maybe breaks. + paralysis_type = "legs" + resilience = TRAUMA_RESILIENCE_ABSOLUTE /datum/brain_trauma/severe/narcolepsy name = "Narcolepsy" @@ -121,7 +171,7 @@ stress -= 4 /datum/brain_trauma/severe/monophobia/proc/check_alone() - if(owner.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(owner, TRAIT_BLIND)) return TRUE for(var/mob/M in oview(owner, 7)) if(!isliving(M)) //ghosts ain't people @@ -183,11 +233,11 @@ lose_text = "You feel in control of your hands again." /datum/brain_trauma/severe/discoordination/on_gain() - owner.add_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT) + ADD_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT) ..() /datum/brain_trauma/severe/discoordination/on_lose() - owner.remove_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT) + REMOVE_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT) ..() /datum/brain_trauma/severe/pacifism @@ -198,9 +248,9 @@ lose_text = "You no longer feel compelled to not harm." /datum/brain_trauma/severe/pacifism/on_gain() - owner.add_trait(TRAIT_PACIFISM, TRAUMA_TRAIT) + ADD_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT) ..() /datum/brain_trauma/severe/pacifism/on_lose() - owner.remove_trait(TRAIT_PACIFISM, TRAUMA_TRAIT) - ..() \ No newline at end of file + REMOVE_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT) + ..() diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index 6a2f8682a5..59893e1cf4 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -192,7 +192,7 @@ return //no random switching /datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq) - if(owner.has_trait(TRAIT_DEAF) || owner == speaker) + if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == speaker) return message if(findtext(message, codeword)) message = replacetext(message, codeword, "[codeword]") diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm index 1e1b7a0a48..838a1b576a 100644 --- a/code/datums/components/caltrop.dm +++ b/code/datums/components/caltrop.dm @@ -24,7 +24,7 @@ if(ishuman(AM)) var/mob/living/carbon/human/H = AM - if(H.has_trait(TRAIT_PIERCEIMMUNE)) + if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) return if((flags & CALTROP_IGNORE_WALKERS) && H.m_intent == MOVE_INTENT_WALK) @@ -46,7 +46,7 @@ return var/damage = rand(min_damage, max_damage) - if(H.has_trait(TRAIT_LIGHT_STEP)) + if(HAS_TRAIT(H, TRAIT_LIGHT_STEP)) damage *= 0.75 H.apply_damage(damage, BRUTE, picked_def_zone) diff --git a/code/datums/components/earhealing.dm b/code/datums/components/earhealing.dm index 9396eab3a3..6eb71285e0 100644 --- a/code/datums/components/earhealing.dm +++ b/code/datums/components/earhealing.dm @@ -23,7 +23,7 @@ if (!wearer) STOP_PROCESSING(SSobj, src) return - if(!wearer.has_trait(TRAIT_DEAF)) + if(!HAS_TRAIT(wearer, TRAIT_DEAF)) var/obj/item/organ/ears/ears = wearer.getorganslot(ORGAN_SLOT_EARS) if (ears) ears.deaf = max(ears.deaf - 1, (ears.ear_damage < UNHEALING_EAR_DAMAGE ? 0 : 1)) // Do not clear deafness while above the unhealing ear damage threshold diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index 933c38505b..b32921a4ce 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -15,7 +15,7 @@ /datum/component/mood/Initialize() if(!isliving(parent)) return COMPONENT_INCOMPATIBLE - + START_PROCESSING(SSmood, src) RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event) @@ -150,17 +150,17 @@ else owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect) - if(owner.has_trait(TRAIT_DEPRESSION)) + if(HAS_TRAIT(owner, TRAIT_DEPRESSION)) if(prob(0.05)) add_event(null, "depression", /datum/mood_event/depression) clear_event(null, "jolly") - if(owner.has_trait(TRAIT_JOLLY)) + if(HAS_TRAIT(owner, TRAIT_JOLLY)) if(prob(0.05)) add_event(null, "jolly", /datum/mood_event/jolly) clear_event(null, "depression") holdmyinsanityeffect = insanity_effect - + HandleNutrition(owner) /datum/component/mood/proc/DecreaseSanity(amount, minimum = SANITY_INSANE) diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm new file mode 100644 index 0000000000..301e50dc42 --- /dev/null +++ b/code/datums/components/orbiter.dm @@ -0,0 +1,156 @@ +/datum/component/orbiter + dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS + var/list/orbiters + var/datum/callback/orbiter_spy + var/datum/callback/orbited_spy + +//radius: range to orbit at, radius of the circle formed by orbiting (in pixels) +//clockwise: whether you orbit clockwise or anti clockwise +//rotation_speed: how fast to rotate (how many ds should it take for a rotation to complete) +//rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default. +//pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts +/datum/component/orbiter/Initialize(atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation) + if(!istype(orbiter) || !isatom(parent) || isarea(parent)) + return COMPONENT_INCOMPATIBLE + + orbiters = list() + orbiter_spy = CALLBACK(src, .proc/orbiter_move_react) + orbited_spy = CALLBACK(src, .proc/move_react) + + var/atom/master = parent + master.orbiters = src + + begin_orbit(orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation) + +/datum/component/orbiter/RegisterWithParent() + var/atom/target = parent + while(ismovableatom(target)) + RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy) + target = target.loc + +/datum/component/orbiter/UnregisterFromParent() + var/atom/target = parent + while(ismovableatom(target)) + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + target = target.loc + +/datum/component/orbiter/Destroy() + var/atom/master = parent + master.orbiters = null + for(var/i in orbiters) + end_orbit(i) + orbiters = null + QDEL_NULL(orbiter_spy) + QDEL_NULL(orbited_spy) + return ..() + +/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments) + if(arguments) + begin_orbit(arglist(arguments)) + return + // The following only happens on component transfers + orbiters += newcomp.orbiters + +/datum/component/orbiter/PostTransfer() + if(!isatom(parent) || isarea(parent) || !get_turf(parent)) + return COMPONENT_INCOMPATIBLE + move_react() + +/datum/component/orbiter/proc/begin_orbit(atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation) + if(orbiter.orbiting) + if(orbiter.orbiting == src) + orbiter.orbiting.end_orbit(orbiter, TRUE) + else + orbiter.orbiting.end_orbit(orbiter) + orbiters[orbiter] = TRUE + orbiter.orbiting = src + RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, orbiter_spy) + var/matrix/initial_transform = matrix(orbiter.transform) + + // Head first! + if(pre_rotation) + var/matrix/M = matrix(orbiter.transform) + var/pre_rot = 90 + if(!clockwise) + pre_rot = -90 + M.Turn(pre_rot) + orbiter.transform = M + + var/matrix/shift = matrix(orbiter.transform) + shift.Translate(0, radius) + orbiter.transform = shift + + orbiter.SpinAnimation(rotation_speed, -1, clockwise, rotation_segments, parallel = FALSE) + + //we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit + orbiter.transform = initial_transform + orbiter.forceMove(get_turf(parent)) + to_chat(orbiter, "Now orbiting [parent].") + +/datum/component/orbiter/proc/end_orbit(atom/movable/orbiter, refreshing=FALSE) + if(!orbiters[orbiter]) + return + UnregisterSignal(orbiter, COMSIG_MOVABLE_MOVED) + orbiter.SpinAnimation(0, 0) + orbiters -= orbiter + orbiter.stop_orbit(src) + orbiter.orbiting = null + if(!refreshing && !length(orbiters) && !QDELING(src)) + qdel(src) + +// This proc can receive signals by either the thing being directly orbited or anything holding it +/datum/component/orbiter/proc/move_react(atom/orbited, atom/oldloc, direction) + set waitfor = FALSE // Transfer calls this directly and it doesnt care if the ghosts arent done moving + + var/atom/movable/master = parent + if(master.loc == oldloc) + return + + var/turf/newturf = get_turf(master) + if(!newturf) + qdel(src) + + // Handling the signals of stuff holding us (or not anymore) + // These are prety rarely activated, how often are you following something in a bag? + if(oldloc && !isturf(oldloc)) // We used to be registered to it, probably + var/atom/target = oldloc + while(ismovableatom(target)) + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + target = target.loc + if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too + var/atom/target = orbited.loc + while(ismovableatom(target)) + RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy, TRUE) + target = target.loc + + var/atom/curloc = master.loc + for(var/i in orbiters) + var/atom/movable/thing = i + if(QDELETED(thing) || thing.loc == newturf) + continue + thing.forceMove(newturf) + if(CHECK_TICK && master.loc != curloc) + // We moved again during the checktick, cancel current operation + break + + +/datum/component/orbiter/proc/orbiter_move_react(atom/movable/orbiter, atom/oldloc, direction) + if(orbiter.loc == get_turf(parent)) + return + end_orbit(orbiter) + +///////////////////// + +/atom/movable/proc/orbit(atom/A, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE) + if(!istype(A) || !get_turf(A) || A == src) + return + + return A.AddComponent(/datum/component/orbiter, src, radius, clockwise, rotation_speed, rotation_segments, pre_rotation) + +/atom/movable/proc/stop_orbit(datum/component/orbiter/orbits) + return // We're just a simple hook + +/atom/proc/transfer_observers_to(atom/target) + if(!orbiters || !istype(target) || !get_turf(target) || target == src) + return + target.TakeComponent(orbiters) diff --git a/code/datums/datum.dm b/code/datums/datum.dm index e74e30b536..cdb195dd82 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -2,6 +2,7 @@ var/gc_destroyed //Time when this object was destroyed. var/list/active_timers //for SStimer var/list/datum_components //for /datum/components + var/list/status_traits var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register var/list/signal_procs var/signal_enabled = FALSE diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index ba570eca06..e1432bf9a6 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -117,7 +117,7 @@ /mob/living/carbon/AirborneContractDisease(datum/disease/D, force_spread) if(internal) return - if(has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(src, TRAIT_NOBREATH)) return ..() @@ -137,7 +137,7 @@ /mob/living/carbon/human/CanContractDisease(datum/disease/D) if(dna) - if(has_trait(TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity) + if(HAS_TRAIT(src, TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity) return FALSE for(var/thing in D.required_organs) diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 0ace2ca8fd..e666c7acd6 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -233,7 +233,7 @@ /datum/symptom/heal/coma/CanHeal(datum/disease/advance/A) var/mob/living/M = A.affected_mob - if(M.has_trait(TRAIT_DEATHCOMA)) + if(HAS_TRAIT(M, TRAIT_DEATHCOMA)) return power else if(M.IsUnconscious() || M.stat == UNCONSCIOUS) return power * 0.9 @@ -364,15 +364,15 @@ /datum/symptom/heal/plasma/CanHeal(datum/disease/advance/A) var/mob/living/M = A.affected_mob var/datum/gas_mixture/environment - var/list/gases + var/plasmamount . = 0 if(M.loc) environment = M.loc.return_air() if(environment) - gases = environment.gases - if(gases["plasma"] && gases["plasma"][MOLES] > gases["plasma"][GAS_META][META_GAS_MOLES_VISIBLE]) //if there's enough plasma in the air to see + plasmamount = environment.gases[/datum/gas/plasma] + if(plasmamount && plasmamount > GLOB.meta_gas_visibility[/datum/gas/plasma]) //if there's enough plasma in the air to see . += power * 0.5 if(M.reagents.has_reagent("plasma")) . += power * 0.75 diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index ffc145bd72..8d7cc5ed70 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -85,14 +85,14 @@ if(4, 5) M.restoreEars() - if(M.has_trait(TRAIT_BLIND, EYE_DAMAGE)) + if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE)) if(prob(20)) to_chat(M, "Your vision slowly returns...") M.cure_blind(EYE_DAMAGE) M.cure_nearsighted(EYE_DAMAGE) M.blur_eyes(35) - else if(M.has_trait(TRAIT_NEARSIGHT, EYE_DAMAGE)) + else if(HAS_TRAIT_FROM(M, TRAIT_NEARSIGHT, EYE_DAMAGE)) to_chat(M, "You can finally focus your eyes on distant objects.") M.cure_nearsighted(EYE_DAMAGE) M.blur_eyes(10) diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 0b42012f76..d1cc6905a6 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -61,7 +61,7 @@ Bonus M.become_nearsighted(EYE_DAMAGE) if(prob(eyes.eye_damage - 10 + 1)) if(!remove_eyes) - if(!M.has_trait(TRAIT_BLIND)) + if(!HAS_TRAIT(M, TRAIT_BLIND)) to_chat(M, "You go blind!") M.become_blind(EYE_DAMAGE) else diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 57cdb9bcf5..6c91cc3a7d 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -133,7 +133,7 @@ if(isliving(user)) var/mob/living/L = user - if(L.has_trait(TRAIT_EMOTEMUTE)) + if(HAS_TRAIT(L, TRAIT_EMOTEMUTE)) return FALSE /datum/emote/sound diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index d673cdb16d..0623e2f5f9 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -103,11 +103,11 @@ // Can most things breathe? if(trace_gases) continue - if(!(A_gases[/datum/gas/oxygen] && A_gases[/datum/gas/oxygen][MOLES] >= 16)) + if(A_gases[/datum/gas/oxygen] >= 16) continue if(A_gases[/datum/gas/plasma]) continue - if(A_gases[/datum/gas/carbon_dioxide] && A_gases[/datum/gas/carbon_dioxide][MOLES] >= 10) + if(A_gases[/datum/gas/carbon_dioxide] >= 10) continue // Aim for goldilocks temperatures and pressure diff --git a/code/datums/martial.dm b/code/datums/martial.dm index 2bc01e0bf6..ae8f92a342 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -5,6 +5,7 @@ var/current_target var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary var/deflection_chance = 0 //Chance to deflect projectiles + var/reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction? var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not var/help_verb diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index 8a5f0f9439..127413262c 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -86,13 +86,13 @@ return 0 /datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) - if(D.stat || D.IsKnockdown()) + if(D.lying || D.IsKnockdown()) return 0 D.visible_message("[A] leg sweeps [D]!", \ "[A] leg sweeps you!") playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1) D.apply_damage(5, BRUTE) - D.Knockdown(40) + D.Knockdown(40, override_hardstun = 0.01, 25) log_combat(A, D, "leg sweeped") return 1 @@ -191,3 +191,18 @@ heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT resistance_flags = NONE + +/obj/item/clothing/gloves/krav_maga/combatglovesplus + name = "combat gloves plus" + desc = "These tactical gloves are fireproof and shock resistant, and using nanochip technology it teaches you the powers of krav maga." + icon_state = "black" + item_state = "blackglovesplus" + siemens_coefficient = 0 + permeability_coefficient = 0.05 + strip_delay = 80 + cold_protection = HANDS + min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT + heat_protection = HANDS + max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + resistance_flags = NONE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 4a15afd672..5f19c37b99 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -7,6 +7,7 @@ /datum/martial_art/the_sleeping_carp name = "The Sleeping Carp" deflection_chance = 100 + reroute_deflection = TRUE no_guns = TRUE allow_temp_override = FALSE help_verb = /mob/living/carbon/human/proc/sleeping_carp_help @@ -179,7 +180,7 @@ /obj/item/twohanded/bostaff/attack(mob/target, mob/living/user) add_fingerprint(user) - if((user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) to_chat(user, "You club yourself over the head with [src].") user.Knockdown(60) if(ishuman(user)) diff --git a/code/datums/mood_events/drink_events.dm b/code/datums/mood_events/drink_events.dm index db5a91009e..5d0eb0e0cb 100644 --- a/code/datums/mood_events/drink_events.dm +++ b/code/datums/mood_events/drink_events.dm @@ -22,3 +22,8 @@ description = "That drink was amazing!\n" mood_change = 4 timeout = 1200 + +/datum/mood_event/amazingtaste + description = "Amazing taste!\n" + mood_change = 50 + timeout = 10 MINUTES diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 4021d11128..b2b03fb56b 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -117,6 +117,16 @@ description = "I'm missing my family heirloom...\n" mood_change = -4 +/datum/mood_event/loud_gong + description = "That loud gong noise really hurt my ears!\n" + mood_change = -3 + timeout = 1200 + +/datum/mood_event/spooked + description = "The rattling of those bones...It still haunts me.\n" + mood_change = -4 + timeout = 2400 + //These are unused so far but I want to remember them to use them later /datum/mood_event/cloned_corpse description = "I recently saw my own corpse...\n" @@ -125,3 +135,11 @@ /datum/mood_event/surgery description = "HE'S CUTTING ME OPEN!!\n" mood_change = -8 + +/datum/mood_event/sad_empath + description = "Someone seems upset...\n" + mood_change = -2 + timeout = 600 + +/datum/mood_event/sad_empath/add_effects(mob/sadtarget) + description = "[sadtarget.name] seems upset...\n" diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm index 6989744fe3..051a548d1d 100644 --- a/code/datums/mood_events/generic_positive_events.dm +++ b/code/datums/mood_events/generic_positive_events.dm @@ -75,3 +75,27 @@ description = "There is something soothing about this music.\n" mood_change = 3 timeout = 600 + +/datum/mood_event/betterhug + description = "Someone was very nice to me.\n" + mood_change = 3 + timeout = 3000 + +/datum/mood_event/betterhug/add_effects(mob/friend) + description = "[friend.name] was very nice to me.\n" + +/datum/mood_event/besthug + description = "Someone is great to be around, they make me feel so happy!\n" + mood_change = 5 + timeout = 3000 + +/datum/mood_event/besthug/add_effects(mob/friend) + description = "[friend.name] is great to be around, [friend.p_they()] makes me feel so happy!\n" + +/datum/mood_event/happy_empath + description = "Someone seems happy!\n" + mood_change = 2 + timeout = 600 + +/datum/mood_event/happy_empath/add_effects(var/mob/happytarget) + description = "[happytarget.name]'s happiness is infectious!\n" diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index e114a43736..461c221ff8 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -86,12 +86,12 @@ /datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_trait(TRAIT_CLUMSY, GENETIC_MUTATION) + ADD_TRAIT(owner, TRAIT_CLUMSY, GENETIC_MUTATION) /datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_trait(TRAIT_CLUMSY, GENETIC_MUTATION) + REMOVE_TRAIT(owner, TRAIT_CLUMSY, GENETIC_MUTATION) //Tourettes causes you to randomly stand in place and shout. @@ -125,12 +125,12 @@ /datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_trait(TRAIT_DEAF, GENETIC_MUTATION) + ADD_TRAIT(owner, TRAIT_DEAF, GENETIC_MUTATION) /datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_trait(TRAIT_DEAF, GENETIC_MUTATION) + REMOVE_TRAIT(owner, TRAIT_DEAF, GENETIC_MUTATION) //Monified turns you into a monkey. diff --git a/code/datums/mutations/cold_resistance.dm b/code/datums/mutations/cold_resistance.dm index 6c3ac2982d..3d8fbababa 100644 --- a/code/datums/mutations/cold_resistance.dm +++ b/code/datums/mutations/cold_resistance.dm @@ -17,14 +17,14 @@ /datum/mutation/human/cold_resistance/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_trait(TRAIT_RESISTCOLD, "cold_resistance") -// owner.add_trait(TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE + ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") +// ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE /datum/mutation/human/cold_resistance/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_trait(TRAIT_RESISTCOLD, "cold_resistance") -// owner.remove_trait(TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE + REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance") +// REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE /datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner) if(owner.getFireLoss()) diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index 7bcd056fab..0c760f4620 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -11,8 +11,8 @@ /datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_trait(TRAIT_STUNIMMUNE, TRAIT_HULK) - owner.add_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK) + ADD_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK) + ADD_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK) owner.update_body_parts() SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk) @@ -28,8 +28,8 @@ /datum/mutation/human/hulk/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_trait(TRAIT_STUNIMMUNE, TRAIT_HULK) - owner.remove_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK) + REMOVE_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK) + REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK) owner.update_body_parts() SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk") diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index 3f303535ce..d986672924 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -30,12 +30,12 @@ /datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_trait(TRAIT_MUTE, GENETIC_MUTATION) + ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION) /datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_trait(TRAIT_MUTE, GENETIC_MUTATION) + REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION) /datum/mutation/human/smile @@ -229,4 +229,4 @@ /datum/mutation/human/stoner/on_losing(mob/living/carbon/human/owner) ..() owner.grant_language(/datum/language/common) - owner.remove_language(/datum/language/beachbum) + owner.remove_language(/datum/language/beachbum) \ No newline at end of file diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 058c820f7a..22fca23902 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -281,3 +281,27 @@ suffix = "cloning_facility.dmm" name = "Ancient Cloning Lab" description = "An experimental cloning lab snapped off from an ancient ship. The cloner model inside lacks many modern functionalities and security measures." + +/datum/map_template/ruin/space/augmentation + id = "augmentationfacility" + suffix = "augmentationfacility.dmm" + name = "Roboticst Augmentation Facility" + description = "A mysterious lab in the depths of space containing robotics supplies and a one use autosurgeon." + +/datum/map_template/ruin/space/harambe + id = "bigape" + suffix = "bigape.dmm" + name = "Big Ape" + description = "A gorilla? Out here? But why." + +/datum/map_template/ruin/space/space_arcade + id = "arcade" + suffix = "arcade.dmm" + name = "Space Arcade" + description = "A lonely arcade in the depths of space." + +/datum/map_template/ruin/space/hermit + id = "spacehermit" + suffix = "spacehermit.dmm" + name = "Space Hermit" + description = "A late awakening cryo pod in a crashed escape pod wakes up to find what befell of his fellow survivors. Contains all the necessary resources to actually make it out alive. Good luck." diff --git a/code/datums/saymode.dm b/code/datums/saymode.dm index ed6edd11ab..c4f485653e 100644 --- a/code/datums/saymode.dm +++ b/code/datums/saymode.dm @@ -27,7 +27,7 @@ switch(M.lingcheck()) if (LINGHIVE_LING) var/mob/living/L = M - if (!L.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE)) to_chat(M, msg) if(LINGHIVE_LINK) to_chat(M, msg) @@ -35,7 +35,7 @@ if(prob(40)) to_chat(M, "We can faintly sense an outsider trying to communicate through the hivemind...") if(LINGHIVE_LING) - if (user.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE)) to_chat(user, "The poison in the air hinders our ability to interact with the hivemind.") return FALSE var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) @@ -52,7 +52,7 @@ to_chat(M, msg) if(LINGHIVE_LING) var/mob/living/L = M - if (!L.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE)) to_chat(M, msg) if(LINGHIVE_OUTSIDER) if(prob(40)) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index dd8ee1b166..0512977d1a 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -465,13 +465,13 @@ /datum/status_effect/hippocraticOath/on_apply() //Makes the user passive, it's in their oath not to harm! - owner.add_trait(TRAIT_PACIFISM, "hippocraticOath") + ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath") var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] H.add_hud_to(owner) return ..() /datum/status_effect/hippocraticOath/on_remove() - owner.remove_trait(TRAIT_PACIFISM, "hippocraticOath") + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath") var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] H.remove_hud_from(owner) diff --git a/code/datums/traits/_quirk.dm b/code/datums/traits/_quirk.dm index 963afacec3..cc6dd8db3f 100644 --- a/code/datums/traits/_quirk.dm +++ b/code/datums/traits/_quirk.dm @@ -21,7 +21,7 @@ to_chat(quirk_holder, gain_text) quirk_holder.roundstart_quirks += src if(mob_trait) - quirk_holder.add_trait(mob_trait, ROUNDSTART_TRAIT) + ADD_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT) START_PROCESSING(SSquirks, src) add() if(spawn_effects) @@ -35,7 +35,7 @@ to_chat(quirk_holder, lose_text) quirk_holder.roundstart_quirks -= src if(mob_trait) - quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT, TRUE) + REMOVE_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT) SSquirks.quirk_objects -= src return ..() @@ -43,8 +43,8 @@ quirk_holder.roundstart_quirks -= src to_mob.roundstart_quirks += src if(mob_trait) - quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT) - to_mob.add_trait(mob_trait, ROUNDSTART_TRAIT) + REMOVE_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT) + ADD_TRAIT(to_mob, mob_trait, ROUNDSTART_TRAIT) quirk_holder = to_mob on_transfer() @@ -111,7 +111,7 @@ Use this as a guideline mob_trait = TRAIT_NEARSIGHT ///This define is in __DEFINES/traits.dm and is the actual "trait" that the game tracks - ///You'll need to use "has_trait(X, sources)" checks around the code to check this; for instance, the Ageusia trait is checked in taste code + ///You'll need to use "HAS_TRAIT_FROM(src, X, sources)" checks around the code to check this; for instance, the Ageusia trait is checked in taste code ///If you need help finding where to put it, the declaration finder on GitHub is the best way to locate it gain_text = "Things far away from you start looking blurry." diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 513115b194..300a1264eb 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -35,6 +35,14 @@ lose_text = "You no longer feel like drinking would ease your pain." medical_record_text = "Patient has unusually efficient liver metabolism and can slowly regenerate wounds by drinking alcoholic beverages." +/datum/quirk/empath + name = "Empath" + desc = "Whether it's a sixth sense or careful study of body language, it only takes you a quick glance at someone to understand how they feel." + value = 2 + mob_trait = TRAIT_EMPATH + gain_text = "You feel in tune with those around you." + lose_text = "You feel isolated from others." + /datum/quirk/freerunning name = "Freerunning" desc = "You're great at quick moves! You can climb tables more quickly." @@ -43,6 +51,15 @@ gain_text = "You feel lithe on your feet!" lose_text = "You feel clumsy again." +/datum/quirk/friendly + name = "Friendly" + desc = "You give the best hugs, especially when you're in the right mood." + value = 1 + mob_trait = TRAIT_FRIENDLY + gain_text = "You want to hug someone." + lose_text = "You no longer feel compelled to hug others." + mood_quirk = TRUE + /datum/quirk/jolly name = "Jolly" desc = "You sometimes just feel happy, for no reason at all." diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 614cc65cbb..36c6733cf7 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -38,13 +38,13 @@ var/obj/item/heirloom_type switch(quirk_holder.mind.assigned_role) if("Clown") - heirloom_type = /obj/item/paint/anycolor - heirloom_type = /obj/item/bikehorn/golden + heirloom_type = pick(/obj/item/paint/anycolor, /obj/item/bikehorn/golden) if("Mime") - heirloom_type = /obj/item/paint/anycolor - heirloom_type = /obj/item/toy/dummy + heirloom_type = pick(/obj/item/paint/anycolor, /obj/item/toy/dummy) if("Cook") heirloom_type = /obj/item/kitchen/knife/scimitar + if("Botanist") + heirloom_type = pick(/obj/item/cultivator, /obj/item/reagent_containers/glass/bucket, /obj/item/storage/bag/plants, /obj/item/toy/plush/beeplushie) if("Medical Doctor") heirloom_type = /obj/item/healthanalyzer/advanced if("Station Engineer") @@ -60,7 +60,7 @@ if("Scientist") heirloom_type = /obj/item/toy/plush/slimeplushie if("Assistant") - heirloom_type = /obj/item/storage/toolbox/mechanical/old/heirloom + heirloom_type = /obj/item/clothing/gloves/cut/family if("Chaplain") heirloom_type = /obj/item/camera/spooky/family if("Captain") @@ -187,6 +187,41 @@ to_chat(quirk_holder, "Your antagonistic nature has caused you to renounce your pacifism.") qdel(src) +/datum/quirk/paraplegic + name = "Paraplegic" + desc = "Your legs do not function. Nothing will ever fix this. But hey, free wheelchair!" + value = -3 + mob_trait = TRAIT_PARA + human_only = TRUE + gain_text = null // Handled by trauma. + lose_text = null + medical_record_text = "Patient has an untreatable impairment in motor function in the lower extremities." + +/datum/quirk/paraplegic/add() + var/datum/brain_trauma/severe/paralysis/paraplegic/T = new() + var/mob/living/carbon/human/H = quirk_holder + H.gain_trauma(T, TRAUMA_RESILIENCE_ABSOLUTE) + +/datum/quirk/paraplegic/on_spawn() + if(quirk_holder.buckled) // Handle late joins being buckled to arrival shuttle chairs. + quirk_holder.buckled.unbuckle_mob(quirk_holder) + + var/turf/T = get_turf(quirk_holder) + var/obj/structure/chair/spawn_chair = locate() in T + + var/obj/vehicle/ridden/wheelchair/wheels = new(T) + if(spawn_chair) // Makes spawning on the arrivals shuttle more consistent looking + wheels.setDir(spawn_chair.dir) + + wheels.buckle_mob(quirk_holder) + + // During the spawning process, they may have dropped what they were holding, due to the paralysis + // So put the things back in their hands. + + for(var/obj/item/I in T) + if(I.fingerprintslast == quirk_holder.ckey) + quirk_holder.put_in_hands(I) + /datum/quirk/poor_aim name = "Poor Aim" desc = "You're terrible with guns and can't line up a straight shot to save your life. Dual-wielding is right out." @@ -208,8 +243,12 @@ var/slot_string = "limb" /datum/quirk/prosthetic_limb/on_spawn() - var/limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) var/mob/living/carbon/human/H = quirk_holder + var/limb_slot + if(HAS_TRAIT(H, TRAIT_PARA))//Prevent paraplegic legs being replaced + limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) + else + limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) var/obj/item/bodypart/old_part = H.get_bodypart(limb_slot) var/obj/item/bodypart/prosthetic switch(limb_slot) diff --git a/code/datums/weather/weather_types/radiation_storm.dm b/code/datums/weather/weather_types/radiation_storm.dm index 0906a7e053..f3b8118087 100644 --- a/code/datums/weather/weather_types/radiation_storm.dm +++ b/code/datums/weather/weather_types/radiation_storm.dm @@ -33,7 +33,7 @@ if(prob(40)) if(ishuman(L)) var/mob/living/carbon/human/H = L - if(H.dna && !H.has_trait(TRAIT_RADIMMUNE)) + if(H.dna && !HAS_TRAIT(H, TRAIT_RADIMMUNE)) if(prob(max(0,100-resist))) H.randmuti() if(prob(50)) diff --git a/code/datums/wires/microwave.dm b/code/datums/wires/microwave.dm new file mode 100644 index 0000000000..8c74abfa46 --- /dev/null +++ b/code/datums/wires/microwave.dm @@ -0,0 +1,27 @@ +/datum/wires/microwave + holder_type = /obj/machinery/microwave + proper_name = "Microwave" + +/datum/wires/microwave/New(atom/holder) + wires = list( + WIRE_ACTIVATE + ) + ..() + +/datum/wires/microwave/interactable(mob/user) + . = FALSE + var/obj/machinery/microwave/M = holder + if(M.panel_open) + . = TRUE + +/datum/wires/microwave/on_pulse(wire) + var/obj/machinery/microwave/M = holder + switch(wire) + if(WIRE_ACTIVATE) + M.cook() + +/datum/wires/microwave/on_cut(wire, mend) + var/obj/machinery/microwave/M = holder + switch(wire) + if(WIRE_ACTIVATE) + M.wire_disabled = !mend diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 10650153d6..dfbb59811b 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -76,7 +76,9 @@ GLOBAL_LIST_EMPTY(teleportlocs) continue if(GLOB.teleportlocs[AR.name]) continue - var/turf/picked = safepick(get_area_turfs(AR.type)) + if (!AR.contents.len) + continue + var/turf/picked = AR.contents[1] if (picked && is_station_level(picked.z)) GLOB.teleportlocs[AR.name] = AR @@ -120,6 +122,14 @@ GLOBAL_LIST_EMPTY(teleportlocs) if(!IS_DYNAMIC_LIGHTING(src)) add_overlay(/obj/effect/fullbright) + reg_in_areas_in_z() + + return INITIALIZE_HINT_LATELOAD + +/area/LateInitialize() + power_change() // all machines set to current power level, also updates icon + +/area/proc/reg_in_areas_in_z() if(contents.len) var/list/areas_in_z = SSmapping.areas_in_z var/z @@ -137,11 +147,6 @@ GLOBAL_LIST_EMPTY(teleportlocs) areas_in_z["[z]"] = list() areas_in_z["[z]"] += src - return INITIALIZE_HINT_LATELOAD - -/area/LateInitialize() - power_change() // all machines set to current power level, also updates icon - /area/Destroy() if(GLOB.areas_by_type[type] == src) GLOB.areas_by_type[type] = null diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 48596a0b6d..f2eb23808e 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -6,7 +6,6 @@ var/flags_1 = NONE var/interaction_flags_atom = NONE - var/container_type = NONE var/datum/reagents/reagents = null //This atom's HUD (med/sec, etc) images. Associative list. @@ -32,6 +31,8 @@ var/list/filter_data //For handling persistent filters + var/datum/component/orbiter/orbiters + var/rad_flags = NONE // Will move to flags_1 when i can be arsed to var/rad_insulation = RAD_NO_INSULATION @@ -203,16 +204,16 @@ return is_refillable() && is_drainable() /atom/proc/is_injectable(allowmobs = TRUE) - return reagents && (container_type & (INJECTABLE | REFILLABLE)) + return reagents && (reagents.reagents_holder_flags & (INJECTABLE | REFILLABLE)) /atom/proc/is_drawable(allowmobs = TRUE) - return reagents && (container_type & (DRAWABLE | DRAINABLE)) + return reagents && (reagents.reagents_holder_flags & (DRAWABLE | DRAINABLE)) /atom/proc/is_refillable() - return reagents && (container_type & REFILLABLE) + return reagents && (reagents.reagents_holder_flags & REFILLABLE) /atom/proc/is_drainable() - return reagents && (container_type & DRAINABLE) + return reagents && (reagents.reagents_holder_flags & DRAINABLE) /atom/proc/AllowDrop() @@ -261,7 +262,7 @@ to_chat(user, desc) if(reagents) - if(container_type & TRANSPARENT) + if(reagents.reagents_holder_flags & TRANSPARENT) to_chat(user, "It contains:") if(reagents.reagent_list.len) if(user.can_see_reagents()) //Show each individual reagent @@ -274,7 +275,7 @@ to_chat(user, "[total_volume] units of various reagents") else to_chat(user, "Nothing.") - else if(container_type & AMOUNT_VISIBLE) + else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE) if(reagents.total_volume) to_chat(user, "It has [reagents.total_volume] unit\s left.") else diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index e56f6d366c..f88f4f8e41 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -31,6 +31,8 @@ var/atom/movable/pulling var/grab_state = 0 var/throwforce = 0 + var/datum/component/orbiter/orbiting + var/can_be_z_moved = TRUE /atom/movable/vv_edit_var(var_name, var_value) var/static/list/banned_edits = list("step_x", "step_y", "step_size") @@ -295,14 +297,7 @@ if (length(client_mobs_in_contents)) update_parallax_contents() - if (orbiters) - for (var/thing in orbiters) - var/datum/orbit/O = thing - O.Check() - if (orbiting) - orbiting.Check() - - return 1 + return TRUE /atom/movable/Destroy(force) QDEL_NULL(proximity_monitor) @@ -324,6 +319,10 @@ if(pulledby) pulledby.stop_pulling() + if(orbiting) + orbiting.end_orbit(src) + orbiting = null + // Make sure you know what you're doing if you call this, this is intended to only be called by byond directly. // You probably want CanPass() /atom/movable/Cross(atom/movable/AM) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 3af43ffb78..8506a4133a 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -100,7 +100,7 @@ //helper for getting the appropriate health status /proc/RoundHealth(mob/living/M) - if(M.stat == DEAD || (M.has_trait(TRAIT_FAKEDEATH))) + if(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH))) return "health-100" //what's our health? it doesn't matter, we're dead, or faking var/maxi_health = M.maxHealth if(iscarbon(M) && M.health < 0) @@ -172,7 +172,7 @@ var/image/holder = hud_list[STATUS_HUD] var/icon/I = icon(icon, icon_state, dir) holder.pixel_y = I.Height() - world.icon_size - if(stat == DEAD || (has_trait(TRAIT_FAKEDEATH))) + if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) holder.icon_state = "huddead" else holder.icon_state = "hudhealthy" @@ -182,9 +182,9 @@ var/icon/I = icon(icon, icon_state, dir) var/virus_threat = check_virus() holder.pixel_y = I.Height() - world.icon_size - if(has_trait(TRAIT_XENO_HOST)) + if(HAS_TRAIT(src, TRAIT_XENO_HOST)) holder.icon_state = "hudxeno" - else if(stat == DEAD || (has_trait(TRAIT_FAKEDEATH))) + else if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) if(tod) var/tdelta = round(world.time - timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) @@ -242,7 +242,7 @@ var/icon/IC = icon(icon, icon_state, dir) holder.pixel_y = IC.Height() - world.icon_size holder.icon_state = "hud_imp_chem" - if(has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(src, TRAIT_MINDSHIELD)) holder = hud_list[IMPLOYAL_HUD] var/icon/IC = icon(icon, icon_state, dir) holder.pixel_y = IC.Height() - world.icon_size diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index d6513b5d40..a24d846f15 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -64,7 +64,7 @@ Credit where due: return FALSE if(isliving(M)) var/mob/living/L = M - if(L.has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(L, TRAIT_MINDSHIELD)) return FALSE if(ishuman(M) || isbrain(M) || isguardian(M) || issilicon(M) || isclockmob(M) || istype(M, /mob/living/simple_animal/drone/cogscarab) || istype(M, /mob/camera/eminence)) return TRUE @@ -131,7 +131,7 @@ Credit where due: config_tag = "clockwork_cult" antag_flag = ROLE_SERVANT_OF_RATVAR false_report_weight = 10 - required_players = 30 + required_players = 35 required_enemies = 3 recommended_enemies = 5 enemy_minimum_age = 7 diff --git a/code/game/gamemodes/clown_ops/clown_ops.dm b/code/game/gamemodes/clown_ops/clown_ops.dm index 12d3106c8d..a666b57afd 100644 --- a/code/game/gamemodes/clown_ops/clown_ops.dm +++ b/code/game/gamemodes/clown_ops/clown_ops.dm @@ -62,5 +62,6 @@ /datum/outfit/syndicate/clownop/leader name = "Clown Operative Leader - Basic" id = /obj/item/card/id/syndicate/nuke_leader + gloves = /obj/item/clothing/gloves/krav_maga/combatglovesplus r_hand = /obj/item/nuclear_challenge/clownops command_radio = TRUE diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 7b492e3a95..8f091b6372 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -26,7 +26,7 @@ return FALSE else return FALSE - if(M.has_trait(TRAIT_MINDSHIELD) || issilicon(M) || isbot(M) || isdrone(M) || is_servant_of_ratvar(M) || !M.client) + if(HAS_TRAIT(M, TRAIT_MINDSHIELD) || issilicon(M) || isbot(M) || isdrone(M) || is_servant_of_ratvar(M) || !M.client) return FALSE //can't convert machines, shielded, braindead, or ratvar's dogs return TRUE diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index d76552982c..615d55a818 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -137,6 +137,7 @@ /datum/outfit/syndicate/leader name = "Syndicate Leader - Basic" id = /obj/item/card/id/syndicate/nuke_leader + gloves = /obj/item/clothing/gloves/krav_maga/combatglovesplus r_hand = /obj/item/nuclear_challenge command_radio = TRUE diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 7532d18d06..f6b1def645 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -542,6 +542,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return checking.researched_nodes.len >= target_amount /datum/objective/capture + var/captured_amount = 0 /datum/objective/capture/proc/gen_amount_goal() target_amount = rand(5,10) @@ -549,8 +550,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) return target_amount /datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth. - var/captured_amount = 0 - var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding] + /*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding] for(var/mob/living/carbon/human/M in A)//Humans. if(M.stat == DEAD)//Dead folks are worth less. captured_amount+=0.5 @@ -573,7 +573,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) if(M.stat == DEAD) captured_amount+=1 continue - captured_amount+=2 + captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm return captured_amount >= target_amount diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 6603bb3604..e56495d808 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -124,7 +124,7 @@ /datum/objective_item/steal/plasma/check_special_completion(obj/item/tank/T) var/target_amount = text2num(name) var/found_amount = 0 - found_amount += T.air_contents.gases[/datum/gas/plasma] ? T.air_contents.gases[/datum/gas/plasma][MOLES] : 0 + found_amount += T.air_contents.gases[/datum/gas/plasma] return found_amount>=target_amount diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 53aebc53dc..45a3b59661 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -35,15 +35,14 @@ /obj/item/pda/clear, /obj/item/pda/syndicate, /obj/item/pda/chameleon, - /obj/item/pda/chameleon/broken) + /obj/item/pda/chameleon/broken, + /obj/item/pda/lieutenant) - for(var/P in typesof(/obj/item/pda) - blocked) - var/obj/item/pda/D = new P - - //D.name = "PDA Style [colorlist.len+1]" //Gotta set the name, otherwise it all comes up as "PDA" - D.name = D.icon_state //PDAs don't have unique names, but using the sprite names works. - - src.colorlist += D + for(var/A in typesof(/obj/item/pda) - blocked) + var/obj/item/pda/P = A + var/PDA_name = initial(P.name) + colorlist += PDA_name + colorlist[PDA_name] = list(initial(P.icon_state), initial(P.desc), initial(P.overlays_offsets), initial(P.overlays_icons)) /obj/machinery/pdapainter/Destroy() QDEL_NULL(storedpda) @@ -108,22 +107,20 @@ if(.) return - if(storedpda) - var/obj/item/pda/P - P = input(user, "Select your color!", "PDA Painting") as null|anything in colorlist - if(!P) - return - if(!in_range(src, user)) - return - if(!storedpda)//is the pda still there? - return - storedpda.icon_state = P.icon_state - storedpda.desc = P.desc - ejectpda() - - else + if(!storedpda) to_chat(user, "[src] is empty.") - + return + var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist + if(!choice || !storedpda || !in_range(src, user)) + return + var/list/P = colorlist[choice] + storedpda.icon_state = P[1] + storedpda.desc = P[2] + storedpda.overlays_offsets = P[3] + storedpda.overlays_icons = P[4] + storedpda.set_new_overlays() + storedpda.update_icon() + ejectpda() /obj/machinery/pdapainter/verb/ejectpda() set name = "Eject PDA" diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index ac975c2ffd..7da6cec9cd 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -168,9 +168,11 @@ Class Procs: update_icon() updateUsrDialog() -/obj/machinery/proc/dropContents() +/obj/machinery/proc/dropContents(list/subset = null) var/turf/T = get_turf(src) for(var/atom/movable/A in contents) + if(subset && !(A in subset)) + continue A.forceMove(T) if(isliving(A)) var/mob/living/L = A diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d3b5e53a1b..36a5c6ede4 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -182,11 +182,11 @@ //Get the clone body ready maim_clone(H) - H.add_trait(TRAIT_STABLEHEART, "cloning") - H.add_trait(TRAIT_EMOTEMUTE, "cloning") - H.add_trait(TRAIT_MUTE, "cloning") - H.add_trait(TRAIT_NOBREATH, "cloning") - H.add_trait(TRAIT_NOCRITDAMAGE, "cloning") + ADD_TRAIT(H, TRAIT_STABLEHEART, "cloning") + ADD_TRAIT(H, TRAIT_EMOTEMUTE, "cloning") + ADD_TRAIT(H, TRAIT_MUTE, "cloning") + ADD_TRAIT(H, TRAIT_NOBREATH, "cloning") + ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, "cloning") H.Unconscious(80) clonemind.transfer_to(H) @@ -361,11 +361,11 @@ if(!mob_occupant) return - mob_occupant.remove_trait(TRAIT_STABLEHEART, "cloning") - mob_occupant.remove_trait(TRAIT_EMOTEMUTE, "cloning") - mob_occupant.remove_trait(TRAIT_MUTE, "cloning") - mob_occupant.remove_trait(TRAIT_NOCRITDAMAGE, "cloning") - mob_occupant.remove_trait(TRAIT_NOBREATH, "cloning") + REMOVE_TRAIT(mob_occupant, TRAIT_STABLEHEART, "cloning") + REMOVE_TRAIT(mob_occupant, TRAIT_EMOTEMUTE, "cloning") + REMOVE_TRAIT(mob_occupant, TRAIT_MUTE, "cloning") + REMOVE_TRAIT(mob_occupant, TRAIT_NOCRITDAMAGE, "cloning") + REMOVE_TRAIT(mob_occupant, TRAIT_NOBREATH, "cloning") if(grab_ghost_when == CLONER_MATURE_CLONE) mob_occupant.grab_ghost() @@ -452,7 +452,7 @@ // brain function, they also have no limbs or internal organs. - if(!H.has_trait(TRAIT_NODISMEMBER)) + if(!HAS_TRAIT(H, TRAIT_NODISMEMBER)) var/static/list/zones = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) for(var/zone in zones) var/obj/item/bodypart/BP = H.get_bodypart(zone) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 1f262c0979..8d0cfb95e8 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,3 +1,9 @@ +#define ARCADE_WEIGHT_TRICK 4 +#define ARCADE_WEIGHT_USELESS 2 +#define ARCADE_WEIGHT_RARE 1 +#define ARCADE_WEIGHT_PLUSH 65 + + /obj/machinery/computer/arcade name = "random arcade" desc = "random arcade machine" @@ -6,55 +12,64 @@ icon_screen = "invaders" clockwork = TRUE //it'd look weird var/list/prizes = list( - /obj/item/storage/box/snappops = 8, - /obj/item/toy/talking/AI = 8, - /obj/item/toy/talking/codex_gigas = 8, - /obj/item/clothing/under/syndicate/tacticool = 8, - /obj/item/toy/sword = 8, - /obj/item/toy/gun = 8, - /obj/item/gun/ballistic/shotgun/toy/crossbow = 8, - /obj/item/storage/box/fakesyndiesuit = 8, - /obj/item/storage/crayons = 8, - /obj/item/toy/spinningtoy = 8, - /obj/item/toy/prize/ripley = 4, - /obj/item/toy/prize/fireripley = 4, - /obj/item/toy/prize/deathripley = 4, - /obj/item/toy/prize/gygax = 4, - /obj/item/toy/prize/durand = 4, - /obj/item/toy/prize/honk = 4, - /obj/item/toy/prize/marauder = 4, - /obj/item/toy/prize/seraph = 4, - /obj/item/toy/prize/mauler = 4, - /obj/item/toy/prize/odysseus = 4, - /obj/item/toy/prize/phazon = 4, - /obj/item/toy/prize/reticence = 4, - /obj/item/toy/cards/deck = 8, - /obj/item/toy/nuke = 8, - /obj/item/toy/minimeteor = 8, - /obj/item/toy/redbutton = 8, - /obj/item/toy/talking/owl = 8, - /obj/item/toy/talking/griffin = 8, - /obj/item/coin/antagtoken = 8, - /obj/item/stack/tile/fakespace/loaded = 8, - /obj/item/stack/tile/fakepit/loaded = 8, - /obj/item/toy/toy_xeno = 8, - /obj/item/storage/box/actionfigure = 4, - /obj/item/restraints/handcuffs/fake = 8, - /obj/item/grenade/chem_grenade/glitter/pink = 4, - /obj/item/grenade/chem_grenade/glitter/blue = 4, - /obj/item/grenade/chem_grenade/glitter/white = 4, - /obj/item/toy/eightball = 8, - /obj/item/toy/windupToolbox = 8, - /obj/item/toy/clockwork_watch = 8, - /obj/item/toy/toy_dagger = 8, - /obj/item/extendohand/acme = 4, - /obj/item/hot_potato/harmless/toy = 4, - /obj/item/card/emagfake = 4, - /obj/item/clothing/shoes/wheelys = 8, - /obj/item/clothing/shoes/kindleKicks = 8, - /obj/item/storage/belt/military/snack = 8, - /obj/item/toy/plush/random = 450 - )//plushies have a 0.6 chance + /obj/item/toy/balloon = ARCADE_WEIGHT_USELESS, + /obj/item/toy/beach_ball = ARCADE_WEIGHT_USELESS, + /obj/item/toy/cattoy = ARCADE_WEIGHT_USELESS, + /obj/item/toy/clockwork_watch = ARCADE_WEIGHT_TRICK, + /obj/item/toy/dummy = ARCADE_WEIGHT_TRICK, + /obj/item/toy/eightball = ARCADE_WEIGHT_USELESS, + /obj/item/toy/eightball/haunted = ARCADE_WEIGHT_RARE, + /obj/item/storage/box/actionfigure = ARCADE_WEIGHT_USELESS, + /obj/item/toy/foamblade = ARCADE_WEIGHT_TRICK, + /obj/item/toy/gun = ARCADE_WEIGHT_TRICK, + /obj/item/toy/gun/justicar = ARCADE_WEIGHT_TRICK, + /obj/item/toy/gun/m41 = ARCADE_WEIGHT_TRICK, + /obj/item/toy/katana = ARCADE_WEIGHT_TRICK, + /obj/item/toy/minimeteor = ARCADE_WEIGHT_TRICK, + /obj/item/toy/nuke = ARCADE_WEIGHT_TRICK, + /obj/item/toy/plush/random = ARCADE_WEIGHT_PLUSH, + /obj/item/toy/redbutton = ARCADE_WEIGHT_TRICK, + /obj/item/toy/spinningtoy = ARCADE_WEIGHT_TRICK, + /obj/item/toy/sword = ARCADE_WEIGHT_TRICK, + /obj/item/toy/sword/cx = ARCADE_WEIGHT_TRICK, + /obj/item/toy/talking/AI = ARCADE_WEIGHT_USELESS, + /obj/item/toy/talking/codex_gigas = ARCADE_WEIGHT_USELESS, + /obj/item/toy/talking/griffin = ARCADE_WEIGHT_USELESS, + /obj/item/toy/talking/owl = ARCADE_WEIGHT_USELESS, + /obj/item/toy/toy_dagger = ARCADE_WEIGHT_TRICK, + /obj/item/toy/toy_xeno = ARCADE_WEIGHT_TRICK, + /obj/item/toy/windupToolbox = ARCADE_WEIGHT_TRICK, + + /mob/living/simple_animal/bot/secbot/grievous/toy = ARCADE_WEIGHT_RARE, + /obj/item/clothing/mask/facehugger/toy = ARCADE_WEIGHT_RARE, + /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = ARCADE_WEIGHT_TRICK, + /obj/item/hot_potato/harmless/toy = ARCADE_WEIGHT_RARE, + /obj/item/twohanded/dualsaber/toy = ARCADE_WEIGHT_RARE, + /obj/item/twohanded/hypereutactic/toy = ARCADE_WEIGHT_RARE, + /obj/item/twohanded/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE, + + /obj/item/storage/box/snappops = ARCADE_WEIGHT_TRICK, + /obj/item/clothing/under/syndicate/tacticool = ARCADE_WEIGHT_TRICK, + /obj/item/gun/ballistic/shotgun/toy/crossbow = ARCADE_WEIGHT_TRICK, + /obj/item/storage/box/fakesyndiesuit = ARCADE_WEIGHT_TRICK, + /obj/item/storage/crayons = ARCADE_WEIGHT_USELESS, + /obj/item/coin/antagtoken = ARCADE_WEIGHT_USELESS, + /obj/item/stack/tile/fakespace/loaded = ARCADE_WEIGHT_TRICK, + /obj/item/stack/tile/fakepit/loaded = ARCADE_WEIGHT_TRICK, + /obj/item/restraints/handcuffs/fake = ARCADE_WEIGHT_TRICK, + + /obj/item/grenade/chem_grenade/glitter/pink = ARCADE_WEIGHT_TRICK, + /obj/item/grenade/chem_grenade/glitter/blue = ARCADE_WEIGHT_TRICK, + /obj/item/grenade/chem_grenade/glitter/white = ARCADE_WEIGHT_TRICK, + + /obj/item/extendohand/acme = ARCADE_WEIGHT_TRICK, + /obj/item/card/emagfake = ARCADE_WEIGHT_TRICK, + /obj/item/clothing/shoes/wheelys = ARCADE_WEIGHT_RARE, + /obj/item/clothing/shoes/kindleKicks = ARCADE_WEIGHT_RARE, + /obj/item/storage/belt/military/snack = ARCADE_WEIGHT_RARE, + + /obj/item/clothing/mask/fakemoustache/italian = ARCADE_WEIGHT_RARE + ) light_color = LIGHT_COLOR_GREEN @@ -66,20 +81,32 @@ // If it's a generic arcade machine, pick a random arcade // circuit board for it and make the new machine if(!circuit) - var/choice = pick(subtypesof(/obj/item/circuitboard/computer/arcade)) - var/obj/item/circuitboard/CB = new choice() + var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 33, + /obj/item/circuitboard/computer/arcade/orion_trail = 33, + /obj/item/circuitboard/computer/arcade/minesweeper = 33, + /obj/item/circuitboard/computer/arcade/amputation = 2) + var/thegame = pickweight(gameodds) + var/obj/item/circuitboard/CB = new thegame() new CB.build_path(loc, CB) return INITIALIZE_HINT_QDEL Reset() -/obj/machinery/computer/arcade/proc/prizevend(mob/user) +/obj/machinery/computer/arcade/proc/prizevend(mob/user, list/rarity_classes) SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "arcade", /datum/mood_event/arcade) - if(prob(0.0001)) //1 in a million + + if(prob(1) && prob(1) && prob(1)) //Proper 1 in a million new /obj/item/gun/energy/pulse/prize(src) SSmedals.UnlockMedal(MEDAL_PULSE, usr.client) if(!contents.len) - var/prizeselect = pickweight(prizes) + var/list/toy_raffle + if(rarity_classes) + for(var/A in prizes) + if(prizes[A] in rarity_classes) + LAZYSET(toy_raffle, A, prizes[A]) + if(!toy_raffle) + toy_raffle = prizes + var/prizeselect = pickweight(toy_raffle) new prizeselect(src) var/atom/movable/prize = pick(contents) @@ -104,1020 +131,3 @@ empprize = pickweight(prizes) new empprize(loc) explosion(loc, -1, 0, 1+num_of_prizes, flame_range = 1+num_of_prizes) - - -// ** BATTLE ** // - - -/obj/machinery/computer/arcade/battle - name = "arcade machine" - desc = "Does not support Pinball." - icon_state = "arcade" - circuit = /obj/item/circuitboard/computer/arcade/battle - var/enemy_name = "Space Villain" - var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = FALSE - var/blocked = FALSE //Player cannot attack/heal while set - var/turtle = 0 - -/obj/machinery/computer/arcade/battle/Reset() - var/name_action - var/name_part1 - var/name_part2 - - name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ", "Ban ") - - name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") - name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers") - - enemy_name = replacetext((name_part1 + name_part2), "the ", "") - name = (name_action + name_part1 + name_part2) - -/obj/machinery/computer/arcade/battle/ui_interact(mob/user) - . = ..() - var/dat = "Close" - dat += "

[enemy_name]

" - - dat += "

[temp]

" - dat += "
Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]
" - - if (gameover) - dat += "
New Game" - else - dat += "
Attack | " - dat += "Heal | " - dat += "Recharge Power" - - dat += "
" - var/datum/browser/popup = new(user, "arcade", "Space Villain 2000") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) - popup.open() - -/obj/machinery/computer/arcade/battle/Topic(href, href_list) - if(..()) - return - - if (!blocked && !gameover) - if (href_list["attack"]) - blocked = TRUE - var/attackamt = rand(2,6) - temp = "You attack for [attackamt] damage!" - playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) - updateUsrDialog() - if(turtle > 0) - turtle-- - - sleep(10) - enemy_hp -= attackamt - arcade_action(usr) - - else if (href_list["heal"]) - blocked = TRUE - var/pointamt = rand(1,3) - var/healamt = rand(6,8) - temp = "You use [pointamt] magic to heal for [healamt] damage!" - playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) - updateUsrDialog() - turtle++ - - sleep(10) - player_mp -= pointamt - player_hp += healamt - blocked = TRUE - updateUsrDialog() - arcade_action(usr) - - else if (href_list["charge"]) - blocked = TRUE - var/chargeamt = rand(4,7) - temp = "You regain [chargeamt] points" - playsound(loc, 'sound/arcade/mana.ogg', 50, 1, extrarange = -3, falloff = 10) - player_mp += chargeamt - if(turtle > 0) - turtle-- - - updateUsrDialog() - sleep(10) - arcade_action(usr) - - if (href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - - else if (href_list["newgame"]) //Reset everything - temp = "New Round" - player_hp = 30 - player_mp = 10 - enemy_hp = 45 - enemy_mp = 20 - gameover = FALSE - turtle = 0 - - if(obj_flags & EMAGGED) - Reset() - obj_flags &= ~EMAGGED - - add_fingerprint(usr) - updateUsrDialog() - return - -/obj/machinery/computer/arcade/battle/proc/arcade_action(mob/user) - if ((enemy_mp <= 0) || (enemy_hp <= 0)) - if(!gameover) - gameover = TRUE - temp = "[enemy_name] has fallen! Rejoice!" - playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) - - if(obj_flags & EMAGGED) - new /obj/effect/spawner/newbomb/timer/syndicate(loc) - new /obj/item/clothing/head/collectable/petehat(loc) - message_admins("[ADMIN_LOOKUPFLW(usr)] has outbombed Cuban Pete and been awarded a bomb.") - log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") - Reset() - obj_flags &= ~EMAGGED - else - prizevend(user) - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (obj_flags & EMAGGED ? "emagged":"normal"))) - - - else if ((obj_flags & EMAGGED) && (turtle >= 4)) - var/boomamt = rand(5,10) - temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!" - playsound(loc, 'sound/arcade/boom.ogg', 50, 1, extrarange = -3, falloff = 10) - player_hp -= boomamt - - else if ((enemy_mp <= 5) && (prob(70))) - var/stealamt = rand(2,3) - temp = "[enemy_name] steals [stealamt] of your power!" - playsound(loc, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 10) - player_mp -= stealamt - updateUsrDialog() - - if (player_mp <= 0) - gameover = TRUE - sleep(10) - temp = "You have been drained! GAME OVER" - playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) - if(obj_flags & EMAGGED) - usr.gib() - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal"))) - - else if ((enemy_hp <= 10) && (enemy_mp > 4)) - temp = "[enemy_name] heals for 4 health!" - playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) - enemy_hp += 4 - enemy_mp -= 4 - - else - var/attackamt = rand(3,6) - temp = "[enemy_name] attacks for [attackamt] damage!" - playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) - player_hp -= attackamt - - if ((player_mp <= 0) || (player_hp <= 0)) - gameover = TRUE - temp = "You have been crushed! GAME OVER" - playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) - if(obj_flags & EMAGGED) - usr.gib() - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal"))) - - blocked = FALSE - return - - -/obj/machinery/computer/arcade/battle/emag_act(mob/user) - if(obj_flags & EMAGGED) - return - to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") - temp = "If you die in the game, you die for real!" - player_hp = 30 - player_mp = 10 - enemy_hp = 45 - enemy_mp = 20 - gameover = FALSE - blocked = FALSE - - obj_flags |= EMAGGED - - enemy_name = "Cuban Pete" - name = "Outbomb Cuban Pete" - - - updateUsrDialog() - - - -// *** THE ORION TRAIL ** // - -#define ORION_TRAIL_WINTURN 9 - -//Orion Trail Events -#define ORION_TRAIL_RAIDERS "Raiders" -#define ORION_TRAIL_FLUX "Interstellar Flux" -#define ORION_TRAIL_ILLNESS "Illness" -#define ORION_TRAIL_BREAKDOWN "Breakdown" -#define ORION_TRAIL_LING "Changelings?" -#define ORION_TRAIL_LING_ATTACK "Changeling Ambush" -#define ORION_TRAIL_MALFUNCTION "Malfunction" -#define ORION_TRAIL_COLLISION "Collision" -#define ORION_TRAIL_SPACEPORT "Spaceport" -#define ORION_TRAIL_BLACKHOLE "BlackHole" - -#define ORION_STATUS_START 1 -#define ORION_STATUS_NORMAL 2 -#define ORION_STATUS_GAMEOVER 3 -#define ORION_STATUS_MARKET 4 - -/obj/machinery/computer/arcade/orion_trail - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - icon_state = "arcade" - circuit = /obj/item/circuitboard/computer/arcade/orion_trail - var/busy = FALSE //prevent clickspam that allowed people to ~speedrun~ the game. - var/engine = 0 - var/hull = 0 - var/electronics = 0 - var/food = 80 - var/fuel = 60 - var/turns = 4 - var/alive = 4 - var/eventdat = null - var/event = null - var/list/settlers = list("Harry","Larry","Bob") - var/list/events = list(ORION_TRAIL_RAIDERS = 3, - ORION_TRAIL_FLUX = 1, - ORION_TRAIL_ILLNESS = 3, - ORION_TRAIL_BREAKDOWN = 2, - ORION_TRAIL_LING = 3, - ORION_TRAIL_MALFUNCTION = 2, - ORION_TRAIL_COLLISION = 1, - ORION_TRAIL_SPACEPORT = 2 - ) - var/list/stops = list() - var/list/stopblurbs = list() - var/lings_aboard = 0 - var/spaceport_raided = 0 - var/spaceport_freebie = 0 - var/last_spaceport_action = "" - var/gameStatus = ORION_STATUS_START - var/canContinueEvent = 0 - -/obj/machinery/computer/arcade/orion_trail/kobayashi - name = "Kobayashi Maru control computer" - desc = "A test for cadets" - icon = 'icons/obj/machines/particle_accelerator.dmi' - icon_state = "control_boxp" - events = list("Raiders" = 3, "Interstellar Flux" = 1, "Illness" = 3, "Breakdown" = 2, "Malfunction" = 2, "Collision" = 1, "Spaceport" = 2) - prizes = list(/obj/item/paper/fluff/holodeck/trek_diploma = 1) - settlers = list("Kirk","Worf","Gene") - -/obj/machinery/computer/arcade/orion_trail/Reset() - // Sets up the main trail - stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") - stopblurbs = list( - "Pluto, long since occupied with long-range sensors and scanners, stands ready to, and indeed continues to probe the far reaches of the galaxy.", - "At the edge of the Sol system lies a treacherous asteroid belt. Many have been crushed by stray asteroids and misguided judgement.", - "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now a low-population sanctuary for adventurers and traders.", - "This region of space is particularly devoid of matter. Such low-density pockets are known to exist, but the vastness of it is astounding.", - "Rigel Prime, the center of the Rigel system, burns hot, basking its planetary bodies in warmth and radiation.", - "Tau Ceti Beta has recently become a waypoint for colonists headed towards Orion. There are many ships and makeshift stations in the vicinity.", - "Sensors indicate that a black hole's gravitational field is affecting the region of space we were headed through. We could stay of course, but risk of being overcome by its gravity, or we could change course to go around, which will take longer.", - "You have come into range of the first man-made structure in this region of space. It has been constructed not by travellers from Sol, but by colonists from Orion. It stands as a monument to the colonists' success.", - "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" - ) - -/obj/machinery/computer/arcade/orion_trail/proc/newgame() - // Set names of settlers in crew - settlers = list() - for(var/i = 1; i <= 3; i++) - add_crewmember() - add_crewmember("[usr]") - // Re-set items to defaults - engine = 1 - hull = 1 - electronics = 1 - food = 80 - fuel = 60 - alive = 4 - turns = 1 - event = null - gameStatus = ORION_STATUS_NORMAL - lings_aboard = 0 - - //spaceport junk - spaceport_raided = 0 - spaceport_freebie = 0 - last_spaceport_action = "" - -/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user) - . = ..() - if(fuel <= 0 || food <=0 || settlers.len == 0) - gameStatus = ORION_STATUS_GAMEOVER - event = null - var/dat = "" - if(gameStatus == ORION_STATUS_GAMEOVER) - dat = "

Game Over

" - dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." - if(!settlers.len) - dat += "
Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy." - else - if(food <= 0) - dat += "
You ran out of food and starved." - if(obj_flags & EMAGGED) - user.nutrition = 0 //yeah you pretty hongry - to_chat(user, "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.") - if(fuel <= 0) - dat += "
You ran out of fuel, and drift, slowly, into a star." - if(obj_flags & EMAGGED) - var/mob/living/M = user - M.adjust_fire_stacks(5) - M.IgniteMob() //flew into a star, so you're on fire - to_chat(user, "You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.") - - if(obj_flags & EMAGGED) - to_chat(user, "You're never going to make it to Orion...") - user.death() - obj_flags &= ~EMAGGED //removes the emagged status after you lose - gameStatus = ORION_STATUS_START - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - - dat += "

May They Rest In Peace

" - else if(event) - dat = eventdat - else if(gameStatus == ORION_STATUS_NORMAL) - var/title = stops[turns] - var/subtext = stopblurbs[turns] - dat = "

[title]

" - dat += "[subtext]" - dat += "

Crew:

" - dat += english_list(settlers) - dat += "
Food: [food] | Fuel: [fuel]" - dat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" - if(turns == 7) - dat += "

Go Around Continue

" - else - dat += "

Continue

" - dat += "

Kill a Crewmember

" - dat += "

Close

" - else - dat = "

The Orion Trail

" - dat += "

Experience the journey of your ancestors!



" - dat += "
New Game
" - dat += "

Close

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail",400,700) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) - popup.open() - return - -/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) - if(..()) - return - if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - - if(busy) - return - busy = TRUE - - if (href_list["continue"]) //Continue your travels - if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) - if(turns >= ORION_TRAIL_WINTURN) - win(usr) - else - food -= (alive+lings_aboard)*2 - fuel -= 5 - if(turns == 2 && prob(30)) - event = ORION_TRAIL_COLLISION - event() - else if(prob(75)) - event = pickweight(events) - if(lings_aboard) - if(event == ORION_TRAIL_LING || prob(55)) - event = ORION_TRAIL_LING_ATTACK - event() - turns += 1 - if(obj_flags & EMAGGED) - var/mob/living/carbon/M = usr //for some vars - switch(event) - if(ORION_TRAIL_RAIDERS) - if(prob(50)) - to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") - M.hallucination += 30 - else - to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") - M.take_bodypart_damage(30) - playsound(loc, 'sound/weapons/genhit2.ogg', 100, 1) - if(ORION_TRAIL_ILLNESS) - var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS - if(severity == 1) - to_chat(M, "You suddenly feel slightly nauseated." ) - if(severity == 2) - to_chat(usr, "You suddenly feel extremely nauseated and hunch over until it passes.") - M.Stun(60) - if(severity >= 3) //you didn't pray hard enough - to_chat(M, "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.") - M.Stun(100) - sleep(30) - M.vomit(10, distance = 5) - if(ORION_TRAIL_FLUX) - if(prob(75)) - M.Knockdown(60) - say("A sudden gust of powerful wind slams [M] into the floor!") - M.take_bodypart_damage(25) - playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) - else - to_chat(M, "A violent gale blows past you, and you barely manage to stay standing!") - if(ORION_TRAIL_COLLISION) //by far the most damaging event - if(prob(90)) - playsound(loc, 'sound/effects/bang.ogg', 100, 1) - var/turf/open/floor/F - for(F in orange(1, src)) - F.ScrapeAway() - say("Something slams into the floor around [src], exposing it to space!") - if(hull) - sleep(10) - say("A new floor suddenly appears around [src]. What the hell?") - playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) - var/turf/open/space/T - for(T in orange(1, src)) - T.PlaceOnTop(/turf/open/floor/plating) - else - say("Something slams into the floor around [src] - luckily, it didn't get through!") - playsound(loc, 'sound/effects/bang.ogg', 50, 1) - if(ORION_TRAIL_MALFUNCTION) - playsound(loc, 'sound/effects/empulse.ogg', 50, 1) - visible_message("[src] malfunctions, randomizing in-game stats!") - var/oldfood = food - var/oldfuel = fuel - food = rand(10,80) / rand(1,2) - fuel = rand(10,60) / rand(1,2) - if(electronics) - sleep(10) - if(oldfuel > fuel && oldfood > food) - audible_message("[src] lets out a somehow reassuring chime.") - else if(oldfuel < fuel || oldfood < food) - audible_message("[src] lets out a somehow ominous chime.") - food = oldfood - fuel = oldfuel - playsound(loc, 'sound/machines/chime.ogg', 50, 1) - - else if(href_list["newgame"]) //Reset everything - if(gameStatus == ORION_STATUS_START) - newgame() - else if(href_list["menu"]) //back to the main menu - if(gameStatus == ORION_STATUS_GAMEOVER) - gameStatus = ORION_STATUS_START - event = null - food = 80 - fuel = 60 - settlers = list("Harry","Larry","Bob") - else if(href_list["slow"]) //slow down - if(event == ORION_TRAIL_FLUX) - food -= (alive+lings_aboard)*2 - fuel -= 5 - event = null - else if(href_list["pastblack"]) //slow down - if(turns == 7) - food -= ((alive+lings_aboard)*2)*3 - fuel -= 15 - turns += 1 - event = null - else if(href_list["useengine"]) //use parts - if(event == ORION_TRAIL_BREAKDOWN) - engine = max(0, --engine) - event = null - else if(href_list["useelec"]) //use parts - if(event == ORION_TRAIL_MALFUNCTION) - electronics = max(0, --electronics) - event = null - else if(href_list["usehull"]) //use parts - if(event == ORION_TRAIL_COLLISION) - hull = max(0, --hull) - event = null - else if(href_list["wait"]) //wait 3 days - if(event == ORION_TRAIL_BREAKDOWN || event == ORION_TRAIL_MALFUNCTION || event == ORION_TRAIL_COLLISION) - food -= ((alive+lings_aboard)*2)*3 - event = null - else if(href_list["keepspeed"]) //keep speed - if(event == ORION_TRAIL_FLUX) - if(prob(75)) - event = "Breakdown" - event() - else - event = null - else if(href_list["blackhole"]) //keep speed past a black hole - if(turns == 7) - if(prob(75)) - event = ORION_TRAIL_BLACKHOLE - event() - if(obj_flags & EMAGGED) - playsound(loc, 'sound/effects/supermatter.ogg', 100, 1) - say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!") - if(isliving(usr)) - var/mob/living/L = usr - L.Stun(200, ignore_canstun = TRUE) //you can't run :^) - var/S = new /obj/singularity/academy(usr.loc) - addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) - QDEL_IN(S, 50) - else - event = null - turns += 1 - else if(href_list["holedeath"]) - if(event == ORION_TRAIL_BLACKHOLE) - gameStatus = ORION_STATUS_GAMEOVER - event = null - else if(href_list["eventclose"]) //end an event - if(canContinueEvent) - event = null - - else if(href_list["killcrew"]) //shoot a crewmember - if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_LING) - var/sheriff = remove_crewmember() //I shot the sheriff - playsound(loc,'sound/weapons/gunshot.ogg', 100, 1) - - if(settlers.len == 0 || alive == 0) - say("The last crewmember [sheriff], shot themselves, GAME OVER!") - if(obj_flags & EMAGGED) - usr.death(0) - obj_flags &= EMAGGED - gameStatus = ORION_STATUS_GAMEOVER - event = null - else if(obj_flags & EMAGGED) - if(usr.name == sheriff) - say("The crew of the ship chose to kill [usr.name]!") - usr.death(0) - - if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places - event = null - - //Spaceport specific interactions - //they get a header because most of them don't reset event (because it's a shop, you leave when you want to) - //they also call event() again, to regen the eventdata, which is kind of odd but necessary - else if(href_list["buycrew"]) //buy a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && food >= 10 && fuel >= 10) - var/bought = add_crewmember() - last_spaceport_action = "You hired [bought] as a new crewmember." - fuel -= 10 - food -= 10 - event() - - else if(href_list["sellcrew"]) //sell a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && settlers.len > 1) - var/sold = remove_crewmember() - last_spaceport_action = "You sold your crewmember, [sold]!" - fuel += 7 - food += 7 - event() - - else if(href_list["leave_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - event = null - gameStatus = ORION_STATUS_NORMAL - spaceport_raided = 0 - spaceport_freebie = 0 - last_spaceport_action = "" - - else if(href_list["raid_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - var/success = min(15 * alive,100) //default crew (4) have a 60% chance - spaceport_raided = 1 - - var/FU = 0 - var/FO = 0 - if(prob(success)) - FU = rand(5,15) - FO = rand(5,15) - last_spaceport_action = "You successfully raided the spaceport! You gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" - else - FU = rand(-5,-15) - FO = rand(-5,-15) - last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" - - //your chance of lose a crewmember is 1/2 your chance of success - //this makes higher % failures hurt more, don't get cocky space cowboy! - if(prob(success*5)) - var/lost_crew = remove_crewmember() - last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" - if(obj_flags & EMAGGED) - say("WEEWOO! WEEWOO! Spaceport security en route!") - playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE) - for(var/i, i<=3, i++) - var/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion(get_turf(src)) - O.target = usr - - - fuel += FU - food += FO - event() - - else if(href_list["buyparts"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && fuel > 5) - switch(text2num(href_list["buyparts"])) - if(1) //Engine Parts - engine++ - last_spaceport_action = "Bought Engine Parts" - if(2) //Hull Plates - hull++ - last_spaceport_action = "Bought Hull Plates" - if(3) //Spare Electronics - electronics++ - last_spaceport_action = "Bought Spare Electronics" - fuel -= 5 //they all cost 5 - event() - - else if(href_list["trade"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - switch(text2num(href_list["trade"])) - if(1) //Fuel - if(fuel > 5) - fuel -= 5 - food += 5 - last_spaceport_action = "Traded Fuel for Food" - event() - if(2) //Food - if(food > 5) - fuel += 5 - food -= 5 - last_spaceport_action = "Traded Food for Fuel" - event() - - add_fingerprint(usr) - updateUsrDialog() - busy = FALSE - return - - -/obj/machinery/computer/arcade/orion_trail/proc/event() - eventdat = "

[event]

" - canContinueEvent = 0 - switch(event) - if(ORION_TRAIL_RAIDERS) - eventdat += "Raiders have come aboard your ship!" - if(prob(50)) - var/sfood = rand(1,10) - var/sfuel = rand(1,10) - food -= sfood - fuel -= sfuel - eventdat += "
They have stolen [sfood] Food and [sfuel] Fuel." - else if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] tried to fight back, but was killed." - else - eventdat += "
Fortunately, you fended them off without any trouble." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_FLUX) - eventdat += "This region of space is highly turbulent.
If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies." - eventdat += "
What will you do?" - eventdat += "

Slow Down Continue

" - eventdat += "

Close

" - - if(ORION_TRAIL_ILLNESS) - eventdat += "A deadly illness has been contracted!" - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by the disease." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_BREAKDOWN) - eventdat += "Oh no! The engine has broken down!" - eventdat += "
You can repair it with an engine part, or you can make repairs for 3 days." - if(engine >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_MALFUNCTION) - eventdat += "The ship's systems are malfunctioning!" - eventdat += "
You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI." - if(electronics >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_COLLISION) - eventdat += "Something hit us! Looks like there's some hull damage." - if(prob(25)) - var/sfood = rand(5,15) - var/sfuel = rand(5,15) - food -= sfood - fuel -= sfuel - eventdat += "
[sfood] Food and [sfuel] Fuel was vented out into space." - if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by rapid depressurization." - eventdat += "
You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together." - if(hull >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_BLACKHOLE) - eventdat += "You were swept away into the black hole." - eventdat += "

Oh...

" - eventdat += "

Close

" - settlers = list() - - if(ORION_TRAIL_LING) - eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..." - if(settlers.len <= 2) - eventdat += "
Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..." - eventdat += "

Continue

" - eventdat += "

Close

" - if(prob(10)) // "likely", I didn't say it was guaranteed! - lings_aboard = min(++lings_aboard,2) - else - if(lings_aboard) //less likely to stack lings - if(prob(20)) - lings_aboard = min(++lings_aboard,2) - else if(prob(70)) - lings_aboard = min(++lings_aboard,2) - - eventdat += "

Kill a Crewmember

" - eventdat += "

Risk it

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_LING_ATTACK) - if(lings_aboard <= 0) //shouldn't trigger, but hey. - eventdat += "Haha, fooled you, there are no changelings on board!" - eventdat += "
(You should report this to a coder :S)" - else - var/ling1 = remove_crewmember() - var/ling2 = "" - if(lings_aboard >= 2) - ling2 = remove_crewmember() - - eventdat += "Changelings among your crew suddenly burst from hiding and attack!" - if(ling2) - eventdat += "
[ling1] and [ling2]'s arms twist and contort into grotesque blades!" - else - eventdat += "
[ling1]'s arm twists and contorts into a grotesque blade!" - - var/chance2attack = alive*20 - if(prob(chance2attack)) - var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance - if(prob(chancetokill)) - var/deadguy = remove_crewmember() - var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \ - "[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \ - "[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!") - eventdat += "
[murder_text]" - else - eventdat += "

You valiantly fight off the changeling[ling2 ? "s":""]!" - if(ling2) - food += 30 - lings_aboard = max(0,lings_aboard-2) - else - food += 15 - lings_aboard = max(0,--lings_aboard) - eventdat += "
Well, it's perfectly good food...\ -
You cut the changeling[ling2 ? "s" : ""] into meat, gaining [ling2 ? "30" : "15"] Food!" - else - eventdat += "

[pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \ - the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now." - if(ling2) - lings_aboard = max(0,lings_aboard-2) - else - lings_aboard = max(0,--lings_aboard) - - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - - if(ORION_TRAIL_SPACEPORT) - gameStatus = ORION_STATUS_MARKET - if(spaceport_raided) - eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid." - if(last_spaceport_action) - eventdat += "
Last Spaceport Action: [last_spaceport_action]" - eventdat += "

Depart Spaceport

" - eventdat += "

Close

" - else - eventdat += "Your jump into the sector yields a spaceport - a lucky find!" - eventdat += "
This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." - eventdat += "
Trading terms: FU = Fuel, FO = Food" - if(last_spaceport_action) - eventdat += "
Last action: [last_spaceport_action]" - eventdat += "

Crew:

" - eventdat += english_list(settlers) - eventdat += "
Food: [food] | Fuel: [fuel]" - eventdat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" - - - //If your crew is pathetic you can get freebies (provided you haven't already gotten one from this port) - if(!spaceport_freebie && (fuel < 20 || food < 20)) - spaceport_freebie++ - var/FU = 10 - var/FO = 10 - var/freecrew = 0 - if(prob(30)) - FU = 25 - FO = 25 - - if(prob(10)) - add_crewmember() - freecrew++ - - eventdat += "
The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)" - if(freecrew) - eventdat += "
You also gain a new crewmember!" - - fuel += FU - food += FO - - //CREW INTERACTIONS - eventdat += "

Crew Management:

" - - //Buy crew - if(food >= 10 && fuel >= 10) - eventdat += "

Hire a New Crewmember (-10FU, -10FO)

" - else - eventdat += "

You cannot afford a new crewmember.

" - - //Sell crew - if(settlers.len > 1) - eventdat += "

Sell Crew for Fuel and Food (+7FU, +7FO)

" - else - eventdat += "

You have no other crew to sell.

" - - //BUY/SELL STUFF - eventdat += "

Spare Parts:

" - - //Engine parts - if(fuel > 5) - eventdat += "

Buy Engine Parts (-5FU)

" - else - eventdat += "

You cannot afford engine parts." - - //Hull plates - if(fuel > 5) - eventdat += "

Buy Hull Plates (-5FU)

" - else - eventdat += "

You cannot afford hull plates." - - //Electronics - if(fuel > 5) - eventdat += "

Buy Spare Electronics (-5FU)

" - else - eventdat += "

You cannot afford spare electronics." - - //Trade - if(fuel > 5) - eventdat += "

Trade Fuel for Food (-5FU,+5FO)

" - else - eventdat += "

You don't have 5FU to trade. 5) - eventdat += "

Trade Food for Fuel (+5FU,-5FO)

" - else - eventdat += "

You don't have 5FO to trade.You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") - name = "The Orion Trail: Realism Edition" - desc = "Learn how our ancestors got to Orion, and try not to die in the process!" - newgame() - obj_flags |= EMAGGED - -/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion - name = "spaceport security" - desc = "Premier corporate security forces for all spaceports found along the Orion Trail." - faction = list("orion") - loot = list() - del_on_death = TRUE - -/obj/item/orion_ship - name = "model settler ship" - desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." - icon = 'icons/obj/toy.dmi' - icon_state = "ship" - w_class = WEIGHT_CLASS_SMALL - var/active = 0 //if the ship is on - -/obj/item/orion_ship/examine(mob/user) - ..() - if(!(in_range(user, src))) - return - if(!active) - to_chat(user, "There's a little switch on the bottom. It's flipped down.") - else - to_chat(user, "There's a little switch on the bottom. It's flipped up.") - -/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse - if(active) - return - - message_admins("[ADMIN_LOOKUPFLW(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") - log_game("[key_name(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") - - to_chat(user, "You flip the switch on the underside of [src].") - active = 1 - visible_message("[src] softly beeps and whirs to life!") - playsound(loc, 'sound/machines/defib_SaftyOn.ogg', 25, 1) - say("This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.") - sleep(20) - visible_message("[src] begins to vibrate...") - say("Uh, Port? Having some issues with our reactor, could you check it out? Over.") - sleep(30) - say("Oh, God! Code Eight! CODE EIGHT! IT'S GONNA BL-") - playsound(loc, 'sound/machines/buzz-sigh.ogg', 25, 1) - sleep(3.6) - visible_message("[src] explodes!") - explosion(loc, 2,4,8, flame_range = 16) - qdel(src) - - -#undef ORION_TRAIL_WINTURN -#undef ORION_TRAIL_RAIDERS -#undef ORION_TRAIL_FLUX -#undef ORION_TRAIL_ILLNESS -#undef ORION_TRAIL_BREAKDOWN -#undef ORION_TRAIL_LING -#undef ORION_TRAIL_LING_ATTACK -#undef ORION_TRAIL_MALFUNCTION -#undef ORION_TRAIL_COLLISION -#undef ORION_TRAIL_SPACEPORT -#undef ORION_TRAIL_BLACKHOLE - -#undef ORION_STATUS_START -#undef ORION_STATUS_NORMAL -#undef ORION_STATUS_GAMEOVER -#undef ORION_STATUS_MARKET diff --git a/code/game/machinery/computer/arcade/battle.dm b/code/game/machinery/computer/arcade/battle.dm new file mode 100644 index 0000000000..ded9cf95f6 --- /dev/null +++ b/code/game/machinery/computer/arcade/battle.dm @@ -0,0 +1,206 @@ +// ** BATTLE ** // + + +/obj/machinery/computer/arcade/battle + name = "arcade machine" + desc = "Does not support Pinball." + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/battle + var/enemy_name = "Space Villain" + var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc + var/player_hp = 30 //Player health/attack points + var/player_mp = 10 + var/enemy_hp = 45 //Enemy health/attack points + var/enemy_mp = 20 + var/gameover = FALSE + var/blocked = FALSE //Player cannot attack/heal while set + var/turtle = 0 + + var/turn_speed = 5 //Measured in deciseconds. + +/obj/machinery/computer/arcade/battle/Reset() + var/name_action + var/name_part1 + var/name_part2 + + name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ", "Ban ") + + name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") + name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers") + + enemy_name = replacetext((name_part1 + name_part2), "the ", "") + name = (name_action + name_part1 + name_part2) + +/obj/machinery/computer/arcade/battle/ui_interact(mob/user) + . = ..() + var/dat = "Close" + dat += "

[enemy_name]

" + + dat += "

[temp]

" + dat += "
Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]
" + + if (gameover) + dat += "
New Game" + else + dat += "
Attack | " + dat += "Heal | " + dat += "Recharge Power" + + dat += "
" + var/datum/browser/popup = new(user, "arcade", "Space Villain 2000") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + +/obj/machinery/computer/arcade/battle/Topic(href, href_list) + if(..()) + return + + if (!blocked && !gameover) + if (href_list["attack"]) + blocked = TRUE + var/attackamt = rand(2,6) + temp = "You attack for [attackamt] damage!" + playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) + updateUsrDialog() + if(turtle > 0) + turtle-- + + sleep(turn_speed) + enemy_hp -= attackamt + arcade_action(usr) + + else if (href_list["heal"]) + blocked = TRUE + var/pointamt = rand(1,3) + var/healamt = rand(6,8) + temp = "You use [pointamt] magic to heal for [healamt] damage!" + playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) + updateUsrDialog() + turtle++ + + sleep(turn_speed) + player_mp -= pointamt + player_hp += healamt + blocked = TRUE + updateUsrDialog() + arcade_action(usr) + + else if (href_list["charge"]) + blocked = TRUE + var/chargeamt = rand(4,7) + temp = "You regain [chargeamt] points" + playsound(loc, 'sound/arcade/mana.ogg', 50, 1, extrarange = -3, falloff = 10) + player_mp += chargeamt + if(turtle > 0) + turtle-- + + updateUsrDialog() + sleep(turn_speed) + arcade_action(usr) + + if (href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + + else if (href_list["newgame"]) //Reset everything + temp = "New Round" + player_hp = initial(player_hp) + player_mp = initial(player_mp) + enemy_hp = initial(enemy_hp) + enemy_mp = initial(enemy_mp) + gameover = FALSE + turtle = 0 + + if(obj_flags & EMAGGED) + Reset() + obj_flags &= ~EMAGGED + + add_fingerprint(usr) + updateUsrDialog() + return + +/obj/machinery/computer/arcade/battle/proc/arcade_action(mob/user) + if ((enemy_mp <= 0) || (enemy_hp <= 0)) + if(!gameover) + gameover = TRUE + temp = "[enemy_name] has fallen! Rejoice!" + playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) + + if(obj_flags & EMAGGED) + new /obj/effect/spawner/newbomb/timer/syndicate(loc) + new /obj/item/clothing/head/collectable/petehat(loc) + message_admins("[ADMIN_LOOKUPFLW(usr)] has outbombed Cuban Pete and been awarded a bomb.") + log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") + Reset() + obj_flags &= ~EMAGGED + else + prizevend(user) + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (obj_flags & EMAGGED ? "emagged":"normal"))) + + + else if ((obj_flags & EMAGGED) && (turtle >= 4)) + var/boomamt = rand(5,10) + temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!" + playsound(loc, 'sound/arcade/boom.ogg', 50, 1, extrarange = -3, falloff = 10) + player_hp -= boomamt + + else if ((enemy_mp <= 5) && (prob(70))) + var/stealamt = rand(2,3) + temp = "[enemy_name] steals [stealamt] of your power!" + playsound(loc, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 10) + player_mp -= stealamt + updateUsrDialog() + + if (player_mp <= 0) + gameover = TRUE + sleep(turn_speed) + temp = "You have been drained! GAME OVER" + playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) + if(obj_flags & EMAGGED) + usr.gib() + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal"))) + + else if ((enemy_hp <= 10) && (enemy_mp > 4)) + temp = "[enemy_name] heals for 4 health!" + playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) + enemy_hp += 4 + enemy_mp -= 4 + + else + var/attackamt = rand(3,6) + temp = "[enemy_name] attacks for [attackamt] damage!" + playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) + player_hp -= attackamt + + if ((player_mp <= 0) || (player_hp <= 0)) + gameover = TRUE + temp = "You have been crushed! GAME OVER" + playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) + if(obj_flags & EMAGGED) + usr.gib() + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal"))) + + blocked = FALSE + return + + +/obj/machinery/computer/arcade/battle/emag_act(mob/user) + if(obj_flags & EMAGGED) + return + to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") + temp = "If you die in the game, you die for real!" + player_hp = 30 + player_mp = 10 + enemy_hp = 45 + enemy_mp = 20 + gameover = FALSE + blocked = FALSE + + obj_flags |= EMAGGED + + enemy_name = "Cuban Pete" + name = "Outbomb Cuban Pete" + + + updateUsrDialog() diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm new file mode 100644 index 0000000000..fe69860f76 --- /dev/null +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -0,0 +1,390 @@ +#define MINESWEEPER_GAME_MAIN_MENU 0 +#define MINESWEEPER_GAME_PLAYING 1 +#define MINESWEEPER_GAME_LOST 2 +#define MINESWEEPER_GAME_WON 3 +#define MINESWEEPERIMG(what) {""} //Basically bypassing asset.icon_tag() + +/obj/machinery/computer/arcade/minesweeper + name = "Minesweeper" + desc = "An arcade machine that generates grids. It seems that the machine sparks and screeches when a grid is generated, as if it cannot cope with the intensity of generating the grid." + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/minesweeper + var/area + var/difficulty = "" //To show what difficulty you are playing + var/flag_text = "" + var/flagging = FALSE + var/game_status = MINESWEEPER_GAME_MAIN_MENU + var/mine_limit = 0 + var/mine_placed = 0 + var/mine_sound = TRUE //So it doesn't get repeated when multiple mines are exposed + var/randomcolour = 1 + var/randomnumber = 1 //Random emagged game iteration number to be displayed, put here so it is persistent across one individual arcade machine + var/safe_squares_revealed + var/saved_web = "" //To display the web if you click on the arcade + var/win_condition + var/rows = 1 + var/columns = 1 + var/table[31][51] //Make the board boys, 30x50 board + var/spark_spam = FALSE + +/obj/machinery/computer/arcade/minesweeper/interact(mob/user) + var/emagged = CHECK_BITFIELD(obj_flags, EMAGGED) + var/dat + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + dat += "Minesweeper
Minesweeper[emagged ? " EXTREME EDITION: Iteration #[randomnumber]" : ""]
" //Different colour mix for every random number made + dat += " [emagged ? "Explode in the game, explode in real life" : "Reveal all the squares without hitting a mine"]!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + else + dat = saved_web + user = usr + + var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/minesweeper) + assets.send(user) + + user << browse(dat,"window=minesweeper,size=400x500") + add_fingerprint(user) + + . = ..() + +/obj/machinery/computer/arcade/minesweeper/proc/reset_spark_spam() + spark_spam = FALSE + +/obj/machinery/computer/arcade/minesweeper/Topic(href, href_list) + . = ..() + if(.) + return + + var/exploding_hell = FALSE //For emagged failures + var/reset_board = FALSE + var/mob/living/user = usr //To identify who the hell is using this window, this should also make things like aliens and monkeys able to use the machine!! + var/web_difficulty_menu = " Reveal all the squares without hitting a mine!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + var/web = "Minesweeper
Minesweeper
" + var/static_web = "Minesweeper
Minesweeper
" //When we need to revert to the main menu we set web as this + web = static_web + + if(CHECK_BITFIELD(obj_flags, EMAGGED)) + web = "Minesweeper
Minesweeper EXTREME EDITION: Iteration #[randomnumber]
" //Different colour mix for every random number made + if(!spark_spam) + do_sparks(5, 1, src) + spark_spam = TRUE + addtimer(CALLBACK(src, .proc/reset_spark_spam), 30) + + + var/startup_sound = CHECK_BITFIELD(obj_flags, EMAGGED) ? 'sound/arcade/minesweeper_emag2.ogg' : 'sound/arcade/minesweeper_startup.ogg' + + if(href_list["Main_Menu"]) + game_status = MINESWEEPER_GAME_MAIN_MENU + mine_limit = 0 + rows = 0 + columns = 0 + mine_placed = 0 + if(href_list["Easy"]) + playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Easy" + rows = 10 //9x9 board + columns = 10 + mine_limit = 10 + if(href_list["Intermediate"]) + playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Intermediate" + rows = 17 //16x16 board + columns = 17 + mine_limit = 40 + if(href_list["Hard"]) + playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Hard" + rows = 17 //16x30 board + columns = 31 + mine_limit = 99 + if(href_list["Custom"]) + if(custom_generation(usr)) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Custom" + playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10) + if(href_list["Flag"]) + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + if(!flagging) + flagging = TRUE + flag_text = "ON" + else + flagging = FALSE + flag_text = "OFF" + + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + if(CHECK_BITFIELD(obj_flags, EMAGGED)) + playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, 0, extrarange = -3, falloff = 10) + web += "Explode in the game, explode in real life!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + else + playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, 0, extrarange = -3, falloff = 10) + web += web_difficulty_menu + + if(game_status == MINESWEEPER_GAME_PLAYING) + mine_sound = TRUE + + area = (rows-1)*(columns-1) + + if(reset_board) + mine_placed = 0 + var/reset_everything = TRUE + make_mines(reset_everything) + + safe_squares_revealed = 0 + win_condition = area-mine_placed + + if(game_status != MINESWEEPER_GAME_MAIN_MENU) + for(var/y1=1;y1= 0) //Check that it's not already revealed, and stop flag removal if we're out of flag mode + table[y1][x1] += 10 + if(table[y1][x1] != 10) + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + else + if(game_status != MINESWEEPER_GAME_LOST && game_status != MINESWEEPER_GAME_WON) + game_status = MINESWEEPER_GAME_LOST + if(CHECK_BITFIELD(obj_flags, EMAGGED) && !exploding_hell) + exploding_hell = TRUE + explode_EVERYTHING() + if(mine_sound) + switch(rand(1,3)) //Play every time a mine is hit + if(1) + playsound(loc, 'sound/arcade/minesweeper_explosion1.ogg', 50, 0, extrarange = -3, falloff = 10) + if(2) + playsound(loc, 'sound/arcade/minesweeper_explosion2.ogg', 50, 0, extrarange = -3, falloff = 10) + if(3) + playsound(loc, 'sound/arcade/minesweeper_explosion3.ogg', 50, 0, extrarange = -3, falloff = 10) + mine_sound = FALSE + else + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + if(table[y1][x1] >= 0) //Check that it's not already flagged + table[y1][x1] -= 10 + else if(table[y1][x1] < 0) //If flagged, remove the flag + table[y1][x1] += 10 + if(href_list["same_board"]) //Reset the board... kinda + if(game_status != MINESWEEPER_GAME_PLAYING) + game_status = MINESWEEPER_GAME_PLAYING + if(table[y1][x1] >= 10) //If revealed, become unrevealed! + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + table[y1][x1] -= 10 + if(table[y1][x1] > 10 && !reset_board) + safe_squares_revealed += 1 + var/y2 = y1 + var/x2 = x1 + work_squares(y2, x2) //Work squares while in this loop so there's less load + reset_board = FALSE + + web += "" //Start setting up the html table + web += "" + for(var/y1=1;y1= win_condition && game_status == MINESWEEPER_GAME_PLAYING) + game_status = MINESWEEPER_GAME_WON + if(rows < 10 || columns < 10) //If less than easy difficulty + playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, 0, extrarange = -3, falloff = 10) + say("You cleared the board of all mines, but you picked too small of a board! Try again with at least a 9x9 board!") + else + playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, 0, extrarange = -3, falloff = 10) + say("You cleared the board of all mines! Congratulations!") + if(CHECK_BITFIELD(obj_flags, EMAGGED)) + var/itemname + switch(rand(1,3)) + if(1) + itemname = "a syndicate bomb beacon" + new /obj/item/sbeacondrop/bomb(loc) + if(2) + itemname = "a grenade launcher" + new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(loc) + new /obj/item/ammo_casing/a40mm(loc) + new /obj/item/ammo_casing/a40mm(loc) + new /obj/item/ammo_casing/a40mm(loc) + if(3) + itemname = "two bags of c4" + new /obj/item/storage/backpack/duffelbag/syndie/c4(loc) + new /obj/item/storage/backpack/duffelbag/syndie/x4(loc) + message_admins("[key_name_admin(user)] won emagged Minesweeper and got [itemname]!") + visible_message("[src] dispenses [itemname]!", "You hear a chime and a clunk.") + DISABLE_BITFIELD(obj_flags, EMAGGED) + else + var/dope_prizes = (area >= 480) ? list(ARCADE_WEIGHT_RARE) : (area >= 256) ? list(ARCADE_WEIGHT_RARE, ARCADE_WEIGHT_TRICK) : null + prizevend(user, dope_prizes) + + if(game_status == MINESWEEPER_GAME_WON) + web += "[(rows < 10 || columns < 10) ? "You won, but your board was too small! Pick a bigger board next time!" : "Congratulations, you have won!"]
Want to play again?
Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom

Play on the same board
Return to Main Menu
" + + if(game_status == MINESWEEPER_GAME_LOST) + web += "You have lost!
Try again?
Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom

Play on the same board
Return to Main Menu
" + + if(game_status == MINESWEEPER_GAME_PLAYING) + web += "Return to Main Menu
" + web += "
Difficulty: [difficulty]
Mines: [mine_placed]
Rows: [rows-1]
Columns: [columns-1]
Flagging mode: [flag_text]
" + + web += "" + var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/minesweeper) + saved_web = sheet.css_tag() + saved_web += web + updateDialog() + return + +/obj/machinery/computer/arcade/minesweeper/emag_act(mob/user) + if(CHECK_BITFIELD(obj_flags, EMAGGED)) + return + desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" + do_sparks(5, 1, src) + randomnumber = rand(1,255) + randomcolour = rgb(randomnumber,randomnumber/2,randomnumber/3) + ENABLE_BITFIELD(obj_flags, EMAGGED) + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + to_chat(user, "An ominous tune plays from the arcade's speakers!") + playsound(user, 'sound/arcade/minesweeper_emag1.ogg', 100, 0, extrarange = 3, falloff = 10) + else //Can't let you do that, star fox! + to_chat(user, "The machine buzzes and sparks... the game has been reset!") + playsound(user, 'sound/machines/buzz-sigh.ogg', 100, 0, extrarange = 3, falloff = 10) //Loud buzz + game_status = MINESWEEPER_GAME_MAIN_MENU + +/obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound + var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num + if(!new_rows || !user.canUseTopic(src, !issilicon(user))) + return FALSE + new_rows = CLAMP(new_rows + 1, 4, 30) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num + if(!new_columns || !user.canUseTopic(src, !issilicon(user))) + return FALSE + new_columns = CLAMP(new_columns + 1, 4, 50) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + var/grid_area = (new_rows - 1) * (new_columns - 1) + var/lower_limit = round(grid_area*0.156) + var/upper_limit = round(grid_area*0.85) + var/new_mine_limit = input(user, "How many mines do you want? (Minimum: [lower_limit], Maximum: [upper_limit])", "Minesweeper Mines") as null|num + if(!new_mine_limit || !user.canUseTopic(src, !issilicon(user))) + return FALSE + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + rows = new_rows + columns = new_columns + mine_limit = CLAMP(new_mine_limit, lower_limit, upper_limit) + return TRUE + +/obj/machinery/computer/arcade/minesweeper/proc/make_mines(var/reset_everything) + if(mine_placed < mine_limit) + for(var/y1=1;y1 0 && x3 > 0) + y2 = y3 + x2 = x3 + if(table[y2][x2] == 1) + for(y3=y2-1;y3= rows || y3 < 1) + continue + for(x3=x2-1;x3= columns || x3 < 1) + continue + if(table[y3][x3] == 0) + table[y2][x2] += 1 + if(table[y2][x2] == 11) + for(y3=y2-1;y3= rows || y3 < 1) + continue + for(x3=x2-1;x3= columns || x3 < 1) + continue + if(table[y3][x3] > 0 && table[y3][x3] < 10) + table[y3][x3] += 10 + work_squares(y3, x3) //Refresh so we check everything we might be missing + +/obj/machinery/computer/arcade/minesweeper/proc/explode_EVERYTHING() + var/mob/living/user = usr + to_chat(user, "You feel a great sense of dread wash over you, as if you just unleashed armageddon upon yourself!") + var/row_limit = rows-1 + var/column_limit = columns-1 + var/mine_limit_v2 = mine_limit + if(rows > 11) + row_limit = 10 + if(columns > 11) + column_limit = 10 + if(mine_limit > (rows*columns) * 0.25) + mine_limit_v2 = 24 + message_admins("[key_name_admin(user)] failed an emagged Minesweeper arcade and has unleashed an explosion armageddon of size [row_limit],[column_limit] around [ADMIN_LOOKUPFLW(user.loc)]!") + if(mine_limit_v2 < 10) + explosion(loc, 2, 5, 10, 15) //Thought you could survive by putting as few mines as possible, huh?? + else + explosion(loc, 1, 3, rand(1,5), rand(1,10)) + for(var/y69=y-row_limit;y69coward!\"" + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/amputation + +/obj/machinery/computer/arcade/amputation/attack_hand(mob/user) + if(!iscarbon(user)) + return + var/mob/living/carbon/c_user = user + if(!c_user.get_bodypart(BODY_ZONE_L_ARM) && !c_user.get_bodypart(BODY_ZONE_R_ARM)) + return + to_chat(c_user, "You move your hand towards the machine, and begin to hesitate as a bloodied guillotine emerges from inside of it...") + if(do_after(c_user, 50, target = src)) + to_chat(c_user, "The guillotine drops on your arm, and the machine sucks it in!") + playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + var/which_hand = BODY_ZONE_L_ARM + if(!(c_user.active_hand_index % 2)) + which_hand = BODY_ZONE_R_ARM + var/obj/item/bodypart/chopchop = c_user.get_bodypart(which_hand) + chopchop.dismember() + qdel(chopchop) + playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) + for(var/i=1; i<=rand(3,5); i++) + prizevend(user) + else + to_chat(c_user, "You (wisely) decide against putting your hand in the machine.") \ No newline at end of file diff --git a/code/game/machinery/computer/arcade/orion_trail.dm b/code/game/machinery/computer/arcade/orion_trail.dm new file mode 100644 index 0000000000..12941dea35 --- /dev/null +++ b/code/game/machinery/computer/arcade/orion_trail.dm @@ -0,0 +1,809 @@ + + +// *** THE ORION TRAIL ** // + +#define ORION_TRAIL_WINTURN 9 + +//Orion Trail Events +#define ORION_TRAIL_RAIDERS "Raiders" +#define ORION_TRAIL_FLUX "Interstellar Flux" +#define ORION_TRAIL_ILLNESS "Illness" +#define ORION_TRAIL_BREAKDOWN "Breakdown" +#define ORION_TRAIL_LING "Changelings?" +#define ORION_TRAIL_LING_ATTACK "Changeling Ambush" +#define ORION_TRAIL_MALFUNCTION "Malfunction" +#define ORION_TRAIL_COLLISION "Collision" +#define ORION_TRAIL_SPACEPORT "Spaceport" +#define ORION_TRAIL_BLACKHOLE "BlackHole" + +#define ORION_STATUS_START 1 +#define ORION_STATUS_NORMAL 2 +#define ORION_STATUS_GAMEOVER 3 +#define ORION_STATUS_MARKET 4 + +/obj/machinery/computer/arcade/orion_trail + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/orion_trail + var/busy = FALSE //prevent clickspam that allowed people to ~speedrun~ the game. + var/engine = 0 + var/hull = 0 + var/electronics = 0 + var/food = 80 + var/fuel = 60 + var/turns = 4 + var/alive = 4 + var/eventdat = null + var/event = null + var/list/settlers = list("Harry","Larry","Bob") + var/list/events = list(ORION_TRAIL_RAIDERS = 3, + ORION_TRAIL_FLUX = 1, + ORION_TRAIL_ILLNESS = 3, + ORION_TRAIL_BREAKDOWN = 2, + ORION_TRAIL_LING = 3, + ORION_TRAIL_MALFUNCTION = 2, + ORION_TRAIL_COLLISION = 1, + ORION_TRAIL_SPACEPORT = 2 + ) + var/list/stops = list() + var/list/stopblurbs = list() + var/lings_aboard = 0 + var/spaceport_raided = 0 + var/spaceport_freebie = 0 + var/last_spaceport_action = "" + var/gameStatus = ORION_STATUS_START + var/canContinueEvent = 0 + +/obj/machinery/computer/arcade/orion_trail/kobayashi + name = "Kobayashi Maru control computer" + desc = "A test for cadets" + icon = 'icons/obj/machines/particle_accelerator.dmi' + icon_state = "control_boxp" + events = list("Raiders" = 3, "Interstellar Flux" = 1, "Illness" = 3, "Breakdown" = 2, "Malfunction" = 2, "Collision" = 1, "Spaceport" = 2) + prizes = list(/obj/item/paper/fluff/holodeck/trek_diploma = 1) + settlers = list("Kirk","Worf","Gene") + +/obj/machinery/computer/arcade/orion_trail/Reset() + // Sets up the main trail + stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + stopblurbs = list( + "Pluto, long since occupied with long-range sensors and scanners, stands ready to, and indeed continues to probe the far reaches of the galaxy.", + "At the edge of the Sol system lies a treacherous asteroid belt. Many have been crushed by stray asteroids and misguided judgement.", + "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now a low-population sanctuary for adventurers and traders.", + "This region of space is particularly devoid of matter. Such low-density pockets are known to exist, but the vastness of it is astounding.", + "Rigel Prime, the center of the Rigel system, burns hot, basking its planetary bodies in warmth and radiation.", + "Tau Ceti Beta has recently become a waypoint for colonists headed towards Orion. There are many ships and makeshift stations in the vicinity.", + "Sensors indicate that a black hole's gravitational field is affecting the region of space we were headed through. We could stay of course, but risk of being overcome by its gravity, or we could change course to go around, which will take longer.", + "You have come into range of the first man-made structure in this region of space. It has been constructed not by travellers from Sol, but by colonists from Orion. It stands as a monument to the colonists' success.", + "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" + ) + +/obj/machinery/computer/arcade/orion_trail/proc/newgame() + // Set names of settlers in crew + settlers = list() + for(var/i = 1; i <= 3; i++) + add_crewmember() + add_crewmember("[usr]") + // Re-set items to defaults + engine = 1 + hull = 1 + electronics = 1 + food = 80 + fuel = 60 + alive = 4 + turns = 1 + event = null + gameStatus = ORION_STATUS_NORMAL + lings_aboard = 0 + + //spaceport junk + spaceport_raided = 0 + spaceport_freebie = 0 + last_spaceport_action = "" + +/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user) + . = ..() + if(fuel <= 0 || food <=0 || settlers.len == 0) + gameStatus = ORION_STATUS_GAMEOVER + event = null + var/dat = "" + if(gameStatus == ORION_STATUS_GAMEOVER) + dat = "

Game Over

" + dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." + if(!settlers.len) + dat += "
Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy." + else + if(food <= 0) + dat += "
You ran out of food and starved." + if(obj_flags & EMAGGED) + user.nutrition = 0 //yeah you pretty hongry + to_chat(user, "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.") + if(fuel <= 0) + dat += "
You ran out of fuel, and drift, slowly, into a star." + if(obj_flags & EMAGGED) + var/mob/living/M = user + M.adjust_fire_stacks(5) + M.IgniteMob() //flew into a star, so you're on fire + to_chat(user, "You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.") + + if(obj_flags & EMAGGED) + to_chat(user, "You're never going to make it to Orion...") + user.death() + obj_flags &= ~EMAGGED //removes the emagged status after you lose + gameStatus = ORION_STATUS_START + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + + dat += "

May They Rest In Peace

" + else if(event) + dat = eventdat + else if(gameStatus == ORION_STATUS_NORMAL) + var/title = stops[turns] + var/subtext = stopblurbs[turns] + dat = "

[title]

" + dat += "[subtext]" + dat += "

Crew:

" + dat += english_list(settlers) + dat += "
Food: [food] | Fuel: [fuel]" + dat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" + if(turns == 7) + dat += "

Go Around Continue

" + else + dat += "

Continue

" + dat += "

Kill a Crewmember

" + dat += "

Close

" + else + dat = "

The Orion Trail

" + dat += "

Experience the journey of your ancestors!



" + dat += "
New Game
" + dat += "

Close

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail",400,700) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + return + +/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) + if(..()) + return + if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + + if(busy) + return + busy = TRUE + + if (href_list["continue"]) //Continue your travels + if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) + if(turns >= ORION_TRAIL_WINTURN) + win(usr) + else + food -= (alive+lings_aboard)*2 + fuel -= 5 + if(turns == 2 && prob(30)) + event = ORION_TRAIL_COLLISION + event() + else if(prob(75)) + event = pickweight(events) + if(lings_aboard) + if(event == ORION_TRAIL_LING || prob(55)) + event = ORION_TRAIL_LING_ATTACK + event() + turns += 1 + if(obj_flags & EMAGGED) + var/mob/living/carbon/M = usr //for some vars + switch(event) + if(ORION_TRAIL_RAIDERS) + if(prob(50)) + to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") + M.hallucination += 30 + else + to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") + M.take_bodypart_damage(30) + playsound(loc, 'sound/weapons/genhit2.ogg', 100, 1) + if(ORION_TRAIL_ILLNESS) + var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS + if(severity == 1) + to_chat(M, "You suddenly feel slightly nauseated." ) + if(severity == 2) + to_chat(usr, "You suddenly feel extremely nauseated and hunch over until it passes.") + M.Stun(60) + if(severity >= 3) //you didn't pray hard enough + to_chat(M, "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.") + M.Stun(100) + sleep(30) + M.vomit(10, distance = 5) + if(ORION_TRAIL_FLUX) + if(prob(75)) + M.Knockdown(60) + say("A sudden gust of powerful wind slams [M] into the floor!") + M.take_bodypart_damage(25) + playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) + else + to_chat(M, "A violent gale blows past you, and you barely manage to stay standing!") + if(ORION_TRAIL_COLLISION) //by far the most damaging event + if(prob(90)) + playsound(loc, 'sound/effects/bang.ogg', 100, 1) + var/turf/open/floor/F + for(F in orange(1, src)) + F.ScrapeAway() + say("Something slams into the floor around [src], exposing it to space!") + if(hull) + sleep(10) + say("A new floor suddenly appears around [src]. What the hell?") + playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) + var/turf/open/space/T + for(T in orange(1, src)) + T.PlaceOnTop(/turf/open/floor/plating) + else + say("Something slams into the floor around [src] - luckily, it didn't get through!") + playsound(loc, 'sound/effects/bang.ogg', 50, 1) + if(ORION_TRAIL_MALFUNCTION) + playsound(loc, 'sound/effects/empulse.ogg', 50, 1) + visible_message("[src] malfunctions, randomizing in-game stats!") + var/oldfood = food + var/oldfuel = fuel + food = rand(10,80) / rand(1,2) + fuel = rand(10,60) / rand(1,2) + if(electronics) + sleep(10) + if(oldfuel > fuel && oldfood > food) + audible_message("[src] lets out a somehow reassuring chime.") + else if(oldfuel < fuel || oldfood < food) + audible_message("[src] lets out a somehow ominous chime.") + food = oldfood + fuel = oldfuel + playsound(loc, 'sound/machines/chime.ogg', 50, 1) + + else if(href_list["newgame"]) //Reset everything + if(gameStatus == ORION_STATUS_START) + newgame() + else if(href_list["menu"]) //back to the main menu + if(gameStatus == ORION_STATUS_GAMEOVER) + gameStatus = ORION_STATUS_START + event = null + food = 80 + fuel = 60 + settlers = list("Harry","Larry","Bob") + else if(href_list["slow"]) //slow down + if(event == ORION_TRAIL_FLUX) + food -= (alive+lings_aboard)*2 + fuel -= 5 + event = null + else if(href_list["pastblack"]) //slow down + if(turns == 7) + food -= ((alive+lings_aboard)*2)*3 + fuel -= 15 + turns += 1 + event = null + else if(href_list["useengine"]) //use parts + if(event == ORION_TRAIL_BREAKDOWN) + engine = max(0, --engine) + event = null + else if(href_list["useelec"]) //use parts + if(event == ORION_TRAIL_MALFUNCTION) + electronics = max(0, --electronics) + event = null + else if(href_list["usehull"]) //use parts + if(event == ORION_TRAIL_COLLISION) + hull = max(0, --hull) + event = null + else if(href_list["wait"]) //wait 3 days + if(event == ORION_TRAIL_BREAKDOWN || event == ORION_TRAIL_MALFUNCTION || event == ORION_TRAIL_COLLISION) + food -= ((alive+lings_aboard)*2)*3 + event = null + else if(href_list["keepspeed"]) //keep speed + if(event == ORION_TRAIL_FLUX) + if(prob(75)) + event = "Breakdown" + event() + else + event = null + else if(href_list["blackhole"]) //keep speed past a black hole + if(turns == 7) + if(prob(75)) + event = ORION_TRAIL_BLACKHOLE + event() + if(obj_flags & EMAGGED) + playsound(loc, 'sound/effects/supermatter.ogg', 100, 1) + say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!") + if(isliving(usr)) + var/mob/living/L = usr + L.Stun(200, ignore_canstun = TRUE) //you can't run :^) + var/S = new /obj/singularity/academy(usr.loc) + addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) + QDEL_IN(S, 50) + else + event = null + turns += 1 + else if(href_list["holedeath"]) + if(event == ORION_TRAIL_BLACKHOLE) + gameStatus = ORION_STATUS_GAMEOVER + event = null + else if(href_list["eventclose"]) //end an event + if(canContinueEvent) + event = null + + else if(href_list["killcrew"]) //shoot a crewmember + if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_LING) + var/sheriff = remove_crewmember() //I shot the sheriff + playsound(loc,'sound/weapons/gunshot.ogg', 100, 1) + + if(settlers.len == 0 || alive == 0) + say("The last crewmember [sheriff], shot themselves, GAME OVER!") + if(obj_flags & EMAGGED) + usr.death(0) + obj_flags &= EMAGGED + gameStatus = ORION_STATUS_GAMEOVER + event = null + else if(obj_flags & EMAGGED) + if(usr.name == sheriff) + say("The crew of the ship chose to kill [usr.name]!") + usr.death(0) + + if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places + event = null + + //Spaceport specific interactions + //they get a header because most of them don't reset event (because it's a shop, you leave when you want to) + //they also call event() again, to regen the eventdata, which is kind of odd but necessary + else if(href_list["buycrew"]) //buy a crewmember + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && food >= 10 && fuel >= 10) + var/bought = add_crewmember() + last_spaceport_action = "You hired [bought] as a new crewmember." + fuel -= 10 + food -= 10 + event() + + else if(href_list["sellcrew"]) //sell a crewmember + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && settlers.len > 1) + var/sold = remove_crewmember() + last_spaceport_action = "You sold your crewmember, [sold]!" + fuel += 7 + food += 7 + event() + + else if(href_list["leave_spaceport"]) + if(gameStatus == ORION_STATUS_MARKET) + event = null + gameStatus = ORION_STATUS_NORMAL + spaceport_raided = 0 + spaceport_freebie = 0 + last_spaceport_action = "" + + else if(href_list["raid_spaceport"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided) + var/success = min(15 * alive,100) //default crew (4) have a 60% chance + spaceport_raided = 1 + + var/FU = 0 + var/FO = 0 + if(prob(success)) + FU = rand(5,15) + FO = rand(5,15) + last_spaceport_action = "You successfully raided the spaceport! You gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" + else + FU = rand(-5,-15) + FO = rand(-5,-15) + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" + + //your chance of lose a crewmember is 1/2 your chance of success + //this makes higher % failures hurt more, don't get cocky space cowboy! + if(prob(success*5)) + var/lost_crew = remove_crewmember() + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" + if(obj_flags & EMAGGED) + say("WEEWOO! WEEWOO! Spaceport security en route!") + playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE) + for(var/i, i<=3, i++) + var/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion(get_turf(src)) + O.target = usr + + + fuel += FU + food += FO + event() + + else if(href_list["buyparts"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && fuel > 5) + switch(text2num(href_list["buyparts"])) + if(1) //Engine Parts + engine++ + last_spaceport_action = "Bought Engine Parts" + if(2) //Hull Plates + hull++ + last_spaceport_action = "Bought Hull Plates" + if(3) //Spare Electronics + electronics++ + last_spaceport_action = "Bought Spare Electronics" + fuel -= 5 //they all cost 5 + event() + + else if(href_list["trade"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided) + switch(text2num(href_list["trade"])) + if(1) //Fuel + if(fuel > 5) + fuel -= 5 + food += 5 + last_spaceport_action = "Traded Fuel for Food" + event() + if(2) //Food + if(food > 5) + fuel += 5 + food -= 5 + last_spaceport_action = "Traded Food for Fuel" + event() + + add_fingerprint(usr) + updateUsrDialog() + busy = FALSE + return + + +/obj/machinery/computer/arcade/orion_trail/proc/event() + eventdat = "

[event]

" + canContinueEvent = 0 + switch(event) + if(ORION_TRAIL_RAIDERS) + eventdat += "Raiders have come aboard your ship!" + if(prob(50)) + var/sfood = rand(1,10) + var/sfuel = rand(1,10) + food -= sfood + fuel -= sfuel + eventdat += "
They have stolen [sfood] Food and [sfuel] Fuel." + else if(prob(10)) + var/deadname = remove_crewmember() + eventdat += "
[deadname] tried to fight back, but was killed." + else + eventdat += "
Fortunately, you fended them off without any trouble." + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_FLUX) + eventdat += "This region of space is highly turbulent.
If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies." + eventdat += "
What will you do?" + eventdat += "

Slow Down Continue

" + eventdat += "

Close

" + + if(ORION_TRAIL_ILLNESS) + eventdat += "A deadly illness has been contracted!" + var/deadname = remove_crewmember() + eventdat += "
[deadname] was killed by the disease." + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_BREAKDOWN) + eventdat += "Oh no! The engine has broken down!" + eventdat += "
You can repair it with an engine part, or you can make repairs for 3 days." + if(engine >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_MALFUNCTION) + eventdat += "The ship's systems are malfunctioning!" + eventdat += "
You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI." + if(electronics >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_COLLISION) + eventdat += "Something hit us! Looks like there's some hull damage." + if(prob(25)) + var/sfood = rand(5,15) + var/sfuel = rand(5,15) + food -= sfood + fuel -= sfuel + eventdat += "
[sfood] Food and [sfuel] Fuel was vented out into space." + if(prob(10)) + var/deadname = remove_crewmember() + eventdat += "
[deadname] was killed by rapid depressurization." + eventdat += "
You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together." + if(hull >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_BLACKHOLE) + eventdat += "You were swept away into the black hole." + eventdat += "

Oh...

" + eventdat += "

Close

" + settlers = list() + + if(ORION_TRAIL_LING) + eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..." + if(settlers.len <= 2) + eventdat += "
Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..." + eventdat += "

Continue

" + eventdat += "

Close

" + if(prob(10)) // "likely", I didn't say it was guaranteed! + lings_aboard = min(++lings_aboard,2) + else + if(lings_aboard) //less likely to stack lings + if(prob(20)) + lings_aboard = min(++lings_aboard,2) + else if(prob(70)) + lings_aboard = min(++lings_aboard,2) + + eventdat += "

Kill a Crewmember

" + eventdat += "

Risk it

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_LING_ATTACK) + if(lings_aboard <= 0) //shouldn't trigger, but hey. + eventdat += "Haha, fooled you, there are no changelings on board!" + eventdat += "
(You should report this to a coder :S)" + else + var/ling1 = remove_crewmember() + var/ling2 = "" + if(lings_aboard >= 2) + ling2 = remove_crewmember() + + eventdat += "Changelings among your crew suddenly burst from hiding and attack!" + if(ling2) + eventdat += "
[ling1] and [ling2]'s arms twist and contort into grotesque blades!" + else + eventdat += "
[ling1]'s arm twists and contorts into a grotesque blade!" + + var/chance2attack = alive*20 + if(prob(chance2attack)) + var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance + if(prob(chancetokill)) + var/deadguy = remove_crewmember() + var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \ + "[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \ + "[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!") + eventdat += "
[murder_text]" + else + eventdat += "

You valiantly fight off the changeling[ling2 ? "s":""]!" + if(ling2) + food += 30 + lings_aboard = max(0,lings_aboard-2) + else + food += 15 + lings_aboard = max(0,--lings_aboard) + eventdat += "
Well, it's perfectly good food...\ +
You cut the changeling[ling2 ? "s" : ""] into meat, gaining [ling2 ? "30" : "15"] Food!" + else + eventdat += "

[pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \ + the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now." + if(ling2) + lings_aboard = max(0,lings_aboard-2) + else + lings_aboard = max(0,--lings_aboard) + + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + + if(ORION_TRAIL_SPACEPORT) + gameStatus = ORION_STATUS_MARKET + if(spaceport_raided) + eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid." + if(last_spaceport_action) + eventdat += "
Last Spaceport Action: [last_spaceport_action]" + eventdat += "

Depart Spaceport

" + eventdat += "

Close

" + else + eventdat += "Your jump into the sector yields a spaceport - a lucky find!" + eventdat += "
This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." + eventdat += "
Trading terms: FU = Fuel, FO = Food" + if(last_spaceport_action) + eventdat += "
Last action: [last_spaceport_action]" + eventdat += "

Crew:

" + eventdat += english_list(settlers) + eventdat += "
Food: [food] | Fuel: [fuel]" + eventdat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" + + + //If your crew is pathetic you can get freebies (provided you haven't already gotten one from this port) + if(!spaceport_freebie && (fuel < 20 || food < 20)) + spaceport_freebie++ + var/FU = 10 + var/FO = 10 + var/freecrew = 0 + if(prob(30)) + FU = 25 + FO = 25 + + if(prob(10)) + add_crewmember() + freecrew++ + + eventdat += "
The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)" + if(freecrew) + eventdat += "
You also gain a new crewmember!" + + fuel += FU + food += FO + + //CREW INTERACTIONS + eventdat += "

Crew Management:

" + + //Buy crew + if(food >= 10 && fuel >= 10) + eventdat += "

Hire a New Crewmember (-10FU, -10FO)

" + else + eventdat += "

You cannot afford a new crewmember.

" + + //Sell crew + if(settlers.len > 1) + eventdat += "

Sell Crew for Fuel and Food (+7FU, +7FO)

" + else + eventdat += "

You have no other crew to sell.

" + + //BUY/SELL STUFF + eventdat += "

Spare Parts:

" + + //Engine parts + if(fuel > 5) + eventdat += "

Buy Engine Parts (-5FU)

" + else + eventdat += "

You cannot afford engine parts." + + //Hull plates + if(fuel > 5) + eventdat += "

Buy Hull Plates (-5FU)

" + else + eventdat += "

You cannot afford hull plates." + + //Electronics + if(fuel > 5) + eventdat += "

Buy Spare Electronics (-5FU)

" + else + eventdat += "

You cannot afford spare electronics." + + //Trade + if(fuel > 5) + eventdat += "

Trade Fuel for Food (-5FU,+5FO)

" + else + eventdat += "

You don't have 5FU to trade. 5) + eventdat += "

Trade Food for Fuel (+5FU,-5FO)

" + else + eventdat += "

You don't have 5FO to trade.You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") + name = "The Orion Trail: Realism Edition" + desc = "Learn how our ancestors got to Orion, and try not to die in the process!" + newgame() + obj_flags |= EMAGGED + +/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion + name = "spaceport security" + desc = "Premier corporate security forces for all spaceports found along the Orion Trail." + faction = list("orion") + loot = list() + del_on_death = TRUE + +/obj/item/orion_ship + name = "model settler ship" + desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." + icon = 'icons/obj/toy.dmi' + icon_state = "ship" + w_class = WEIGHT_CLASS_SMALL + var/active = 0 //if the ship is on + +/obj/item/orion_ship/examine(mob/user) + ..() + if(!(in_range(user, src))) + return + if(!active) + to_chat(user, "There's a little switch on the bottom. It's flipped down.") + else + to_chat(user, "There's a little switch on the bottom. It's flipped up.") + +/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse + if(active) + return + + message_admins("[ADMIN_LOOKUPFLW(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") + log_game("[key_name(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") + + to_chat(user, "You flip the switch on the underside of [src].") + active = 1 + visible_message("[src] softly beeps and whirs to life!") + playsound(loc, 'sound/machines/defib_SaftyOn.ogg', 25, 1) + say("This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.") + sleep(20) + visible_message("[src] begins to vibrate...") + say("Uh, Port? Having some issues with our reactor, could you check it out? Over.") + sleep(30) + say("Oh, God! Code Eight! CODE EIGHT! IT'S GONNA BL-") + playsound(loc, 'sound/machines/buzz-sigh.ogg', 25, 1) + sleep(3.6) + visible_message("[src] explodes!") + explosion(loc, 2,4,8, flame_range = 16) + qdel(src) + +#undef ORION_TRAIL_WINTURN +#undef ORION_TRAIL_RAIDERS +#undef ORION_TRAIL_FLUX +#undef ORION_TRAIL_ILLNESS +#undef ORION_TRAIL_BREAKDOWN +#undef ORION_TRAIL_LING +#undef ORION_TRAIL_LING_ATTACK +#undef ORION_TRAIL_MALFUNCTION +#undef ORION_TRAIL_COLLISION +#undef ORION_TRAIL_SPACEPORT +#undef ORION_TRAIL_BLACKHOLE + +#undef ORION_STATUS_START +#undef ORION_STATUS_NORMAL +#undef ORION_STATUS_GAMEOVER +#undef ORION_STATUS_MARKET diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index baa6fa577e..6576f51e46 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -59,8 +59,8 @@ var/total_moles = air_sample.total_moles() if(total_moles) for(var/gas_id in air_sample.gases) - var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME] - signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100 + var/gas_name = GLOB.meta_gas_names[gas_id] + signal.data["gases"][gas_name] = air_sample.gases[gas_id] / total_moles * 100 radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 00a5c8941d..39d5c3d56f 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -450,7 +450,7 @@ scantemp = "Subject's brain is not responding to scanning stimuli." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) return - if((mob_occupant.has_trait(TRAIT_NOCLONE)) && (src.scanner.scan_level < 2)) + if((HAS_TRAIT(mob_occupant, TRAIT_NOCLONE)) && (src.scanner.scan_level < 2)) scantemp = "Subject no longer contains the fundamental materials required to create a living clone." playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) return diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 43f5b96fbd..752765baa1 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -173,14 +173,15 @@ var/obj/machinery/shuttle_manipulator/M = locate() in GLOB.machines if(M) SSshuttle.shuttle_purchased = TRUE - M.unload_preview() - M.load_template(S) - M.existing_shuttle = SSshuttle.emergency - M.action_load(S) SSshuttle.points -= S.credit_cost minor_announce("[usr.real_name] has purchased [S.name] for [S.credit_cost] credits." , "Shuttle Purchase") message_admins("[ADMIN_LOOKUPFLW(usr)] purchased [S.name].") SSblackbox.record_feedback("text", "shuttle_purchase", 1, "[S.name]") + M.unload_preview() + M.load_template(S) + M.existing_shuttle = SSshuttle.emergency + M.action_load(S) + message_admins("[S.name] loaded, purchased by [usr]") else to_chat(usr, "Something went wrong! The shuttle exchange system seems to be down.") else diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 2980c741be..9d49574317 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -76,7 +76,7 @@ if(connected && connected.is_operational()) if(connected.occupant) //set occupant_status message viable_occupant = connected.occupant - if(viable_occupant.has_dna() && !viable_occupant.has_trait(TRAIT_RADIMMUNE) && !viable_occupant.has_trait(TRAIT_NOCLONE) || (connected.scan_level == 3)) //occupant is viable for dna modification + if(viable_occupant.has_dna() && !HAS_TRAIT(viable_occupant, TRAIT_RADIMMUNE) && !HAS_TRAIT(viable_occupant, TRAIT_NOCLONE) || (connected.scan_level == 3)) //occupant is viable for dna modification occupant_status += "[viable_occupant.name] => " switch(viable_occupant.stat) if(CONSCIOUS) @@ -523,7 +523,7 @@ var/mob/living/carbon/viable_occupant = null if(connected) viable_occupant = connected.occupant - if(!istype(viable_occupant) || !viable_occupant.dna || viable_occupant.has_trait(TRAIT_RADIMMUNE) || viable_occupant.has_trait(TRAIT_NOCLONE)) + if(!istype(viable_occupant) || !viable_occupant.dna || HAS_TRAIT(viable_occupant, TRAIT_RADIMMUNE) || HAS_TRAIT(viable_occupant, TRAIT_NOCLONE)) viable_occupant = null return viable_occupant diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 7beb32eebb..1c6d713437 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -214,11 +214,11 @@ sparkles += S switch(i) if(1 to 8) - S.orbit(src, 30, TRUE, 60, 36, TRUE, FALSE) + S.orbit(src, 30, TRUE, 60, 36, TRUE) if(9 to 16) - S.orbit(src, 62, TRUE, 60, 36, TRUE, FALSE) + S.orbit(src, 62, TRUE, 60, 36, TRUE) if(17 to 24) - S.orbit(src, 95, TRUE, 60, 36, TRUE, FALSE) + S.orbit(src, 95, TRUE, 60, 36, TRUE) if(25) S.pixel_y = 7 S.forceMove(get_turf(src)) diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 90a6b07733..7895fb8c9f 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -99,7 +99,7 @@ var/mob/living/mob_occupant = get_mob_or_brainmob(occupant) if(istype(mob_occupant)) if(locate_computer(/obj/machinery/computer/cloning)) - if(!mob_occupant.suiciding && !(mob_occupant.has_trait(TRAIT_NOCLONE)) && !mob_occupant.hellbound) + if(!mob_occupant.suiciding && !(HAS_TRAIT(mob_occupant, TRAIT_NOCLONE)) && !mob_occupant.hellbound) mob_occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src) // DNA manipulators cannot operate on severed heads or brains diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0183fcecd4..1081cb5fa7 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -763,7 +763,7 @@ if(ishuman(user) && prob(40) && src.density) var/mob/living/carbon/human/H = user - if((H.has_trait(TRAIT_DUMB)) && Adjacent(user)) + if((HAS_TRAIT(H, TRAIT_DUMB)) && Adjacent(user)) playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) H.visible_message("[user] headbutts the airlock.", \ diff --git a/code/game/machinery/exp_cloner.dm b/code/game/machinery/exp_cloner.dm index 4d0ec9f1d9..2bcbd02cf2 100644 --- a/code/game/machinery/exp_cloner.dm +++ b/code/game/machinery/exp_cloner.dm @@ -42,11 +42,11 @@ icon_state = "pod_1" //Get the clone body ready maim_clone(H) - H.add_trait(TRAIT_STABLEHEART, "cloning") - H.add_trait(TRAIT_EMOTEMUTE, "cloning") - H.add_trait(TRAIT_MUTE, "cloning") - H.add_trait(TRAIT_NOBREATH, "cloning") - H.add_trait(TRAIT_NOCRITDAMAGE, "cloning") + ADD_TRAIT(H, TRAIT_STABLEHEART, "cloning") + ADD_TRAIT(H, TRAIT_EMOTEMUTE, "cloning") + ADD_TRAIT(H, TRAIT_MUTE, "cloning") + ADD_TRAIT(H, TRAIT_NOBREATH, "cloning") + ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, "cloning") H.Unconscious(80) var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone?", null, null, null, 100, H) @@ -268,7 +268,7 @@ scantemp = "Unable to locate valid genetic data." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) return - if((mob_occupant.has_trait(TRAIT_NOCLONE)) && (src.scanner.scan_level < 2)) + if((HAS_TRAIT(mob_occupant, TRAIT_NOCLONE)) && (src.scanner.scan_level < 2)) scantemp = "Subject no longer contains the fundamental materials required to create a living clone." playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) return diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 1f40672e05..0042da1c92 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -73,7 +73,7 @@ say("Subject is not organic.") playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) return - if(!allow_living && !(C.stat == DEAD || C.has_trait(TRAIT_FAKEDEATH))) //I mean, the machines scanners arent advanced enough to tell you're alive + if(!allow_living && !(C.stat == DEAD || HAS_TRAIT(C, TRAIT_FAKEDEATH))) //I mean, the machines scanners arent advanced enough to tell you're alive say("Subject is still alive.") playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) return diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 8a0658fd0f..a3250fe1b0 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -10,7 +10,6 @@ icon = 'icons/obj/machines/limbgrower.dmi' icon_state = "limbgrower_idleoff" density = TRUE - container_type = OPENCONTAINER use_power = IDLE_POWER_USE idle_power_usage = 10 active_power_usage = 100 @@ -34,7 +33,7 @@ ) /obj/machinery/limbgrower/Initialize() - create_reagents(100) + create_reagents(100, OPENCONTAINER) stored_research = new /datum/techweb/specialized/autounlocking/limbgrower . = ..() diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 911bb76bda..b0204ddeb8 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -485,7 +485,7 @@ threatcount += 4 if(shoot_unloyal) - if (!perp.has_trait(TRAIT_MINDSHIELD)) + if (!HAS_TRAIT(perp, TRAIT_MINDSHIELD)) threatcount += 4 return threatcount diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index b84db2ca8d..90166dacf0 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -51,6 +51,7 @@ /obj/machinery/suit_storage_unit/security suit_type = /obj/item/clothing/suit/space/hardsuit/security mask_type = /obj/item/clothing/mask/gas/sechailer + storage_type = /obj/item/tank/jetpack/oxygen/security /obj/machinery/suit_storage_unit/hos suit_type = /obj/item/clothing/suit/space/hardsuit/security/hos diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 99baad11ae..ba08109427 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -257,8 +257,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Initialize() . = ..() - create_reagents(max_volume) - reagents.set_reacting(FALSE) + create_reagents(max_volume, NO_REACT) syringes = new known_reagents = list("epinephrine"="Epinephrine","charcoal"="Charcoal") processed_reagents = new @@ -274,7 +273,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail() ..() if(reagents) - reagents.set_reacting(TRUE) + DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M) if(..()) diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 1a3886c3df..80c92c7922 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -421,14 +421,13 @@ if(!istype(T)) return var/datum/gas_mixture/GM = new - GM.add_gas(/datum/gas/plasma) if(prob(10)) - GM.gases[/datum/gas/plasma][MOLES] += 100 + GM.gases[/datum/gas/plasma] += 100 GM.temperature = 1500+T0C //should be enough to start a fire T.visible_message("[src] suddenly disgorges a cloud of heated plasma.") qdel(src) else - GM.gases[/datum/gas/plasma][MOLES] += 5 + GM.gases[/datum/gas/plasma] += 5 GM.temperature = istype(T) ? T.air.return_temperature() : T20C T.visible_message("[src] suddenly disgorges a cloud of plasma.") T.assume_air(GM) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index d5de4a4898..4700dda60d 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -237,9 +237,8 @@ cabin_air = new cabin_air.temperature = T20C cabin_air.volume = 200 - cabin_air.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - cabin_air.gases[/datum/gas/oxygen][MOLES] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.gases[/datum/gas/nitrogen][MOLES] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) + cabin_air.gases[/datum/gas/oxygen] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) + cabin_air.gases[/datum/gas/nitrogen] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) return cabin_air /obj/mecha/proc/add_radio() @@ -446,13 +445,13 @@ var/mob/living/L = user if(!Adjacent(target)) if(selected && selected.is_ranged()) - if(L.has_trait(TRAIT_PACIFISM) && selected.harmful) + if(HAS_TRAIT(L, TRAIT_PACIFISM) && selected.harmful) to_chat(user, "You don't want to harm other living beings!") return if(selected.action(target,params)) selected.start_cooldown() else if(selected && selected.is_melee()) - if(isliving(target) && selected.harmful && L.has_trait(TRAIT_PACIFISM)) + if(isliving(target) && selected.harmful && HAS_TRAIT(L, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm other living beings!") return if(selected.action(target,params)) diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 07152b0310..d5aff99f32 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -72,7 +72,7 @@ ..() if(ishuman(O)) var/mob/living/carbon/human/H = O - if(H.shoes && blood_state && bloodiness && !H.has_trait(TRAIT_LIGHT_STEP)) + if(H.shoes && blood_state && bloodiness && !HAS_TRAIT(H, TRAIT_LIGHT_STEP)) var/obj/item/clothing/shoes/S = H.shoes var/add_blood = 0 if(bloodiness >= BLOOD_GAIN_PER_STEP) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index f1a1655fb4..35f06c2768 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -60,7 +60,7 @@ /obj/effect/decal/cleanable/blood/gibs/Crossed(mob/living/L) if(istype(L) && has_gravity(loc)) - playsound(loc, 'sound/effects/gib_step.ogg', L.has_trait(TRAIT_LIGHT_STEP) ? 20 : 50, 1) + playsound(loc, 'sound/effects/gib_step.ogg', HAS_TRAIT(L, TRAIT_LIGHT_STEP) ? 20 : 50, 1) . = ..() /obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 264715e2ac..10ee73915c 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -1,347 +1,347 @@ -// Foam -// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin. -#define ALUMINUM_FOAM 1 -#define IRON_FOAM 2 -#define RESIN_FOAM 3 - - -/obj/effect/particle_effect/foam - name = "foam" - icon_state = "foam" - opacity = 0 - anchored = TRUE - density = FALSE - layer = EDGED_TURF_LAYER - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - var/amount = 3 - animate_movement = 0 - var/metal = 0 - var/lifetime = 40 - var/reagent_divisor = 7 - var/static/list/blacklisted_turfs = typecacheof(list( - /turf/open/space/transit, - /turf/open/chasm, - /turf/open/lava)) - -/obj/effect/particle_effect/foam/firefighting - name = "firefighting foam" - lifetime = 20 //doesn't last as long as normal foam - amount = 0 //no spread - var/absorbed_plasma = 0 - -/obj/effect/particle_effect/foam/firefighting/MakeSlippery() - return - -/obj/effect/particle_effect/foam/firefighting/process() - ..() - - var/turf/open/T = get_turf(src) - var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot && istype(T) && T.air) - qdel(hotspot) - var/datum/gas_mixture/G = T.air - var/plas_amt = min(30,G.gases[/datum/gas/plasma][MOLES]) //Absorb some plasma - G.gases[/datum/gas/plasma][MOLES] -= plas_amt - absorbed_plasma += plas_amt - if(G.temperature > T20C) - G.temperature = max(G.temperature/2,T20C) - G.garbage_collect() - T.air_update_turf() - -/obj/effect/particle_effect/foam/firefighting/kill_foam() - STOP_PROCESSING(SSfastprocess, src) - - if(absorbed_plasma) - var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src)) - if(!P) - P = new(loc) - P.reagents.add_reagent("stable_plasma", absorbed_plasma) - - flick("[icon_state]-disolve", src) - QDEL_IN(src, 5) - -/obj/effect/particle_effect/foam/firefighting/foam_mob(mob/living/L) - if(!istype(L)) - return - L.adjust_fire_stacks(-2) - L.ExtinguishMob() - -/obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - -/obj/effect/particle_effect/foam/metal - name = "aluminium foam" - metal = ALUMINUM_FOAM - icon_state = "mfoam" - -/obj/effect/particle_effect/foam/metal/MakeSlippery() - return - -/obj/effect/particle_effect/foam/metal/smart - name = "smart foam" - -/obj/effect/particle_effect/foam/metal/iron - name = "iron foam" - metal = IRON_FOAM - -/obj/effect/particle_effect/foam/metal/resin - name = "resin foam" - metal = RESIN_FOAM - -/obj/effect/particle_effect/foam/long_life - lifetime = 150 - -/obj/effect/particle_effect/foam/Initialize() - . = ..() - MakeSlippery() - create_reagents(1000) //limited by the size of the reagent holder anyway. - START_PROCESSING(SSfastprocess, src) - playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) - -/obj/effect/particle_effect/foam/proc/MakeSlippery() - AddComponent(/datum/component/slippery, 100) - -/obj/effect/particle_effect/foam/Destroy() - STOP_PROCESSING(SSfastprocess, src) - return ..() - - -/obj/effect/particle_effect/foam/proc/kill_foam() - STOP_PROCESSING(SSfastprocess, src) - switch(metal) - if(ALUMINUM_FOAM) - new /obj/structure/foamedmetal(get_turf(src)) - if(IRON_FOAM) - new /obj/structure/foamedmetal/iron(get_turf(src)) - if(RESIN_FOAM) - new /obj/structure/foamedmetal/resin(get_turf(src)) - flick("[icon_state]-disolve", src) - QDEL_IN(src, 5) - -/obj/effect/particle_effect/foam/smart/kill_foam() //Smart foam adheres to area borders for walls - STOP_PROCESSING(SSfastprocess, src) - if(metal) - var/turf/T = get_turf(src) - if(isspaceturf(T)) //Block up any exposed space - T.PlaceOnTop(/turf/open/floor/plating/foam) - for(var/direction in GLOB.cardinals) - var/turf/cardinal_turf = get_step(T, direction) - if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf! - new/obj/structure/foamedmetal(T) - break - flick("[icon_state]-disolve", src) - QDEL_IN(src, 5) - -/obj/effect/particle_effect/foam/process() - lifetime-- - if(lifetime < 1) - kill_foam() - return - - var/fraction = 1/initial(reagent_divisor) - for(var/obj/O in range(0,src)) - if(O.type == src.type) - continue - if(isturf(O.loc)) - var/turf/T = O.loc - if(T.intact && O.level == 1) //hidden under the floor - continue - if(lifetime % reagent_divisor) - reagents.reaction(O, VAPOR, fraction) - var/hit = 0 - for(var/mob/living/L in range(0,src)) - hit += foam_mob(L) - if(hit) - lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate. - var/T = get_turf(src) - if(lifetime % reagent_divisor) - reagents.reaction(T, VAPOR, fraction) - - if(--amount < 0) - return - spread_foam() - -/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L) - if(lifetime<1) - return 0 - if(!istype(L)) - return 0 - var/fraction = 1/initial(reagent_divisor) - if(lifetime % reagent_divisor) - reagents.reaction(L, VAPOR, fraction) - lifetime-- - return 1 - -/obj/effect/particle_effect/foam/proc/spread_foam() - var/turf/t_loc = get_turf(src) - for(var/turf/T in t_loc.GetAtmosAdjacentTurfs()) - var/obj/effect/particle_effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam! - if(foundfoam) - continue - - if(is_type_in_typecache(T, blacklisted_turfs)) - continue - - for(var/mob/living/L in T) - foam_mob(L) - var/obj/effect/particle_effect/foam/F = new src.type(T) - F.amount = amount - reagents.copy_to(F, (reagents.total_volume)) - F.add_atom_colour(color, FIXED_COLOUR_PRIORITY) - F.metal = metal - - -/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated - kill_foam() - - -/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - - -/////////////////////////////////////////////// -//FOAM EFFECT DATUM -/datum/effect_system/foam_spread - var/amount = 10 // the size of the foam spread. - var/obj/chemholder - effect_type = /obj/effect/particle_effect/foam - var/metal = 0 - - -/datum/effect_system/foam_spread/metal - effect_type = /obj/effect/particle_effect/foam/metal - - -/datum/effect_system/foam_spread/metal/smart - effect_type = /obj/effect/particle_effect/foam/smart - - -/datum/effect_system/foam_spread/long - effect_type = /obj/effect/particle_effect/foam/long_life - -/datum/effect_system/foam_spread/New() - ..() - chemholder = new /obj() - var/datum/reagents/R = new/datum/reagents(1000) - chemholder.reagents = R - R.my_atom = chemholder - -/datum/effect_system/foam_spread/Destroy() - qdel(chemholder) - chemholder = null - return ..() - -/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null) - if(isturf(loca)) - location = loca - else - location = get_turf(loca) - - amount = round(sqrt(amt / 2), 1) - carry.copy_to(chemholder, carry.total_volume) - -/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype) - ..() - metal = metaltype - -/datum/effect_system/foam_spread/start() - var/obj/effect/particle_effect/foam/F = new effect_type(location) - var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list) - chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount) - F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY) - F.amount = amount - F.metal = metal - - -////////////////////////////////////////////////////////// -// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break -/obj/structure/foamedmetal - icon = 'icons/effects/effects.dmi' - icon_state = "metalfoam" - density = TRUE - opacity = 1 // changed in New() - anchored = TRUE - layer = EDGED_TURF_LAYER - resistance_flags = FIRE_PROOF | ACID_PROOF - name = "foamed metal" - desc = "A lightweight foamed metal wall." - gender = PLURAL - max_integrity = 20 - CanAtmosPass = ATMOS_PASS_DENSITY - -/obj/structure/foamedmetal/Initialize() - . = ..() - air_update_turf(1) - -/obj/structure/foamedmetal/Move() - var/turf/T = loc - . = ..() - move_update_air(T) - -/obj/structure/foamedmetal/attack_paw(mob/user) - return attack_hand(user) - -/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - -/obj/structure/foamedmetal/attack_hand(mob/user) - . = ..() - if(.) - return - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) - to_chat(user, "You hit [src] but bounce off it!") - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - -/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target) - return !density - -/obj/structure/foamedmetal/iron - max_integrity = 50 - icon_state = "ironfoam" - -//Atmos Backpack Resin, transparent, prevents atmos and filters the air -/obj/structure/foamedmetal/resin - name = "\improper ATMOS Resin" - desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature." - opacity = FALSE - icon_state = "atmos_resin" - alpha = 120 - max_integrity = 10 - -/obj/structure/foamedmetal/resin/Initialize() - . = ..() - if(isopenturf(loc)) - var/turf/open/O = loc - O.ClearWet() - if(O.air) - var/datum/gas_mixture/G = O.air - G.temperature = 293.15 - for(var/obj/effect/hotspot/H in O) - qdel(H) - var/list/G_gases = G.gases - for(var/I in G_gases) - if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen) - continue - G_gases[I][MOLES] = 0 - G.garbage_collect() - O.air_update_turf() - for(var/obj/machinery/atmospherics/components/unary/U in O) - if(!U.welded) - U.welded = TRUE - U.update_icon() - U.visible_message("[U] sealed shut!") - for(var/mob/living/L in O) - L.ExtinguishMob() - for(var/obj/item/Item in O) - Item.extinguish() - -/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target) - if(istype(mover) && (mover.pass_flags & PASSGLASS)) - return TRUE - . = ..() - -#undef ALUMINUM_FOAM -#undef IRON_FOAM -#undef RESIN_FOAM +// Foam +// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin. +#define ALUMINUM_FOAM 1 +#define IRON_FOAM 2 +#define RESIN_FOAM 3 + + +/obj/effect/particle_effect/foam + name = "foam" + icon_state = "foam" + opacity = 0 + anchored = TRUE + density = FALSE + layer = EDGED_TURF_LAYER + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + var/amount = 3 + animate_movement = 0 + var/metal = 0 + var/lifetime = 40 + var/reagent_divisor = 7 + var/static/list/blacklisted_turfs = typecacheof(list( + /turf/open/space/transit, + /turf/open/chasm, + /turf/open/lava)) + +/obj/effect/particle_effect/foam/firefighting + name = "firefighting foam" + lifetime = 20 //doesn't last as long as normal foam + amount = 0 //no spread + var/absorbed_plasma = 0 + +/obj/effect/particle_effect/foam/firefighting/MakeSlippery() + return + +/obj/effect/particle_effect/foam/firefighting/process() + ..() + + var/turf/open/T = get_turf(src) + var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot && istype(T) && T.air) + qdel(hotspot) + var/datum/gas_mixture/G = T.air + var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma + G.gases[/datum/gas/plasma] -= plas_amt + absorbed_plasma += plas_amt + if(G.temperature > T20C) + G.temperature = max(G.temperature/2,T20C) + GAS_GARBAGE_COLLECT(G.gases) + T.air_update_turf() + +/obj/effect/particle_effect/foam/firefighting/kill_foam() + STOP_PROCESSING(SSfastprocess, src) + + if(absorbed_plasma) + var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src)) + if(!P) + P = new(loc) + P.reagents.add_reagent("stable_plasma", absorbed_plasma) + + flick("[icon_state]-disolve", src) + QDEL_IN(src, 5) + +/obj/effect/particle_effect/foam/firefighting/foam_mob(mob/living/L) + if(!istype(L)) + return + L.adjust_fire_stacks(-2) + L.ExtinguishMob() + +/obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + return + +/obj/effect/particle_effect/foam/metal + name = "aluminium foam" + metal = ALUMINUM_FOAM + icon_state = "mfoam" + +/obj/effect/particle_effect/foam/metal/MakeSlippery() + return + +/obj/effect/particle_effect/foam/metal/smart + name = "smart foam" + +/obj/effect/particle_effect/foam/metal/iron + name = "iron foam" + metal = IRON_FOAM + +/obj/effect/particle_effect/foam/metal/resin + name = "resin foam" + metal = RESIN_FOAM + +/obj/effect/particle_effect/foam/long_life + lifetime = 150 + +/obj/effect/particle_effect/foam/Initialize() + . = ..() + MakeSlippery() + create_reagents(1000) //limited by the size of the reagent holder anyway. + START_PROCESSING(SSfastprocess, src) + playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) + +/obj/effect/particle_effect/foam/proc/MakeSlippery() + AddComponent(/datum/component/slippery, 100) + +/obj/effect/particle_effect/foam/Destroy() + STOP_PROCESSING(SSfastprocess, src) + return ..() + + +/obj/effect/particle_effect/foam/proc/kill_foam() + STOP_PROCESSING(SSfastprocess, src) + switch(metal) + if(ALUMINUM_FOAM) + new /obj/structure/foamedmetal(get_turf(src)) + if(IRON_FOAM) + new /obj/structure/foamedmetal/iron(get_turf(src)) + if(RESIN_FOAM) + new /obj/structure/foamedmetal/resin(get_turf(src)) + flick("[icon_state]-disolve", src) + QDEL_IN(src, 5) + +/obj/effect/particle_effect/foam/smart/kill_foam() //Smart foam adheres to area borders for walls + STOP_PROCESSING(SSfastprocess, src) + if(metal) + var/turf/T = get_turf(src) + if(isspaceturf(T)) //Block up any exposed space + T.PlaceOnTop(/turf/open/floor/plating/foam) + for(var/direction in GLOB.cardinals) + var/turf/cardinal_turf = get_step(T, direction) + if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf! + new/obj/structure/foamedmetal(T) + break + flick("[icon_state]-disolve", src) + QDEL_IN(src, 5) + +/obj/effect/particle_effect/foam/process() + lifetime-- + if(lifetime < 1) + kill_foam() + return + + var/fraction = 1/initial(reagent_divisor) + for(var/obj/O in range(0,src)) + if(O.type == src.type) + continue + if(isturf(O.loc)) + var/turf/T = O.loc + if(T.intact && O.level == 1) //hidden under the floor + continue + if(lifetime % reagent_divisor) + reagents.reaction(O, VAPOR, fraction) + var/hit = 0 + for(var/mob/living/L in range(0,src)) + hit += foam_mob(L) + if(hit) + lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate. + var/T = get_turf(src) + if(lifetime % reagent_divisor) + reagents.reaction(T, VAPOR, fraction) + + if(--amount < 0) + return + spread_foam() + +/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L) + if(lifetime<1) + return 0 + if(!istype(L)) + return 0 + var/fraction = 1/initial(reagent_divisor) + if(lifetime % reagent_divisor) + reagents.reaction(L, VAPOR, fraction) + lifetime-- + return 1 + +/obj/effect/particle_effect/foam/proc/spread_foam() + var/turf/t_loc = get_turf(src) + for(var/turf/T in t_loc.GetAtmosAdjacentTurfs()) + var/obj/effect/particle_effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam! + if(foundfoam) + continue + + if(is_type_in_typecache(T, blacklisted_turfs)) + continue + + for(var/mob/living/L in T) + foam_mob(L) + var/obj/effect/particle_effect/foam/F = new src.type(T) + F.amount = amount + reagents.copy_to(F, (reagents.total_volume)) + F.add_atom_colour(color, FIXED_COLOUR_PRIORITY) + F.metal = metal + + +/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated + kill_foam() + + +/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + return + + +/////////////////////////////////////////////// +//FOAM EFFECT DATUM +/datum/effect_system/foam_spread + var/amount = 10 // the size of the foam spread. + var/obj/chemholder + effect_type = /obj/effect/particle_effect/foam + var/metal = 0 + + +/datum/effect_system/foam_spread/metal + effect_type = /obj/effect/particle_effect/foam/metal + + +/datum/effect_system/foam_spread/metal/smart + effect_type = /obj/effect/particle_effect/foam/smart + + +/datum/effect_system/foam_spread/long + effect_type = /obj/effect/particle_effect/foam/long_life + +/datum/effect_system/foam_spread/New() + ..() + chemholder = new /obj() + var/datum/reagents/R = new/datum/reagents(1000) + chemholder.reagents = R + R.my_atom = chemholder + +/datum/effect_system/foam_spread/Destroy() + qdel(chemholder) + chemholder = null + return ..() + +/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null) + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + + amount = round(sqrt(amt / 2), 1) + carry.copy_to(chemholder, carry.total_volume) + +/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype) + ..() + metal = metaltype + +/datum/effect_system/foam_spread/start() + var/obj/effect/particle_effect/foam/F = new effect_type(location) + var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list) + chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount) + F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY) + F.amount = amount + F.metal = metal + + +////////////////////////////////////////////////////////// +// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break +/obj/structure/foamedmetal + icon = 'icons/effects/effects.dmi' + icon_state = "metalfoam" + density = TRUE + opacity = 1 // changed in New() + anchored = TRUE + layer = EDGED_TURF_LAYER + resistance_flags = FIRE_PROOF | ACID_PROOF + name = "foamed metal" + desc = "A lightweight foamed metal wall." + gender = PLURAL + max_integrity = 20 + CanAtmosPass = ATMOS_PASS_DENSITY + +/obj/structure/foamedmetal/Initialize() + . = ..() + air_update_turf(1) + +/obj/structure/foamedmetal/Move() + var/turf/T = loc + . = ..() + move_update_air(T) + +/obj/structure/foamedmetal/attack_paw(mob/user) + return attack_hand(user) + +/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) + +/obj/structure/foamedmetal/attack_hand(mob/user) + . = ..() + if(.) + return + user.changeNext_move(CLICK_CD_MELEE) + user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) + to_chat(user, "You hit [src] but bounce off it!") + playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) + +/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target) + return !density + +/obj/structure/foamedmetal/iron + max_integrity = 50 + icon_state = "ironfoam" + +//Atmos Backpack Resin, transparent, prevents atmos and filters the air +/obj/structure/foamedmetal/resin + name = "\improper ATMOS Resin" + desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature." + opacity = FALSE + icon_state = "atmos_resin" + alpha = 120 + max_integrity = 10 + +/obj/structure/foamedmetal/resin/Initialize() + . = ..() + if(isopenturf(loc)) + var/turf/open/O = loc + O.ClearWet() + if(O.air) + var/datum/gas_mixture/G = O.air + G.temperature = 293.15 + for(var/obj/effect/hotspot/H in O) + qdel(H) + var/list/G_gases = G.gases + for(var/I in G_gases) + if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen) + continue + G_gases[I] = 0 + GAS_GARBAGE_COLLECT(G.gases) + O.air_update_turf() + for(var/obj/machinery/atmospherics/components/unary/U in O) + if(!U.welded) + U.welded = TRUE + U.update_icon() + U.visible_message("[U] sealed shut!") + for(var/mob/living/L in O) + L.ExtinguishMob() + for(var/obj/item/Item in O) + Item.extinguish() + +/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target) + if(istype(mover) && (mover.pass_flags & PASSGLASS)) + return TRUE + . = ..() + +#undef ALUMINUM_FOAM +#undef IRON_FOAM +#undef RESIN_FOAM diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index e8e833890b..79deac475b 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -1,329 +1,328 @@ -///////////////////////////////////////////// -//// SMOKE SYSTEMS -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke - name = "smoke" - icon = 'icons/effects/96x96.dmi' - icon_state = "smoke" - pixel_x = -32 - pixel_y = -32 - opacity = 0 - layer = FLY_LAYER - anchored = TRUE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - animate_movement = 0 - var/amount = 4 - var/lifetime = 5 - var/opaque = 1 //whether the smoke can block the view when in enough amount - - -/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16) - if(alpha == 0) //Handle already transparent case - return - if(frames == 0) - frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame". - var/step = alpha / frames - for(var/i = 0, i < frames, i++) - alpha -= step - if(alpha < 160) - set_opacity(0) //if we were blocking view, we aren't now because we're fading out - stoplag() - -/obj/effect/particle_effect/smoke/Initialize() - . = ..() - create_reagents(500) - START_PROCESSING(SSobj, src) - - -/obj/effect/particle_effect/smoke/Destroy() - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/effect/particle_effect/smoke/proc/kill_smoke() - STOP_PROCESSING(SSobj, src) - INVOKE_ASYNC(src, .proc/fade_out) - QDEL_IN(src, 10) - -/obj/effect/particle_effect/smoke/process() - lifetime-- - if(lifetime < 1) - kill_smoke() - return 0 - for(var/mob/living/L in range(0,src)) - smoke_mob(L) - return 1 - -/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C) - if(!istype(C)) - return 0 - if(lifetime<1) - return 0 - if(C.internal != null || C.has_smoke_protection()) - return 0 - if(C.smoke_delay) - return 0 - C.smoke_delay++ - addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10) - return 1 - -/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) - if(C) - C.smoke_delay = 0 - -/obj/effect/particle_effect/smoke/proc/spread_smoke() - var/turf/t_loc = get_turf(src) - if(!t_loc) - return - var/list/newsmokes = list() - for(var/turf/T in t_loc.GetAtmosAdjacentTurfs()) - var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke! - if(foundsmoke) - continue - for(var/mob/living/L in T) - smoke_mob(L) - var/obj/effect/particle_effect/smoke/S = new type(T) - reagents.copy_to(S, reagents.total_volume) - S.setDir(pick(GLOB.cardinals)) - S.amount = amount-1 - S.add_atom_colour(color, FIXED_COLOUR_PRIORITY) - S.lifetime = lifetime - if(S.amount>0) - if(opaque) - S.set_opacity(TRUE) - newsmokes.Add(S) - - if(newsmokes.len) - spawn(1) //the smoke spreads rapidly but not instantly - for(var/obj/effect/particle_effect/smoke/SM in newsmokes) - SM.spread_smoke() - - -/datum/effect_system/smoke_spread - var/amount = 10 - effect_type = /obj/effect/particle_effect/smoke - -/datum/effect_system/smoke_spread/set_up(radius = 5, loca) - if(isturf(loca)) - location = loca - else - location = get_turf(loca) - amount = radius - -/datum/effect_system/smoke_spread/start() - if(holder) - location = get_turf(holder) - var/obj/effect/particle_effect/smoke/S = new effect_type(location) - S.amount = amount - if(S.amount) - S.spread_smoke() - - -///////////////////////////////////////////// -// Bad smoke -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/bad - lifetime = 8 - -/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M) - if(..()) - M.drop_all_held_items() - M.adjustOxyLoss(1) - M.emote("cough") - return 1 - -/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target) - if(istype(mover, /obj/item/projectile/beam)) - var/obj/item/projectile/beam/B = mover - B.damage = (B.damage/2) - return 1 - - - -/datum/effect_system/smoke_spread/bad - effect_type = /obj/effect/particle_effect/smoke/bad - -///////////////////////////////////////////// -// Nanofrost smoke -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/freezing - name = "nanofrost smoke" - color = "#B2FFFF" - opaque = 0 - -/datum/effect_system/smoke_spread/freezing - effect_type = /obj/effect/particle_effect/smoke/freezing - var/blast = 0 - var/temperature = 2 - var/weldvents = TRUE - var/distcheck = TRUE - -/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A) - if(isopenturf(A)) - var/turf/open/T = A - if(T.air) - var/datum/gas_mixture/G = T.air - if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air - G.temperature = temperature - T.air_update_turf() - for(var/obj/effect/hotspot/H in T) - qdel(H) - var/list/G_gases = G.gases - if(G_gases[/datum/gas/plasma]) - G.assert_gas(/datum/gas/nitrogen) - G_gases[/datum/gas/nitrogen][MOLES] += (G_gases[/datum/gas/plasma][MOLES]) - G_gases[/datum/gas/plasma][MOLES] = 0 - G.garbage_collect() - if (weldvents) - for(var/obj/machinery/atmospherics/components/unary/U in T) - if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber. - U.welded = TRUE - U.update_icon() - U.visible_message("[U] was frozen shut!") - for(var/mob/living/L in T) - L.ExtinguishMob() - for(var/obj/item/Item in T) - Item.extinguish() - -/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blast_radius = 0) - ..() - blast = blast_radius - -/datum/effect_system/smoke_spread/freezing/start() - if(blast) - for(var/turf/T in RANGE_TURFS(blast, location)) - Chilled(T) - ..() - -/datum/effect_system/smoke_spread/freezing/decon - temperature = 293.15 - distcheck = FALSE - weldvents = FALSE - - -///////////////////////////////////////////// -// Sleep smoke -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/sleeping - color = "#9C3636" - lifetime = 10 - -/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M) - if(..()) - M.Sleeping(200) - M.emote("cough") - return 1 - -/datum/effect_system/smoke_spread/sleeping - effect_type = /obj/effect/particle_effect/smoke/sleeping - -///////////////////////////////////////////// -// Chem smoke -///////////////////////////////////////////// - -/obj/effect/particle_effect/smoke/chem - lifetime = 10 - - -/obj/effect/particle_effect/smoke/chem/process() - if(..()) - var/turf/T = get_turf(src) - var/fraction = 1/initial(lifetime) - for(var/atom/movable/AM in T) - if(AM.type == src.type) - continue - if(T.intact && AM.level == 1) //hidden under the floor - continue - reagents.reaction(AM, TOUCH, fraction) - - reagents.reaction(T, TOUCH, fraction) - return 1 - -/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M) - if(lifetime<1) - return 0 - if(!istype(M)) - return 0 - var/mob/living/carbon/C = M - if(C.internal != null || C.has_smoke_protection()) - return 0 - var/fraction = 1/initial(lifetime) - reagents.copy_to(C, fraction*reagents.total_volume) - reagents.reaction(M, INGEST, fraction) - return 1 - - - -/datum/effect_system/smoke_spread/chem - var/obj/chemholder - effect_type = /obj/effect/particle_effect/smoke/chem - -/datum/effect_system/smoke_spread/chem/New() - ..() - chemholder = new /obj() - var/datum/reagents/R = new/datum/reagents(500) - chemholder.reagents = R - R.my_atom = chemholder - -/datum/effect_system/smoke_spread/chem/Destroy() - qdel(chemholder) - chemholder = null - return ..() - -/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE) - if(isturf(loca)) - location = loca - else - location = get_turf(loca) - amount = radius - carry.copy_to(chemholder, carry.total_volume) - - if(!silent) - var/contained = "" - for(var/reagent in carry.reagent_list) - contained += " [reagent] " - if(contained) - contained = "\[[contained]\]" - - var/where = "[AREACOORD(location)]" - if(carry.my_atom.fingerprintslast) - var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) - var/more = "" - if(M) - more = "[ADMIN_LOOKUPFLW(M)] " - message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].") - log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].") - else - message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. No associated key.") - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") - - -/datum/effect_system/smoke_spread/chem/start() - var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list) - if(holder) - location = get_turf(holder) - var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location) - - if(chemholder.reagents.total_volume > 1) // can't split 1 very well - chemholder.reagents.copy_to(S, chemholder.reagents.total_volume) - - if(mixcolor) - S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with - S.amount = amount - if(S.amount) - S.spread_smoke() //calling process right now so the smoke immediately attacks mobs. - - -///////////////////////////////////////////// -// Transparent smoke -///////////////////////////////////////////// - -//Same as the base type, but the smoke produced is not opaque -/datum/effect_system/smoke_spread/transparent - effect_type = /obj/effect/particle_effect/smoke/transparent - -/obj/effect/particle_effect/smoke/transparent - opaque = FALSE +///////////////////////////////////////////// +//// SMOKE SYSTEMS +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke + name = "smoke" + icon = 'icons/effects/96x96.dmi' + icon_state = "smoke" + pixel_x = -32 + pixel_y = -32 + opacity = 0 + layer = FLY_LAYER + anchored = TRUE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + animate_movement = 0 + var/amount = 4 + var/lifetime = 5 + var/opaque = 1 //whether the smoke can block the view when in enough amount + + +/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16) + if(alpha == 0) //Handle already transparent case + return + if(frames == 0) + frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame". + var/step = alpha / frames + for(var/i = 0, i < frames, i++) + alpha -= step + if(alpha < 160) + set_opacity(0) //if we were blocking view, we aren't now because we're fading out + stoplag() + +/obj/effect/particle_effect/smoke/Initialize() + . = ..() + create_reagents(500) + START_PROCESSING(SSobj, src) + + +/obj/effect/particle_effect/smoke/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/effect/particle_effect/smoke/proc/kill_smoke() + STOP_PROCESSING(SSobj, src) + INVOKE_ASYNC(src, .proc/fade_out) + QDEL_IN(src, 10) + +/obj/effect/particle_effect/smoke/process() + lifetime-- + if(lifetime < 1) + kill_smoke() + return 0 + for(var/mob/living/L in range(0,src)) + smoke_mob(L) + return 1 + +/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C) + if(!istype(C)) + return 0 + if(lifetime<1) + return 0 + if(C.internal != null || C.has_smoke_protection()) + return 0 + if(C.smoke_delay) + return 0 + C.smoke_delay++ + addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10) + return 1 + +/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C) + if(C) + C.smoke_delay = 0 + +/obj/effect/particle_effect/smoke/proc/spread_smoke() + var/turf/t_loc = get_turf(src) + if(!t_loc) + return + var/list/newsmokes = list() + for(var/turf/T in t_loc.GetAtmosAdjacentTurfs()) + var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke! + if(foundsmoke) + continue + for(var/mob/living/L in T) + smoke_mob(L) + var/obj/effect/particle_effect/smoke/S = new type(T) + reagents.copy_to(S, reagents.total_volume) + S.setDir(pick(GLOB.cardinals)) + S.amount = amount-1 + S.add_atom_colour(color, FIXED_COLOUR_PRIORITY) + S.lifetime = lifetime + if(S.amount>0) + if(opaque) + S.set_opacity(TRUE) + newsmokes.Add(S) + + if(newsmokes.len) + spawn(1) //the smoke spreads rapidly but not instantly + for(var/obj/effect/particle_effect/smoke/SM in newsmokes) + SM.spread_smoke() + + +/datum/effect_system/smoke_spread + var/amount = 10 + effect_type = /obj/effect/particle_effect/smoke + +/datum/effect_system/smoke_spread/set_up(radius = 5, loca) + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + amount = radius + +/datum/effect_system/smoke_spread/start() + if(holder) + location = get_turf(holder) + var/obj/effect/particle_effect/smoke/S = new effect_type(location) + S.amount = amount + if(S.amount) + S.spread_smoke() + + +///////////////////////////////////////////// +// Bad smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/bad + lifetime = 8 + +/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M) + if(..()) + M.drop_all_held_items() + M.adjustOxyLoss(1) + M.emote("cough") + return 1 + +/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target) + if(istype(mover, /obj/item/projectile/beam)) + var/obj/item/projectile/beam/B = mover + B.damage = (B.damage/2) + return 1 + + + +/datum/effect_system/smoke_spread/bad + effect_type = /obj/effect/particle_effect/smoke/bad + +///////////////////////////////////////////// +// Nanofrost smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/freezing + name = "nanofrost smoke" + color = "#B2FFFF" + opaque = 0 + +/datum/effect_system/smoke_spread/freezing + effect_type = /obj/effect/particle_effect/smoke/freezing + var/blast = 0 + var/temperature = 2 + var/weldvents = TRUE + var/distcheck = TRUE + +/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A) + if(isopenturf(A)) + var/turf/open/T = A + if(T.air) + var/datum/gas_mixture/G = T.air + if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air + G.temperature = temperature + T.air_update_turf() + for(var/obj/effect/hotspot/H in T) + qdel(H) + var/list/G_gases = G.gases + if(G_gases[/datum/gas/plasma]) + G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma]) + G_gases[/datum/gas/plasma] = 0 + GAS_GARBAGE_COLLECT(G.gases) + if (weldvents) + for(var/obj/machinery/atmospherics/components/unary/U in T) + if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber. + U.welded = TRUE + U.update_icon() + U.visible_message("[U] was frozen shut!") + for(var/mob/living/L in T) + L.ExtinguishMob() + for(var/obj/item/Item in T) + Item.extinguish() + +/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blast_radius = 0) + ..() + blast = blast_radius + +/datum/effect_system/smoke_spread/freezing/start() + if(blast) + for(var/turf/T in RANGE_TURFS(blast, location)) + Chilled(T) + ..() + +/datum/effect_system/smoke_spread/freezing/decon + temperature = 293.15 + distcheck = FALSE + weldvents = FALSE + + +///////////////////////////////////////////// +// Sleep smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/sleeping + color = "#9C3636" + lifetime = 10 + +/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M) + if(..()) + M.Sleeping(200) + M.emote("cough") + return 1 + +/datum/effect_system/smoke_spread/sleeping + effect_type = /obj/effect/particle_effect/smoke/sleeping + +///////////////////////////////////////////// +// Chem smoke +///////////////////////////////////////////// + +/obj/effect/particle_effect/smoke/chem + lifetime = 10 + + +/obj/effect/particle_effect/smoke/chem/process() + if(..()) + var/turf/T = get_turf(src) + var/fraction = 1/initial(lifetime) + for(var/atom/movable/AM in T) + if(AM.type == src.type) + continue + if(T.intact && AM.level == 1) //hidden under the floor + continue + reagents.reaction(AM, TOUCH, fraction) + + reagents.reaction(T, TOUCH, fraction) + return 1 + +/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M) + if(lifetime<1) + return 0 + if(!istype(M)) + return 0 + var/mob/living/carbon/C = M + if(C.internal != null || C.has_smoke_protection()) + return 0 + var/fraction = 1/initial(lifetime) + reagents.copy_to(C, fraction*reagents.total_volume) + reagents.reaction(M, INGEST, fraction) + return 1 + + + +/datum/effect_system/smoke_spread/chem + var/obj/chemholder + effect_type = /obj/effect/particle_effect/smoke/chem + +/datum/effect_system/smoke_spread/chem/New() + ..() + chemholder = new /obj() + var/datum/reagents/R = new/datum/reagents(500) + chemholder.reagents = R + R.my_atom = chemholder + +/datum/effect_system/smoke_spread/chem/Destroy() + qdel(chemholder) + chemholder = null + return ..() + +/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE) + if(isturf(loca)) + location = loca + else + location = get_turf(loca) + amount = radius + carry.copy_to(chemholder, carry.total_volume) + + if(!silent) + var/contained = "" + for(var/reagent in carry.reagent_list) + contained += " [reagent] " + if(contained) + contained = "\[[contained]\]" + + var/where = "[AREACOORD(location)]" + if(carry.my_atom.fingerprintslast) + var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) + var/more = "" + if(M) + more = "[ADMIN_LOOKUPFLW(M)] " + message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].") + log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].") + else + message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. No associated key.") + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") + + +/datum/effect_system/smoke_spread/chem/start() + var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list) + if(holder) + location = get_turf(holder) + var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location) + + if(chemholder.reagents.total_volume > 1) // can't split 1 very well + chemholder.reagents.copy_to(S, chemholder.reagents.total_volume) + + if(mixcolor) + S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with + S.amount = amount + if(S.amount) + S.spread_smoke() //calling process right now so the smoke immediately attacks mobs. + + +///////////////////////////////////////////// +// Transparent smoke +///////////////////////////////////////////// + +//Same as the base type, but the smoke produced is not opaque +/datum/effect_system/smoke_spread/transparent + effect_type = /obj/effect/particle_effect/smoke/transparent + +/obj/effect/particle_effect/smoke/transparent + opaque = FALSE diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 12a72685bb..7e8094c9e7 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -170,7 +170,7 @@ if(!victim.client || !istype(victim)) return to_chat(victim, "You feel fast!") - victim.add_trait(TRAIT_GOTTAGOREALLYFAST, "yellow_orb") + ADD_TRAIT(victim, TRAIT_GOTTAGOREALLYFAST, "yellow_orb") sleep(duration) - victim.remove_trait(TRAIT_GOTTAGOREALLYFAST, "yellow_orb") + REMOVE_TRAIT(victim, TRAIT_GOTTAGOREALLYFAST, "yellow_orb") to_chat(victim, "You slow down.") diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index b1bb3e6b4d..65395d534a 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -1,6 +1,6 @@ #define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C) -#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT]) / (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT] + (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT] / CELSIUS_TO_KELVIN(TEMP_O))) +#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen] / CELSIUS_TO_KELVIN(TEMP_O))) #define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O)) /obj/effect/spawner/newbomb @@ -19,12 +19,10 @@ var/obj/item/tank/internals/plasma/PT = new(V) var/obj/item/tank/internals/oxygen/OT = new(V) - PT.air_contents.assert_gas(/datum/gas/plasma) - PT.air_contents.gases[/datum/gas/plasma][MOLES] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)) + PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)) PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p) - OT.air_contents.assert_gas(/datum/gas/oxygen) - OT.air_contents.gases[/datum/gas/oxygen][MOLES] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)) + OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)) OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o) V.tank_one = PT diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 4a77274d23..0e543a3642 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -214,6 +214,20 @@ /obj/item/aiModule/core/full/damaged ) +/obj/effect/spawner/lootdrop/mre + name = "random MRE" + icon = 'icons/obj/storage.dmi' + icon_state = "mre" + +/obj/effect/spawner/lootdrop/mre/Initialize() + for(var/A in subtypesof(/obj/item/storage/box/mre)) + var/obj/item/storage/box/mre/M = A + var/our_chance = initial(M.spawner_chance) + if(our_chance) + LAZYSET(loot, M, our_chance) + return ..() + + // Tech storage circuit board spawners // For these, make sure that lootcount equals the number of list items diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9314faab27..2af7be2564 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -109,6 +109,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder! + /obj/item/Initialize() materials = typelist("materials", materials) @@ -256,7 +257,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) can_handle_hot = TRUE else if(C.gloves && (C.gloves.max_heat_protection_temperature > 360)) can_handle_hot = TRUE - else if(C.has_trait(TRAIT_RESISTHEAT) || C.has_trait(TRAIT_RESISTHEATHANDS)) + else if(HAS_TRAIT(C, TRAIT_RESISTHEAT) || HAS_TRAIT(C, TRAIT_RESISTHEATHANDS)) can_handle_hot = TRUE if(can_handle_hot) @@ -449,10 +450,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) return 0 /obj/item/proc/eyestab(mob/living/carbon/M, mob/living/carbon/user) - if(user.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm [M]!") return - if(user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) M = user var/is_human_victim = 0 var/obj/item/bodypart/affecting = M.get_bodypart(BODY_ZONE_HEAD) @@ -523,7 +524,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.adjust_blurriness(15) if(M.stat != DEAD) to_chat(M, "Your eyes start to bleed profusely!") - if(!(M.has_trait(TRAIT_BLIND) || M.has_trait(TRAIT_NEARSIGHT))) + if(!(HAS_TRAIT(M, TRAIT_BLIND) || HAS_TRAIT(M, TRAIT_NEARSIGHT))) to_chat(M, "You become nearsighted!") M.become_nearsighted(EYE_DAMAGE) if(prob(50)) @@ -685,7 +686,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) ..() /obj/item/proc/microwave_act(obj/machinery/microwave/M) - if(M && M.dirty < 100) + if(istype(M) && M.dirty < 100) M.dirty++ /obj/item/proc/on_mob_death(mob/living/L, gibbed) diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 7881c277ff..38d64be99c 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -161,13 +161,18 @@ RLD user.visible_message("[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..") return (BRUTELOSS) -/obj/item/construction/rcd/verb/toggle_window_type() - set name = "Toggle Window Type" +/obj/item/construction/rcd/verb/toggle_window_type_verb() + set name = "RCD : Toggle Window Type" set category = "Object" - set src in usr // What does this do? + set src in view(1) + if(!usr.canUseTopic(src, BE_CLOSE)) + return + + toggle_window_type(usr) + +/obj/item/construction/rcd/proc/toggle_window_type(mob/user) var/window_type_name - if (window_type == /obj/structure/window/fulltile) window_type = /obj/structure/window/reinforced/fulltile window_type_name = "reinforced glass" @@ -175,17 +180,14 @@ RLD window_type = /obj/structure/window/fulltile window_type_name = "glass" - to_chat(usr, "You change \the [src]'s window mode to [window_type_name].") + to_chat(user, "You change \the [src]'s window mode to [window_type_name].") -/obj/item/construction/rcd/verb/change_airlock_access() - set name = "Change Airlock Access" - set category = "Object" - set src in usr +/obj/item/construction/rcd/verb/change_airlock_access(mob/user) - if (!ishuman(usr) && !usr.has_unlimited_silicon_privilege) - return ..(usr) + if (!ishuman(user) && !user.has_unlimited_silicon_privilege) + return - var/t1 = text("") + var/t1 = "" if(use_one_access) @@ -216,24 +218,23 @@ RLD t1 += "

Close

\n" - var/datum/browser/popup = new(usr, "airlock_electronics", "Access Control", 900, 500) + var/datum/browser/popup = new(user, "rcd_access", "Access Control", 900, 500) popup.set_content(t1) - popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state)) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) popup.open() - onclose(usr, "airlock") + onclose(user, "rcd_access") /obj/item/construction/rcd/Topic(href, href_list) ..() if (usr.stat || usr.restrained()) return if (href_list["close"]) - usr << browse(null, "window=airlock") + usr << browse(null, "window=rcd_access") return if (href_list["access"]) toggle_access(href_list["access"]) - - change_airlock_access() + change_airlock_access(usr) /obj/item/construction/rcd/proc/toggle_access(acc) if (acc == "all") @@ -253,16 +254,77 @@ RLD if (!conf_access.len) conf_access = null -/obj/item/construction/rcd/verb/change_airlock_setting() - set name = "Change Airlock Setting" - set category = "Object" - set src in usr +/obj/item/construction/rcd/proc/get_airlock_image(airlock_type) + var/obj/machinery/door/airlock/proto = airlock_type + var/ic = initial(proto.icon) + var/mutable_appearance/MA = mutable_appearance(ic, "closed") + if(!initial(proto.glass)) + MA.overlays += "fill_closed" + //Not scaling these down to button size because they look horrible then, instead just bumping up radius. + return MA - var/airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass") +/obj/item/construction/rcd/proc/check_menu(mob/living/user) + if(!istype(user)) + return FALSE + if(user.incapacitated() || !user.Adjacent(src)) + return FALSE + return TRUE + +/obj/item/construction/rcd/proc/change_airlock_setting(mob/user) + if(!user) + return + + var/list/solid_or_glass_choices = list( + "Solid" = get_airlock_image(/obj/machinery/door/airlock), + "Glass" = get_airlock_image(/obj/machinery/door/airlock/glass) + ) + + var/list/solid_choices = list( + "Standard" = get_airlock_image(/obj/machinery/door/airlock), + "Public" = get_airlock_image(/obj/machinery/door/airlock/public), + "Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering), + "Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos), + "Security" = get_airlock_image(/obj/machinery/door/airlock/security), + "Command" = get_airlock_image(/obj/machinery/door/airlock/command), + "Medical" = get_airlock_image(/obj/machinery/door/airlock/medical), + "Research" = get_airlock_image(/obj/machinery/door/airlock/research), + "Freezer" = get_airlock_image(/obj/machinery/door/airlock/freezer), + "Science" = get_airlock_image(/obj/machinery/door/airlock/science), + "Virology" = get_airlock_image(/obj/machinery/door/airlock/virology), + "Mining" = get_airlock_image(/obj/machinery/door/airlock/mining), + "Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance), + "External" = get_airlock_image(/obj/machinery/door/airlock/external), + "External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external), + "Airtight Hatch" = get_airlock_image(/obj/machinery/door/airlock/hatch), + "Maintenance Hatch" = get_airlock_image(/obj/machinery/door/airlock/maintenance_hatch) + ) + + var/list/glass_choices = list( + "Standard" = get_airlock_image(/obj/machinery/door/airlock/glass), + "Public" = get_airlock_image(/obj/machinery/door/airlock/public/glass), + "Engineering" = get_airlock_image(/obj/machinery/door/airlock/engineering/glass), + "Atmospherics" = get_airlock_image(/obj/machinery/door/airlock/atmos/glass), + "Security" = get_airlock_image(/obj/machinery/door/airlock/security/glass), + "Command" = get_airlock_image(/obj/machinery/door/airlock/command/glass), + "Medical" = get_airlock_image(/obj/machinery/door/airlock/medical/glass), + "Research" = get_airlock_image(/obj/machinery/door/airlock/research/glass), + "Science" = get_airlock_image(/obj/machinery/door/airlock/science/glass), + "Virology" = get_airlock_image(/obj/machinery/door/airlock/virology/glass), + "Mining" = get_airlock_image(/obj/machinery/door/airlock/mining/glass), + "Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/glass), + "External" = get_airlock_image(/obj/machinery/door/airlock/external/glass), + "External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external/glass) + ) + + var/airlockcat = show_radial_menu(user, src, solid_or_glass_choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE) + if(!check_menu(user)) + return switch(airlockcat) if("Solid") if(advanced_airlock_setting == 1) - var/airlockpaint = input(usr, "Select the type of the airlock.") in list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance", "Airtight Hatch", "Maintenance Hatch") + var/airlockpaint = show_radial_menu(user, src, solid_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE) + if(!check_menu(user)) + return switch(airlockpaint) if("Standard") airlock_type = /obj/machinery/door/airlock @@ -305,7 +367,9 @@ RLD if("Glass") if(advanced_airlock_setting == 1) - var/airlockpaint = input(usr, "Select the type of the airlock.") in list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance") + var/airlockpaint = show_radial_menu(user, src , glass_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE) + if(!check_menu(user)) + return switch(airlockpaint) if("Standard") airlock_type = /obj/machinery/door/airlock/glass @@ -356,8 +420,8 @@ RLD playsound(src.loc, 'sound/machines/click.ogg', 50, 1) return TRUE -/obj/item/construction/rcd/New() - ..() +/obj/item/construction/rcd/Initialize() + . = ..() GLOB.rcd_list += src /obj/item/construction/rcd/Destroy() @@ -366,19 +430,46 @@ RLD /obj/item/construction/rcd/attack_self(mob/user) ..() - switch(mode) - if(1) - mode = 2 - to_chat(user, "You change RCD's mode to 'Airlock'.") - if(2) - mode = 3 - to_chat(user, "You change RCD's mode to 'Deconstruct'.") - if(3) - mode = 4 - to_chat(user, "You change RCD's mode to 'Grilles & Windows'.") - if(4) - mode = 1 - to_chat(user, "You change RCD's mode to 'Floor & Walls'.") + var/list/choices = list( + "Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"), + "Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"), + "Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"), + "Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor") + ) + if(mode == RCD_AIRLOCK) + choices += list( + "Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"), + "Change Airlock Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlocktype") + ) + else if(mode == RCD_WINDOWGRILLE) + choices += list( + "Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype") + ) + var/choice = show_radial_menu(user,src,choices, custom_check = CALLBACK(src,.proc/check_menu,user)) + if(!check_menu(user)) + return + switch(choice) + if("Floors & Walls") + mode = RCD_FLOORWALL + if("Airlock") + mode = RCD_AIRLOCK + if("Deconstruct") + mode = RCD_DECONSTRUCT + if("Grilles & Windows") + mode = RCD_WINDOWGRILLE + if("Change Access") + change_airlock_access(user) + return + if("Change Airlock Type") + change_airlock_setting(user) + return + if("Change Window Type") + toggle_window_type(user) + return + else + return + playsound(src, 'sound/effects/pop.ogg', 50, 0) + to_chat(user, "You change RCD's mode to '[choice]'.") /obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder)) diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index bc1b128c69..cea8165e02 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -14,13 +14,14 @@ w_class = WEIGHT_CLASS_NORMAL var/max_amount = 90 var/active = FALSE - actions_types = list(/datum/action/item_action/rcl) + actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui) var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white") var/current_color_index = 1 var/ghetto = FALSE lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' var/datum/component/mobhook + var/datum/radial_menu/persistent/wiring_gui_menu /obj/item/twohanded/rcl/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/cable_coil)) @@ -85,7 +86,8 @@ /obj/item/twohanded/rcl/Destroy() QDEL_NULL(loaded) last = null - setActive(FALSE, null) // setactive(FALSE) removes mobhook + QDEL_NULL(mobhook) + QDEL_NULL(wiring_gui_menu) return ..() /obj/item/twohanded/rcl/update_icon() @@ -115,20 +117,28 @@ if(loaded) QDEL_NULL(loaded) loaded = null + QDEL_NULL(wiring_gui_menu) unwield(user) - setActive(wielded, user) + active = wielded return TRUE return FALSE +/obj/item/twohanded/rcl/pickup(mob/user) + ..() + getMobhook(user) + + + /obj/item/twohanded/rcl/dropped(mob/wearer) ..() if(mobhook) - setActive(FALSE, mobhook.parent) + active = FALSE + QDEL_NULL(mobhook) last = null /obj/item/twohanded/rcl/attack_self(mob/user) ..() - setActive(wielded, user) + active = wielded if(!active) last = null else if(!last) @@ -137,17 +147,24 @@ last = C break -/obj/item/twohanded/rcl/proc/setActive(toggle, mob/user) - active = toggle - if (active && user) - if (mobhook && mobhook.parent != user) +obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook) + if(to_hook) + if(mobhook && mobhook.parent != to_hook) QDEL_NULL(mobhook) if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger))) + mobhook = to_hook.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger))) else QDEL_NULL(mobhook) /obj/item/twohanded/rcl/proc/trigger(mob/user) + if(active) + layCable(user) + if(wiring_gui_menu) //update the wire options as you move + wiringGuiUpdate(user) + + +//previous contents of trigger(), lays cable each time the player moves +/obj/item/twohanded/rcl/proc/layCable(mob/user) if(!isturf(user.loc)) return if(is_empty(user, 0)) @@ -156,7 +173,7 @@ if(prob(2) && ghetto) //Give ghetto RCLs a 2% chance to jam, requiring it to be reactviated manually. to_chat(user, "[src]'s wires jam!") - setActive(FALSE, user) + active = FALSE return else if(last) @@ -179,6 +196,91 @@ is_empty(user) //If we've run out, display message update_icon() +//searches the current tile for a stub cable of the same colour +/obj/item/twohanded/rcl/proc/findLinkingCable(mob/user) + var/turf/T + if(!isturf(user.loc)) + return + + T = get_turf(user) + if(T.intact || !T.can_have_cabling()) + return + + for(var/obj/structure/cable/C in T) + if(!C) + continue + if(C.cable_color != GLOB.cable_colors[colors[current_color_index]]) + continue + if(C.d1 == 0) + return C + break + return + + +/obj/item/twohanded/rcl/proc/wiringGuiGenerateChoices(mob/user) + var/fromdir = 0 + var/obj/structure/cable/linkingCable = findLinkingCable(user) + if(linkingCable) + fromdir = linkingCable.d2 + + var/list/wiredirs = list("1","5","4","6","2","10","8","9") + for(var/icondir in wiredirs) + var/dirnum = text2num(icondir) + var/cablesuffix = "[min(fromdir,dirnum)]-[max(fromdir,dirnum)]" + if(fromdir == dirnum) //cables can't loop back on themselves + cablesuffix = "invalid" + var/image/img = image(icon = 'icons/mob/radial.dmi', icon_state = "cable_[cablesuffix]") + img.color = GLOB.cable_colors[colors[current_color_index]] + wiredirs[icondir] = img + return wiredirs + +/obj/item/twohanded/rcl/proc/showWiringGui(mob/user) + var/list/choices = wiringGuiGenerateChoices(user) + + wiring_gui_menu = show_radial_menu_persistent(user, src , choices, select_proc = CALLBACK(src, .proc/wiringGuiReact, user), radius = 42) + +/obj/item/twohanded/rcl/proc/wiringGuiUpdate(mob/user) + if(!wiring_gui_menu) + return + + wiring_gui_menu.entry_animation = FALSE //stop the open anim from playing each time we update + var/list/choices = wiringGuiGenerateChoices(user) + + wiring_gui_menu.change_choices(choices,FALSE) + + +//Callback used to respond to interactions with the wiring menu +/obj/item/twohanded/rcl/proc/wiringGuiReact(mob/living/user,choice) + if(!choice) //close on a null choice (the center button) + QDEL_NULL(wiring_gui_menu) + return + + choice = text2num(choice) + + if(!isturf(user.loc)) + return + if(is_empty(user, 0)) + to_chat(user, "\The [src] is empty!") + return + + var/turf/T = get_turf(user) + if(T.intact || !T.can_have_cabling()) + return + + loaded.item_color = colors[current_color_index] + + var/obj/structure/cable/linkingCable = findLinkingCable(user) + if(linkingCable) + if(choice != linkingCable.d2) + loaded.cable_join(linkingCable, user, FALSE, choice) + last = null + else + last = loaded.place_turf(get_turf(src), user, choice) + + is_empty(user) //If we've run out, display message + + wiringGuiUpdate(user) + /obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff . = ..() @@ -192,12 +294,21 @@ update_icon() /obj/item/twohanded/rcl/ui_action_click(mob/user, action) - if(istype(action, /datum/action/item_action/rcl)) + if(istype(action, /datum/action/item_action/rcl_col)) current_color_index++; if (current_color_index > colors.len) current_color_index = 1 var/cwname = colors[current_color_index] to_chat(user, "Color changed to [cwname]!") + if(loaded) + loaded.item_color= colors[current_color_index] + if(wiring_gui_menu) + wiringGuiUpdate(user) + else if(istype(action, /datum/action/item_action/rcl_gui)) + if(wiring_gui_menu) //The menu is already open, close it + QDEL_NULL(wiring_gui_menu) + else //open the menu + showWiringGui(user) /obj/item/twohanded/rcl/ghetto actions_types = list() diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 41ddc22106..0549ebc474 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -331,7 +331,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( //make sure what we're clicking is valid for the current category var/static/list/make_pipe_whitelist if(!make_pipe_whitelist) - make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe)) + make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe, /obj/structure/window, /obj/structure/grille)) var/can_make_pipe = (isturf(A) || is_type_in_typecache(A, make_pipe_whitelist)) . = FALSE diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index ab877ff97a..699efaac2e 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -59,7 +59,7 @@ /obj/item/areaeditor/blueprints/attack_self(mob/user) . = ..() if(!legend) - var/area/A = get_area() + var/area/A = get_area(user) if(get_area_type() == AREA_STATION) . += "

According to \the [src], you are now in \"[html_encode(A.name)]\".

" . += "

Change area name

" @@ -140,12 +140,10 @@ legend = FALSE -/obj/item/areaeditor/proc/get_area() - var/turf/T = get_turf(usr) - var/area/A = T.loc - return A -/obj/item/areaeditor/proc/get_area_type(area/A = get_area()) +/obj/item/areaeditor/proc/get_area_type(area/A) + if(!A) + A = get_area(usr) if(A.outdoors) return AREA_SPACE var/list/SPECIALS = list( @@ -183,7 +181,7 @@ return "" /obj/item/areaeditor/proc/edit_area() - var/area/A = get_area() + var/area/A = get_area(usr) var/prevname = "[A.name]" var/str = stripped_input(usr,"New area name:", "Area Creation", "", MAX_NAME_LEN) if(!str || !length(str) || str==prevname) //cancel diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm index a8f5894b7c..80fc0f43fd 100644 --- a/code/game/objects/items/body_egg.dm +++ b/code/game/objects/items/body_egg.dm @@ -16,7 +16,7 @@ /obj/item/organ/body_egg/Insert(var/mob/living/carbon/M, special = 0) ..() - owner.add_trait(TRAIT_XENO_HOST, TRAIT_GENERIC) + ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC) START_PROCESSING(SSobj, src) owner.med_hud_set_status() INVOKE_ASYNC(src, .proc/AddInfectionImages, owner) @@ -24,7 +24,7 @@ /obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0) STOP_PROCESSING(SSobj, src) if(owner) - owner.remove_trait(TRAIT_XENO_HOST, TRAIT_GENERIC) + REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC) owner.med_hud_set_status() INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner) ..() diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index f7c37715aa..344e7c5472 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -248,9 +248,8 @@ /obj/effect/chrono_field/return_air() //we always have nominal air and temperature var/datum/gas_mixture/GM = new - GM.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - GM.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD - GM.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD + GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD + GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD GM.temperature = T20C return GM diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 1ad7974fc1..000c52ae43 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -102,7 +102,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_state = "cigoff" throw_speed = 0.5 item_state = "cigoff" - container_type = INJECTABLE w_class = WEIGHT_CLASS_TINY body_parts_covered = null grind_results = list() @@ -123,8 +122,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/Initialize() . = ..() - create_reagents(chem_volume) - reagents.set_reacting(FALSE) // so it doesn't react until you light it + create_reagents(chem_volume, INJECTABLE | NO_REACT) // so it doesn't react until you light it if(list_reagents) reagents.add_reagent_list(list_reagents) if(starts_lit) @@ -184,7 +182,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM qdel(src) return // allowing reagents to react after being lit - reagents.set_reacting(TRUE) + DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) reagents.handle_reactions() icon_state = icon_on item_state = icon_on @@ -325,7 +323,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM list_reagents = list("space_drugs" = 15, "lipolicide" = 35) /obj/item/clothing/mask/cigarette/rollie/mindbreaker - list_reagents = list("mindbreaker" = 35, "lipolicide" = 15) + list_reagents = list("mindbreaker" = 35, "lipolicide" = 15) /obj/item/cigbutt/roach name = "roach" @@ -709,9 +707,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = null w_class = WEIGHT_CLASS_TINY var/chem_volume = 100 - var/vapetime = 0 //this so it won't puff out clouds every tick - var/screw = 0 // kinky - var/super = 0 //for the fattest vapes dude. + var/vapetime = FALSE //this so it won't puff out clouds every tick + var/screw = FALSE // kinky + var/super = FALSE //for the fattest vapes dude. /obj/item/clothing/mask/vape/suicide_act(mob/user) user.visible_message("[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer @@ -720,8 +718,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/Initialize(mapload, param_color) . = ..() - create_reagents(chem_volume) - reagents.set_reacting(FALSE) // so it doesn't react until you light it + create_reagents(chem_volume, NO_REACT) // so it doesn't react until you light it reagents.add_reagent("nicotine", 50) if(!icon_state) if(!param_color) @@ -730,52 +727,48 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "[param_color]_vape" /obj/item/clothing/mask/vape/attackby(obj/item/O, mob/user, params) - if(O.is_drainable()) - if(reagents.total_volume < chem_volume) - if(O.reagents.total_volume > 0) - O.reagents.trans_to(src,25) - to_chat(user, "You add the contents of [O] to [src].") - else - to_chat(user, "[O] is empty!") - else - to_chat(user, "[src] can't hold anymore reagents!") - - if(istype(O, /obj/item/screwdriver)) + if(O.tool_behaviour == TOOL_SCREWDRIVER) if(!screw) - screw = 1 + screw = TRUE to_chat(user, "You open the cap on [src].") - if(super) + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) + if(obj_flags & EMAGGED) + add_overlay("vapeopen_high") + else if(super) add_overlay("vapeopen_med") else add_overlay("vapeopen_low") else - screw = 0 + screw = FALSE to_chat(user, "You close the cap on [src].") + DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) cut_overlays() - if(istype(O, /obj/item/multitool)) + if(O.tool_behaviour == TOOL_MULTITOOL) if(screw && !(obj_flags & EMAGGED))//also kinky if(!super) cut_overlays() - super = 1 + super = TRUE to_chat(user, "You increase the voltage of [src].") add_overlay("vapeopen_med") else cut_overlays() - super = 0 + super = FALSE to_chat(user, "You decrease the voltage of [src].") add_overlay("vapeopen_low") if(screw && (obj_flags & EMAGGED)) to_chat(user, "[src] can't be modified!") + else + ..() /obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. if(screw) if(!(obj_flags & EMAGGED)) cut_overlays() obj_flags |= EMAGGED - super = 0 + super = FALSE to_chat(user, "You maximize the voltage of [src].") add_overlay("vapeopen_high") var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect @@ -790,13 +783,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(reagents.total_volume > 0) to_chat(user, "You empty [src] of all reagents.") reagents.clear_reagents() - return /obj/item/clothing/mask/vape/equipped(mob/user, slot) if(slot == SLOT_WEAR_MASK) if(!screw) to_chat(user, "You start puffing on the vape.") - reagents.set_reacting(TRUE) + DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) START_PROCESSING(SSobj, src) else //it will not start if the vape is opened. to_chat(user, "You need to close the cap first!") @@ -804,7 +796,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/dropped(mob/user) var/mob/living/carbon/C = user if(C.get_item_by_slot(SLOT_WEAR_MASK) == src) - reagents.set_reacting(FALSE) + ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) STOP_PROCESSING(SSobj, src) /obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 26f00c730e..a1ee62e2eb 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -123,6 +123,14 @@ name = "Orion Trail (Computer Board)" build_path = /obj/machinery/computer/arcade/orion_trail +/obj/item/circuitboard/computer/arcade/minesweeper + name = "Minesweeper (Computer Board)" + build_path = /obj/machinery/computer/arcade/minesweeper + +/obj/item/circuitboard/computer/arcade/amputation + name = "Mediborg's Amputation Adventure (Computer Board)" + build_path = /obj/machinery/computer/arcade/amputation + /obj/item/circuitboard/computer/turbine_control name = "Turbine control (Computer Board)" build_path = /obj/machinery/computer/turbine_computer diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 30089f298f..99d6c874e8 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -254,7 +254,7 @@ cost = 0 if(ishuman(user)) var/mob/living/carbon/human/H = user - if (H.has_trait(TRAIT_TAGGER)) + if (HAS_TRAIT(H, TRAIT_TAGGER)) cost *= 0.5 var/charges_used = use_charges(user, cost) if(!charges_used) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index ba4a0ffae8..55e75b3992 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -444,7 +444,7 @@ /obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H) var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) - return (!H.suiciding && !(H.has_trait(TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) + return (!H.suiciding && !(HAS_TRAIT(H, TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) /obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H) if(req_defib) @@ -585,7 +585,7 @@ shock_touching(30, H) var/failed - if (H.suiciding || (H.has_trait(TRAIT_NOCLONE))) + if (H.suiciding || (HAS_TRAIT(H, TRAIT_NOCLONE))) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile." else if (H.hellbound) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile." diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 7d3d36c5b2..79c90b2a2f 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -10,6 +10,15 @@ GLOBAL_LIST_EMPTY(PDAs) #define PDA_SCANNER_HALOGEN 4 #define PDA_SCANNER_GAS 5 #define PDA_SPAM_DELAY 2 MINUTES +#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay") + +//pda icon overlays list defines +#define PDA_OVERLAY_ALERT 1 +#define PDA_OVERLAY_SCREEN 2 +#define PDA_OVERLAY_ID 3 +#define PDA_OVERLAY_ITEM 4 +#define PDA_OVERLAY_LIGHT 5 +#define PDA_OVERLAY_PAI 6 /obj/item/pda name = "\improper PDA" @@ -31,7 +40,8 @@ GLOBAL_LIST_EMPTY(PDAs) var/default_cartridge = 0 // Access level defined by cartridge var/obj/item/cartridge/cartridge = null //current cartridge var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge. - var/icon_alert = "pda-r" //Icon to be overlayed for message alerts. Taken from the pda icon file. + var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")) + var/current_overlays = PDA_STANDARD_OVERLAYS var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again. var/font_mode = "font-family:monospace;" //The currently selected font. var/background_color = "#808000" //The currently selected background color. @@ -78,7 +88,9 @@ GLOBAL_LIST_EMPTY(PDAs) var/list/contained_item = list(/obj/item/pen, /obj/item/toy/crayon, /obj/item/lipstick, /obj/item/flashlight/pen, /obj/item/clothing/mask/cigarette) var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above. - var/overlays_x_offset = 0 //x offset to use for certain overlays + var/list/overlays_offsets // offsets to use for certain overlays + var/overlays_x_offset = 0 + var/overlays_y_offset = 0 var/underline_flag = TRUE //flag for underline @@ -91,15 +103,13 @@ GLOBAL_LIST_EMPTY(PDAs) return BRUTELOSS /obj/item/pda/examine(mob/user) - ..() - if(!id && !inserted_item) - return - - if(id) - to_chat(user, "Alt-click to remove the id.") - + . = ..() + var/dat = id ? "Alt-click to remove the id." : "" if(inserted_item && (!isturf(loc))) - to_chat(user, "Ctrl-click to remove [inserted_item].") + dat += "\nCtrl-click to remove [inserted_item]." + if(LAZYLEN(GLOB.pda_reskins)) + dat += "\nCtrl-shift-click it to reskin it." + to_chat(user, dat) /obj/item/pda/Initialize() . = ..() @@ -115,28 +125,71 @@ GLOBAL_LIST_EMPTY(PDAs) inserted_item = new /obj/item/pen(src) update_icon() +/obj/item/pda/CtrlShiftClick(mob/living/user) + . = ..() + if(GLOB.pda_reskins && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) + reskin_obj(user) + +/obj/item/pda/reskin_obj(mob/M) + if(!LAZYLEN(GLOB.pda_reskins)) + return + var/dat = "Reskin options for [name]:" + for(var/V in GLOB.pda_reskins) + var/output = icon2html(GLOB.pda_reskins[V], M, icon_state) + dat += "\n[V]: [output]" + to_chat(M, dat) + + var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins + var/new_icon = GLOB.pda_reskins[choice] + if(QDELETED(src) || isnull(new_icon) || new_icon == icon || M.incapacitated() || !in_range(M,src)) + return + icon = new_icon + set_new_overlays() + update_icon() + to_chat(M, "[src] is now skinned as '[choice]'.") + +/obj/item/pda/proc/set_new_overlays() + if(!overlays_offsets || !(icon in overlays_offsets)) + overlays_x_offset = 0 + overlays_y_offset = 0 + else + var/list/new_offsets = overlays_offsets[icon] + if(new_offsets) + overlays_x_offset = new_offsets[1] + overlays_y_offset = new_offsets[2] + if(!(icon in overlays_icons)) + current_overlays = PDA_STANDARD_OVERLAYS + return + current_overlays = overlays_icons[icon] + /obj/item/pda/equipped(mob/user, slot) . = ..() - if(!equipped) - if(user.client) - background_color = user.client.prefs.pda_color - switch(user.client.prefs.pda_style) - if(MONO) - font_index = MODE_MONO - font_mode = FONT_MONO - if(SHARE) - font_index = MODE_SHARE - font_mode = FONT_SHARE - if(ORBITRON) - font_index = MODE_ORBITRON - font_mode = FONT_ORBITRON - if(VT) - font_index = MODE_VT - font_mode = FONT_VT - else - font_index = MODE_MONO - font_mode = FONT_MONO - equipped = TRUE + if(equipped) + return + if(user.client) + background_color = user.client.prefs.pda_color + switch(user.client.prefs.pda_style) + if(MONO) + font_index = MODE_MONO + font_mode = FONT_MONO + if(SHARE) + font_index = MODE_SHARE + font_mode = FONT_SHARE + if(ORBITRON) + font_index = MODE_ORBITRON + font_mode = FONT_ORBITRON + if(VT) + font_index = MODE_VT + font_mode = FONT_VT + else + font_index = MODE_MONO + font_mode = FONT_MONO + var/pref_skin = GLOB.pda_reskins[user.client.prefs.pda_skin] + if(icon != pref_skin) + icon = pref_skin + set_new_overlays() + update_icon() + equipped = TRUE /obj/item/pda/proc/update_label() name = "PDA-[owner] ([ownjob])" //Name generalisation @@ -150,33 +203,34 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/GetID() return id -/obj/item/pda/update_icon() +/obj/item/pda/update_icon(alert = FALSE) cut_overlays() + add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]) var/mutable_appearance/overlay = new() overlay.pixel_x = overlays_x_offset if(id) - overlay.icon_state = "id_overlay" + overlay.icon_state = current_overlays[PDA_OVERLAY_ID] add_overlay(new /mutable_appearance(overlay)) if(inserted_item) - overlay.icon_state = "insert_overlay" + overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM] add_overlay(new /mutable_appearance(overlay)) if(fon) - overlay.icon_state = "light_overlay" + overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT] add_overlay(new /mutable_appearance(overlay)) if(pai) - if(pai.pai) - overlay.icon_state = "pai_overlay" - add_overlay(new /mutable_appearance(overlay)) - else - overlay.icon_state = "pai_off_overlay" - add_overlay(new /mutable_appearance(overlay)) + overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]" + add_overlay(new /mutable_appearance(overlay)) -/obj/item/pda/MouseDrop(obj/over_object, src_location, over_location) +/obj/item/pda/MouseDrop(mob/over, src_location, over_location) var/mob/M = usr - if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src)) + if((M == over) && usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return attack_self(M) return ..() +/obj/item/pda/attack_self_tk(mob/user) + to_chat(user, "The PDA's capacitive touch screen doesn't seem to respond!") + return + /obj/item/pda/interact(mob/user) if(!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") @@ -358,9 +412,9 @@ GLOBAL_LIST_EMPTY(PDAs) if (total_moles) for(var/id in env_gases) - var/gas_level = env_gases[id][MOLES]/total_moles + var/gas_level = env_gases[id]/total_moles if(gas_level > 0) - dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100, 0.01)]%
" + dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%
" dat += "Temperature: [round(environment.temperature-T0C)]°C
" dat += "
" @@ -382,7 +436,7 @@ GLOBAL_LIST_EMPTY(PDAs) var/mob/living/U = usr //Looking for master was kind of pointless since PDAs don't appear to have one. - if(usr.canUseTopic(src) && !href_list["close"]) + if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !href_list["close"]) add_fingerprint(U) U.set_machine(src) @@ -636,7 +690,7 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/remove_id() - if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE)) + if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if (id) @@ -736,8 +790,7 @@ GLOBAL_LIST_EMPTY(PDAs) to_chat(L, "[icon2html(src)] Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], [signal.format_message()] (Reply)") - update_icon() - add_overlay(icon_alert) + update_icon(TRUE) /obj/item/pda/proc/send_to_all(mob/living/U) if (last_everyone && world.time < last_everyone + PDA_SPAM_DELAY) @@ -802,7 +855,7 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/remove_pen() - if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE)) + if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(inserted_item) @@ -1076,4 +1129,11 @@ GLOBAL_LIST_EMPTY(PDAs) #undef PDA_SCANNER_HALOGEN #undef PDA_SCANNER_GAS #undef PDA_SPAM_DELAY +#undef PDA_STANDARD_OVERLAYS +#undef PDA_OVERLAY_ALERT +#undef PDA_OVERLAY_SCREEN +#undef PDA_OVERLAY_ID +#undef PDA_OVERLAY_ITEM +#undef PDA_OVERLAY_LIGHT +#undef PDA_OVERLAY_PAI \ No newline at end of file diff --git a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm index 80d8cb5963..54b82d8e07 100644 --- a/code/game/objects/items/devices/PDA/PDA_types.dm +++ b/code/game/objects/items/devices/PDA/PDA_types.dm @@ -124,6 +124,16 @@ icon_state = "pda-captain" detonatable = FALSE +/obj/item/pda/lieutenant + name = "lieutenant PDA" + default_cartridge = /obj/item/cartridge/captain + inserted_item = /obj/item/pen/fountain/captain + icon_state = "pda-lieutenant" + ttone = "bwoink" + detonatable = FALSE + hidden = TRUE + note = "Congratulations, you have chosen the Thinktronic 5230-2 Personal Data Assistant Prestige Edition! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft." + /obj/item/pda/cargo name = "cargo technician PDA" default_cartridge = /obj/item/cartridge/quartermaster @@ -171,25 +181,29 @@ /obj/item/pda/curator name = "curator PDA" icon_state = "pda-library" - icon_alert = "pda-r-library" + overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"), + 'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay")) + current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay") default_cartridge = /obj/item/cartridge/curator inserted_item = /obj/item/pen/fountain desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader." - note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!" + note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft." silent = TRUE //Quiet in the library! + overlays_offsets = list('icons/obj/pda.dmi' = list(-3,0)) overlays_x_offset = -3 /obj/item/pda/clear name = "clear PDA" icon_state = "pda-clear" desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special edition with a transparent case." - note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!" + note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft." /obj/item/pda/neko name = "neko PDA" icon_state = "pda-neko" - desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special edition a feline fine case." - note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Mew Turbo Limited Edition NYA~!" + overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_neko", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")) + desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special feline edition." + note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Mew Turbo Limited Edition NYA~! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft." /obj/item/pda/cook name = "cook PDA" diff --git a/code/game/objects/items/devices/compressionkit.dm b/code/game/objects/items/devices/compressionkit.dm new file mode 100644 index 0000000000..5ac958328d --- /dev/null +++ b/code/game/objects/items/devices/compressionkit.dm @@ -0,0 +1,127 @@ +/obj/item/compressionkit + name = "bluespace compression kit" + desc = "An illegally modified BSRPED, capable of reducing the size of most items." + icon = 'icons/obj/tools.dmi' + icon_state = "compression_c" + item_state = "RPED" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + w_class = WEIGHT_CLASS_NORMAL + var/charges = 5 + // var/damage_multiplier = 0.2 Not in use yet. + var/mode = 0 + +/obj/item/compressionkit/examine(mob/user) + ..() + to_chat(user, "It has [charges] charges left. Recharge with bluespace crystals.") + to_chat(user, "Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).") + +/obj/item/compressionkit/attack_self(mob/user) + if(mode == 0) + mode = 1 + icon_state = "compression_e" + to_chat(user, "You switch the compressor to expand mode. This isn't implemented yet, so right now it wont do anything different!") + return + if(mode == 1) + mode = 0 + icon_state = "compression_c" + to_chat(user, "You switch the compressor to compress mode. Usage will now reduce the size of objects.") + return + else + mode = 0 + icon_state = "compression_c" + to_chat(user, "Some coder cocked up or an admin broke your compressor. It's been set back to compress mode..") + +/obj/item/compressionkit/proc/sparks() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, get_turf(src)) + s.start() + +/obj/item/compressionkit/suicide_act(mob/living/carbon/M) + M.visible_message("[M] is sticking their head in [src] and turning it on! [M.p_theyre(TRUE)] going to compress their own skull!") + var/obj/item/bodypart/head = M.get_bodypart("head") + if(!head) + return + var/turf/T = get_turf(M) + var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth") + for(var/internal_organ in organs) + var/obj/item/organ/I = internal_organ + I.Remove(M) + I.forceMove(T) + head.drop_limb() + qdel(head) + new M.gib_type(T,1,M.get_static_viruses()) + M.add_splatter_floor(T) + playsound(M, 'sound/weapons/flash.ogg', 50, 1) + playsound(M, 'sound/effects/splat.ogg', 50, 1) + + return OXYLOSS + +/obj/item/compressionkit/afterattack(atom/target, mob/user, proximity) + . = ..() + if(!proximity || !target) + return + else + if(charges == 0) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) + to_chat(user, "The bluespace compression kit is out of charges! Recharge it with bluespace crystals.") + return + if(istype(target, /obj/item)) + var/obj/item/O = target + if(O.w_class == 1) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) + to_chat(user, "[target] cannot be compressed smaller!.") + return + if(O.GetComponent(/datum/component/storage)) + to_chat(user, "You feel like compressing an item that stores other items would be counterproductive.") + return + if(O.w_class > 1) + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) + user.visible_message("[user] is compressing [O] with their bluespace compression kit!") + if(do_mob(user, O, 40) && charges > 0 && O.w_class > 1) + playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) + sparks() + flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) + O.w_class -= 1 + // O.force_mult -= damage_multiplier + charges -= 1 + to_chat(user, "You successfully compress [target]! The compressor now has [charges] charges.") + else + to_chat(user, "Anomalous error. Summon a coder.") + + if(istype(target, /mob/living)) + var/mob/living/victim = target + if(istype(victim, /mob/living/carbon/human)) + if(user.zone_selected == "groin") // pp smol. There's probably a smarter way to do this but im retarded. If you have a simpler method let me know. + var/list/organs = victim.getorganszone("groin") + for(var/internal_organ in organs) + if(istype(internal_organ, /obj/item/organ/genital/penis)) + var/obj/item/organ/genital/penis/O = internal_organ + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) + victim.visible_message("[user] is preparing to shrink [victim]\'s [O.name] with their bluespace compression kit!") + if(do_mob(user, victim, 40) && charges > 0 && O.length > 0) + victim.visible_message("[user] has shrunk [victim]\'s [O.name]!") + playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) + sparks() + flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) + charges -= 1 + O.length -= 5 + if(O.length < 1) + victim.visible_message("[user]\'s [O.name] vanishes!") + qdel(O) // no pp for you + else + O.update_size() + O.update_appearance() + + + +/obj/item/compressionkit/attackby(obj/item/I, mob/user, params) + ..() + if(istype(I, /obj/item/stack/ore/bluespace_crystal)) + var/obj/item/stack/ore/bluespace_crystal/B = I + charges += 2 + to_chat(user, "You insert [I] into [src]. It now has [charges] charges.") + if(B.amount > 1) + B.amount -= 1 + else + qdel(I) \ No newline at end of file diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index cbbd7a387a..d8b539ac27 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -13,7 +13,8 @@ actions_types = list(/datum/action/item_action/toggle_light) var/on = FALSE var/brightness_on = 4 //range of light when on - var/flashlight_power = 1 //strength of the light when on + var/flashlight_power = 0.8 //strength of the light when on + light_color = "#FFCC66" /obj/item/flashlight/Initialize() . = ..() @@ -52,7 +53,7 @@ add_fingerprint(user) if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) - if((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly + if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head if(!user.IsAdvancedToolUser()) @@ -63,7 +64,7 @@ to_chat(user, "[M] doesn't have a head!") return - if(flashlight_power < 1) + if(flashlight_power < 0.3) to_chat(user, "\The [src] isn't bright enough to see anything! ") return @@ -86,7 +87,7 @@ else user.visible_message("[user] directs [src] to [M]'s eyes.", \ "You direct [src] to [M]'s eyes.") - if(M.stat == DEAD || (M.has_trait(TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind + if(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind to_chat(user, "[M]'s pupils don't react to the light!") else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-ray vision to_chat(user, "[M]'s pupils give an eerie glow!") @@ -168,6 +169,8 @@ item_state = "" flags_1 = CONDUCT_1 brightness_on = 2 + light_color = "#FFDDCC" + flashlight_power = 0.3 var/holo_cooldown = 0 /obj/item/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag) @@ -204,6 +207,8 @@ righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' force = 9 // Not as good as a stun baton. brightness_on = 5 // A little better than the standard flashlight. + light_color = "#CDDDFF" + flashlight_power = 0.9 hitsound = 'sound/weapons/genhit1.ogg' // the desk lamps are a bit special @@ -216,6 +221,7 @@ righthand_file = 'icons/mob/inhands/items_righthand.dmi' force = 10 brightness_on = 5 + light_color = "#FFDDBB" w_class = WEIGHT_CLASS_BULKY flags_1 = CONDUCT_1 materials = list() @@ -252,6 +258,7 @@ desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'." w_class = WEIGHT_CLASS_SMALL brightness_on = 7 // Pretty bright. + light_color = "#FA421A" icon_state = "flare" item_state = "flare" actions_types = list() @@ -325,6 +332,7 @@ desc = "A torch fashioned from some leaves and a log." w_class = WEIGHT_CLASS_BULKY brightness_on = 4 + light_color = "#FAA44B" icon_state = "torch" item_state = "torch" lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' @@ -341,6 +349,8 @@ righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi' desc = "A mining lantern." brightness_on = 6 // luminosity when on + light_color = "#FFAA44" + flashlight_power = 0.75 /obj/item/flashlight/slime @@ -354,6 +364,8 @@ slot_flags = ITEM_SLOT_BELT materials = list() brightness_on = 6 //luminosity when on + light_color = "#FFEEAA" + flashlight_power = 0.6 /obj/item/flashlight/emp var/emp_max_charges = 4 @@ -517,6 +529,7 @@ icon_state = null light_color = null brightness_on = 0 + flashlight_power = 1 light_range = 0 light_power = 10 alpha = 0 @@ -538,7 +551,6 @@ name = "eyelight" desc = "This shouldn't exist outside of someone's head, how are you seeing this?" brightness_on = 15 - flashlight_power = 1 flags_1 = CONDUCT_1 item_flags = DROPDEL actions_types = list() diff --git a/code/game/objects/items/devices/glue.dm b/code/game/objects/items/devices/glue.dm new file mode 100644 index 0000000000..fed582d951 --- /dev/null +++ b/code/game/objects/items/devices/glue.dm @@ -0,0 +1,32 @@ +/obj/item/syndie_glue + name = "bottle of super glue" + desc = "A black market brand of high strength adhesive, rarely sold to the public. Do not ingest." + icon = 'icons/obj/tools.dmi' + icon_state = "glue" + w_class = WEIGHT_CLASS_SMALL + var/uses = 1 + +/obj/item/syndie_glue/suicide_act(mob/living/carbon/M) + return //todo + +/obj/item/syndie_glue/afterattack(atom/target, mob/user, proximity) + . = ..() + if(!proximity || !target) + return + else + if(uses == 0) + to_chat(user, "The bottle of glue is empty!") + return + if(istype(target, /obj/item)) + var/obj/item/I = target + if(I.item_flags & NODROP) + to_chat(user, "[I] is already sticky!") + return + uses -= 1 + I.item_flags |= NODROP + I.desc += " It looks sticky." + to_chat(user, "You smear the [I] with glue, making it incredibly sticky!") + if(uses == 0) + icon_state = "glue_used" + name = "empty bottle of super glue" + return \ No newline at end of file diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index c5ed5fb601..661d38ce6b 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -54,7 +54,7 @@ /obj/item/instrument/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/musicaltuner)) var/mob/living/carbon/human/H = user - if (H.has_trait(TRAIT_MUSICIAN)) + if (HAS_TRAIT(H, TRAIT_MUSICIAN)) if (!tune_time) H.visible_message("[H] tunes the [src] to perfection!", "You tune the [src] to perfection!") tune_time = 300 diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 632c2c4221..7baea7f488 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -69,7 +69,7 @@ if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return - if(user.has_trait(TRAIT_NOGUNS)) + if(HAS_TRAIT(user, TRAIT_NOGUNS)) to_chat(user, "Your fingers can't press the button!") return if(ishuman(user)) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 79b04c771b..9f52b4c1ac 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -95,7 +95,7 @@ SLIME SCANNER /obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user) // Clumsiness/brain damage check - if ((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50)) + if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) to_chat(user, "You stupidly try to analyze the floor's vitals!") user.visible_message("[user] has analyzed the floor's vitals!") var/msg = "*---------*\nAnalyzing results for The floor:\n\tOverall status: Healthy\n" @@ -127,7 +127,7 @@ SLIME SCANNER var/brute_loss = M.getBruteLoss() var/mob_status = (M.stat == DEAD ? "Deceased" : "[round(M.health/M.maxHealth,0.01)*100] % healthy") - if(M.has_trait(TRAIT_FAKEDEATH) && !advanced) + if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced) mob_status = "Deceased" oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss @@ -199,10 +199,10 @@ SLIME SCANNER msg += "\t==EAR STATUS==\n" if(istype(ears)) var/healthy = TRUE - if(C.has_trait(TRAIT_DEAF, GENETIC_MUTATION)) + if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION)) healthy = FALSE msg += "\tSubject is genetically deaf.\n" - else if(C.has_trait(TRAIT_DEAF)) + else if(HAS_TRAIT(C, TRAIT_DEAF)) healthy = FALSE msg += "\tSubject is deaf.\n" else @@ -220,10 +220,10 @@ SLIME SCANNER msg += "\t==EYE STATUS==\n" if(istype(eyes)) var/healthy = TRUE - if(C.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(C, TRAIT_BLIND)) msg += "\tSubject is blind.\n" healthy = FALSE - if(C.has_trait(TRAIT_NEARSIGHT)) + if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) msg += "\tSubject is nearsighted.\n" healthy = FALSE if(eyes.eye_damage > 30) @@ -290,7 +290,7 @@ SLIME SCANNER msg += "Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)\n" // Time of death - if(M.tod && (M.stat == DEAD || ((M.has_trait(TRAIT_FAKEDEATH)) && !advanced))) + if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced))) msg += "Time of Death: [M.tod]\n" var/tdelta = round(world.time - M.timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) @@ -428,39 +428,38 @@ SLIME SCANNER if(total_moles) var/list/env_gases = environment.gases - environment.assert_gases(arglist(GLOB.hardcoded_gases)) - var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles - var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles - var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles - var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles + var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles + var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles + var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles + var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles if(abs(n2_concentration - N2STANDARD) < 20) - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)") + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") else - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)") + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)") if(abs(o2_concentration - O2STANDARD) < 2) - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)") + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") else - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)") + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)") if(co2_concentration > 0.01) - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)") + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") else - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)") + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)") if(plasma_concentration > 0.005) - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)") + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") else - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)") + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)") - environment.garbage_collect() + GAS_GARBAGE_COLLECT(environment.gases) for(var/id in env_gases) if(id in GLOB.hardcoded_gases) continue - var/gas_concentration = env_gases[id][MOLES]/total_moles - to_chat(user, "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id][MOLES], 0.01)] mol)") + var/gas_concentration = env_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)") to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)") /obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens @@ -550,8 +549,8 @@ SLIME SCANNER var/list/cached_gases = air_contents.gases for(var/id in cached_gases) - var/gas_concentration = cached_gases[id][MOLES]/total_moles - to_chat(user, "[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id][MOLES], 0.01)] mol)") + var/gas_concentration = cached_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)") to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)") else diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index d5ac5d9c52..10c81e9dbb 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -31,7 +31,7 @@ /obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user) prepare() - if(M.has_dna() && !M.has_trait(TRAIT_RADIMMUNE) && !M.has_trait(TRAIT_NOCLONE)) + if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_NOCLONE)) M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" for(var/datum/mutation/human/HM in remove_mutations) @@ -313,7 +313,7 @@ to_chat(user, "You can't modify [M]'s DNA while [M.p_theyre()] dead.") return FALSE - if(M.has_dna() && !(M.has_trait(TRAIT_NOCLONE))) + if(M.has_dna() && !(HAS_TRAIT(M, TRAIT_NOCLONE))) M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" var/endtime = world.time+duration diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm index ddbc668c05..9fb4206845 100644 --- a/code/game/objects/items/extinguisher.dm +++ b/code/game/objects/items/extinguisher.dm @@ -15,7 +15,6 @@ attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") dog_fashion = /datum/dog_fashion/back resistance_flags = FIRE_PROOF - container_type = AMOUNT_VISIBLE var/max_water = 50 var/last_use = 1 var/chem = "water" @@ -56,7 +55,7 @@ /obj/item/extinguisher/Initialize() . = ..() - create_reagents(max_water) + create_reagents(max_water, AMOUNT_VISIBLE) reagents.add_reagent(chem, max_water) @@ -111,7 +110,7 @@ to_chat(user, "The safety is [safety ? "on" : "off"].") if(reagents.total_volume) - to_chat(user, "Alt-click to empty it.") + to_chat(user, "You can loose its screws to empty it.") /obj/item/extinguisher/proc/AttemptRefill(atom/target, mob/user) if(istype(target, tanktype) && target.Adjacent(user)) @@ -245,7 +244,7 @@ var/turf/open/theturf = T theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS) - user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "You quietly empty out \the [src] using its release valve.") + user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "You quietly empty out \the [src] by loosing the release valve's screws.") //firebot assembly /obj/item/extinguisher/attackby(obj/O, mob/user, params) diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 2635955a15..fd51ecf26b 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -205,7 +205,7 @@ //Transfer 5% of current tank air contents to turf var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount) if(air_transfer.gases[/datum/gas/plasma]) - air_transfer.gases[/datum/gas/plasma][MOLES] *= 5 + air_transfer.gases[/datum/gas/plasma] *= 5 target.assume_air(air_transfer) //Burn it based on transfered gas target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm index 8d0d8d020e..34ce6bc521 100644 --- a/code/game/objects/items/granters.dm +++ b/code/game/objects/items/granters.dm @@ -87,6 +87,33 @@ active = FALSE UpdateButtonIcon() +/obj/item/book/granter/action/origami + granted_action = /datum/action/innate/origami + name = "The Art of Origami" + desc = "A meticulously in-depth manual explaining the art of paper folding." + icon_state = "origamibook" + actionname = "origami" + oneuse = TRUE + remarks = list("Dead-stick stability...", "Symmetry seems to play a rather large factor...", "Accounting for crosswinds... really?", "Drag coefficients of various paper types...", "Thrust to weight ratios?", "Positive dihedral angle?", "Center of gravity forward of the center of lift...") + +/datum/action/innate/origami + name = "Origami Folding" + desc = "Toggles your ability to fold and catch robust paper airplanes." + button_icon_state = "origami_off" + check_flags = NONE + +/datum/action/innate/origami/Activate() + to_chat(owner, "You will now fold origami planes.") + button_icon_state = "origami_on" + active = TRUE + UpdateButtonIcon() + +/datum/action/innate/origami/Deactivate() + to_chat(owner, "You will no longer fold origami planes.") + button_icon_state = "origami_off" + active = FALSE + UpdateButtonIcon() + ///SPELLS/// /obj/item/book/granter/spell diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm index 32e06eb9b4..28d8739369 100644 --- a/code/game/objects/items/grenades/grenade.dm +++ b/code/game/objects/items/grenades/grenade.dm @@ -33,7 +33,7 @@ qdel(src) /obj/item/grenade/proc/clown_check(mob/living/carbon/human/user) - var/clumsy = user.has_trait(TRAIT_CLUMSY) + var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY) if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE)) if(prob(50)) to_chat(user, "Huh? How does this thing work?") diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 1f3019fe65..5e19577b46 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -44,7 +44,7 @@ if(!istype(C)) return - if(iscarbon(user) && (user.has_trait(TRAIT_CLUMSY) && prob(50))) + if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))) to_chat(user, "Uh... how do those things work?!") apply_cuffs(user,user) return diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 3fda98e074..06aef0a22b 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -58,7 +58,7 @@ item_state = "radio" /obj/item/holybeacon/attack_self(mob/user) - if(user.mind && (user.mind.isholy) && !SSreligion.holy_armor_type) + if(user.mind && (user.mind.isholy) && !GLOB.holy_armor_type) beacon_armor(user) else playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) @@ -71,13 +71,13 @@ display_names += list(initial(A.name) = A) var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names - if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || SSreligion.holy_armor_type) + if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type) return var/index = display_names.Find(choice) var/A = holy_armor_list[index] - SSreligion.holy_armor_type = A + GLOB.holy_armor_type = A var/holy_armor_box = new A SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]") @@ -245,7 +245,7 @@ reskin_holy_weapon(user) /obj/item/nullrod/proc/reskin_holy_weapon(mob/M) - if(SSreligion.holy_weapon_type) + if(GLOB.holy_weapon_type) return var/obj/item/nullrod/holy_weapon var/list/holy_weapons_list = typesof(/obj/item/nullrod) + list( @@ -264,7 +264,7 @@ var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new holy_weapon = new A - SSreligion.holy_weapon_type = holy_weapon.type + GLOB.holy_weapon_type = holy_weapon.type SSblackbox.record_feedback("tally", "chaplain_weapon", 1, "[choice]") @@ -546,6 +546,9 @@ /obj/item/nullrod/pride_hammer icon_state = "pride" + item_state = "pride" + lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' name = "Pride-struck Hammer" desc = "It resonates an aura of Pride." force = 16 @@ -553,7 +556,7 @@ w_class = 4 slot_flags = ITEM_SLOT_BACK attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked") - hitsound = 'sound/weapons/blade1.ogg' + hitsound = 'sound/weapons/resonator_blast.ogg' /obj/item/nullrod/pride_hammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity) . = ..() @@ -573,6 +576,7 @@ lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' slot_flags = ITEM_SLOT_BELT + reach = 2 attack_verb = list("whipped", "lashed") hitsound = 'sound/weapons/chainhit.ogg' diff --git a/code/game/objects/items/implants/implant_chem.dm b/code/game/objects/items/implants/implant_chem.dm index b9c85c0728..c6c8be1a83 100644 --- a/code/game/objects/items/implants/implant_chem.dm +++ b/code/game/objects/items/implants/implant_chem.dm @@ -2,7 +2,6 @@ name = "chem implant" desc = "Injects things." icon_state = "reagents" - container_type = OPENCONTAINER activated = FALSE /obj/item/implant/chem/get_data() @@ -23,7 +22,7 @@ /obj/item/implant/chem/Initialize() . = ..() - create_reagents(50) + create_reagents(50, OPENCONTAINER) GLOB.tracked_chem_implants += src /obj/item/implant/chem/Destroy() diff --git a/code/game/objects/items/implants/implant_mindshield.dm b/code/game/objects/items/implants/implant_mindshield.dm index 1982740cc9..b9907cbfca 100644 --- a/code/game/objects/items/implants/implant_mindshield.dm +++ b/code/game/objects/items/implants/implant_mindshield.dm @@ -20,7 +20,7 @@ /obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE) if(..()) if(!target.mind) - target.add_trait(TRAIT_MINDSHIELD, "implant") + ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant") target.sec_hud_set_implants() return TRUE @@ -49,7 +49,7 @@ to_chat(target, "You feel something interfering with your mental conditioning, but you resist it!") else to_chat(target, "You feel a sense of peace and security. You are now protected from brainwashing.") - target.add_trait(TRAIT_MINDSHIELD, "implant") + ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant") target.sec_hud_set_implants() return TRUE return FALSE @@ -58,7 +58,7 @@ if(..()) if(isliving(target)) var/mob/living/L = target - L.remove_trait(TRAIT_MINDSHIELD, "implant") + REMOVE_TRAIT(L, TRAIT_MINDSHIELD, "implant") L.sec_hud_set_implants() if(target.stat != DEAD && !silent) to_chat(target, "Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.") diff --git a/code/game/objects/items/implants/implant_misc.dm b/code/game/objects/items/implants/implant_misc.dm index 6db3699beb..3a4295c61e 100644 --- a/code/game/objects/items/implants/implant_misc.dm +++ b/code/game/objects/items/implants/implant_misc.dm @@ -33,24 +33,8 @@ /obj/item/implant/adrenalin/activate() . = ..() uses-- + imp_in.do_adrenaline(150, TRUE, 0, 0, TRUE, list("inaprovaline" = 3, "synaptizine" = 10, "regen_jelly" = 10, "stimulants" = 10), "You feel a sudden surge of energy!") to_chat(imp_in, "You feel a sudden surge of energy!") - imp_in.SetSleeping(0) - imp_in.SetStun(0) - imp_in.SetKnockdown(0) - imp_in.SetUnconscious(0) - imp_in.adjustStaminaLoss(-150) - imp_in.stuttering = 0 - imp_in.updatehealth() - imp_in.update_stamina() - imp_in.resting = 0 - imp_in.lying = 0 - imp_in.update_canmove() - - imp_in.reagents.add_reagent("inaprovaline", 3) //let's give another chance to dumb fucks who forget to breathe - imp_in.reagents.add_reagent("synaptizine", 10) - imp_in.reagents.add_reagent("omnizine", 10) - imp_in.reagents.add_reagent("stimulants", 10) - if(!uses) qdel(src) diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 36c79bd454..781e1fa562 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -185,7 +185,7 @@ objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120) message_admins("[ADMIN_LOOKUPFLW(user)] set brainwash machine objective to '[objective]'.") log_game("[key_name(user)] set brainwash machine objective to '[objective]'.") - if(C.has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(C, TRAIT_MINDSHIELD)) return FALSE brainwash(C, objective) message_admins("[ADMIN_LOOKUPFLW(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.") diff --git a/code/game/objects/items/manuals.dm b/code/game/objects/items/manuals.dm index 6194c4d9ca..02d0a1c36a 100644 --- a/code/game/objects/items/manuals.dm +++ b/code/game/objects/items/manuals.dm @@ -37,7 +37,7 @@

It really is that easy! Good luck! - + "} @@ -344,14 +344,14 @@ author = "Sir John Rose" title = "Barman Recipes: Mixing Drinks and Changing Lives" page_link = "Guide_to_food_and_drinks" - + /obj/item/book/manual/wiki/robotics_cyborgs name = "Robotics for Dummies" icon_state = "borgbook" author = "XISC" title = "Robotics for Dummies" page_link = "Guide_to_robotics" - + /obj/item/book/manual/wiki/research_and_development name = "Research and Development 101" icon_state = "rdbook" @@ -401,7 +401,7 @@ author = "the City-state of Atmosia" title = "Lexica Atmosia" page_link = "Guide_to_Atmospherics" - + /obj/item/book/manual/wiki/medicine name = "Medical Space Compendium, Volume 638" icon_state = "book8" @@ -441,7 +441,7 @@ H.dropItemToGround(W) if(prob(50)) step(W, pick(GLOB.alldirs)) - H.add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC) H.bleed_rate = 5 H.gib_animation() sleep(3) diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 8ed0f273e6..33a48c17bb 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -20,6 +20,7 @@ slot_flags = ITEM_SLOT_BELT force = 14 throwforce = 10 + reach = 2 w_class = WEIGHT_CLASS_NORMAL attack_verb = list("flogged", "whipped", "lashed", "disciplined") hitsound = 'sound/weapons/chainhit.ogg' @@ -156,7 +157,7 @@ return //CIT CHANGE - ditto add_fingerprint(user) - if((user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) to_chat(user, "You club yourself over the head.") user.Knockdown(60 * force) if(ishuman(user)) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index 74eb048d8a..0d39e6c847 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -82,6 +82,6 @@ to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") /obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user) - if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(5,5) diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 28a744fbb1..12de29c76e 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -591,16 +591,42 @@ desc = "An adorable stuffed toy that resembles a slime. It is practically just a hacky sack." icon_state = "plushie_slime" item_state = "plushie_slime" - attack_verb = list("blorbled", "slimed", "absorbed") + attack_verb = list("blorbled", "slimed", "absorbed", "glomped") squeak_override = list('sound/effects/blobattack.ogg' = 1) gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy +/obj/item/toy/plush/slimeplushie/annie + desc = "An adorable stuffed toy that resembles a slimey crewmember." + icon_state = "annie" + item_state = "annie" + +/obj/item/toy/plush/slimeplushie/paxton + desc = "An adorable stuffed toy that resembles a slimey crewmember." + icon_state = "paxton" + item_state = "paxton" + attack_verb = list("CQC'd", "jabroni'd", "powergamed", "robusted", "cakehatted") + gender = MALE + /obj/item/toy/plush/awakenedplushie name = "awakened plushie" desc = "An ancient plushie that has grown enlightened to the true nature of reality." icon_state = "plushie_awake" item_state = "plushie_awake" +/obj/item/toy/plush/awakenedplushie/ComponentInitialize() + . = ..() + AddComponent(/datum/component/edit_complainer) + + +/obj/item/toy/plush/beeplushie + name = "bee plushie" + desc = "A cute toy that resembles an even cuter bee." + icon_state = "plushie_h" + item_state = "plushie_h" + attack_verb = list("stung") + gender = FEMALE + squeak_override = list('modular_citadel/sound/voice/scream_moth.ogg' = 1) + /obj/item/toy/plush/mothplushie name = "insect plushie" desc = "An adorable stuffed toy that resembles some kind of insect" @@ -741,6 +767,10 @@ icon_state = "pavel" item_state = "pavel" +/obj/item/toy/plush/mammal/mason + icon_state = "mason" + item_state = "mason" + /obj/item/toy/plush/mammal/oten icon_state = "oten" item_state = "oten" @@ -749,6 +779,10 @@ icon_state = "ray" item_state = "ray" +/obj/item/toy/plush/mammal/redtail + icon_state = "redtail" + item_state = "redtail" + /obj/item/toy/plush/mammal/dawud icon_state = "dawud" item_state = "dawud" @@ -840,6 +874,13 @@ icon_state = "flynn" item_state = "flynn" +/obj/item/toy/plush/mammal/dog/fritz + icon_state = "fritz" + item_state = "fritz" + attack_verb = list("barked", "boofed", "shotgun'd") + obj_flags = UNIQUE_RENAME + unique_reskin = list("Goodboye" = "fritz", "Badboye" = "fritz_bad") + /obj/item/toy/plush/catgirl name = "feline plushie" desc = "An adorable stuffed toy that resembles a feline." @@ -877,7 +918,3 @@ item_state = "fermis" attack_verb = list("cuddled", "petpatted", "wigglepurred") squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1) - -/obj/item/toy/plush/awakenedplushie/ComponentInitialize() - . = ..() - AddComponent(/datum/component/edit_complainer) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index d37ec0376a..bd301c36f7 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -150,7 +150,7 @@ if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting)) to_chat(user, "\The [src] lets out a weak hiss and doesn't react!") return - if(user.has_trait(TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user)) var/mob/living/carbon/C = user C.visible_message("[C] loses [C.p_their()] grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") C.dropItemToGround(src, TRUE) diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index a80aa1be60..8582725cda 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -187,7 +187,7 @@ inspiration_available = FALSE /obj/item/banner/command/check_inspiration(mob/living/carbon/human/H) - return H.has_trait(TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies. + return HAS_TRAIT(H, TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies. /datum/crafting_recipe/command_banner name = "Command Banner" diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 30c7115346..a9f0e038df 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -20,7 +20,6 @@ attack_verb = list("shoved", "bashed") var/cooldown = 0 //shield bash cooldown. based on world.time - /obj/item/shield/riot/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/melee/baton)) if(cooldown < world.time - 25) @@ -91,7 +90,7 @@ return (active) /obj/item/shield/energy/attack_self(mob/living/carbon/human/user) - if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You beat yourself in the head with [src].") user.take_bodypart_damage(5) active = !active @@ -166,3 +165,14 @@ block_chance = 25 force = 5 throwforce = 7 + +/obj/item/shield/riot/tower + name = "tower shield" + desc = "A massive shield that can block a lot of attacks, can take a lot of abuse before braking." + armor = list("melee" = 95, "bullet" = 95, "laser" = 75, "energy" = 60, "bomb" = 90, "bio" = 90, "rad" = 0, "fire" = 90, "acid" = 10) //Armor for the item, dosnt transfer to user + item_state = "metal" + block_chance = 75 //1/4 shots will hit* + force = 10 + slowdown = 2 + throwforce = 15 //Massive pice of metal + w_class = WEIGHT_CLASS_HUGE diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index d3a3ecd5ef..cf967e25ba 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -281,12 +281,12 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( var/hit_hand = ((user.active_hand_index % 2 == 0) ? "r_" : "l_") + "arm" if(ishuman(user)) var/mob/living/carbon/human/H = user - if(!H.gloves && !H.has_trait(TRAIT_PIERCEIMMUNE)) // golems, etc + if(!H.gloves && !HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) // golems, etc to_chat(H, "[src] cuts into your hand!") H.apply_damage(force*0.5, BRUTE, hit_hand) else if(ismonkey(user)) var/mob/living/carbon/monkey/M = user - if(!M.has_trait(TRAIT_PIERCEIMMUNE)) + if(!HAS_TRAIT(M, TRAIT_PIERCEIMMUNE)) to_chat(M, "[src] cuts into your hand!") M.apply_damage(force*0.5, BRUTE, hit_hand) @@ -312,7 +312,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( /obj/item/shard/Crossed(mob/living/L) if(istype(L) && has_gravity(loc)) - if(L.has_trait(TRAIT_LIGHT_STEP)) + if(HAS_TRAIT(L, TRAIT_LIGHT_STEP)) playsound(loc, 'sound/effects/glass_step.ogg', 30, 1) else playsound(loc, 'sound/effects/glass_step.ogg', 50, 1) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index a8c44656ca..b17bc87ffd 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -282,9 +282,14 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ */ GLOBAL_LIST_INIT(cardboard_recipes, list ( \ new/datum/stack_recipe("box", /obj/item/storage/box), \ + new/datum/stack_recipe("sec box", /obj/item/storage/box/seclooking), \ new/datum/stack_recipe("light tubes", /obj/item/storage/box/lights/tubes), \ new/datum/stack_recipe("light bulbs", /obj/item/storage/box/lights/bulbs), \ new/datum/stack_recipe("mouse traps", /obj/item/storage/box/mousetraps), \ + new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ + new/datum/stack_recipe("power cell", /obj/item/storage/box/cells), \ + new/datum/stack_recipe("02", /obj/item/storage/box/otwo), \ + null, \ new/datum/stack_recipe("lethal ammo box", /obj/item/storage/box/lethalshot), \ new/datum/stack_recipe("rubber shot ammo box", /obj/item/storage/box/rubbershot), \ new/datum/stack_recipe("bean bag ammo box", /obj/item/storage/box/beanbag), \ @@ -292,13 +297,23 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \ new/datum/stack_recipe("stun slug ammo box", /obj/item/storage/box/stunslug), \ new/datum/stack_recipe("tech shell ammo box", /obj/item/storage/box/techsslug), \ new/datum/stack_recipe("incendiary ammo box", /obj/item/storage/box/fireshot), \ + new/datum/stack_recipe("firing pins", /obj/item/storage/box/firingpins), \ + new/datum/stack_recipe("loose ammo", /obj/item/storage/box/ammoshells), \ + null, \ new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ - new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ new/datum/stack_recipe("folder", /obj/item/folder), \ new/datum/stack_recipe("large box", /obj/structure/closet/cardboard, 4), \ new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5), \ -)) + null, \ + new/datum/stack_recipe("colored brown", /obj/item/storage/box/brown), \ + new/datum/stack_recipe("colored green", /obj/item/storage/box/green), \ + new/datum/stack_recipe("colored red", /obj/item/storage/box/blue), \ + new/datum/stack_recipe("colored blue", /obj/item/storage/box/red), \ + new/datum/stack_recipe("colored yellow", /obj/item/storage/box/yellow), \ + new/datum/stack_recipe("colored pink", /obj/item/storage/box/pink), \ + new/datum/stack_recipe("colored purple", /obj/item/storage/box/purple), \ + )) /obj/item/stack/sheet/cardboard //BubbleWrap //it's cardboard you fuck name = "cardboard" @@ -394,8 +409,10 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \ new/datum/stack_recipe("brass pinion airlock - windowed", /obj/machinery/door/airlock/clockwork/brass, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, on_floor = TRUE, window_checks = TRUE), \ null, - new/datum/stack_recipe("directional brass window", /obj/structure/window/reinforced/clockwork/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \ - new/datum/stack_recipe("fulltile brass window", /obj/structure/window/reinforced/clockwork/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe("brass reflector", /obj/structure/destructible/clockwork/reflector, 10, time = 100, one_per_turf = TRUE, on_floor = TRUE, window_checks = TRUE), \ + null, + new/datum/stack_recipe("brass window - directional", /obj/structure/window/reinforced/clockwork/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe("brass window - fulltile", /obj/structure/window/reinforced/clockwork/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \ new/datum/stack_recipe("brass chair", /obj/structure/chair/brass, 1, time = 0, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \ null, diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 34ae4cb5ef..4217a58f81 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -396,7 +396,7 @@ //TODO bloody overlay /obj/item/stack/microwave_act(obj/machinery/microwave/M) - if(M && M.dirty < 100) + if(istype(M) && M.dirty < 100) M.dirty += amount /* diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 1f1143e7ce..c2929dafbd 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -28,7 +28,6 @@ STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 21 - /* * Backpack Types */ @@ -244,6 +243,18 @@ icon_state = "satchel-explorer" item_state = "securitypack" +/obj/item/storage/backpack/satchel/bone + name = "bone satchel" + desc = "A bone satchel fashend with watcher wings and large bones from goliath. Can be worn on the belt." + icon = 'icons/obj/mining.dmi' + icon_state = "goliath_saddle" + slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_BELT + +/obj/item/storage/backpack/satchel/bone/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_combined_w_class = 10 + /obj/item/storage/backpack/satchel/cap name = "captain's satchel" desc = "An exclusive satchel for Nanotrasen officers." @@ -447,6 +458,8 @@ new /obj/item/clothing/suit/straight_jacket(src) new /obj/item/clothing/mask/muzzle(src) new /obj/item/mmi/syndie(src) + new /obj/item/implantcase(src) + new /obj/item/implanter(src) /obj/item/storage/backpack/duffelbag/syndie/surgery_adv name = "advanced surgery duffel bag" @@ -464,6 +477,8 @@ new /obj/item/clothing/suit/straight_jacket(src) new /obj/item/clothing/mask/muzzle(src) new /obj/item/mmi/syndie(src) + new /obj/item/implantcase(src) + new /obj/item/implanter(src) /obj/item/storage/backpack/duffelbag/syndie/ammo name = "ammunition duffel bag" @@ -574,3 +589,16 @@ new /obj/item/clothing/mask/gas/clown_hat(src) new /obj/item/bikehorn(src) new /obj/item/implanter/sad_trombone(src) + +obj/item/storage/backpack/duffelbag/syndie/shredderbundle + desc = "A large duffel bag containing two CX Shredders, some magazines, an elite hardsuit, and a chest rig." + +/obj/item/storage/backpack/duffelbag/syndie/shredderbundle/PopulateContents() + new /obj/item/ammo_box/magazine/flechette/shredder(src) + new /obj/item/ammo_box/magazine/flechette/shredder(src) + new /obj/item/ammo_box/magazine/flechette/shredder(src) + new /obj/item/ammo_box/magazine/flechette/shredder(src) + new /obj/item/gun/ballistic/automatic/flechette/shredder(src) + new /obj/item/gun/ballistic/automatic/flechette/shredder(src) + new /obj/item/storage/belt/military(src) + new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 57c77e5983..e2d7fdf9d7 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -541,6 +541,25 @@ /obj/item/ammo_casing/shotgun )) +/obj/item/storage/belt/medolier + name = "medolier" + desc = "A medical bandolier for holding smartdarts." + icon_state = "medolier" + item_state = "medolier" + +/obj/item/storage/belt/medolier/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_items = 15 + STR.display_numerical_stacking = FALSE + STR.can_hold = typecacheof(list( + /obj/item/reagent_containers/syringe/dart + )) + +/obj/item/storage/belt/medolier/full/PopulateContents() + for(var/i in 1 to 16) + new /obj/item/reagent_containers/syringe/dart/(src) + /obj/item/storage/belt/holster name = "shoulder holster" desc = "A holster to carry a handgun and ammo. WARNING: Badasses only." @@ -557,6 +576,8 @@ /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, /obj/item/ammo_box, + /obj/item/toy/gun, + /obj/item/gun/energy/e_gun/mini )) /obj/item/storage/belt/holster/full/PopulateContents() diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index b95d6a897e..830c3aea96 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -51,7 +51,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", if(!istype(H)) return // If H is the Chaplain, we can set the icon_state of the bible (but only once!) - if(!SSreligion.bible_icon_state && H.job == "Chaplain") + if(!GLOB.bible_icon_state && H.job == "Chaplain") var/dat = "Pick Bible Style

Pick a bible style

" for(var/i in 1 to GLOB.biblestates.len) var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i]) @@ -64,7 +64,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", /obj/item/storage/book/bible/Topic(href, href_list) if(!usr.canUseTopic(src)) return - if(href_list["seticon"] && SSreligion && !SSreligion.bible_icon_state) + if(href_list["seticon"] && GLOB && !GLOB.bible_icon_state) var/iconi = text2num(href_list["seticon"]) var/biblename = GLOB.biblenames[iconi] var/obj/item/storage/book/bible/B = locate(href_list["src"]) @@ -76,8 +76,8 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", H.dna.add_mutation(CLOWNMUT) H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), SLOT_WEAR_MASK) - SSreligion.bible_icon_state = B.icon_state - SSreligion.bible_item_state = B.item_state + GLOB.bible_icon_state = B.icon_state + GLOB.bible_item_state = B.item_state SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]") usr << browse(null, "window=editicon") @@ -89,7 +89,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", to_chat(user, "[src.deity_name] refuses to heal this metallic taint!") return 0 - var/heal_amt = 10 + var/heal_amt = 5 var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1) if(hurt_limbs.len) @@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", to_chat(user, "You don't have the dexterity to do this!") return - if (user.has_trait(TRAIT_CLUMSY) && prob(50)) + if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "[src] slips out of your hand and hits your head.") user.take_bodypart_damage(10) user.Unconscious(400) @@ -138,8 +138,8 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", smack = 0 else if(iscarbon(M)) var/mob/living/carbon/C = M - if(!istype(C.head, /obj/item/clothing/head/helmet)) - C.adjustBrainLoss(5, 60) + if(!istype(C.head, /obj/item/clothing/head)) + C.adjustBrainLoss(10, 80) to_chat(C, "You feel dumber.") if(smack) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index f09c040795..4ff63ceeac 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -15,9 +15,10 @@ * Handcuff, mousetrap, and pillbottle boxes, * Snap-pops and matchboxes, * Replacement light boxes, - * Shotgun Ammo boxes, + * Ammo types, * Action Figure Boxes, - * Various paper bags. + * Various paper bags, + * Colored boxes * * For syndicate call-ins see uplink_kits.dm */ @@ -75,7 +76,6 @@ return 0 return ..() - //Disk boxes /obj/item/storage/box/disks name = "diskette box" @@ -142,6 +142,29 @@ ..() // we want the regular stuff too new /obj/item/radio/off(src) +/obj/item/storage/box/seclooking + icon_state = "secbox" + illustration = null + +/obj/item/storage/box/cells + name = "box of powercells" + desc = "Contains powercells." + illustration = "power_cell" + +/obj/item/storage/box/ammoshells + name = "box of loose ammo" + desc = "Contains loose ammo." + illustration = "loose_ammo" + +/obj/item/storage/box/otwo + name = "box of o2 supplies" + desc = "Contains o2 supplies." + illustration = "02" + +/obj/item/storage/box/otwo/PopulateContents() + for(var/i in 1 to 7) + new /obj/item/tank/internals/emergency_oxygen/engi(src) + /obj/item/storage/box/gloves name = "box of latex gloves" desc = "Contains sterile latex gloves." @@ -463,7 +486,7 @@ /obj/item/storage/box/firingpins name = "box of standard firing pins" desc = "A box full of standard firing pins, to allow newly-developed firearms to operate." - illustration = "id" + illustration = "firing_pins" /obj/item/storage/box/firingpins/PopulateContents() for(var/i in 1 to 5) @@ -472,7 +495,7 @@ /obj/item/storage/box/lasertagpins name = "box of laser tag firing pins" desc = "A box full of laser tag firing pins, to allow newly-developed firearms to require wearing brightly coloured plastic armor before being able to be used." - illustration = "id" + illustration = "firing_pins" /obj/item/storage/box/lasertagpins/PopulateContents() for(var/i in 1 to 3) @@ -699,7 +722,7 @@ new /obj/item/ammo_casing/shotgun/rubbershot(src) /obj/item/storage/box/lethalshot - name = "box of lethal shotgun shots" + name = "box of buckshot (Lethal)" desc = "A box full of lethal shots, designed for riot shotguns." icon_state = "lethalshot_box" illustration = null @@ -726,7 +749,7 @@ /obj/item/storage/box/lethalslugs/PopulateContents() for(var/i in 1 to 7) - new /obj/item/projectile/bullet/shotgun_slug(src) + new /obj/item/ammo_casing/shotgun(src) /obj/item/storage/box/stunslug name = "box of stun slugs" @@ -736,7 +759,7 @@ /obj/item/storage/box/stunslug/PopulateContents() for(var/i in 1 to 7) - new /obj/item/projectile/bullet/shotgun_stunslug(src) + new /obj/item/ammo_casing/shotgun/stunslug(src) /obj/item/storage/box/techsslug name = "box of tech shotgun shells" @@ -750,11 +773,11 @@ /obj/item/storage/box/fireshot name = "box of incendiary ammo" - desc = "A box full of tech incendiary ammo." + desc = "A box full of incendiary ammo." icon_state = "fireshot_box" illustration = null -/obj/item/storage/box/techsslug/PopulateContents() +/obj/item/storage/box/fireshot/PopulateContents() for(var/i in 1 to 7) new /obj/item/ammo_casing/shotgun/incendiary(src) @@ -768,6 +791,19 @@ var/randomFigure = pick(subtypesof(/obj/item/toy/figure)) new randomFigure(src) +/obj/item/storage/box/mechfigures + name = "box of mech figures" + desc = "The latest set of collectable mech figures." + icon_state = "box" + +/obj/item/storage/box/mechfigures/PopulateContents() + for(var/i in 1 to 4) + var/randomFigure = pick(subtypesof(/obj/item/toy/prize/)) + new randomFigure(src) + + + + #define NODESIGN "None" #define NANOTRASEN "NanotrasenStandard" #define SYNDI "SyndiSnacks" @@ -1003,7 +1039,6 @@ for(var/i in 1 to 7) new /obj/item/reagent_containers/pill/patch/silver_sulf(src) - /obj/item/storage/box/fountainpens name = "box of fountain pens" @@ -1062,3 +1097,102 @@ new /obj/item/stock_parts/matter_bin/bluespace(src) new /obj/item/stock_parts/matter_bin/bluespace(src) new /obj/item/stock_parts/matter_bin/bluespace(src) + +//Colored boxes. +/obj/item/storage/box/green + icon_state = "box_green" + illustration = null + +/obj/item/storage/box/blue + icon_state = "box_blue" + illustration = null + +/obj/item/storage/box/purple + icon_state = "box_purple" + illustration = null + +/obj/item/storage/box/red + icon_state = "box_red" + illustration = null + +/obj/item/storage/box/yellow + icon_state = "box_yellow" + illustration = null + +/obj/item/storage/box/brown + icon_state = "box_brown" + illustration = null + +/obj/item/storage/box/pink + icon_state = "box_pink" + illustration = null + +/obj/item/storage/box/mre //base MRE type. + name = "Nanotrasen MRE Ration Kit Menu 0" + desc = "A package containing food suspended in an outdated bluespace pocket which lasts for centuries. If you're lucky you may even be able to enjoy the meal without getting food poisoning." + icon_state = "mre" + var/can_expire = TRUE + var/spawner_chance = 2 + var/expiration_date + var/expiration_date_min = 2300 + var/expiration_date_max = 2700 + +/obj/item/storage/box/mre/Initialize() + . = ..() + if(can_expire) + expiration_date = rand(expiration_date_min, expiration_date_max) + desc += "\nAn expiry date is listed on it. It reads: [expiration_date]" + var/spess_current_year = GLOB.year_integer + 540 + if(expiration_date < spess_current_year) + var/gross_risk = min(round(spess_current_year - expiration_date * 0.1), 1) + var/toxic_risk = min(round(spess_current_year - expiration_date * 0.01), 1) + for(var/obj/item/reagent_containers/food/snacks/S in contents) + if(prob(gross_risk)) + ENABLE_BITFIELD(S.foodtype, GROSS) + if(prob(toxic_risk)) + ENABLE_BITFIELD(S.foodtype, TOXIC) + +/obj/item/storage/box/mre/menu1 + name = "\improper Nanotrasen MRE Ration Kit Menu 1" + +/obj/item/storage/box/mre/menu1/safe + desc = "A package containing food suspended in a bluespace pocket capable of lasting till the end of time." + spawner_chance = 0 + can_expire = FALSE + +/obj/item/storage/box/mre/menu1/PopulateContents() + new /obj/item/reagent_containers/food/snacks/breadslice/plain(src) + new /obj/item/reagent_containers/food/snacks/breadslice/creamcheese(src) + new /obj/item/reagent_containers/food/condiment/pack/ketchup(src) + new /obj/item/reagent_containers/food/snacks/chocolatebar(src) + new /obj/item/tank/internals/emergency_oxygen(src) + +/obj/item/storage/box/mre/menu2 + name = "\improper Nanotrasen MRE Ration Kit Menu 2" + +/obj/item/storage/box/mre/menu2/safe + spawner_chance = 0 + desc = "A package containing food suspended in a bluespace pocket capable of lasting till the end of time." + can_expire = FALSE + +/obj/item/storage/box/mre/menu2/PopulateContents() + new /obj/item/reagent_containers/food/snacks/omelette(src) + new /obj/item/reagent_containers/food/snacks/meat/cutlet/plain(src) + new /obj/item/reagent_containers/food/snacks/fries(src) + new /obj/item/reagent_containers/food/snacks/chocolatebar(src) + new /obj/item/tank/internals/emergency_oxygen(src) + +/obj/item/storage/box/mre/menu3 + name = "\improper Nanotrasen MRE Ration Kit Menu 3" + desc = "The holy grail of MREs. This item contains the fabled MRE pizza and a sample of coffee instant type 2. Any NT employee lucky enough to get their hands on one of these is truly blessed." + icon_state = "menu3" + can_expire = FALSE //always fresh, never expired. + spawner_chance = 1 + +/obj/item/storage/box/mre/menu3/PopulateContents() + new /obj/item/reagent_containers/food/snacks/pizzaslice/pepperoni(src) + new /obj/item/reagent_containers/food/snacks/breadslice/plain(src) + new /obj/item/reagent_containers/food/snacks/cheesewedge(src) + new /obj/item/reagent_containers/food/snacks/grown/chili(src) + new /obj/item/reagent_containers/food/drinks/coffee/type2(src) + new /obj/item/tank/internals/emergency_oxygen(src) diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index f4f386b7d0..46676b5adb 100644 --- a/code/game/objects/items/storage/briefcase.dm +++ b/code/game/objects/items/storage/briefcase.dm @@ -38,9 +38,10 @@ /obj/item/storage/briefcase/lawyer folder_path = /obj/item/folder/blue -/obj/item/storage/briefcase/lawyer/family +/obj/item/storage/briefcase/lawyer/family name = "battered briefcase" - desc = "An old briefcase, this one has seen better days in its time. It's clear they don't make them nowadays as good as they used to. The corners are modified with metal trim adding in weight!" + desc = "An old briefcase, this one has seen better days in its time. It's clear they don't make them nowadays as good as they used to. Comes with an added belt clip!" + slot_flags = ITEM_SLOT_BELT /obj/item/storage/briefcase/lawyer/family/PopulateContents() new /obj/item/stamp/law(src) @@ -79,3 +80,28 @@ new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src) new /obj/item/suppressor/specialoffer(src) + +/obj/item/storage/briefcase/modularbundle + desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding." + force = 10 + +/obj/item/storage/briefcase/modularbundle/PopulateContents() + new /obj/item/gun/ballistic/automatic/pistol/modular(src) + new /obj/item/suppressor(src) + new /obj/item/ammo_box/magazine/m10mm(src) + new /obj/item/ammo_box/magazine/m10mm/soporific(src) + new /obj/item/ammo_box/c10mm/soporific(src) + new /obj/item/clothing/under/lawyer/blacksuit(src) + new /obj/item/clothing/accessory/waistcoat(src) + new /obj/item/clothing/suit/toggle/lawyer/black/syndie(src) + +/obj/item/storage/briefcase/medical + name = "medical briefcase" + icon_state = "medbriefcase" + desc = "A white with a blue cross brieface, this is ment to hold medical gear that would not be able to normally fit in a bag." + +/obj/item/storage/briefcase/medical/PopulateContents() + new /obj/item/clothing/neck/stethoscope(src) + new /obj/item/healthanalyzer(src) + ..() //In case of paperwork + diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 1a666ce921..e9b074d40c 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -320,3 +320,46 @@ /obj/item/storage/pill_bottle/penis_enlargement/PopulateContents() for(var/i in 1 to 7) new /obj/item/reagent_containers/pill/penis_enlargement(src) + +///////////// +//Organ Box// +///////////// + +/obj/item/storage/belt/organbox + name = "Organ Storge" + desc = "A compact box that helps hold massive amounts of implants, organs, and some tools. Has a belt clip for easy carrying" + w_class = WEIGHT_CLASS_BULKY + icon = 'icons/obj/mysterybox.dmi' + icon_state = "organbox_open" + lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + throw_speed = 1 + throw_range = 1 + +/obj/item/storage/belt/organbox/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_items = 16 + STR.max_w_class = WEIGHT_CLASS_BULKY + STR.max_combined_w_class = 20 + STR.can_hold = typecacheof(list( + /obj/item/storage/pill_bottle, + /obj/item/reagent_containers/hypospray, + /obj/item/healthanalyzer, + /obj/item/reagent_containers/syringe, + /obj/item/clothing/glasses/hud/health, + /obj/item/hemostat, + /obj/item/scalpel, + /obj/item/retractor, + /obj/item/cautery, + /obj/item/surgical_drapes, + /obj/item/autosurgeon, + /obj/item/organ, + /obj/item/implant, + /obj/item/implantpad, + /obj/item/implantcase, + /obj/item/implanter, + /obj/item/circuitboard/computer/operating, + /obj/item/stack/sheet/mineral/silver, + /obj/item/organ_storage + )) diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 9b8d2b4a21..e21ce71843 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -183,6 +183,22 @@ slab_type = /obj/item/clockwork/slab/debug fabricator_type = /obj/item/clockwork/replica_fabricator/scarab/debug +/obj/item/storage/toolbox/plastitanium + name = "plastitanium toolbox" + desc = "A toolbox made out of plastitanium. Probably packs a massive punch." + total_mass = 5 + icon_state = "blue" + item_state = "toolbox_blue" + w_class = WEIGHT_CLASS_HUGE //heyo no bohing this! + force = 18 //spear damage + +/obj/item/storage/toolbox/durasteel/afterattack(atom/A, mob/user, proximity) + . = ..() + if(proximity && isobj(A) && !isitem(A)) + var/obj/O = A + //50 total object damage but split up for stuff like damage deflection. + O.take_damage(22) + O.take_damage(10) /obj/item/storage/toolbox/artistic name = "artistic toolbox" diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index 69c8f7aee9..a6a3cea373 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -2,7 +2,7 @@ /obj/item/storage/box/syndicate/PopulateContents() switch (pickweight(list("bloodyspai" = 3, "stealth" = 2, "bond" = 2, "screwed" = 2, "sabotage" = 3, "guns" = 2, "murder" = 2, "implant" = 1, "hacker" = 3, "darklord" = 1, "sniper" = 1, "metaops" = 1, "ninja" = 1))) - if("bloodyspai") // 27 tc now this is more right + if("bloodyspai") // 30 tc now this is more right new /obj/item/clothing/under/chameleon(src) // 2 tc since it's not the full set new /obj/item/clothing/mask/chameleon(src) // Goes with above new /obj/item/card/id/syndicate(src) // 2 tc @@ -11,7 +11,7 @@ new /obj/item/multitool/ai_detect(src) // 1 tc new /obj/item/encryptionkey/syndicate(src) // 2 tc new /obj/item/reagent_containers/syringe/mulligan(src) // 4 tc - new /obj/item/switchblade(src) //I'll count this as 2 tc + new /obj/item/switchblade(src) //I'll count this as 5 tc new /obj/item/storage/fancy/cigarettes/cigpack_syndicate (src) // 2 tc this shit heals new /obj/item/flashlight/emp(src) // 2 tc new /obj/item/chameleon(src) // 7 tc @@ -25,13 +25,13 @@ new /obj/item/clothing/glasses/thermal/syndi(src) if("bond") // 29 tc - new /obj/item/gun/ballistic/automatic/pistol(src) - new /obj/item/suppressor(src) + new /obj/item/gun/ballistic/automatic/pistol/suppressed(src) new /obj/item/ammo_box/magazine/m10mm(src) new /obj/item/ammo_box/magazine/m10mm(src) new /obj/item/clothing/under/chameleon(src) new /obj/item/card/id/syndicate(src) new /obj/item/reagent_containers/syringe/stimulants(src) + new /obj/item/clothing/neck/tie/red(src) if("screwed") // 29 tc new /obj/item/sbeacondrop/bomb(src) @@ -41,7 +41,7 @@ new /obj/item/clothing/head/helmet/space/syndicate/black/red(src) new /obj/item/encryptionkey/syndicate(src) - if("guns") // 28 tc now + if("guns") // 30 tc now new /obj/item/gun/ballistic/revolver(src) new /obj/item/ammo_box/a357(src) new /obj/item/ammo_box/a357(src) @@ -50,39 +50,53 @@ new /obj/item/clothing/gloves/color/latex/nitrile(src) new /obj/item/clothing/mask/gas/clown_hat(src) new /obj/item/clothing/under/suit_jacket/really_black(src) + new /obj/item/screwdriver/power(src) //2 tc item - if("murder") // 28 tc now + if("murder") // 35 tc now new /obj/item/melee/transforming/energy/sword/saber(src) new /obj/item/clothing/glasses/thermal/syndi(src) new /obj/item/card/emag(src) new /obj/item/clothing/shoes/chameleon/noslip(src) new /obj/item/encryptionkey/syndicate(src) new /obj/item/grenade/syndieminibomb(src) + new /obj/item/clothing/glasses/phantomthief/syndicate(src) + new /obj/item/reagent_containers/syringe/stimulants(src) - if("implant") // 55+ tc holy shit what the fuck this is a lottery disguised as fun boxes isn't it? + if("implant") // 67+ tc holy shit what the fuck this is a lottery disguised as fun boxes isn't it? new /obj/item/implanter/freedom(src) new /obj/item/implanter/uplink/precharged(src) new /obj/item/implanter/emp(src) new /obj/item/implanter/adrenalin(src) new /obj/item/implanter/explosive(src) new /obj/item/implanter/storage(src) + new /obj/item/implanter/radio/syndicate(src) + new /obj/item/implanter/stealth(src) - if("hacker") // 26 tc + if("hacker") // 30 tc new /obj/item/aiModule/syndicate(src) new /obj/item/card/emag(src) new /obj/item/encryptionkey/binary(src) new /obj/item/aiModule/toyAI(src) new /obj/item/multitool/ai_detect(src) + new /obj/item/flashlight/emp(src) + new /obj/item/emagrecharge(src) - if("lordsingulo") // 24 tc - new /obj/item/sbeacondrop(src) - new /obj/item/clothing/suit/space/syndicate/black/red(src) - new /obj/item/clothing/head/helmet/space/syndicate/black/red(src) - new /obj/item/card/emag(src) + if("lordsingulo") // "36" tc aka 23 tc + new /obj/item/sbeacondrop(src) // 14 kinda useless + new /obj/item/clothing/suit/space/syndicate/black/red(src) //2 + new /obj/item/clothing/head/helmet/space/syndicate/black/red(src) //2 + new /obj/item/card/emag(src) //6 + new /obj/item/emagrecharge(src) //2 + new /obj/item/storage/toolbox/syndicate(src) //1 + new /obj/item/card/id/syndicate(src) //2 + new /obj/item/flashlight/emp(src) //2 + new /obj/item/jammer(src) //5 - if("sabotage") // 26 tc now + if("sabotage") // ~28 tc now new /obj/item/grenade/plastic/c4 (src) new /obj/item/grenade/plastic/c4 (src) + new /obj/item/grenade/plastic/x4 (src) + new /obj/item/grenade/plastic/x4 (src) new /obj/item/doorCharge(src) new /obj/item/doorCharge(src) new /obj/item/camera_bug(src) @@ -117,15 +131,15 @@ new /obj/item/grenade/plastic/c4 (src) // 1 tc new /obj/item/card/emag(src) // 6 tc - if("ninja") // 33 tc worth - new /obj/item/katana(src) // Unique , hard to tell how much tc this is worth. 8 tc? + if("ninja") // 40~ tc worth + new /obj/item/katana(src) // Unique , basicly a better esword. 10 tc? new /obj/item/implanter/adrenalin(src) // 8 tc new /obj/item/throwing_star(src) // ~5 tc for all 6 new /obj/item/throwing_star(src) new /obj/item/throwing_star(src) - new /obj/item/throwing_star(src) - new /obj/item/throwing_star(src) - new /obj/item/throwing_star(src) + new /obj/item/implanter/emp(src) + new /obj/item/grenade/smokebomb(src) + new /obj/item/grenade/smokebomb(src) new /obj/item/storage/belt/chameleon(src) // Unique but worth at least 2 tc new /obj/item/card/id/syndicate(src) // 2 tc new /obj/item/chameleon(src) // 7 tc diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 3904355893..bfe630ba01 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -22,7 +22,10 @@ var/preload_cell_type //if not empty the baton starts with this type of cell /obj/item/melee/baton/get_cell() - return cell + . = cell + if(iscyborg(loc)) + var/mob/living/silicon/robot/R = loc + . = R.get_cell() /obj/item/melee/baton/suicide_act(mob/user) user.visible_message("[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide!") @@ -46,14 +49,18 @@ /obj/item/melee/baton/loaded //this one starts with a cell pre-installed. preload_cell_type = /obj/item/stock_parts/cell/high -/obj/item/melee/baton/proc/deductcharge(chrgdeductamt, chargecheck = TRUE) - if(!cell) +/obj/item/melee/baton/proc/deductcharge(chrgdeductamt, chargecheck = TRUE, explode = TRUE) + var/obj/item/stock_parts/cell/copper_top = get_cell() + if(!copper_top) switch_status(FALSE, TRUE) return FALSE //Note this value returned is significant, as it will determine //if a stun is applied or not - . = cell.use(chrgdeductamt) - if(status && (!. || (chargecheck && cell.charge < hitcost * STUNBATON_CHARGE_LENIENCY))) + + copper_top.use(min(chrgdeductamt, copper_top.charge), explode) + if(QDELETED(src)) + return FALSE + if(status && (!copper_top || !copper_top.charge || (chargecheck && copper_top.charge < (hitcost * STUNBATON_CHARGE_LENIENCY)))) //we're below minimum, turn off switch_status(FALSE) @@ -69,7 +76,7 @@ update_icon() /obj/item/melee/baton/process() - deductcharge(hitcost * 0.004, FALSE) + deductcharge(hitcost * 0.004, FALSE, FALSE) /obj/item/melee/baton/update_icon() if(status) @@ -80,9 +87,10 @@ icon_state = "[initial(name)]" /obj/item/melee/baton/examine(mob/user) - ..() - if(cell) - to_chat(user, "\The [src] is [round(cell.percent())]% charged.") + . = ..() + var/obj/item/stock_parts/cell/copper_top = get_cell() + if(copper_top) + to_chat(user, "\The [src] is [round(copper_top.percent())]% charged.") else to_chat(user, "\The [src] does not have a power source installed.") @@ -92,7 +100,7 @@ if(cell) to_chat(user, "[src] already has a cell.") else - if(C.maxcharge < hitcost * STUNBATON_CHARGE_LENIENCY) + if(C.maxcharge < (hitcost * STUNBATON_CHARGE_LENIENCY)) to_chat(user, "[src] requires a higher capacity cell.") return if(!user.transferItemToLoc(W, src)) @@ -112,19 +120,20 @@ return ..() /obj/item/melee/baton/attack_self(mob/user) - if(cell && cell.charge > hitcost * STUNBATON_CHARGE_LENIENCY) - switch_status(!status) - to_chat(user, "[src] is now [status ? "on" : "off"].") - else + var/obj/item/stock_parts/cell/copper_top = get_cell() + if(!copper_top || copper_top.charge < (hitcost * STUNBATON_CHARGE_LENIENCY)) switch_status(FALSE, TRUE) - if(!cell) + if(!copper_top) to_chat(user, "[src] does not have a power source!") else to_chat(user, "[src] is out of charge.") + else + switch_status(!status) + to_chat(user, "[src] is now [status ? "on" : "off"].") add_fingerprint(user) /obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user) - if(status && user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) clowning_around(user) return @@ -164,16 +173,21 @@ playsound(L, 'sound/weapons/genhit.ogg', 50, 1) return FALSE var/stunpwr = stunforce - if(iscyborg(loc)) - var/mob/living/silicon/robot/R = loc - if(!istype(R) || !R.cell || !R.cell.use(hitcost)) + var/obj/item/stock_parts/cell/our_cell = get_cell() + if(!our_cell) + switch_status(FALSE) + return FALSE + var/stuncharge = our_cell.charge + deductcharge(hitcost, FALSE) + if(QDELETED(src) || QDELETED(our_cell)) //it was rigged + return FALSE + if(stuncharge < hitcost) + if(stuncharge < (hitcost * STUNBATON_CHARGE_LENIENCY)) + L.visible_message("[user] has prodded [L] with [src]. Luckily it was out of charge.", \ + "[user] has prodded you with [src]. Luckily it was out of charge.") return FALSE - else - var/stuncharge = cell.charge - if(!deductcharge(hitcost, FALSE)) - stunpwr *= round(stuncharge/hitcost) - if(stunpwr < stunforce * STUNBATON_CHARGE_LENIENCY) - return FALSE + stunpwr *= round(stuncharge/hitcost, 0.1) + L.Knockdown(stunpwr) L.adjustStaminaLoss(stunpwr*0.1, affected_zone = (istype(user) ? user.zone_selected : BODY_ZONE_CHEST))//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented. @@ -198,14 +212,17 @@ /obj/item/melee/baton/proc/clowning_around(mob/living/user) user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") + SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) user.Knockdown(stunforce*3) + playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) deductcharge(hitcost) /obj/item/melee/baton/emp_act(severity) . = ..() if (!(. & EMP_PROTECT_SELF)) switch_status(FALSE) - deductcharge(1000 / severity) + if(!iscyborg(loc)) + deductcharge(1000 / severity, TRUE, FALSE) //Makeshift stun baton. Replacement for stun gloves. /obj/item/melee/baton/cattleprod @@ -222,14 +239,15 @@ hitcost = 2000 throw_hit_chance = 10 slot_flags = ITEM_SLOT_BACK - var/obj/item/assembly/igniter/sparkler = 0 + var/obj/item/assembly/igniter/sparkler /obj/item/melee/baton/cattleprod/Initialize() . = ..() sparkler = new (src) + sparkler.activate_cooldown = 5 /obj/item/melee/baton/cattleprod/baton_stun() - if(sparkler.activate()) - ..() + sparkler?.activate() + . = ..() -#undef STUNBATON_CHARGE_LENIENCY +#undef STUNBATON_CHARGE_LENIENCY \ No newline at end of file diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index a5a2398fe0..b672eb01ca 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -1,238 +1,244 @@ -/obj/item/tank/jetpack - name = "jetpack (empty)" - desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution." - icon_state = "jetpack" - item_state = "jetpack" - lefthand_file = 'icons/mob/inhands/equipment/jetpacks_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/jetpacks_righthand.dmi' - w_class = WEIGHT_CLASS_BULKY - distribute_pressure = ONE_ATMOSPHERE * O2STANDARD - actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) - var/gas_type = /datum/gas/oxygen - var/on = FALSE - var/stabilizers = FALSE - var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not - var/datum/effect_system/trail_follow/ion/ion_trail - -/obj/item/tank/jetpack/New() - ..() - if(gas_type) - air_contents.assert_gas(gas_type) - air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) - - ion_trail = new - ion_trail.set_up(src) - -/obj/item/tank/jetpack/ui_action_click(mob/user, action) - if(istype(action, /datum/action/item_action/toggle_jetpack)) - cycle(user) - else if(istype(action, /datum/action/item_action/jetpack_stabilization)) - if(on) - stabilizers = !stabilizers - to_chat(user, "You turn the jetpack stabilization [stabilizers ? "on" : "off"].") - else - toggle_internals(user) - -/obj/item/tank/jetpack/proc/cycle(mob/user) - if(user.incapacitated()) - return - - if(!on) - turn_on() - to_chat(user, "You turn the jetpack on.") - else - turn_off() - to_chat(user, "You turn the jetpack off.") - for(var/X in actions) - var/datum/action/A = X - A.UpdateButtonIcon() - -/obj/item/tank/jetpack/proc/turn_on() - on = TRUE - icon_state = "[initial(icon_state)]-on" - ion_trail.start() - -/obj/item/tank/jetpack/proc/turn_off() - on = FALSE - stabilizers = FALSE - icon_state = initial(icon_state) - ion_trail.stop() - -/obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user) - if(!on) - return - if((num < 0.005 || air_contents.total_moles() < num)) - turn_off() - return - - var/datum/gas_mixture/removed = air_contents.remove(num) - if(removed.total_moles() < 0.005) - turn_off() - return - - var/turf/T = get_turf(user) - T.assume_air(removed) - - return 1 - -/obj/item/tank/jetpack/suicide_act(mob/user) - if (istype(user, /mob/living/carbon/human/)) - var/mob/living/carbon/human/H = user - H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?") - H.visible_message("[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!") - return (OXYLOSS) - else - ..() - -/obj/item/tank/jetpack/improvised - name = "improvised jetpack" - desc = "A jetpack made from two air tanks, a fire extinguisher and some atmospherics equipment. It doesn't look like it can hold much." - icon_state = "jetpack-improvised" - item_state = "jetpack-sec" - volume = 30 //normal jetpacks have 70 volume - gas_type = null //it starts empty - full_speed = FALSE //moves at hardsuit jetpack speeds - -/obj/item/tank/jetpack/improvised/allow_thrust(num, mob/living/user) - if(!on) - return - if((num < 0.005 || air_contents.total_moles() < num)) - turn_off() - return - if(rand(0,250) == 0) - to_chat(user, "You feel your jetpack's engines cut out.") - turn_off() - return - - var/datum/gas_mixture/removed = air_contents.remove(num) - if(removed.total_moles() < 0.005) - turn_off() - return - - var/turf/T = get_turf(user) - T.assume_air(removed) - - return 1 - -/obj/item/tank/jetpack/void - name = "void jetpack (oxygen)" - desc = "It works well in a void." - volume = 60 - icon_state = "jetpack-void" - item_state = "jetpack-void" - full_speed = FALSE //Old pre-hardsuit tech - -/obj/item/tank/jetpack/oxygen - name = "jetpack (oxygen)" - desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution." - icon_state = "jetpack" - item_state = "jetpack" - -/obj/item/tank/jetpack/oxygen/harness - name = "jet harness (oxygen)" - desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks." - icon_state = "jetpack-mini" - item_state = "jetpack-mini" - volume = 50 - throw_range = 7 - w_class = WEIGHT_CLASS_NORMAL - -/obj/item/tank/jetpack/oxygen/captain - name = "\improper Captain's jetpack" - desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen." - icon_state = "jetpack-captain" - item_state = "jetpack-captain" - w_class = WEIGHT_CLASS_NORMAL - volume = 90 - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy. - -/obj/item/tank/jetpack/oxygen/security - name = "security jetpack (oxygen)" - desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces." - icon_state = "jetpack-sec" - item_state = "jetpack-sec" - -/obj/item/tank/jetpack/carbondioxide - name = "jetpack (carbon dioxide)" - desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals." - icon_state = "jetpack-black" - item_state = "jetpack-black" - distribute_pressure = 0 - gas_type = /datum/gas/carbon_dioxide - -/obj/item/tank/jetpack/suit - name = "hardsuit jetpack upgrade" - desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment." - icon_state = "jetpack-mining" - item_state = "jetpack-black" - w_class = WEIGHT_CLASS_NORMAL - actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) - volume = 1 - slot_flags = null - gas_type = null - full_speed = FALSE - var/datum/gas_mixture/temp_air_contents - var/obj/item/tank/internals/tank = null - -/obj/item/tank/jetpack/suit/New() - ..() - STOP_PROCESSING(SSobj, src) - temp_air_contents = air_contents - -/obj/item/tank/jetpack/suit/attack_self() - return - -/obj/item/tank/jetpack/suit/cycle(mob/user) - if(!istype(loc, /obj/item/clothing/suit/space/hardsuit)) - to_chat(user, "\The [src] must be connected to a hardsuit!") - return - - var/mob/living/carbon/human/H = user - if(!istype(H.s_store, /obj/item/tank/internals)) - to_chat(user, "You need a tank in your suit storage!") - return - ..() - -/obj/item/tank/jetpack/suit/turn_on() - if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc)) - return - var/mob/living/carbon/human/H = loc.loc - tank = H.s_store - air_contents = tank.air_contents - START_PROCESSING(SSobj, src) - ..() - -/obj/item/tank/jetpack/suit/turn_off() - tank = null - air_contents = temp_air_contents - STOP_PROCESSING(SSobj, src) - ..() - -/obj/item/tank/jetpack/suit/process() - if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc)) - turn_off() - return - var/mob/living/carbon/human/H = loc.loc - if(!tank || tank != H.s_store) - turn_off() - return - ..() - -//Return a jetpack that the mob can use -//Back worn jetpacks, hardsuit internal packs, and so on. -//Used in Process_Spacemove() and wherever you want to check for/get a jetpack - -/mob/proc/get_jetpack() - return - -/mob/living/carbon/get_jetpack() - var/obj/item/tank/jetpack/J = back - if(istype(J)) - return J - -/mob/living/carbon/human/get_jetpack() - var/obj/item/tank/jetpack/J = ..() - if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit)) - var/obj/item/clothing/suit/space/hardsuit/C = wear_suit - J = C.jetpack - return J +/obj/item/tank/jetpack + name = "jetpack (empty)" + desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution." + icon_state = "jetpack" + item_state = "jetpack" + lefthand_file = 'icons/mob/inhands/equipment/jetpacks_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/jetpacks_righthand.dmi' + w_class = WEIGHT_CLASS_BULKY + distribute_pressure = ONE_ATMOSPHERE * O2STANDARD + actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) + var/gas_type = /datum/gas/oxygen + var/on = FALSE + var/stabilizers = FALSE + var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not + var/datum/effect_system/trail_follow/ion/ion_trail + +/obj/item/tank/jetpack/New() + ..() + if(gas_type) + air_contents.gases[gas_type] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) + + ion_trail = new + ion_trail.set_up(src) + +/obj/item/tank/jetpack/ui_action_click(mob/user, action) + if(istype(action, /datum/action/item_action/toggle_jetpack)) + cycle(user) + else if(istype(action, /datum/action/item_action/jetpack_stabilization)) + if(on) + stabilizers = !stabilizers + to_chat(user, "You turn the jetpack stabilization [stabilizers ? "on" : "off"].") + else + toggle_internals(user) + +/obj/item/tank/jetpack/proc/cycle(mob/user) + if(user.incapacitated()) + return + + if(!on) + turn_on() + to_chat(user, "You turn the jetpack on.") + else + turn_off() + to_chat(user, "You turn the jetpack off.") + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + +/obj/item/tank/jetpack/proc/turn_on() + on = TRUE + icon_state = "[initial(icon_state)]-on" + ion_trail.start() + +/obj/item/tank/jetpack/proc/turn_off() + on = FALSE + stabilizers = FALSE + icon_state = initial(icon_state) + ion_trail.stop() + +/obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user) + if(!on) + return + if((num < 0.005 || air_contents.total_moles() < num)) + turn_off() + return + + var/datum/gas_mixture/removed = air_contents.remove(num) + if(removed.total_moles() < 0.005) + turn_off() + return + + var/turf/T = get_turf(user) + T.assume_air(removed) + + return 1 + +/obj/item/tank/jetpack/suicide_act(mob/user) + if (istype(user, /mob/living/carbon/human/)) + var/mob/living/carbon/human/H = user + H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?") + H.visible_message("[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!") + return (OXYLOSS) + else + ..() + +/obj/item/tank/jetpack/improvised + name = "improvised jetpack" + desc = "A jetpack made from two air tanks, a fire extinguisher and some atmospherics equipment. It doesn't look like it can hold much." + icon_state = "jetpack-improvised" + item_state = "jetpack-sec" + volume = 30 //normal jetpacks have 70 volume + gas_type = null //it starts empty + full_speed = FALSE //moves at hardsuit jetpack speeds + +/obj/item/tank/jetpack/improvised/allow_thrust(num, mob/living/user) + if(!on) + return + if((num < 0.005 || air_contents.total_moles() < num)) + turn_off() + return + if(rand(0,250) == 0) + to_chat(user, "You feel your jetpack's engines cut out.") + turn_off() + return + + var/datum/gas_mixture/removed = air_contents.remove(num) + if(removed.total_moles() < 0.005) + turn_off() + return + + var/turf/T = get_turf(user) + T.assume_air(removed) + + return 1 + +/obj/item/tank/jetpack/void + name = "void jetpack (oxygen)" + desc = "It works well in a void." + volume = 60 + icon_state = "jetpack-void" + item_state = "jetpack-void" + full_speed = FALSE //Old pre-hardsuit tech + +/obj/item/tank/jetpack/oxygen + name = "jetpack (oxygen)" + desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution." + icon_state = "jetpack" + item_state = "jetpack" + +/obj/item/tank/jetpack/oxygen/harness + name = "jet harness (oxygen)" + desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks." + icon_state = "jetpack-mini" + item_state = "jetpack-mini" + volume = 50 + throw_range = 7 + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/tank/jetpack/oxygen/captain + name = "\improper Captain's jetpack" + desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen." + icon_state = "jetpack-captain" + item_state = "jetpack-captain" + w_class = WEIGHT_CLASS_NORMAL + volume = 90 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy. + +/obj/item/tank/jetpack/oxygen/security + name = "security jetpack (oxygen)" + desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces." + icon_state = "jetpack-sec" + item_state = "jetpack-sec" + full_speed = FALSE + +/obj/item/tank/jetpack/carbondioxide + name = "jetpack (carbon dioxide)" + desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals." + icon_state = "jetpack-black" + item_state = "jetpack-black" + distribute_pressure = 0 + gas_type = /datum/gas/carbon_dioxide + +/obj/item/tank/jetpack/carbondioxide/eva + name = "surplus jetpack (carbon dioxide)" + desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals. Rated for less than stellar EVA speeds!" + full_speed = FALSE + +/obj/item/tank/jetpack/suit + name = "hardsuit jetpack upgrade" + desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment." + icon_state = "jetpack-mining" + item_state = "jetpack-black" + w_class = WEIGHT_CLASS_NORMAL + actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) + volume = 1 + slot_flags = null + gas_type = null + full_speed = FALSE + var/datum/gas_mixture/temp_air_contents + var/obj/item/tank/internals/tank = null + +/obj/item/tank/jetpack/suit/New() + ..() + STOP_PROCESSING(SSobj, src) + temp_air_contents = air_contents + +/obj/item/tank/jetpack/suit/attack_self() + return + +/obj/item/tank/jetpack/suit/cycle(mob/user) + if(!istype(loc, /obj/item/clothing/suit/space/hardsuit)) + to_chat(user, "\The [src] must be connected to a hardsuit!") + return + + var/mob/living/carbon/human/H = user + if(!istype(H.s_store, /obj/item/tank/internals)) + to_chat(user, "You need a tank in your suit storage!") + return + ..() + +/obj/item/tank/jetpack/suit/turn_on() + if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc)) + return + var/mob/living/carbon/human/H = loc.loc + tank = H.s_store + air_contents = tank.air_contents + START_PROCESSING(SSobj, src) + ..() + +/obj/item/tank/jetpack/suit/turn_off() + tank = null + air_contents = temp_air_contents + STOP_PROCESSING(SSobj, src) + ..() + +/obj/item/tank/jetpack/suit/process() + if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc)) + turn_off() + return + var/mob/living/carbon/human/H = loc.loc + if(!tank || tank != H.s_store) + turn_off() + return + ..() + +//Return a jetpack that the mob can use +//Back worn jetpacks, hardsuit internal packs, and so on. +//Used in Process_Spacemove() and wherever you want to check for/get a jetpack + +/mob/proc/get_jetpack() + return + +/mob/living/carbon/get_jetpack() + var/obj/item/tank/jetpack/J = back + if(istype(J)) + return J + +/mob/living/carbon/human/get_jetpack() + var/obj/item/tank/jetpack/J = ..() + if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit)) + var/obj/item/clothing/suit/space/hardsuit/C = wear_suit + J = C.jetpack + return J + diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index f4eb763847..c16762467e 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -21,8 +21,7 @@ /obj/item/tank/internals/oxygen/New() ..() - air_contents.assert_gas(/datum/gas/oxygen) - air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return @@ -49,9 +48,8 @@ /obj/item/tank/internals/anesthetic/New() ..() - air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide) - air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD - air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD + air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD + air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD return /* @@ -67,9 +65,8 @@ /obj/item/tank/internals/air/New() ..() - air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD - air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD + air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD + air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD return @@ -87,8 +84,7 @@ /obj/item/tank/internals/plasma/New() ..() - air_contents.assert_gas(/datum/gas/plasma) - air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return /obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params) @@ -106,7 +102,7 @@ /obj/item/tank/internals/plasma/full/New() ..() // Plasma asserted in parent - air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return @@ -124,13 +120,12 @@ /obj/item/tank/internals/plasmaman/New() ..() - air_contents.assert_gas(/datum/gas/plasma) - air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return /obj/item/tank/internals/plasmaman/full/New() ..() // Plasma asserted in parent - air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return @@ -144,7 +139,7 @@ /obj/item/tank/internals/plasmaman/belt/full/New() ..() // Plasma asserted in parent - air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return @@ -166,8 +161,7 @@ /obj/item/tank/internals/emergency_oxygen/New() ..() - air_contents.assert_gas(/datum/gas/oxygen) - air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) return /obj/item/tank/internals/emergency_oxygen/engi diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index cdeb972ca1..1245b7de94 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -128,7 +128,7 @@ H.dropItemToGround(W) if(prob(50)) step(W, pick(GLOB.alldirs)) - H.add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC) H.bleed_rate = 5 H.gib_animation() sleep(3) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 6d1ffe9eae..8f2b85098d 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -18,7 +18,7 @@ /obj/item/watertank/Initialize() . = ..() - create_reagents(volume) + create_reagents(volume, OPENCONTAINER) noz = make_noz() /obj/item/watertank/ui_action_click(mob/user) @@ -113,7 +113,6 @@ possible_transfer_amounts = list(25,50,100) volume = 500 item_flags = NOBLUDGEON | ABSTRACT // don't put in storage - container_type = OPENCONTAINER slot_flags = 0 var/obj/item/watertank/tank @@ -335,7 +334,7 @@ var/usage_ratio = 5 //5 unit added per 1 removed var/injection_amount = 1 amount_per_transfer_from_this = 5 - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER spillable = FALSE possible_transfer_amounts = list(5,10,15) diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index c514e5e926..341c85fa1c 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -10,15 +10,14 @@ . = ..() if(!. || !istype(M) || M.anchored) return - else - SEND_SIGNAL(M, COMSIG_LIVING_MINOR_SHOCK) - do_teleport(M, get_turf(M), 15) + do_teleport(M, get_turf(M), 15) /obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user) user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) user.Knockdown(stunforce*3) + playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) if(do_teleport(user, get_turf(user), 50)) deductcharge(hitcost) else diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 7b976a6289..54f199969f 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -266,10 +266,10 @@ status = !status if(status) to_chat(user, "You resecure [src] and close the fuel tank.") - container_type = NONE + DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) else to_chat(user, "[src] can now be attached, modified, and refuelled.") - container_type = OPENCONTAINER + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) add_fingerprint(user) /obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index eabd9f1968..274afe15e0 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -636,10 +636,13 @@ var/obj/machinery/computer/holodeck/holo = null // Holodeck cards should not be infinite var/list/cards = list() -/obj/item/toy/cards/deck/New() - ..() +/obj/item/toy/cards/deck/Initialize() + . = ..() + populate_deck() + +/obj/item/toy/cards/deck/proc/populate_deck() icon_state = "deck_[deckstyle]_full" - for(var/i = 2; i <= 10; i++) + for(var/i in 2 to 10) cards += "[i] of Hearts" cards += "[i] of Spades" cards += "[i] of Clubs" @@ -664,6 +667,9 @@ //ATTACK HAND IGNORING PARENT RETURN VALUE //ATTACK HAND NOT CALLING PARENT /obj/item/toy/cards/deck/attack_hand(mob/user) + draw_card(user) + +/obj/item/toy/cards/deck/proc/draw_card(mob/user) if(user.lying) return var/choice = null @@ -778,7 +784,7 @@ /obj/item/toy/cards/cardhand/Topic(href, href_list) if(..()) return - if(usr.stat || !ishuman(usr) || !usr.canmove) + if(usr.stat || !ishuman(usr)) return var/mob/living/carbon/human/cardUser = usr var/O = src @@ -941,7 +947,6 @@ newobj.card_attack_verb = sourceobj.card_attack_verb newobj.attack_verb = newobj.card_attack_verb - /* || Syndicate playing cards, for pretending you're Gambit and playing poker for the nuke disk. || */ diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index d4ec9217e7..bf63a96f05 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -350,7 +350,7 @@ unwield() return ..() - if(user.has_trait(TRAIT_CLUMSY) && (wielded) && prob(40)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40)) impale(user) return if((wielded) && prob(50)) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index ffbe5c004c..ccc703296e 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -115,10 +115,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/claymore/highlander/pickup(mob/living/user) to_chat(user, "The power of Scotland protects you! You are shielded from all stuns and knockdowns.") user.add_stun_absorption("highlander", INFINITY, 1, " is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!") - user.add_trait(TRAIT_IGNORESLOWDOWN, HIGHLANDER) + user.ignore_slowdown(HIGHLANDER) /obj/item/claymore/highlander/dropped(mob/living/user) - user.remove_trait(TRAIT_IGNORESLOWDOWN, HIGHLANDER) + user.unignore_slowdown(HIGHLANDER) if(!QDELETED(src)) qdel(src) //If this ever happens, it's because you lost an arm diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index c1d381b435..fd6a9f2141 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -18,8 +18,9 @@ var/acid_level = 0 //how much acid is on that obj var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset. - var/current_skin //Has the item been reskinned? + var/current_skin //the item reskin var/list/unique_reskin //List of options to reskin. + var/always_reskinnable = FALSE // Access levels, used in modules\jobs\access.dm var/list/req_access @@ -228,26 +229,26 @@ ..() if(obj_flags & UNIQUE_RENAME) to_chat(user, "Use a pen on it to rename it or change its description.") - if(unique_reskin && !current_skin) + if(unique_reskin && (!current_skin || always_reskinnable)) to_chat(user, "Alt-click it to reskin it.") /obj/AltClick(mob/user) . = ..() - if(unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) + if(unique_reskin && (!current_skin || always_reskinnable) && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) reskin_obj(user) /obj/proc/reskin_obj(mob/M) if(!LAZYLEN(unique_reskin)) return - to_chat(M, "Reskin options for [name]:") + var/dat = "Reskin options for [name]:\n" for(var/V in unique_reskin) var/output = icon2html(src, M, unique_reskin[V]) - to_chat(M, "[V]: [output]") + dat += "[V]: [output]\n" + to_chat(M, dat) - var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin - if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src)) - if(!unique_reskin[choice]) - return - current_skin = choice - icon_state = unique_reskin[choice] - to_chat(M, "[src] is now skinned as '[choice].'") + var/choice = input(M, always_reskinnable ? "Choose the a reskin for [src]" : "Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin + if(QDELETED(src) || !choice || (current_skin && !always_reskinnable) || M.incapacitated() || !in_range(M,src) || !unique_reskin[choice] || unique_reskin[choice] == current_skin) + return + current_skin = choice + icon_state = unique_reskin[choice] + to_chat(M, "[src] is now skinned as '[choice]'.") diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 68c4ffeee8..5f21862c17 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -71,7 +71,7 @@ adjusted_climb_time *= 2 if(isalien(user)) adjusted_climb_time *= 0.25 //aliens are terrifyingly fast - if(user.has_trait(TRAIT_FREERUNNING)) //do you have any idea how fast I am??? + if(HAS_TRAIT(user, TRAIT_FREERUNNING)) //do you have any idea how fast I am??? adjusted_climb_time *= 0.8 structureclimber = user if(do_mob(user, user, adjusted_climb_time)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a6a6c5f699..cbdb0750e2 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -86,7 +86,7 @@ to_chat(user, "Alt-click to [locked ? "unlock" : "lock"].") if(isliving(user)) var/mob/living/L = user - if(L.has_trait(TRAIT_SKITTISH)) + if(HAS_TRAIT(L, TRAIT_SKITTISH)) to_chat(user, "Ctrl-Shift-click [src] to jump inside.") /obj/structure/closet/CanPass(atom/movable/mover, turf/target) @@ -416,7 +416,7 @@ togglelock(user) /obj/structure/closet/CtrlShiftClick(mob/living/user) - if(!user.has_trait(TRAIT_SKITTISH)) + if(!HAS_TRAIT(user, TRAIT_SKITTISH)) return ..() if(!user.canUseTopic(src) || !isturf(user.loc)) return 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 b4cdff4224..8c06af91a4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -106,6 +106,7 @@ new /obj/item/radio/headset/headset_sec(src) new /obj/item/clothing/suit/armor/vest/warden(src) new /obj/item/clothing/head/warden(src) + new /obj/item/clothing/head/warden/drill(src) new /obj/item/clothing/head/beret/sec/navywarden(src) new /obj/item/clothing/suit/armor/vest/warden/alt(src) new /obj/item/clothing/under/rank/warden/navyblue(src) diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index bd65a8b422..7c73a1fd8c 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -101,6 +101,12 @@ icon_state = "festivus_pole" desc = "During last year's Feats of Strength the Research Director was able to suplex this passing immobile rod into a planter." +/obj/structure/festivus/anchored + name = "suplexed rod" + desc = "A true feat of strength, almost as good as last year." + icon_state = "anchored_rod" + anchored = TRUE + /obj/structure/flora/tree/dead/Initialize() icon_state = "tree_[rand(1, 6)]" . = ..() diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index cc9b002fa8..54b9d650d5 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -5,7 +5,6 @@ icon_state = "cart" anchored = FALSE density = TRUE - container_type = OPENCONTAINER //copypaste sorry var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite var/obj/item/storage/bag/trash/mybag = null @@ -18,7 +17,7 @@ /obj/structure/janitorialcart/Initialize() . = ..() - create_reagents(100) + create_reagents(100, OPENCONTAINER) /obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user) if(reagents.total_volume < 1) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index ea2e99d371..b15d686b7b 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -24,15 +24,13 @@ if(ishuman(user)) var/mob/living/carbon/human/H = user - var/userloc = H.loc - //see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments! //this is largely copypasted from there. //handle facial hair (if necessary) if(H.gender == MALE) var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list - if(userloc != H.loc) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return //no tele-grooming if(new_style) H.facial_hair_style = new_style @@ -41,7 +39,7 @@ //handle normal hair var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list - if(userloc != H.loc) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return //no tele-grooming if(new_style) H.hair_style = new_style @@ -90,9 +88,9 @@ /obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) + playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) if(BURN) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) + playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) /obj/structure/mirror/magic @@ -131,7 +129,7 @@ var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes") - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return switch(choice) @@ -140,7 +138,7 @@ if(!newname) return - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return H.real_name = newname H.name = newname @@ -156,7 +154,7 @@ if(!newrace) return - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return H.set_species(newrace, icon_update=0) @@ -186,7 +184,7 @@ if("gender") if(!(H.gender in list("male", "female"))) //blame the patriarchy return - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(H.gender == "male") if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") @@ -207,7 +205,7 @@ if("hair") var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color") - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(hairchoice == "Style") //So you just want to use a mirror then? ..() @@ -225,7 +223,7 @@ if(BODY_ZONE_PRECISE_EYES) var/new_eye_color = input(H, "Choose your eye color", "Eye Color","#"+H.eye_color) as color|null - if(!Adjacent(user)) + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(new_eye_color) H.eye_color = sanitize_hexcolor(new_eye_color) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 7fe9700470..e56cf3b09d 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -4,13 +4,12 @@ icon = 'icons/obj/janitor.dmi' icon_state = "mopbucket" density = TRUE - container_type = OPENCONTAINER var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite /obj/structure/mopbucket/Initialize() . = ..() - create_reagents(100) + create_reagents(100, OPENCONTAINER) /obj/structure/mopbucket/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/mop)) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 695395afd2..09e5510d62 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -182,7 +182,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an for(var/mob/living/M in compiled) var/mob/living/mob_occupant = get_mob_or_brainmob(M) - if(mob_occupant.client && !mob_occupant.suiciding && !(mob_occupant.has_trait(TRAIT_NOCLONE)) && !mob_occupant.hellbound) + if(mob_occupant.client && !mob_occupant.suiciding && !(HAS_TRAIT(mob_occupant, TRAIT_NOCLONE)) && !mob_occupant.hellbound) icon_state = "morgue4" // Cloneable if(mob_occupant.stat == DEAD && beeper) if(world.time > next_beep) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index 815dd9de6d..65ffb7e2e5 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -17,7 +17,7 @@ L.buckled.unbuckle_mob(L,force=1) L.visible_message("[L]'s skin rapidly turns to marble!", "Your body freezes up! Can't... move... can't... think...") L.forceMove(src) - L.add_trait(TRAIT_MUTE, STATUE_MUTE) + ADD_TRAIT(L, TRAIT_MUTE, STATUE_MUTE) L.faction += "mimic" //Stops mimics from instaqdeling people in statues L.status_flags |= GODMODE obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues @@ -59,7 +59,7 @@ if(petrified_mob) petrified_mob.status_flags &= ~GODMODE petrified_mob.forceMove(loc) - petrified_mob.remove_trait(TRAIT_MUTE, STATUE_MUTE) + REMOVE_TRAIT(petrified_mob, TRAIT_MUTE, STATUE_MUTE) petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob petrified_mob.faction -= "mimic" petrified_mob = null diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 6015cf9f4a..c386726f34 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -152,8 +152,8 @@ pod_moving = 0 if(!QDELETED(pod)) var/datum/gas_mixture/floor_mixture = loc.return_air() - floor_mixture.archive() - pod.air_contents.archive() + ARCHIVE_TEMPERATURE(floor_mixture) + ARCHIVE_TEMPERATURE(pod.air_contents) pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on air_update_turf() 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 03082cd4ba..ee46538be1 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -11,9 +11,8 @@ /obj/structure/transit_tube_pod/Initialize() . = ..() - air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - air_contents.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD - air_contents.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD + air_contents.gases[/datum/gas/oxygen] = MOLES_O2STANDARD + air_contents.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD air_contents.temperature = T20C diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index f108a536d2..e441ccd6cc 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -297,15 +297,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( continue var/list/S_gases = S.air.gases for(var/id in S_gases) - ASSERT_GAS(id, total) - total_gases[id][MOLES] += S_gases[id][MOLES] + total_gases[id] += S_gases[id] total.temperature += S.air.temperature air.copy_from(total) var/list/air_gases = air.gases for(var/id in air_gases) - air_gases[id][MOLES] /= turf_count //Averages contents of the turfs, ignoring walls and the like + air_gases[id] /= turf_count //Averages contents of the turfs, ignoring walls and the like air.temperature /= turf_count SSair.add_to_active(src) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index fed922c7b4..cff219c63e 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -314,9 +314,8 @@ /turf/open/rad_act(pulse_strength) . = ..() if (air.gases[/datum/gas/carbon_dioxide] && air.gases[/datum/gas/oxygen]) - pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide][MOLES]*1000,air.gases[/datum/gas/oxygen][MOLES]*2000) //Ensures matter is conserved properly - air.gases[/datum/gas/carbon_dioxide][MOLES]=max(air.gases[/datum/gas/carbon_dioxide][MOLES]-(pulse_strength/1000),0) - air.gases[/datum/gas/oxygen][MOLES]=max(air.gases[/datum/gas/oxygen][MOLES]-(pulse_strength/2000),0) - air.assert_gas(/datum/gas/pluoxium) - air.gases[/datum/gas/pluoxium][MOLES]+=(pulse_strength/4000) - air.garbage_collect() + pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide]*1000,air.gases[/datum/gas/oxygen]*2000) //Ensures matter is conserved properly + air.gases[/datum/gas/carbon_dioxide]=max(air.gases[/datum/gas/carbon_dioxide]-(pulse_strength/1000),0) + air.gases[/datum/gas/oxygen]=max(air.gases[/datum/gas/oxygen]-(pulse_strength/2000),0) + air.gases[/datum/gas/pluoxium]+=(pulse_strength/4000) + GAS_GARBAGE_COLLECT(air.gases) diff --git a/code/game/turfs/simulated/wall/misc_walls.dm b/code/game/turfs/simulated/wall/misc_walls.dm index 8efac31f65..dfc6972578 100644 --- a/code/game/turfs/simulated/wall/misc_walls.dm +++ b/code/game/turfs/simulated/wall/misc_walls.dm @@ -77,6 +77,14 @@ return ..() +/turf/closed/wall/clockwork/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) + if(heated && the_rcd.canRturf) + return ..() + +/turf/closed/wall/clockwork/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) + if(heated && the_rcd.canRturf) + return ..() + /turf/closed/wall/clockwork/try_destroy(obj/item/I, mob/user, turf/T) if(!heated) return ..() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 3e7968a9d7..9ebe8f3c19 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -134,7 +134,7 @@ if ((!(A) || src != A.loc)) return - if(destination_z && destination_x && destination_y) + if(destination_z && destination_x && destination_y && !(A.pulledby || !A.can_be_z_moved)) var/tx = destination_x var/ty = destination_y var/turf/DT = locate(tx, ty, destination_z) @@ -157,8 +157,10 @@ A.forceMove(DT) if(AM) var/turf/T = get_step(A.loc,turn(A.dir, 180)) + AM.can_be_z_moved = FALSE AM.forceMove(T) A.start_pulling(AM) + AM.can_be_z_moved = TRUE //now we're on the new z_level, proceed the space drifting stoplag()//Let a diagonal move finish, if necessary diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index afe275f9b9..032c5b6511 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -112,6 +112,8 @@ LC.handlecable(C, user) return C.loaded.place_turf(src, user) + if(C.wiring_gui_menu) + C.wiringGuiUpdate(user) C.is_empty(user) /turf/attackby(obj/item/C, mob/user, params) diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm index 1e207909bd..1672310567 100644 --- a/code/modules/admin/antag_panel.dm +++ b/code/modules/admin/antag_panel.dm @@ -80,7 +80,7 @@ GLOBAL_VAR(antag_prototypes) var/list/result = list() if(!current) result += "No body!" - if(current && current.has_trait(TRAIT_MINDSHIELD)) + if(current && HAS_TRAIT(current, TRAIT_MINDSHIELD)) result += "Mindshielded" //Move these to mob if(iscyborg(current)) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 67b33afcc6..e15613c43d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -29,69 +29,62 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that /client/proc/callproc() set category = "Debug" set name = "Advanced ProcCall" - set waitfor = 0 + set waitfor = FALSE if(!check_rights(R_DEBUG)) return var/datum/target = null - var/targetselected = 0 + var/targetselected = FALSE var/returnval = null - switch(alert("Proc owned by something?",,"Yes","No")) - if("Yes") - targetselected = 1 - var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT)) - if (!value["class"] || !value["value"]) - return - target = value["value"] - if("No") - target = null - targetselected = 0 - - var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null - if(!procname) - return - - //hascall() doesn't support proc paths (eg: /proc/gib(), it only supports "gib") - var/testname = procname - if(targetselected) - //Find one of the 3 possible ways they could have written /proc/PROCNAME - if(findtext(procname, "/proc/")) - testname = replacetext(procname, "/proc/", "") - else if(findtext(procname, "/proc")) - testname = replacetext(procname, "/proc", "") - else if(findtext(procname, "proc/")) - testname = replacetext(procname, "proc/", "") - //Clear out any parenthesis if they're a dummy - testname = replacetext(testname, "()", "") - - if(targetselected && !hascall(target,testname)) - to_chat(usr, "Error: callproc(): type [target.type] has no proc named [procname].") - return - else - var/procpath = text2path(procname) - if (!procpath) - to_chat(usr, "Error: callproc(): proc [procname] does not exist. (Did you forget the /proc/ part?)") + if(alert("Proc owned by something?",,"Yes","No") == "Yes") + targetselected = TRUE + var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT)) + if (!value["class"] || !value["value"]) return + target = value["value"] + + var/procpath = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null + if(!procpath) + return + + //strip away everything but the proc name + var/list/proclist = splittext(procpath, "/") + if (!length(proclist)) + return + + var/procname = proclist[proclist.len] + var/proctype = ("verb" in proclist) ? "verb" :"proc" + + if(targetselected) + if(!hascall(target, procname)) + to_chat(usr, "Error: callproc(): type [target.type] has no [proctype] named [procpath].") + return + else + procpath = "/[proctype]/[procname]" + if(!text2path(procpath)) + to_chat(usr, "Error: callproc(): [procpath] does not exist.") + return + var/list/lst = get_callproc_args() if(!lst) return if(targetselected) if(!target) - to_chat(usr, "Error: callproc(): owner of proc no longer exists.") + to_chat(usr, "Error: callproc(): owner of proc no longer exists.") return - var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." + var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no argument"]." log_admin(msg) message_admins(msg) admin_ticket_log(target, msg) - returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc + returnval = WrapAdminProcCall(target, procname, lst) else - //this currently has no hascall protection. wasn't able to get it working. - log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") - message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") - returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc + var/msg = "[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no argument"]." + log_admin(msg) + message_admins(msg) + returnval = WrapAdminProcCall(GLOBAL_PROC, procpath, lst) //calling globals needs full qualified name (e.g /proc/foo) . = get_callproc_returnval(returnval, procname) if(.) to_chat(usr, .) @@ -111,8 +104,8 @@ GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention) GLOBAL_PROTECT(AdminProcCallSpamPrevention) /proc/WrapAdminProcCall(datum/target, procname, list/arguments) - if(target && procname == "Del") - to_chat(usr, "Calling Del() is not allowed") + if(target != GLOBAL_PROC && procname == "Del") + to_chat(usr, "Calling Del() is not allowed") return if(target != GLOBAL_PROC && !target.CanProcCall(procname)) @@ -159,7 +152,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) /client/proc/callproc_datum(datum/A as null|area|mob|obj|turf) set category = "Debug" set name = "Atom ProcCall" - set waitfor = 0 + set waitfor = FALSE if(!check_rights(R_DEBUG)) return @@ -168,7 +161,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!procname) return if(!hascall(A,procname)) - to_chat(usr, "Error: callproc_datum(): type [A.type] has no proc named [procname].") + to_chat(usr, "Error: callproc_datum(): type [A.type] has no proc named [procname].") return var/list/lst = get_callproc_args() if(!lst) @@ -177,8 +170,8 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!A || !IsValidSrc(A)) to_chat(usr, "Error: callproc_datum(): owner of proc no longer exists.") return - log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." + log_admin(msg) message_admins(msg) admin_ticket_log(A, msg) SSblackbox.record_feedback("tally", "admin_verb", 1, "Atom ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -188,8 +181,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(.) to_chat(usr, .) - - /client/proc/get_callproc_args() var/argnum = input("Number of arguments","Number:",0) as num|null if(isnull(argnum)) @@ -213,7 +204,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) . = "" if(islist(returnval)) var/list/returnedlist = returnval - . = "" + . = "" if(returnedlist.len) var/assoc_check = returnedlist[1] if(istext(assoc_check) && (returnedlist[assoc_check] != null)) @@ -227,11 +218,10 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) . += "\n[elem]" else . = "[procname] returned an empty list" - . += "" + . += "" else - . = "[procname] returned: [!isnull(returnval) ? returnval : "null"]" - + . = "[procname] returned: [!isnull(returnval) ? returnval : "null"]" /client/proc/Cell() set category = "Debug" @@ -841,8 +831,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(Rad.anchored) if(!Rad.loaded_tank) var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad) - Plasma.air_contents.assert_gas(/datum/gas/plasma) - Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70 + Plasma.air_contents.gases[/datum/gas/plasma] = 70 Rad.drainratio = 0 Rad.loaded_tank = Plasma Plasma.forceMove(Rad) diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 39aff33953..b19b2a91d8 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -9,10 +9,9 @@ var/list/lines = list("[AREACOORD(target)]: [env.temperature] K ([env.temperature - T0C] C), [env.return_pressure()] kPa[(burning)?(", burning"):(null)]") for(var/id in env_gases) - var/gas = env_gases[id] - var/moles = gas[MOLES] + var/moles = env_gases[id] if (moles >= 0.00001) - lines += "[gas[GAS_META][META_GAS_NAME]]: [moles] mol" + lines += "[GLOB.meta_gas_names[id]]: [moles] mol" to_chat(usr, lines.Join("\n")) /client/proc/air_status(turf/target) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index da1b404ea5..d5acb66fdd 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -25,8 +25,8 @@ cross.icon_state = "kingyellow" font_color = "blue" prayer_type = "CHAPLAIN PRAYER" - if(SSreligion.deity) - deity = SSreligion.deity + if(GLOB.deity) + deity = GLOB.deity else if(iscultist(usr)) cross.icon_state = "tome" font_color = "red" @@ -34,14 +34,14 @@ deity = "Nar'Sie" else if(isliving(usr)) var/mob/living/L = usr - if(L.has_trait(TRAIT_SPIRITUAL)) + if(HAS_TRAIT(L, TRAIT_SPIRITUAL)) cross.icon_state = "holylight" font_color = "blue" prayer_type = "SPIRITUAL PRAYER" - + var/msg_tmp = msg msg = "[icon2html(cross, GLOB.admins)][prayer_type][deity ? " (to [deity])" : ""]: [ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]: [msg]" - + for(var/client/C in GLOB.admins) if(C.prefs.chat_toggles & CHAT_PRAYER) to_chat(C, msg) diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 237d1a6c00..ca491d8cab 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -108,20 +108,7 @@ to_chat(loc, "Combat injection is still recharging.") return var/mob/living/carbon/human/M = loc - M.SetSleeping(0) - M.SetUnconscious(0) - M.SetStun(0) - M.SetKnockdown(0) - M.reagents.add_reagent("inaprovaline", 3) - M.reagents.add_reagent("synaptizine", 10) - M.reagents.add_reagent("stimulants", 10) - M.adjustStaminaLoss(-150) - M.stuttering = 0 - M.updatehealth() - M.update_stamina() - M.resting = 0 - M.lying = 0 - M.update_canmove() + M.do_adrenaline(150, FALSE, 0, 0, TRUE, list("inaprovaline" = 3, "synaptizine" = 10, "omnizine" = 10), "You feel a sudden surge of energy!") combat_cooldown = 0 START_PROCESSING(SSobj, src) diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm index 969590402c..8a3ff2186a 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -272,10 +272,10 @@ /obj/item/organ/heart/gland/electric/Insert(mob/living/carbon/M, special = 0) ..() - owner.add_trait(TRAIT_SHOCKIMMUNE, ORGAN_TRAIT) + ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, ORGAN_TRAIT) /obj/item/organ/heart/gland/electric/Remove(mob/living/carbon/M, special = 0) - owner.remove_trait(TRAIT_SHOCKIMMUNE, ORGAN_TRAIT) + REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, ORGAN_TRAIT) ..() /obj/item/organ/heart/gland/electric/activate() diff --git a/code/modules/antagonists/abductor/machinery/console.dm b/code/modules/antagonists/abductor/machinery/console.dm index a14b667069..52bda50b86 100644 --- a/code/modules/antagonists/abductor/machinery/console.dm +++ b/code/modules/antagonists/abductor/machinery/console.dm @@ -126,8 +126,20 @@ if(vest) vest.flip_mode() -/obj/machinery/abductor/console/proc/SelectDisguise(remote = 0) - var/entry_name = input( "Choose Disguise", "Disguise") as null|anything in disguises +/obj/machinery/abductor/console/proc/SelectDisguise(remote = FALSE) + var/list/disguises2 = list() + for(var/name in disguises) + var/datum/icon_snapshot/snap = disguises[name] + var/image/dummy = image(snap.icon, src, snap.icon_state) + dummy.overlays = snap.overlays + disguises2[name] = dummy + + var/entry_name + if(remote) + entry_name = show_radial_menu(usr, camera.eyeobj, disguises2) + else + entry_name = show_radial_menu(usr, src, disguises2) + var/datum/icon_snapshot/chosen = disguises[entry_name] if(chosen && vest && (remote || in_range(usr,src))) vest.SetDisguise(chosen) diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 7e0ae3c08c..5b0be336ff 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -169,7 +169,7 @@ to_chat(owner.current, "We have reached our capacity for abilities.") return - if(owner.current.has_trait(TRAIT_DEATHCOMA))//To avoid potential exploits by buying new powers while in stasis, which clears your verblist. + if(HAS_TRAIT(owner.current, TRAIT_DEATHCOMA))//To avoid potential exploits by buying new powers while in stasis, which clears your verblist. to_chat(owner.current, "We lack the energy to evolve new abilities right now.") return @@ -239,7 +239,7 @@ if(verbose) to_chat(user, "[target] is not compatible with our biology.") return - if((target.has_trait(TRAIT_NOCLONE)) || (target.has_trait(TRAIT_NOCLONE))) + if((HAS_TRAIT(target, TRAIT_NOCLONE)) || (HAS_TRAIT(target, TRAIT_NOCLONE))) if(verbose) to_chat(user, "DNA of [target] is ruined beyond usability!") return diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index 1d4f15ec9d..c5334265fb 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -68,7 +68,7 @@ if(req_stat < user.stat) to_chat(user, "We are incapacitated.") return 0 - if((user.has_trait(TRAIT_DEATHCOMA)) && (!ignores_fakedeath)) + if((HAS_TRAIT(user, TRAIT_DEATHCOMA)) && (!ignores_fakedeath)) to_chat(user, "We are incapacitated.") return 0 return 1 diff --git a/code/modules/antagonists/changeling/powers/adrenaline.dm b/code/modules/antagonists/changeling/powers/adrenaline.dm index 9dbe706ed2..256d3e89e3 100644 --- a/code/modules/antagonists/changeling/powers/adrenaline.dm +++ b/code/modules/antagonists/changeling/powers/adrenaline.dm @@ -1,8 +1,9 @@ /obj/effect/proc_holder/changeling/adrenaline name = "Adrenaline Sacs" desc = "We evolve additional sacs of adrenaline throughout our body." - helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious. Continued use poisons the body." + helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious. Continued use poisons the body. This ability is loud, and might cause our blood to react violently to heat." chemical_cost = 30 + loudness = 2 dna_cost = 2 req_human = 1 req_stat = UNCONSCIOUS @@ -12,21 +13,5 @@ //Recover from stuns. /obj/effect/proc_holder/changeling/adrenaline/sting_action(mob/living/user) - to_chat(user, "Energy rushes through us.[user.lying ? " We arise." : ""]") - user.SetSleeping(0) - user.SetUnconscious(0) - user.SetStun(0) - user.SetKnockdown(0) - user.reagents.add_reagent("changelingadrenaline", 10) - user.reagents.add_reagent("changelinghaste", 2) //For a really quick burst of speed - user.reagents.add_reagent("inaprovaline", 3) //let's give another chance to dumb fucks who forget to breathe - user.adjustStaminaLoss(-150) - user.stuttering = 0 - user.updatehealth() - user.update_stamina() - user.resting = 0 - user.lying = 0 - user.update_canmove() - - return TRUE - + user.do_adrenaline(0, FALSE, 70, 0, TRUE, list("epinephrine" = 3, "changelingmeth" = 10, "mannitol" = 10, "regen_jelly" = 10, "changelingadrenaline" = 5), "Energy rushes through us.", 0, 0.75, 0) + return TRUE \ No newline at end of file diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index c19eb50e7f..346d948c79 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -33,7 +33,7 @@ RV.action.Grant(user) /obj/effect/proc_holder/changeling/fakedeath/can_sting(mob/living/user) - if(user.has_trait(TRAIT_DEATHCOMA, "changeling")) + if(HAS_TRAIT_FROM(user, TRAIT_DEATHCOMA, "changeling")) to_chat(user, "We are already reviving.") return if(!user.stat) //Confirmation for living changelings if they want to fake their death diff --git a/code/modules/antagonists/changeling/powers/hivemind.dm b/code/modules/antagonists/changeling/powers/hivemind.dm index a33dab31c3..1d7382d947 100644 --- a/code/modules/antagonists/changeling/powers/hivemind.dm +++ b/code/modules/antagonists/changeling/powers/hivemind.dm @@ -10,7 +10,7 @@ action_background_icon_state = "bg_ling" /obj/effect/proc_holder/changeling/hivemind_comms/sting_action(var/mob/living/user) - if (user.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE)) to_chat(user, "The poison in the air hinders our ability to interact with the hivemind.") return var/input = html_decode(stripped_input(usr, "Please choose a message to transmit.", "Changeling Hivemind", "")) @@ -47,7 +47,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank) action_background_icon_state = "bg_ling" /obj/effect/proc_holder/changeling/hivemind_upload/sting_action(var/mob/living/user) - if (user.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE)) to_chat(user, "The poison in the air hinders our ability to interact with the hivemind.") return var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) @@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank) /obj/effect/proc_holder/changeling/hivemind_download/can_sting(mob/living/carbon/user) if(!..()) return - if (user.has_trait(CHANGELING_HIVEMIND_MUTE)) + if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE)) to_chat(user, "The poison in the air hinders our ability to interact with the hivemind.") return var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 3d6c766307..ede3c2fc58 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -344,9 +344,8 @@ if(isitem(target)) var/obj/item/I = target if(!I.anchored) - to_chat(firer, "You pull [I] towards yourself.") - H.throw_mode_on() - I.throw_at(H, 10, 2) + to_chat(firer, "You pull [I] right into your grasp.") + H.put_in_hands(I) //Because throwing it is goofy as fuck and unreliable. If you land the tentacle despite the penalties to accuracy, you should have your reward. . = 1 else if(isliving(target)) diff --git a/code/modules/antagonists/changeling/powers/panacea.dm b/code/modules/antagonists/changeling/powers/panacea.dm index 9f7a36f214..8d571d21e3 100644 --- a/code/modules/antagonists/changeling/powers/panacea.dm +++ b/code/modules/antagonists/changeling/powers/panacea.dm @@ -29,7 +29,7 @@ O.forceMove(get_turf(user)) user.reagents.add_reagent("mutadone", 10) - user.reagents.add_reagent("pen_acid", 20) + user.reagents.add_reagent("pen_jelly", 20) user.reagents.add_reagent("antihol", 10) user.reagents.add_reagent("mannitol", 25) diff --git a/code/modules/antagonists/changeling/powers/revive.dm b/code/modules/antagonists/changeling/powers/revive.dm index 514b7603fd..3404765628 100644 --- a/code/modules/antagonists/changeling/powers/revive.dm +++ b/code/modules/antagonists/changeling/powers/revive.dm @@ -37,7 +37,7 @@ if(!.) return - if(user.has_trait(CHANGELING_DRAIN) || ((user.stat != DEAD) && !(user.has_trait(TRAIT_DEATHCOMA)))) + if(HAS_TRAIT(user, CHANGELING_DRAIN) || ((user.stat != DEAD) && !(HAS_TRAIT(user, TRAIT_DEATHCOMA)))) var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) changeling.purchasedpowers -= src return FALSE diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm index 4e8b8adbd1..baeed8b0b2 100644 --- a/code/modules/antagonists/changeling/powers/strained_muscles.dm +++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm @@ -19,7 +19,7 @@ if(active) to_chat(user, "Our muscles tense and strengthen.") else - user.remove_trait(TRAIT_GOTTAGOFAST, "changeling_muscles") + REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles") to_chat(user, "Our muscles relax.") if(stacks >= 10) to_chat(user, "We collapse in exhaustion.") @@ -32,12 +32,12 @@ /obj/effect/proc_holder/changeling/strained_muscles/proc/muscle_loop(mob/living/carbon/user) while(active) - user.add_trait(TRAIT_GOTTAGOFAST, "changeling_muscles") + ADD_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles") if(user.stat != CONSCIOUS || user.staminaloss >= 90) active = !active to_chat(user, "Our muscles relax without the energy to strengthen them.") user.Knockdown(40) - user.remove_trait(TRAIT_GOTTAGOFAST, "changeling_muscles") + REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles") break stacks++ diff --git a/code/modules/antagonists/changeling/powers/tiny_prick.dm b/code/modules/antagonists/changeling/powers/tiny_prick.dm index c9b48fa6fc..5a701d8a96 100644 --- a/code/modules/antagonists/changeling/powers/tiny_prick.dm +++ b/code/modules/antagonists/changeling/powers/tiny_prick.dm @@ -91,7 +91,7 @@ /obj/effect/proc_holder/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target) if(!..()) return - if((target.has_trait(TRAIT_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) + if((HAS_TRAIT(target, TRAIT_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) to_chat(user, "Our sting appears ineffective against its DNA.") return 0 return 1 @@ -134,7 +134,7 @@ return if(isliving(target)) var/mob/living/L = target - if((L.has_trait(TRAIT_HUSK)) || !L.has_dna()) + if((HAS_TRAIT(L, TRAIT_HUSK)) || !L.has_dna()) to_chat(user, "Our sting appears ineffective against its DNA.") return 0 return 1 diff --git a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm index 51521ada24..9d241148b4 100644 --- a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm +++ b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm @@ -32,7 +32,7 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(src == H.glasses && !up) - if(H.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(H, TRAIT_BLIND)) to_chat(H, "\"You're blind, idiot. Stop embarrassing yourself.\"") return if(blind_cultist(H)) @@ -76,7 +76,7 @@ ..() if(slot != SLOT_GLASSES || up) return - if(user.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(user, TRAIT_BLIND)) to_chat(user, "\"You're blind, idiot. Stop embarrassing yourself.\"" ) return if(blind_cultist(user)) //Cultists instantly go blind @@ -115,11 +115,11 @@ var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses desc = "[glasses_right && !WS.up ? "":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!":"."]
\ You have taken [W.eye_damage_done] eye damage from them.
" - if(L.has_trait(TRAIT_NEARSIGHT)) + if(HAS_TRAIT(L, TRAIT_NEARSIGHT)) desc += "You are nearsighted!
" else if(glasses_right && !WS.up) desc += "You will become nearsighted at [W.nearsight_breakpoint] eye damage.
" - if(L.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(L, TRAIT_BLIND)) desc += "You are blind!" else if(glasses_right && !WS.up) desc += "You will become blind at [W.blind_breakpoint] eye damage." @@ -153,18 +153,18 @@ qdel(src) /datum/status_effect/wraith_spectacles/proc/apply_eye_damage(mob/living/carbon/human/H) - if(H.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(H, TRAIT_BLIND)) return H.adjust_eye_damage(0.5) eye_damage_done += 0.5 if(eye_damage_done >= 20) H.adjust_blurriness(2) if(eye_damage_done >= nearsight_breakpoint) - if(!H.has_trait(TRAIT_NEARSIGHT)) + if(!HAS_TRAIT(H, TRAIT_NEARSIGHT)) to_chat(H, "Your vision doubles, then trembles. Darkness begins to close in. You can't keep this up!") H.become_nearsighted(EYE_DAMAGE) if(eye_damage_done >= blind_breakpoint) - if(!H.has_trait(TRAIT_BLIND)) + if(!HAS_TRAIT(H, TRAIT_BLIND)) to_chat(H, "A piercing white light floods your vision. Suddenly, all goes dark!") H.become_blind(EYE_DAMAGE) diff --git a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm index 8dfadb60bc..df0083e845 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm @@ -110,7 +110,7 @@ if(!(BI.resistance_flags & ON_FIRE)) BI.fire_act() continue - if(is_servant_of_ratvar(L) || (L.has_trait(TRAIT_BLIND)) || L.anti_magic_check(TRUE, TRUE)) + if(is_servant_of_ratvar(L) || (HAS_TRAIT(L, TRAIT_BLIND)) || L.anti_magic_check(TRUE, TRUE)) continue if(L.stat || L.lying) continue diff --git a/code/modules/antagonists/clockcult/clock_structures/reflector.dm b/code/modules/antagonists/clockcult/clock_structures/reflector.dm new file mode 100644 index 0000000000..34ad051d19 --- /dev/null +++ b/code/modules/antagonists/clockcult/clock_structures/reflector.dm @@ -0,0 +1,86 @@ +/obj/structure/destructible/clockwork/reflector + name = "reflector" + desc = "A large lantern-shaped machine made of thin brass. It looks fragile." + clockwork_desc = "A lantern-shaped generator that produces power when near starlight." + icon_state = "reflector" + unanchored_icon = "reflector_unwrenched" + max_integrity = 40 + construction_value = 5 + layer = WALL_OBJ_LAYER + break_message = "The reflectors's fragile shield shatters into pieces!" + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + light_color = "#DAAA18" + var/list/allowed_projectile_typecache = list( + /obj/item/projectile/beam + ) + + var/ini_dir = null + +/obj/structure/destructible/clockwork/reflector/Initialize() + . = ..() + allowed_projectile_typecache = typecacheof(allowed_projectile_typecache) + +/obj/structure/destructible/clockwork/reflector/ComponentInitialize() + . = ..() + AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS ,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation)) + +/obj/structure/destructible/clockwork/reflector/bullet_act(obj/item/projectile/P) + if(!anchored || !allowed_projectile_typecache[P.type] || !(P.dir in GLOB.cardinals)) + return ..() + + if(auto_reflect(P, P.dir, get_turf(P), P.Angle) != -1) + return ..() + + return -1 + +/obj/structure/destructible/clockwork/reflector/proc/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle) + + //Yell at me if this exists already. + + var/real_angle = 0 + + switch(dir) + if(NORTH) + real_angle = 0 + if(EAST) + real_angle = 90 + if(SOUTH) + real_angle = 180 + if(WEST) + real_angle = 270 + + var/incidence = GET_ANGLE_OF_INCIDENCE(real_angle, (P.Angle + 180)) + if(abs(incidence) > 90 && abs(incidence) < 270) + return FALSE + var/new_angle = SIMPLIFY_DEGREES(real_angle + incidence) + P.setAngle(new_angle) + P.ignore_source_check = TRUE + P.range = P.decayedRange + P.decayedRange = max(P.decayedRange--, 0) + return -1 + +/obj/structure/destructible/clockwork/reflector/proc/can_be_rotated(mob/user,rotation_type) + if(anchored) + to_chat(user, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE + + return TRUE + +/obj/structure/destructible/clockwork/reflector/Move() + . = ..() + setDir(ini_dir) + +/obj/structure/destructible/clockwork/reflector/proc/after_rotation(mob/user,rotation_type) + ini_dir = dir + add_fingerprint(user) + + +/obj/structure/destructible/clockwork/reflector/wrench_act(mob/living/user, obj/item/I) + + if(!is_servant_of_ratvar(user)) + return ..() + + anchored = !anchored + to_chat(user, "You [anchored ? "secure" : "unsecure"] \the [src].") + I.play_tool_sound(src) + return TRUE \ No newline at end of file diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index 9451012a04..47cf2abf3f 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -131,7 +131,7 @@ var/mob/living/carbon/human/H = current H.eye_color = initial(H.eye_color) H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - H.remove_trait(CULT_EYES) + REMOVE_TRAIT(H, TRAIT_CULT_EYES, "valid_cultist") H.update_body() H.cut_overlays() H.regenerate_icons() @@ -225,7 +225,7 @@ var/mob/living/carbon/human/H = current H.eye_color = initial(H.eye_color) H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - H.remove_trait(CULT_EYES) + REMOVE_TRAIT(H, TRAIT_CULT_EYES, "valid_cultist") H.cut_overlays() H.regenerate_icons() @@ -301,7 +301,7 @@ var/mob/living/carbon/human/H = cultist H.eye_color = "f00" H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - H.add_trait(CULT_EYES) + ADD_TRAIT(H, TRAIT_CULT_EYES, "valid_cultist") H.update_body() /datum/team/cult/proc/ascend(cultist) @@ -361,6 +361,7 @@ reshape.Shift(EAST, 1) reshape.Crop(7,4,26,31) reshape.Crop(-5,-3,26,30) + return reshape /mob/living/carbon/human/get_sac_image() var/datum/job/sacjob = SSjob.GetJob(mind.assigned_role) @@ -370,6 +371,7 @@ reshape.Shift(EAST, 1) reshape.Crop(7,4,26,31) reshape.Crop(-5,-3,26,30) + return reshape /datum/objective/sacrifice var/sacced = FALSE diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm index 8452f78ed3..761412e9f8 100644 --- a/code/modules/antagonists/cult/cult_comms.dm +++ b/code/modules/antagonists/cult/cult_comms.dm @@ -342,10 +342,7 @@ if(cooldown>world.time) to_chat(owner, "You aren't ready to place another blood mark yet!") return - if(owner.orbiting && owner.orbiting.orbiting) - target = owner.orbiting.orbiting - else - target = get_turf(owner) + target = owner.orbiting?.parent || get_turf(owner) if(!target) return C.cult_team.blood_target = target diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm index 263d4b623e..6bef6fd021 100644 --- a/code/modules/antagonists/cult/cult_items.dm +++ b/code/modules/antagonists/cult/cult_items.dm @@ -990,6 +990,6 @@ continue throw_at(Next, 3, 1, D.thrower) return - throw_at(D.thrower, 7, 1, D.thrower) + throw_at(D.thrower, 7, 1, null) else ..() diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 4be56efd0d..c48257a54e 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -123,7 +123,7 @@ structure_check() searches for nearby cultist structures required for the invoca continue if(ishuman(L)) var/mob/living/carbon/human/H = L - if((H.has_trait(TRAIT_MUTE)) || H.silent) + if((HAS_TRAIT(H, TRAIT_MUTE)) || H.silent) continue if(L.stat) continue @@ -250,14 +250,14 @@ structure_check() searches for nearby cultist structures required for the invoca currentconversionman = convertee conversiontimeout = world.time + (10 SECONDS) convertee.Stun(100) - convertee.add_trait(TRAIT_MUTE, "conversionrune") + ADD_TRAIT(convertee, TRAIT_MUTE, "conversionrune") conversionresult = FALSE while(world.time < conversiontimeout && convertee && !conversionresult) stoplag(1) currentconversionman = null if(!convertee) return FALSE - convertee.remove_trait(TRAIT_MUTE, "conversionrune") + REMOVE_TRAIT(convertee, TRAIT_MUTE, "conversionrune") if(get_turf(convertee) != get_turf(src)) return FALSE if(!conversionresult) diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm index 87925271ec..8d938439de 100644 --- a/code/modules/antagonists/devil/true_devil/_true_devil.dm +++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm @@ -94,7 +94,7 @@ visible_message("[src] easily breaks out of [p_their()] handcuffs!", \ "With just a thought your handcuffs fall off.") -/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(incapacitated()) to_chat(src, "You can't do that right now!") return FALSE diff --git a/code/modules/antagonists/highlander/highlander.dm b/code/modules/antagonists/highlander/highlander.dm index 1fa37f3a51..c0246ba978 100644 --- a/code/modules/antagonists/highlander/highlander.dm +++ b/code/modules/antagonists/highlander/highlander.dm @@ -7,11 +7,11 @@ /datum/antagonist/highlander/apply_innate_effects(mob/living/mob_override) var/mob/living/L = owner.current || mob_override - L.add_trait(TRAIT_NOGUNS, "highlander") + ADD_TRAIT(L, TRAIT_NOGUNS, "highlander") /datum/antagonist/highlander/remove_innate_effects(mob/living/mob_override) var/mob/living/L = owner.current || mob_override - L.remove_trait(TRAIT_NOGUNS, "highlander") + REMOVE_TRAIT(L, TRAIT_NOGUNS, "highlander") /datum/antagonist/highlander/proc/forge_objectives() var/datum/objective/steal/steal_objective = new diff --git a/code/modules/antagonists/overthrow/overthrow_converter.dm b/code/modules/antagonists/overthrow/overthrow_converter.dm index c94a838165..23599bd01b 100644 --- a/code/modules/antagonists/overthrow/overthrow_converter.dm +++ b/code/modules/antagonists/overthrow/overthrow_converter.dm @@ -37,7 +37,7 @@ if(M == user) to_chat(user,"You cannot convert yourself!") return - if(M.has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(M, TRAIT_MINDSHIELD)) to_chat(user, "This mind is too strong to convert, try to remove whatever is protecting it first!") return M.visible_message("[user] is attempting to implant [M].") diff --git a/code/modules/antagonists/revolution/revolution.dm b/code/modules/antagonists/revolution/revolution.dm index 90df57f48b..e10d83ffb7 100644 --- a/code/modules/antagonists/revolution/revolution.dm +++ b/code/modules/antagonists/revolution/revolution.dm @@ -17,7 +17,7 @@ return FALSE if(new_owner.unconvertable) return FALSE - if(new_owner.current && new_owner.current.has_trait(TRAIT_MINDSHIELD)) + if(new_owner.current && HAS_TRAIT(new_owner.current, TRAIT_MINDSHIELD)) return FALSE /datum/antagonist/rev/apply_innate_effects(mob/living/mob_override) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 67527b2e91..1e7a9b7c15 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -27,6 +27,7 @@ var/datum/wires/connected = null var/next_activate = 0 //When we're next allowed to activate - for spam control + var/activate_cooldown = 3 SECONDS /obj/item/assembly/get_part_rating() return 1 @@ -78,7 +79,7 @@ /obj/item/assembly/proc/activate() if(QDELETED(src) || !secured || (next_activate > world.time)) return FALSE - next_activate = world.time + 30 + next_activate = world.time + activate_cooldown return TRUE diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index d40666babb..8ec93f978f 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -1,203 +1,202 @@ -/obj/item/onetankbomb - name = "bomb" - icon = 'icons/obj/tank.dmi' - item_state = "assembly" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - throwforce = 5 - w_class = WEIGHT_CLASS_NORMAL - throw_speed = 2 - throw_range = 4 - flags_1 = CONDUCT_1 - var/status = FALSE //0 - not readied //1 - bomb finished with welder - var/obj/item/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device - var/obj/item/tank/bombtank = null //the second part of the bomb is a plasma tank - -/obj/item/onetankbomb/IsSpecialAssembly() - return TRUE - -/obj/item/onetankbomb/examine(mob/user) - bombtank.examine(user) - -/obj/item/onetankbomb/update_icon() - cut_overlays() - if(bombtank) - icon = bombtank.icon - icon_state = bombtank.icon_state - if(bombassembly) - add_overlay(bombassembly.icon_state) - copy_overlays(bombassembly) - add_overlay("bomb_assembly") - -/obj/item/onetankbomb/wrench_act(mob/living/user, obj/item/I) - to_chat(user, "You disassemble [src]!") - if(bombassembly) - bombassembly.forceMove(drop_location()) - bombassembly.master = null - bombassembly = null - if(bombtank) - bombtank.forceMove(drop_location()) - bombtank.master = null - bombtank = null - qdel(src) - return TRUE - -/obj/item/onetankbomb/welder_act(mob/living/user, obj/item/I) - . = FALSE - if(status) - to_chat(user, "[bombtank] already has a pressure hole!") - return - if(!I.tool_start_check(user, amount=0)) - return - if(I.use_tool(src, user, 0, volume=40)) - status = TRUE - GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]" - message_admins("[ADMIN_LOOKUPFLW(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]") - to_chat(user, "A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.") - add_fingerprint(user) - return TRUE - - -/obj/item/onetankbomb/analyzer_act(mob/living/user, obj/item/I) - bombtank.analyzer_act(user, I) - -/obj/item/onetankbomb/attack_self(mob/user) //pressing the bomb accesses its assembly - bombassembly.attack_self(user, TRUE) - add_fingerprint(user) - return - -/obj/item/onetankbomb/receive_signal() //This is mainly called by the sensor through sense() to the holder, and from the holder to here. - audible_message("[icon2html(src, hearers(src))] *beep* *beep* *beep*") - playsound(src, 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE) - sleep(10) - if(QDELETED(src)) - return - if(status) - bombtank.ignite() //if its not a dud, boom (or not boom if you made shitty mix) the ignite proc is below, in this file - else - bombtank.release() - -//Assembly / attached device memes - -/obj/item/onetankbomb/Crossed(atom/movable/AM as mob|obj) //for mousetraps - . = ..() - if(bombassembly) - bombassembly.Crossed(AM) - -/obj/item/onetankbomb/on_found(mob/finder) //for mousetraps - if(bombassembly) - bombassembly.on_found(finder) - -/obj/item/onetankbomb/attack_hand() //also for mousetraps - . = ..() - if(.) - return - if(bombassembly) - bombassembly.attack_hand() - -/obj/item/onetankbomb/Move() - . = ..() - if(bombassembly) - bombassembly.setDir(dir) - bombassembly.Move() - -/obj/item/onetankbomb/dropped() - . = ..() - if(bombassembly) - bombassembly.dropped() - - - - -// ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ---------- - -//Bomb assembly proc. This turns assembly+tank into a bomb -/obj/item/tank/proc/bomb_assemble(obj/item/assembly_holder/assembly, mob/living/user) - //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it - if(isigniter(assembly.a_left) == isigniter(assembly.a_right)) - return - - if((src in user.get_equipped_items(TRUE)) && !user.canUnEquip(src)) - to_chat(user, "[src] is stuck to you!") - return - - if(!user.canUnEquip(assembly)) - to_chat(user, "[assembly] is stuck to your hand!") - return - - var/obj/item/onetankbomb/bomb = new - user.transferItemToLoc(src, bomb) - user.transferItemToLoc(assembly, bomb) - - bomb.bombassembly = assembly //Tell the bomb about its assembly part - assembly.master = bomb //Tell the assembly about its new owner - - bomb.bombtank = src //Same for tank - master = bomb - - forceMove(bomb) - bomb.update_icon() - - user.put_in_hands(bomb) //Equips the bomb if possible, or puts it on the floor. - to_chat(user, "You attach [assembly] to [src].") - return - -/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode - air_contents.assert_gases(/datum/gas/plasma, /datum/gas/oxygen) - var/fuel_moles = air_contents.gases[/datum/gas/plasma][MOLES] + air_contents.gases[/datum/gas/oxygen][MOLES]/6 - air_contents.garbage_collect() - var/datum/gas_mixture/bomb_mixture = air_contents.copy() - var/strength = 1 - - var/turf/ground_zero = get_turf(loc) - - if(master) - qdel(master) - qdel(src) - - if(bomb_mixture.temperature > (T0C + 400)) - strength = (fuel_moles/15) - - if(strength >=1) - explosion(ground_zero, round(strength,1), round(strength*2,1), round(strength*3,1), round(strength*4,1)) - else if(strength >=0.5) - explosion(ground_zero, 0, 1, 2, 4) - else if(strength >=0.2) - explosion(ground_zero, -1, 0, 1, 2) - else - ground_zero.assume_air(bomb_mixture) - ground_zero.hotspot_expose(1000, 125) - - else if(bomb_mixture.temperature > (T0C + 250)) - strength = (fuel_moles/20) - - if(strength >=1) - explosion(ground_zero, 0, round(strength,1), round(strength*2,1), round(strength*3,1)) - else if (strength >=0.5) - explosion(ground_zero, -1, 0, 1, 2) - else - ground_zero.assume_air(bomb_mixture) - ground_zero.hotspot_expose(1000, 125) - - else if(bomb_mixture.temperature > (T0C + 100)) - strength = (fuel_moles/25) - - if (strength >=1) - explosion(ground_zero, -1, 0, round(strength,1), round(strength*3,1)) - else - ground_zero.assume_air(bomb_mixture) - ground_zero.hotspot_expose(1000, 125) - - else - ground_zero.assume_air(bomb_mixture) - ground_zero.hotspot_expose(1000, 125) - - ground_zero.air_update_turf() - -/obj/item/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out. - var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles()) - var/turf/T = get_turf(src) - if(!T) - return - T.assume_air(removed) - air_update_turf() +/obj/item/onetankbomb + name = "bomb" + icon = 'icons/obj/tank.dmi' + item_state = "assembly" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + throwforce = 5 + w_class = WEIGHT_CLASS_NORMAL + throw_speed = 2 + throw_range = 4 + flags_1 = CONDUCT_1 + var/status = FALSE //0 - not readied //1 - bomb finished with welder + var/obj/item/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device + var/obj/item/tank/bombtank = null //the second part of the bomb is a plasma tank + +/obj/item/onetankbomb/IsSpecialAssembly() + return TRUE + +/obj/item/onetankbomb/examine(mob/user) + bombtank.examine(user) + +/obj/item/onetankbomb/update_icon() + cut_overlays() + if(bombtank) + icon = bombtank.icon + icon_state = bombtank.icon_state + if(bombassembly) + add_overlay(bombassembly.icon_state) + copy_overlays(bombassembly) + add_overlay("bomb_assembly") + +/obj/item/onetankbomb/wrench_act(mob/living/user, obj/item/I) + to_chat(user, "You disassemble [src]!") + if(bombassembly) + bombassembly.forceMove(drop_location()) + bombassembly.master = null + bombassembly = null + if(bombtank) + bombtank.forceMove(drop_location()) + bombtank.master = null + bombtank = null + qdel(src) + return TRUE + +/obj/item/onetankbomb/welder_act(mob/living/user, obj/item/I) + . = FALSE + if(status) + to_chat(user, "[bombtank] already has a pressure hole!") + return + if(!I.tool_start_check(user, amount=0)) + return + if(I.use_tool(src, user, 0, volume=40)) + status = TRUE + GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]" + message_admins("[ADMIN_LOOKUPFLW(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]") + to_chat(user, "A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.") + add_fingerprint(user) + return TRUE + + +/obj/item/onetankbomb/analyzer_act(mob/living/user, obj/item/I) + bombtank.analyzer_act(user, I) + +/obj/item/onetankbomb/attack_self(mob/user) //pressing the bomb accesses its assembly + bombassembly.attack_self(user, TRUE) + add_fingerprint(user) + return + +/obj/item/onetankbomb/receive_signal() //This is mainly called by the sensor through sense() to the holder, and from the holder to here. + audible_message("[icon2html(src, hearers(src))] *beep* *beep* *beep*") + playsound(src, 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE) + sleep(10) + if(QDELETED(src)) + return + if(status) + bombtank.ignite() //if its not a dud, boom (or not boom if you made shitty mix) the ignite proc is below, in this file + else + bombtank.release() + +//Assembly / attached device memes + +/obj/item/onetankbomb/Crossed(atom/movable/AM as mob|obj) //for mousetraps + . = ..() + if(bombassembly) + bombassembly.Crossed(AM) + +/obj/item/onetankbomb/on_found(mob/finder) //for mousetraps + if(bombassembly) + bombassembly.on_found(finder) + +/obj/item/onetankbomb/attack_hand() //also for mousetraps + . = ..() + if(.) + return + if(bombassembly) + bombassembly.attack_hand() + +/obj/item/onetankbomb/Move() + . = ..() + if(bombassembly) + bombassembly.setDir(dir) + bombassembly.Move() + +/obj/item/onetankbomb/dropped() + . = ..() + if(bombassembly) + bombassembly.dropped() + + + + +// ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ---------- + +//Bomb assembly proc. This turns assembly+tank into a bomb +/obj/item/tank/proc/bomb_assemble(obj/item/assembly_holder/assembly, mob/living/user) + //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it + if(isigniter(assembly.a_left) == isigniter(assembly.a_right)) + return + + if((src in user.get_equipped_items(TRUE)) && !user.canUnEquip(src)) + to_chat(user, "[src] is stuck to you!") + return + + if(!user.canUnEquip(assembly)) + to_chat(user, "[assembly] is stuck to your hand!") + return + + var/obj/item/onetankbomb/bomb = new + user.transferItemToLoc(src, bomb) + user.transferItemToLoc(assembly, bomb) + + bomb.bombassembly = assembly //Tell the bomb about its assembly part + assembly.master = bomb //Tell the assembly about its new owner + + bomb.bombtank = src //Same for tank + master = bomb + + forceMove(bomb) + bomb.update_icon() + + user.put_in_hands(bomb) //Equips the bomb if possible, or puts it on the floor. + to_chat(user, "You attach [assembly] to [src].") + return + +/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode + var/fuel_moles = air_contents.gases[/datum/gas/plasma] + air_contents.gases[/datum/gas/oxygen]/6 + GAS_GARBAGE_COLLECT(air_contents.gases) + var/datum/gas_mixture/bomb_mixture = air_contents.copy() + var/strength = 1 + + var/turf/ground_zero = get_turf(loc) + + if(master) + qdel(master) + qdel(src) + + if(bomb_mixture.temperature > (T0C + 400)) + strength = (fuel_moles/15) + + if(strength >=1) + explosion(ground_zero, round(strength,1), round(strength*2,1), round(strength*3,1), round(strength*4,1)) + else if(strength >=0.5) + explosion(ground_zero, 0, 1, 2, 4) + else if(strength >=0.2) + explosion(ground_zero, -1, 0, 1, 2) + else + ground_zero.assume_air(bomb_mixture) + ground_zero.hotspot_expose(1000, 125) + + else if(bomb_mixture.temperature > (T0C + 250)) + strength = (fuel_moles/20) + + if(strength >=1) + explosion(ground_zero, 0, round(strength,1), round(strength*2,1), round(strength*3,1)) + else if (strength >=0.5) + explosion(ground_zero, -1, 0, 1, 2) + else + ground_zero.assume_air(bomb_mixture) + ground_zero.hotspot_expose(1000, 125) + + else if(bomb_mixture.temperature > (T0C + 100)) + strength = (fuel_moles/25) + + if (strength >=1) + explosion(ground_zero, -1, 0, round(strength,1), round(strength*3,1)) + else + ground_zero.assume_air(bomb_mixture) + ground_zero.hotspot_expose(1000, 125) + + else + ground_zero.assume_air(bomb_mixture) + ground_zero.hotspot_expose(1000, 125) + + ground_zero.air_update_turf() + +/obj/item/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out. + var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles()) + var/turf/T = get_turf(src) + if(!T) + return + T.assume_air(removed) + air_update_turf() diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index ad83ed8c13..b1aa63c242 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -43,7 +43,7 @@ holder.update_icon() /obj/item/assembly/flash/proc/clown_check(mob/living/carbon/human/user) - if(user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) flash_carbon(user, user, 15, 0) return FALSE return TRUE diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 58a3a5349a..a2a9fb0105 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -18,7 +18,7 @@ if(!armed) if(ishuman(usr)) var/mob/living/carbon/human/user = usr - if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) to_chat(user, "Your hand slips, setting off the trigger!") pulse(FALSE) update_icon() @@ -38,7 +38,7 @@ var/obj/item/bodypart/affecting = null if(ishuman(target)) var/mob/living/carbon/human/H = target - if(H.has_trait(TRAIT_PIERCEIMMUNE)) + if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE)) playsound(src, 'sound/effects/snap.ogg', 50, TRUE) armed = FALSE update_icon() @@ -70,7 +70,7 @@ if(!armed) to_chat(user, "You arm [src].") else - if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) var/which_hand = BODY_ZONE_PRECISE_L_HAND if(!(user.active_hand_index % 2)) which_hand = BODY_ZONE_PRECISE_R_HAND @@ -87,7 +87,7 @@ //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/assembly/mousetrap/attack_hand(mob/living/carbon/human/user) if(armed) - if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) var/which_hand = BODY_ZONE_PRECISE_L_HAND if(!(user.active_hand_index % 2)) which_hand = BODY_ZONE_PRECISE_R_HAND diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index bf5d8efb13..d1da05e42d 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -14,9 +14,9 @@ if(!air_contents) return 0 - var/oxy = air_contents.gases[/datum/gas/oxygen] ? air_contents.gases[/datum/gas/oxygen][MOLES] : 0 - var/tox = air_contents.gases[/datum/gas/plasma] ? air_contents.gases[/datum/gas/plasma][MOLES] : 0 - var/trit = air_contents.gases[/datum/gas/tritium] ? air_contents.gases[/datum/gas/tritium][MOLES] : 0 + var/oxy = air_contents.gases[/datum/gas/oxygen] + var/tox = air_contents.gases[/datum/gas/plasma] + var/trit = air_contents.gases[/datum/gas/tritium] if(active_hotspot) if(soh) if((tox > 0.5 || trit > 0.5) && oxy > 0.5) @@ -162,7 +162,7 @@ color = list(LERP(0.3, 1, 1-greyscale_fire) * heat_r,0.3 * heat_g * greyscale_fire,0.3 * heat_b * greyscale_fire, 0.59 * heat_r * greyscale_fire,LERP(0.59, 1, 1-greyscale_fire) * heat_g,0.59 * heat_b * greyscale_fire, 0.11 * heat_r * greyscale_fire,0.11 * heat_g * greyscale_fire,LERP(0.11, 1, 1-greyscale_fire) * heat_b, 0,0,0) alpha = heat_a -#define INSUFFICIENT(path) (!location.air.gases[path] || location.air.gases[path][MOLES] < 0.5) +#define INSUFFICIENT(path) (location.air.gases[path] < 0.5) /obj/effect/hotspot/process() if(just_spawned) just_spawned = FALSE @@ -184,7 +184,7 @@ return //Not enough to burn - if(((!location.air.gases[/datum/gas/plasma] || location.air.gases[/datum/gas/plasma][MOLES] < 0.5) && (!location.air.gases[/datum/gas/tritium] || location.air.gases[/datum/gas/tritium][MOLES] < 0.5)) || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5) + if((location.air.gases[/datum/gas/plasma] < 0.5 && location.air.gases[/datum/gas/tritium] < 0.5) || location.air.gases[/datum/gas/oxygen] < 0.5) qdel(src) return diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 45bb47ab58..ea555c9489 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -88,7 +88,7 @@ temperature_archived = temperature /turf/open/archive() - air.archive() + ARCHIVE_TEMPERATURE(air) archived_cycle = SSair.times_fired temperature_archived = temperature @@ -121,10 +121,9 @@ if (nonoverlaying_gases[id]) continue var/gas = gases[id] - var/gas_meta = gas[GAS_META] - var/gas_overlay = gas_meta[META_GAS_OVERLAY] - if(gas_overlay && gas[MOLES] > gas_meta[META_GAS_MOLES_VISIBLE]) - . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas[MOLES] / MOLES_GAS_VISIBLE_STEP, 1))] + var/gas_overlay = GLOB.meta_gas_overlays[id] + if(gas_overlay && gas > GLOB.meta_gas_visibility[id]) + . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas / MOLES_GAS_VISIBLE_STEP, 1))] /proc/typecache_of_gases_with_no_overlays() . = list() @@ -215,7 +214,7 @@ if (planet_atmos) //share our air with the "atmosphere" "above" the turf var/datum/gas_mixture/G = new G.copy_from_turf(src) - G.archive() + ARCHIVE_TEMPERATURE(G) if(our_air.compare(G)) if(!our_excited_group) var/datum/excited_group/EG = new @@ -232,6 +231,11 @@ atmos_cooldown = cached_atmos_cooldown +/turf/open/space/process_cell(fire_count) //dumb hack to prevent space pollution + . = ..() + var/datum/gas_mixture/immutable/I = space_gas + I.after_process_cell() + /turf/proc/process_cell_reaction() SSair.remove_from_react_queue(src) @@ -327,7 +331,7 @@ A.merge(T.air) for(var/id in A_gases) - A_gases[id][MOLES] /= turflen + A_gases[id] /= turflen for(var/t in turf_list) var/turf/open/T = t diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 0304946111..9858db2abb 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -5,82 +5,38 @@ What are the archived variables for? */ #define MINIMUM_HEAT_CAPACITY 0.0003 #define MINIMUM_MOLE_COUNT 0.01 -#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that - once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */ -GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm -GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) - -/proc/init_gaslist_cache() - . = list() - for(var/id in GLOB.meta_gas_info) - var/list/cached_gas = new(3) - - .[id] = cached_gas - - cached_gas[MOLES] = 0 - cached_gas[ARCHIVE] = 0 - cached_gas[GAS_META] = GLOB.meta_gas_info[id] +//Unomos - global list inits for all of the meta gas lists. +//This setup allows procs to only look at one list instead of trying to dig around in lists-within-lists +GLOBAL_LIST_INIT(meta_gas_specific_heats, meta_gas_heat_list()) +GLOBAL_LIST_INIT(meta_gas_names, meta_gas_name_list()) +GLOBAL_LIST_INIT(meta_gas_visibility, meta_gas_visibility_list()) +GLOBAL_LIST_INIT(meta_gas_overlays, meta_gas_overlay_list()) +GLOBAL_LIST_INIT(meta_gas_dangers, meta_gas_danger_list()) +GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list()) +GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list()) /datum/gas_mixture - var/list/gases + var/list/gases = list() var/temperature = 0 //kelvins var/tmp/temperature_archived = 0 var/volume = CELL_VOLUME //liters var/last_share = 0 - var/list/reaction_results + var/list/reaction_results = list() var/list/analyzer_results //used for analyzer feedback - not initialized until its used var/gc_share = FALSE // Whether to call garbage_collect() on the sharer during shares, used for immutable mixtures /datum/gas_mixture/New(volume) - gases = new if (!isnull(volume)) src.volume = volume - reaction_results = new - -//listmos procs -//use the macros in performance intensive areas. for their definitions, refer to code/__DEFINES/atmospherics.dm - - //assert_gas(gas_id) - used to guarantee that the gas list for this id exists in gas_mixture.gases. - //Must be used before adding to a gas. May be used before reading from a gas. -/datum/gas_mixture/proc/assert_gas(gas_id) - ASSERT_GAS(gas_id, src) - - //assert_gases(args) - shorthand for calling ASSERT_GAS() once for each gas type. -/datum/gas_mixture/proc/assert_gases() - for(var/id in args) - ASSERT_GAS(id, src) - - //add_gas(gas_id) - similar to assert_gas(), but does not check for an existing - //gas list for this id. This can clobber existing gases. - //Used instead of assert_gas() when you know the gas does not exist. Faster than assert_gas(). -/datum/gas_mixture/proc/add_gas(gas_id) - ADD_GAS(gas_id, gases) - - //add_gases(args) - shorthand for calling add_gas() once for each gas_type. -/datum/gas_mixture/proc/add_gases() - var/cached_gases = gases - for(var/id in args) - ADD_GAS(id, cached_gases) - - //garbage_collect() - removes any gas list which is empty. - //If called with a list as an argument, only removes gas lists with IDs from that list. - //Must be used after subtracting from a gas. Must be used after assert_gas() - //if assert_gas() was called only to read from the gas. - //By removing empty gases, processing speed is increased. -/datum/gas_mixture/proc/garbage_collect(list/tocheck) - var/list/cached_gases = gases - for(var/id in (tocheck || cached_gases)) - if(QUANTIZE(cached_gases[id][MOLES]) <= 0 && QUANTIZE(cached_gases[id][ARCHIVE]) <= 0) - cached_gases -= id //PV = nRT -/datum/gas_mixture/proc/heat_capacity(data = MOLES) //joules per kelvin +/datum/gas_mixture/proc/heat_capacity() //joules per kelvin var/list/cached_gases = gases + var/list/cached_gasheats = GLOB.meta_gas_specific_heats . = 0 for(var/id in cached_gases) - var/gas_data = cached_gases[id] - . += gas_data[data] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT] + . += cached_gases[id] * cached_gasheats[id] /datum/gas_mixture/turf/heat_capacity() . = ..() @@ -108,10 +64,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) /datum/gas_mixture/proc/thermal_energy() //joules return THERMAL_ENERGY(src) //see code/__DEFINES/atmospherics.dm; use the define in performance critical areas -/datum/gas_mixture/proc/archive() - //Update archived versions of variables - //Returns: 1 in all cases - /datum/gas_mixture/proc/merge(datum/gas_mixture/giver) //Merges all air from giver into self. Deletes giver. //Returns: 1 if we are mutable, 0 otherwise @@ -156,14 +108,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) //Performs various reactions such as combustion or fusion (LOL) //Returns: 1 if any reaction took place; 0 otherwise -/datum/gas_mixture/archive() - var/list/cached_gases = gases - - temperature_archived = temperature - for(var/id in cached_gases) - cached_gases[id][ARCHIVE] = cached_gases[id][MOLES] - - return 1 /datum/gas_mixture/merge(datum/gas_mixture/giver) if(!giver) @@ -181,8 +125,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) var/list/giver_gases = giver.gases //gas transfer for(var/giver_id in giver_gases) - ASSERT_GAS(giver_id, src) - cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES] + cached_gases[giver_id] += giver_gases[giver_id] return 1 @@ -198,10 +141,9 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) removed.temperature = temperature for(var/id in cached_gases) - ADD_GAS(id, removed.gases) - removed_gases[id][MOLES] = QUANTIZE((cached_gases[id][MOLES] / sum) * amount) - cached_gases[id][MOLES] -= removed_gases[id][MOLES] - garbage_collect() + removed_gases[id] = QUANTIZE((cached_gases[id] / sum) * amount) + cached_gases[id] -= removed_gases[id] + GAS_GARBAGE_COLLECT(gases) return removed @@ -216,11 +158,10 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) removed.temperature = temperature for(var/id in cached_gases) - ADD_GAS(id, removed.gases) - removed_gases[id][MOLES] = QUANTIZE(cached_gases[id][MOLES] * ratio) - cached_gases[id][MOLES] -= removed_gases[id][MOLES] + removed_gases[id] = QUANTIZE(cached_gases[id] * ratio) + cached_gases[id] -= removed_gases[id] - garbage_collect() + GAS_GARBAGE_COLLECT(gases) return removed @@ -231,8 +172,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) copy.temperature = temperature for(var/id in cached_gases) - ADD_GAS(id, copy.gases) - copy_gases[id][MOLES] = cached_gases[id][MOLES] + copy_gases[id] = cached_gases[id] return copy @@ -243,8 +183,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) temperature = sample.temperature for(var/id in sample_gases) - ASSERT_GAS(id,src) - cached_gases[id][MOLES] = sample_gases[id][MOLES] + cached_gases[id] = sample_gases[id] //remove all gases not in the sample cached_gases &= sample_gases @@ -272,8 +211,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) var/path = id if(!ispath(path)) path = gas_id2path(path) //a lot of these strings can't have embedded expressions (especially for mappers), so support for IDs needs to stick around - ADD_GAS(path, gases) - gases[path][MOLES] = text2num(gas[id]) + gases[path] = text2num(gas[id]) return 1 /datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4) @@ -296,26 +234,25 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) var/moved_moles = 0 var/abs_moved_moles = 0 + //we're gonna define these vars outside of this for loop because as it turns out, var declaration is pricy + var/delta + var/gas_heat_capacity + //and also cache this shit rq because that results in sanic speed for reasons byond explanation + var/list/cached_gasheats = GLOB.meta_gas_specific_heats //GAS TRANSFER - for(var/id in sharer_gases - cached_gases) // create gases not in our cache - ADD_GAS(id, gases) - for(var/id in cached_gases) // transfer gases - ASSERT_GAS(id, sharer) + for(var/id in cached_gases | sharer_gases) // transfer gases - var/gas = cached_gases[id] - var/sharergas = sharer_gases[id] - - var/delta = QUANTIZE(gas[ARCHIVE] - sharergas[ARCHIVE])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures + delta = QUANTIZE(cached_gases[id] - sharer_gases[id])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) - var/gas_heat_capacity = delta * gas[GAS_META][META_GAS_SPECIFIC_HEAT] + gas_heat_capacity = delta * cached_gasheats[id] if(delta > 0) heat_capacity_self_to_sharer += gas_heat_capacity else heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative. - gas[MOLES] -= delta - sharergas[MOLES] += delta + cached_gases[id] -= delta + sharer_gases[id] += delta moved_moles += delta abs_moved_moles += abs(delta) @@ -338,11 +275,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.1) // <10% change in sharer heat capacity temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT) - if(length(cached_gases ^ sharer_gases)) //if all gases were present in both mixtures, we know that no gases are 0 - garbage_collect(cached_gases - sharer_gases) //any gases the sharer had, we are guaranteed to have. gases that it didn't have we are not. - sharer.garbage_collect(sharer_gases - cached_gases) //the reverse is equally true if (initial(sharer.gc_share)) - sharer.garbage_collect() + GAS_GARBAGE_COLLECT(sharer.gases) if(temperature_delta > MINIMUM_TEMPERATURE_TO_MOVE || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE) var/our_moles TOTAL_MOLES(cached_gases,our_moles) @@ -356,8 +290,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) sharer_temperature = sharer.temperature_archived var/temperature_delta = temperature_archived - sharer_temperature if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER) - var/self_heat_capacity = heat_capacity(ARCHIVE) - sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity(ARCHIVE) + var/self_heat_capacity = heat_capacity() + sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity() if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY)) var/heat = conduction_coefficient*temperature_delta* \ @@ -376,9 +310,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) for(var/id in cached_gases | sample_gases) // compare gases from either mixture var/gas_moles = cached_gases[id] - gas_moles = gas_moles ? gas_moles[MOLES] : 0 var/sample_moles = sample_gases[id] - sample_moles = sample_moles ? sample_moles[MOLES] : 0 var/delta = abs(gas_moles - sample_moles) if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \ delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE) @@ -425,7 +357,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) for(var/id in min_reqs) if (id == "TEMP" || id == "ENER") continue - if(!cached_gases[id] || cached_gases[id][MOLES] < min_reqs[id]) + if(cached_gases[id] < min_reqs[id]) continue reaction_loop //at this point, all minimum requirements for the reaction are satisfied. @@ -449,7 +381,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) if (. & STOP_REACTIONS) break if(.) - garbage_collect() + GAS_GARBAGE_COLLECT(gases) if(temperature < TCMB) //just for safety temperature = TCMB diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index 9dcf8c3145..d628826b01 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -1,33 +1,66 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma)) //the main four gases, which were at one time hardcoded GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/pluoxium, /datum/gas/stimulum, /datum/gas/nitryl))) //unable to react amongst themselves -/proc/meta_gas_list() - . = subtypesof(/datum/gas) - for(var/gas_path in .) - var/list/gas_info = new(7) - var/datum/gas/gas = gas_path - - gas_info[META_GAS_SPECIFIC_HEAT] = initial(gas.specific_heat) - gas_info[META_GAS_NAME] = initial(gas.name) - gas_info[META_GAS_MOLES_VISIBLE] = initial(gas.moles_visible) - if(initial(gas.moles_visible) != null) - gas_info[META_GAS_OVERLAY] = new /list(FACTOR_GAS_VISIBLE_MAX) - for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX) - gas_info[META_GAS_OVERLAY][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX) - gas_info[META_GAS_FUSION_POWER] = initial(gas.fusion_power) - gas_info[META_GAS_DANGER] = initial(gas.dangerous) - gas_info[META_GAS_ID] = initial(gas.id) - .[gas_path] = gas_info - /proc/gas_id2path(id) - var/list/meta_gas = GLOB.meta_gas_info + var/list/meta_gas = GLOB.meta_gas_ids if(id in meta_gas) return id for(var/path in meta_gas) - if(meta_gas[path][META_GAS_ID] == id) + if(meta_gas[path] == id) return path return "" +//Unomos - oh god oh fuck oh shit oh lord have mercy this is messy as fuck oh god +//my addiction to seeing better performance numbers isn't healthy, kids +//you see this shit, children? +//i am not a good idol. don't take after me. +//this is literally worse than my alcohol addiction +/proc/meta_gas_heat_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.specific_heat) + +/proc/meta_gas_name_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.name) + +/proc/meta_gas_visibility_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.moles_visible) + +/proc/meta_gas_overlay_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = 0 //gotta make sure if(GLOB.meta_gas_overlays[gaspath]) doesn't break + if(initial(gas.moles_visible) != null) + .[gas_path] = new /list(FACTOR_GAS_VISIBLE_MAX) + for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX) + .[gas_path][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX) + +/proc/meta_gas_danger_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.dangerous) + +/proc/meta_gas_id_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.id) + +/proc/meta_gas_fusion_list() + . = subtypesof(/datum/gas) + for(var/gas_path in .) + var/datum/gas/gas = gas_path + .[gas_path] = initial(gas.fusion_power) + /*||||||||||||||/----------\||||||||||||||*\ ||||||||||||||||[GAS DATUMS]|||||||||||||||| ||||||||||||||||\__________/|||||||||||||||| diff --git a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm index 08f64b5f4a..53f7ede3e6 100644 --- a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm +++ b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm @@ -7,22 +7,18 @@ /datum/gas_mixture/immutable/New() ..() - garbage_collect() - -/datum/gas_mixture/immutable/garbage_collect() temperature = initial_temperature temperature_archived = initial_temperature gases.Cut() -/datum/gas_mixture/immutable/archive() - return 1 //nothing changes, so we do nothing and the archive is successful - /datum/gas_mixture/immutable/merge() return 0 //we're immutable. /datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4) . = ..(sharer, 0) - garbage_collect() + temperature = initial_temperature + temperature_archived = initial_temperature + gases.Cut() /datum/gas_mixture/immutable/react() return 0 //we're immutable. @@ -43,6 +39,10 @@ . = ..() temperature = initial_temperature +/datum/gas_mixture/immutable/proc/after_process_cell() + temperature = initial_temperature + temperature_archived = initial_temperature + gases.Cut() //used by space tiles /datum/gas_mixture/immutable/space @@ -62,10 +62,13 @@ /datum/gas_mixture/immutable/cloner initial_temperature = T20C -/datum/gas_mixture/immutable/cloner/garbage_collect() +/datum/gas_mixture/immutable/cloner/New() ..() - ADD_GAS(/datum/gas/nitrogen, gases) - gases[/datum/gas/nitrogen][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD + gases[/datum/gas/nitrogen] = MOLES_O2STANDARD + MOLES_N2STANDARD + +/datum/gas_mixture/immutable/cloner/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4) + . = ..(sharer, 0) + gases[/datum/gas/nitrogen] = MOLES_O2STANDARD + MOLES_N2STANDARD /datum/gas_mixture/immutable/cloner/heat_capacity() return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20 diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 84ad1e9258..ef0a422079 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -60,7 +60,7 @@ if(location && location.freon_gas_act()) . = REACTING else if(location && location.water_vapor_gas_act()) - air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_GAS_VISIBLE + air.gases[/datum/gas/water_vapor] -= MOLES_GAS_VISIBLE . = REACTING //tritium combustion: combustion of oxygen and tritium (treated as hydrocarbons). creates hotspots. exothermic @@ -86,21 +86,20 @@ var/turf/open/location = isturf(holder) ? holder : null var/burned_fuel = 0 - if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/tritium][MOLES]) - burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]/TRITIUM_BURN_OXY_FACTOR - cached_gases[/datum/gas/tritium][MOLES] -= burned_fuel + if(cached_gases[/datum/gas/oxygen] < cached_gases[/datum/gas/tritium]) + burned_fuel = cached_gases[/datum/gas/oxygen]/TRITIUM_BURN_OXY_FACTOR + cached_gases[/datum/gas/tritium] -= burned_fuel else - burned_fuel = cached_gases[/datum/gas/tritium][MOLES]*TRITIUM_BURN_TRIT_FACTOR - cached_gases[/datum/gas/tritium][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]/TRITIUM_BURN_TRIT_FACTOR - cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/tritium][MOLES] + burned_fuel = cached_gases[/datum/gas/tritium]*TRITIUM_BURN_TRIT_FACTOR + cached_gases[/datum/gas/tritium] -= cached_gases[/datum/gas/tritium]/TRITIUM_BURN_TRIT_FACTOR + cached_gases[/datum/gas/oxygen] -= cached_gases[/datum/gas/tritium] if(burned_fuel) - energy_released += FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel + energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel) if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR) - ASSERT_GAS(/datum/gas/water_vapor, air) //oxygen+more-or-less hydrogen=H2O - cached_gases[/datum/gas/water_vapor][MOLES] += burned_fuel/TRITIUM_BURN_OXY_FACTOR + cached_gases[/datum/gas/water_vapor] += burned_fuel/TRITIUM_BURN_OXY_FACTOR cached_results["fire"] += burned_fuel @@ -157,23 +156,21 @@ temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE) if(temperature_scale > 0) oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale - if(cached_gases[/datum/gas/oxygen][MOLES] / cached_gases[/datum/gas/plasma][MOLES] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium. + if(cached_gases[/datum/gas/oxygen] / cached_gases[/datum/gas/plasma] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium. super_saturation = TRUE - if(cached_gases[/datum/gas/oxygen][MOLES] > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN) - plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA + if(cached_gases[/datum/gas/oxygen] > cached_gases[/datum/gas/plasma]*PLASMA_OXYGEN_FULLBURN) + plasma_burn_rate = (cached_gases[/datum/gas/plasma]*temperature_scale)/PLASMA_BURN_RATE_DELTA else - plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen][MOLES]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA + plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY) - plasma_burn_rate = min(plasma_burn_rate,cached_gases[/datum/gas/plasma][MOLES],cached_gases[/datum/gas/oxygen][MOLES]/oxygen_burn_rate) //Ensures matter is conserved properly - cached_gases[/datum/gas/plasma][MOLES] = QUANTIZE(cached_gases[/datum/gas/plasma][MOLES] - plasma_burn_rate) - cached_gases[/datum/gas/oxygen][MOLES] = QUANTIZE(cached_gases[/datum/gas/oxygen][MOLES] - (plasma_burn_rate * oxygen_burn_rate)) + plasma_burn_rate = min(plasma_burn_rate,cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/oxygen]/oxygen_burn_rate) //Ensures matter is conserved properly + cached_gases[/datum/gas/plasma] = QUANTIZE(cached_gases[/datum/gas/plasma] - plasma_burn_rate) + cached_gases[/datum/gas/oxygen] = QUANTIZE(cached_gases[/datum/gas/oxygen] - (plasma_burn_rate * oxygen_burn_rate)) if (super_saturation) - ASSERT_GAS(/datum/gas/tritium,air) - cached_gases[/datum/gas/tritium][MOLES] += plasma_burn_rate + cached_gases[/datum/gas/tritium] += plasma_burn_rate else - ASSERT_GAS(/datum/gas/carbon_dioxide,air) - cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate + cached_gases[/datum/gas/carbon_dioxide] += plasma_burn_rate energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate) @@ -231,21 +228,21 @@ var/old_heat_capacity = air.heat_capacity() var/reaction_energy = 0 - var/mediation = FUSION_MEDIATION_FACTOR*(air.heat_capacity()-(cached_gases[/datum/gas/plasma][MOLES]*cached_gases[/datum/gas/plasma][GAS_META][META_GAS_SPECIFIC_HEAT]))/(air.total_moles()-cached_gases[/datum/gas/plasma][MOLES]) //This is the average specific heat of the mixture,not including plasma. + var/mediation = FUSION_MEDIATION_FACTOR*(air.heat_capacity()-(cached_gases[/datum/gas/plasma]*GLOB.meta_gas_specific_heats[/datum/gas/plasma]))/(air.total_moles()-cached_gases[/datum/gas/plasma]) //This is the average specific heat of the mixture,not including plasma. - var/gases_fused = air.total_moles() - cached_gases[/datum/gas/plasma][MOLES] - var/plasma_differential = (cached_gases[/datum/gas/plasma][MOLES] - gases_fused) / air.total_moles() + var/gases_fused = air.total_moles() - cached_gases[/datum/gas/plasma] + var/plasma_differential = (cached_gases[/datum/gas/plasma] - gases_fused) / air.total_moles() var/reaction_efficiency = FUSION_EFFICIENCY_BASE ** -((plasma_differential ** 2) / FUSION_EFFICIENCY_DIVISOR) //https://www.desmos.com/calculator/6jjx3vdrvx var/gas_power = 0 for (var/gas_id in cached_gases) - gas_power += reaction_efficiency * (cached_gases[gas_id][GAS_META][META_GAS_FUSION_POWER]*cached_gases[gas_id][MOLES]) + gas_power += reaction_efficiency * (GLOB.meta_gas_fusions[gas_id]*cached_gases[gas_id]) var/power_ratio = gas_power/mediation cached_scan_results[id] = power_ratio //used for analyzer feedback for (var/gas_id in cached_gases) //and now we fuse - cached_gases[gas_id][MOLES] = 0 + cached_gases[gas_id] = 0 var/radiation_power = (FUSION_RADIATION_FACTOR * power_ratio) / (power_ratio + FUSION_RADIATION_CONSTANT) //https://www.desmos.com/calculator/4i1f296phl var/zap_power = ((FUSION_ZAP_POWER_ASYMPTOTE * power_ratio) / (power_ratio + FUSION_ZAP_POWER_CONSTANT)) + FUSION_ZAP_POWER_BASE //https://www.desmos.com/calculator/n0zkdpxnrr @@ -255,33 +252,30 @@ if (power_ratio > FUSION_SUPER_TIER_THRESHOLD) //power ratio 50+: SUPER TIER. The gases become so energized that they fuse into a ton of tritium, which is pretty nice! Until you consider the fact that everything just exploded, the canister is probably going to break and you're irradiated. reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_SUPER * (power_ratio / FUSION_ENERGY_DIVISOR_SUPER) - cached_gases[/datum/gas/tritium][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_TRITIUM //60% of the gas is converted to energy, 40% to trit + cached_gases[/datum/gas/tritium] += gases_fused * FUSION_GAS_CREATION_FACTOR_TRITIUM //60% of the gas is converted to energy, 40% to trit fusion_prepare_to_die_edition_rng = 100 //Wait a minute.. do_explosion = TRUE zap_range = FUSION_ZAP_RANGE_SUPER else if (power_ratio > FUSION_HIGH_TIER_THRESHOLD) //power ratio 20-50; High tier. The reaction is so energized that it fuses into a small amount of stimulum, and some pluoxium. Very dangerous, but super cool and super useful. reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_HIGH * (power_ratio / FUSION_ENERGY_DIVISOR_HIGH) - air.assert_gases(/datum/gas/stimulum, /datum/gas/pluoxium) - cached_gases[/datum/gas/stimulum][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_STIM //40% of the gas is converted to energy, 60% to stim and pluox - cached_gases[/datum/gas/pluoxium][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_PLUOX + cached_gases[/datum/gas/stimulum] += gases_fused * FUSION_GAS_CREATION_FACTOR_STIM //40% of the gas is converted to energy, 60% to stim and pluox + cached_gases[/datum/gas/pluoxium] += gases_fused * FUSION_GAS_CREATION_FACTOR_PLUOX fusion_prepare_to_die_edition_rng = power_ratio //Now we're getting into dangerous territory do_explosion = TRUE zap_range = FUSION_ZAP_RANGE_HIGH else if (power_ratio > FUSION_MID_TIER_THRESHOLD) //power_ratio 5 to 20; Mediation is overpowered, fusion reaction starts to break down. reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_MID * (power_ratio / FUSION_ENERGY_DIVISOR_MID) - air.assert_gases(/datum/gas/nitryl,/datum/gas/nitrous_oxide) - cached_gases[/datum/gas/nitryl][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_NITRYL //20% of the gas is converted to energy, 80% to nitryl and N2O - cached_gases[/datum/gas/nitrous_oxide][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_N2O + cached_gases[/datum/gas/nitryl] += gases_fused * FUSION_GAS_CREATION_FACTOR_NITRYL //20% of the gas is converted to energy, 80% to nitryl and N2O + cached_gases[/datum/gas/nitrous_oxide] += gases_fused * FUSION_GAS_CREATION_FACTOR_N2O fusion_prepare_to_die_edition_rng = power_ratio * FUSION_MID_TIER_RAD_PROB_FACTOR //Still unlikely, but don't stand next to the reaction unprotected zap_range = FUSION_ZAP_RANGE_MID else //power ratio 0 to 5; Gas power is overpowered. Fusion isn't nearly as powerful. reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_LOW * (power_ratio / FUSION_ENERGY_DIVISOR_LOW) - air.assert_gases(/datum/gas/bz, /datum/gas/carbon_dioxide) - cached_gases[/datum/gas/bz][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_BZ //10% of the gas is converted to energy, 90% to BZ and CO2 - cached_gases[/datum/gas/carbon_dioxide][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_CO2 + cached_gases[/datum/gas/bz] += gases_fused * FUSION_GAS_CREATION_FACTOR_BZ //10% of the gas is converted to energy, 90% to BZ and CO2 + cached_gases[/datum/gas/carbon_dioxide] += gases_fused * FUSION_GAS_CREATION_FACTOR_CO2 fusion_prepare_to_die_edition_rng = power_ratio * FUSION_LOW_TIER_RAD_PROB_FACTOR //Low, but still something to look out for zap_range = FUSION_ZAP_RANGE_LOW @@ -291,6 +285,7 @@ if(do_explosion) explosion(location, 0, 0, 5, power_ratio, TRUE, TRUE) //large shockwave, the actual radius is quite small - people will recognize that you're doing fusion radiation_pulse(location, radiation_power) //You mean causing a super-tier fusion reaction in the halls is a bad idea? + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, 30000)//The science is cool though. playsound(location, 'sound/effects/supermatter.ogg', 100, 0) else playsound(location, 'sound/effects/phasein.ogg', 75, 0) @@ -322,14 +317,13 @@ var/temperature = air.temperature var/old_heat_capacity = air.heat_capacity() - var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),cached_gases[/datum/gas/oxygen][MOLES],cached_gases[/datum/gas/nitrogen][MOLES]) + var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),cached_gases[/datum/gas/oxygen],cached_gases[/datum/gas/nitrogen]) var/energy_used = heat_efficency*NITRYL_FORMATION_ENERGY - ASSERT_GAS(/datum/gas/nitryl,air) - if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0 )|| (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/oxygen] - heat_efficency < 0 )|| (cached_gases[/datum/gas/nitrogen] - heat_efficency < 0)) //Shouldn't produce gas from nothing. return NO_REACTION - cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency - cached_gases[/datum/gas/nitrogen][MOLES] -= heat_efficency - cached_gases[/datum/gas/nitryl][MOLES] += heat_efficency*2 + cached_gases[/datum/gas/oxygen] -= heat_efficency + cached_gases[/datum/gas/nitrogen] -= heat_efficency + cached_gases[/datum/gas/nitryl] += heat_efficency*2 if(energy_used > 0) var/new_heat_capacity = air.heat_capacity() @@ -355,15 +349,22 @@ var/pressure = air.return_pressure() var/old_heat_capacity = air.heat_capacity() - var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/nitrous_oxide][MOLES],1))),cached_gases[/datum/gas/nitrous_oxide][MOLES],cached_gases[/datum/gas/plasma][MOLES]/2) + var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2) var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED - if ((cached_gases[/datum/gas/nitrous_oxide][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing. + if(cached_gases[/datum/gas/miasma] && cached_gases[/datum/gas/miasma] > 0) + energy_released /= cached_gases[/datum/gas/miasma]*0.1 + if(cached_gases[/datum/gas/bz] && cached_gases[/datum/gas/bz] > 0) + energy_released *= cached_gases[/datum/gas/bz]*0.1 + if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing. return NO_REACTION - ASSERT_GAS(/datum/gas/bz,air) - cached_gases[/datum/gas/bz][MOLES] += reaction_efficency - cached_gases[/datum/gas/nitrous_oxide][MOLES] -= reaction_efficency - cached_gases[/datum/gas/plasma][MOLES] -= 2*reaction_efficency + cached_gases[/datum/gas/bz] += reaction_efficency + if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide]) + cached_gases[/datum/gas/bz] -= min(pressure,1) + cached_gases[/datum/gas/oxygen] += min(pressure,1) + cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency + cached_gases[/datum/gas/plasma] -= 2*reaction_efficency + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (reaction_efficency**0.5)*BZ_RESEARCH_AMOUNT) if(energy_released > 0) var/new_heat_capacity = air.heat_capacity() @@ -388,17 +389,17 @@ var/list/cached_gases = air.gases var/old_heat_capacity = air.heat_capacity() - var/heat_scale = min(air.temperature/STIMULUM_HEAT_SCALE,cached_gases[/datum/gas/tritium][MOLES],cached_gases[/datum/gas/plasma][MOLES],cached_gases[/datum/gas/nitryl][MOLES]) + var/heat_scale = min(air.temperature/STIMULUM_HEAT_SCALE,cached_gases[/datum/gas/tritium],cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/nitryl]) var/stim_energy_change = heat_scale + STIMULUM_FIRST_RISE*(heat_scale**2) - STIMULUM_FIRST_DROP*(heat_scale**3) + STIMULUM_SECOND_RISE*(heat_scale**4) - STIMULUM_ABSOLUTE_DROP*(heat_scale**5) - ASSERT_GAS(/datum/gas/stimulum,air) - if ((cached_gases[/datum/gas/tritium][MOLES] - heat_scale < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - heat_scale < 0) || (cached_gases[/datum/gas/nitryl][MOLES] - heat_scale < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/tritium] - heat_scale < 0 )|| (cached_gases[/datum/gas/plasma] - heat_scale < 0) || (cached_gases[/datum/gas/nitryl] - heat_scale < 0)) //Shouldn't produce gas from nothing. return NO_REACTION - cached_gases[/datum/gas/stimulum][MOLES]+= heat_scale/10 - cached_gases[/datum/gas/tritium][MOLES] -= heat_scale - cached_gases[/datum/gas/plasma][MOLES] -= heat_scale - cached_gases[/datum/gas/nitryl][MOLES] -= heat_scale + cached_gases[/datum/gas/stimulum]+= heat_scale/10 + cached_gases[/datum/gas/tritium] -= heat_scale + cached_gases[/datum/gas/plasma] -= heat_scale + cached_gases[/datum/gas/nitryl] -= heat_scale + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, STIMULUM_RESEARCH_AMOUNT*max(stim_energy_change,0)) if(stim_energy_change) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) @@ -418,16 +419,16 @@ /datum/gas_reaction/nobliumformation/react(datum/gas_mixture/air) var/list/cached_gases = air.gases - air.assert_gases(/datum/gas/hypernoblium,/datum/gas/bz) var/old_heat_capacity = air.heat_capacity() - var/nob_formed = min((cached_gases[/datum/gas/nitrogen][MOLES]+cached_gases[/datum/gas/tritium][MOLES])/100,cached_gases[/datum/gas/tritium][MOLES]/10,cached_gases[/datum/gas/nitrogen][MOLES]/20) - var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz][MOLES],1))) - if ((cached_gases[/datum/gas/tritium][MOLES] - 10*nob_formed < 0) || (cached_gases[/datum/gas/nitrogen][MOLES] - 20*nob_formed < 0)) + var/nob_formed = min((cached_gases[/datum/gas/nitrogen]+cached_gases[/datum/gas/tritium])/100,cached_gases[/datum/gas/tritium]/10,cached_gases[/datum/gas/nitrogen]/20) + var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz],1))) + if ((cached_gases[/datum/gas/tritium] - 10*nob_formed < 0) || (cached_gases[/datum/gas/nitrogen] - 20*nob_formed < 0)) return NO_REACTION - cached_gases[/datum/gas/tritium][MOLES] -= 10*nob_formed - cached_gases[/datum/gas/nitrogen][MOLES] -= 20*nob_formed - cached_gases[/datum/gas/hypernoblium][MOLES]+= nob_formed + cached_gases[/datum/gas/tritium] -= 10*nob_formed + cached_gases[/datum/gas/nitrogen] -= 20*nob_formed + cached_gases[/datum/gas/hypernoblium]+= nob_formed + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, nob_formed*NOBLIUM_RESEARCH_AMOUNT) if (nob_formed) var/new_heat_capacity = air.heat_capacity() @@ -449,14 +450,14 @@ /datum/gas_reaction/miaster/react(datum/gas_mixture/air, datum/holder) var/list/cached_gases = air.gases // As the name says it, it needs to be dry - if(cached_gases[/datum/gas/water_vapor] && cached_gases[/datum/gas/water_vapor][MOLES]/air.total_moles() > 0.1) + if(cached_gases[/datum/gas/water_vapor] && cached_gases[/datum/gas/water_vapor]/air.total_moles() > 0.1) return //Replace miasma with oxygen - var/cleaned_air = min(cached_gases[/datum/gas/miasma][MOLES], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20) - cached_gases[/datum/gas/miasma][MOLES] -= cleaned_air - ASSERT_GAS(/datum/gas/oxygen,air) - cached_gases[/datum/gas/oxygen][MOLES] += cleaned_air + var/cleaned_air = min(cached_gases[/datum/gas/miasma], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20) + cached_gases[/datum/gas/miasma] -= cleaned_air + cached_gases[/datum/gas/oxygen] += cleaned_air //Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable air.temperature += cleaned_air * 0.002 + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 0a7b76cc79..6ea571935b 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -1,880 +1,880 @@ -/datum/tlv - var/min2 - var/min1 - var/max1 - var/max2 - -/datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num) - if(min2) src.min2 = min2 - if(min1) src.min1 = min1 - if(max1) src.max1 = max1 - if(max2) src.max2 = max2 - -/datum/tlv/proc/get_danger_level(val as num) - if(max2 != -1 && val >= max2) - return 2 - if(min2 != -1 && val <= min2) - return 2 - if(max1 != -1 && val >= max1) - return 1 - if(min1 != -1 && val <= min1) - return 1 - return 0 - -/datum/tlv/no_checks - min2 = -1 - min1 = -1 - max1 = -1 - max2 = -1 - -/datum/tlv/dangerous - min2 = -1 - min1 = -1 - max1 = 0.2 - max2 = 0.5 - -/obj/item/electronics/airalarm - name = "air alarm electronics" - icon_state = "airalarm_electronics" - -/obj/item/wallframe/airalarm - name = "air alarm frame" - desc = "Used for building Air Alarms." - icon = 'icons/obj/monitors.dmi' - icon_state = "alarm_bitem" - result_path = /obj/machinery/airalarm - -#define AALARM_MODE_SCRUBBING 1 -#define AALARM_MODE_VENTING 2 //makes draught -#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet) -#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing -#define AALARM_MODE_OFF 5 -#define AALARM_MODE_FLOOD 6 //Emagged mode; turns off scrubbers and pressure checks on vents -#define AALARM_MODE_SIPHON 7 //Scrubbers suck air -#define AALARM_MODE_CONTAMINATED 8 //Turns on all filtering and widenet scrubbing. -#define AALARM_MODE_REFILL 9 //just like normal, but with triple the air output - -#define AALARM_REPORT_TIMEOUT 100 - -#define AALARM_OVERLAY_OFF "alarm_off" -#define AALARM_OVERLAY_GREEN "alarm_green" -#define AALARM_OVERLAY_WARN "alarm_amber" -#define AALARM_OVERLAY_DANGER "alarm_red" - -/obj/machinery/airalarm - name = "air alarm" - desc = "A machine that monitors atmosphere levels. Goes off if the area is dangerous." - icon = 'icons/obj/monitors.dmi' - icon_state = "alarm0" - use_power = IDLE_POWER_USE - idle_power_usage = 4 - active_power_usage = 8 - power_channel = ENVIRON - req_access = list(ACCESS_ATMOSPHERICS) - max_integrity = 250 - integrity_failure = 80 - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) - resistance_flags = FIRE_PROOF - - var/danger_level = 0 - var/mode = AALARM_MODE_SCRUBBING - - var/locked = TRUE - var/aidisabled = 0 - var/shorted = 0 - var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone - var/brightness_on = 1 - - var/frequency = FREQ_ATMOS_CONTROL - var/alarm_frequency = FREQ_ATMOS_ALARMS - var/datum/radio_frequency/radio_connection - - var/list/TLV = list( // Breathable air. - "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa - "temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), - /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa - /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), - /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), - /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), - /datum/gas/plasma = new/datum/tlv/dangerous, - /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, - /datum/gas/bz = new/datum/tlv/dangerous, - /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic - /datum/gas/water_vapor = new/datum/tlv/dangerous, - /datum/gas/tritium = new/datum/tlv/dangerous, - /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects - /datum/gas/nitryl = new/datum/tlv/dangerous, - /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires - ) - -/obj/machinery/airalarm/server // No checks here. - TLV = list( - "pressure" = new/datum/tlv/no_checks, - "temperature" = new/datum/tlv/no_checks, - /datum/gas/oxygen = new/datum/tlv/no_checks, - /datum/gas/nitrogen = new/datum/tlv/no_checks, - /datum/gas/carbon_dioxide = new/datum/tlv/no_checks, - /datum/gas/miasma = new/datum/tlv/no_checks, - /datum/gas/plasma = new/datum/tlv/no_checks, - /datum/gas/nitrous_oxide = new/datum/tlv/no_checks, - /datum/gas/bz = new/datum/tlv/no_checks, - /datum/gas/hypernoblium = new/datum/tlv/no_checks, - /datum/gas/water_vapor = new/datum/tlv/no_checks, - /datum/gas/tritium = new/datum/tlv/no_checks, - /datum/gas/stimulum = new/datum/tlv/no_checks, - /datum/gas/nitryl = new/datum/tlv/no_checks, - /datum/gas/pluoxium = new/datum/tlv/no_checks - ) - -/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures. - TLV = list( - "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa - "temperature" = new/datum/tlv(T0C-73.15, T0C-63.15, T0C, T0C+10), - /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa - /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), - /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), - /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), - /datum/gas/plasma = new/datum/tlv/dangerous, - /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, - /datum/gas/bz = new/datum/tlv/dangerous, - /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic - /datum/gas/water_vapor = new/datum/tlv/dangerous, - /datum/gas/tritium = new/datum/tlv/dangerous, - /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects - /datum/gas/nitryl = new/datum/tlv/dangerous, - /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires - ) - -/obj/machinery/airalarm/unlocked - locked = FALSE - -/obj/machinery/airalarm/engine - name = "engine air alarm" - locked = FALSE - req_access = null - req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_ENGINE) - -/obj/machinery/airalarm/mixingchamber - name = "chamber air alarm" - locked = FALSE - req_access = null - req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_TOX, ACCESS_TOX_STORAGE) - -/obj/machinery/airalarm/all_access - name = "all-access air alarm" - desc = "This particular atmos control unit appears to have no access restrictions." - locked = FALSE - req_access = null - req_one_access = null - -/obj/machinery/airalarm/syndicate //general syndicate access - req_access = list(ACCESS_SYNDICATE) - -/obj/machinery/airalarm/directional/north //Pixel offsets get overwritten on New() - dir = SOUTH - pixel_y = 24 - -/obj/machinery/airalarm/directional/south - dir = NORTH - pixel_y = -24 - -/obj/machinery/airalarm/directional/east - dir = WEST - pixel_x = 24 - -/obj/machinery/airalarm/directional/west - dir = EAST - pixel_x = -24 - -//all air alarms in area are connected via magic -/area - var/list/air_vent_names = list() - var/list/air_scrub_names = list() - var/list/air_vent_info = list() - var/list/air_scrub_info = list() - -/obj/machinery/airalarm/Initialize(mapload, ndir, nbuild) - . = ..() - wires = new /datum/wires/airalarm(src) - - if(ndir) - setDir(ndir) - - if(nbuild) - buildstage = 0 - panel_open = TRUE - pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) - pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 - - if(name == initial(name)) - name = "[get_area_name(src)] Air Alarm" - - power_change() - set_frequency(frequency) - -/obj/machinery/airalarm/Destroy() - SSradio.remove_object(src, frequency) - qdel(wires) - wires = null - return ..() - -/obj/machinery/airalarm/examine(mob/user) - . = ..() - switch(buildstage) - if(0) - to_chat(user, "It is missing air alarm electronics.") - if(1) - to_chat(user, "It is missing wiring.") - if(2) - to_chat(user, "Alt-click to [locked ? "unlock" : "lock"] the interface.") - -/obj/machinery/airalarm/ui_status(mob/user) - if(user.has_unlimited_silicon_privilege && aidisabled) - to_chat(user, "AI control has been disabled.") - else if(!shorted) - return ..() - return UI_CLOSE - -/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "airalarm", name, 440, 650, master_ui, state) - ui.open() - -/obj/machinery/airalarm/ui_data(mob/user) - var/data = list( - "locked" = locked, - "siliconUser" = user.has_unlimited_silicon_privilege, - "emagged" = (obj_flags & EMAGGED ? 1 : 0), - "danger_level" = danger_level, - ) - - var/area/A = get_area(src) - data["atmos_alarm"] = A.atmosalm - data["fire_alarm"] = A.fire - - var/turf/T = get_turf(src) - var/datum/gas_mixture/environment = T.return_air() - var/datum/tlv/cur_tlv - - data["environment_data"] = list() - var/pressure = environment.return_pressure() - cur_tlv = TLV["pressure"] - data["environment_data"] += list(list( - "name" = "Pressure", - "value" = pressure, - "unit" = "kPa", - "danger_level" = cur_tlv.get_danger_level(pressure) - )) - var/temperature = environment.temperature - cur_tlv = TLV["temperature"] - data["environment_data"] += list(list( - "name" = "Temperature", - "value" = temperature, - "unit" = "K ([round(temperature - T0C, 0.1)]C)", - "danger_level" = cur_tlv.get_danger_level(temperature) - )) - var/total_moles = environment.total_moles() - var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume - for(var/gas_id in environment.gases) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - cur_tlv = TLV[gas_id] - data["environment_data"] += list(list( - "name" = environment.gases[gas_id][GAS_META][META_GAS_NAME], - "value" = environment.gases[gas_id][MOLES] / total_moles * 100, - "unit" = "%", - "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id][MOLES] * partial_pressure) - )) - - if(!locked || user.has_unlimited_silicon_privilege) - data["vents"] = list() - for(var/id_tag in A.air_vent_names) - var/long_name = A.air_vent_names[id_tag] - var/list/info = A.air_vent_info[id_tag] - if(!info || info["frequency"] != frequency) - continue - data["vents"] += list(list( - "id_tag" = id_tag, - "long_name" = sanitize(long_name), - "power" = info["power"], - "checks" = info["checks"], - "excheck" = info["checks"]&1, - "incheck" = info["checks"]&2, - "direction" = info["direction"], - "external" = info["external"], - "internal" = info["internal"], - "extdefault"= (info["external"] == ONE_ATMOSPHERE), - "intdefault"= (info["internal"] == 0) - )) - data["scrubbers"] = list() - for(var/id_tag in A.air_scrub_names) - var/long_name = A.air_scrub_names[id_tag] - var/list/info = A.air_scrub_info[id_tag] - if(!info || info["frequency"] != frequency) - continue - data["scrubbers"] += list(list( - "id_tag" = id_tag, - "long_name" = sanitize(long_name), - "power" = info["power"], - "scrubbing" = info["scrubbing"], - "widenet" = info["widenet"], - "filter_types" = info["filter_types"] - )) - data["mode"] = mode - data["modes"] = list() - data["modes"] += list(list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)) - data["modes"] += list(list("name" = "Contaminated - Scrubs out ALL contaminants quickly","mode" = AALARM_MODE_CONTAMINATED, "selected" = mode == AALARM_MODE_CONTAMINATED, "danger" = 0)) - data["modes"] += list(list("name" = "Draught - Siphons out air while replacing", "mode" = AALARM_MODE_VENTING, "selected" = mode == AALARM_MODE_VENTING, "danger" = 0)) - data["modes"] += list(list("name" = "Refill - Triple vent output", "mode" = AALARM_MODE_REFILL, "selected" = mode == AALARM_MODE_REFILL, "danger" = 1)) - data["modes"] += list(list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 1)) - data["modes"] += list(list("name" = "Siphon - Siphons air out of the room", "mode" = AALARM_MODE_SIPHON, "selected" = mode == AALARM_MODE_SIPHON, "danger" = 1)) - data["modes"] += list(list("name" = "Panic Siphon - Siphons air out of the room quickly","mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)) - data["modes"] += list(list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)) - if(obj_flags & EMAGGED) - data["modes"] += list(list("name" = "Flood - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FLOOD, "selected" = mode == AALARM_MODE_FLOOD, "danger" = 1)) - - var/datum/tlv/selected - var/list/thresholds = list() - - selected = TLV["pressure"] - thresholds += list(list("name" = "Pressure", "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2)) - - selected = TLV["temperature"] - thresholds += list(list("name" = "Temperature", "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2)) - - for(var/gas_id in GLOB.meta_gas_info) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - selected = TLV[gas_id] - thresholds += list(list("name" = GLOB.meta_gas_info[gas_id][META_GAS_NAME], "settings" = list())) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1)) - thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max2", "selected" = selected.max2)) - - data["thresholds"] = thresholds - return data - -/obj/machinery/airalarm/ui_act(action, params) - if(..() || buildstage != 2) - return - if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) - return - var/device_id = params["id_tag"] - switch(action) - if("lock") - if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN)) - locked = !locked - . = TRUE - if("power", "toggle_filter", "widenet", "scrubbing") - send_signal(device_id, list("[action]" = params["val"]), usr) - . = TRUE - if("excheck") - send_signal(device_id, list("checks" = text2num(params["val"])^1), usr) - . = TRUE - if("incheck") - send_signal(device_id, list("checks" = text2num(params["val"])^2), usr) - . = TRUE - if("set_external_pressure", "set_internal_pressure") - var/area/A = get_area(src) - var/target = input("New target pressure:", name, A.air_vent_info[device_id][(action == "set_external_pressure" ? "external" : "internal")]) as num|null - if(!isnull(target) && !..()) - send_signal(device_id, list("[action]" = target), usr) - . = TRUE - if("reset_external_pressure") - send_signal(device_id, list("reset_external_pressure"), usr) - . = TRUE - if("reset_internal_pressure") - send_signal(device_id, list("reset_internal_pressure"), usr) - . = TRUE - if("threshold") - var/env = params["env"] - if(text2path(env)) - env = text2path(env) - - var/name = params["var"] - var/datum/tlv/tlv = TLV[env] - if(isnull(tlv)) - return - var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null - if(!isnull(value) && !..()) - if(value < 0) - tlv.vars[name] = -1 - else - tlv.vars[name] = round(value, 0.01) - investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS) - . = TRUE - if("mode") - mode = text2num(params["mode"]) - investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS) - apply_mode() - . = TRUE - if("alarm") - var/area/A = get_area(src) - if(A.atmosalert(2, src)) - post_alert(2) - . = TRUE - if("reset") - var/area/A = get_area(src) - if(A.atmosalert(0, src)) - post_alert(0) - . = TRUE - update_icon() - -/obj/machinery/airalarm/proc/reset(wire) - switch(wire) - if(WIRE_POWER) - if(!wires.is_cut(WIRE_POWER)) - shorted = FALSE - update_icon() - if(WIRE_AI) - if(!wires.is_cut(WIRE_AI)) - aidisabled = FALSE - - -/obj/machinery/airalarm/proc/shock(mob/user, prb) - if((stat & (NOPOWER))) // unpowered, no shock - return 0 - if(!prob(prb)) - return 0 //you lucked out, no shock for you - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() //sparks always. - if (electrocute_mob(user, get_area(src), src, 1, TRUE)) - return 1 - else - return 0 - -/obj/machinery/airalarm/proc/refresh_all() - var/area/A = get_area(src) - for(var/id_tag in A.air_vent_names) - var/list/I = A.air_vent_info[id_tag] - if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) - continue - send_signal(id_tag, list("status")) - for(var/id_tag in A.air_scrub_names) - var/list/I = A.air_scrub_info[id_tag] - if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) - continue - send_signal(id_tag, list("status")) - -/obj/machinery/airalarm/proc/set_frequency(new_frequency) - SSradio.remove_object(src, frequency) - frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM) - -/obj/machinery/airalarm/proc/send_signal(target, list/command, mob/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise - if(!radio_connection) - return 0 - - var/datum/signal/signal = new(command) - signal.data["tag"] = target - signal.data["sigtype"] = "command" - signal.data["user"] = user - radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM) - - return 1 - -/obj/machinery/airalarm/proc/get_mode_name(mode_value) - switch(mode_value) - if(AALARM_MODE_SCRUBBING) - return "Filtering" - if(AALARM_MODE_CONTAMINATED) - return "Contaminated" - if(AALARM_MODE_VENTING) - return "Draught" - if(AALARM_MODE_REFILL) - return "Refill" - if(AALARM_MODE_PANIC) - return "Panic Siphon" - if(AALARM_MODE_REPLACEMENT) - return "Cycle" - if(AALARM_MODE_SIPHON) - return "Siphon" - if(AALARM_MODE_OFF) - return "Off" - if(AALARM_MODE_FLOOD) - return "Flood" - -/obj/machinery/airalarm/proc/apply_mode() - var/area/A = get_area(src) - switch(mode) - if(AALARM_MODE_SCRUBBING) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), - "scrubbing" = 1, - "widenet" = 0, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE - )) - if(AALARM_MODE_CONTAMINATED) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list( - /datum/gas/carbon_dioxide, - /datum/gas/miasma, - /datum/gas/plasma, - /datum/gas/water_vapor, - /datum/gas/hypernoblium, - /datum/gas/nitrous_oxide, - /datum/gas/nitryl, - /datum/gas/tritium, - /datum/gas/bz, - /datum/gas/stimulum, - /datum/gas/pluoxium - ), - "scrubbing" = 1, - "widenet" = 1, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE - )) - if(AALARM_MODE_VENTING) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 0, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE*2 - )) - if(AALARM_MODE_REFILL) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), - "scrubbing" = 1, - "widenet" = 0, - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 1, - "set_external_pressure" = ONE_ATMOSPHERE * 3 - )) - if(AALARM_MODE_PANIC, - AALARM_MODE_REPLACEMENT) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 1, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - if(AALARM_MODE_SIPHON) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 1, - "widenet" = 0, - "scrubbing" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - - if(AALARM_MODE_OFF) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 0 - )) - if(AALARM_MODE_FLOOD) - for(var/device_id in A.air_scrub_names) - send_signal(device_id, list( - "power" = 0 - )) - for(var/device_id in A.air_vent_names) - send_signal(device_id, list( - "power" = 1, - "checks" = 2, - "set_internal_pressure" = 0 - )) - -/obj/machinery/airalarm/update_icon() - set_light(0) - cut_overlays() - SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) - if(stat & NOPOWER) - icon_state = "alarm0" - return - - if(stat & BROKEN) - icon_state = "alarmx" - return - - if(panel_open) - switch(buildstage) - if(2) - icon_state = "alarmx" - if(1) - icon_state = "alarm_b2" - if(0) - icon_state = "alarm_b1" - return - - icon_state = "alarm1" - var/overlay_state = AALARM_OVERLAY_OFF - var/area/A = get_area(src) - switch(max(danger_level, A.atmosalm)) - if(0) - add_overlay(AALARM_OVERLAY_GREEN) - overlay_state = AALARM_OVERLAY_GREEN - light_color = LIGHT_COLOR_PALEBLUE - set_light(brightness_on) - if(1) - add_overlay(AALARM_OVERLAY_WARN) - overlay_state = AALARM_OVERLAY_WARN - light_color = LIGHT_COLOR_LAVA - set_light(brightness_on) - if(2) - add_overlay(AALARM_OVERLAY_DANGER) - overlay_state = AALARM_OVERLAY_DANGER - light_color = LIGHT_COLOR_RED - set_light(brightness_on) - - SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) - update_light() - -/obj/machinery/airalarm/process() - if((stat & (NOPOWER|BROKEN)) || shorted) - return - - var/turf/location = get_turf(src) - if(!location) - return - - var/datum/tlv/cur_tlv - - var/datum/gas_mixture/environment = location.return_air() - var/list/env_gases = environment.gases - var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume - - cur_tlv = TLV["pressure"] - var/environment_pressure = environment.return_pressure() - var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure) - - cur_tlv = TLV["temperature"] - var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature) - - var/gas_dangerlevel = 0 - for(var/gas_id in env_gases) - if(!(gas_id in TLV)) // We're not interested in this gas, it seems. - continue - cur_tlv = TLV[gas_id] - gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id][MOLES] * partial_pressure)) - - environment.garbage_collect() - - var/old_danger_level = danger_level - danger_level = max(pressure_dangerlevel, temperature_dangerlevel, gas_dangerlevel) - - if(old_danger_level != danger_level) - apply_danger_level() - if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05) - mode = AALARM_MODE_SCRUBBING - apply_mode() - - return - - -/obj/machinery/airalarm/proc/post_alert(alert_level) - var/datum/radio_frequency/frequency = SSradio.return_frequency(alarm_frequency) - - if(!frequency) - return - - var/datum/signal/alert_signal = new(list( - "zone" = get_area_name(src), - "type" = "Atmospheric" - )) - if(alert_level==2) - alert_signal.data["alert"] = "severe" - else if (alert_level==1) - alert_signal.data["alert"] = "minor" - else if (alert_level==0) - alert_signal.data["alert"] = "clear" - - frequency.post_signal(src, alert_signal, range = -1) - -/obj/machinery/airalarm/proc/apply_danger_level() - var/area/A = get_area(src) - - var/new_area_danger_level = 0 - for(var/obj/machinery/airalarm/AA in A) - if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted) - new_area_danger_level = max(new_area_danger_level,AA.danger_level) - if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state - post_alert(new_area_danger_level) - - update_icon() - -/obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) - switch(buildstage) - if(2) - if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut()) - W.play_tool_sound(src) - to_chat(user, "You cut the final wires.") - new /obj/item/stack/cable_coil(loc, 5) - buildstage = 1 - update_icon() - return - else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up. - W.play_tool_sound(src) - panel_open = !panel_open - to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"].") - update_icon() - return - else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card - togglelock(user) - else if(panel_open && is_wire_tool(W)) - wires.interact(user) - return - if(1) - if(istype(W, /obj/item/crowbar)) - user.visible_message("[user.name] removes the electronics from [src.name].",\ - "You start prying out the circuit...") - W.play_tool_sound(src) - if (W.use_tool(src, user, 20)) - if (buildstage == 1) - to_chat(user, "You remove the air alarm electronics.") - new /obj/item/electronics/airalarm( src.loc ) - playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) - buildstage = 0 - update_icon() - return - - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/cable = W - if(cable.get_amount() < 5) - to_chat(user, "You need five lengths of cable to wire the air alarm!") - return - user.visible_message("[user.name] wires the air alarm.", \ - "You start wiring the air alarm...") - if (do_after(user, 20, target = src)) - if (cable.get_amount() >= 5 && buildstage == 1) - cable.use(5) - to_chat(user, "You wire the air alarm.") - wires.repair() - aidisabled = 0 - locked = FALSE - mode = 1 - shorted = 0 - post_alert(0) - buildstage = 2 - update_icon() - return - if(0) - if(istype(W, /obj/item/electronics/airalarm)) - if(user.temporarilyRemoveItemFromInventory(W)) - to_chat(user, "You insert the circuit.") - buildstage = 1 - update_icon() - qdel(W) - return - - if(istype(W, /obj/item/electroadaptive_pseudocircuit)) - var/obj/item/electroadaptive_pseudocircuit/P = W - if(!P.adapt_circuit(user, 25)) - return - user.visible_message("[user] fabricates a circuit and places it into [src].", \ - "You adapt an air alarm circuit and slot it into the assembly.") - buildstage = 1 - update_icon() - return - - if(istype(W, /obj/item/wrench)) - to_chat(user, "You detach \the [src] from the wall.") - W.play_tool_sound(src) - new /obj/item/wallframe/airalarm( user.loc ) - qdel(src) - return - - return ..() - -/obj/machinery/airalarm/AltClick(mob/user) - ..() - if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) - return - else - togglelock(user) - -/obj/machinery/airalarm/proc/togglelock(mob/living/user) - if(stat & (NOPOWER|BROKEN)) - to_chat(user, "It does nothing!") - else - if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) - locked = !locked - updateUsrDialog() - to_chat(user, "You [ locked ? "lock" : "unlock"] the air alarm interface.") - else - to_chat(user, "Access denied.") - return - -/obj/machinery/airalarm/power_change() - ..() - if(stat & NOPOWER) - set_light(0) - update_icon() - -/obj/machinery/airalarm/emag_act(mob/user) - if(obj_flags & EMAGGED) - return - obj_flags |= EMAGGED - visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") - playsound(src, "sparks", 50, 1) - -/obj/machinery/airalarm/obj_break(damage_flag) - ..() - update_icon() - set_light(0) - -/obj/machinery/airalarm/deconstruct(disassembled = TRUE) - if(!(flags_1 & NODECONSTRUCT_1)) - new /obj/item/stack/sheet/metal(loc, 2) - var/obj/item/I = new /obj/item/electronics/airalarm(loc) - if(!disassembled) - I.obj_integrity = I.max_integrity * 0.5 - new /obj/item/stack/cable_coil(loc, 3) - qdel(src) - -#undef AALARM_MODE_SCRUBBING -#undef AALARM_MODE_VENTING -#undef AALARM_MODE_PANIC -#undef AALARM_MODE_REPLACEMENT -#undef AALARM_MODE_OFF -#undef AALARM_MODE_FLOOD -#undef AALARM_MODE_SIPHON -#undef AALARM_MODE_CONTAMINATED -#undef AALARM_MODE_REFILL -#undef AALARM_REPORT_TIMEOUT +/datum/tlv + var/min2 + var/min1 + var/max1 + var/max2 + +/datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num) + if(min2) src.min2 = min2 + if(min1) src.min1 = min1 + if(max1) src.max1 = max1 + if(max2) src.max2 = max2 + +/datum/tlv/proc/get_danger_level(val as num) + if(max2 != -1 && val >= max2) + return 2 + if(min2 != -1 && val <= min2) + return 2 + if(max1 != -1 && val >= max1) + return 1 + if(min1 != -1 && val <= min1) + return 1 + return 0 + +/datum/tlv/no_checks + min2 = -1 + min1 = -1 + max1 = -1 + max2 = -1 + +/datum/tlv/dangerous + min2 = -1 + min1 = -1 + max1 = 0.2 + max2 = 0.5 + +/obj/item/electronics/airalarm + name = "air alarm electronics" + icon_state = "airalarm_electronics" + +/obj/item/wallframe/airalarm + name = "air alarm frame" + desc = "Used for building Air Alarms." + icon = 'icons/obj/monitors.dmi' + icon_state = "alarm_bitem" + result_path = /obj/machinery/airalarm + +#define AALARM_MODE_SCRUBBING 1 +#define AALARM_MODE_VENTING 2 //makes draught +#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet) +#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing +#define AALARM_MODE_OFF 5 +#define AALARM_MODE_FLOOD 6 //Emagged mode; turns off scrubbers and pressure checks on vents +#define AALARM_MODE_SIPHON 7 //Scrubbers suck air +#define AALARM_MODE_CONTAMINATED 8 //Turns on all filtering and widenet scrubbing. +#define AALARM_MODE_REFILL 9 //just like normal, but with triple the air output + +#define AALARM_REPORT_TIMEOUT 100 + +#define AALARM_OVERLAY_OFF "alarm_off" +#define AALARM_OVERLAY_GREEN "alarm_green" +#define AALARM_OVERLAY_WARN "alarm_amber" +#define AALARM_OVERLAY_DANGER "alarm_red" + +/obj/machinery/airalarm + name = "air alarm" + desc = "A machine that monitors atmosphere levels. Goes off if the area is dangerous." + icon = 'icons/obj/monitors.dmi' + icon_state = "alarm0" + use_power = IDLE_POWER_USE + idle_power_usage = 4 + active_power_usage = 8 + power_channel = ENVIRON + req_access = list(ACCESS_ATMOSPHERICS) + max_integrity = 250 + integrity_failure = 80 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) + resistance_flags = FIRE_PROOF + + var/danger_level = 0 + var/mode = AALARM_MODE_SCRUBBING + + var/locked = TRUE + var/aidisabled = 0 + var/shorted = 0 + var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone + var/brightness_on = 1 + + var/frequency = FREQ_ATMOS_CONTROL + var/alarm_frequency = FREQ_ATMOS_ALARMS + var/datum/radio_frequency/radio_connection + + var/list/TLV = list( // Breathable air. + "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa + "temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), + /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa + /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), + /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), + /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), + /datum/gas/plasma = new/datum/tlv/dangerous, + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects + /datum/gas/nitryl = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires + ) + +/obj/machinery/airalarm/server // No checks here. + TLV = list( + "pressure" = new/datum/tlv/no_checks, + "temperature" = new/datum/tlv/no_checks, + /datum/gas/oxygen = new/datum/tlv/no_checks, + /datum/gas/nitrogen = new/datum/tlv/no_checks, + /datum/gas/carbon_dioxide = new/datum/tlv/no_checks, + /datum/gas/miasma = new/datum/tlv/no_checks, + /datum/gas/plasma = new/datum/tlv/no_checks, + /datum/gas/nitrous_oxide = new/datum/tlv/no_checks, + /datum/gas/bz = new/datum/tlv/no_checks, + /datum/gas/hypernoblium = new/datum/tlv/no_checks, + /datum/gas/water_vapor = new/datum/tlv/no_checks, + /datum/gas/tritium = new/datum/tlv/no_checks, + /datum/gas/stimulum = new/datum/tlv/no_checks, + /datum/gas/nitryl = new/datum/tlv/no_checks, + /datum/gas/pluoxium = new/datum/tlv/no_checks + ) + +/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures. + TLV = list( + "pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa + "temperature" = new/datum/tlv(T0C-73.15, T0C-63.15, T0C, T0C+10), + /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa + /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), + /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), + /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5), + /datum/gas/plasma = new/datum/tlv/dangerous, + /datum/gas/nitrous_oxide = new/datum/tlv/dangerous, + /datum/gas/bz = new/datum/tlv/dangerous, + /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic + /datum/gas/water_vapor = new/datum/tlv/dangerous, + /datum/gas/tritium = new/datum/tlv/dangerous, + /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects + /datum/gas/nitryl = new/datum/tlv/dangerous, + /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000) // Unlike oxygen, pluoxium does not fuel plasma/tritium fires + ) + +/obj/machinery/airalarm/unlocked + locked = FALSE + +/obj/machinery/airalarm/engine + name = "engine air alarm" + locked = FALSE + req_access = null + req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_ENGINE) + +/obj/machinery/airalarm/mixingchamber + name = "chamber air alarm" + locked = FALSE + req_access = null + req_one_access = list(ACCESS_ATMOSPHERICS, ACCESS_TOX, ACCESS_TOX_STORAGE) + +/obj/machinery/airalarm/all_access + name = "all-access air alarm" + desc = "This particular atmos control unit appears to have no access restrictions." + locked = FALSE + req_access = null + req_one_access = null + +/obj/machinery/airalarm/syndicate //general syndicate access + req_access = list(ACCESS_SYNDICATE) + +/obj/machinery/airalarm/directional/north //Pixel offsets get overwritten on New() + dir = SOUTH + pixel_y = 24 + +/obj/machinery/airalarm/directional/south + dir = NORTH + pixel_y = -24 + +/obj/machinery/airalarm/directional/east + dir = WEST + pixel_x = 24 + +/obj/machinery/airalarm/directional/west + dir = EAST + pixel_x = -24 + +//all air alarms in area are connected via magic +/area + var/list/air_vent_names = list() + var/list/air_scrub_names = list() + var/list/air_vent_info = list() + var/list/air_scrub_info = list() + +/obj/machinery/airalarm/Initialize(mapload, ndir, nbuild) + . = ..() + wires = new /datum/wires/airalarm(src) + + if(ndir) + setDir(ndir) + + if(nbuild) + buildstage = 0 + panel_open = TRUE + pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) + pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0 + + if(name == initial(name)) + name = "[get_area_name(src)] Air Alarm" + + power_change() + set_frequency(frequency) + +/obj/machinery/airalarm/Destroy() + SSradio.remove_object(src, frequency) + qdel(wires) + wires = null + return ..() + +/obj/machinery/airalarm/examine(mob/user) + . = ..() + switch(buildstage) + if(0) + to_chat(user, "It is missing air alarm electronics.") + if(1) + to_chat(user, "It is missing wiring.") + if(2) + to_chat(user, "Alt-click to [locked ? "unlock" : "lock"] the interface.") + +/obj/machinery/airalarm/ui_status(mob/user) + if(user.has_unlimited_silicon_privilege && aidisabled) + to_chat(user, "AI control has been disabled.") + else if(!shorted) + return ..() + return UI_CLOSE + +/obj/machinery/airalarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "airalarm", name, 440, 650, master_ui, state) + ui.open() + +/obj/machinery/airalarm/ui_data(mob/user) + var/data = list( + "locked" = locked, + "siliconUser" = user.has_unlimited_silicon_privilege, + "emagged" = (obj_flags & EMAGGED ? 1 : 0), + "danger_level" = danger_level, + ) + + var/area/A = get_area(src) + data["atmos_alarm"] = A.atmosalm + data["fire_alarm"] = A.fire + + var/turf/T = get_turf(src) + var/datum/gas_mixture/environment = T.return_air() + var/datum/tlv/cur_tlv + + data["environment_data"] = list() + var/pressure = environment.return_pressure() + cur_tlv = TLV["pressure"] + data["environment_data"] += list(list( + "name" = "Pressure", + "value" = pressure, + "unit" = "kPa", + "danger_level" = cur_tlv.get_danger_level(pressure) + )) + var/temperature = environment.temperature + cur_tlv = TLV["temperature"] + data["environment_data"] += list(list( + "name" = "Temperature", + "value" = temperature, + "unit" = "K ([round(temperature - T0C, 0.1)]C)", + "danger_level" = cur_tlv.get_danger_level(temperature) + )) + var/total_moles = environment.total_moles() + var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume + for(var/gas_id in environment.gases) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + cur_tlv = TLV[gas_id] + data["environment_data"] += list(list( + "name" = GLOB.meta_gas_names[gas_id], + "value" = environment.gases[gas_id] / total_moles * 100, + "unit" = "%", + "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure) + )) + + if(!locked || user.has_unlimited_silicon_privilege) + data["vents"] = list() + for(var/id_tag in A.air_vent_names) + var/long_name = A.air_vent_names[id_tag] + var/list/info = A.air_vent_info[id_tag] + if(!info || info["frequency"] != frequency) + continue + data["vents"] += list(list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "checks" = info["checks"], + "excheck" = info["checks"]&1, + "incheck" = info["checks"]&2, + "direction" = info["direction"], + "external" = info["external"], + "internal" = info["internal"], + "extdefault"= (info["external"] == ONE_ATMOSPHERE), + "intdefault"= (info["internal"] == 0) + )) + data["scrubbers"] = list() + for(var/id_tag in A.air_scrub_names) + var/long_name = A.air_scrub_names[id_tag] + var/list/info = A.air_scrub_info[id_tag] + if(!info || info["frequency"] != frequency) + continue + data["scrubbers"] += list(list( + "id_tag" = id_tag, + "long_name" = sanitize(long_name), + "power" = info["power"], + "scrubbing" = info["scrubbing"], + "widenet" = info["widenet"], + "filter_types" = info["filter_types"] + )) + data["mode"] = mode + data["modes"] = list() + data["modes"] += list(list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)) + data["modes"] += list(list("name" = "Contaminated - Scrubs out ALL contaminants quickly","mode" = AALARM_MODE_CONTAMINATED, "selected" = mode == AALARM_MODE_CONTAMINATED, "danger" = 0)) + data["modes"] += list(list("name" = "Draught - Siphons out air while replacing", "mode" = AALARM_MODE_VENTING, "selected" = mode == AALARM_MODE_VENTING, "danger" = 0)) + data["modes"] += list(list("name" = "Refill - Triple vent output", "mode" = AALARM_MODE_REFILL, "selected" = mode == AALARM_MODE_REFILL, "danger" = 1)) + data["modes"] += list(list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 1)) + data["modes"] += list(list("name" = "Siphon - Siphons air out of the room", "mode" = AALARM_MODE_SIPHON, "selected" = mode == AALARM_MODE_SIPHON, "danger" = 1)) + data["modes"] += list(list("name" = "Panic Siphon - Siphons air out of the room quickly","mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)) + data["modes"] += list(list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)) + if(obj_flags & EMAGGED) + data["modes"] += list(list("name" = "Flood - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FLOOD, "selected" = mode == AALARM_MODE_FLOOD, "danger" = 1)) + + var/datum/tlv/selected + var/list/thresholds = list() + + selected = TLV["pressure"] + thresholds += list(list("name" = "Pressure", "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2)) + + selected = TLV["temperature"] + thresholds += list(list("name" = "Temperature", "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2)) + + for(var/gas_id in GLOB.meta_gas_names) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + selected = TLV[gas_id] + thresholds += list(list("name" = GLOB.meta_gas_names[gas_id], "settings" = list())) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1)) + thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max2", "selected" = selected.max2)) + + data["thresholds"] = thresholds + return data + +/obj/machinery/airalarm/ui_act(action, params) + if(..() || buildstage != 2) + return + if((locked && !usr.has_unlimited_silicon_privilege) || (usr.has_unlimited_silicon_privilege && aidisabled)) + return + var/device_id = params["id_tag"] + switch(action) + if("lock") + if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN)) + locked = !locked + . = TRUE + if("power", "toggle_filter", "widenet", "scrubbing") + send_signal(device_id, list("[action]" = params["val"]), usr) + . = TRUE + if("excheck") + send_signal(device_id, list("checks" = text2num(params["val"])^1), usr) + . = TRUE + if("incheck") + send_signal(device_id, list("checks" = text2num(params["val"])^2), usr) + . = TRUE + if("set_external_pressure", "set_internal_pressure") + var/area/A = get_area(src) + var/target = input("New target pressure:", name, A.air_vent_info[device_id][(action == "set_external_pressure" ? "external" : "internal")]) as num|null + if(!isnull(target) && !..()) + send_signal(device_id, list("[action]" = target), usr) + . = TRUE + if("reset_external_pressure") + send_signal(device_id, list("reset_external_pressure"), usr) + . = TRUE + if("reset_internal_pressure") + send_signal(device_id, list("reset_internal_pressure"), usr) + . = TRUE + if("threshold") + var/env = params["env"] + if(text2path(env)) + env = text2path(env) + + var/name = params["var"] + var/datum/tlv/tlv = TLV[env] + if(isnull(tlv)) + return + var/value = input("New [name] for [env]:", name, tlv.vars[name]) as num|null + if(!isnull(value) && !..()) + if(value < 0) + tlv.vars[name] = -1 + else + tlv.vars[name] = round(value, 0.01) + investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS) + . = TRUE + if("mode") + mode = text2num(params["mode"]) + investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS) + apply_mode() + . = TRUE + if("alarm") + var/area/A = get_area(src) + if(A.atmosalert(2, src)) + post_alert(2) + . = TRUE + if("reset") + var/area/A = get_area(src) + if(A.atmosalert(0, src)) + post_alert(0) + . = TRUE + update_icon() + +/obj/machinery/airalarm/proc/reset(wire) + switch(wire) + if(WIRE_POWER) + if(!wires.is_cut(WIRE_POWER)) + shorted = FALSE + update_icon() + if(WIRE_AI) + if(!wires.is_cut(WIRE_AI)) + aidisabled = FALSE + + +/obj/machinery/airalarm/proc/shock(mob/user, prb) + if((stat & (NOPOWER))) // unpowered, no shock + return 0 + if(!prob(prb)) + return 0 //you lucked out, no shock for you + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, src) + s.start() //sparks always. + if (electrocute_mob(user, get_area(src), src, 1, TRUE)) + return 1 + else + return 0 + +/obj/machinery/airalarm/proc/refresh_all() + var/area/A = get_area(src) + for(var/id_tag in A.air_vent_names) + var/list/I = A.air_vent_info[id_tag] + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) + continue + send_signal(id_tag, list("status")) + for(var/id_tag in A.air_scrub_names) + var/list/I = A.air_scrub_info[id_tag] + if(I && I["timestamp"] + AALARM_REPORT_TIMEOUT / 2 > world.time) + continue + send_signal(id_tag, list("status")) + +/obj/machinery/airalarm/proc/set_frequency(new_frequency) + SSradio.remove_object(src, frequency) + frequency = new_frequency + radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM) + +/obj/machinery/airalarm/proc/send_signal(target, list/command, mob/user)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise + if(!radio_connection) + return 0 + + var/datum/signal/signal = new(command) + signal.data["tag"] = target + signal.data["sigtype"] = "command" + signal.data["user"] = user + radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM) + + return 1 + +/obj/machinery/airalarm/proc/get_mode_name(mode_value) + switch(mode_value) + if(AALARM_MODE_SCRUBBING) + return "Filtering" + if(AALARM_MODE_CONTAMINATED) + return "Contaminated" + if(AALARM_MODE_VENTING) + return "Draught" + if(AALARM_MODE_REFILL) + return "Refill" + if(AALARM_MODE_PANIC) + return "Panic Siphon" + if(AALARM_MODE_REPLACEMENT) + return "Cycle" + if(AALARM_MODE_SIPHON) + return "Siphon" + if(AALARM_MODE_OFF) + return "Off" + if(AALARM_MODE_FLOOD) + return "Flood" + +/obj/machinery/airalarm/proc/apply_mode() + var/area/A = get_area(src) + switch(mode) + if(AALARM_MODE_SCRUBBING) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), + "scrubbing" = 1, + "widenet" = 0, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE + )) + if(AALARM_MODE_CONTAMINATED) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list( + /datum/gas/carbon_dioxide, + /datum/gas/miasma, + /datum/gas/plasma, + /datum/gas/water_vapor, + /datum/gas/hypernoblium, + /datum/gas/nitrous_oxide, + /datum/gas/nitryl, + /datum/gas/tritium, + /datum/gas/bz, + /datum/gas/stimulum, + /datum/gas/pluoxium + ), + "scrubbing" = 1, + "widenet" = 1, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE + )) + if(AALARM_MODE_VENTING) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 0, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE*2 + )) + if(AALARM_MODE_REFILL) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma), + "scrubbing" = 1, + "widenet" = 0, + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 1, + "set_external_pressure" = ONE_ATMOSPHERE * 3 + )) + if(AALARM_MODE_PANIC, + AALARM_MODE_REPLACEMENT) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 1, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + if(AALARM_MODE_SIPHON) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 1, + "widenet" = 0, + "scrubbing" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + + if(AALARM_MODE_OFF) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 0 + )) + if(AALARM_MODE_FLOOD) + for(var/device_id in A.air_scrub_names) + send_signal(device_id, list( + "power" = 0 + )) + for(var/device_id in A.air_vent_names) + send_signal(device_id, list( + "power" = 1, + "checks" = 2, + "set_internal_pressure" = 0 + )) + +/obj/machinery/airalarm/update_icon() + set_light(0) + cut_overlays() + SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) + if(stat & NOPOWER) + icon_state = "alarm0" + return + + if(stat & BROKEN) + icon_state = "alarmx" + return + + if(panel_open) + switch(buildstage) + if(2) + icon_state = "alarmx" + if(1) + icon_state = "alarm_b2" + if(0) + icon_state = "alarm_b1" + return + + icon_state = "alarm1" + var/overlay_state = AALARM_OVERLAY_OFF + var/area/A = get_area(src) + switch(max(danger_level, A.atmosalm)) + if(0) + add_overlay(AALARM_OVERLAY_GREEN) + overlay_state = AALARM_OVERLAY_GREEN + light_color = LIGHT_COLOR_PALEBLUE + set_light(brightness_on) + if(1) + add_overlay(AALARM_OVERLAY_WARN) + overlay_state = AALARM_OVERLAY_WARN + light_color = LIGHT_COLOR_LAVA + set_light(brightness_on) + if(2) + add_overlay(AALARM_OVERLAY_DANGER) + overlay_state = AALARM_OVERLAY_DANGER + light_color = LIGHT_COLOR_RED + set_light(brightness_on) + + SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) + update_light() + +/obj/machinery/airalarm/process() + if((stat & (NOPOWER|BROKEN)) || shorted) + return + + var/turf/location = get_turf(src) + if(!location) + return + + var/datum/tlv/cur_tlv + + var/datum/gas_mixture/environment = location.return_air() + var/list/env_gases = environment.gases + var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume + + cur_tlv = TLV["pressure"] + var/environment_pressure = environment.return_pressure() + var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure) + + cur_tlv = TLV["temperature"] + var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature) + + var/gas_dangerlevel = 0 + for(var/gas_id in env_gases) + if(!(gas_id in TLV)) // We're not interested in this gas, it seems. + continue + cur_tlv = TLV[gas_id] + gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id] * partial_pressure)) + + GAS_GARBAGE_COLLECT(environment.gases) + + var/old_danger_level = danger_level + danger_level = max(pressure_dangerlevel, temperature_dangerlevel, gas_dangerlevel) + + if(old_danger_level != danger_level) + apply_danger_level() + if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05) + mode = AALARM_MODE_SCRUBBING + apply_mode() + + return + + +/obj/machinery/airalarm/proc/post_alert(alert_level) + var/datum/radio_frequency/frequency = SSradio.return_frequency(alarm_frequency) + + if(!frequency) + return + + var/datum/signal/alert_signal = new(list( + "zone" = get_area_name(src), + "type" = "Atmospheric" + )) + if(alert_level==2) + alert_signal.data["alert"] = "severe" + else if (alert_level==1) + alert_signal.data["alert"] = "minor" + else if (alert_level==0) + alert_signal.data["alert"] = "clear" + + frequency.post_signal(src, alert_signal, range = -1) + +/obj/machinery/airalarm/proc/apply_danger_level() + var/area/A = get_area(src) + + var/new_area_danger_level = 0 + for(var/obj/machinery/airalarm/AA in A) + if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted) + new_area_danger_level = max(new_area_danger_level,AA.danger_level) + if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state + post_alert(new_area_danger_level) + + update_icon() + +/obj/machinery/airalarm/attackby(obj/item/W, mob/user, params) + switch(buildstage) + if(2) + if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut()) + W.play_tool_sound(src) + to_chat(user, "You cut the final wires.") + new /obj/item/stack/cable_coil(loc, 5) + buildstage = 1 + update_icon() + return + else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up. + W.play_tool_sound(src) + panel_open = !panel_open + to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"].") + update_icon() + return + else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card + togglelock(user) + else if(panel_open && is_wire_tool(W)) + wires.interact(user) + return + if(1) + if(istype(W, /obj/item/crowbar)) + user.visible_message("[user.name] removes the electronics from [src.name].",\ + "You start prying out the circuit...") + W.play_tool_sound(src) + if (W.use_tool(src, user, 20)) + if (buildstage == 1) + to_chat(user, "You remove the air alarm electronics.") + new /obj/item/electronics/airalarm( src.loc ) + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + buildstage = 0 + update_icon() + return + + if(istype(W, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/cable = W + if(cable.get_amount() < 5) + to_chat(user, "You need five lengths of cable to wire the air alarm!") + return + user.visible_message("[user.name] wires the air alarm.", \ + "You start wiring the air alarm...") + if (do_after(user, 20, target = src)) + if (cable.get_amount() >= 5 && buildstage == 1) + cable.use(5) + to_chat(user, "You wire the air alarm.") + wires.repair() + aidisabled = 0 + locked = FALSE + mode = 1 + shorted = 0 + post_alert(0) + buildstage = 2 + update_icon() + return + if(0) + if(istype(W, /obj/item/electronics/airalarm)) + if(user.temporarilyRemoveItemFromInventory(W)) + to_chat(user, "You insert the circuit.") + buildstage = 1 + update_icon() + qdel(W) + return + + if(istype(W, /obj/item/electroadaptive_pseudocircuit)) + var/obj/item/electroadaptive_pseudocircuit/P = W + if(!P.adapt_circuit(user, 25)) + return + user.visible_message("[user] fabricates a circuit and places it into [src].", \ + "You adapt an air alarm circuit and slot it into the assembly.") + buildstage = 1 + update_icon() + return + + if(istype(W, /obj/item/wrench)) + to_chat(user, "You detach \the [src] from the wall.") + W.play_tool_sound(src) + new /obj/item/wallframe/airalarm( user.loc ) + qdel(src) + return + + return ..() + +/obj/machinery/airalarm/AltClick(mob/user) + ..() + if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc)) + return + else + togglelock(user) + +/obj/machinery/airalarm/proc/togglelock(mob/living/user) + if(stat & (NOPOWER|BROKEN)) + to_chat(user, "It does nothing!") + else + if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) + locked = !locked + updateUsrDialog() + to_chat(user, "You [ locked ? "lock" : "unlock"] the air alarm interface.") + else + to_chat(user, "Access denied.") + return + +/obj/machinery/airalarm/power_change() + ..() + if(stat & NOPOWER) + set_light(0) + update_icon() + +/obj/machinery/airalarm/emag_act(mob/user) + if(obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") + playsound(src, "sparks", 50, 1) + +/obj/machinery/airalarm/obj_break(damage_flag) + ..() + update_icon() + set_light(0) + +/obj/machinery/airalarm/deconstruct(disassembled = TRUE) + if(!(flags_1 & NODECONSTRUCT_1)) + new /obj/item/stack/sheet/metal(loc, 2) + var/obj/item/I = new /obj/item/electronics/airalarm(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) + +#undef AALARM_MODE_SCRUBBING +#undef AALARM_MODE_VENTING +#undef AALARM_MODE_PANIC +#undef AALARM_MODE_REPLACEMENT +#undef AALARM_MODE_OFF +#undef AALARM_MODE_FLOOD +#undef AALARM_MODE_SIPHON +#undef AALARM_MODE_CONTAMINATED +#undef AALARM_MODE_REFILL +#undef AALARM_REPORT_TIMEOUT diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index abdc3ada57..1de5b93332 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -27,7 +27,12 @@ Thus, the two variables affect pump operation are set in New(): construction_type = /obj/item/pipe/directional pipe_state = "pump" - + +/obj/machinery/atmospherics/components/binary/pump/examine(mob/user) + . = ..() + to_chat(user,"You can hold Ctrl and click on it to toggle it on and off.") + to_chat(user,"You can hold Alt and click on it to maximize its pressure.") + /obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) @@ -37,7 +42,7 @@ Thus, the two variables affect pump operation are set in New(): investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") return ..() - + /obj/machinery/atmospherics/components/binary/pump/AltClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) @@ -46,7 +51,7 @@ Thus, the two variables affect pump operation are set in New(): to_chat(user,"You maximize the pressure on the [src].") investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") - + /obj/machinery/atmospherics/components/binary/pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 2efff16301..3a2321c395 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -28,16 +28,21 @@ Thus, the two variables affect pump operation are set in New(): construction_type = /obj/item/pipe/directional pipe_state = "volumepump" +/obj/machinery/atmospherics/components/binary/volume_pump/examine(mob/user) + . = ..() + to_chat(user,"You can hold Ctrl and click on it to toggle it on and off.") + to_chat(user,"You can hold Alt and click on it to maximize its pressure.") + /obj/machinery/atmospherics/components/binary/volume_pump/CtrlClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + investigate_log("Volume Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") return ..() - + /obj/machinery/atmospherics/components/binary/volume_pump/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 1e52e238cf..ac05c94a78 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -12,25 +12,30 @@ construction_type = /obj/item/pipe/trinary/flippable pipe_state = "filter" +/obj/machinery/atmospherics/components/trinary/filter/examine(mob/user) + . = ..() + to_chat(user,"You can hold Ctrl and click on it to toggle it on and off.") + to_chat(user,"You can hold Alt and click on it to maximize its pressure.") + /obj/machinery/atmospherics/components/trinary/filter/CtrlClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + investigate_log("Filter, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Filter, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") return ..() - + /obj/machinery/atmospherics/components/trinary/filter/AltClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") - investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") - + investigate_log("Filter, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Filter, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + /obj/machinery/atmospherics/components/trinary/filter/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X @@ -178,11 +183,10 @@ var/datum/gas_mixture/filtered_out = new filtered_out.temperature = removed.temperature - filtered_out.add_gas(filter_type) - filtered_out.gases[filter_type][MOLES] = removed.gases[filter_type][MOLES] + filtered_out.gases[filter_type] = removed.gases[filter_type] - removed.gases[filter_type][MOLES] = 0 - removed.garbage_collect() + removed.gases[filter_type] = 0 + GAS_GARBAGE_COLLECT(removed.gases) var/datum/gas_mixture/target = (air2.return_pressure() < target_pressure ? air2 : air1) //if there's no room for the filtered gas; just leave it in air1 target.merge(filtered_out) @@ -210,9 +214,8 @@ data["filter_types"] = list() data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type)) - for(var/path in GLOB.meta_gas_info) - var/list/gas = GLOB.meta_gas_info[path] - data["filter_types"] += list(list("name" = gas[META_GAS_NAME], "id" = gas[META_GAS_ID], "selected" = (path == gas_id2path(filter_type)))) + for(var/path in GLOB.meta_gas_ids) + data["filter_types"] += list(list("name" = GLOB.meta_gas_names[path], "id" = GLOB.meta_gas_ids[path], "selected" = (path == gas_id2path(filter_type)))) return data @@ -243,9 +246,9 @@ filter_type = null var/filter_name = "nothing" var/gas = gas_id2path(params["mode"]) - if(gas in GLOB.meta_gas_info) + if(gas in GLOB.meta_gas_names) filter_type = gas - filter_name = GLOB.meta_gas_info[gas][META_GAS_NAME] + filter_name = GLOB.meta_gas_names[gas] investigate_log("was set to filter [filter_name] by [key_name(usr)]", INVESTIGATE_ATMOS) . = TRUE update_icon() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index ba9fdf31af..fc866c3d6a 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -14,25 +14,31 @@ pipe_state = "mixer" //node 3 is the outlet, nodes 1 & 2 are intakes +/obj/machinery/atmospherics/components/trinary/mixer/examine(mob/user) + . = ..() + to_chat(user,"You can hold Ctrl and click on it to toggle it on and off.") + to_chat(user,"You can hold Alt and click on it to maximize its pressure.") + /obj/machinery/atmospherics/components/trinary/mixer/CtrlClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) on = !on update_icon() - investigate_log("Pump, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + investigate_log("Mixer, [src.name], turned on by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Mixer, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") return ..() - + /obj/machinery/atmospherics/components/trinary/mixer/AltClick(mob/user) var/area/A = get_area(src) var/turf/T = get_turf(src) if(user.canUseTopic(src, BE_CLOSE, FALSE,)) target_pressure = MAX_OUTPUT_PRESSURE to_chat(user,"You maximize the pressure on the [src].") - investigate_log("Pump, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) - message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") - + investigate_log("Mixer, [src.name], was maximized by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS) + message_admins("Mixer, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + + //node 3 is the outlet, nodes 1 & 2 are intakes /obj/machinery/atmospherics/components/trinary/mixer/layer1 piping_layer = PIPING_LAYER_MIN pixel_x = -PIPING_LAYER_P_X diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9b69b2fa6f..bfe60cd573 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -183,8 +183,8 @@ if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic. beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents. beaker.reagents.reaction(occupant, VAPOR) - air1.gases[/datum/gas/oxygen][MOLES] -= max(0,air1.gases[/datum/gas/oxygen][MOLES] - 2 / efficiency) //Let's use gas for this - air1.garbage_collect() + air1.gases[/datum/gas/oxygen] -= max(0,air1.gases[/datum/gas/oxygen] - 2 / efficiency) //Let's use gas for this + GAS_GARBAGE_COLLECT(air1.gases) if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker). reagent_transfer = 0 @@ -198,7 +198,7 @@ var/datum/gas_mixture/air1 = airs[1] - if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen][MOLES] < 5) // Turn off if the machine won't work. + if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen] < 5) // Turn off if the machine won't work. on = FALSE update_icon() return @@ -220,8 +220,8 @@ air1.temperature = max(air1.temperature - heat / air_heat_capacity, TCMB) mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB) - air1.gases[/datum/gas/oxygen][MOLES] = max(0,air1.gases[/datum/gas/oxygen][MOLES] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic. - air1.garbage_collect() + air1.gases[/datum/gas/oxygen] = max(0,air1.gases[/datum/gas/oxygen] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic. + GAS_GARBAGE_COLLECT(air1.gases) /obj/machinery/atmospherics/components/unary/cryo_cell/power_change() ..() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index 1a9d1cff30..4f16406456 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -17,9 +17,8 @@ air_contents.volume = volume air_contents.temperature = T20C if(gas_type) - air_contents.assert_gas(gas_type) - air_contents.gases[gas_type][MOLES] = AIR_CONTENTS - name = "[name] ([air_contents.gases[gas_type][GAS_META][META_GAS_NAME]])" + air_contents.gases[gas_type] = AIR_CONTENTS + name = "[name] ([GLOB.meta_gas_names[gas_type]])" /obj/machinery/atmospherics/components/unary/tank/carbon_dioxide gas_type = /datum/gas/carbon_dioxide @@ -44,6 +43,5 @@ /obj/machinery/atmospherics/components/unary/tank/air/New() ..() var/datum/gas_mixture/air_contents = airs[1] - air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2 - air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8 + air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2 + air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index ee819d4f74..7f40630a86 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -1,330 +1,328 @@ -#define SIPHONING 0 -#define SCRUBBING 1 - -/obj/machinery/atmospherics/components/unary/vent_scrubber - name = "air scrubber" - desc = "Has a valve and pump attached to it." - icon_state = "scrub_map" - use_power = IDLE_POWER_USE - idle_power_usage = 10 - active_power_usage = 60 - can_unwrench = TRUE - welded = FALSE - level = 1 - layer = GAS_SCRUBBER_LAYER - - var/id_tag = null - var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing - - var/filter_types = list(/datum/gas/carbon_dioxide) - var/volume_rate = 200 - var/widenet = 0 //is this scrubber acting on the 3x3 area around it. - var/list/turf/adjacent_turfs = list() - - var/frequency = FREQ_ATMOS_CONTROL - var/datum/radio_frequency/radio_connection - var/radio_filter_out - var/radio_filter_in - - pipe_state = "scrubber" - -/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/components/unary/vent_scrubber/New() - ..() - if(!id_tag) - id_tag = assign_uid_vents() - - for(var/f in filter_types) - if(istext(f)) - filter_types -= f - filter_types += gas_id2path(f) - -/obj/machinery/atmospherics/components/unary/vent_scrubber/on - on = TRUE - icon_state = "scrub_map_on" - -/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy() - var/area/A = get_area(src) - if (A) - A.air_scrub_names -= id_tag - A.air_scrub_info -= id_tag - - SSradio.remove_object(src,frequency) - radio_connection = null - adjacent_turfs.Cut() - return ..() - -/obj/machinery/atmospherics/components/unary/vent_scrubber/auto_use_power() - if(!on || welded || !is_operational() || !powered(power_channel)) - return FALSE - - var/amount = idle_power_usage - - if(scrubbing & SCRUBBING) - amount += idle_power_usage * length(filter_types) - else //scrubbing == SIPHONING - amount = active_power_usage - - if(widenet) - amount += amount * (adjacent_turfs.len * (adjacent_turfs.len / 2)) - use_power(amount, power_channel) - return TRUE - -/obj/machinery/atmospherics/components/unary/vent_scrubber/update_icon_nopipes() - cut_overlays() - if(showpipe) - add_overlay(getpipeimage(icon, "scrub_cap", initialize_directions)) - - if(welded) - icon_state = "scrub_welded" - return - - if(!nodes[1] || !on || !is_operational()) - icon_state = "scrub_off" - return - - if(scrubbing & SCRUBBING) - if(widenet) - icon_state = "scrub_wide" - else - icon_state = "scrub_on" - else //scrubbing == SIPHONING - icon_state = "scrub_purge" - -/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/set_frequency(new_frequency) - SSradio.remove_object(src, frequency) - frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, radio_filter_in) - -/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/broadcast_status() - if(!radio_connection) - return FALSE - - var/list/f_types = list() - for(var/path in GLOB.meta_gas_info) - var/list/gas = GLOB.meta_gas_info[path] - f_types += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in filter_types))) - - var/datum/signal/signal = new(list( - "tag" = id_tag, - "frequency" = frequency, - "device" = "VS", - "timestamp" = world.time, - "power" = on, - "scrubbing" = scrubbing, - "widenet" = widenet, - "filter_types" = f_types, - "sigtype" = "status" - )) - - var/area/A = get_area(src) - if(!A.air_scrub_names[id_tag]) - name = "\improper [A.name] air scrubber #[A.air_scrub_names.len + 1]" - A.air_scrub_names[id_tag] = name - - A.air_scrub_info[id_tag] = signal.data - radio_connection.post_signal(src, signal, radio_filter_out) - - return TRUE - -/obj/machinery/atmospherics/components/unary/vent_scrubber/atmosinit() - radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null - radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null - if(frequency) - set_frequency(frequency) - broadcast_status() - check_turfs() - ..() - -/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos() - ..() - if(welded || !is_operational()) - return FALSE - if(!nodes[1] || !on) - on = FALSE - return FALSE - scrub(loc) - if(widenet) - for(var/turf/tile in adjacent_turfs) - scrub(tile) - return TRUE - -/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile) - if(!istype(tile)) - return FALSE - var/datum/gas_mixture/environment = tile.return_air() - var/datum/gas_mixture/air_contents = airs[1] - var/list/env_gases = environment.gases - - if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE) - return FALSE - - if(scrubbing & SCRUBBING) - if(length(env_gases & filter_types)) - var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() - - //Take a gas sample - var/datum/gas_mixture/removed = tile.remove_air(transfer_moles) - - //Nothing left to remove from the tile - if(isnull(removed)) - return FALSE - - var/list/removed_gases = removed.gases - - //Filter it - var/datum/gas_mixture/filtered_out = new - var/list/filtered_gases = filtered_out.gases - filtered_out.temperature = removed.temperature - - for(var/gas in filter_types & removed_gases) - filtered_out.add_gas(gas) - filtered_gases[gas][MOLES] = removed_gases[gas][MOLES] - removed_gases[gas][MOLES] = 0 - - removed.garbage_collect() - - //Remix the resulting gases - air_contents.merge(filtered_out) - tile.assume_air(removed) - tile.air_update_turf() - - else //Just siphoning all air - - var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) - - var/datum/gas_mixture/removed = tile.remove_air(transfer_moles) - - air_contents.merge(removed) - tile.air_update_turf() - - update_parents() - - return TRUE - -//There is no easy way for an object to be notified of changes to atmos can pass flags -// So we check every machinery process (2 seconds) -/obj/machinery/atmospherics/components/unary/vent_scrubber/process() - if(widenet) - check_turfs() - -//we populate a list of turfs with nonatmos-blocked cardinal turfs AND -// diagonal turfs that can share atmos with *both* of the cardinal turfs - -/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/check_turfs() - adjacent_turfs.Cut() - var/turf/T = get_turf(src) - if(istype(T)) - adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir = 1) - -/obj/machinery/atmospherics/components/unary/vent_scrubber/receive_signal(datum/signal/signal) - if(!is_operational() || !signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command")) - return 0 - - var/mob/signal_sender = signal.data["user"] - - if("power" in signal.data) - on = text2num(signal.data["power"]) - if("power_toggle" in signal.data) - on = !on - - if("widenet" in signal.data) - widenet = text2num(signal.data["widenet"]) - if("toggle_widenet" in signal.data) - widenet = !widenet - - var/old_scrubbing = scrubbing - if("scrubbing" in signal.data) - scrubbing = text2num(signal.data["scrubbing"]) - if("toggle_scrubbing" in signal.data) - scrubbing = !scrubbing - if(scrubbing != old_scrubbing) - investigate_log(" was toggled to [scrubbing ? "scrubbing" : "siphon"] mode by [key_name(signal_sender)]",INVESTIGATE_ATMOS) - - if("toggle_filter" in signal.data) - filter_types ^= gas_id2path(signal.data["toggle_filter"]) - - if("set_filters" in signal.data) - filter_types = list() - for(var/gas in signal.data["set_filters"]) - filter_types += gas_id2path(gas) - - if("init" in signal.data) - name = signal.data["init"] - return - - if("status" in signal.data) - broadcast_status() - return //do not update_icon - - broadcast_status() - update_icon() - return - -/obj/machinery/atmospherics/components/unary/vent_scrubber/power_change() - ..() - update_icon_nopipes() - -/obj/machinery/atmospherics/components/unary/vent_scrubber/welder_act(mob/living/user, obj/item/I) - if(!I.tool_start_check(user, amount=0)) - return TRUE - to_chat(user, "Now welding the scrubber.") - if(I.use_tool(src, user, 20, volume=50)) - if(!welded) - user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.") - welded = TRUE - else - user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.") - welded = FALSE - update_icon() - pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) - pipe_vision_img.plane = ABOVE_HUD_PLANE - return TRUE - -/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user) - . = ..() - if(. && on && is_operational()) - to_chat(user, "You cannot unwrench [src], turn it off first!") - return FALSE - -/obj/machinery/atmospherics/components/unary/vent_scrubber/examine(mob/user) - ..() - if(welded) - to_chat(user, "It seems welded shut.") - -/obj/machinery/atmospherics/components/unary/vent_scrubber/can_crawl_through() - return !welded - -/obj/machinery/atmospherics/components/unary/vent_scrubber/attack_alien(mob/user) - if(!welded || !(do_after(user, 20, target = src))) - return - user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.") - welded = FALSE - update_icon() - pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) - pipe_vision_img.plane = ABOVE_HUD_PLANE - playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1) - - - -#undef SIPHONING -#undef SCRUBBING +#define SIPHONING 0 +#define SCRUBBING 1 + +/obj/machinery/atmospherics/components/unary/vent_scrubber + name = "air scrubber" + desc = "Has a valve and pump attached to it." + icon_state = "scrub_map" + use_power = IDLE_POWER_USE + idle_power_usage = 10 + active_power_usage = 60 + can_unwrench = TRUE + welded = FALSE + level = 1 + layer = GAS_SCRUBBER_LAYER + + var/id_tag = null + var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing + + var/filter_types = list(/datum/gas/carbon_dioxide) + var/volume_rate = 200 + var/widenet = 0 //is this scrubber acting on the 3x3 area around it. + var/list/turf/adjacent_turfs = list() + + var/frequency = FREQ_ATMOS_CONTROL + var/datum/radio_frequency/radio_connection + var/radio_filter_out + var/radio_filter_in + + pipe_state = "scrubber" + +/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1 + piping_layer = PIPING_LAYER_MIN + pixel_x = -PIPING_LAYER_P_X + pixel_y = -PIPING_LAYER_P_Y + +/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3 + piping_layer = PIPING_LAYER_MAX + pixel_x = PIPING_LAYER_P_X + pixel_y = PIPING_LAYER_P_Y + +/obj/machinery/atmospherics/components/unary/vent_scrubber/New() + ..() + if(!id_tag) + id_tag = assign_uid_vents() + + for(var/f in filter_types) + if(istext(f)) + filter_types -= f + filter_types += gas_id2path(f) + +/obj/machinery/atmospherics/components/unary/vent_scrubber/on + on = TRUE + icon_state = "scrub_map_on" + +/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1 + piping_layer = PIPING_LAYER_MIN + pixel_x = -PIPING_LAYER_P_X + pixel_y = -PIPING_LAYER_P_Y + +/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3 + piping_layer = PIPING_LAYER_MAX + pixel_x = PIPING_LAYER_P_X + pixel_y = PIPING_LAYER_P_Y + +/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy() + var/area/A = get_area(src) + if (A) + A.air_scrub_names -= id_tag + A.air_scrub_info -= id_tag + + SSradio.remove_object(src,frequency) + radio_connection = null + adjacent_turfs.Cut() + return ..() + +/obj/machinery/atmospherics/components/unary/vent_scrubber/auto_use_power() + if(!on || welded || !is_operational() || !powered(power_channel)) + return FALSE + + var/amount = idle_power_usage + + if(scrubbing & SCRUBBING) + amount += idle_power_usage * length(filter_types) + else //scrubbing == SIPHONING + amount = active_power_usage + + if(widenet) + amount += amount * (adjacent_turfs.len * (adjacent_turfs.len / 2)) + use_power(amount, power_channel) + return TRUE + +/obj/machinery/atmospherics/components/unary/vent_scrubber/update_icon_nopipes() + cut_overlays() + if(showpipe) + add_overlay(getpipeimage(icon, "scrub_cap", initialize_directions)) + + if(welded) + icon_state = "scrub_welded" + return + + if(!nodes[1] || !on || !is_operational()) + icon_state = "scrub_off" + return + + if(scrubbing & SCRUBBING) + if(widenet) + icon_state = "scrub_wide" + else + icon_state = "scrub_on" + else //scrubbing == SIPHONING + icon_state = "scrub_purge" + +/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/set_frequency(new_frequency) + SSradio.remove_object(src, frequency) + frequency = new_frequency + radio_connection = SSradio.add_object(src, frequency, radio_filter_in) + +/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/broadcast_status() + if(!radio_connection) + return FALSE + + var/list/f_types = list() + for(var/path in GLOB.meta_gas_ids) + f_types += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in filter_types))) + + var/datum/signal/signal = new(list( + "tag" = id_tag, + "frequency" = frequency, + "device" = "VS", + "timestamp" = world.time, + "power" = on, + "scrubbing" = scrubbing, + "widenet" = widenet, + "filter_types" = f_types, + "sigtype" = "status" + )) + + var/area/A = get_area(src) + if(!A.air_scrub_names[id_tag]) + name = "\improper [A.name] air scrubber #[A.air_scrub_names.len + 1]" + A.air_scrub_names[id_tag] = name + + A.air_scrub_info[id_tag] = signal.data + radio_connection.post_signal(src, signal, radio_filter_out) + + return TRUE + +/obj/machinery/atmospherics/components/unary/vent_scrubber/atmosinit() + radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null + radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null + if(frequency) + set_frequency(frequency) + broadcast_status() + check_turfs() + ..() + +/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos() + ..() + if(welded || !is_operational()) + return FALSE + if(!nodes[1] || !on) + on = FALSE + return FALSE + scrub(loc) + if(widenet) + for(var/turf/tile in adjacent_turfs) + scrub(tile) + return TRUE + +/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile) + if(!istype(tile)) + return FALSE + var/datum/gas_mixture/environment = tile.return_air() + var/datum/gas_mixture/air_contents = airs[1] + var/list/env_gases = environment.gases + + if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE) + return FALSE + + if(scrubbing & SCRUBBING) + if(length(env_gases & filter_types)) + var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() + + //Take a gas sample + var/datum/gas_mixture/removed = tile.remove_air(transfer_moles) + + //Nothing left to remove from the tile + if(isnull(removed)) + return FALSE + + var/list/removed_gases = removed.gases + + //Filter it + var/datum/gas_mixture/filtered_out = new + var/list/filtered_gases = filtered_out.gases + filtered_out.temperature = removed.temperature + + for(var/gas in filter_types & removed_gases) + filtered_gases[gas] = removed_gases[gas] + removed_gases[gas] = 0 + + GAS_GARBAGE_COLLECT(removed.gases) + + //Remix the resulting gases + air_contents.merge(filtered_out) + tile.assume_air(removed) + tile.air_update_turf() + + else //Just siphoning all air + + var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) + + var/datum/gas_mixture/removed = tile.remove_air(transfer_moles) + + air_contents.merge(removed) + tile.air_update_turf() + + update_parents() + + return TRUE + +//There is no easy way for an object to be notified of changes to atmos can pass flags +// So we check every machinery process (2 seconds) +/obj/machinery/atmospherics/components/unary/vent_scrubber/process() + if(widenet) + check_turfs() + +//we populate a list of turfs with nonatmos-blocked cardinal turfs AND +// diagonal turfs that can share atmos with *both* of the cardinal turfs + +/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/check_turfs() + adjacent_turfs.Cut() + var/turf/T = get_turf(src) + if(istype(T)) + adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir = 1) + +/obj/machinery/atmospherics/components/unary/vent_scrubber/receive_signal(datum/signal/signal) + if(!is_operational() || !signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command")) + return 0 + + var/mob/signal_sender = signal.data["user"] + + if("power" in signal.data) + on = text2num(signal.data["power"]) + if("power_toggle" in signal.data) + on = !on + + if("widenet" in signal.data) + widenet = text2num(signal.data["widenet"]) + if("toggle_widenet" in signal.data) + widenet = !widenet + + var/old_scrubbing = scrubbing + if("scrubbing" in signal.data) + scrubbing = text2num(signal.data["scrubbing"]) + if("toggle_scrubbing" in signal.data) + scrubbing = !scrubbing + if(scrubbing != old_scrubbing) + investigate_log(" was toggled to [scrubbing ? "scrubbing" : "siphon"] mode by [key_name(signal_sender)]",INVESTIGATE_ATMOS) + + if("toggle_filter" in signal.data) + filter_types ^= gas_id2path(signal.data["toggle_filter"]) + + if("set_filters" in signal.data) + filter_types = list() + for(var/gas in signal.data["set_filters"]) + filter_types += gas_id2path(gas) + + if("init" in signal.data) + name = signal.data["init"] + return + + if("status" in signal.data) + broadcast_status() + return //do not update_icon + + broadcast_status() + update_icon() + return + +/obj/machinery/atmospherics/components/unary/vent_scrubber/power_change() + ..() + update_icon_nopipes() + +/obj/machinery/atmospherics/components/unary/vent_scrubber/welder_act(mob/living/user, obj/item/I) + if(!I.tool_start_check(user, amount=0)) + return TRUE + to_chat(user, "Now welding the scrubber.") + if(I.use_tool(src, user, 20, volume=50)) + if(!welded) + user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.") + welded = TRUE + else + user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.") + welded = FALSE + update_icon() + pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) + pipe_vision_img.plane = ABOVE_HUD_PLANE + return TRUE + +/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user) + . = ..() + if(. && on && is_operational()) + to_chat(user, "You cannot unwrench [src], turn it off first!") + return FALSE + +/obj/machinery/atmospherics/components/unary/vent_scrubber/examine(mob/user) + ..() + if(welded) + to_chat(user, "It seems welded shut.") + +/obj/machinery/atmospherics/components/unary/vent_scrubber/can_crawl_through() + return !welded + +/obj/machinery/atmospherics/components/unary/vent_scrubber/attack_alien(mob/user) + if(!welded || !(do_after(user, 20, target = src))) + return + user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.") + welded = FALSE + update_icon() + pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) + pipe_vision_img.plane = ABOVE_HUD_PLANE + playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1) + + + +#undef SIPHONING +#undef SCRUBBING diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index c4fa387ab0..38178a4339 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -145,7 +145,7 @@ var/member_gases = member.air_temporary.gases for(var/id in member_gases) - member_gases[id][MOLES] *= member.volume/air.volume + member_gases[id] *= member.volume/air.volume member.air_temporary.temperature = air.temperature @@ -254,4 +254,4 @@ G.copy_from(total_gas_mixture) var/list/G_gases = G.gases for(var/id in G_gases) - G_gases[id][MOLES] *= G.volume/total_gas_mixture.volume + G_gases[id] *= G.volume/total_gas_mixture.volume diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index 20251418bc..adb17b4e94 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -131,8 +131,7 @@ if(!isopenturf(O)) return FALSE var/datum/gas_mixture/merger = new - merger.assert_gas(spawn_id) - merger.gases[spawn_id][MOLES] = (spawn_mol) + merger.gases[spawn_id] = (spawn_mol) merger.temperature = spawn_temp O.assume_air(merger) O.air_update_turf(TRUE) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index d23a5df958..bad2b85bfe 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -204,16 +204,14 @@ /obj/machinery/portable_atmospherics/canister/proc/create_gas() if(gas_type) - air_contents.add_gas(gas_type) if(starter_temp) air_contents.temperature = starter_temp - air_contents.gases[gas_type][MOLES] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) + air_contents.gases[gas_type] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) if(starter_temp) air_contents.temperature = starter_temp /obj/machinery/portable_atmospherics/canister/air/create_gas() - air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen) - air_contents.gases[/datum/gas/oxygen][MOLES] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) - air_contents.gases[/datum/gas/nitrogen][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) + air_contents.gases[/datum/gas/oxygen] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) + air_contents.gases[/datum/gas/nitrogen] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) #define HOLDING (1<<0) #define CONNECTED (1<<1) @@ -439,10 +437,10 @@ var/list/danger = list() for(var/id in air_contents.gases) var/gas = air_contents.gases[id] - if(!gas[GAS_META][META_GAS_DANGER]) + if(!GLOB.meta_gas_dangers[id]) continue - if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility - danger[gas[GAS_META][META_GAS_NAME]] = gas[MOLES] //ex. "plasma" = 20 + if(gas > (GLOB.meta_gas_visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility + danger[GLOB.meta_gas_names[id]] = gas //ex. "plasma" = 20 if(danger.len) message_admins("[ADMIN_LOOKUPFLW(usr)] opened a canister that contains the following at [ADMIN_VERBOSEJMP(src)]:") diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 29a454f59a..28cdb56e3d 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -1,146 +1,144 @@ -/obj/machinery/portable_atmospherics/scrubber - name = "portable air scrubber" - icon_state = "pscrubber:0" - density = TRUE - - var/on = FALSE - var/volume_rate = 1000 - volume = 1000 - - var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitryl, /datum/gas/tritium, /datum/gas/hypernoblium, /datum/gas/water_vapor) - -/obj/machinery/portable_atmospherics/scrubber/Destroy() - var/turf/T = get_turf(src) - T.assume_air(air_contents) - air_update_turf() - return ..() - -/obj/machinery/portable_atmospherics/scrubber/update_icon() - icon_state = "pscrubber:[on]" - - cut_overlays() - if(holding) - add_overlay("scrubber-open") - if(connected_port) - add_overlay("scrubber-connector") - -/obj/machinery/portable_atmospherics/scrubber/process_atmos() - ..() - if(!on) - return - - if(holding) - scrub(holding.air_contents) - else - var/turf/T = get_turf(src) - scrub(T.return_air()) - -/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture) - var/transfer_moles = min(1, volume_rate / mixture.volume) * mixture.total_moles() - - var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter. - var/datum/gas_mixture/filtered = new - if(!filtering) - return - - filtered.temperature = filtering.temperature - for(var/gas in filtering.gases & scrubbing) - filtered.add_gas(gas) - filtered.gases[gas][MOLES] = filtering.gases[gas][MOLES] // Shuffle the "bad" gasses to the filtered mixture. - filtering.gases[gas][MOLES] = 0 - filtering.garbage_collect() // Now that the gasses are set to 0, clean up the mixture. - - air_contents.merge(filtered) // Store filtered out gasses. - mixture.merge(filtering) // Returned the cleaned gas. - if(!holding) - air_update_turf() - -/obj/machinery/portable_atmospherics/scrubber/emp_act(severity) - . = ..() - if(. & EMP_PROTECT_SELF) - return - if(is_operational()) - if(prob(50 / severity)) - on = !on - update_icon() - -/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ - datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state) - ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) - if(!ui) - ui = new(user, src, ui_key, "portable_scrubber", name, 420, 435, master_ui, state) - ui.open() - -/obj/machinery/portable_atmospherics/scrubber/ui_data() - var/data = list() - data["on"] = on - data["connected"] = connected_port ? 1 : 0 - data["pressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0) - - data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers - data["filter_types"] = list() - for(var/path in GLOB.meta_gas_info) - var/list/gas = GLOB.meta_gas_info[path] - data["filter_types"] += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in scrubbing))) - - if(holding) - data["holding"] = list() - data["holding"]["name"] = holding.name - data["holding"]["pressure"] = round(holding.air_contents.return_pressure()) - return data - -/obj/machinery/portable_atmospherics/scrubber/ui_act(action, params) - if(..()) - return - switch(action) - if("power") - on = !on - . = TRUE - if("eject") - if(holding) - holding.forceMove(drop_location()) - holding = null - . = TRUE - if("toggle_filter") - scrubbing ^= gas_id2path(params["val"]) - . = TRUE - update_icon() - -/obj/machinery/portable_atmospherics/scrubber/huge - name = "huge air scrubber" - icon_state = "scrubber:0" - anchored = TRUE - active_power_usage = 500 - idle_power_usage = 10 - - volume_rate = 1500 - volume = 50000 - - var/movable = FALSE - -/obj/machinery/portable_atmospherics/scrubber/huge/movable - movable = TRUE - -/obj/machinery/portable_atmospherics/scrubber/huge/update_icon() - icon_state = "scrubber:[on]" - -/obj/machinery/portable_atmospherics/scrubber/huge/process_atmos() - if((!anchored && !movable) || !is_operational()) - on = FALSE - update_icon() - use_power = on ? ACTIVE_POWER_USE : IDLE_POWER_USE - if(!on) - return - - ..() - if(!holding) - var/turf/T = get_turf(src) - for(var/turf/AT in T.GetAtmosAdjacentTurfs(alldir = TRUE)) - scrub(AT.return_air()) - -/obj/machinery/portable_atmospherics/scrubber/huge/attackby(obj/item/W, mob/user) - if(default_unfasten_wrench(user, W)) - if(!movable) - on = FALSE - else - return ..() +/obj/machinery/portable_atmospherics/scrubber + name = "portable air scrubber" + icon_state = "pscrubber:0" + density = TRUE + + var/on = FALSE + var/volume_rate = 1000 + volume = 1000 + + var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitryl, /datum/gas/tritium, /datum/gas/hypernoblium, /datum/gas/water_vapor) + +/obj/machinery/portable_atmospherics/scrubber/Destroy() + var/turf/T = get_turf(src) + T.assume_air(air_contents) + air_update_turf() + return ..() + +/obj/machinery/portable_atmospherics/scrubber/update_icon() + icon_state = "pscrubber:[on]" + + cut_overlays() + if(holding) + add_overlay("scrubber-open") + if(connected_port) + add_overlay("scrubber-connector") + +/obj/machinery/portable_atmospherics/scrubber/process_atmos() + ..() + if(!on) + return + + if(holding) + scrub(holding.air_contents) + else + var/turf/T = get_turf(src) + scrub(T.return_air()) + +/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture) + var/transfer_moles = min(1, volume_rate / mixture.volume) * mixture.total_moles() + + var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter. + var/datum/gas_mixture/filtered = new + if(!filtering) + return + + filtered.temperature = filtering.temperature + for(var/gas in filtering.gases & scrubbing) + filtered.gases[gas] = filtering.gases[gas] // Shuffle the "bad" gasses to the filtered mixture. + filtering.gases[gas] = 0 + GAS_GARBAGE_COLLECT(filtering.gases) + + air_contents.merge(filtered) // Store filtered out gasses. + mixture.merge(filtering) // Returned the cleaned gas. + if(!holding) + air_update_turf() + +/obj/machinery/portable_atmospherics/scrubber/emp_act(severity) + . = ..() + if(. & EMP_PROTECT_SELF) + return + if(is_operational()) + if(prob(50 / severity)) + on = !on + update_icon() + +/obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "portable_scrubber", name, 420, 435, master_ui, state) + ui.open() + +/obj/machinery/portable_atmospherics/scrubber/ui_data() + var/data = list() + data["on"] = on + data["connected"] = connected_port ? 1 : 0 + data["pressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0) + + data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers + data["filter_types"] = list() + for(var/path in GLOB.meta_gas_ids) + data["filter_types"] += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in scrubbing))) + + if(holding) + data["holding"] = list() + data["holding"]["name"] = holding.name + data["holding"]["pressure"] = round(holding.air_contents.return_pressure()) + return data + +/obj/machinery/portable_atmospherics/scrubber/ui_act(action, params) + if(..()) + return + switch(action) + if("power") + on = !on + . = TRUE + if("eject") + if(holding) + holding.forceMove(drop_location()) + holding = null + . = TRUE + if("toggle_filter") + scrubbing ^= gas_id2path(params["val"]) + . = TRUE + update_icon() + +/obj/machinery/portable_atmospherics/scrubber/huge + name = "huge air scrubber" + icon_state = "scrubber:0" + anchored = TRUE + active_power_usage = 500 + idle_power_usage = 10 + + volume_rate = 1500 + volume = 50000 + + var/movable = FALSE + +/obj/machinery/portable_atmospherics/scrubber/huge/movable + movable = TRUE + +/obj/machinery/portable_atmospherics/scrubber/huge/update_icon() + icon_state = "scrubber:[on]" + +/obj/machinery/portable_atmospherics/scrubber/huge/process_atmos() + if((!anchored && !movable) || !is_operational()) + on = FALSE + update_icon() + use_power = on ? ACTIVE_POWER_USE : IDLE_POWER_USE + if(!on) + return + + ..() + if(!holding) + var/turf/T = get_turf(src) + for(var/turf/AT in T.GetAtmosAdjacentTurfs(alldir = TRUE)) + scrub(AT.return_air()) + +/obj/machinery/portable_atmospherics/scrubber/huge/attackby(obj/item/W, mob/user) + if(default_unfasten_wrench(user, W)) + if(!movable) + on = FALSE + else + return ..() diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 7274f73965..8d2e6fcedf 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -68,6 +68,7 @@ GLOB.poi_list |= src LAZYADD(GLOB.mob_spawners[job_description ? job_description : name], src) + /obj/effect/mob_spawn/Destroy() GLOB.poi_list -= src LAZYREMOVE(GLOB.mob_spawners[job_description ? job_description : name], src) @@ -75,6 +76,9 @@ GLOB.mob_spawners -= job_description ? job_description : name return ..() +/obj/effect/mob_spawn/proc/can_latejoin() //If it can be taken from the lobby. + return TRUE + /obj/effect/mob_spawn/proc/special(mob/M) return diff --git a/code/modules/cargo/bounties/engineering.dm b/code/modules/cargo/bounties/engineering.dm index eb1764d482..e10d48f3bf 100644 --- a/code/modules/cargo/bounties/engineering.dm +++ b/code/modules/cargo/bounties/engineering.dm @@ -12,7 +12,7 @@ var/obj/item/tank/T = O if(!T.air_contents.gases[gas_type]) return FALSE - return T.air_contents.gases[gas_type][MOLES] >= moles_required + return T.air_contents.gases[gas_type] >= moles_required /datum/bounty/item/engineering/gas/nitryl_tank name = "Full Tank of Nitryl" diff --git a/code/modules/cargo/exports/large_objects.dm b/code/modules/cargo/exports/large_objects.dm index b5f0e7a240..bf77d836fb 100644 --- a/code/modules/cargo/exports/large_objects.dm +++ b/code/modules/cargo/exports/large_objects.dm @@ -131,6 +131,24 @@ unit_name = "security barrier" export_types = list(/obj/item/grenade/barrier, /obj/structure/barricade/security) +/datum/export/large/gas_canister + cost = 10 //Base cost of canister. You get more for nice gases inside. + unit_name = "Gas Canister" + export_types = list(/obj/machinery/portable_atmospherics/canister) +/datum/export/large/gas_canister/get_cost(obj/O) + var/obj/machinery/portable_atmospherics/canister/C = O + var/worth = 10 + var/gases = C.air_contents.gases + + worth += gases[/datum/gas/bz]*4 + worth += gases[/datum/gas/stimulum]*25 + worth += gases[/datum/gas/hypernoblium]*1000 + worth += gases[/datum/gas/miasma]*15 + worth += gases[/datum/gas/tritium]*7 + worth += gases[/datum/gas/pluoxium]*6 + worth += gases[/datum/gas/nitryl]*30 + return worth + /datum/export/large/odysseus cost = 5500 unit_name = "working odysseus" diff --git a/code/modules/cargo/exports/manifest.dm b/code/modules/cargo/exports/manifest.dm index 763ca70dfe..02b060e0bf 100644 --- a/code/modules/cargo/exports/manifest.dm +++ b/code/modules/cargo/exports/manifest.dm @@ -80,13 +80,13 @@ // Paper work done correctly /datum/export/paperwork_correct - cost = 50 + cost = 150 unit_name = "correct paperwork" - export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest/paperwork_correct) + export_types = list(/obj/item/folder/paperwork_correct) // Paper work not done retruned /datum/export/paperwork_incorrect cost = -500 // Failed to meet NT standers unit_name = "returned incorrect paperwork" - export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest/paperwork) + export_types = list(/obj/item/folder/paperwork) diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm index 1f0d7d29b3..b576928bfe 100644 --- a/code/modules/cargo/order.dm +++ b/code/modules/cargo/order.dm @@ -97,12 +97,14 @@ return C //Paperwork for NT -/obj/item/paper/fluff/jobs/cargo/manifest/paperwork +/obj/item/folder/paperwork name = "Incomplete Paperwork" desc = "These should've been filled out four months ago! Unfinished grant papers issued by Nanotrasen's finance department. Complete this page for additional funding." icon = 'icons/obj/bureaucracy.dmi' + icon_state = "docs_generic" -/obj/item/paper/fluff/jobs/cargo/manifest/paperwork_correct +/obj/item/folder/paperwork_correct name = "Finished Paperwork" desc = "A neat stack of filled-out forms, in triplicate and signed. Is there anything more satisfying? Make sure they get stamped." icon = 'icons/obj/bureaucracy.dmi' + icon_state = "docs_verified" diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 479a8db0ad..bde3021c76 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -433,7 +433,6 @@ /datum/supply_pack/security/russianclothing name = "Russian Surplus Clothing" desc = "An old russian crate full of surplus armor that they used to use! Has two sets of bulletproff armor, a few union suits and some warm hats!" - hidden = TRUE contraband = TRUE cost = 5000 // Its basicly sec suits, good boots/gloves contains = list(/obj/item/clothing/suit/security/officer/russian, @@ -517,14 +516,16 @@ /datum/supply_pack/security/armory/ballistic name = "Combat Shotguns Crate" - desc = "For when the enemy absolutely needs to be replaced with lead. Contains three Aussec-designed Combat Shotguns, and three Shotgun Bandoliers. Requires Armory access to open." + desc = "For when the enemy absolutely needs to be replaced with lead. Contains three Aussec-designed Combat Shotguns, with three Shotgun Bandoliers, as well as seven buchshot and 12g shotgun slugs. Requires Armory access to open." cost = 8000 contains = list(/obj/item/gun/ballistic/shotgun/automatic/combat, /obj/item/gun/ballistic/shotgun/automatic/combat, /obj/item/gun/ballistic/shotgun/automatic/combat, /obj/item/storage/belt/bandolier, /obj/item/storage/belt/bandolier, - /obj/item/storage/belt/bandolier) + /obj/item/storage/belt/bandolier, + /obj/item/storage/box/lethalshot, + /obj/item/storage/box/lethalslugs) crate_name = "combat shotguns crate" /datum/supply_pack/security/armory/dragnetgun @@ -568,7 +569,7 @@ /datum/supply_pack/security/armory/fire name = "Incendiary Weapons Crate" - desc = "Burn, baby burn. Contains three incendiary grenades, three plasma canisters, and a flamethrower. Requires Brige access to open." + desc = "Burn, baby burn. Contains three incendiary grenades, seven incendiary slugs, three plasma canisters, and a flamethrower. Requires Brige access to open." cost = 1500 access = ACCESS_HEADS contains = list(/obj/item/flamethrower/full, @@ -577,7 +578,8 @@ /obj/item/tank/internals/plasma, /obj/item/grenade/chem_grenade/incendiary, /obj/item/grenade/chem_grenade/incendiary, - /obj/item/grenade/chem_grenade/incendiary) + /obj/item/grenade/chem_grenade/incendiary, + /obj/item/storage/box/fireshot) crate_name = "incendiary weapons crate" crate_type = /obj/structure/closet/crate/secure/plasma dangerous = TRUE @@ -630,11 +632,13 @@ /datum/supply_pack/security/armory/riotshotguns name = "Riot Shotgun Crate" - desc = "For when the greytide gets really uppity. Contains three riot Shotguns. Requires Armory access to open." + desc = "For when the greytide gets really uppity. Contains three riot shotguns, seven rubber shot and beanbag shells. Requires Armory access to open." cost = 6000 contains = list(/obj/item/gun/ballistic/shotgun/riot, /obj/item/gun/ballistic/shotgun/riot, - /obj/item/gun/ballistic/shotgun/riot) + /obj/item/gun/ballistic/shotgun/riot, + /obj/item/storage/box/rubbershot, + /obj/item/storage/box/beanbag) crate_name = "riot shotgun crate" /datum/supply_pack/security/armory/swat @@ -751,13 +755,24 @@ /datum/supply_pack/engineering/engihardsuit name = "Engineering Hardsuit" - desc = "Poly 'Who stole all the hardsuits!' Well now you can get more hardsuits if needed! NOTE ONE HARDSUIT IS IN THIS CRATE, as well as one air tank and maks!" + desc = "Poly 'Who stole all the hardsuits!' Well now you can get more hardsuits if needed! NOTE ONE HARDSUIT IS IN THIS CRATE, as well as one air tank and mask!" cost = 2500 contains = list(/obj/item/tank/internals/air, /obj/item/clothing/mask/gas, /obj/item/clothing/suit/space/hardsuit/engine) crate_name = "engineering hardsuit" +/datum/supply_pack/engineering/atmoshardsuit + name = "Atmospherics Hardsuit" + desc = "Too many techs and not enough hardsuits? Time to buy some more! Comes with gas mask and air tank. Ask the CE to open." + cost = 5000 + access = ACCESS_CE + contains = list(/obj/item/tank/internals/air, + /obj/item/clothing/mask/gas, + /obj/item/clothing/suit/space/hardsuit/engine/atmos) + crate_name = "atmospherics hardsuit" + crate_type = /obj/structure/closet/crate/secure/engineering + /datum/supply_pack/engineering/industrialrcd name = "Industrial RCD" desc = "A industrial RCD in case the station has gone through more then one meteor storm and the CE needs to bring out the somthing a bit more reliable. Dose not contain spare ammo for the industrial RCD or any other RCD modles." @@ -881,7 +896,6 @@ ) crate_name= "shield sat crate" - /datum/supply_pack/engineering/shield_sat_control name = "Shield System Control Board" desc = "A control system for the Shield Generator Satellite system." @@ -889,7 +903,6 @@ contains = list(/obj/item/circuitboard/computer/sat_control) crate_name= "shield control board crate" - ////////////////////////////////////////////////////////////////////////////// //////////////////////// Engine Construction ///////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -959,6 +972,15 @@ crate_name = "grounding rod crate" crate_type = /obj/structure/closet/crate/engineering/electrical +/datum/supply_pack/engine/mason + name = "M.A.S.O.N RIG Crate" + desc = "The rare M.A.S.O.N RIG. Requires CE access to open." + cost = 15000 + access = ACCESS_CE + contains = list(/obj/item/clothing/suit/space/hardsuit/ancient/mason) + crate_name = "M.A.S.O.N Rig" + crate_type = /obj/structure/closet/crate/secure/engineering + /datum/supply_pack/engine/PA name = "Particle Accelerator Crate" desc = "A supermassive black hole or hyper-powered teslaball are the perfect way to spice up any party! This \"My First Apocalypse\" kit contains everything you need to build your own Particle Accelerator! Ages 10 and up." @@ -1135,7 +1157,7 @@ /datum/supply_pack/materials/bz name = "BZ Canister Crate" desc = "Contains a canister of BZ. Requires Toxins access to open." - cost = 5000 + cost = 7500 // Costs 3 credits more than what you can get for selling it. access = ACCESS_TOX_STORAGE contains = list(/obj/machinery/portable_atmospherics/canister/bz) crate_name = "BZ canister crate" @@ -1534,6 +1556,15 @@ crate_type = /obj/structure/closet/crate/secure/science dangerous = TRUE +/datum/supply_pack/science/tech_slugs + name = "Tech Slug Ammo Shells" + desc = "A new type of shell that is able to be made into a few different dangerous types. Contains two boxes of tech slugs, 14 shells in all." + cost = 1000 + contains = list(/obj/item/storage/box/techsslug, + /obj/item/storage/box/techsslug) + crate_name = "tech slug crate" + + ////////////////////////////////////////////////////////////////////////////// /////////////////////////////// Service ////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -1541,7 +1572,6 @@ /datum/supply_pack/service group = "Service" - /datum/supply_pack/service/advlighting name = "Advanced Lighting crate" desc = "Thanks to advanced lighting tech we here at the Lamp Factory have be able to produce more lamps and lamp items! This crate has three lamps, a box of lights and a state of the art rapid-light-device!" @@ -1566,6 +1596,14 @@ /obj/item/stack/packageWrap) crate_name = "cargo supplies crate" +/datum/supply_pack/service/food_cart + name = "Food Cart Crate" + desc = "Want to sell food on the go? Cook lost their cart? Well we just so happen to have a few carts to spare!" + cost = 1000 + contains = list(/obj/machinery/food_cart) + crate_name = "food cart crate" + crate_type = /obj/structure/closet/crate + /datum/supply_pack/service/noslipfloor name = "High-traction Floor Tiles" desc = "Make slipping a thing of the past with sixty industrial-grade anti-slip floortiles!" @@ -1574,6 +1612,14 @@ /obj/item/stack/tile/noslip/thirty) crate_name = "high-traction floor tiles crate" +/datum/supply_pack/service/icecream_cart + name = "Ice Cream Cart Crate" + desc = "Plasma fire a to hot for you, want a nice treat after a hard days work? Well now we have the cart for you! This Ice Cream Vat has everthing you need to make you and your friends so ice cream treats! This cart comes stocked with some ingredients for each type of scoopable icecream." + cost = 2750 //Comes prestocked with basic ingredients + contains = list(/obj/machinery/icecream_vat) + crate_name = "ice cream vat crate" + crate_type = /obj/structure/closet/crate + /datum/supply_pack/service/janitor name = "Janitorial Supplies Crate" desc = "Fight back against dirt and grime with Nanotrasen's Janitorial Essentials(tm)! Contains three buckets, caution signs, and cleaner grenades. Also has a single mop, spray cleaner, rag, NT soap and a trash bag." @@ -1702,6 +1748,10 @@ crate_name = "shaft miner starter kit" crate_type = /obj/structure/closet/crate/secure +////////////////////////////////////////////////////////////////////////////// +/////////////////////////// Vending Restocks ///////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + /datum/supply_pack/service/vending/bartending name = "Bartending Supply Crate" desc = "Bring on the booze with vending machine refills, as well as a free book containing the well-kept secrets to the bartending trade!" @@ -1910,6 +1960,17 @@ crate_name = "hydroponics backpack crate" crate_type = /obj/structure/closet/crate/secure +/datum/supply_pack/organic/mre + name = "MRE supply kit (emergency rations)" + desc = "The lights are out. Oxygen's running low. You've run out of food except space weevils. Don't let this be you! Order our NT branded MRE kits today! This pack contains 5 MRE packs with a randomized menu and an oxygen tank." + cost = 2000 + contains = list(/obj/item/storage/box/mre/menu1/safe, + /obj/item/storage/box/mre/menu1/safe, + /obj/item/storage/box/mre/menu2/safe, + /obj/item/storage/box/mre/menu2/safe, + /obj/item/storage/box/mre/menu3) + crate_name = "MRE crate (emergency rations)" + /datum/supply_pack/organic/pizza name = "Pizza Crate" desc = "Best prices on this side of the galaxy. All deliveries are guaranteed to be 99% anomaly-free!" @@ -2202,7 +2263,8 @@ /obj/item/storage/fancy/cigarettes/cigpack_shadyjims, /obj/item/clothing/mask/gas/syndicate, /obj/item/clothing/neck/necklace/dope, - /obj/item/vending_refill/donksoft) + /obj/item/vending_refill/donksoft, + /obj/item/circuitboard/computer/arcade/amputation) crate_name = "crate" /datum/supply_pack/costumes_toys/foamforce @@ -2671,16 +2733,16 @@ name = "Freelance Paper work" desc = "The Nanotrasen Primary Bureaucratic Database Intelligence (PDBI) reports that the station has not completed its funding and grant paperwork this solar cycle. In order to gain further funding, your station is required to fill out (10) ten of these forms or no additional capital will be disbursed. We have sent you ten copies of the following form and we expect every one to be up to Nanotrasen Standards." // Disbursement. It's not a typo, look it up. cost = 400 // Net of 0 credits - contains = list(/obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork, + contains = list(/obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, /obj/item/pen/fountain, /obj/item/pen/fountain, /obj/item/pen/fountain, diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 7c08a3332c..10e98e92b8 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -467,6 +467,24 @@ GLOBAL_LIST_EMPTY(asset_datums) "stamp-law" = 'icons/stamp_icons/large_stamp-law.png' ) +/datum/asset/spritesheet/simple/minesweeper + name = "minesweeper" + assets = list( + "1" = 'icons/misc/minesweeper_tiles/one.png', + "2" = 'icons/misc/minesweeper_tiles/two.png', + "3" = 'icons/misc/minesweeper_tiles/three.png', + "4" = 'icons/misc/minesweeper_tiles/four.png', + "5" = 'icons/misc/minesweeper_tiles/five.png', + "6" = 'icons/misc/minesweeper_tiles/six.png', + "7" = 'icons/misc/minesweeper_tiles/seven.png', + "8" = 'icons/misc/minesweeper_tiles/eight.png', + "empty" = 'icons/misc/minesweeper_tiles/empty.png', + "flag" = 'icons/misc/minesweeper_tiles/flag.png', + "hidden" = 'icons/misc/minesweeper_tiles/hidden.png', + "mine" = 'icons/misc/minesweeper_tiles/mine.png', + "minehit" = 'icons/misc/minesweeper_tiles/minehit.png' + ) + /datum/asset/simple/IRV assets = list( "jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js', diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 91a329c67b..7a6fdad721 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -59,6 +59,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/preferred_map = null var/pda_style = MONO var/pda_color = "#808000" + var/pda_skin = PDA_SKIN_ALT var/uses_glasses_colour = 0 @@ -154,6 +155,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) ) var/list/custom_names = list() + var/preferred_ai_core_display = "Blue" var/prefered_security_department = SEC_DEPT_RANDOM var/custom_species = null @@ -303,10 +305,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) old_group = namedata["group"] dat += "
" dat += "[namedata["pref_name"]]: [custom_names[custom_name_id]] " - dat += "
" - dat += "Custom job preferences:
" - dat += "Prefered security department: [prefered_security_department]
" + dat += "

" + dat += "Custom job preferences:
" + dat += "Preferred AI Core Display: [preferred_ai_core_display]
" + dat += "Preferred Security Department: [prefered_security_department]
" dat += "
" //Character Appearance @@ -683,48 +686,48 @@ GLOBAL_LIST_EMPTY(preferences_datums) else if(pref_species.use_skintones) dat += "Genitals use skintone:[features["genitals_use_skintone"] == TRUE ? "Yes" : "No"]" - dat += "Has Penis:" + dat += "

Penis

" dat += "[features["has_cock"] == TRUE ? "Yes" : "No"]" - if(features["has_cock"] == TRUE) + if(features["has_cock"]) if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Penis Color:" - dat += "   (Skin tone overriding)
" + dat += "Penis Color:
" + dat += "   (Skin tone overriding)
" else - dat += "Penis Color:" + dat += "Penis Color:
" dat += "    Change
" dat += "Penis Shape: [features["cock_shape"]]" dat += "Penis Length: [features["cock_length"]] inch(es)" dat += "Has Testicles:[features["has_balls"] == TRUE ? "Yes" : "No"]" - if(features["has_balls"] == TRUE) + if(features["has_balls"]) if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Testicles Color:" + dat += "Testicles Color:
" dat += "   (Skin tone overriding)
" else - dat += "Testicles Color:" + dat += "Testicles Color:
" dat += "    Change
" dat += "Testicles showing:[features["balls_shape"]]" dat += APPEARANCE_CATEGORY_COLUMN - dat += "Has Vagina:" + dat += "

Vagina

" dat += "[features["has_vag"] == TRUE ? "Yes" : "No"]" if(features["has_vag"]) dat += "Vagina Type: [features["vag_shape"]]" if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Vagina Color:" + dat += "Vagina Color:
" dat += "   (Skin tone overriding)
" else - dat += "Vagina Color:" + dat += "Vagina Color:
" dat += "    Change
" dat += "Has Womb:[features["has_womb"] == TRUE ? "Yes" : "No"]" dat += "" dat += APPEARANCE_CATEGORY_COLUMN - dat += "Has Breasts:" + dat += "

Breasts

" dat += "[features["has_breasts"] == TRUE ? "Yes" : "No"]" if(features["has_breasts"]) if(pref_species.use_skintones && features["genitals_use_skintone"] == TRUE) - dat += "Color:" + dat += "Color:
" dat += "   (Skin tone overriding)
" else - dat += "Color:" + dat += "Color:
" dat += "    Change
" dat += "Cup Size:[features["breasts_size"]]" dat += "Breast Shape:[features["breasts_shape"]]" @@ -744,6 +747,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
" dat += "PDA Color:     Change
" dat += "PDA Style: [pda_style]
" + dat += "PDA Reskin: [pda_skin]
" dat += "
" dat += "Ghost Ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" dat += "Ghost Radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "All Messages":"No Messages"]
" @@ -1939,8 +1943,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(new_loc) uplink_spawn_loc = new_loc + if("ai_core_icon") + var/ai_core_icon = input(user, "Choose your preferred AI core display screen:", "AI Core Display Screen Selection") as null|anything in GLOB.ai_core_display_screens + if(ai_core_icon) + preferred_ai_core_display = ai_core_icon + if("sec_dept") - var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs + var/department = input(user, "Choose your preferred security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs if(department) prefered_security_department = department @@ -1979,6 +1988,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/pickedPDAColor = input(user, "Choose your PDA Interface color.", "Character Preference",pda_color) as color|null if(pickedPDAColor) pda_color = pickedPDAColor + if("pda_skin") + var/pickedPDASkin = input(user, "Choose your PDA reskin.", "Character Preference", pda_skin) as null|anything in GLOB.pda_reskins + if(pickedPDASkin) + pda_skin = pickedPDASkin else switch(href_list["preference"]) @@ -1989,6 +2002,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) arousable = !arousable if("has_cock") features["has_cock"] = !features["has_cock"] + if(features["has_cock"] == FALSE) + features["has_balls"] = FALSE if("has_balls") features["has_balls"] = !features["has_balls"] if("has_ovi") @@ -2003,6 +2018,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) features["has_breasts"] = !features["has_breasts"] if("has_vag") features["has_vag"] = !features["has_vag"] + if(features["has_vag"] == FALSE) + features["has_womb"] = FALSE if("has_womb") features["has_womb"] = !features["has_womb"] if("exhibitionist") @@ -2229,8 +2246,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.hair_style = hair_style character.facial_hair_style = facial_hair_style character.underwear = underwear + character.saved_underwear = underwear character.undershirt = undershirt + character.saved_undershirt = undershirt character.socks = socks + character.saved_socks = socks character.backbag = backbag diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index c2675ba867..3c5d547b46 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -108,6 +108,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["tip_delay"] >> tip_delay S["pda_style"] >> pda_style S["pda_color"] >> pda_color + S["pda_skin"] >> pda_skin //citadel code S["arousable"] >> arousable @@ -144,6 +145,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car be_special = SANITIZE_LIST(be_special) pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style)) pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color)) + pda_skin = sanitize_inlist(pda_skin, GLOB.pda_reskins, PDA_SKIN_ALT) screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake)) damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake)) @@ -284,6 +286,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car var/savefile_slot_name = custom_name_id + "_name" //TODO remove this S[savefile_slot_name] >> custom_names[custom_name_id] + S["preferred_ai_core_display"] >> preferred_ai_core_display S["prefered_security_department"] >> prefered_security_department //Jobs @@ -483,6 +486,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car var/savefile_slot_name = custom_name_id + "_name" //TODO remove this WRITE_FILE(S[savefile_slot_name],custom_names[custom_name_id]) + WRITE_FILE(S["preferred_ai_core_display"] , preferred_ai_core_display) WRITE_FILE(S["prefered_security_department"] , prefered_security_department) //Jobs diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index e4cc477f11..7e7da2839e 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -226,6 +226,19 @@ CL.flags_cover = initial(PCL.flags_cover) target.icon = initial(picked_item.icon) +/datum/action/item_action/chameleon/change/pda/update_item(obj/item/pda/picked_item) + if(!istype(target, /obj/item/pda)) + return ..() + var/obj/item/pda/P = target + P.name = initial(picked_item.name) + P.desc = initial(picked_item.desc) + P.icon_state = initial(picked_item.icon_state) + P.item_state = initial(picked_item.item_state) + P.item_color = initial(picked_item.item_color) + P.overlays_offsets = initial(picked_item.overlays_offsets) + P.set_new_overlays() + P.update_icon() + /datum/action/item_action/chameleon/change/Trigger() if(!IsAvailable()) return @@ -584,7 +597,7 @@ /obj/item/pda/chameleon name = "PDA" - var/datum/action/item_action/chameleon/change/chameleon_action + var/datum/action/item_action/chameleon/change/pda/chameleon_action /obj/item/pda/chameleon/Initialize() . = ..() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 746d5da60d..767b700051 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -216,6 +216,34 @@ BLIND // can't see anything ..() +/obj/item/clothing/under/CtrlClick(mob/user) + . = ..() + + if (!(item_flags & IN_INVENTORY)) + return + + if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + return + + if(has_sensor == LOCKED_SENSORS) + to_chat(user, "The controls are locked.") + return + if(has_sensor == BROKEN_SENSORS) + to_chat(user, "The sensors have shorted out!") + return + if(has_sensor <= NO_SENSORS) + to_chat(user, "This suit does not have any sensors.") + return + + sensor_mode = SENSOR_COORDS + + to_chat(user, "Your suit will now report your exact vital lifesigns as well as your coordinate position.") + + if(ishuman(user)) + var/mob/living/carbon/human/H = user + if(H.w_uniform == src) + H.update_suit_sensors() + /obj/item/clothing/under/AltClick(mob/user) if(..()) return 1 diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 7f7b3ae0ed..6e25db1fa6 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -45,7 +45,7 @@ /obj/item/clothing/glasses/proc/thermal_overload() if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc - if(!(H.has_trait(TRAIT_BLIND))) + if(!(HAS_TRAIT(H, TRAIT_BLIND))) if(H.glasses == src) to_chat(H, "[src] overloads and blinds you!") H.flash_act(visual = 1) @@ -98,7 +98,7 @@ desc = "A pair of snazzy goggles used to protect against chemical spills. Fitted with an analyzer for scanning items and reagents." icon_state = "purple" item_state = "glasses" - scan_reagents = 1 //You can see reagents while wearing science goggles + scan_reagents = TRUE //You can see reagents while wearing science goggles actions_types = list(/datum/action/item_action/toggle_research_scanner) glass_colour_type = /datum/client_colour/glass_colour/purple resistance_flags = ACID_PROOF @@ -202,7 +202,7 @@ /obj/item/clothing/glasses/sunglasses/reagent name = "beer goggles" desc = "A pair of sunglasses outfitted with apparatus to scan reagents." - scan_reagents = 1 + scan_reagents = TRUE /obj/item/clothing/glasses/sunglasses/garb name = "black gar glasses" @@ -377,7 +377,7 @@ item_state = "godeye" vision_flags = SEE_TURFS|SEE_MOBS|SEE_OBJS darkness_view = 8 - scan_reagents = 1 + scan_reagents = TRUE item_flags = NODROP lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE resistance_flags = LAVA_PROOF | FIRE_PROOF diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 1b20501f21..0cd96eaebc 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -7,6 +7,7 @@ permeability_coefficient = 0.05 item_color="yellow" resistance_flags = NONE + var/can_be_cut = 1 /obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly." @@ -17,6 +18,7 @@ permeability_coefficient = 0.05 item_color="yellow" resistance_flags = NONE + var/can_be_cut = 1 /obj/item/clothing/gloves/color/fyellow/New() ..() @@ -30,6 +32,38 @@ . = ..() siemens_coefficient = pick(0,0,0,0.5,0.5,0.5,0.75) +/obj/item/clothing/gloves/cut + desc = "These gloves would protect the wearer from electric shock.. if the fingers were covered." + name = "fingerless insulated gloves" + icon_state = "yellowcut" + item_state = "yglovescut" + siemens_coefficient = 1 + permeability_coefficient = 1 + resistance_flags = NONE + transfer_prints = TRUE + +/obj/item/clothing/gloves/cut/family + desc = "The old gloves your great grandfather stole from Engineering, many moons ago. They've seen some tough times recently." + name = "fingerless insulated gloves" + +/obj/item/clothing/gloves/color/yellow/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/wirecutters)) + if(can_be_cut && icon_state == initial(icon_state))//only if not dyed + to_chat(user, "You snip the fingertips off of [src].") + I.play_tool_sound(src) + new /obj/item/clothing/gloves/cut(drop_location()) + qdel(src) + ..() + +/obj/item/clothing/gloves/color/fyellow/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/wirecutters)) + if(can_be_cut && icon_state == initial(icon_state))//only if not dyed + to_chat(user, "You snip the fingertips off of [src].") + I.play_tool_sound(src) + new /obj/item/clothing/gloves/cut(drop_location()) + qdel(src) + ..() + /obj/item/clothing/gloves/color/black desc = "These gloves are fire-resistant." name = "black gloves" diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index b6c5a5417a..07817ec4e4 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -1,3 +1,8 @@ +//defines the drill hat's yelling setting +#define DRILL_DEFAULT "default" +#define DRILL_SHOUTING "shouting" +#define DRILL_YELLING "yelling" +#define DRILL_CANADIAN "canadian" //Chef /obj/item/clothing/head/chefhat @@ -148,6 +153,65 @@ strip_delay = 60 dog_fashion = /datum/dog_fashion/head/warden +/obj/item/clothing/head/warden/drill + name = "warden's campaign hat" + desc = "A special armored campaign hat with the security insignia emblazoned on it. Uses reinforced fabric to offer sufficient protection. Has the letters 'FMJ' enscribed on its side." + icon_state = "wardendrill" + item_state = "wardendrill" + dog_fashion = null + var/mode = DRILL_DEFAULT + +/obj/item/clothing/head/warden/drill/screwdriver_act(mob/living/carbon/human/user, obj/item/I) + if(..()) + return TRUE + switch(mode) + if(DRILL_DEFAULT) + to_chat(user, "You set the voice circuit to the middle position.") + mode = DRILL_SHOUTING + if(DRILL_SHOUTING) + to_chat(user, "You set the voice circuit to the last position.") + mode = DRILL_YELLING + if(DRILL_YELLING) + to_chat(user, "You set the voice circuit to the first position.") + mode = DRILL_DEFAULT + if(DRILL_CANADIAN) + to_chat(user, "You adjust voice circuit but nothing happens, probably because it's broken.") + return TRUE + +/obj/item/clothing/head/warden/drill/wirecutter_act(mob/living/user, obj/item/I) + if(mode != DRILL_CANADIAN) + to_chat(user, "You broke the voice circuit!") + mode = DRILL_CANADIAN + return TRUE + +/obj/item/clothing/head/warden/drill/speechModification(M) + if(copytext(M, 1, 2) != "*") + if(mode == DRILL_DEFAULT) + M = " [M]" + return trim(M) + if(mode == DRILL_SHOUTING) + M = " [M]!" + return trim(M) + if(mode == DRILL_YELLING) + M = " [M]!!" + return trim(M) + if(mode == DRILL_CANADIAN) + M = " [M]" + var/list/canadian_words = strings("canadian_replacement.json", "canadian") + + for(var/key in canadian_words) + var/value = canadian_words[key] + if(islist(value)) + value = pick(value) + + M = replacetextEx(M, " [uppertext(key)]", " [uppertext(value)]") + M = replacetextEx(M, " [capitalize(key)]", " [capitalize(value)]") + M = replacetextEx(M, " [key]", " [value]") + + if(prob(30)) + M += pick(", eh?", ", EH?") + return trim(M) + /obj/item/clothing/head/beret/sec name = "security beret" desc = "A robust beret with the security insignia emblazoned on it. Uses reinforced fabric to offer sufficient protection." @@ -201,3 +265,8 @@ name = "quartermaster's beret" desc = "This headwear shows off your Cargonian leadership" icon_state = "qmberet" + +#undef DRILL_DEFAULT +#undef DRILL_SHOUTING +#undef DRILL_YELLING +#undef DRILL_CANADIAN diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 4179e69a45..330f69ddaf 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -66,7 +66,7 @@ var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART) var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS) - if(!(M.stat == DEAD || (M.has_trait(TRAIT_FAKEDEATH)))) + if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH)))) if(heart && istype(heart)) heart_strength = "an unstable" if(heart.beating) diff --git a/code/modules/clothing/shoes/taeclowndo.dm b/code/modules/clothing/shoes/taeclowndo.dm index 20d9fa6b70..f2bbdf0ceb 100644 --- a/code/modules/clothing/shoes/taeclowndo.dm +++ b/code/modules/clothing/shoes/taeclowndo.dm @@ -13,7 +13,7 @@ if(!ishuman(user)) return var/mob/living/carbon/human/H = user - if(!(H.has_trait(TRAIT_CLUMSY)) && !(H.mind && H.mind.assigned_role == "Clown")) + if(!(HAS_TRAIT(H, TRAIT_CLUMSY)) && !(H.mind && H.mind.assigned_role == "Clown")) return if(slot == SLOT_SHOES) spells = new diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index c061d756b7..22eac9f5aa 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -435,7 +435,6 @@ . = ..() AddComponent(/datum/component/anti_magic, TRUE, FALSE) - //Medical hardsuit /obj/item/clothing/head/helmet/space/hardsuit/medical name = "medical hardsuit helmet" @@ -445,7 +444,8 @@ item_color = "medical" flash_protect = 0 armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75) - scan_reagents = 1 + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR + scan_reagents = TRUE /obj/item/clothing/suit/space/hardsuit/medical icon_state = "hardsuit-medical" @@ -467,7 +467,7 @@ max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 100, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 80) var/obj/machinery/doppler_array/integrated/bomb_radar - scan_reagents = 1 + scan_reagents = TRUE actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_research_scanner) /obj/item/clothing/head/helmet/space/hardsuit/rd/Initialize() @@ -499,8 +499,6 @@ helmettype = /obj/item/clothing/head/helmet/space/hardsuit/rd tauric = TRUE //Citadel Add for tauric hardsuits - - //Security hardsuit /obj/item/clothing/head/helmet/space/hardsuit/security name = "security hardsuit helmet" @@ -510,7 +508,6 @@ item_color = "sec" armor = list("melee" = 35, "bullet" = 15, "laser" = 30,"energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75) - /obj/item/clothing/suit/space/hardsuit/security icon_state = "hardsuit-sec" name = "security hardsuit" @@ -532,7 +529,6 @@ item_color = "hos" armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95) - /obj/item/clothing/suit/space/hardsuit/security/hos icon_state = "hardsuit-hos" name = "head of security's hardsuit" @@ -623,6 +619,49 @@ var/footstep = 1 var/datum/component/mobhook +/obj/item/clothing/suit/space/hardsuit/ancient/mason + name = "M.A.S.O.N RIG" + desc = "The Multi-Augmented Severe Operations Networked Resource Integration Gear is an man-portable tank designed for extreme environmental situations. It is excessively bulky, but rated for all but the most atomic of hazards. The specialized armor is surprisingly weak to conventional weaponry. The exo slot can attach most storge bags on to the suit." + icon_state = "hardsuit-ancient" + item_state = "anc_hardsuit" + armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500) + slowdown = 6 //Slow + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage, /obj/item/construction/rcd, /obj/item/pipe_dispenser) + helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason + max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + +/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason + name = "M.A.S.O.N RIG helmet" + desc = "The M.A.S.O.N RIG helmet is complimentary to the rest of the armor. It features a very large, high powered flood lamp and robust flash protection." + icon_state = "hardsuit0-ancient" + item_state = "anc_helm" + armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500) + item_color = "ancient" + brightness_on = 16 + scan_reagents = TRUE + flash_protect = 5 //We will not be flash by bombs + tint = 1 + var/obj/machinery/doppler_array/integrated/bomb_radar + max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + +/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/Initialize() + . = ..() + bomb_radar = new /obj/machinery/doppler_array/integrated(src) + +/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/equipped(mob/living/carbon/human/user, slot) + ..() + if (slot == SLOT_HEAD) + var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC] + DHUD.add_hud_to(user) + +/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/dropped(mob/living/carbon/human/user) + ..() + if (user.head == src) + var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC] + DHUD.remove_hud_from(user) + /obj/item/clothing/suit/space/hardsuit/ancient/proc/on_mob_move() var/mob/living/carbon/human/H = loc if(!istype(H) || H.wear_suit != src) @@ -692,7 +731,6 @@ return 1 return 0 - /obj/item/clothing/suit/space/hardsuit/shielded/Destroy() STOP_PROCESSING(SSobj, src) return ..() @@ -750,8 +788,6 @@ item_state = "ert_command" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf/blue - - /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf name = "shielded hardsuit helmet" desc = "Standard issue hardsuit helmet for playing capture the flag." @@ -760,7 +796,6 @@ item_color = "ert_medical" armor = list("melee" = 0, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 95) - /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf/red icon_state = "hardsuit0-ert_security" item_state = "hardsuit0-ert_security" @@ -773,10 +808,6 @@ item_state = "hardsuit0-ert_commander" item_color = "ert_commander" - - - - //////Syndicate Version /obj/item/clothing/suit/space/hardsuit/shielded/syndi @@ -791,7 +822,6 @@ slowdown = 0 tauric = TRUE //Citadel Add for tauric hardsuits - /obj/item/clothing/suit/space/hardsuit/shielded/syndi/Initialize() jetpack = new /obj/item/tank/jetpack/suit(src) . = ..() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 5d2d4c115a..eb30488999 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -58,7 +58,8 @@ item_state = "hostrench" flags_inv = 0 strip_delay = 80 - + unique_reskin = list("Coat" = "hostrench", "Cloak" = "trenchcloak") + /obj/item/clothing/suit/armor/vest/warden name = "warden's jacket" desc = "A navy-blue armored jacket with blue shoulder designations and '/Warden/' stitched into one of the chest pockets." diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index deaedfec18..bf11d40caf 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -124,6 +124,9 @@ icon_state = "suitjacket_black" item_state = "ro_suit" +/obj/item/clothing/suit/toggle/lawyer/black/syndie + desc = "A snappy dress jacket. Suspiciously has no tags or branding." + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40) //Mime /obj/item/clothing/suit/suspenders diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index bcd9642662..91fde0dbd0 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -1,751 +1,758 @@ -/obj/item/clothing/under/pj/red - name = "red pj's" - desc = "Sleepwear." - icon_state = "red_pyjamas" - item_color = "red_pyjamas" - item_state = "w_suit" - can_adjust = FALSE - -/obj/item/clothing/under/pj/blue - name = "blue pj's" - desc = "Sleepwear." - icon_state = "blue_pyjamas" - item_color = "blue_pyjamas" - item_state = "w_suit" - can_adjust = FALSE - -/obj/item/clothing/under/patriotsuit - name = "Patriotic Suit" - desc = "Motorcycle not included." - icon_state = "ek" - item_state = "ek" - item_color = "ek" - can_adjust = FALSE - -/obj/item/clothing/under/scratch - name = "white suit" - desc = "A white suit, suitable for an excellent host." - icon_state = "scratch" - item_state = "scratch" - item_color = "scratch" - can_adjust = FALSE - -/obj/item/clothing/under/sl_suit - desc = "It's a very amish looking suit." - name = "amish suit" - icon_state = "sl_suit" - item_color = "sl_suit" - can_adjust = FALSE - -/obj/item/clothing/under/roman - name = "\improper Roman armor" - desc = "Ancient Roman armor. Made of metallic and leather straps." - icon_state = "roman" - item_color = "roman" - item_state = "armor" - can_adjust = FALSE - strip_delay = 100 - resistance_flags = NONE - -/obj/item/clothing/under/waiter - name = "waiter's outfit" - desc = "It's a very smart uniform with a special pocket for tip." - icon_state = "waiter" - item_state = "waiter" - item_color = "waiter" - can_adjust = FALSE - -/obj/item/clothing/under/rank/prisoner - name = "prison jumpsuit" - desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position." - icon_state = "prisoner" - item_state = "o_suit" - item_color = "prisoner" - has_sensor = LOCKED_SENSORS - sensor_mode = SENSOR_COORDS - random_sensor = FALSE - -/obj/item/clothing/under/rank/mailman - name = "mailman's jumpsuit" - desc = "'Special delivery!'" - icon_state = "mailman" - item_state = "b_suit" - item_color = "mailman" - -/obj/item/clothing/under/rank/psyche - name = "psychedelic jumpsuit" - desc = "Groovy!" - icon_state = "psyche" - item_state = "p_suit" - item_color = "psyche" - -/obj/item/clothing/under/rank/clown/sexy - name = "sexy-clown suit" - desc = "It makes you look HONKable!" - icon_state = "sexyclown" - item_state = "sexyclown" - item_color = "sexyclown" - can_adjust = FALSE - -/obj/item/clothing/under/jabroni - name = "Jabroni Outfit" - desc = "The leather club is two sectors down." - icon_state = "darkholme" - item_state = "darkholme" - item_color = "darkholme" - can_adjust = FALSE - -/obj/item/clothing/under/rank/vice - name = "vice officer's jumpsuit" - desc = "It's the standard issue pretty-boy outfit, as seen on Holo-Vision." - icon_state = "vice" - item_state = "gy_suit" - item_color = "vice" - can_adjust = FALSE - -/obj/item/clothing/under/rank/centcom_officer - desc = "It's a jumpsuit worn by CentCom Officers." - name = "\improper CentCom officer's jumpsuit" - icon_state = "officer" - item_state = "g_suit" - item_color = "officer" - alt_covers_chest = TRUE - -/obj/item/clothing/under/rank/centcom_commander - desc = "It's a jumpsuit worn by CentCom's highest-tier Commanders." - name = "\improper CentCom officer's jumpsuit" - icon_state = "centcom" - item_state = "dg_suit" - item_color = "centcom" - -/obj/item/clothing/under/space - name = "\improper NASA jumpsuit" - desc = "It has a NASA logo on it and is made of space-proofed materials." - icon_state = "black" - item_state = "bl_suit" - item_color = "black" - w_class = WEIGHT_CLASS_BULKY - gas_transfer_coefficient = 0.01 - permeability_coefficient = 0.02 - body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - cold_protection = CHEST | GROIN | LEGS | ARMS //Needs gloves and shoes with cold protection to be fully protected. - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - can_adjust = FALSE - resistance_flags = NONE - -/obj/item/clothing/under/acj - name = "administrative cybernetic jumpsuit" - icon_state = "syndicate" - item_state = "bl_suit" - item_color = "syndicate" - desc = "A cybernetically enhanced jumpsuit used for administrative duties." - gas_transfer_coefficient = 0.01 - permeability_coefficient = 0.01 - body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - armor = list("melee" = 100, "bullet" = 100, "laser" = 100,"energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) - cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - can_adjust = FALSE - resistance_flags = FIRE_PROOF | ACID_PROOF - -/obj/item/clothing/under/owl - name = "owl uniform" - desc = "A soft brown jumpsuit made of synthetic feathers and strong conviction." - icon_state = "owl" - item_color = "owl" - can_adjust = FALSE - -/obj/item/clothing/under/griffin - name = "griffon uniform" - desc = "A soft brown jumpsuit with a white feather collar made of synthetic feathers and a lust for mayhem." - icon_state = "griffin" - item_color = "griffin" - can_adjust = FALSE - -/obj/item/clothing/under/cloud - name = "cloud" - desc = "cloud" - icon_state = "cloud" - item_color = "cloud" - can_adjust = FALSE - -/obj/item/clothing/under/gimmick/rank/captain/suit - name = "captain's suit" - desc = "A green suit and yellow necktie. Exemplifies authority." - icon_state = "green_suit" - item_state = "dg_suit" - item_color = "green_suit" - can_adjust = FALSE - -/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit - name = "head of personnel's suit" - desc = "A teal suit and yellow necktie. An authoritative yet tacky ensemble." - icon_state = "teal_suit" - item_state = "g_suit" - item_color = "teal_suit" - can_adjust = FALSE - -/obj/item/clothing/under/suit_jacket - name = "black suit" - desc = "A black suit and red tie. Very formal." - icon_state = "black_suit" - item_state = "bl_suit" - item_color = "black_suit" - can_adjust = FALSE - -/obj/item/clothing/under/suit_jacket/really_black - name = "executive suit" - desc = "A formal black suit and red tie, intended for the station's finest." - icon_state = "really_black_suit" - item_state = "bl_suit" - item_color = "black_suit" - -/obj/item/clothing/under/suit_jacket/female - name = "executive suit" - desc = "A formal trouser suit for women, intended for the station's finest." - icon_state = "black_suit_fem" - item_state = "black_suit_fem" - item_color = "black_suit_fem" - -/obj/item/clothing/under/suit_jacket/green - name = "green suit" - desc = "A green suit and yellow necktie. Baller." - icon_state = "green_suit" - item_state = "dg_suit" - item_color = "green_suit" - can_adjust = FALSE - -/obj/item/clothing/under/suit_jacket/red - name = "red suit" - desc = "A red suit and blue tie. Somewhat formal." - icon_state = "red_suit" - item_state = "r_suit" - item_color = "red_suit" - -/obj/item/clothing/under/suit_jacket/charcoal - name = "charcoal suit" - desc = "A charcoal suit and red tie. Very professional." - icon_state = "charcoal_suit" - item_state = "charcoal_suit" - item_color = "charcoal_suit" - -/obj/item/clothing/under/suit_jacket/navy - name = "navy suit" - desc = "A navy suit and red tie, intended for the station's finest." - icon_state = "navy_suit" - item_state = "navy_suit" - item_color = "navy_suit" - -/obj/item/clothing/under/suit_jacket/burgundy - name = "burgundy suit" - desc = "A burgundy suit and black tie. Somewhat formal." - icon_state = "burgundy_suit" - item_state = "burgundy_suit" - item_color = "burgundy_suit" - -/obj/item/clothing/under/suit_jacket/checkered - name = "checkered suit" - desc = "That's a very nice suit you have there. Shame if something were to happen to it, eh?" - icon_state = "checkered_suit" - item_state = "checkered_suit" - item_color = "checkered_suit" - -/obj/item/clothing/under/suit_jacket/tan - name = "tan suit" - desc = "A tan suit with a yellow tie. Smart, but casual." - icon_state = "tan_suit" - item_state = "tan_suit" - item_color = "tan_suit" - -/obj/item/clothing/under/suit_jacket/white - name = "white suit" - desc = "A white suit and jacket with a blue shirt. You wanna play rough? OKAY!" - icon_state = "white_suit" - item_state = "white_suit" - item_color = "white_suit" - -/obj/item/clothing/under/burial - name = "burial garments" - desc = "Traditional burial garments from the early 22nd century." - icon_state = "burial" - item_state = "burial" - item_color = "burial" - has_sensor = NO_SENSORS - -/obj/item/clothing/under/skirt/black - name = "black skirt" - desc = "A black skirt, very fancy!" - icon_state = "blackskirt" - item_color = "blackskirt" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/skirt/blue - name = "blue skirt" - desc = "A blue, casual skirt." - icon_state = "blueskirt" - item_color = "blueskirt" - item_state = "b_suit" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/skirt/red - name = "red skirt" - desc = "A red, casual skirt." - icon_state = "redskirt" - item_color = "redskirt" - item_state = "r_suit" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/skirt/purple - name = "purple skirt" - desc = "A purple, casual skirt." - icon_state = "purpleskirt" - item_color = "purpleskirt" - item_state = "p_suit" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - - -/obj/item/clothing/under/schoolgirl - name = "blue schoolgirl uniform" - desc = "It's just like one of my Japanese animes!" - icon_state = "schoolgirl" - item_state = "schoolgirl" - item_color = "schoolgirl" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/schoolgirl/red - name = "red schoolgirl uniform" - icon_state = "schoolgirlred" - item_state = "schoolgirlred" - item_color = "schoolgirlred" - -/obj/item/clothing/under/schoolgirl/green - name = "green schoolgirl uniform" - icon_state = "schoolgirlgreen" - item_state = "schoolgirlgreen" - item_color = "schoolgirlgreen" - -/obj/item/clothing/under/schoolgirl/orange - name = "orange schoolgirl uniform" - icon_state = "schoolgirlorange" - item_state = "schoolgirlorange" - item_color = "schoolgirlorange" - -/obj/item/clothing/under/overalls - name = "laborer's overalls" - desc = "A set of durable overalls for getting the job done." - icon_state = "overalls" - item_state = "lb_suit" - item_color = "overalls" - can_adjust = FALSE - -/obj/item/clothing/under/pirate - name = "pirate outfit" - desc = "Yarr." - icon_state = "pirate" - item_state = "pirate" - item_color = "pirate" - can_adjust = FALSE - -/obj/item/clothing/under/soviet - name = "soviet uniform" - desc = "For the Motherland!" - icon_state = "soviet" - item_state = "soviet" - item_color = "soviet" - can_adjust = FALSE - -/obj/item/clothing/under/redcoat - name = "redcoat uniform" - desc = "Looks old." - icon_state = "redcoat" - item_state = "redcoat" - item_color = "redcoat" - can_adjust = FALSE - -/obj/item/clothing/under/kilt - name = "kilt" - desc = "Includes shoes and plaid." - icon_state = "kilt" - item_state = "kilt" - item_color = "kilt" - body_parts_covered = CHEST|GROIN|LEGS|FEET - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/kilt/highlander - desc = "You're the only one worthy of this kilt." - item_flags = NODROP - -/obj/item/clothing/under/sexymime - name = "sexy mime outfit" - desc = "The only time when you DON'T enjoy looking at someone's rack." - icon_state = "sexymime" - item_state = "sexymime" - item_color = "sexymime" - body_parts_covered = CHEST|GROIN|LEGS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/gladiator - name = "gladiator uniform" - desc = "Are you not entertained? Is that not why you are here?" - icon_state = "gladiator" - item_state = "gladiator" - item_color = "gladiator" - body_parts_covered = CHEST|GROIN|ARMS - fitted = NO_FEMALE_UNIFORM - can_adjust = FALSE - resistance_flags = NONE - -/obj/item/clothing/under/gladiator/ash_walker - desc = "This gladiator uniform appears to be covered in ash and fairly dated." - has_sensor = NO_SENSORS - -/obj/item/clothing/under/sundress - name = "sundress" - desc = "Makes you want to frolic in a field of daisies." - icon_state = "sundress" - item_state = "sundress" - item_color = "sundress" - body_parts_covered = CHEST|GROIN - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/captainparade - name = "captain's parade uniform" - desc = "A captain's luxury-wear, for special occasions." - icon_state = "captain_parade" - item_state = "by_suit" - item_color = "captain_parade" - can_adjust = FALSE - -/obj/item/clothing/under/hosparademale - name = "head of security's parade uniform" - desc = "A male head of security's luxury-wear, for special occasions." - icon_state = "hos_parade_male" - item_state = "r_suit" - item_color = "hos_parade_male" - can_adjust = FALSE - -/obj/item/clothing/under/hosparadefem - name = "head of security's parade uniform" - desc = "A female head of security's luxury-wear, for special occasions." - icon_state = "hos_parade_fem" - item_state = "r_suit" - item_color = "hos_parade_fem" - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/assistantformal - name = "assistant's formal uniform" - desc = "An assistant's formal-wear. Why an assistant needs formal-wear is still unknown." - icon_state = "assistant_formal" - item_state = "gy_suit" - item_color = "assistant_formal" - can_adjust = FALSE - -/obj/item/clothing/under/blacktango - name = "black tango dress" - desc = "Filled with Latin fire." - icon_state = "black_tango" - item_state = "wcoat" - item_color = "black_tango" - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - body_parts_covered = CHEST|GROIN - -/obj/item/clothing/under/stripeddress - name = "striped dress" - desc = "Fashion in space." - icon_state = "striped_dress" - item_state = "stripeddress" - item_color = "striped_dress" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_FULL - can_adjust = FALSE - -/obj/item/clothing/under/sailordress - name = "sailor dress" - desc = "Formal wear for a leading lady." - icon_state = "sailor_dress" - item_state = "sailordress" - item_color = "sailor_dress" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/redeveninggown - name = "red evening gown" - desc = "Fancy dress for space bar singers." - icon_state = "red_evening_gown" - item_state = "redeveninggown" - item_color = "red_evening_gown" - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/maid - name = "maid costume" - desc = "Maid in China." - icon_state = "maid" - item_state = "maid" - item_color = "maid" - body_parts_covered = CHEST|GROIN - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/maid/Initialize() - . = ..() - var/obj/item/clothing/accessory/maidapron/A = new (src) - attach_accessory(A) - -/obj/item/clothing/under/janimaid - name = "maid uniform" - desc = "A simple maid uniform for housekeeping." - icon_state = "janimaid" - item_state = "janimaid" - item_color = "janimaid" - body_parts_covered = CHEST|GROIN - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/plaid_skirt - name = "red plaid skirt" - desc = "A preppy red skirt with a white blouse." - icon_state = "plaid_red" - item_state = "plaid_red" - item_color = "plaid_red" - fitted = FEMALE_UNIFORM_TOP - can_adjust = TRUE - alt_covers_chest = TRUE - -/obj/item/clothing/under/plaid_skirt/blue - name = "blue plaid skirt" - desc = "A preppy blue skirt with a white blouse." - icon_state = "plaid_blue" - item_state = "plaid_blue" - item_color = "plaid_blue" - fitted = FEMALE_UNIFORM_TOP - can_adjust = TRUE - alt_covers_chest = TRUE - -/obj/item/clothing/under/plaid_skirt/purple - name = "purple plaid skirt" - desc = "A preppy purple skirt with a white blouse." - icon_state = "plaid_purple" - item_state = "plaid_purple" - item_color = "plaid_purple" - fitted = FEMALE_UNIFORM_TOP - can_adjust = TRUE - alt_covers_chest = TRUE - -/obj/item/clothing/under/singery - name = "yellow performer's outfit" - desc = "Just looking at this makes you want to sing." - icon_state = "ysing" - item_state = "ysing" - item_color = "ysing" - body_parts_covered = CHEST|GROIN|ARMS - fitted = NO_FEMALE_UNIFORM - alternate_worn_layer = ABOVE_SHOES_LAYER - can_adjust = FALSE - -/obj/item/clothing/under/singerb - name = "blue performer's outfit" - desc = "Just looking at this makes you want to sing." - icon_state = "bsing" - item_state = "bsing" - item_color = "bsing" - body_parts_covered = CHEST|GROIN|ARMS - alternate_worn_layer = ABOVE_SHOES_LAYER - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - -/obj/item/clothing/under/plaid_skirt/green - name = "green plaid skirt" - desc = "A preppy green skirt with a white blouse." - icon_state = "plaid_green" - item_state = "plaid_green" - item_color = "plaid_green" - fitted = FEMALE_UNIFORM_TOP - can_adjust = TRUE - alt_covers_chest = TRUE - -/obj/item/clothing/under/jester - name = "jester suit" - desc = "A jolly dress, well suited to entertain your master, nuncle." - icon_state = "jester" - item_color = "jester" - can_adjust = FALSE - -/obj/item/clothing/under/jester/alt - icon_state = "jester2" - -/obj/item/clothing/under/geisha - name = "geisha suit" - desc = "Cute space ninja senpai not included." - icon_state = "geisha" - item_color = "geisha" - body_parts_covered = CHEST|GROIN|ARMS - can_adjust = FALSE - -/obj/item/clothing/under/villain - name = "villain suit" - desc = "A change of wardrobe is necessary if you ever want to catch a real superhero." - icon_state = "villain" - item_color = "villain" - can_adjust = FALSE - -/obj/item/clothing/under/sailor - name = "sailor suit" - desc = "Skipper's in the wardroom drinkin gin'." - icon_state = "sailor" - item_state = "b_suit" - item_color = "sailor" - can_adjust = FALSE - -/obj/item/clothing/under/plasmaman - name = "plasma envirosuit" - desc = "A special containment suit that allows plasma-based lifeforms to exist safely in an oxygenated environment, and automatically extinguishes them in a crisis. Despite being airtight, it's not spaceworthy." - icon_state = "plasmaman" - item_state = "plasmaman" - item_color = "plasmaman" - armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) - body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - can_adjust = FALSE - strip_delay = 80 - var/next_extinguish = 0 - var/extinguish_cooldown = 100 - var/extinguishes_left = 5 - - -/obj/item/clothing/under/plasmaman/examine(mob/user) - ..() - to_chat(user, "There are [extinguishes_left] extinguisher charges left in this suit.") - - -/obj/item/clothing/under/plasmaman/proc/Extinguish(mob/living/carbon/human/H) - if(!istype(H)) - return - - if(H.on_fire) - if(extinguishes_left) - if(next_extinguish > world.time) - return - next_extinguish = world.time + extinguish_cooldown - extinguishes_left-- - H.visible_message("[H]'s suit automatically extinguishes [H.p_them()]!","Your suit automatically extinguishes you.") - H.ExtinguishMob() - new /obj/effect/particle_effect/water(get_turf(H)) - return 0 - -/obj/item/clothing/under/plasmaman/attackby(obj/item/E, mob/user, params) - ..() - if (istype(E, /obj/item/extinguisher_refill)) - if (extinguishes_left == 5) - to_chat(user, "The inbuilt extinguisher is full.") - return - else - extinguishes_left = 5 - to_chat(user, "You refill the suit's built-in extinguisher, using up the cartridge.") - qdel(E) - return - return - return - -/obj/item/extinguisher_refill - name = "envirosuit extinguisher cartridge" - desc = "A cartridge loaded with a compressed extinguisher mix, used to refill the automatic extinguisher on plasma envirosuits." - icon_state = "plasmarefill" - icon = 'icons/obj/device.dmi' - -/obj/item/clothing/under/rank/security/navyblue/russian - name = "\improper Russian officer's uniform" - desc = "The latest in fashionable russian outfits." - icon_state = "hostanclothes" - item_state = "hostanclothes" - item_color = "hostanclothes" - -/obj/item/clothing/under/mummy - name = "mummy wrapping" - desc = "Return the slab or suffer my stale references." - icon_state = "mummy" - item_state = "mummy" - item_color = "mummy" - body_parts_covered = CHEST|GROIN|ARMS|LEGS - fitted = NO_FEMALE_UNIFORM - can_adjust = FALSE - resistance_flags = NONE - -/obj/item/clothing/under/scarecrow - name = "scarecrow clothes" - desc = "Perfect camouflage for hiding in botany." - icon_state = "scarecrow" - item_state = "scarecrow" - item_color = "scarecrow" - body_parts_covered = CHEST|GROIN|ARMS|LEGS - fitted = NO_FEMALE_UNIFORM - can_adjust = FALSE - resistance_flags = NONE - -/obj/item/clothing/under/draculass - name = "draculass coat" - desc = "A dress inspired by the ancient \"Victorian\" era." - icon_state = "draculass" - item_state = "draculass" - item_color = "draculass" - body_parts_covered = CHEST|GROIN|ARMS - fitted = FEMALE_UNIFORM_TOP - can_adjust = FALSE - mutantrace_variation = NO_MUTANTRACE_VARIATION - -/obj/item/clothing/under/drfreeze - name = "doctor freeze's jumpsuit" - desc = "A modified scientist jumpsuit to look extra cool." - icon_state = "drfreeze" - item_state = "drfreeze" - item_color = "drfreeze" - can_adjust = FALSE - mutantrace_variation = NO_MUTANTRACE_VARIATION - -/obj/item/clothing/under/lobster - name = "foam lobster suit" - desc = "Who beheaded the college mascot?" - icon_state = "lobster" - item_state = "lobster" - item_color = "lobster" - fitted = NO_FEMALE_UNIFORM - can_adjust = FALSE - mutantrace_variation = NO_MUTANTRACE_VARIATION - -/obj/item/clothing/under/gondola - name = "gondola hide suit" - desc = "Now you're cooking." - icon_state = "gondola" - item_state = "lb_suit" - item_color = "gondola" - can_adjust = FALSE - -/obj/item/clothing/under/skeleton - name = "skeleton jumpsuit" - desc = "A black jumpsuit with a white bone pattern printed on it. Spooky!" - icon_state = "skeleton" - item_state = "skeleton" - item_color = "skeleton" - body_parts_covered = CHEST|GROIN|ARMS|LEGS - fitted = NO_FEMALE_UNIFORM - can_adjust = FALSE - resistance_flags = NONE +/obj/item/clothing/under/pj/red + name = "red pj's" + desc = "Sleepwear." + icon_state = "red_pyjamas" + item_color = "red_pyjamas" + item_state = "w_suit" + can_adjust = FALSE + +/obj/item/clothing/under/pj/blue + name = "blue pj's" + desc = "Sleepwear." + icon_state = "blue_pyjamas" + item_color = "blue_pyjamas" + item_state = "w_suit" + can_adjust = FALSE + +/obj/item/clothing/under/patriotsuit + name = "Patriotic Suit" + desc = "Motorcycle not included." + icon_state = "ek" + item_state = "ek" + item_color = "ek" + can_adjust = FALSE + +/obj/item/clothing/under/scratch + name = "white suit" + desc = "A white suit, suitable for an excellent host." + icon_state = "scratch" + item_state = "scratch" + item_color = "scratch" + can_adjust = FALSE + +/obj/item/clothing/under/sl_suit + desc = "It's a very amish looking suit." + name = "amish suit" + icon_state = "sl_suit" + item_color = "sl_suit" + can_adjust = FALSE + +/obj/item/clothing/under/roman + name = "\improper Roman armor" + desc = "Ancient Roman armor. Made of metallic and leather straps." + icon_state = "roman" + item_color = "roman" + item_state = "armor" + can_adjust = FALSE + strip_delay = 100 + resistance_flags = NONE + +/obj/item/clothing/under/waiter + name = "waiter's outfit" + desc = "It's a very smart uniform with a special pocket for tip." + icon_state = "waiter" + item_state = "waiter" + item_color = "waiter" + can_adjust = FALSE + +/obj/item/clothing/under/rank/prisoner + name = "prison jumpsuit" + desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position." + icon_state = "prisoner" + item_state = "o_suit" + item_color = "prisoner" + has_sensor = LOCKED_SENSORS + sensor_mode = SENSOR_COORDS + random_sensor = FALSE + +/obj/item/clothing/under/rank/mailman + name = "mailman's jumpsuit" + desc = "'Special delivery!'" + icon_state = "mailman" + item_state = "b_suit" + item_color = "mailman" + +/obj/item/clothing/under/rank/psyche + name = "psychedelic jumpsuit" + desc = "Groovy!" + icon_state = "psyche" + item_state = "p_suit" + item_color = "psyche" + +/obj/item/clothing/under/rank/clown/sexy + name = "sexy-clown suit" + desc = "It makes you look HONKable!" + icon_state = "sexyclown" + item_state = "sexyclown" + item_color = "sexyclown" + can_adjust = FALSE + +/obj/item/clothing/under/jabroni + name = "Jabroni Outfit" + desc = "The leather club is two sectors down." + icon_state = "darkholme" + item_state = "darkholme" + item_color = "darkholme" + can_adjust = FALSE + +/obj/item/clothing/under/rank/vice + name = "vice officer's jumpsuit" + desc = "It's the standard issue pretty-boy outfit, as seen on Holo-Vision." + icon_state = "vice" + item_state = "gy_suit" + item_color = "vice" + can_adjust = FALSE + +/obj/item/clothing/under/rank/centcom_officer + desc = "It's a jumpsuit worn by CentCom Officers." + name = "\improper CentCom officer's jumpsuit" + icon_state = "officer" + item_state = "g_suit" + item_color = "officer" + alt_covers_chest = TRUE + +/obj/item/clothing/under/rank/centcom_commander + desc = "It's a jumpsuit worn by CentCom's highest-tier Commanders." + name = "\improper CentCom officer's jumpsuit" + icon_state = "centcom" + item_state = "dg_suit" + item_color = "centcom" + +/obj/item/clothing/under/space + name = "\improper NASA jumpsuit" + desc = "It has a NASA logo on it and is made of space-proofed materials." + icon_state = "black" + item_state = "bl_suit" + item_color = "black" + w_class = WEIGHT_CLASS_BULKY + gas_transfer_coefficient = 0.01 + permeability_coefficient = 0.02 + body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + cold_protection = CHEST | GROIN | LEGS | ARMS //Needs gloves and shoes with cold protection to be fully protected. + min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT + heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT + can_adjust = FALSE + resistance_flags = NONE + +/obj/item/clothing/under/acj + name = "administrative cybernetic jumpsuit" + icon_state = "syndicate" + item_state = "bl_suit" + item_color = "syndicate" + desc = "A cybernetically enhanced jumpsuit used for administrative duties." + gas_transfer_coefficient = 0.01 + permeability_coefficient = 0.01 + body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + armor = list("melee" = 100, "bullet" = 100, "laser" = 100,"energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) + cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS + min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT + heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT + can_adjust = FALSE + resistance_flags = FIRE_PROOF | ACID_PROOF + +/obj/item/clothing/under/owl + name = "owl uniform" + desc = "A soft brown jumpsuit made of synthetic feathers and strong conviction." + icon_state = "owl" + item_color = "owl" + can_adjust = FALSE + +/obj/item/clothing/under/griffin + name = "griffon uniform" + desc = "A soft brown jumpsuit with a white feather collar made of synthetic feathers and a lust for mayhem." + icon_state = "griffin" + item_color = "griffin" + can_adjust = FALSE + +/obj/item/clothing/under/cloud + name = "cloud" + desc = "cloud" + icon_state = "cloud" + item_color = "cloud" + can_adjust = FALSE + +/obj/item/clothing/under/gimmick/rank/captain/suit + name = "captain's suit" + desc = "A green suit and yellow necktie. Exemplifies authority." + icon_state = "green_suit" + item_state = "dg_suit" + item_color = "green_suit" + can_adjust = FALSE + +/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit + name = "head of personnel's suit" + desc = "A teal suit and yellow necktie. An authoritative yet tacky ensemble." + icon_state = "teal_suit" + item_state = "g_suit" + item_color = "teal_suit" + can_adjust = FALSE + +/obj/item/clothing/under/suit_jacket + name = "black suit" + desc = "A black suit and red tie. Very formal." + icon_state = "black_suit" + item_state = "bl_suit" + item_color = "black_suit" + can_adjust = FALSE + +/obj/item/clothing/under/suit_jacket/really_black + name = "executive suit" + desc = "A formal black suit and red tie, intended for the station's finest." + icon_state = "really_black_suit" + item_state = "bl_suit" + item_color = "black_suit" + +/obj/item/clothing/under/suit_jacket/female + name = "executive suit" + desc = "A formal trouser suit for women, intended for the station's finest." + icon_state = "black_suit_fem" + item_state = "black_suit_fem" + item_color = "black_suit_fem" + +/obj/item/clothing/under/suit_jacket/green + name = "green suit" + desc = "A green suit and yellow necktie. Baller." + icon_state = "green_suit" + item_state = "dg_suit" + item_color = "green_suit" + can_adjust = FALSE + +/obj/item/clothing/under/suit_jacket/red + name = "red suit" + desc = "A red suit and blue tie. Somewhat formal." + icon_state = "red_suit" + item_state = "r_suit" + item_color = "red_suit" + +/obj/item/clothing/under/suit_jacket/charcoal + name = "charcoal suit" + desc = "A charcoal suit and red tie. Very professional." + icon_state = "charcoal_suit" + item_state = "charcoal_suit" + item_color = "charcoal_suit" + +/obj/item/clothing/under/suit_jacket/navy + name = "navy suit" + desc = "A navy suit and red tie, intended for the station's finest." + icon_state = "navy_suit" + item_state = "navy_suit" + item_color = "navy_suit" + +/obj/item/clothing/under/suit_jacket/burgundy + name = "burgundy suit" + desc = "A burgundy suit and black tie. Somewhat formal." + icon_state = "burgundy_suit" + item_state = "burgundy_suit" + item_color = "burgundy_suit" + +/obj/item/clothing/under/suit_jacket/checkered + name = "checkered suit" + desc = "That's a very nice suit you have there. Shame if something were to happen to it, eh?" + icon_state = "checkered_suit" + item_state = "checkered_suit" + item_color = "checkered_suit" + +/obj/item/clothing/under/suit_jacket/tan + name = "tan suit" + desc = "A tan suit with a yellow tie. Smart, but casual." + icon_state = "tan_suit" + item_state = "tan_suit" + item_color = "tan_suit" + +/obj/item/clothing/under/suit_jacket/white + name = "white suit" + desc = "A white suit and jacket with a blue shirt. You wanna play rough? OKAY!" + icon_state = "white_suit" + item_state = "white_suit" + item_color = "white_suit" + +/obj/item/clothing/under/burial + name = "burial garments" + desc = "Traditional burial garments from the early 22nd century." + icon_state = "burial" + item_state = "burial" + item_color = "burial" + has_sensor = NO_SENSORS + +/obj/item/clothing/under/skirt/black + name = "black skirt" + desc = "A black skirt, very fancy!" + icon_state = "blackskirt" + item_color = "blackskirt" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/skirt/blue + name = "blue skirt" + desc = "A blue, casual skirt." + icon_state = "blueskirt" + item_color = "blueskirt" + item_state = "b_suit" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/skirt/red + name = "red skirt" + desc = "A red, casual skirt." + icon_state = "redskirt" + item_color = "redskirt" + item_state = "r_suit" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/skirt/purple + name = "purple skirt" + desc = "A purple, casual skirt." + icon_state = "purpleskirt" + item_color = "purpleskirt" + item_state = "p_suit" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + + +/obj/item/clothing/under/schoolgirl + name = "blue schoolgirl uniform" + desc = "It's just like one of my Japanese animes!" + icon_state = "schoolgirl" + item_state = "schoolgirl" + item_color = "schoolgirl" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/schoolgirl/red + name = "red schoolgirl uniform" + icon_state = "schoolgirlred" + item_state = "schoolgirlred" + item_color = "schoolgirlred" + +/obj/item/clothing/under/schoolgirl/green + name = "green schoolgirl uniform" + icon_state = "schoolgirlgreen" + item_state = "schoolgirlgreen" + item_color = "schoolgirlgreen" + +/obj/item/clothing/under/schoolgirl/orange + name = "orange schoolgirl uniform" + icon_state = "schoolgirlorange" + item_state = "schoolgirlorange" + item_color = "schoolgirlorange" + +/obj/item/clothing/under/overalls + name = "laborer's overalls" + desc = "A set of durable overalls for getting the job done." + icon_state = "overalls" + item_state = "lb_suit" + item_color = "overalls" + can_adjust = FALSE + +/obj/item/clothing/under/pirate + name = "pirate outfit" + desc = "Yarr." + icon_state = "pirate" + item_state = "pirate" + item_color = "pirate" + can_adjust = FALSE + +/obj/item/clothing/under/soviet + name = "soviet uniform" + desc = "For the Motherland!" + icon_state = "soviet" + item_state = "soviet" + item_color = "soviet" + can_adjust = FALSE + +/obj/item/clothing/under/redcoat + name = "redcoat uniform" + desc = "Looks old." + icon_state = "redcoat" + item_state = "redcoat" + item_color = "redcoat" + can_adjust = FALSE + +/obj/item/clothing/under/kilt + name = "kilt" + desc = "Includes shoes and plaid." + icon_state = "kilt" + item_state = "kilt" + item_color = "kilt" + body_parts_covered = CHEST|GROIN|LEGS|FEET + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/kilt/highlander + desc = "You're the only one worthy of this kilt." + item_flags = NODROP + +/obj/item/clothing/under/sexymime + name = "sexy mime outfit" + desc = "The only time when you DON'T enjoy looking at someone's rack." + icon_state = "sexymime" + item_state = "sexymime" + item_color = "sexymime" + body_parts_covered = CHEST|GROIN|LEGS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/gladiator + name = "gladiator uniform" + desc = "Are you not entertained? Is that not why you are here?" + icon_state = "gladiator" + item_state = "gladiator" + item_color = "gladiator" + body_parts_covered = CHEST|GROIN|ARMS + fitted = NO_FEMALE_UNIFORM + can_adjust = FALSE + resistance_flags = NONE + +/obj/item/clothing/under/gladiator/ash_walker + desc = "This gladiator uniform appears to be covered in ash and fairly dated." + has_sensor = NO_SENSORS + +/obj/item/clothing/under/sundress + name = "sundress" + desc = "Makes you want to frolic in a field of daisies." + icon_state = "sundress" + item_state = "sundress" + item_color = "sundress" + body_parts_covered = CHEST|GROIN + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/captainparade + name = "captain's parade uniform" + desc = "A captain's luxury-wear, for special occasions." + icon_state = "captain_parade" + item_state = "by_suit" + item_color = "captain_parade" + can_adjust = FALSE + +/obj/item/clothing/under/hosparademale + name = "head of security's parade uniform" + desc = "A male head of security's luxury-wear, for special occasions." + icon_state = "hos_parade_male" + item_state = "r_suit" + item_color = "hos_parade_male" + can_adjust = FALSE + +/obj/item/clothing/under/hosparadefem + name = "head of security's parade uniform" + desc = "A female head of security's luxury-wear, for special occasions." + icon_state = "hos_parade_fem" + item_state = "r_suit" + item_color = "hos_parade_fem" + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/assistantformal + name = "assistant's formal uniform" + desc = "An assistant's formal-wear. Why an assistant needs formal-wear is still unknown." + icon_state = "assistant_formal" + item_state = "gy_suit" + item_color = "assistant_formal" + can_adjust = FALSE + +/obj/item/clothing/under/blacktango + name = "black tango dress" + desc = "Filled with Latin fire." + icon_state = "black_tango" + item_state = "wcoat" + item_color = "black_tango" + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + body_parts_covered = CHEST|GROIN + +/obj/item/clothing/under/stripeddress + name = "striped dress" + desc = "Fashion in space." + icon_state = "striped_dress" + item_state = "stripeddress" + item_color = "striped_dress" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_FULL + can_adjust = FALSE + +/obj/item/clothing/under/sailordress + name = "sailor dress" + desc = "Formal wear for a leading lady." + icon_state = "sailor_dress" + item_state = "sailordress" + item_color = "sailor_dress" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/redeveninggown + name = "red evening gown" + desc = "Fancy dress for space bar singers." + icon_state = "red_evening_gown" + item_state = "redeveninggown" + item_color = "red_evening_gown" + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/maid + name = "maid costume" + desc = "Maid in China." + icon_state = "maid" + item_state = "maid" + item_color = "maid" + body_parts_covered = CHEST|GROIN + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/maid/Initialize() + . = ..() + var/obj/item/clothing/accessory/maidapron/A = new (src) + attach_accessory(A) + +/obj/item/clothing/under/janimaid + name = "maid uniform" + desc = "A simple maid uniform for housekeeping." + icon_state = "janimaid" + item_state = "janimaid" + item_color = "janimaid" + body_parts_covered = CHEST|GROIN + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/plaid_skirt + name = "red plaid skirt" + desc = "A preppy red skirt with a white blouse." + icon_state = "plaid_red" + item_state = "plaid_red" + item_color = "plaid_red" + fitted = FEMALE_UNIFORM_TOP + can_adjust = TRUE + alt_covers_chest = TRUE + +/obj/item/clothing/under/plaid_skirt/blue + name = "blue plaid skirt" + desc = "A preppy blue skirt with a white blouse." + icon_state = "plaid_blue" + item_state = "plaid_blue" + item_color = "plaid_blue" + fitted = FEMALE_UNIFORM_TOP + can_adjust = TRUE + alt_covers_chest = TRUE + +/obj/item/clothing/under/plaid_skirt/purple + name = "purple plaid skirt" + desc = "A preppy purple skirt with a white blouse." + icon_state = "plaid_purple" + item_state = "plaid_purple" + item_color = "plaid_purple" + fitted = FEMALE_UNIFORM_TOP + can_adjust = TRUE + alt_covers_chest = TRUE + +/obj/item/clothing/under/singery + name = "yellow performer's outfit" + desc = "Just looking at this makes you want to sing." + icon_state = "ysing" + item_state = "ysing" + item_color = "ysing" + body_parts_covered = CHEST|GROIN|ARMS + fitted = NO_FEMALE_UNIFORM + alternate_worn_layer = ABOVE_SHOES_LAYER + can_adjust = FALSE + +/obj/item/clothing/under/singerb + name = "blue performer's outfit" + desc = "Just looking at this makes you want to sing." + icon_state = "bsing" + item_state = "bsing" + item_color = "bsing" + body_parts_covered = CHEST|GROIN|ARMS + alternate_worn_layer = ABOVE_SHOES_LAYER + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + +/obj/item/clothing/under/plaid_skirt/green + name = "green plaid skirt" + desc = "A preppy green skirt with a white blouse." + icon_state = "plaid_green" + item_state = "plaid_green" + item_color = "plaid_green" + fitted = FEMALE_UNIFORM_TOP + can_adjust = TRUE + alt_covers_chest = TRUE + +/obj/item/clothing/under/jester + name = "jester suit" + desc = "A jolly dress, well suited to entertain your master, nuncle." + icon_state = "jester" + item_color = "jester" + can_adjust = FALSE + +/obj/item/clothing/under/jester/alt + icon_state = "jester2" + +/obj/item/clothing/under/geisha + name = "geisha suit" + desc = "Cute space ninja senpai not included." + icon_state = "geisha" + item_color = "geisha" + body_parts_covered = CHEST|GROIN|ARMS + can_adjust = FALSE + +/obj/item/clothing/under/villain + name = "villain suit" + desc = "A change of wardrobe is necessary if you ever want to catch a real superhero." + icon_state = "villain" + item_color = "villain" + can_adjust = FALSE + +/obj/item/clothing/under/sailor + name = "sailor suit" + desc = "Skipper's in the wardroom drinkin gin'." + icon_state = "sailor" + item_state = "b_suit" + item_color = "sailor" + can_adjust = FALSE + +/obj/item/clothing/under/plasmaman + name = "plasma envirosuit" + desc = "A special containment suit that allows plasma-based lifeforms to exist safely in an oxygenated environment, and automatically extinguishes them in a crisis. Despite being airtight, it's not spaceworthy." + icon_state = "plasmaman" + item_state = "plasmaman" + item_color = "plasmaman" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) + body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + can_adjust = FALSE + strip_delay = 80 + var/next_extinguish = 0 + var/extinguish_cooldown = 100 + var/extinguishes_left = 5 + + +/obj/item/clothing/under/plasmaman/examine(mob/user) + ..() + to_chat(user, "There are [extinguishes_left] extinguisher charges left in this suit.") + + +/obj/item/clothing/under/plasmaman/proc/Extinguish(mob/living/carbon/human/H) + if(!istype(H)) + return + + if(H.on_fire) + if(extinguishes_left) + if(next_extinguish > world.time) + return + next_extinguish = world.time + extinguish_cooldown + extinguishes_left-- + H.visible_message("[H]'s suit automatically extinguishes [H.p_them()]!","Your suit automatically extinguishes you.") + H.ExtinguishMob() + new /obj/effect/particle_effect/water(get_turf(H)) + return 0 + +/obj/item/clothing/under/plasmaman/attackby(obj/item/E, mob/user, params) + ..() + if (istype(E, /obj/item/extinguisher_refill)) + if (extinguishes_left == 5) + to_chat(user, "The inbuilt extinguisher is full.") + return + else + extinguishes_left = 5 + to_chat(user, "You refill the suit's built-in extinguisher, using up the cartridge.") + qdel(E) + return + return + return + +/obj/item/extinguisher_refill + name = "envirosuit extinguisher cartridge" + desc = "A cartridge loaded with a compressed extinguisher mix, used to refill the automatic extinguisher on plasma envirosuits." + icon_state = "plasmarefill" + icon = 'icons/obj/device.dmi' + +/obj/item/clothing/under/rank/security/navyblue/russian + name = "\improper Russian officer's uniform" + desc = "The latest in fashionable russian outfits." + icon_state = "hostanclothes" + item_state = "hostanclothes" + item_color = "hostanclothes" + +/obj/item/clothing/under/mummy + name = "mummy wrapping" + desc = "Return the slab or suffer my stale references." + icon_state = "mummy" + item_state = "mummy" + item_color = "mummy" + body_parts_covered = CHEST|GROIN|ARMS|LEGS + fitted = NO_FEMALE_UNIFORM + can_adjust = FALSE + resistance_flags = NONE + +/obj/item/clothing/under/scarecrow + name = "scarecrow clothes" + desc = "Perfect camouflage for hiding in botany." + icon_state = "scarecrow" + item_state = "scarecrow" + item_color = "scarecrow" + body_parts_covered = CHEST|GROIN|ARMS|LEGS + fitted = NO_FEMALE_UNIFORM + can_adjust = FALSE + resistance_flags = NONE + +/obj/item/clothing/under/draculass + name = "draculass coat" + desc = "A dress inspired by the ancient \"Victorian\" era." + icon_state = "draculass" + item_state = "draculass" + item_color = "draculass" + body_parts_covered = CHEST|GROIN|ARMS + fitted = FEMALE_UNIFORM_TOP + can_adjust = FALSE + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/under/drfreeze + name = "doctor freeze's jumpsuit" + desc = "A modified scientist jumpsuit to look extra cool." + icon_state = "drfreeze" + item_state = "drfreeze" + item_color = "drfreeze" + can_adjust = FALSE + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/under/lobster + name = "foam lobster suit" + desc = "Who beheaded the college mascot?" + icon_state = "lobster" + item_state = "lobster" + item_color = "lobster" + fitted = NO_FEMALE_UNIFORM + can_adjust = FALSE + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/under/gondola + name = "gondola hide suit" + desc = "Now you're cooking." + icon_state = "gondola" + item_state = "lb_suit" + item_color = "gondola" + can_adjust = FALSE + +/obj/item/clothing/under/skeleton + name = "skeleton jumpsuit" + desc = "A black jumpsuit with a white bone pattern printed on it. Spooky!" + icon_state = "skeleton" + item_state = "skeleton" + item_color = "skeleton" + body_parts_covered = CHEST|GROIN|ARMS|LEGS + fitted = NO_FEMALE_UNIFORM + can_adjust = FALSE + resistance_flags = NONE + +/obj/item/clothing/under/gear_harness + name = "gear harness" + desc = "A simple, inconspicuous harness replacement for a jumpsuit." + icon_state = "gear_harness" + item_state = "gear_harness" //We dont use golem do to being a item, item without faces making it default to error suit sprites. + body_parts_covered = CHEST|GROIN \ No newline at end of file diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 29ddb8e800..3e96512bb8 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -21,6 +21,8 @@ CAT_BURGER, CAT_CAKE, CAT_EGG, + CAT_FISH, + CAT_ICE, //Called Frozen CAT_MEAT, CAT_MISCFOOD, CAT_PASTRY, @@ -28,7 +30,6 @@ CAT_PIZZA, CAT_SALAD, CAT_SANDWICH, - CAT_SUSHI, CAT_SOUP, CAT_SPAGHETTI), CAT_CLOTHING) //Clothing subcategories diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 7d25f67580..a76be1ff45 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -365,28 +365,6 @@ parts = list(/obj/item/camera = 1) category = CAT_MISC -/datum/crafting_recipe/lizardhat - name = "Lizard Cloche Hat" - result = /obj/item/clothing/head/lizard - time = 10 - reqs = list(/obj/item/organ/tail/lizard = 1) - category = CAT_MISC - -/datum/crafting_recipe/lizardhat_alternate - name = "Lizard Cloche Hat" - result = /obj/item/clothing/head/lizard - time = 10 - reqs = list(/obj/item/stack/sheet/animalhide/lizard = 1) - category = CAT_MISC - -/datum/crafting_recipe/kittyears - name = "Kitty Ears" - result = /obj/item/clothing/head/kitty/genuine - time = 10 - reqs = list(/obj/item/organ/tail/cat = 1, - /obj/item/organ/ears/cat = 1) - category = CAT_MISC - /datum/crafting_recipe/skateboard name = "Skateboard" result = /obj/vehicle/ridden/scooter/skateboard @@ -558,6 +536,14 @@ /obj/item/stack/sheet/animalhide/ashdrake = 5) category = CAT_PRIMAL +/datum/crafting_recipe/bonebag + name = "Bone Satchel" + result = /obj/item/storage/backpack/satchel/bone + time = 30 + reqs = list(/obj/item/stack/sheet/bone = 3, + /obj/item/stack/sheet/sinew = 2) + category = CAT_PRIMAL + /datum/crafting_recipe/gold_horn name = "Golden Bike Horn" result = /obj/item/bikehorn/golden @@ -633,6 +619,15 @@ /obj/item/assembly/igniter = 1) category = CAT_MISC + +/datum/crafting_recipe/wheelchair + name = "Wheelchair" + result = /obj/vehicle/ridden/wheelchair + reqs = list(/obj/item/stack/sheet/plasteel = 2, + /obj/item/stack/rods = 8) + time = 100 + category = CAT_MISC + /datum/crafting_recipe/rcl name = "Makeshift Rapid Cable Layer" result = /obj/item/twohanded/rcl/ghetto @@ -664,6 +659,28 @@ tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER) category = CAT_MISC +/datum/crafting_recipe/lizardhat + name = "Lizard Cloche Hat" + result = /obj/item/clothing/head/lizard + time = 10 + reqs = list(/obj/item/organ/tail/lizard = 1) + category = CAT_CLOTHING + +/datum/crafting_recipe/lizardhat_alternate + name = "Lizard Cloche Hat" + result = /obj/item/clothing/head/lizard + time = 10 + reqs = list(/obj/item/stack/sheet/animalhide/lizard = 1) + category = CAT_CLOTHING + +/datum/crafting_recipe/kittyears + name = "Kitty Ears" + result = /obj/item/clothing/head/kitty/genuine + time = 10 + reqs = list(/obj/item/organ/tail/cat = 1, + /obj/item/organ/ears/cat = 1) + category = CAT_CLOTHING + /datum/crafting_recipe/hudsunsec name = "Security HUDsunglasses" result = /obj/item/clothing/glasses/hud/security/sunglasses @@ -746,10 +763,10 @@ /datum/crafting_recipe/paperwork name = "Filed Paper Work" - result = /obj/item/paper/fluff/jobs/cargo/manifest/paperwork_correct - time = 90 //Takes time for people to file and complete paper work! + result = /obj/item/folder/paperwork_correct + time = 60 //Takes time for people to file and complete paper work! reqs = list(/obj/item/pen = 1, - /obj/item/paper/fluff/jobs/cargo/manifest/paperwork = 2) + /obj/item/folder/paperwork = 2) category = CAT_MISC /datum/crafting_recipe/ghettojetpack @@ -773,3 +790,36 @@ /datum/reagent/water = 15) time = 40 category = CAT_MISC + +/datum/crafting_recipe/smartdart + name = "Medical smartdart" + result = /obj/item/reagent_containers/syringe/dart + reqs = list(/obj/item/stack/sheet/metal = 1, + /obj/item/stack/sheet/glass = 1, + /obj/item/stack/sheet/plastic = 1) + time = 10 + category = CAT_WEAPONRY + subcategory = CAT_AMMO + +/datum/crafting_recipe/medolier + name = "Medolier" + result = /obj/item/storage/belt/medolier + reqs = list(/obj/item/stack/sheet/metal = 2, + /obj/item/stack/sheet/cloth = 3, + /obj/item/stack/sheet/plastic = 4) + time = 30 + category = CAT_WEAPONRY + subcategory = CAT_AMMO + +/datum/crafting_recipe/smartdartgun + name = "Smart dartgun" + result = /obj/item/gun/syringe/dart + reqs = list(/obj/item/stack/sheet/metal = 15, + /obj/item/stack/sheet/glass = 10, + /obj/item/tank/internals = 1, + /obj/item/reagent_containers/glass/beaker = 1, + /obj/item/stack/sheet/plastic = 10, + /obj/item/stack/cable_coil = 2) + time = 150 //It's a gun + category = CAT_WEAPONRY + subcategory = CAT_WEAPON diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 9f1f2bf380..a25bc01b13 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -13,7 +13,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "rag" item_flags = NOBLUDGEON - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER amount_per_transfer_from_this = 5 possible_transfer_amounts = list() volume = 5 diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index f09c0481f6..f63ca39874 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -39,7 +39,7 @@ continue if(H.stat == DEAD) continue - if(H.has_trait(TRAIT_VIRUSIMMUNE)) //Don't pick someone who's virus immune, only for it to not do anything. + if(HAS_TRAIT(H, TRAIT_VIRUSIMMUNE)) //Don't pick someone who's virus immune, only for it to not do anything. continue var/foundAlready = FALSE // don't infect someone that already has a disease for(var/thing in H.diseases) @@ -51,7 +51,7 @@ var/datum/disease/D if(!advanced_virus) if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work. - if(!H.dna || (H.has_trait(TRAIT_BLIND))) //A blindness disease would be the worst. + if(!H.dna || (HAS_TRAIT(H, TRAIT_BLIND))) //A blindness disease would be the worst. continue D = new virus_type() var/datum/disease/dnaspread/DS = D diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index abf13bcab9..d9654b395d 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -45,6 +45,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 throwforce = 100 density = TRUE anchored = TRUE + var/mob/living/wizard var/z_original = 0 var/destination var/notify = TRUE @@ -140,3 +141,23 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 H.adjustBruteLoss(160) if(L && (L.density || prob(10))) L.ex_act(EXPLODE_HEAVY) + +obj/effect/immovablerod/attack_hand(mob/living/user) + if(ishuman(user)) + var/mob/living/carbon/human/U = user + if(U.job in list("Research Director")) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + for(var/mob/M in urange(8, src)) + if(!M.stat) + shake_camera(M, 2, 3) + if(wizard) + U.visible_message("[src] transforms into [wizard] as [U] suplexes them!", "As you grab [src], it suddenly turns into [wizard] as you suplex them!") + to_chat(wizard, "You're suddenly jolted out of rod-form as [U] somehow manages to grab you, slamming you into the ground!") + wizard.Stun(60) + wizard.apply_damage(25, BRUTE) + qdel(src) + else + U.visible_message("[U] suplexes [src] into the ground!", "You suplex [src] into the ground!") + new /obj/structure/festivus/anchored(drop_location()) + new /obj/effect/anomaly/flux(drop_location()) + qdel(src) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 966d5cc0d8..d8906de036 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -1,548 +1,548 @@ -/datum/round_event_control/spacevine - name = "Spacevine" - typepath = /datum/round_event/spacevine - weight = 15 - max_occurrences = 3 - min_players = 10 - -/datum/round_event/spacevine - fakeable = FALSE - -/datum/round_event/spacevine/start() - var/list/turfs = list() //list of all the empty floor turfs in the hallway areas - - var/obj/structure/spacevine/SV = new() - - for(var/area/hallway/A in world) - for(var/turf/F in A) - if(F.Enter(SV)) - turfs += F - - qdel(SV) - - if(turfs.len) //Pick a turf to spawn at if we can - var/turf/T = pick(turfs) - new /datum/spacevine_controller(T) //spawn a controller at turf - - -/datum/spacevine_mutation - var/name = "" - var/severity = 1 - var/hue - var/quality - -/datum/spacevine_mutation/proc/add_mutation_to_vinepiece(obj/structure/spacevine/holder) - holder.mutations |= src - holder.add_atom_colour(hue, FIXED_COLOUR_PRIORITY) - -/datum/spacevine_mutation/proc/process_mutation(obj/structure/spacevine/holder) - return - -/datum/spacevine_mutation/proc/process_temperature(obj/structure/spacevine/holder, temp, volume) - return - -/datum/spacevine_mutation/proc/on_birth(obj/structure/spacevine/holder) - return - -/datum/spacevine_mutation/proc/on_grow(obj/structure/spacevine/holder) - return - -/datum/spacevine_mutation/proc/on_death(obj/structure/spacevine/holder) - return - -/datum/spacevine_mutation/proc/on_hit(obj/structure/spacevine/holder, mob/hitter, obj/item/I, expected_damage) - . = expected_damage - -/datum/spacevine_mutation/proc/on_cross(obj/structure/spacevine/holder, mob/crosser) - return - -/datum/spacevine_mutation/proc/on_chem(obj/structure/spacevine/holder, datum/reagent/R) - return - -/datum/spacevine_mutation/proc/on_eat(obj/structure/spacevine/holder, mob/living/eater) - return - -/datum/spacevine_mutation/proc/on_spread(obj/structure/spacevine/holder, turf/target) - return - -/datum/spacevine_mutation/proc/on_buckle(obj/structure/spacevine/holder, mob/living/buckled) - return - -/datum/spacevine_mutation/proc/on_explosion(severity, target, obj/structure/spacevine/holder) - return - - -/datum/spacevine_mutation/light - name = "light" - hue = "#ffff00" - quality = POSITIVE - severity = 4 - -/datum/spacevine_mutation/light/on_grow(obj/structure/spacevine/holder) - if(holder.energy) - holder.set_light(severity, 0.3) - -/datum/spacevine_mutation/toxicity - name = "toxic" - hue = "#ff00ff" - severity = 10 - quality = NEGATIVE - -/datum/spacevine_mutation/toxicity/on_cross(obj/structure/spacevine/holder, mob/living/crosser) - if(issilicon(crosser)) - return - if(prob(severity) && istype(crosser) && !isvineimmune(crosser)) - to_chat(crosser, "You accidentally touch the vine and feel a strange sensation.") - crosser.adjustToxLoss(5) - -/datum/spacevine_mutation/toxicity/on_eat(obj/structure/spacevine/holder, mob/living/eater) - if(!isvineimmune(eater)) - eater.adjustToxLoss(5) - -/datum/spacevine_mutation/explosive //OH SHIT IT CAN CHAINREACT RUN!!! - name = "explosive" - hue = "#ff0000" - quality = NEGATIVE - severity = 2 - -/datum/spacevine_mutation/explosive/on_explosion(explosion_severity, target, obj/structure/spacevine/holder) - if(explosion_severity < 3) - qdel(holder) - else - . = 1 - QDEL_IN(holder, 5) - -/datum/spacevine_mutation/explosive/on_death(obj/structure/spacevine/holder, mob/hitter, obj/item/I) - explosion(holder.loc, 0, 0, severity, 0, 0) - -/datum/spacevine_mutation/fire_proof - name = "fire proof" - hue = "#ff8888" - quality = MINOR_NEGATIVE - -/datum/spacevine_mutation/fire_proof/process_temperature(obj/structure/spacevine/holder, temp, volume) - return 1 - -/datum/spacevine_mutation/fire_proof/on_hit(obj/structure/spacevine/holder, mob/hitter, obj/item/I, expected_damage) - if(I && I.damtype == "fire") - . = 0 - else - . = expected_damage - -/datum/spacevine_mutation/vine_eating - name = "vine eating" - hue = "#ff7700" - quality = MINOR_NEGATIVE - -/datum/spacevine_mutation/vine_eating/on_spread(obj/structure/spacevine/holder, turf/target) - var/obj/structure/spacevine/prey = locate() in target - if(prey && !prey.mutations.Find(src)) //Eat all vines that are not of the same origin - qdel(prey) - -/datum/spacevine_mutation/aggressive_spread //very OP, but im out of other ideas currently - name = "aggressive spreading" - hue = "#333333" - severity = 3 - quality = NEGATIVE - -/datum/spacevine_mutation/aggressive_spread/on_spread(obj/structure/spacevine/holder, turf/target) - target.ex_act(severity, null, src) // vine immunity handled at /mob/ex_act - -/datum/spacevine_mutation/aggressive_spread/on_buckle(obj/structure/spacevine/holder, mob/living/buckled) - buckled.ex_act(severity, null, src) - -/datum/spacevine_mutation/transparency - name = "transparent" - hue = "" - quality = POSITIVE - -/datum/spacevine_mutation/transparency/on_grow(obj/structure/spacevine/holder) - holder.set_opacity(0) - holder.alpha = 125 - -/datum/spacevine_mutation/oxy_eater - name = "oxygen consuming" - hue = "#ffff88" - severity = 3 - quality = NEGATIVE - -/datum/spacevine_mutation/oxy_eater/process_mutation(obj/structure/spacevine/holder) - var/turf/open/floor/T = holder.loc - if(istype(T)) - var/datum/gas_mixture/GM = T.air - if(!GM.gases[/datum/gas/oxygen]) - return - GM.gases[/datum/gas/oxygen][MOLES] = max(GM.gases[/datum/gas/oxygen][MOLES] - severity * holder.energy, 0) - GM.garbage_collect() - -/datum/spacevine_mutation/nitro_eater - name = "nitrogen consuming" - hue = "#8888ff" - severity = 3 - quality = NEGATIVE - -/datum/spacevine_mutation/nitro_eater/process_mutation(obj/structure/spacevine/holder) - var/turf/open/floor/T = holder.loc - if(istype(T)) - var/datum/gas_mixture/GM = T.air - if(!GM.gases[/datum/gas/nitrogen]) - return - GM.gases[/datum/gas/nitrogen][MOLES] = max(GM.gases[/datum/gas/nitrogen][MOLES] - severity * holder.energy, 0) - GM.garbage_collect() - -/datum/spacevine_mutation/carbondioxide_eater - name = "CO2 consuming" - hue = "#00ffff" - severity = 3 - quality = POSITIVE - -/datum/spacevine_mutation/carbondioxide_eater/process_mutation(obj/structure/spacevine/holder) - var/turf/open/floor/T = holder.loc - if(istype(T)) - var/datum/gas_mixture/GM = T.air - if(!GM.gases[/datum/gas/carbon_dioxide]) - return - GM.gases[/datum/gas/carbon_dioxide][MOLES] = max(GM.gases[/datum/gas/carbon_dioxide][MOLES] - severity * holder.energy, 0) - GM.garbage_collect() - -/datum/spacevine_mutation/plasma_eater - name = "toxins consuming" - hue = "#ffbbff" - severity = 3 - quality = POSITIVE - -/datum/spacevine_mutation/plasma_eater/process_mutation(obj/structure/spacevine/holder) - var/turf/open/floor/T = holder.loc - if(istype(T)) - var/datum/gas_mixture/GM = T.air - if(!GM.gases[/datum/gas/plasma]) - return - GM.gases[/datum/gas/plasma][MOLES] = max(GM.gases[/datum/gas/plasma][MOLES] - severity * holder.energy, 0) - GM.garbage_collect() - -/datum/spacevine_mutation/thorns - name = "thorny" - hue = "#666666" - severity = 10 - quality = NEGATIVE - -/datum/spacevine_mutation/thorns/on_cross(obj/structure/spacevine/holder, mob/living/crosser) - if(prob(severity) && istype(crosser) && !isvineimmune(holder)) - var/mob/living/M = crosser - M.adjustBruteLoss(5) - to_chat(M, "You cut yourself on the thorny vines.") - -/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) - if(prob(severity) && istype(hitter) && !isvineimmune(holder)) - var/mob/living/M = hitter - M.adjustBruteLoss(5) - to_chat(M, "You cut yourself on the thorny vines.") - . = expected_damage - -/datum/spacevine_mutation/woodening - name = "hardened" - hue = "#997700" - quality = NEGATIVE - -/datum/spacevine_mutation/woodening/on_grow(obj/structure/spacevine/holder) - if(holder.energy) - holder.density = TRUE - holder.max_integrity = 100 - holder.obj_integrity = holder.max_integrity - -/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) - if(I.is_sharp()) - . = expected_damage * 0.5 - else - . = expected_damage - -/datum/spacevine_mutation/flowering - name = "flowering" - hue = "#0A480D" - quality = NEGATIVE - severity = 10 - -/datum/spacevine_mutation/flowering/on_grow(obj/structure/spacevine/holder) - if(holder.energy == 2 && prob(severity) && !locate(/obj/structure/alien/resin/flower_bud_enemy) in range(5,holder)) - new/obj/structure/alien/resin/flower_bud_enemy(get_turf(holder)) - -/datum/spacevine_mutation/flowering/on_cross(obj/structure/spacevine/holder, mob/living/crosser) - if(prob(25)) - holder.entangle(crosser) - - -// SPACE VINES (Note that this code is very similar to Biomass code) -/obj/structure/spacevine - name = "space vines" - desc = "An extremely expansionistic species of vine." - icon = 'icons/effects/spacevines.dmi' - icon_state = "Light1" - anchored = TRUE - density = FALSE - layer = SPACEVINE_LAYER - mouse_opacity = MOUSE_OPACITY_OPAQUE //Clicking anywhere on the turf is good enough - pass_flags = PASSTABLE | PASSGRILLE - max_integrity = 50 - var/energy = 0 - var/datum/spacevine_controller/master = null - var/list/mutations = list() - -/obj/structure/spacevine/Initialize() - . = ..() - add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY) - -/obj/structure/spacevine/examine(mob/user) - ..() - var/text = "This one is a" - if(mutations.len) - for(var/A in mutations) - var/datum/spacevine_mutation/SM = A - text += " [SM.name]" - else - text += " normal" - text += " vine." - to_chat(user, text) - -/obj/structure/spacevine/Destroy() - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_death(src) - if(master) - master.VineDestroyed(src) - mutations = list() - set_opacity(0) - if(has_buckled_mobs()) - unbuckle_all_mobs(force=1) - return ..() - -/obj/structure/spacevine/proc/on_chem_effect(datum/reagent/R) - var/override = 0 - for(var/datum/spacevine_mutation/SM in mutations) - override += SM.on_chem(src, R) - if(!override && istype(R, /datum/reagent/toxin/plantbgone)) - if(prob(50)) - qdel(src) - -/obj/structure/spacevine/proc/eat(mob/eater) - var/override = 0 - for(var/datum/spacevine_mutation/SM in mutations) - override += SM.on_eat(src, eater) - if(!override) - qdel(src) - -/obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user) - var/damage_dealt = I.force - if(I.is_sharp()) - damage_dealt *= 4 - if(I.damtype == BURN) - damage_dealt *= 4 - - for(var/datum/spacevine_mutation/SM in mutations) - damage_dealt = SM.on_hit(src, user, I, damage_dealt) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further - take_damage(damage_dealt, I.damtype, "melee", 1) - -/obj/structure/spacevine/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) - switch(damage_type) - if(BRUTE) - if(damage_amount) - playsound(src, 'sound/weapons/slash.ogg', 50, 1) - else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - playsound(src.loc, 'sound/items/welder.ogg', 100, 1) - -/obj/structure/spacevine/Crossed(mob/crosser) - if(isliving(crosser)) - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_cross(src, crosser) - -//ATTACK HAND IGNORING PARENT RETURN VALUE -/obj/structure/spacevine/attack_hand(mob/user) - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_hit(src, user) - user_unbuckle_mob(user, user) - . = ..() - -/obj/structure/spacevine/attack_paw(mob/living/user) - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_hit(src, user) - user_unbuckle_mob(user,user) - -/obj/structure/spacevine/attack_alien(mob/living/user) - eat(user) - -/datum/spacevine_controller - var/list/obj/structure/spacevine/vines - var/list/growth_queue - var/spread_multiplier = 5 - var/spread_cap = 30 - var/list/vine_mutations_list - var/mutativeness = 1 - -/datum/spacevine_controller/New(turf/location, list/muts, potency, production) - vines = list() - growth_queue = list() - spawn_spacevine_piece(location, null, muts) - START_PROCESSING(SSobj, src) - vine_mutations_list = list() - init_subtypes(/datum/spacevine_mutation/, vine_mutations_list) - if(potency != null) - mutativeness = potency / 10 - if(production != null) - spread_cap *= production / 5 - spread_multiplier /= production / 5 - -/datum/spacevine_controller/vv_get_dropdown() - . = ..() - . += "---" - .["Delete Vines"] = "?_src_=[REF(src)];[HrefToken()];purge_vines=1" - -/datum/spacevine_controller/Topic(href, href_list) - if(..() || !check_rights(R_ADMIN, FALSE) || !usr.client.holder.CheckAdminHref(href, href_list)) - return - - if(href_list["purge_vines"]) - if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") != "Yes") - return - DeleteVines() - -/datum/spacevine_controller/proc/DeleteVines() //this is kill - QDEL_LIST(vines) //this will also qdel us - -/datum/spacevine_controller/Destroy() - STOP_PROCESSING(SSobj, src) - return ..() - -/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts) - var/obj/structure/spacevine/SV = new(location) - growth_queue += SV - vines += SV - SV.master = src - if(muts && muts.len) - for(var/datum/spacevine_mutation/M in muts) - M.add_mutation_to_vinepiece(SV) - return - if(parent) - SV.mutations |= parent.mutations - var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY] - SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY) - if(prob(mutativeness)) - var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations) - randmut.add_mutation_to_vinepiece(SV) - - for(var/datum/spacevine_mutation/SM in SV.mutations) - SM.on_birth(SV) - location.Entered(SV) - -/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S) - S.master = null - vines -= S - growth_queue -= S - if(!vines.len) - var/obj/item/seeds/kudzu/KZ = new(S.loc) - KZ.mutations |= S.mutations - KZ.set_potency(mutativeness * 10) - KZ.set_production((spread_cap / initial(spread_cap)) * 5) - qdel(src) - -/datum/spacevine_controller/process() - if(!LAZYLEN(vines)) - qdel(src) //space vines exterminated. Remove the controller - return - if(!growth_queue) - qdel(src) //Sanity check - return - - var/length = 0 - - length = min( spread_cap , max( 1 , vines.len / spread_multiplier ) ) - var/i = 0 - var/list/obj/structure/spacevine/queue_end = list() - - for(var/obj/structure/spacevine/SV in growth_queue) - if(QDELETED(SV)) - continue - i++ - queue_end += SV - growth_queue -= SV - for(var/datum/spacevine_mutation/SM in SV.mutations) - SM.process_mutation(SV) - if(SV.energy < 2) //If tile isn't fully grown - if(prob(20)) - SV.grow() - else //If tile is fully grown - SV.entangle_mob() - - SV.spread() - if(i >= length) - break - - growth_queue = growth_queue + queue_end - -/obj/structure/spacevine/proc/grow() - if(!energy) - src.icon_state = pick("Med1", "Med2", "Med3") - energy = 1 - set_opacity(1) - else - src.icon_state = pick("Hvy1", "Hvy2", "Hvy3") - energy = 2 - - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_grow(src) - -/obj/structure/spacevine/proc/entangle_mob() - if(!has_buckled_mobs() && prob(25)) - for(var/mob/living/V in src.loc) - entangle(V) - if(has_buckled_mobs()) - break //only capture one mob at a time - - -/obj/structure/spacevine/proc/entangle(mob/living/V) - if(!V || isvineimmune(V)) - return - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_buckle(src, V) - if((V.stat != DEAD) && (V.buckled != src)) //not dead or captured - to_chat(V, "The vines [pick("wind", "tangle", "tighten")] around you!") - buckle_mob(V, 1) - -/obj/structure/spacevine/proc/spread() - var/direction = pick(GLOB.cardinals) - var/turf/stepturf = get_step(src,direction) - if (!isspaceturf(stepturf) && stepturf.Enter(src)) - for(var/datum/spacevine_mutation/SM in mutations) - SM.on_spread(src, stepturf) - stepturf = get_step(src,direction) //in case turf changes, to make sure no runtimes happen - if(!locate(/obj/structure/spacevine, stepturf)) - if(master) - master.spawn_spacevine_piece(stepturf, src) - -/obj/structure/spacevine/ex_act(severity, target) - if(istype(target, type)) //if its agressive spread vine dont do anything - return - var/i - for(var/datum/spacevine_mutation/SM in mutations) - i += SM.on_explosion(severity, target, src) - if(!i && prob(100/severity)) - qdel(src) - -/obj/structure/spacevine/temperature_expose(null, temp, volume) - var/override = 0 - for(var/datum/spacevine_mutation/SM in mutations) - override += SM.process_temperature(src, temp, volume) - if(!override) - qdel(src) - -/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target) - if(isvineimmune(mover)) - . = TRUE - else - . = ..() - -/proc/isvineimmune(atom/A) - . = FALSE - if(isliving(A)) - var/mob/living/M = A - if(("vines" in M.faction) || ("plants" in M.faction)) - . = TRUE +/datum/round_event_control/spacevine + name = "Spacevine" + typepath = /datum/round_event/spacevine + weight = 15 + max_occurrences = 3 + min_players = 10 + +/datum/round_event/spacevine + fakeable = FALSE + +/datum/round_event/spacevine/start() + var/list/turfs = list() //list of all the empty floor turfs in the hallway areas + + var/obj/structure/spacevine/SV = new() + + for(var/area/hallway/A in world) + for(var/turf/F in A) + if(F.Enter(SV)) + turfs += F + + qdel(SV) + + if(turfs.len) //Pick a turf to spawn at if we can + var/turf/T = pick(turfs) + new /datum/spacevine_controller(T) //spawn a controller at turf + + +/datum/spacevine_mutation + var/name = "" + var/severity = 1 + var/hue + var/quality + +/datum/spacevine_mutation/proc/add_mutation_to_vinepiece(obj/structure/spacevine/holder) + holder.mutations |= src + holder.add_atom_colour(hue, FIXED_COLOUR_PRIORITY) + +/datum/spacevine_mutation/proc/process_mutation(obj/structure/spacevine/holder) + return + +/datum/spacevine_mutation/proc/process_temperature(obj/structure/spacevine/holder, temp, volume) + return + +/datum/spacevine_mutation/proc/on_birth(obj/structure/spacevine/holder) + return + +/datum/spacevine_mutation/proc/on_grow(obj/structure/spacevine/holder) + return + +/datum/spacevine_mutation/proc/on_death(obj/structure/spacevine/holder) + return + +/datum/spacevine_mutation/proc/on_hit(obj/structure/spacevine/holder, mob/hitter, obj/item/I, expected_damage) + . = expected_damage + +/datum/spacevine_mutation/proc/on_cross(obj/structure/spacevine/holder, mob/crosser) + return + +/datum/spacevine_mutation/proc/on_chem(obj/structure/spacevine/holder, datum/reagent/R) + return + +/datum/spacevine_mutation/proc/on_eat(obj/structure/spacevine/holder, mob/living/eater) + return + +/datum/spacevine_mutation/proc/on_spread(obj/structure/spacevine/holder, turf/target) + return + +/datum/spacevine_mutation/proc/on_buckle(obj/structure/spacevine/holder, mob/living/buckled) + return + +/datum/spacevine_mutation/proc/on_explosion(severity, target, obj/structure/spacevine/holder) + return + + +/datum/spacevine_mutation/light + name = "light" + hue = "#ffff00" + quality = POSITIVE + severity = 4 + +/datum/spacevine_mutation/light/on_grow(obj/structure/spacevine/holder) + if(holder.energy) + holder.set_light(severity, 0.3) + +/datum/spacevine_mutation/toxicity + name = "toxic" + hue = "#ff00ff" + severity = 10 + quality = NEGATIVE + +/datum/spacevine_mutation/toxicity/on_cross(obj/structure/spacevine/holder, mob/living/crosser) + if(issilicon(crosser)) + return + if(prob(severity) && istype(crosser) && !isvineimmune(crosser)) + to_chat(crosser, "You accidentally touch the vine and feel a strange sensation.") + crosser.adjustToxLoss(5) + +/datum/spacevine_mutation/toxicity/on_eat(obj/structure/spacevine/holder, mob/living/eater) + if(!isvineimmune(eater)) + eater.adjustToxLoss(5) + +/datum/spacevine_mutation/explosive //OH SHIT IT CAN CHAINREACT RUN!!! + name = "explosive" + hue = "#ff0000" + quality = NEGATIVE + severity = 2 + +/datum/spacevine_mutation/explosive/on_explosion(explosion_severity, target, obj/structure/spacevine/holder) + if(explosion_severity < 3) + qdel(holder) + else + . = 1 + QDEL_IN(holder, 5) + +/datum/spacevine_mutation/explosive/on_death(obj/structure/spacevine/holder, mob/hitter, obj/item/I) + explosion(holder.loc, 0, 0, severity, 0, 0) + +/datum/spacevine_mutation/fire_proof + name = "fire proof" + hue = "#ff8888" + quality = MINOR_NEGATIVE + +/datum/spacevine_mutation/fire_proof/process_temperature(obj/structure/spacevine/holder, temp, volume) + return 1 + +/datum/spacevine_mutation/fire_proof/on_hit(obj/structure/spacevine/holder, mob/hitter, obj/item/I, expected_damage) + if(I && I.damtype == "fire") + . = 0 + else + . = expected_damage + +/datum/spacevine_mutation/vine_eating + name = "vine eating" + hue = "#ff7700" + quality = MINOR_NEGATIVE + +/datum/spacevine_mutation/vine_eating/on_spread(obj/structure/spacevine/holder, turf/target) + var/obj/structure/spacevine/prey = locate() in target + if(prey && !prey.mutations.Find(src)) //Eat all vines that are not of the same origin + qdel(prey) + +/datum/spacevine_mutation/aggressive_spread //very OP, but im out of other ideas currently + name = "aggressive spreading" + hue = "#333333" + severity = 3 + quality = NEGATIVE + +/datum/spacevine_mutation/aggressive_spread/on_spread(obj/structure/spacevine/holder, turf/target) + target.ex_act(severity, null, src) // vine immunity handled at /mob/ex_act + +/datum/spacevine_mutation/aggressive_spread/on_buckle(obj/structure/spacevine/holder, mob/living/buckled) + buckled.ex_act(severity, null, src) + +/datum/spacevine_mutation/transparency + name = "transparent" + hue = "" + quality = POSITIVE + +/datum/spacevine_mutation/transparency/on_grow(obj/structure/spacevine/holder) + holder.set_opacity(0) + holder.alpha = 125 + +/datum/spacevine_mutation/oxy_eater + name = "oxygen consuming" + hue = "#ffff88" + severity = 3 + quality = NEGATIVE + +/datum/spacevine_mutation/oxy_eater/process_mutation(obj/structure/spacevine/holder) + var/turf/open/floor/T = holder.loc + if(istype(T)) + var/datum/gas_mixture/GM = T.air + if(!GM.gases[/datum/gas/oxygen]) + return + GM.gases[/datum/gas/oxygen] = max(GM.gases[/datum/gas/oxygen] - severity * holder.energy, 0) + GAS_GARBAGE_COLLECT(GM.gases) + +/datum/spacevine_mutation/nitro_eater + name = "nitrogen consuming" + hue = "#8888ff" + severity = 3 + quality = NEGATIVE + +/datum/spacevine_mutation/nitro_eater/process_mutation(obj/structure/spacevine/holder) + var/turf/open/floor/T = holder.loc + if(istype(T)) + var/datum/gas_mixture/GM = T.air + if(!GM.gases[/datum/gas/nitrogen]) + return + GM.gases[/datum/gas/nitrogen] = max(GM.gases[/datum/gas/nitrogen] - severity * holder.energy, 0) + GAS_GARBAGE_COLLECT(GM.gases) + +/datum/spacevine_mutation/carbondioxide_eater + name = "CO2 consuming" + hue = "#00ffff" + severity = 3 + quality = POSITIVE + +/datum/spacevine_mutation/carbondioxide_eater/process_mutation(obj/structure/spacevine/holder) + var/turf/open/floor/T = holder.loc + if(istype(T)) + var/datum/gas_mixture/GM = T.air + if(!GM.gases[/datum/gas/carbon_dioxide]) + return + GM.gases[/datum/gas/carbon_dioxide] = max(GM.gases[/datum/gas/carbon_dioxide] - severity * holder.energy, 0) + GAS_GARBAGE_COLLECT(GM.gases) + +/datum/spacevine_mutation/plasma_eater + name = "toxins consuming" + hue = "#ffbbff" + severity = 3 + quality = POSITIVE + +/datum/spacevine_mutation/plasma_eater/process_mutation(obj/structure/spacevine/holder) + var/turf/open/floor/T = holder.loc + if(istype(T)) + var/datum/gas_mixture/GM = T.air + if(!GM.gases[/datum/gas/plasma]) + return + GM.gases[/datum/gas/plasma] = max(GM.gases[/datum/gas/plasma] - severity * holder.energy, 0) + GAS_GARBAGE_COLLECT(GM.gases) + +/datum/spacevine_mutation/thorns + name = "thorny" + hue = "#666666" + severity = 10 + quality = NEGATIVE + +/datum/spacevine_mutation/thorns/on_cross(obj/structure/spacevine/holder, mob/living/crosser) + if(prob(severity) && istype(crosser) && !isvineimmune(holder)) + var/mob/living/M = crosser + M.adjustBruteLoss(5) + to_chat(M, "You cut yourself on the thorny vines.") + +/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) + if(prob(severity) && istype(hitter) && !isvineimmune(holder)) + var/mob/living/M = hitter + M.adjustBruteLoss(5) + to_chat(M, "You cut yourself on the thorny vines.") + . = expected_damage + +/datum/spacevine_mutation/woodening + name = "hardened" + hue = "#997700" + quality = NEGATIVE + +/datum/spacevine_mutation/woodening/on_grow(obj/structure/spacevine/holder) + if(holder.energy) + holder.density = TRUE + holder.max_integrity = 100 + holder.obj_integrity = holder.max_integrity + +/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) + if(I.is_sharp()) + . = expected_damage * 0.5 + else + . = expected_damage + +/datum/spacevine_mutation/flowering + name = "flowering" + hue = "#0A480D" + quality = NEGATIVE + severity = 10 + +/datum/spacevine_mutation/flowering/on_grow(obj/structure/spacevine/holder) + if(holder.energy == 2 && prob(severity) && !locate(/obj/structure/alien/resin/flower_bud_enemy) in range(5,holder)) + new/obj/structure/alien/resin/flower_bud_enemy(get_turf(holder)) + +/datum/spacevine_mutation/flowering/on_cross(obj/structure/spacevine/holder, mob/living/crosser) + if(prob(25)) + holder.entangle(crosser) + + +// SPACE VINES (Note that this code is very similar to Biomass code) +/obj/structure/spacevine + name = "space vines" + desc = "An extremely expansionistic species of vine." + icon = 'icons/effects/spacevines.dmi' + icon_state = "Light1" + anchored = TRUE + density = FALSE + layer = SPACEVINE_LAYER + mouse_opacity = MOUSE_OPACITY_OPAQUE //Clicking anywhere on the turf is good enough + pass_flags = PASSTABLE | PASSGRILLE + max_integrity = 50 + var/energy = 0 + var/datum/spacevine_controller/master = null + var/list/mutations = list() + +/obj/structure/spacevine/Initialize() + . = ..() + add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY) + +/obj/structure/spacevine/examine(mob/user) + ..() + var/text = "This one is a" + if(mutations.len) + for(var/A in mutations) + var/datum/spacevine_mutation/SM = A + text += " [SM.name]" + else + text += " normal" + text += " vine." + to_chat(user, text) + +/obj/structure/spacevine/Destroy() + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_death(src) + if(master) + master.VineDestroyed(src) + mutations = list() + set_opacity(0) + if(has_buckled_mobs()) + unbuckle_all_mobs(force=1) + return ..() + +/obj/structure/spacevine/proc/on_chem_effect(datum/reagent/R) + var/override = 0 + for(var/datum/spacevine_mutation/SM in mutations) + override += SM.on_chem(src, R) + if(!override && istype(R, /datum/reagent/toxin/plantbgone)) + if(prob(50)) + qdel(src) + +/obj/structure/spacevine/proc/eat(mob/eater) + var/override = 0 + for(var/datum/spacevine_mutation/SM in mutations) + override += SM.on_eat(src, eater) + if(!override) + qdel(src) + +/obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user) + var/damage_dealt = I.force + if(I.is_sharp()) + damage_dealt *= 4 + if(I.damtype == BURN) + damage_dealt *= 4 + + for(var/datum/spacevine_mutation/SM in mutations) + damage_dealt = SM.on_hit(src, user, I, damage_dealt) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further + take_damage(damage_dealt, I.damtype, "melee", 1) + +/obj/structure/spacevine/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src, 'sound/weapons/slash.ogg', 50, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, 1) + +/obj/structure/spacevine/Crossed(mob/crosser) + if(isliving(crosser)) + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_cross(src, crosser) + +//ATTACK HAND IGNORING PARENT RETURN VALUE +/obj/structure/spacevine/attack_hand(mob/user) + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_hit(src, user) + user_unbuckle_mob(user, user) + . = ..() + +/obj/structure/spacevine/attack_paw(mob/living/user) + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_hit(src, user) + user_unbuckle_mob(user,user) + +/obj/structure/spacevine/attack_alien(mob/living/user) + eat(user) + +/datum/spacevine_controller + var/list/obj/structure/spacevine/vines + var/list/growth_queue + var/spread_multiplier = 5 + var/spread_cap = 30 + var/list/vine_mutations_list + var/mutativeness = 1 + +/datum/spacevine_controller/New(turf/location, list/muts, potency, production) + vines = list() + growth_queue = list() + spawn_spacevine_piece(location, null, muts) + START_PROCESSING(SSobj, src) + vine_mutations_list = list() + init_subtypes(/datum/spacevine_mutation/, vine_mutations_list) + if(potency != null) + mutativeness = potency / 10 + if(production != null) + spread_cap *= production / 5 + spread_multiplier /= production / 5 + +/datum/spacevine_controller/vv_get_dropdown() + . = ..() + . += "---" + .["Delete Vines"] = "?_src_=[REF(src)];[HrefToken()];purge_vines=1" + +/datum/spacevine_controller/Topic(href, href_list) + if(..() || !check_rights(R_ADMIN, FALSE) || !usr.client.holder.CheckAdminHref(href, href_list)) + return + + if(href_list["purge_vines"]) + if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") != "Yes") + return + DeleteVines() + +/datum/spacevine_controller/proc/DeleteVines() //this is kill + QDEL_LIST(vines) //this will also qdel us + +/datum/spacevine_controller/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + +/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts) + var/obj/structure/spacevine/SV = new(location) + growth_queue += SV + vines += SV + SV.master = src + if(muts && muts.len) + for(var/datum/spacevine_mutation/M in muts) + M.add_mutation_to_vinepiece(SV) + return + if(parent) + SV.mutations |= parent.mutations + var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY] + SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY) + if(prob(mutativeness)) + var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations) + randmut.add_mutation_to_vinepiece(SV) + + for(var/datum/spacevine_mutation/SM in SV.mutations) + SM.on_birth(SV) + location.Entered(SV) + +/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S) + S.master = null + vines -= S + growth_queue -= S + if(!vines.len) + var/obj/item/seeds/kudzu/KZ = new(S.loc) + KZ.mutations |= S.mutations + KZ.set_potency(mutativeness * 10) + KZ.set_production((spread_cap / initial(spread_cap)) * 5) + qdel(src) + +/datum/spacevine_controller/process() + if(!LAZYLEN(vines)) + qdel(src) //space vines exterminated. Remove the controller + return + if(!growth_queue) + qdel(src) //Sanity check + return + + var/length = 0 + + length = min( spread_cap , max( 1 , vines.len / spread_multiplier ) ) + var/i = 0 + var/list/obj/structure/spacevine/queue_end = list() + + for(var/obj/structure/spacevine/SV in growth_queue) + if(QDELETED(SV)) + continue + i++ + queue_end += SV + growth_queue -= SV + for(var/datum/spacevine_mutation/SM in SV.mutations) + SM.process_mutation(SV) + if(SV.energy < 2) //If tile isn't fully grown + if(prob(20)) + SV.grow() + else //If tile is fully grown + SV.entangle_mob() + + SV.spread() + if(i >= length) + break + + growth_queue = growth_queue + queue_end + +/obj/structure/spacevine/proc/grow() + if(!energy) + src.icon_state = pick("Med1", "Med2", "Med3") + energy = 1 + set_opacity(1) + else + src.icon_state = pick("Hvy1", "Hvy2", "Hvy3") + energy = 2 + + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_grow(src) + +/obj/structure/spacevine/proc/entangle_mob() + if(!has_buckled_mobs() && prob(25)) + for(var/mob/living/V in src.loc) + entangle(V) + if(has_buckled_mobs()) + break //only capture one mob at a time + + +/obj/structure/spacevine/proc/entangle(mob/living/V) + if(!V || isvineimmune(V)) + return + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_buckle(src, V) + if((V.stat != DEAD) && (V.buckled != src)) //not dead or captured + to_chat(V, "The vines [pick("wind", "tangle", "tighten")] around you!") + buckle_mob(V, 1) + +/obj/structure/spacevine/proc/spread() + var/direction = pick(GLOB.cardinals) + var/turf/stepturf = get_step(src,direction) + if (!isspaceturf(stepturf) && stepturf.Enter(src)) + for(var/datum/spacevine_mutation/SM in mutations) + SM.on_spread(src, stepturf) + stepturf = get_step(src,direction) //in case turf changes, to make sure no runtimes happen + if(!locate(/obj/structure/spacevine, stepturf)) + if(master) + master.spawn_spacevine_piece(stepturf, src) + +/obj/structure/spacevine/ex_act(severity, target) + if(istype(target, type)) //if its agressive spread vine dont do anything + return + var/i + for(var/datum/spacevine_mutation/SM in mutations) + i += SM.on_explosion(severity, target, src) + if(!i && prob(100/severity)) + qdel(src) + +/obj/structure/spacevine/temperature_expose(null, temp, volume) + var/override = 0 + for(var/datum/spacevine_mutation/SM in mutations) + override += SM.process_temperature(src, temp, volume) + if(!override) + qdel(src) + +/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target) + if(isvineimmune(mover)) + . = TRUE + else + . = ..() + +/proc/isvineimmune(atom/A) + . = FALSE + if(isliving(A)) + var/mob/living/M = A + if(("vines" in M.faction) || ("plants" in M.faction)) + . = TRUE diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 6594146e81..64edd69e17 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -8,7 +8,7 @@ icon_state = null lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi' - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it. possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 @@ -36,7 +36,7 @@ if(M == user) user.visible_message("[user] swallows a gulp of [src].", "You swallow a gulp of [src].") - if(M.has_trait(TRAIT_VORACIOUS)) + if(HAS_TRAIT(M, TRAIT_VORACIOUS)) M.changeNext_move(CLICK_CD_MELEE * 0.5) //chug! chug! chug! else @@ -152,7 +152,6 @@ possible_transfer_amounts = list() volume = 5 flags_1 = CONDUCT_1 - container_type = OPENCONTAINER spillable = TRUE resistance_flags = FIRE_PROOF isGlass = FALSE @@ -205,6 +204,14 @@ resistance_flags = FREEZE_PROOF isGlass = FALSE +//Used by MREs +/obj/item/reagent_containers/food/drinks/coffee/type2 + name = "\improper Coffee, instant (type 2)" + desc = "Coffee that's been blow dried into a granulated powder. This packet includes self heating water for your nutritional pleasure." + icon = 'icons/obj/food/containers.dmi' + icon_state = "condi_cornoil" + + /obj/item/reagent_containers/food/drinks/ice name = "ice cup" desc = "Careful, cold ice, do not chew." @@ -399,7 +406,7 @@ name = "soda can" lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi' - container_type = NONE + reagent_flags = NONE spillable = FALSE isGlass = FALSE @@ -423,7 +430,7 @@ /obj/item/reagent_containers/food/drinks/soda_cans/attack_self(mob/user) if(!is_drainable()) to_chat(user, "You pull back the tab of \the [src] with a satisfying pop.") //Ahhhhhhhh - container_type = OPENCONTAINER + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) playsound(src, "can_open", 50, 1) spillable = TRUE return diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index b753a6c246..dab933ca4e 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -57,7 +57,7 @@ if(user.a_intent != INTENT_HARM || !isGlass) return ..() - if(user.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm [target]!") return diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index f9d9a3d85a..51433da841 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -4,7 +4,7 @@ /obj/item/reagent_containers/food possible_transfer_amounts = list() volume = 50 //Sets the default container amount for all food items. - container_type = INJECTABLE + reagent_flags = INJECTABLE resistance_flags = FLAMMABLE var/foodtype = NONE var/last_check_time @@ -19,7 +19,7 @@ if(last_check_time + 50 < world.time) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.has_trait(TRAIT_AGEUSIA)) + if(!HAS_TRAIT(H, TRAIT_AGEUSIA)) if(foodtype & H.dna.species.toxic_food) to_chat(H,"What the hell was that thing?!") H.adjust_disgust(25 + 30 * fraction) diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index d6d744f4db..0aef697883 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -10,7 +10,7 @@ desc = "Just your average condiment container." icon = 'icons/obj/food/containers.dmi' icon_state = "emptycondiment" - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50) volume = 50 //Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change(changetype) to change names, descs and sprites. diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 7c7545869b..3eeb5b9417 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -290,7 +290,7 @@ desc = "A simple bowl, used for soups and salads." icon = 'icons/obj/food/soupsalad.dmi' icon_state = "bowl" - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER materials = list(MAT_GLASS = 500) w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 2b37065709..7eea6fb9ca 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -112,7 +112,7 @@ All foods are distributed among various categories. Use common sense. else if(fullness > (600 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat user.visible_message("[user] cannot force any more of \the [src] to go down [user.p_their()] throat!", "You cannot force any more of \the [src] to go down your throat!") return 0 - if(M.has_trait(TRAIT_VORACIOUS)) + if(HAS_TRAIT(M, TRAIT_VORACIOUS)) M.changeNext_move(CLICK_CD_MELEE * 0.5) //nom nom nom else if(!isbrain(M)) //If you're feeding it to someone else. @@ -291,19 +291,23 @@ All foods are distributed among various categories. Use common sense. S.reagents.add_reagent(r_id, amount) /obj/item/reagent_containers/food/snacks/microwave_act(obj/machinery/microwave/M) + var/turf/T = get_turf(src) + var/obj/item/result if(cooked_type) - var/obj/item/reagent_containers/food/snacks/S = new cooked_type(get_turf(src)) - if(M) - initialize_cooked_food(S, M.efficiency) + result = new cooked_type(T) + if(istype(M)) + initialize_cooked_food(result, M.efficiency) else - initialize_cooked_food(S, 1) - SSblackbox.record_feedback("tally", "food_made", 1, type) + initialize_cooked_food(result, 1) + SSblackbox.record_feedback("tally", "food_made", 1, result.type) else - new /obj/item/reagent_containers/food/snacks/badrecipe(src) - if(M && M.dirty < 100) + result = new /obj/item/reagent_containers/food/snacks/badrecipe(T) + if(istype(M) && M.dirty < 100) M.dirty++ qdel(src) + return result + /obj/item/reagent_containers/food/snacks/Destroy() if(contents) for(var/atom/movable/something in contents) diff --git a/code/modules/food_and_drinks/food/snacks_frozen.dm b/code/modules/food_and_drinks/food/snacks_frozen.dm new file mode 100644 index 0000000000..febfa527ca --- /dev/null +++ b/code/modules/food_and_drinks/food/snacks_frozen.dm @@ -0,0 +1,187 @@ +/obj/item/reagent_containers/food/snacks/icecreamsandwich + name = "icecream sandwich" + desc = "Portable Ice-cream in its own packaging." + icon = 'icons/obj/food/food.dmi' + icon_state = "icecreamsandwich" + bonus_reagents = list("nutriment" = 1, "ice" = 2) + list_reagents = list("nutriment" = 2, "ice" = 2) + tastes = list("ice cream" = 1) + foodtype = GRAIN | DAIRY + +/obj/item/reagent_containers/food/snacks/sundae + name = "sundae" + desc = "A classic dessert." + icon_state = "sundae" + bonus_reagents = list("nutriment" = 2, "vitamin" = 1) + list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2) + filling_color = "#FFFACD" + tastes = list("ice cream" = 1, "banana" = 1) + foodtype = FRUIT | DAIRY | SUGAR + +/obj/item/reagent_containers/food/snacks/honkdae + name = "honkdae" + desc = "The clown's favorite dessert." + icon_state = "honkdae" + bonus_reagents = list("nutriment" = 2, "vitamin" = 2) + list_reagents = list("nutriment" = 6, "banana" = 10, "vitamin" = 4) + filling_color = "#FFFACD" + tastes = list("ice cream" = 1, "banana" = 1, "a bad joke" = 1) + foodtype = FRUIT | DAIRY | SUGAR + +/obj/item/reagent_containers/food/snacks/spacefreezy + name = "space freezy" + desc = "The best icecream in space." + icon_state = "spacefreezy" + bonus_reagents = list("nutriment" = 2, "vitamin" = 2) + list_reagents = list("nutriment" = 6, "bluecherryjelly" = 5, "vitamin" = 4) + filling_color = "#87CEFA" + tastes = list("blue cherries" = 2, "ice cream" = 2) + foodtype = FRUIT | DAIRY + +///////////// +//SNOWCONES// +///////////// + +/obj/item/reagent_containers/food/snacks/snowcones //We use this as a base for all other snowcones + name = "flaverless snowcone" + desc = "Its just harden water slivers. Still fun to chew on." + icon = 'icons/obj/food/snowcones.dmi' + icon_state = "flaverless_sc" + trash = /obj/item/reagent_containers/food/drinks/sillycup //We dont eat paper cups + bonus_reagents = list("water" = 10) //Base line will allways give water + list_reagents = list("water" = 1) // We dont get food for water/juices + filling_color = "#FFFFFF" //Ice is white + tastes = list("ice" = 1, "water" = 1) + foodtype = SUGAR //We use SUGAR as a base line to act in as junkfood, other wise we use fruit + +/obj/item/reagent_containers/food/snacks/snowcones/lime + name = "lime flavored snowcone" + desc = "A lime flavord snowball in a paper cup." + icon_state = "lime_sc" + list_reagents = list("nutriment" = 1, "limejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "limes" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/lemon + name = "lemon flavored snowcone" + desc = "A lemon flavord snowball in a paper cup." + icon_state = "lemon_sc" + list_reagents = list("nutriment" = 1, "lemonjuice" = 5) + tastes = list("ice" = 1, "water" = 1, "lemons" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/apple + name = "apple flavored snowcone" + desc = "A apple flavord snowball in a paper cup." + icon_state = "blue_sc" + list_reagents = list("nutriment" = 1, "applejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "apples" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/grape + name = "grape flavored snowcone" + desc = "A grape flavord snowball in a paper cup." + icon_state = "grape_sc" + list_reagents = list("nutriment" = 1, "berryjuice" = 5) + tastes = list("ice" = 1, "water" = 1, "grape" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/orange + name = "orange flavored snowcone" + desc = "A mix of different flavors dizzled on a snowball in a paper cup." + icon_state = "orange_sc" + list_reagents = list("nutriment" = 1, "orangejuice" = 10) + tastes = list("ice" = 1, "water" = 1, "berries" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/blue + name = "bluecherry flavored snowcone" + desc = "A bluecharry flavord snowball in a paper cup, how rare!" + icon_state = "red_sc" + list_reagents = list("nutriment" = 1, "bluecherryjelly" = 5) + tastes = list("ice" = 1, "water" = 1, "blue" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/red + name = "cherry flavored snowcone" + desc = "A cherry flavord snowball in a paper cup." + icon_state = "blue_sc" + list_reagents = list("nutriment" = 1, "cherryjelly" = 5) + tastes = list("ice" = 1, "water" = 1, "red" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/kiwi + name = "kiwi flavored snowcone" + desc = "A kiwi flavord snowball in a paper cup." + icon_state = "kiwi_sc" + list_reagents = list("nutriment" = 3, "vitamin" = 6) + tastes = list("ice" = 1, "space" = 3, "kiwi" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/mix + name = "mixed berry flavored snowcone" + desc = "A mix of different flavors dizzled on a snowball in a paper cup." + icon_state = "berry_sc" + list_reagents = list("nutriment" = 1, "berryjuice" = 10) + tastes = list("ice" = 1, "water" = 1, "berries" = 5) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/fruitsalad + name = "mixed fruit flavored snowcone" + desc = "A mix of different flavors dizzled on a snowball in a paper cup." + icon_state = "fruitsalad_sc" + list_reagents = list("nutriment" = 1, "lemonjuice" = 5, "limejuice" = 5, "lemonjuice" = 5, "orangejuice" = 5) + tastes = list("ice" = 1, "water" = 1, "fruits" = 25) + foodtype = FRUIT + +/obj/item/reagent_containers/food/snacks/snowcones/pineapple + name = "pineapple flavored snowcone" + desc = "A pineapple flavord snowball in a paper cup." + icon_state = "pineapple_sc" + list_reagents = list("nutriment" = 1, "water" = 1) + tastes = list("ice" = 1, "water" = 1, "pineapples" = 5) + foodtype = PINEAPPLE //Pineapple to allow all that like pineapple to enjoy + +/obj/item/reagent_containers/food/snacks/snowcones/mime + name = "mime snowcone" + desc = "..." + icon_state = "mime_sc" + list_reagents = list("nutriment" = 1, "nothing" = 5) + tastes = list("nothing" = 5) + +/obj/item/reagent_containers/food/snacks/snowcones/clown + name = "joke flavored snowcone" + desc = "A waterd down jokeful flavord snowball in a paper cup." + icon_state = "clown_sc" + list_reagents = list("nutriment" = 1, "laughter" = 5) + tastes = list("jokes" = 5, "brainfreeze" = 5, "joy" = 5) + +/obj/item/reagent_containers/food/snacks/snowcones/soda + name = "sodawater flavored snowcone" + desc = "A waterd down sodawater flavored snowcone snowball in a paper cup." + icon_state = "soda_sc" + list_reagents = list("nutriment" = 1, "sodawater" = 5) + tastes = list("surgar" = 1, "water" = 5, "soda" = 5) + foodtype = JUNKFOOD | SUGAR + +/obj/item/reagent_containers/food/snacks/snowcones/pwgrmer + name = "pwergamer flavored snowcone" + desc = "A waterd down pwergamer soda flavord snowball in a paper cup." + icon_state = "pwergamer_sc" + list_reagents = list("nutriment" = 1, "laughter" = 1) + tastes = list("vaild" = 5, "salt" = 5, "wats" = 5) + foodtype = JUNKFOOD | SUGAR + +/obj/item/reagent_containers/food/snacks/snowcones/honey + name = "honey flavored snowcone" + desc = "A honey flavord snowball in a paper cup." + icon_state = "honey_sc" + list_reagents = list("nutriment" = 1, "honey" = 5) + tastes = list("pollen" = 5, "sweetness" = 5, "wax" = 1) + +/obj/item/reagent_containers/food/snacks/snowcones/rainbow + name = "rainbow color snowcone" + desc = "A rainbow color snowball in a paper cup." + icon_state = "rainbow_sc" + list_reagents = list("nutriment" = 5, "laughter" = 25) + tastes = list("sunlight" = 5, "light" = 5, "slime" = 5, "paint" = 3, "clouds" = 3) diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm index 5213cc96e1..c1abec86c1 100644 --- a/code/modules/food_and_drinks/food/snacks_other.dm +++ b/code/modules/food_and_drinks/food/snacks_other.dm @@ -340,36 +340,6 @@ tastes = list("melon" = 1) foodtype = FRUIT -/obj/item/reagent_containers/food/snacks/spacefreezy - name = "space freezy" - desc = "The best icecream in space." - icon_state = "spacefreezy" - bonus_reagents = list("nutriment" = 2, "vitamin" = 2) - list_reagents = list("nutriment" = 6, "bluecherryjelly" = 5, "vitamin" = 4) - filling_color = "#87CEFA" - tastes = list("blue cherries" = 2, "ice cream" = 2) - foodtype = FRUIT | DAIRY - -/obj/item/reagent_containers/food/snacks/sundae - name = "sundae" - desc = "A classic dessert." - icon_state = "sundae" - bonus_reagents = list("nutriment" = 2, "vitamin" = 1) - list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2) - filling_color = "#FFFACD" - tastes = list("ice cream" = 1, "banana" = 1) - foodtype = FRUIT | DAIRY | SUGAR - -/obj/item/reagent_containers/food/snacks/honkdae - name = "honkdae" - desc = "The clown's favorite dessert." - icon_state = "honkdae" - bonus_reagents = list("nutriment" = 2, "vitamin" = 2) - list_reagents = list("nutriment" = 6, "banana" = 10, "vitamin" = 4) - filling_color = "#FFFACD" - tastes = list("ice cream" = 1, "banana" = 1, "a bad joke" = 1) - foodtype = FRUIT | DAIRY | SUGAR - /obj/item/reagent_containers/food/snacks/nachos name = "nachos" desc = "Chips from Space Mexico." diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index fe05d8a5bf..927a7d2697 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -28,7 +28,7 @@ if(last_check_time + 50 < world.time) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.mind && H.mind.assigned_role == "Security Officer" || H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Warden" || H.mind.assigned_role == "Head of Security" && !H.has_trait(TRAIT_AGEUSIA)) + if(H.mind && H.mind.assigned_role == "Security Officer" || H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Warden" || H.mind.assigned_role == "Head of Security" && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"I love this taste!") H.adjust_disgust(-5 + -2.5 * fraction) GET_COMPONENT_FROM(mood, /datum/component/mood, H) diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm index 8264b4153e..9d63d48f34 100644 --- a/code/modules/food_and_drinks/food/snacks_pie.dm +++ b/code/modules/food_and_drinks/food/snacks_pie.dm @@ -53,6 +53,7 @@ H.adjust_blurriness(1) H.visible_message("[H] is creamed by [src]!", "You've been creamed by [src]!") playsound(H, "desceration", 50, TRUE) + reagents.trans_to(H,15) //Transfers the cream pies total volume of reagents to target on it if(!H.creamed) // one layer at a time H.add_overlay(creamoverlay) H.creamed = TRUE @@ -268,3 +269,24 @@ bonus_reagents = list("nutriment" = 4, "vitamin" = 6) tastes = list("mint" = 1, "pie" = 1) foodtype = GRAIN | FRUIT | SUGAR + +/obj/item/reagent_containers/food/snacks/pie/baklava + name = "baklava" + desc = "A delightful healthy snake made of nut layers with thin bread." + icon_state = "baklava" + slice_path = /obj/item/reagent_containers/food/snacks/baklavaslice + slices_num = 6 + bonus_reagents = list("nutriment" = 2, "vitamin" = 6) + tastes = list("nuts" = 1, "pie" = 1) + foodtype = GRAIN + +/obj/item/reagent_containers/food/snacks/baklavaslice + name = "baklava dish" + desc = "A portion delightful healthy snake made of nut layers with thin bread" + icon = 'icons/obj/food/piecake.dmi' + icon_state = "baklavaslice" + trash = /obj/item/trash/plate + filling_color = "#1E90FF" + list_reagents = list("nutriment" = 2, "vitamins" = 4) + tastes = list("nuts" = 1, "pie" = 1) + foodtype = GRAIN \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks_pizza.dm b/code/modules/food_and_drinks/food/snacks_pizza.dm index 403636db08..74fd7dda65 100644 --- a/code/modules/food_and_drinks/food/snacks_pizza.dm +++ b/code/modules/food_and_drinks/food/snacks_pizza.dm @@ -225,3 +225,12 @@ filling_color = "#FFFFFF" foodtype = GRAIN | VEGETABLES + +// Used by MREs +/obj/item/reagent_containers/food/snacks/pizzaslice/pepperoni + name = "\improper MRE pepperoni pizza slice" + desc = "A freeze dried, dehydrated slice of bread with tomato sauce, pepperoni and cheese." + icon_state = "meatpizzaslice" + filling_color = "#A52A2A" + tastes = list("cardboard" = 1, "tomato" = 1, "cheese" = 1, "pepperoni" = 2) + foodtype = GRAIN | VEGETABLES | DAIRY | MEAT \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks_sandwichtoast.dm b/code/modules/food_and_drinks/food/snacks_sandwichtoast.dm index 88f8848315..1b602b6759 100644 --- a/code/modules/food_and_drinks/food/snacks_sandwichtoast.dm +++ b/code/modules/food_and_drinks/food/snacks_sandwichtoast.dm @@ -52,16 +52,6 @@ list_reagents = list("nutriment" = 2, "cherryjelly" = 5, "vitamin" = 2) foodtype = GRAIN | FRUIT -/obj/item/reagent_containers/food/snacks/icecreamsandwich - name = "icecream sandwich" - desc = "Portable Ice-cream in its own packaging." - icon = 'icons/obj/food/food.dmi' - icon_state = "icecreamsandwich" - bonus_reagents = list("nutriment" = 1, "ice" = 2) - list_reagents = list("nutriment" = 2, "ice" = 2) - tastes = list("ice cream" = 1) - foodtype = GRAIN | DAIRY - /obj/item/reagent_containers/food/snacks/notasandwich name = "not-a-sandwich" desc = "Something seems to be wrong with this, you can't quite figure what. Maybe it's his moustache." diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index 5e7a3db504..23172841e4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -28,7 +28,6 @@ God bless America. density = TRUE use_power = IDLE_POWER_USE idle_power_usage = 5 - container_type = OPENCONTAINER layer = BELOW_OBJ_LAYER var/obj/item/reagent_containers/food/snacks/deepfryholder/frying //What's being fried RIGHT NOW? var/cook_time = 0 @@ -52,7 +51,7 @@ God bless America. /obj/machinery/deepfryer/Initialize() . = ..() - create_reagents(50) + create_reagents(50, OPENCONTAINER) reagents.add_reagent("cooking_oil", 25) component_parts = list() component_parts += new /obj/item/circuitboard/machine/deep_fryer(null) diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm index b1da39daf3..4dda9dd773 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm @@ -15,13 +15,11 @@ var/portion = 10 var/selected_drink var/list/stored_food = list() - container_type = OPENCONTAINER var/obj/item/reagent_containers/mixer /obj/machinery/food_cart/Initialize() . = ..() - create_reagents(LIQUID_CAPACIY) - reagents.set_reacting(FALSE) + create_reagents(LIQUID_CAPACIY, OPENCONTAINER | NO_REACT) mixer = new /obj/item/reagent_containers(src, MIXER_CAPACITY) mixer.name = "Mixer" 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 46c9907cef..58d3ef69bb 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -14,7 +14,6 @@ anchored = FALSE use_power = NO_POWER_USE layer = BELOW_OBJ_LAYER - container_type = OPENCONTAINER max_integrity = 300 var/list/product_types = list() var/dispense_flavour = ICECREAM_VANILLA @@ -65,8 +64,7 @@ . = ..() while(product_types.len < 6) product_types.Add(5) - create_reagents() - reagents.set_reacting(FALSE) + create_reagents(100, OPENCONTAINER | NO_REACT) for(var/reagent in icecream_vat_reagents) reagents.add_reagent(reagent, icecream_vat_reagents[reagent]) diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 913fb44dae..6fcc5c9cec 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -12,325 +12,343 @@ pass_flags = PASSTABLE light_color = LIGHT_COLOR_YELLOW light_power = 0.9 + var/wire_disabled = FALSE // is its internal wire cut? var/operating = FALSE // Is it on? - var/dirty = 0 // = {0..100} Does it need cleaning? - var/broken = 0 // ={0,1,2} How broken is it??? - var/max_n_of_items = 10 // whatever fat fuck made this a global var needs to look at themselves in the mirror sometime + var/dirty = 0 // 0 to 100 // Does it need cleaning? + var/dirty_anim_playing = FALSE + var/broken = 0 // 0, 1 or 2 // How broken is it??? + var/max_n_of_items = 10 var/efficiency = 0 var/datum/looping_sound/microwave/soundloop + var/list/ingredients = list() // may only contain /atom/movables -//Microwaving doesn't use recipes, instead it calls the microwave_act of the objects. For food, this creates something based on the food's cooked_type + var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine") + var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject") + var/static/radial_use = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_use") -/******************* -* Initialising -********************/ + // we show the button even if the proc will not work + var/static/list/radial_options = list("eject" = radial_eject, "use" = radial_use) + var/static/list/ai_radial_options = list("eject" = radial_eject, "use" = radial_use, "examine" = radial_examine) /obj/machinery/microwave/Initialize() . = ..() + wires = new /datum/wires/microwave(src) create_reagents(100) soundloop = new(list(src), FALSE) +/obj/machinery/microwave/Destroy() + eject() + if(wires) + QDEL_NULL(wires) + . = ..() + /obj/machinery/microwave/RefreshParts() - var/E - var/max_items = 10 + efficiency = 0 for(var/obj/item/stock_parts/micro_laser/M in component_parts) - E += M.rating + efficiency += M.rating for(var/obj/item/stock_parts/matter_bin/M in component_parts) - max_items = 10 * M.rating - efficiency = E - max_n_of_items = max_items + max_n_of_items = 10 * M.rating + break /obj/machinery/microwave/examine(mob/user) - ..() + . = ..() if(!operating) to_chat(user, "Alt-click [src] to turn it on.") -/******************* -* Item Adding -********************/ + if(!in_range(user, src) && !issilicon(user) && !isobserver(user)) + to_chat(user, "You're too far away to examine [src]'s contents and display!") + return + if(operating) + to_chat(user, "\The [src] is operating.") + return + + if(length(ingredients)) + if(issilicon(user)) + to_chat(user, "\The [src] camera shows:") + else + to_chat(user, "\The [src] contains:") + var/list/items_counts = new + for(var/i in ingredients) + if(istype(i, /obj/item/stack)) + var/obj/item/stack/S = i + items_counts[S.name] += S.amount + else + var/atom/movable/AM = i + items_counts[AM.name]++ + for(var/O in items_counts) + to_chat(user, "- [items_counts[O]]x [O].") + else + to_chat(user, "\The [src] is empty.") + + if(!(stat & (NOPOWER|BROKEN))) + to_chat(user, "The status display reads:") + to_chat(user, "- Capacity: [max_n_of_items] items.") + to_chat(user, "- Cook time reduced by [(efficiency - 1) * 25]%.") + +/obj/machinery/microwave/update_icon() + if(broken) + icon_state = "mwb" + else if(dirty_anim_playing) + icon_state = "mwbloody1" + else if(dirty == 100) + icon_state = "mwbloody" + else if(operating) + icon_state = "mw1" + else if(panel_open) + icon_state = "mw-o" + else + icon_state = "mw" /obj/machinery/microwave/attackby(obj/item/O, mob/user, params) if(operating) return - if(!broken && dirty<100) - if(default_deconstruction_screwdriver(user, "mw-o", "mw", O)) - return - if(default_unfasten_wrench(user, O)) - return - if(default_deconstruction_crowbar(O)) return - if(src.broken > 0) - if(src.broken == 2 && istype(O, /obj/item/wirecutters)) // If it's broken and they're using a screwdriver - user.visible_message( \ - "[user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave..." \ - ) - if (O.use_tool(src, user, 20)) - user.visible_message( \ - "[user] fixes part of the microwave.", \ - "You fix part of the microwave." \ - ) - src.broken = 1 // Fix it a bit - else if(src.broken == 1 && istype(O, /obj/item/weldingtool)) // If it's broken and they're doing the wrench - user.visible_message( \ - "[user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave..." \ - ) - if (O.use_tool(src, user, 20)) - user.visible_message( \ - "[user] fixes the microwave.", \ - "You fix the microwave." \ - ) - src.icon_state = "mw" - src.broken = 0 // Fix it! - src.dirty = 0 // just to be sure - src.container_type = OPENCONTAINER - return 0 //to use some fuel + if(dirty < 100) + if(default_deconstruction_screwdriver(user, icon_state, icon_state, O) || default_unfasten_wrench(user, O)) + update_icon() + return + + if(panel_open && is_wire_tool(O)) + wires.interact(user) + return TRUE + + if(broken > 0) + if(broken == 2 && O.tool_behaviour == TOOL_WIRECUTTER) // If it's broken and they're using a screwdriver + user.visible_message("[user] starts to fix part of \the [src].", "You start to fix part of \the [src]...") + if(O.use_tool(src, user, 20)) + user.visible_message("[user] fixes part of \the [src].", "You fix part of \the [src].") + broken = 1 // Fix it a bit + else if(broken == 1 && O.tool_behaviour == TOOL_WELDER) // If it's broken and they're doing the wrench + user.visible_message("[user] starts to fix part of \the [src].", "You start to fix part of \the [src]...") + if(O.use_tool(src, user, 20)) + user.visible_message("[user] fixes \the [src].", "You fix \the [src].") + broken = 0 + update_icon() + return FALSE //to use some fuel else to_chat(user, "It's broken!") - return 1 - else if(istype(O, /obj/item/reagent_containers/spray/)) + return TRUE + return + + if(istype(O, /obj/item/reagent_containers/spray)) var/obj/item/reagent_containers/spray/clean_spray = O - if(clean_spray.reagents.has_reagent("cleaner",clean_spray.amount_per_transfer_from_this)) - clean_spray.reagents.remove_reagent("cleaner",clean_spray.amount_per_transfer_from_this,1) + if(clean_spray.reagents.has_reagent("cleaner", clean_spray.amount_per_transfer_from_this)) + clean_spray.reagents.remove_reagent("cleaner", clean_spray.amount_per_transfer_from_this,1) playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6) - user.visible_message( \ - "[user] has cleaned the microwave.", \ - "You clean the microwave." \ - ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = "mw" - src.container_type = OPENCONTAINER - src.updateUsrDialog() - return 1 // Disables the after-attack so we don't spray the floor/user. + user.visible_message("[user] has cleaned \the [src].", "You clean \the [src].") + dirty = 0 + update_icon() else to_chat(user, "You need more space cleaner!") - return 1 + return TRUE - else if(istype(O, /obj/item/soap/)) // If they're trying to clean it then let them + if(istype(O, /obj/item/soap)) var/obj/item/soap/P = O - user.visible_message( \ - "[user] starts to clean the microwave.", \ - "You start to clean the microwave..." \ - ) - if (do_after(user, P.cleanspeed, target = src)) - user.visible_message( \ - "[user] has cleaned the microwave.", \ - "You clean the microwave." \ - ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = "mw" - src.container_type = OPENCONTAINER + user.visible_message("[user] starts to clean \the [src].", "You start to clean \the [src]...") + if(do_after(user, P.cleanspeed, target = src)) + user.visible_message("[user] has cleaned \the [src].", "You clean \the [src].") + dirty = 0 + update_icon() + return TRUE - else if(src.dirty==100) // The microwave is all dirty so can't be used! - to_chat(user, "It's dirty!") - return 1 + if(dirty == 100) // The microwave is all dirty so can't be used! + to_chat(user, "\The [src] is dirty!") + return TRUE - else if(istype(O, /obj/item/storage/bag/tray)) + if(istype(O, /obj/item/storage/bag/tray)) var/obj/item/storage/T = O var/loaded = 0 for(var/obj/item/reagent_containers/food/snacks/S in T.contents) - if (contents.len>=max_n_of_items) - to_chat(user, "[src] is full, you can't put anything in!") - return 1 + if(ingredients.len >= max_n_of_items) + to_chat(user, "\The [src] is full, you can't put anything in!") + return TRUE if(SEND_SIGNAL(T, COMSIG_TRY_STORAGE_TAKE, S, src)) loaded++ - + ingredients += S if(loaded) - to_chat(user, "You insert [loaded] items into [src].") + to_chat(user, "You insert [loaded] items into \the [src].") + return + if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP) + if(ingredients.len >= max_n_of_items) + to_chat(user, "\The [src] is full, you can't put anything in!") + return TRUE + if(!user.transferItemToLoc(O, src)) + to_chat(user, "\The [O] is stuck to your hand!") + return FALSE - else if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O, /obj/item/storage) && user.a_intent == INTENT_HELP) - if (contents.len>=max_n_of_items) - to_chat(user, "[src] is full, you can't put anything in!") - return 1 - else - if(!user.transferItemToLoc(O, src)) - to_chat(user, "\the [O] is stuck to your hand, you cannot put it in \the [src]!") - return 0 + ingredients += O + user.visible_message("[user] has added \a [O] to \the [src].", "You add [O] to \the [src].") + return - user.visible_message( \ - "[user] has added \the [O] to \the [src].", \ - "You add \the [O] to \the [src].") - - else - ..() - updateUsrDialog() + ..() /obj/machinery/microwave/AltClick(mob/user) - if(user.canUseTopic(src, BE_CLOSE) && !(operating || broken > 0 || panel_open || !anchored || dirty == 100)) + if(user.canUseTopic(src, !issilicon(usr))) cook() -/******************* -* Microwave Menu -********************/ - -/obj/machinery/microwave/ui_interact(mob/user) // The microwave Menu +/obj/machinery/microwave/ui_interact(mob/user) . = ..() - if(panel_open || !anchored) + + if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user))) + return + if(isAI(user) && (stat & NOPOWER)) return - var/dat = "
" - if(broken > 0) - dat += "ERROR: 09734014-A2379-D18746 --Bad memory
Contact your operator or use command line to rebase memory ///git checkout {HEAD} -a commit pull --rebase push {*NEW HEAD*}
" //Thats how all the git fiddling looks to me - else if(operating) - dat += "Microwaving in progress!
Please wait...!
" - else if(dirty==100) - dat += "ERROR: >> 0 --Response input zero
Contact your operator of the device manifactor support.
" - else - var/list/items_counts = new - for (var/obj/O in contents) - if(istype(O, /obj/item/stack/)) - var/obj/item/stack/S = O - items_counts[O.name] += S.amount - else - items_counts[O.name]++ - for (var/O in items_counts) - var/N = items_counts[O] - dat += "[capitalize(O)]: [N]
" - - if (items_counts.len==0) - dat += "The microwave is empty.
" + if(!length(ingredients)) + if(isAI(user)) + examine(user) else - dat = "

Ingredients:

[dat]
" - dat += "Turn on" - dat += "Eject ingredients
" + to_chat(user, "\The [src] is empty.") + return - var/datum/browser/popup = new(user, "microwave", name, 300, 300) - popup.set_content(dat) - popup.open() + var/choice = show_radial_menu(user, src, isAI(user) ? ai_radial_options : radial_options, require_near = !issilicon(user)) -/*********************************** -* Microwave Menu Handling/Cooking -************************************/ + // post choice verification + if(operating || panel_open || !anchored || !user.canUseTopic(src, !issilicon(user))) + return + if(isAI(user) && (stat & NOPOWER)) + return + + usr.set_machine(src) + switch(choice) + if("eject") + eject() + if("use") + cook() + if("examine") + examine(user) + +/obj/machinery/microwave/proc/eject() + for(var/i in ingredients) + var/atom/movable/AM = i + AM.forceMove(drop_location()) + ingredients.Cut() /obj/machinery/microwave/proc/cook() if(stat & (NOPOWER|BROKEN)) return + if(operating || broken > 0 || panel_open || !anchored || dirty == 100) + return + + if(wire_disabled) + audible_message("[src] buzzes.") + playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) + return + + if(prob(max((5 / efficiency) - 5, dirty * 5))) //a clean unupgraded microwave has no risk of failure + muck() + return + for(var/obj/O in ingredients) + if(istype(O, /obj/item/reagent_containers/food) || istype(O, /obj/item/grown)) + continue + if(prob(min(dirty * 5, 100))) + start_can_fail() + return + break start() - if (prob(max(5/efficiency-5,dirty*5))) //a clean unupgraded microwave has no risk of failure - muck_start() - if (!microwaving(4)) - muck_finish() - return - muck_finish() - return +/obj/machinery/microwave/proc/turn_on() + visible_message("\The [src] turns on.", "You hear a microwave humming.") + operating = TRUE - else - if(has_extra_item() && prob(min(dirty*5,100)) && !microwaving(4)) - broke() - return + set_light(1.5) + soundloop.start() + update_icon() - if(!microwaving(10)) - abort() - return - stop() +/obj/machinery/microwave/proc/spark() + visible_message("Sparks fly around [src]!") + var/datum/effect_system/spark_spread/s = new + s.set_up(2, 1, src) + s.start() - var/metal = 0 - for(var/obj/item/O in contents) - O.microwave_act(src) - if(O.materials[MAT_METAL]) - metal += O.materials[MAT_METAL] - - if(metal) - visible_message("Sparks fly around [src]!") - if(prob(max(metal/2, 33))) - explosion(loc,0,1,2) - broke() - return - - dropContents() - return - -/obj/machinery/microwave/proc/microwaving(seconds as num) - for (var/i=1 to seconds) - if (stat & (NOPOWER|BROKEN)) - return 0 - use_power(500) - sleep(max(12-2*efficiency,2)) // standard microwave means sleep(10). The better the efficiency, the faster the cooking - return 1 - -/obj/machinery/microwave/proc/has_extra_item() - for (var/obj/O in contents) - if ( \ - !istype(O, /obj/item/reagent_containers/food) && \ - !istype(O, /obj/item/grown) \ - ) - return 1 - return 0 +#define MICROWAVE_NORMAL 0 +#define MICROWAVE_MUCK 1 +#define MICROWAVE_PRE 2 /obj/machinery/microwave/proc/start() - visible_message("The microwave turns on.", "You hear a microwave humming.") - soundloop.start() - operating = TRUE - icon_state = "mw1" - set_light(1.5) - updateUsrDialog() + turn_on() + loop(MICROWAVE_NORMAL, 10) -/obj/machinery/microwave/proc/abort() - operating = FALSE // Turn it off again aferwards - icon_state = "mw" - updateUsrDialog() - set_light(0) - soundloop.stop() +/obj/machinery/microwave/proc/start_can_fail() + turn_on() + loop(MICROWAVE_PRE, 4) -/obj/machinery/microwave/proc/stop() - abort() +/obj/machinery/microwave/proc/muck() + turn_on() + playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) + dirty_anim_playing = TRUE + update_icon() + loop(MICROWAVE_MUCK, 4) -/obj/machinery/microwave/proc/dispose() - for (var/obj/O in contents) - O.forceMove(drop_location()) - to_chat(usr, "You dispose of the microwave contents.") - updateUsrDialog() +/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10 + if(stat & (NOPOWER|BROKEN)) + if(MICROWAVE_PRE) + pre_fail() + return + if(!time) + switch(type) + if(MICROWAVE_NORMAL) + loop_finish() + if(MICROWAVE_MUCK) + muck_finish() + if(MICROWAVE_PRE) + pre_success() + return + time-- + use_power(500) + addtimer(CALLBACK(src, .proc/loop, type, time, wait), wait) -/obj/machinery/microwave/proc/muck_start() - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound - icon_state = "mwbloody1" // Make it look dirty!! +/obj/machinery/microwave/proc/loop_finish() + operating = FALSE + + var/metal = 0 + for(var/obj/item/O in ingredients) + O.microwave_act(src) + if(O.materials[MAT_METAL]) + metal += O.materials[MAT_METAL] + + if(metal) + spark() + broken = 2 + if(prob(max(metal / 2, 33))) + explosion(loc, 0, 1, 2) + else + dropContents(ingredients) + ingredients.Cut() + + after_finish_loop() + +/obj/machinery/microwave/proc/pre_fail() + broken = 2 + operating = FALSE + spark() + after_finish_loop() + +/obj/machinery/microwave/proc/pre_success() + loop(MICROWAVE_NORMAL, 10) /obj/machinery/microwave/proc/muck_finish() - visible_message("The microwave gets covered in muck!") - dirty = 100 // Make it dirty so it can't be used util cleaned - icon_state = "mwbloody" // Make it look dirty too - operating = FALSE // Turn it off again aferwards - updateUsrDialog() + visible_message("\The [src] gets covered in muck!") + + dirty = 100 + dirty_anim_playing = FALSE + operating = FALSE + for(var/obj/item/reagent_containers/food/snacks/S in src) if(prob(50)) new /obj/item/reagent_containers/food/snacks/badrecipe(src) qdel(S) + + after_finish_loop() + +/obj/machinery/microwave/proc/after_finish_loop() set_light(0) soundloop.stop() + update_icon() -/obj/machinery/microwave/proc/broke() - var/datum/effect_system/spark_spread/s = new - s.set_up(2, 1, src) - s.start() - icon_state = "mwb" // Make it look all busted up and shit - visible_message("The microwave breaks!") //Let them know they're stupid - broken = 2 // Make it broken so it can't be used util fixed - flags_1 = null //So you can't add condiments - operating = FALSE // Turn it off again aferwards - updateUsrDialog() - set_light(0) - soundloop.stop() - -/obj/machinery/microwave/Topic(href, href_list) - if(..() || panel_open) - return - - usr.set_machine(src) - if(operating) - updateUsrDialog() - return - - switch(href_list["action"]) - if ("cook") - cook() - - if ("dispose") - dispose() - updateUsrDialog() +#undef MICROWAVE_NORMAL +#undef MICROWAVE_MUCK +#undef MICROWAVE_PRE \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index b6e3b19640..483055cb0d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -15,11 +15,11 @@ var/max_n_of_items = 1500 var/allow_ai_retrieve = FALSE var/list/initial_contents + var/visible_contents = TRUE /obj/machinery/smartfridge/Initialize() . = ..() - create_reagents() - reagents.set_reacting(FALSE) + create_reagents(100, NO_REACT) if(islist(initial_contents)) for(var/typekey in initial_contents) @@ -38,11 +38,21 @@ update_icon() /obj/machinery/smartfridge/update_icon() - var/startstate = initial(icon_state) if(!stat) - icon_state = startstate + if(visible_contents) + switch(contents.len) + if(0) + icon_state = "[initial(icon_state)]" + if(1 to 25) + icon_state = "[initial(icon_state)]1" + if(26 to 75) + icon_state = "[initial(icon_state)]2" + if(76 to INFINITY) + icon_state = "[initial(icon_state)]3" + else + icon_state = "[initial(icon_state)]" else - icon_state = "[startstate]-off" + icon_state = "[initial(icon_state)]-off" @@ -51,7 +61,14 @@ ********************/ /obj/machinery/smartfridge/attackby(obj/item/O, mob/user, params) - if(default_deconstruction_screwdriver(user, "smartfridge_open", "smartfridge", O)) + if(user.a_intent == INTENT_HARM) + return ..() + + if(default_deconstruction_screwdriver(user, icon_state, icon_state, O)) + cut_overlays() + if(panel_open) + add_overlay("[initial(icon_state)]-panel") + updateUsrDialog() return if(default_pry_open(O)) @@ -65,49 +82,46 @@ updateUsrDialog() return - if(!stat) - - if(contents.len >= max_n_of_items) - to_chat(user, "\The [src] is full!") - return FALSE - - if(accept_check(O)) - load(O) - user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") - updateUsrDialog() - return TRUE - - if(istype(O, /obj/item/storage/bag)) - var/obj/item/storage/P = O - var/loaded = 0 - for(var/obj/G in P.contents) - if(contents.len >= max_n_of_items) - break - if(accept_check(G)) - load(G) - loaded++ - updateUsrDialog() - - if(loaded) - if(contents.len >= max_n_of_items) - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You fill \the [src] with \the [O].") - else - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You load \the [src] with \the [O].") - if(O.contents.len > 0) - to_chat(user, "Some items are refused.") - return TRUE - else - to_chat(user, "There is nothing in [O] to put in [src]!") - return FALSE - - if(user.a_intent != INTENT_HARM) - to_chat(user, "\The [src] smartly refuses [O].") + if(stat) updateUsrDialog() return FALSE - else - return ..() + + if(contents.len >= max_n_of_items) + to_chat(user, "\The [src] is full!") + return FALSE + + if(accept_check(O)) + load(O) + user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") + updateUsrDialog() + if (visible_contents) + update_icon() + return TRUE + + if(istype(O, /obj/item/storage/bag)) + var/obj/item/storage/P = O + var/loaded = 0 + for(var/obj/G in P.contents) + if(contents.len >= max_n_of_items) + break + if(accept_check(G)) + load(G) + loaded++ + updateUsrDialog() + + if(loaded) + user.visible_message("[user] loads \the [src] with \the [O].", \ + "You [contents.len >= max_n_of_items ? "fill" : "load"] \the [src] with \the [O].") + if(O.contents.len > 0) + to_chat(user, "Some items are refused.") + return TRUE + else + to_chat(user, "There is nothing in [O] to put in [src]!") + return FALSE + + to_chat(user, "\The [src] smartly refuses [O].") + updateUsrDialog() + return FALSE @@ -187,6 +201,8 @@ O.forceMove(drop_location()) adjust_item_drop_location(O) break + if (visible_contents) + update_icon() return TRUE for(var/obj/item/O in src) @@ -196,6 +212,8 @@ O.forceMove(drop_location()) adjust_item_drop_location(O) desired-- + if (visible_contents) + update_icon() return TRUE return FALSE @@ -211,6 +229,7 @@ use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 200 + visible_contents = FALSE var/drying = FALSE /obj/machinery/smartfridge/drying_rack/Initialize() @@ -415,6 +434,7 @@ name = "disk compartmentalizer" desc = "A machine capable of storing a variety of disks. Denoted by most as the DSU (disk storage unit)." icon_state = "disktoaster" + visible_contents = FALSE pass_flags = PASSTABLE /obj/machinery/smartfridge/disks/accept_check(obj/item/O) diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index b06a160180..d608a73560 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -332,6 +332,12 @@ /obj/item/pizzabox/infinite/proc/attune_pizza(mob/living/carbon/human/noms) //tonight on "proc names I never thought I'd type" if(!pizza_preferences[noms.ckey]) pizza_preferences[noms.ckey] = pickweight(pizza_types) + if(noms.has_quirk(/datum/quirk/pineapple_liker)) + pizza_preferences[noms.ckey] = /obj/item/reagent_containers/food/snacks/pizza/pineapple + else if(noms.has_quirk(/datum/quirk/pineapple_hater)) + var/list/pineapple_pizza_liker = pizza_types.Copy() + pineapple_pizza_liker -= /obj/item/reagent_containers/food/snacks/pizza/pineapple + pizza_preferences[noms.ckey] = pickweight(pineapple_pizza_liker) if(noms.mind && noms.mind.assigned_role == "Botanist") pizza_preferences[noms.ckey] = /obj/item/reagent_containers/food/snacks/pizza/dank diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm new file mode 100644 index 0000000000..08d5716779 --- /dev/null +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_frozen.dm @@ -0,0 +1,244 @@ + +/datum/crafting_recipe/food/icecreamsandwich + name = "Icecream sandwich" + reqs = list( + /datum/reagent/consumable/cream = 5, + /datum/reagent/consumable/ice = 5, + /obj/item/reagent_containers/food/snacks/icecream = 1 + ) + result = /obj/item/reagent_containers/food/snacks/icecreamsandwich + subcategory = CAT_ICE + +/datum/crafting_recipe/food/spacefreezy + name ="Space freezy" + reqs = list( + /datum/reagent/consumable/bluecherryjelly = 5, + /datum/reagent/consumable/spacemountainwind = 15, + /obj/item/reagent_containers/food/snacks/icecream = 1 + ) + result = /obj/item/reagent_containers/food/snacks/spacefreezy + subcategory = CAT_ICE + +/datum/crafting_recipe/food/sundae + name ="Sundae" + reqs = list( + /datum/reagent/consumable/cream = 5, + /obj/item/reagent_containers/food/snacks/grown/cherries = 1, + /obj/item/reagent_containers/food/snacks/grown/banana = 1, + /obj/item/reagent_containers/food/snacks/icecream = 1 + ) + result = /obj/item/reagent_containers/food/snacks/sundae + subcategory = CAT_ICE + +/datum/crafting_recipe/food/honkdae + name ="Honkdae" + reqs = list( + /datum/reagent/consumable/cream = 5, + /obj/item/clothing/mask/gas/clown_hat = 1, + /obj/item/reagent_containers/food/snacks/grown/cherries = 1, + /obj/item/reagent_containers/food/snacks/grown/banana = 2, + /obj/item/reagent_containers/food/snacks/icecream = 1 + ) + result = /obj/item/reagent_containers/food/snacks/honkdae + subcategory = CAT_ICE + +//////////////////////////SNOW CONES/////////////////////// + +/datum/crafting_recipe/food/flaverless_sc + name = "Flaverless snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones + subcategory = CAT_ICE + +/datum/crafting_recipe/food/pineapple_sc + name = "Pineapple snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /obj/item/reagent_containers/food/snacks/pineappleslice = 2 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/pineapple + subcategory = CAT_ICE + +/datum/crafting_recipe/food/lime_sc + name = "Lime snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/limejuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/lime + subcategory = CAT_ICE + +/datum/crafting_recipe/food/lemon_sc + name = "Lemon snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/lemonjuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/lemon + subcategory = CAT_ICE + +/datum/crafting_recipe/food/apple_sc + name = "Apple snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/applejuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/apple + subcategory = CAT_ICE + +/datum/crafting_recipe/food/grape_sc + name = "Grape snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/berryjuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/grape + subcategory = CAT_ICE + +/datum/crafting_recipe/food/orange_sc + name = "Orange snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/orangejuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/orange + subcategory = CAT_ICE + +/datum/crafting_recipe/food/blue_sc + name = "Bluecherry snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/bluecherryjelly= 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/blue + subcategory = CAT_ICE + +/datum/crafting_recipe/food/red_sc + name = "Cherry snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/cherryjelly= 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/red + subcategory = CAT_ICE + +/datum/crafting_recipe/food/mix_sc + name = "Mixed berrie snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/berryjuice = 15 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/mix + subcategory = CAT_ICE + +/datum/crafting_recipe/food/fruitsalad_sc + name = "Fruit Salad snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/orangejuice = 5, + /datum/reagent/consumable/limejuice = 5, + /datum/reagent/consumable/lemonjuice = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/fruitsalad + subcategory = CAT_ICE + +/datum/crafting_recipe/food/mime_sc + name = "Mime snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/nothing = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/mime + subcategory = CAT_ICE + +/datum/crafting_recipe/food/clown_sc + name = "Clown snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/clownstears = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/clown + subcategory = CAT_ICE + +/datum/crafting_recipe/food/soda_sc + name = "Soda water snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/sodawater = 15 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/soda + subcategory = CAT_ICE + +/datum/crafting_recipe/food/pwgrmer_sc + name = "Pwergamer snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/pwr_game = 15 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/pwgrmer + subcategory = CAT_ICE + +/datum/crafting_recipe/food/kiwi_sc + name = "Soda water snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /obj/item/reagent_containers/food/snacks/egg/kiwiEgg = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/kiwi + subcategory = CAT_ICE + +/datum/crafting_recipe/food/honey_sc + name = "Honey snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/consumable/honey = 5 + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/honey + subcategory = CAT_ICE + +/datum/crafting_recipe/food/honey_sc + name = "Rainbow snowcone" + reqs = list( + /obj/item/reagent_containers/food/drinks/sillycup = 1, + /datum/reagent/water = 5, + /datum/reagent/consumable/ice = 15, + /datum/reagent/colorful_reagent = 1 //Hard to make + ) + result = /obj/item/reagent_containers/food/snacks/snowcones/rainbow + subcategory = CAT_ICE diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_meat.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_meat.dm index c16c7268b9..7eff2820c5 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_meat.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_meat.dm @@ -38,37 +38,6 @@ // see code/module/crafting/table.dm -////////////////////////////////////////////////FISH//////////////////////////////////////////////// - -/datum/crafting_recipe/food/cubancarp - name = "Cuban carp" - reqs = list( - /datum/reagent/consumable/flour = 5, - /obj/item/reagent_containers/food/snacks/grown/chili = 1, - /obj/item/reagent_containers/food/snacks/carpmeat = 1 - ) - result = /obj/item/reagent_containers/food/snacks/cubancarp - subcategory = CAT_MEAT - -/datum/crafting_recipe/food/fishandchips - name = "Fish and chips" - reqs = list( - /obj/item/reagent_containers/food/snacks/fries = 1, - /obj/item/reagent_containers/food/snacks/carpmeat = 1 - ) - result = /obj/item/reagent_containers/food/snacks/fishandchips - subcategory = CAT_MEAT - -/datum/crafting_recipe/food/fishfingers - name = "Fish fingers" - reqs = list( - /datum/reagent/consumable/flour = 5, - /obj/item/reagent_containers/food/snacks/bun = 1, - /obj/item/reagent_containers/food/snacks/carpmeat = 1 - ) - result = /obj/item/reagent_containers/food/snacks/fishfingers - subcategory = CAT_MEAT - ////////////////////////////////////////////////MR SPIDER//////////////////////////////////////////////// /datum/crafting_recipe/food/spidereggsham diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm index 3dd27ddd01..0c4e2c2e30 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_misc.dm @@ -186,39 +186,6 @@ result = /obj/item/reagent_containers/food/snacks/melonfruitbowl subcategory = CAT_MISCFOOD -/datum/crafting_recipe/food/spacefreezy - name ="Space freezy" - reqs = list( - /datum/reagent/consumable/bluecherryjelly = 5, - /datum/reagent/consumable/spacemountainwind = 15, - /obj/item/reagent_containers/food/snacks/icecream = 1 - ) - result = /obj/item/reagent_containers/food/snacks/spacefreezy - subcategory = CAT_MISCFOOD - -/datum/crafting_recipe/food/sundae - name ="Sundae" - reqs = list( - /datum/reagent/consumable/cream = 5, - /obj/item/reagent_containers/food/snacks/grown/cherries = 1, - /obj/item/reagent_containers/food/snacks/grown/banana = 1, - /obj/item/reagent_containers/food/snacks/icecream = 1 - ) - result = /obj/item/reagent_containers/food/snacks/sundae - subcategory = CAT_MISCFOOD - -/datum/crafting_recipe/food/honkdae - name ="Honkdae" - reqs = list( - /datum/reagent/consumable/cream = 5, - /obj/item/clothing/mask/gas/clown_hat = 1, - /obj/item/reagent_containers/food/snacks/grown/cherries = 1, - /obj/item/reagent_containers/food/snacks/grown/banana = 2, - /obj/item/reagent_containers/food/snacks/icecream = 1 - ) - result = /obj/item/reagent_containers/food/snacks/honkdae - subcategory = CAT_MISCFOOD - /datum/crafting_recipe/food/nachos name ="Nachos" reqs = list( diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm index 4b76ca120b..2246d12df4 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pastry.dm @@ -22,7 +22,7 @@ ) result = /obj/item/reagent_containers/food/snacks/donut subcategory = CAT_PASTRY - + /datum/crafting_recipe/food/donut time = 15 name = "Semen donut" @@ -104,7 +104,7 @@ datum/crafting_recipe/food/donut/meat /datum/crafting_recipe/food/rofflewaffles name = "Roffle waffles" reqs = list( - /datum/reagent/mushroomhallucinogen = 5, + /datum/reagent/drug/mushroomhallucinogen = 5, /obj/item/reagent_containers/food/snacks/pastrybase = 2 ) result = /obj/item/reagent_containers/food/snacks/rofflewaffles @@ -205,16 +205,6 @@ datum/crafting_recipe/food/donut/meat ////////////////////////////////////////////OTHER//////////////////////////////////////////// -/datum/crafting_recipe/food/hotdog - name = "Hot dog" - reqs = list( - /datum/reagent/consumable/ketchup = 5, - /obj/item/reagent_containers/food/snacks/bun = 1, - /obj/item/reagent_containers/food/snacks/sausage = 1 - ) - result = /obj/item/reagent_containers/food/snacks/hotdog - subcategory = CAT_PASTRY - /datum/crafting_recipe/food/meatbun name = "Meat bun" reqs = list( diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm index 8effc2599a..79d761c2e2 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pie.dm @@ -159,3 +159,13 @@ ) result = /obj/item/reagent_containers/food/snacks/pie/frostypie subcategory = CAT_PIE + +/datum/crafting_recipe/food/baklava + name = "Baklava pie" + reqs = list( + /obj/item/reagent_containers/food/snacks/butter = 1, + /obj/item/reagent_containers/food/snacks/tortilla = 4, //Layers + /obj/item/seeds/wheat/oat = 3 + ) + result = /obj/item/reagent_containers/food/snacks/pie/baklava + subcategory = CAT_PIE \ No newline at end of file diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_sandwich.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_sandwich.dm index a2e83a09b4..133713ac75 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_sandwich.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_sandwich.dm @@ -43,16 +43,6 @@ result = /obj/item/reagent_containers/food/snacks/jellysandwich/cherry subcategory = CAT_SANDWICH -/datum/crafting_recipe/food/icecreamsandwich - name = "Icecream sandwich" - reqs = list( - /datum/reagent/consumable/cream = 5, - /datum/reagent/consumable/ice = 5, - /obj/item/reagent_containers/food/snacks/icecream = 1 - ) - result = /obj/item/reagent_containers/food/snacks/icecreamsandwich - subcategory = CAT_SANDWICH - /datum/crafting_recipe/food/notasandwich name = "Not a sandwich" reqs = list( @@ -62,7 +52,7 @@ result = /obj/item/reagent_containers/food/snacks/notasandwich subcategory = CAT_SANDWICH -/datum/crafting_recipe/food/notasandwich +/datum/crafting_recipe/food/tunasandwich name = "Tuna sandwich" reqs = list( /obj/item/reagent_containers/food/snacks/breadslice/plain = 2, @@ -72,3 +62,13 @@ ) result = /obj/item/reagent_containers/food/snacks/tuna_sandwich subcategory = CAT_SANDWICH + +/datum/crafting_recipe/food/hotdog + name = "Hot dog" + reqs = list( + /datum/reagent/consumable/ketchup = 5, + /obj/item/reagent_containers/food/snacks/bun = 1, + /obj/item/reagent_containers/food/snacks/sausage = 1 + ) + result = /obj/item/reagent_containers/food/snacks/hotdog + subcategory = CAT_SANDWICH diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_sushi.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_sushi.dm index 99d48cf69d..9dbf1d684b 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_sushi.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_sushi.dm @@ -7,7 +7,7 @@ /datum/reagent/consumable/rice = 10 ) result = /obj/item/reagent_containers/food/snacks/sushi_rice - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/sea_weed name = "Sea Weed Sheet" @@ -17,7 +17,7 @@ /obj/item/reagent_containers/food/snacks/grown/kudzupod = 1, ) result = /obj/item/reagent_containers/food/snacks/sea_weed - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/tuna_can name = "Can of Tuna" @@ -27,7 +27,7 @@ /obj/item/reagent_containers/food/snacks/carpmeat = 1, ) result = /obj/item/reagent_containers/food/snacks/tuna - subcategory = CAT_SUSHI + subcategory = CAT_FISH //////////////////////////Sushi///////////////////////////////// @@ -39,7 +39,7 @@ /obj/item/reagent_containers/food/snacks/carpmeat = 1 ) result = /obj/item/reagent_containers/food/snacks/sashimi - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/riceball name = "Onigiri" @@ -49,7 +49,7 @@ /obj/item/reagent_containers/food/snacks/sushi_rice = 1 ) result = /obj/item/reagent_containers/food/snacks/riceball - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/sushie_egg name = "Tobiko" @@ -59,7 +59,7 @@ /obj/item/reagent_containers/food/snacks/sea_weed = 2, ) result = /obj/item/reagent_containers/food/snacks/tobiko - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/sushie_basic name = "Funa Hosomaki" @@ -70,7 +70,7 @@ /obj/item/reagent_containers/food/snacks/sea_weed = 3, ) result = /obj/item/reagent_containers/food/snacks/sushie_basic - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/sushie_adv name = "Funa Nigiri" @@ -80,7 +80,7 @@ /obj/item/reagent_containers/food/snacks/carpmeat = 1 ) result = /obj/item/reagent_containers/food/snacks/sushie_adv - subcategory = CAT_SUSHI + subcategory = CAT_FISH /datum/crafting_recipe/food/sushie_pro name = "Well made Funa Nigiri" @@ -91,4 +91,35 @@ /obj/item/reagent_containers/food/snacks/sea_weed = 1 ) result = /obj/item/reagent_containers/food/snacks/sushie_pro - subcategory = CAT_SUSHI + subcategory = CAT_FISH + +///////////////Gaijin junk///////////////////////////////////// + +/datum/crafting_recipe/food/fishfingers + name = "Fish fingers" + reqs = list( + /datum/reagent/consumable/flour = 5, + /obj/item/reagent_containers/food/snacks/bun = 1, + /obj/item/reagent_containers/food/snacks/carpmeat = 1 + ) + result = /obj/item/reagent_containers/food/snacks/fishfingers + subcategory = CAT_FISH + +/datum/crafting_recipe/food/cubancarp + name = "Cuban carp" + reqs = list( + /datum/reagent/consumable/flour = 5, + /obj/item/reagent_containers/food/snacks/grown/chili = 1, + /obj/item/reagent_containers/food/snacks/carpmeat = 1 + ) + result = /obj/item/reagent_containers/food/snacks/cubancarp + subcategory = CAT_FISH + +/datum/crafting_recipe/food/fishandchips + name = "Fish and chips" + reqs = list( + /obj/item/reagent_containers/food/snacks/fries = 1, + /obj/item/reagent_containers/food/snacks/carpmeat = 1 + ) + result = /obj/item/reagent_containers/food/snacks/fishandchips + subcategory = CAT_FISH \ No newline at end of file diff --git a/code/modules/games/cas.dm b/code/modules/games/cas.dm index 9197e3d044..8953753a89 100644 --- a/code/modules/games/cas.dm +++ b/code/modules/games/cas.dm @@ -31,18 +31,17 @@ decksize = 50 card_text_file = "strings/cas_black.txt" -/obj/item/toy/cards/deck/cas/Initialize() - . = ..() +/obj/item/toy/cards/deck/cas/populate_deck() var/static/list/cards_against_space = list("cas_white" = world.file2list("strings/cas_white.txt"),"cas_black" = world.file2list("strings/cas_black.txt")) allcards = cards_against_space[card_face] var/list/possiblecards = allcards.Copy() if(possiblecards.len < decksize) // sanity check decksize = (possiblecards.len - 1) var/list/randomcards = list() - while (randomcards.len < decksize) + for(var/x in 1 to decksize) randomcards += pick_n_take(possiblecards) - for(var/i=1 to randomcards.len) - var/cardtext = randomcards[i] + for(var/x in 1 to randomcards.len) + var/cardtext = randomcards[x] var/datum/playingcard/P P = new() P.name = "[cardtext]" @@ -50,7 +49,7 @@ cards += P if(!blanks) return - for(var/x=1 to blanks) + for(var/x in 1 to blanks) var/datum/playingcard/P P = new() P.name = "Blank Card" @@ -58,10 +57,7 @@ cards += P shuffle_inplace(cards) // distribute blank cards throughout deck -/obj/item/toy/cards/deck/cas/attack_hand(mob/user) - . = ..() - if(.) - return +/obj/item/toy/cards/deck/cas/draw_card(mob/user) if(user.lying) return if(cards.len == 0) diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js index 23a63d9708..33553d765e 100644 --- a/code/modules/goonchat/browserassets/js/browserOutput.js +++ b/code/modules/goonchat/browserassets/js/browserOutput.js @@ -158,7 +158,16 @@ function byondDecode(message) { // The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b. // Marvelous. message = message.replace(/\+/g, "%20"); - message = decoder(message); + try { + // This is a workaround for the above not always working when BYOND's shitty url encoding breaks. (byond bug id:2399401) + if (decodeURIComponent) { + message = decodeURIComponent(message); + } else { + throw new Error("Easiest way to trigger the fallback") + } + } catch (err) { + message = unescape(message); + } return message; } @@ -361,7 +370,7 @@ function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = 'expires='+d.toUTCString(); - document.cookie = cname + '=' + cvalue + '; ' + expires; + document.cookie = cname + '=' + cvalue + '; ' + expires + "; path=/"; } function getCookie(cname) { @@ -462,15 +471,6 @@ function ehjaxCallback(data) { handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid); } sendVolumeUpdate(); - } else if (data.firebug) { - if (data.trigger) { - internalOutput('Loading firebug console, triggered by '+data.trigger+'...', 'internal'); - } else { - internalOutput('Loading firebug console...', 'internal'); - } - var firebugEl = document.createElement('script'); - firebugEl.src = 'https://getfirebug.com/firebug-lite-debug.js'; - document.body.appendChild(firebugEl); } else if (data.adminMusic) { if (typeof data.adminMusic === 'string') { var adminMusic = byondDecode(data.adminMusic); diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index b88e6e1ebb..83fc18dcb9 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -5,14 +5,13 @@ icon_state = "barrel" density = TRUE anchored = FALSE - container_type = DRAINABLE | AMOUNT_VISIBLE pressure_resistance = 2 * ONE_ATMOSPHERE max_integrity = 300 var/open = FALSE var/speed_multiplier = 1 //How fast it distills. Defaults to 100% (1.0). Lower is better. /obj/structure/fermenting_barrel/Initialize() - create_reagents(300) //Bluespace beakers, but without the portability or efficiency in circuits. + create_reagents(300, DRAINABLE | AMOUNT_VISIBLE) //Bluespace beakers, but without the portability or efficiency in circuits. . = ..() /obj/structure/fermenting_barrel/examine(mob/user) @@ -56,10 +55,12 @@ /obj/structure/fermenting_barrel/attack_hand(mob/user) open = !open if(open) - container_type = REFILLABLE | AMOUNT_VISIBLE + DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE) + ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE) to_chat(user, "You open [src], letting you fill it.") else - container_type = DRAINABLE | AMOUNT_VISIBLE + DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE) + ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE) to_chat(user, "You close [src], letting you draw from its tap.") update_icon() diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index e3f8c254ac..dbcce2830b 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -56,7 +56,7 @@ var/mob/living/carbon/C = user if(C.gloves) return FALSE - if(C.has_trait(TRAIT_PIERCEIMMUNE)) + if(HAS_TRAIT(C, TRAIT_PIERCEIMMUNE)) return FALSE var/hit_zone = (C.held_index_to_dir(C.active_hand_index) == "l" ? "l_":"r_") + "arm" var/obj/item/bodypart/affecting = C.get_bodypart(hit_zone) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 55c0da91f2..ce0ca0220b 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -7,7 +7,6 @@ species = "replicapod" plantname = "Replica Pod" product = /mob/living/carbon/human //verrry special -- Urist - container_type = INJECTABLE|DRAWABLE lifespan = 50 endurance = 8 maturation = 10 @@ -28,7 +27,7 @@ /obj/item/seeds/replicapod/Initialize() . = ..() - create_reagents(volume) + create_reagents(volume, INJECTABLE | DRAWABLE) /obj/item/seeds/replicapod/on_reagent_change(changetype) if(changetype == ADD_REAGENT) diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 3fe5a2dfca..23f178edc9 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -187,7 +187,7 @@ var/turf/open/O = loc if(O.air) var/loc_gases = O.air.gases - if(loc_gases[/datum/gas/oxygen][MOLES] > 13) + if(loc_gases[/datum/gas/oxygen] > 13) return TRUE return FALSE diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 97bf2a31b9..17462c0626 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -310,10 +310,10 @@ /datum/plant_gene/trait/noreact/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc) ..() - G.reagents.set_reacting(FALSE) + ENABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT) /datum/plant_gene/trait/noreact/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) - G.reagents.set_reacting(TRUE) + DISABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT) G.reagents.handle_reactions() diff --git a/code/modules/integrated_electronics/passive/power.dm b/code/modules/integrated_electronics/passive/power.dm index c849dc0e27..d4899a4621 100644 --- a/code/modules/integrated_electronics/passive/power.dm +++ b/code/modules/integrated_electronics/passive/power.dm @@ -90,7 +90,6 @@ icon_state = "chemical_cell" extended_desc = "This is effectively an internal beaker. It will consume and produce power from plasma, slime jelly, welding fuel, carbon,\ ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy." - container_type = OPENCONTAINER complexity = 4 inputs = list() outputs = list("volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_SELFREF) @@ -101,9 +100,9 @@ var/multi = 1 var/lfwb =TRUE -/obj/item/integrated_circuit/passive/power/chemical_cell/New() +/obj/item/integrated_circuit/passive/power/chemical_cell/Initialize() ..() - create_reagents(volume) + create_reagents(volume, OPENCONTAINER) extended_desc +="But no fuel can be compared with blood of living human." diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm index 1715223fa2..230d1ce154 100644 --- a/code/modules/integrated_electronics/subtypes/atmospherics.dm +++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm @@ -1,762 +1,761 @@ -#define SOURCE_TO_TARGET 0 -#define TARGET_TO_SOURCE 1 -#define PUMP_EFFICIENCY 0.6 -#define TANK_FAILURE_PRESSURE (ONE_ATMOSPHERE*25) -#define PUMP_MAX_PRESSURE (ONE_ATMOSPHERE*24) -#define PUMP_MAX_VOLUME 100 - - -/obj/item/integrated_circuit/atmospherics - category_text = "Atmospherics" - cooldown_per_use = 2 SECONDS - complexity = 10 - size = 7 - outputs = list( - "self reference" = IC_PINTYPE_SELFREF, - "pressure" = IC_PINTYPE_NUMBER - ) - var/datum/gas_mixture/air_contents - var/volume = 2 //Pretty small, I know - -/obj/item/integrated_circuit/atmospherics/Initialize() - air_contents = new(volume) - ..() - -/obj/item/integrated_circuit/atmospherics/return_air() - return air_contents - -//Check if the gas container is adjacent and of the right type -/obj/item/integrated_circuit/atmospherics/proc/check_gassource(atom/gasholder) - if(!gasholder) - return FALSE - if(!gasholder.Adjacent(get_object())) - return FALSE - if(!istype(gasholder, /obj/item/tank) && !istype(gasholder, /obj/machinery/portable_atmospherics) && !istype(gasholder, /obj/item/integrated_circuit/atmospherics)) - return FALSE - return TRUE - -//Needed in circuits where source and target types differ -/obj/item/integrated_circuit/atmospherics/proc/check_gastarget(atom/gasholder) - return check_gassource(gasholder) - - -// - gas pump - // **works** -/obj/item/integrated_circuit/atmospherics/pump - name = "gas pump" - desc = "Somehow moves gases between two tanks, canisters, and other gas containers." - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - inputs = list( - "source" = IC_PINTYPE_REF, - "target" = IC_PINTYPE_REF, - "target pressure" = IC_PINTYPE_NUMBER - ) - activators = list( - "transfer" = IC_PINTYPE_PULSE_IN, - "on transfer" = IC_PINTYPE_PULSE_OUT - ) - var/direction = SOURCE_TO_TARGET - var/target_pressure = PUMP_MAX_PRESSURE - power_draw_per_use = 20 - -/obj/item/integrated_circuit/atmospherics/pump/Initialize() - air_contents = new(volume) - extended_desc += " Use negative pressure to move air from target to source. \ - Note that only part of the gas is moved on each transfer, \ - so multiple activations will be necessary to achieve target pressure. \ - The pressure limit for circuit pumps is [round(PUMP_MAX_PRESSURE)] kPa." - . = ..() - -// This proc gets the direction of the gas flow depending on its value, by calling update target -/obj/item/integrated_circuit/atmospherics/pump/on_data_written() - var/amt = get_pin_data(IC_INPUT, 3) - update_target(amt) - -/obj/item/integrated_circuit/atmospherics/pump/proc/update_target(new_amount) - if(!isnum(new_amount)) - new_amount = 0 - // See in which direction the gas moves - if(new_amount < 0) - direction = TARGET_TO_SOURCE - else - direction = SOURCE_TO_TARGET - target_pressure = min(round(PUMP_MAX_PRESSURE),abs(new_amount)) - -/obj/item/integrated_circuit/atmospherics/pump/do_work() - var/obj/source = get_pin_data_as_type(IC_INPUT, 1, /obj) - var/obj/target = get_pin_data_as_type(IC_INPUT, 2, /obj) - perform_magic(source, target) - activate_pin(2) - -/obj/item/integrated_circuit/atmospherics/pump/proc/perform_magic(atom/source, atom/target) - //Check if both atoms are of the right type: atmos circuits/gas tanks/canisters. If one is the same, use the circuit var - if(!check_gassource(source)) - source = src - - if(!check_gastarget(target)) - target = src - - // If both are the same, this whole proc would do nothing and just waste performance - if(source == target) - return - - var/datum/gas_mixture/source_air = source.return_air() - var/datum/gas_mixture/target_air = target.return_air() - - if(!source_air || !target_air) - return - - // Swapping both source and target - if(direction == TARGET_TO_SOURCE) - var/temp = source_air - source_air = target_air - target_air = temp - - // If what you are pumping is empty, use the circuit's storage - if(source_air.total_moles() <= 0) - source_air = air_contents - - // Move gas from one place to another - move_gas(source_air, target_air) - air_update_turf() - -/obj/item/integrated_circuit/atmospherics/pump/proc/move_gas(datum/gas_mixture/source_air, datum/gas_mixture/target_air) - - // No moles = nothing to pump - if(source_air.total_moles() <= 0 || target_air.return_pressure() >= PUMP_MAX_PRESSURE) - return - - // Negative Kelvin temperatures should never happen and if they do, normalize them - if(source_air.temperature < TCMB) - source_air.temperature = TCMB - - var/pressure_delta = target_pressure - target_air.return_pressure() - if(pressure_delta > 0.1) - var/transfer_moles = (pressure_delta*target_air.volume/(source_air.temperature * R_IDEAL_GAS_EQUATION))*PUMP_EFFICIENCY - var/datum/gas_mixture/removed = source_air.remove(transfer_moles) - target_air.merge(removed) - - -// - volume pump - // **Works** -/obj/item/integrated_circuit/atmospherics/pump/volume - name = "volume pump" - desc = "Moves gases between two tanks, canisters, and other gas containers by using their volume, up to 200 L/s." - extended_desc = " Use negative volume to move air from target to source. Note that only part of the gas is moved on each transfer. Its maximum pumping volume is capped at 1000kPa." - - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - inputs = list( - "source" = IC_PINTYPE_REF, - "target" = IC_PINTYPE_REF, - "transfer volume" = IC_PINTYPE_NUMBER - ) - activators = list( - "transfer" = IC_PINTYPE_PULSE_IN, - "on transfer" = IC_PINTYPE_PULSE_OUT - ) - direction = SOURCE_TO_TARGET - var/transfer_rate = PUMP_MAX_VOLUME - power_draw_per_use = 20 - -/obj/item/integrated_circuit/atmospherics/pump/volume/update_target(new_amount) - if(!isnum(new_amount)) - new_amount = 0 - // See in which direction the gas moves - if(new_amount < 0) - direction = TARGET_TO_SOURCE - else - direction = SOURCE_TO_TARGET - target_pressure = min(PUMP_MAX_VOLUME,abs(new_amount)) - -/obj/item/integrated_circuit/atmospherics/pump/volume/move_gas(datum/gas_mixture/source_air, datum/gas_mixture/target_air) - // No moles = nothing to pump - if(source_air.total_moles() <= 0) - return - - // Negative Kelvin temperatures should never happen and if they do, normalize them - if(source_air.temperature < TCMB) - source_air.temperature = TCMB - - if((source_air.return_pressure() < 0.01) || (target_air.return_pressure() >= PUMP_MAX_PRESSURE)) - return - - //The second part of the min caps the pressure built by the volume pumps to the max pump pressure - var/transfer_ratio = min(transfer_rate,target_air.volume*PUMP_MAX_PRESSURE/source_air.return_pressure())/source_air.volume - - var/datum/gas_mixture/removed = source_air.remove_ratio(transfer_ratio * PUMP_EFFICIENCY) - - target_air.merge(removed) - - -// - gas vent - // **works** -/obj/item/integrated_circuit/atmospherics/pump/vent - name = "gas vent" - extended_desc = "Use negative volume to move air from target to environment. Note that only part of the gas is moved on each transfer. Unlike the gas pump, this one keeps pumping even further to pressures of 9000 pKa and it is not advised to use it on tank circuits." - desc = "Moves gases between the environment and adjacent gas containers." - inputs = list( - "container" = IC_PINTYPE_REF, - "target pressure" = IC_PINTYPE_NUMBER - ) - -/obj/item/integrated_circuit/atmospherics/pump/vent/on_data_written() - var/amt = get_pin_data(IC_INPUT, 2) - update_target(amt) - -/obj/item/integrated_circuit/atmospherics/pump/vent/do_work() - var/turf/source = get_turf(src) - var/obj/target = get_pin_data_as_type(IC_INPUT, 1, /obj) - perform_magic(source, target) - activate_pin(2) - -/obj/item/integrated_circuit/atmospherics/pump/vent/check_gastarget(atom/gasholder) - if(!gasholder) - return FALSE - if(!gasholder.Adjacent(get_object())) - return FALSE - if(!istype(gasholder, /obj/item/tank) && !istype(gasholder, /obj/machinery/portable_atmospherics) && !istype(gasholder, /obj/item/integrated_circuit/atmospherics)) - return FALSE - return TRUE - - -/obj/item/integrated_circuit/atmospherics/pump/vent/check_gassource(atom/target) - if(!target) - return FALSE - if(!istype(target, /turf)) - return FALSE - return TRUE - - -// - integrated connector - // Can connect and disconnect properly -/obj/item/integrated_circuit/atmospherics/connector - name = "integrated connector" - desc = "Creates an airtight seal with standard connectors found on the floor, \ - allowing the assembly to exchange gases with a pipe network." - extended_desc = "This circuit will automatically attempt to locate and connect to ports on the floor beneath it when activated. \ - You must set a target before connecting." - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - inputs = list( - "target" = IC_PINTYPE_REF - ) - activators = list( - "toggle connection" = IC_PINTYPE_PULSE_IN, - "on connected" = IC_PINTYPE_PULSE_OUT, - "on connection failed" = IC_PINTYPE_PULSE_OUT, - "on disconnected" = IC_PINTYPE_PULSE_OUT - ) - - var/obj/machinery/atmospherics/components/unary/portables_connector/connector - -/obj/item/integrated_circuit/atmospherics/connector/Initialize() - air_contents = new(volume) - START_PROCESSING(SSobj, src) - . = ..() - -//Sucks up the gas from the connector -/obj/item/integrated_circuit/atmospherics/connector/process() - set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) - -/obj/item/integrated_circuit/atmospherics/connector/check_gassource(atom/gasholder) - if(!gasholder) - return FALSE - if(!istype(gasholder,/obj/machinery/atmospherics/components/unary/portables_connector)) - return FALSE - return TRUE - -//If the assembly containing this is moved from the tile the connector pipe is in, the connection breaks -/obj/item/integrated_circuit/atmospherics/connector/ext_moved() - if(connector) - if(get_dist(get_object(), connector) > 0) - // The assembly is set as connected device and the connector handles the rest - connector.connected_device = null - connector = null - activate_pin(4) - -/obj/item/integrated_circuit/atmospherics/connector/do_work() - // If there is a connection, disconnect - if(connector) - connector.connected_device = null - connector = null - activate_pin(4) - return - - var/obj/machinery/atmospherics/components/unary/portables_connector/PC = locate() in get_turf(src) - // If no connector can't connect - if(!PC) - activate_pin(3) - return - connector = PC - connector.connected_device = src - activate_pin(2) - -// Required for making the connector port script work -obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir() - return air_contents - - -// - gas filter - // **works** -/obj/item/integrated_circuit/atmospherics/pump/filter - name = "gas filter" - desc = "Filters one gas out of a mixture." - complexity = 20 - size = 8 - spawn_flags = IC_SPAWN_RESEARCH - inputs = list( - "source" = IC_PINTYPE_REF, - "filtered output" = IC_PINTYPE_REF, - "contaminants output" = IC_PINTYPE_REF, - "wanted gases" = IC_PINTYPE_LIST, - "target pressure" = IC_PINTYPE_NUMBER - ) - power_draw_per_use = 30 - -/obj/item/integrated_circuit/atmospherics/pump/filter/on_data_written() - var/amt = get_pin_data(IC_INPUT, 5) - target_pressure = CLAMP(amt, 0, PUMP_MAX_PRESSURE) - -/obj/item/integrated_circuit/atmospherics/pump/filter/do_work() - activate_pin(2) - var/obj/source = get_pin_data_as_type(IC_INPUT, 1, /obj) - var/obj/filtered = get_pin_data_as_type(IC_INPUT, 2, /obj) - var/obj/contaminants = get_pin_data_as_type(IC_INPUT, 3, /obj) - - var/wanted = get_pin_data(IC_INPUT, 4) - - // If there is no filtered output, this whole thing makes no sense - if(!check_gassource(filtered)) - return - - var/datum/gas_mixture/filtered_air = filtered.return_air() - if(!filtered_air) - return - - // If no source is set, the source is possibly this circuit's content - if(!check_gassource(source)) - source = src - var/datum/gas_mixture/source_air = source.return_air() - - //No source air: source is this circuit - if(!source_air) - source_air = air_contents - - // If no filtering tank is set, filter through itself - if(!check_gassource(contaminants)) - contaminants = src - var/datum/gas_mixture/contaminated_air = contaminants.return_air() - - //If there is no gas mixture datum for unfiltered, pump the contaminants back into the circuit - if(!contaminated_air) - contaminated_air = air_contents - - if(contaminated_air.return_pressure() >= PUMP_MAX_PRESSURE || filtered_air.return_pressure() >= PUMP_MAX_PRESSURE) - return - - var/pressure_delta = target_pressure - contaminated_air.return_pressure() - var/transfer_moles - - //Negative Kelvins are an anomaly and should be normalized if encountered - if(source_air.temperature < TCMB) - source_air.temperature = TCMB - - transfer_moles = (pressure_delta*contaminated_air.volume/(source_air.temperature * R_IDEAL_GAS_EQUATION))*PUMP_EFFICIENCY - - //If there is nothing to transfer, just return - if(transfer_moles <= 0) - return - - //This is the var that holds the currently filtered part of the gas - var/datum/gas_mixture/removed = source_air.remove(transfer_moles) - if(!removed) - return - - //This is the gas that will be moved from source to filtered - var/datum/gas_mixture/filtered_out = new - - for(var/filtered_gas in removed.gases) - //Get the name of the gas and see if it is in the list - if(removed.gases[filtered_gas][GAS_META][META_GAS_NAME] in wanted) - //The gas that is put in all the filtered out gases - filtered_out.temperature = removed.temperature - filtered_out.add_gas(filtered_gas) - filtered_out.gases[filtered_gas][MOLES] = removed.gases[filtered_gas][MOLES] - - //The filtered out gas is entirely removed from the currently filtered gases - removed.gases[filtered_gas][MOLES] = 0 - removed.garbage_collect() - - //Check if the pressure is high enough to put stuff in filtered, or else just put it back in the source - var/datum/gas_mixture/target = (filtered_air.return_pressure() < target_pressure ? filtered_air : source_air) - target.merge(filtered_out) - contaminated_air.merge(removed) - - -/obj/item/integrated_circuit/atmospherics/pump/filter/Initialize() - air_contents = new(volume) - . = ..() - extended_desc = "Remember to properly spell and capitalize the filtered gas name. \ - Note that only part of the gas is moved on each transfer, \ - so multiple activations will be necessary to achieve target pressure. \ - The pressure limit for circuit pumps is [round(PUMP_MAX_PRESSURE)] kPa." - - -// - gas mixer - // **works** -/obj/item/integrated_circuit/atmospherics/pump/mixer - name = "gas mixer" - desc = "Mixes 2 different types of gases." - complexity = 20 - size = 8 - spawn_flags = IC_SPAWN_RESEARCH - inputs = list( - "first source" = IC_PINTYPE_REF, - "second source" = IC_PINTYPE_REF, - "output" = IC_PINTYPE_REF, - "first source percentage" = IC_PINTYPE_NUMBER, - "target pressure" = IC_PINTYPE_NUMBER - ) - power_draw_per_use = 30 - -/obj/item/integrated_circuit/atmospherics/pump/mixer/do_work() - activate_pin(2) - var/obj/source_1 = get_pin_data(IC_INPUT, 1) - var/obj/source_2 = get_pin_data(IC_INPUT, 2) - var/obj/gas_output = get_pin_data(IC_INPUT, 3) - if(!check_gassource(source_1)) - source_1 = src - - if(!check_gassource(source_2)) - source_2 = src - - if(!check_gassource(gas_output)) - gas_output = src - - if(source_1 == gas_output || source_2 == gas_output) - return - - var/datum/gas_mixture/source_1_gases = source_1.return_air() - var/datum/gas_mixture/source_2_gases = source_2.return_air() - var/datum/gas_mixture/output_gases = gas_output.return_air() - - if(!source_1_gases || !source_2_gases || !output_gases) - return - - if(output_gases.return_pressure() >= PUMP_MAX_PRESSURE) - return - - if(source_1_gases.return_pressure() <= 0 || source_2_gases.return_pressure() <= 0) - return - - //This calculates how much should be sent - var/gas_percentage = round(max(min(get_pin_data(IC_INPUT, 4),100),0) / 100) - - //Basically: number of moles = percentage of pressure filled up * efficiency coefficient * (pressure from both gases * volume of output) / (R * Temperature) - var/transfer_moles = (get_pin_data(IC_INPUT, 5) / max(1,output_gases.return_pressure())) * PUMP_EFFICIENCY * (source_1_gases.return_pressure() * gas_percentage + source_2_gases.return_pressure() * (1 - gas_percentage)) * output_gases.volume/ (R_IDEAL_GAS_EQUATION * max(output_gases.temperature,TCMB)) - - - if(transfer_moles <= 0) - return - - var/datum/gas_mixture/mix = source_1_gases.remove(transfer_moles * gas_percentage) - output_gases.merge(mix) - mix = source_2_gases.remove(transfer_moles * (1-gas_percentage)) - output_gases.merge(mix) - - -// - integrated tank - // **works** -/obj/item/integrated_circuit/atmospherics/tank - name = "integrated tank" - desc = "A small tank for the storage of gases." - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - size = 4 - activators = list( - "push ref" = IC_PINTYPE_PULSE_IN - ) - volume = 3 //emergency tank sized - var/broken = FALSE - -/obj/item/integrated_circuit/atmospherics/tank/Initialize() - air_contents = new(volume) - START_PROCESSING(SSobj, src) - extended_desc = "Take care not to pressurize it above [round(TANK_FAILURE_PRESSURE)] kPa, or else it will break." - . = ..() - -/obj/item/integrated_circuit/atmospherics/tank/Destroy() - STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/integrated_circuit/atmospherics/tank/do_work() - set_pin_data(IC_OUTPUT, 1, WEAKREF(src)) - push_data() - -/obj/item/integrated_circuit/atmospherics/tank/process() - var/tank_pressure = air_contents.return_pressure() - set_pin_data(IC_OUTPUT, 2, tank_pressure) - push_data() - - //Check if tank broken - if(!broken && tank_pressure > TANK_FAILURE_PRESSURE) - broken = TRUE - to_chat(view(2),"The [name] ruptures, releasing its gases!") - if(broken) - release() - -/obj/item/integrated_circuit/atmospherics/tank/proc/release() - if(air_contents.total_moles() > 0) - playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3) - var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles()) - var/turf/current_turf = get_turf(src) - var/datum/gas_mixture/exterior_gas - if(!current_turf) - return - - exterior_gas = current_turf.return_air() - exterior_gas.merge(expelled_gas) - - -// - large integrated tank - // **works** -/obj/item/integrated_circuit/atmospherics/tank/large - name = "large integrated tank" - desc = "A less small tank for the storage of gases." - volume = 9 - size = 12 - spawn_flags = IC_SPAWN_RESEARCH - - -// - freezer tank - // **works** -/obj/item/integrated_circuit/atmospherics/tank/freezer - name = "freezer tank" - desc = "Cools the gas it contains to a preset temperature." - volume = 6 - size = 8 - inputs = list( - "target temperature" = IC_PINTYPE_NUMBER, - "on" = IC_PINTYPE_BOOLEAN - ) - inputs_default = list("1" = 300) - spawn_flags = IC_SPAWN_RESEARCH - var/temperature = 293.15 - var/heater_coefficient = 0.1 - -/obj/item/integrated_circuit/atmospherics/tank/freezer/on_data_written() - temperature = max(73.15,min(293.15,get_pin_data(IC_INPUT, 1))) - if(get_pin_data(IC_INPUT, 2)) - power_draw_idle = 30 - else - power_draw_idle = 0 - -/obj/item/integrated_circuit/atmospherics/tank/freezer/process() - var/tank_pressure = air_contents.return_pressure() - set_pin_data(IC_OUTPUT, 2, tank_pressure) - push_data() - - //Cool the tank if the power is on and the temp is above - if(!power_draw_idle || air_contents.temperature < temperature) - return - - air_contents.temperature = max(73.15,air_contents.temperature - (air_contents.temperature - temperature) * heater_coefficient) - - -// - heater tank - // **works** -/obj/item/integrated_circuit/atmospherics/tank/freezer/heater - name = "heater tank" - desc = "Heats the gas it contains to a preset temperature." - volume = 6 - inputs = list( - "target temperature" = IC_PINTYPE_NUMBER, - "on" = IC_PINTYPE_BOOLEAN - ) - spawn_flags = IC_SPAWN_RESEARCH - -/obj/item/integrated_circuit/atmospherics/tank/freezer/heater/on_data_written() - temperature = max(293.15,min(573.15,get_pin_data(IC_INPUT, 1))) - if(get_pin_data(IC_INPUT, 2)) - power_draw_idle = 30 - else - power_draw_idle = 0 - -/obj/item/integrated_circuit/atmospherics/tank/freezer/heater/process() - var/tank_pressure = air_contents.return_pressure() - set_pin_data(IC_OUTPUT, 2, tank_pressure) - push_data() - - //Heat the tank if the power is on or its temperature is below what is set - if(!power_draw_idle || air_contents.temperature > temperature) - return - - air_contents.temperature = min(573.15,air_contents.temperature + (temperature - air_contents.temperature) * heater_coefficient) - - -// - atmospheric cooler - // **works** -/obj/item/integrated_circuit/atmospherics/cooler - name = "atmospheric cooler circuit" - desc = "Cools the air around it." - volume = 6 - size = 13 - spawn_flags = IC_SPAWN_RESEARCH - inputs = list( - "target temperature" = IC_PINTYPE_NUMBER, - "on" = IC_PINTYPE_BOOLEAN - ) - var/temperature = 293.15 - var/heater_coefficient = 0.1 - -/obj/item/integrated_circuit/atmospherics/cooler/Initialize() - air_contents = new(volume) - START_PROCESSING(SSobj, src) - . = ..() - -/obj/item/integrated_circuit/atmospherics/cooler/Destroy() - STOP_PROCESSING(SSobj, src) - . = ..() - -/obj/item/integrated_circuit/atmospherics/cooler/on_data_written() - temperature = max(243.15,min(293.15,get_pin_data(IC_INPUT, 1))) - if(get_pin_data(IC_INPUT, 2)) - power_draw_idle = 30 - else - power_draw_idle = 0 - -/obj/item/integrated_circuit/atmospherics/cooler/process() - set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) - push_data() - - - //Get the turf you're on and its gas mixture - var/turf/current_turf = get_turf(src) - if(!current_turf) - return - - var/datum/gas_mixture/turf_air = current_turf.return_air() - if(!power_draw_idle || turf_air.temperature < temperature) - return - - //Cool the gas - turf_air.temperature = max(243.15,turf_air.temperature - (turf_air.temperature - temperature) * heater_coefficient) - - -// - atmospheric heater - // **works** -/obj/item/integrated_circuit/atmospherics/cooler/heater - name = "atmospheric heater circuit" - desc = "Heats the air around it." - -/obj/item/integrated_circuit/atmospherics/cooler/heater/on_data_written() - temperature = max(293.15,min(323.15,get_pin_data(IC_INPUT, 1))) - if(get_pin_data(IC_INPUT, 2)) - power_draw_idle = 30 - else - power_draw_idle = 0 - -/obj/item/integrated_circuit/atmospherics/cooler/heater/process() - set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) - push_data() - - //Get the turf and its air mixture - var/turf/current_turf = get_turf(src) - if(!current_turf) - return - - var/datum/gas_mixture/turf_air = current_turf.return_air() - if(!power_draw_idle || turf_air.temperature > temperature) - return - - //Heat the gas - turf_air.temperature = min(323.15,turf_air.temperature + (temperature - turf_air.temperature) * heater_coefficient) - - -// - tank slot - // **works** -/obj/item/integrated_circuit/input/tank_slot - category_text = "Atmospherics" - cooldown_per_use = 1 - name = "tank slot" - desc = "Lets you add a tank to your assembly and remove it even when the assembly is closed." - extended_desc = "It can help you extract gases easier." - complexity = 25 - size = 30 - inputs = list() - outputs = list( - "pressure used" = IC_PINTYPE_NUMBER, - "current tank" = IC_PINTYPE_REF - ) - activators = list( - "push ref" = IC_PINTYPE_PULSE_IN, - "on insert" = IC_PINTYPE_PULSE_OUT, - "on remove" = IC_PINTYPE_PULSE_OUT - ) - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - - can_be_asked_input = TRUE - demands_object_input = TRUE - can_input_object_when_closed = TRUE - - var/obj/item/tank/internals/current_tank - -/obj/item/integrated_circuit/input/tank_slot/Initialize() - START_PROCESSING(SSobj, src) - . = ..() - -/obj/item/integrated_circuit/input/tank_slot/process() - push_pressure() - -/obj/item/integrated_circuit/input/tank_slot/attackby(var/obj/item/tank/internals/I, var/mob/living/user) - //Check if it truly is a tank - if(!istype(I,/obj/item/tank/internals)) - to_chat(user,"The [I.name] doesn't seem to fit in here.") - return - - //Check if there is no other tank already inside - if(current_tank) - to_chat(user,"There is already a gas tank inside.") - return - - //The current tank is the one we just attached, its location is inside the circuit - current_tank = I - user.transferItemToLoc(I,src) - to_chat(user,"You put the [I.name] inside the tank slot.") - - //Set the pin to a weak reference of the current tank - push_pressure() - set_pin_data(IC_OUTPUT, 2, WEAKREF(current_tank)) - push_data() - do_work(1) - - -/obj/item/integrated_circuit/input/tank_slot/ask_for_input(mob/user) - attack_self(user) - -/obj/item/integrated_circuit/input/tank_slot/attack_self(mob/user) - //Check if no tank attached - if(!current_tank) - to_chat(user, "There is currently no tank attached.") - return - - //Remove tank and put in user's hands/location - to_chat(user, "You take [current_tank] out of the tank slot.") - user.put_in_hands(current_tank) - current_tank = null - - //Remove tank reference - push_pressure() - set_pin_data(IC_OUTPUT, 2, null) - push_data() - do_work(2) - -/obj/item/integrated_circuit/input/tank_slot/do_work() - set_pin_data(IC_OUTPUT, 2, WEAKREF(current_tank)) - push_data() - -/obj/item/integrated_circuit/input/tank_slot/proc/push_pressure() - if(!current_tank) - set_pin_data(IC_OUTPUT, 1, 0) - return - - var/datum/gas_mixture/tank_air = current_tank.return_air() - if(!tank_air) - set_pin_data(IC_OUTPUT, 1, 0) - return - - set_pin_data(IC_OUTPUT, 1, tank_air.return_pressure()) - push_data() - - -#undef SOURCE_TO_TARGET -#undef TARGET_TO_SOURCE -#undef PUMP_EFFICIENCY -#undef TANK_FAILURE_PRESSURE -#undef PUMP_MAX_PRESSURE -#undef PUMP_MAX_VOLUME +#define SOURCE_TO_TARGET 0 +#define TARGET_TO_SOURCE 1 +#define PUMP_EFFICIENCY 0.6 +#define TANK_FAILURE_PRESSURE (ONE_ATMOSPHERE*25) +#define PUMP_MAX_PRESSURE (ONE_ATMOSPHERE*24) +#define PUMP_MAX_VOLUME 100 + + +/obj/item/integrated_circuit/atmospherics + category_text = "Atmospherics" + cooldown_per_use = 2 SECONDS + complexity = 10 + size = 7 + outputs = list( + "self reference" = IC_PINTYPE_SELFREF, + "pressure" = IC_PINTYPE_NUMBER + ) + var/datum/gas_mixture/air_contents + var/volume = 2 //Pretty small, I know + +/obj/item/integrated_circuit/atmospherics/Initialize() + air_contents = new(volume) + ..() + +/obj/item/integrated_circuit/atmospherics/return_air() + return air_contents + +//Check if the gas container is adjacent and of the right type +/obj/item/integrated_circuit/atmospherics/proc/check_gassource(atom/gasholder) + if(!gasholder) + return FALSE + if(!gasholder.Adjacent(get_object())) + return FALSE + if(!istype(gasholder, /obj/item/tank) && !istype(gasholder, /obj/machinery/portable_atmospherics) && !istype(gasholder, /obj/item/integrated_circuit/atmospherics)) + return FALSE + return TRUE + +//Needed in circuits where source and target types differ +/obj/item/integrated_circuit/atmospherics/proc/check_gastarget(atom/gasholder) + return check_gassource(gasholder) + + +// - gas pump - // **works** +/obj/item/integrated_circuit/atmospherics/pump + name = "gas pump" + desc = "Somehow moves gases between two tanks, canisters, and other gas containers." + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + inputs = list( + "source" = IC_PINTYPE_REF, + "target" = IC_PINTYPE_REF, + "target pressure" = IC_PINTYPE_NUMBER + ) + activators = list( + "transfer" = IC_PINTYPE_PULSE_IN, + "on transfer" = IC_PINTYPE_PULSE_OUT + ) + var/direction = SOURCE_TO_TARGET + var/target_pressure = PUMP_MAX_PRESSURE + power_draw_per_use = 20 + +/obj/item/integrated_circuit/atmospherics/pump/Initialize() + air_contents = new(volume) + extended_desc += " Use negative pressure to move air from target to source. \ + Note that only part of the gas is moved on each transfer, \ + so multiple activations will be necessary to achieve target pressure. \ + The pressure limit for circuit pumps is [round(PUMP_MAX_PRESSURE)] kPa." + . = ..() + +// This proc gets the direction of the gas flow depending on its value, by calling update target +/obj/item/integrated_circuit/atmospherics/pump/on_data_written() + var/amt = get_pin_data(IC_INPUT, 3) + update_target(amt) + +/obj/item/integrated_circuit/atmospherics/pump/proc/update_target(new_amount) + if(!isnum(new_amount)) + new_amount = 0 + // See in which direction the gas moves + if(new_amount < 0) + direction = TARGET_TO_SOURCE + else + direction = SOURCE_TO_TARGET + target_pressure = min(round(PUMP_MAX_PRESSURE),abs(new_amount)) + +/obj/item/integrated_circuit/atmospherics/pump/do_work() + var/obj/source = get_pin_data_as_type(IC_INPUT, 1, /obj) + var/obj/target = get_pin_data_as_type(IC_INPUT, 2, /obj) + perform_magic(source, target) + activate_pin(2) + +/obj/item/integrated_circuit/atmospherics/pump/proc/perform_magic(atom/source, atom/target) + //Check if both atoms are of the right type: atmos circuits/gas tanks/canisters. If one is the same, use the circuit var + if(!check_gassource(source)) + source = src + + if(!check_gastarget(target)) + target = src + + // If both are the same, this whole proc would do nothing and just waste performance + if(source == target) + return + + var/datum/gas_mixture/source_air = source.return_air() + var/datum/gas_mixture/target_air = target.return_air() + + if(!source_air || !target_air) + return + + // Swapping both source and target + if(direction == TARGET_TO_SOURCE) + var/temp = source_air + source_air = target_air + target_air = temp + + // If what you are pumping is empty, use the circuit's storage + if(source_air.total_moles() <= 0) + source_air = air_contents + + // Move gas from one place to another + move_gas(source_air, target_air) + air_update_turf() + +/obj/item/integrated_circuit/atmospherics/pump/proc/move_gas(datum/gas_mixture/source_air, datum/gas_mixture/target_air) + + // No moles = nothing to pump + if(source_air.total_moles() <= 0 || target_air.return_pressure() >= PUMP_MAX_PRESSURE) + return + + // Negative Kelvin temperatures should never happen and if they do, normalize them + if(source_air.temperature < TCMB) + source_air.temperature = TCMB + + var/pressure_delta = target_pressure - target_air.return_pressure() + if(pressure_delta > 0.1) + var/transfer_moles = (pressure_delta*target_air.volume/(source_air.temperature * R_IDEAL_GAS_EQUATION))*PUMP_EFFICIENCY + var/datum/gas_mixture/removed = source_air.remove(transfer_moles) + target_air.merge(removed) + + +// - volume pump - // **Works** +/obj/item/integrated_circuit/atmospherics/pump/volume + name = "volume pump" + desc = "Moves gases between two tanks, canisters, and other gas containers by using their volume, up to 200 L/s." + extended_desc = " Use negative volume to move air from target to source. Note that only part of the gas is moved on each transfer. Its maximum pumping volume is capped at 1000kPa." + + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + inputs = list( + "source" = IC_PINTYPE_REF, + "target" = IC_PINTYPE_REF, + "transfer volume" = IC_PINTYPE_NUMBER + ) + activators = list( + "transfer" = IC_PINTYPE_PULSE_IN, + "on transfer" = IC_PINTYPE_PULSE_OUT + ) + direction = SOURCE_TO_TARGET + var/transfer_rate = PUMP_MAX_VOLUME + power_draw_per_use = 20 + +/obj/item/integrated_circuit/atmospherics/pump/volume/update_target(new_amount) + if(!isnum(new_amount)) + new_amount = 0 + // See in which direction the gas moves + if(new_amount < 0) + direction = TARGET_TO_SOURCE + else + direction = SOURCE_TO_TARGET + target_pressure = min(PUMP_MAX_VOLUME,abs(new_amount)) + +/obj/item/integrated_circuit/atmospherics/pump/volume/move_gas(datum/gas_mixture/source_air, datum/gas_mixture/target_air) + // No moles = nothing to pump + if(source_air.total_moles() <= 0) + return + + // Negative Kelvin temperatures should never happen and if they do, normalize them + if(source_air.temperature < TCMB) + source_air.temperature = TCMB + + if((source_air.return_pressure() < 0.01) || (target_air.return_pressure() >= PUMP_MAX_PRESSURE)) + return + + //The second part of the min caps the pressure built by the volume pumps to the max pump pressure + var/transfer_ratio = min(transfer_rate,target_air.volume*PUMP_MAX_PRESSURE/source_air.return_pressure())/source_air.volume + + var/datum/gas_mixture/removed = source_air.remove_ratio(transfer_ratio * PUMP_EFFICIENCY) + + target_air.merge(removed) + + +// - gas vent - // **works** +/obj/item/integrated_circuit/atmospherics/pump/vent + name = "gas vent" + extended_desc = "Use negative volume to move air from target to environment. Note that only part of the gas is moved on each transfer. Unlike the gas pump, this one keeps pumping even further to pressures of 9000 pKa and it is not advised to use it on tank circuits." + desc = "Moves gases between the environment and adjacent gas containers." + inputs = list( + "container" = IC_PINTYPE_REF, + "target pressure" = IC_PINTYPE_NUMBER + ) + +/obj/item/integrated_circuit/atmospherics/pump/vent/on_data_written() + var/amt = get_pin_data(IC_INPUT, 2) + update_target(amt) + +/obj/item/integrated_circuit/atmospherics/pump/vent/do_work() + var/turf/source = get_turf(src) + var/obj/target = get_pin_data_as_type(IC_INPUT, 1, /obj) + perform_magic(source, target) + activate_pin(2) + +/obj/item/integrated_circuit/atmospherics/pump/vent/check_gastarget(atom/gasholder) + if(!gasholder) + return FALSE + if(!gasholder.Adjacent(get_object())) + return FALSE + if(!istype(gasholder, /obj/item/tank) && !istype(gasholder, /obj/machinery/portable_atmospherics) && !istype(gasholder, /obj/item/integrated_circuit/atmospherics)) + return FALSE + return TRUE + + +/obj/item/integrated_circuit/atmospherics/pump/vent/check_gassource(atom/target) + if(!target) + return FALSE + if(!istype(target, /turf)) + return FALSE + return TRUE + + +// - integrated connector - // Can connect and disconnect properly +/obj/item/integrated_circuit/atmospherics/connector + name = "integrated connector" + desc = "Creates an airtight seal with standard connectors found on the floor, \ + allowing the assembly to exchange gases with a pipe network." + extended_desc = "This circuit will automatically attempt to locate and connect to ports on the floor beneath it when activated. \ + You must set a target before connecting." + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + inputs = list( + "target" = IC_PINTYPE_REF + ) + activators = list( + "toggle connection" = IC_PINTYPE_PULSE_IN, + "on connected" = IC_PINTYPE_PULSE_OUT, + "on connection failed" = IC_PINTYPE_PULSE_OUT, + "on disconnected" = IC_PINTYPE_PULSE_OUT + ) + + var/obj/machinery/atmospherics/components/unary/portables_connector/connector + +/obj/item/integrated_circuit/atmospherics/connector/Initialize() + air_contents = new(volume) + START_PROCESSING(SSobj, src) + . = ..() + +//Sucks up the gas from the connector +/obj/item/integrated_circuit/atmospherics/connector/process() + set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) + +/obj/item/integrated_circuit/atmospherics/connector/check_gassource(atom/gasholder) + if(!gasholder) + return FALSE + if(!istype(gasholder,/obj/machinery/atmospherics/components/unary/portables_connector)) + return FALSE + return TRUE + +//If the assembly containing this is moved from the tile the connector pipe is in, the connection breaks +/obj/item/integrated_circuit/atmospherics/connector/ext_moved() + if(connector) + if(get_dist(get_object(), connector) > 0) + // The assembly is set as connected device and the connector handles the rest + connector.connected_device = null + connector = null + activate_pin(4) + +/obj/item/integrated_circuit/atmospherics/connector/do_work() + // If there is a connection, disconnect + if(connector) + connector.connected_device = null + connector = null + activate_pin(4) + return + + var/obj/machinery/atmospherics/components/unary/portables_connector/PC = locate() in get_turf(src) + // If no connector can't connect + if(!PC) + activate_pin(3) + return + connector = PC + connector.connected_device = src + activate_pin(2) + +// Required for making the connector port script work +obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir() + return air_contents + + +// - gas filter - // **works** +/obj/item/integrated_circuit/atmospherics/pump/filter + name = "gas filter" + desc = "Filters one gas out of a mixture." + complexity = 20 + size = 8 + spawn_flags = IC_SPAWN_RESEARCH + inputs = list( + "source" = IC_PINTYPE_REF, + "filtered output" = IC_PINTYPE_REF, + "contaminants output" = IC_PINTYPE_REF, + "wanted gases" = IC_PINTYPE_LIST, + "target pressure" = IC_PINTYPE_NUMBER + ) + power_draw_per_use = 30 + +/obj/item/integrated_circuit/atmospherics/pump/filter/on_data_written() + var/amt = get_pin_data(IC_INPUT, 5) + target_pressure = CLAMP(amt, 0, PUMP_MAX_PRESSURE) + +/obj/item/integrated_circuit/atmospherics/pump/filter/do_work() + activate_pin(2) + var/obj/source = get_pin_data_as_type(IC_INPUT, 1, /obj) + var/obj/filtered = get_pin_data_as_type(IC_INPUT, 2, /obj) + var/obj/contaminants = get_pin_data_as_type(IC_INPUT, 3, /obj) + + var/wanted = get_pin_data(IC_INPUT, 4) + + // If there is no filtered output, this whole thing makes no sense + if(!check_gassource(filtered)) + return + + var/datum/gas_mixture/filtered_air = filtered.return_air() + if(!filtered_air) + return + + // If no source is set, the source is possibly this circuit's content + if(!check_gassource(source)) + source = src + var/datum/gas_mixture/source_air = source.return_air() + + //No source air: source is this circuit + if(!source_air) + source_air = air_contents + + // If no filtering tank is set, filter through itself + if(!check_gassource(contaminants)) + contaminants = src + var/datum/gas_mixture/contaminated_air = contaminants.return_air() + + //If there is no gas mixture datum for unfiltered, pump the contaminants back into the circuit + if(!contaminated_air) + contaminated_air = air_contents + + if(contaminated_air.return_pressure() >= PUMP_MAX_PRESSURE || filtered_air.return_pressure() >= PUMP_MAX_PRESSURE) + return + + var/pressure_delta = target_pressure - contaminated_air.return_pressure() + var/transfer_moles + + //Negative Kelvins are an anomaly and should be normalized if encountered + if(source_air.temperature < TCMB) + source_air.temperature = TCMB + + transfer_moles = (pressure_delta*contaminated_air.volume/(source_air.temperature * R_IDEAL_GAS_EQUATION))*PUMP_EFFICIENCY + + //If there is nothing to transfer, just return + if(transfer_moles <= 0) + return + + //This is the var that holds the currently filtered part of the gas + var/datum/gas_mixture/removed = source_air.remove(transfer_moles) + if(!removed) + return + + //This is the gas that will be moved from source to filtered + var/datum/gas_mixture/filtered_out = new + + for(var/filtered_gas in removed.gases) + //Get the name of the gas and see if it is in the list + if(GLOB.meta_gas_names[filtered_gas] in wanted) + //The gas that is put in all the filtered out gases + filtered_out.temperature = removed.temperature + filtered_out.gases[filtered_gas] = removed.gases[filtered_gas] + + //The filtered out gas is entirely removed from the currently filtered gases + removed.gases[filtered_gas] = 0 + GAS_GARBAGE_COLLECT(removed.gases) + + //Check if the pressure is high enough to put stuff in filtered, or else just put it back in the source + var/datum/gas_mixture/target = (filtered_air.return_pressure() < target_pressure ? filtered_air : source_air) + target.merge(filtered_out) + contaminated_air.merge(removed) + + +/obj/item/integrated_circuit/atmospherics/pump/filter/Initialize() + air_contents = new(volume) + . = ..() + extended_desc = "Remember to properly spell and capitalize the filtered gas name. \ + Note that only part of the gas is moved on each transfer, \ + so multiple activations will be necessary to achieve target pressure. \ + The pressure limit for circuit pumps is [round(PUMP_MAX_PRESSURE)] kPa." + + +// - gas mixer - // **works** +/obj/item/integrated_circuit/atmospherics/pump/mixer + name = "gas mixer" + desc = "Mixes 2 different types of gases." + complexity = 20 + size = 8 + spawn_flags = IC_SPAWN_RESEARCH + inputs = list( + "first source" = IC_PINTYPE_REF, + "second source" = IC_PINTYPE_REF, + "output" = IC_PINTYPE_REF, + "first source percentage" = IC_PINTYPE_NUMBER, + "target pressure" = IC_PINTYPE_NUMBER + ) + power_draw_per_use = 30 + +/obj/item/integrated_circuit/atmospherics/pump/mixer/do_work() + activate_pin(2) + var/obj/source_1 = get_pin_data(IC_INPUT, 1) + var/obj/source_2 = get_pin_data(IC_INPUT, 2) + var/obj/gas_output = get_pin_data(IC_INPUT, 3) + if(!check_gassource(source_1)) + source_1 = src + + if(!check_gassource(source_2)) + source_2 = src + + if(!check_gassource(gas_output)) + gas_output = src + + if(source_1 == gas_output || source_2 == gas_output) + return + + var/datum/gas_mixture/source_1_gases = source_1.return_air() + var/datum/gas_mixture/source_2_gases = source_2.return_air() + var/datum/gas_mixture/output_gases = gas_output.return_air() + + if(!source_1_gases || !source_2_gases || !output_gases) + return + + if(output_gases.return_pressure() >= PUMP_MAX_PRESSURE) + return + + if(source_1_gases.return_pressure() <= 0 || source_2_gases.return_pressure() <= 0) + return + + //This calculates how much should be sent + var/gas_percentage = round(max(min(get_pin_data(IC_INPUT, 4),100),0) / 100) + + //Basically: number of moles = percentage of pressure filled up * efficiency coefficient * (pressure from both gases * volume of output) / (R * Temperature) + var/transfer_moles = (get_pin_data(IC_INPUT, 5) / max(1,output_gases.return_pressure())) * PUMP_EFFICIENCY * (source_1_gases.return_pressure() * gas_percentage + source_2_gases.return_pressure() * (1 - gas_percentage)) * output_gases.volume/ (R_IDEAL_GAS_EQUATION * max(output_gases.temperature,TCMB)) + + + if(transfer_moles <= 0) + return + + var/datum/gas_mixture/mix = source_1_gases.remove(transfer_moles * gas_percentage) + output_gases.merge(mix) + mix = source_2_gases.remove(transfer_moles * (1-gas_percentage)) + output_gases.merge(mix) + + +// - integrated tank - // **works** +/obj/item/integrated_circuit/atmospherics/tank + name = "integrated tank" + desc = "A small tank for the storage of gases." + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + size = 4 + activators = list( + "push ref" = IC_PINTYPE_PULSE_IN + ) + volume = 3 //emergency tank sized + var/broken = FALSE + +/obj/item/integrated_circuit/atmospherics/tank/Initialize() + air_contents = new(volume) + START_PROCESSING(SSobj, src) + extended_desc = "Take care not to pressurize it above [round(TANK_FAILURE_PRESSURE)] kPa, or else it will break." + . = ..() + +/obj/item/integrated_circuit/atmospherics/tank/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/integrated_circuit/atmospherics/tank/do_work() + set_pin_data(IC_OUTPUT, 1, WEAKREF(src)) + push_data() + +/obj/item/integrated_circuit/atmospherics/tank/process() + var/tank_pressure = air_contents.return_pressure() + set_pin_data(IC_OUTPUT, 2, tank_pressure) + push_data() + + //Check if tank broken + if(!broken && tank_pressure > TANK_FAILURE_PRESSURE) + broken = TRUE + to_chat(view(2),"The [name] ruptures, releasing its gases!") + if(broken) + release() + +/obj/item/integrated_circuit/atmospherics/tank/proc/release() + if(air_contents.total_moles() > 0) + playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3) + var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles()) + var/turf/current_turf = get_turf(src) + var/datum/gas_mixture/exterior_gas + if(!current_turf) + return + + exterior_gas = current_turf.return_air() + exterior_gas.merge(expelled_gas) + + +// - large integrated tank - // **works** +/obj/item/integrated_circuit/atmospherics/tank/large + name = "large integrated tank" + desc = "A less small tank for the storage of gases." + volume = 9 + size = 12 + spawn_flags = IC_SPAWN_RESEARCH + + +// - freezer tank - // **works** +/obj/item/integrated_circuit/atmospherics/tank/freezer + name = "freezer tank" + desc = "Cools the gas it contains to a preset temperature." + volume = 6 + size = 8 + inputs = list( + "target temperature" = IC_PINTYPE_NUMBER, + "on" = IC_PINTYPE_BOOLEAN + ) + inputs_default = list("1" = 300) + spawn_flags = IC_SPAWN_RESEARCH + var/temperature = 293.15 + var/heater_coefficient = 0.1 + +/obj/item/integrated_circuit/atmospherics/tank/freezer/on_data_written() + temperature = max(73.15,min(293.15,get_pin_data(IC_INPUT, 1))) + if(get_pin_data(IC_INPUT, 2)) + power_draw_idle = 30 + else + power_draw_idle = 0 + +/obj/item/integrated_circuit/atmospherics/tank/freezer/process() + var/tank_pressure = air_contents.return_pressure() + set_pin_data(IC_OUTPUT, 2, tank_pressure) + push_data() + + //Cool the tank if the power is on and the temp is above + if(!power_draw_idle || air_contents.temperature < temperature) + return + + air_contents.temperature = max(73.15,air_contents.temperature - (air_contents.temperature - temperature) * heater_coefficient) + + +// - heater tank - // **works** +/obj/item/integrated_circuit/atmospherics/tank/freezer/heater + name = "heater tank" + desc = "Heats the gas it contains to a preset temperature." + volume = 6 + inputs = list( + "target temperature" = IC_PINTYPE_NUMBER, + "on" = IC_PINTYPE_BOOLEAN + ) + spawn_flags = IC_SPAWN_RESEARCH + +/obj/item/integrated_circuit/atmospherics/tank/freezer/heater/on_data_written() + temperature = max(293.15,min(573.15,get_pin_data(IC_INPUT, 1))) + if(get_pin_data(IC_INPUT, 2)) + power_draw_idle = 30 + else + power_draw_idle = 0 + +/obj/item/integrated_circuit/atmospherics/tank/freezer/heater/process() + var/tank_pressure = air_contents.return_pressure() + set_pin_data(IC_OUTPUT, 2, tank_pressure) + push_data() + + //Heat the tank if the power is on or its temperature is below what is set + if(!power_draw_idle || air_contents.temperature > temperature) + return + + air_contents.temperature = min(573.15,air_contents.temperature + (temperature - air_contents.temperature) * heater_coefficient) + + +// - atmospheric cooler - // **works** +/obj/item/integrated_circuit/atmospherics/cooler + name = "atmospheric cooler circuit" + desc = "Cools the air around it." + volume = 6 + size = 13 + spawn_flags = IC_SPAWN_RESEARCH + inputs = list( + "target temperature" = IC_PINTYPE_NUMBER, + "on" = IC_PINTYPE_BOOLEAN + ) + var/temperature = 293.15 + var/heater_coefficient = 0.1 + +/obj/item/integrated_circuit/atmospherics/cooler/Initialize() + air_contents = new(volume) + START_PROCESSING(SSobj, src) + . = ..() + +/obj/item/integrated_circuit/atmospherics/cooler/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/integrated_circuit/atmospherics/cooler/on_data_written() + temperature = max(243.15,min(293.15,get_pin_data(IC_INPUT, 1))) + if(get_pin_data(IC_INPUT, 2)) + power_draw_idle = 30 + else + power_draw_idle = 0 + +/obj/item/integrated_circuit/atmospherics/cooler/process() + set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) + push_data() + + + //Get the turf you're on and its gas mixture + var/turf/current_turf = get_turf(src) + if(!current_turf) + return + + var/datum/gas_mixture/turf_air = current_turf.return_air() + if(!power_draw_idle || turf_air.temperature < temperature) + return + + //Cool the gas + turf_air.temperature = max(243.15,turf_air.temperature - (turf_air.temperature - temperature) * heater_coefficient) + + +// - atmospheric heater - // **works** +/obj/item/integrated_circuit/atmospherics/cooler/heater + name = "atmospheric heater circuit" + desc = "Heats the air around it." + +/obj/item/integrated_circuit/atmospherics/cooler/heater/on_data_written() + temperature = max(293.15,min(323.15,get_pin_data(IC_INPUT, 1))) + if(get_pin_data(IC_INPUT, 2)) + power_draw_idle = 30 + else + power_draw_idle = 0 + +/obj/item/integrated_circuit/atmospherics/cooler/heater/process() + set_pin_data(IC_OUTPUT, 2, air_contents.return_pressure()) + push_data() + + //Get the turf and its air mixture + var/turf/current_turf = get_turf(src) + if(!current_turf) + return + + var/datum/gas_mixture/turf_air = current_turf.return_air() + if(!power_draw_idle || turf_air.temperature > temperature) + return + + //Heat the gas + turf_air.temperature = min(323.15,turf_air.temperature + (temperature - turf_air.temperature) * heater_coefficient) + + +// - tank slot - // **works** +/obj/item/integrated_circuit/input/tank_slot + category_text = "Atmospherics" + cooldown_per_use = 1 + name = "tank slot" + desc = "Lets you add a tank to your assembly and remove it even when the assembly is closed." + extended_desc = "It can help you extract gases easier." + complexity = 25 + size = 30 + inputs = list() + outputs = list( + "pressure used" = IC_PINTYPE_NUMBER, + "current tank" = IC_PINTYPE_REF + ) + activators = list( + "push ref" = IC_PINTYPE_PULSE_IN, + "on insert" = IC_PINTYPE_PULSE_OUT, + "on remove" = IC_PINTYPE_PULSE_OUT + ) + spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH + + can_be_asked_input = TRUE + demands_object_input = TRUE + can_input_object_when_closed = TRUE + + var/obj/item/tank/internals/current_tank + +/obj/item/integrated_circuit/input/tank_slot/Initialize() + START_PROCESSING(SSobj, src) + . = ..() + +/obj/item/integrated_circuit/input/tank_slot/process() + push_pressure() + +/obj/item/integrated_circuit/input/tank_slot/attackby(var/obj/item/tank/internals/I, var/mob/living/user) + //Check if it truly is a tank + if(!istype(I,/obj/item/tank/internals)) + to_chat(user,"The [I.name] doesn't seem to fit in here.") + return + + //Check if there is no other tank already inside + if(current_tank) + to_chat(user,"There is already a gas tank inside.") + return + + //The current tank is the one we just attached, its location is inside the circuit + current_tank = I + user.transferItemToLoc(I,src) + to_chat(user,"You put the [I.name] inside the tank slot.") + + //Set the pin to a weak reference of the current tank + push_pressure() + set_pin_data(IC_OUTPUT, 2, WEAKREF(current_tank)) + push_data() + do_work(1) + + +/obj/item/integrated_circuit/input/tank_slot/ask_for_input(mob/user) + attack_self(user) + +/obj/item/integrated_circuit/input/tank_slot/attack_self(mob/user) + //Check if no tank attached + if(!current_tank) + to_chat(user, "There is currently no tank attached.") + return + + //Remove tank and put in user's hands/location + to_chat(user, "You take [current_tank] out of the tank slot.") + user.put_in_hands(current_tank) + current_tank = null + + //Remove tank reference + push_pressure() + set_pin_data(IC_OUTPUT, 2, null) + push_data() + do_work(2) + +/obj/item/integrated_circuit/input/tank_slot/do_work() + set_pin_data(IC_OUTPUT, 2, WEAKREF(current_tank)) + push_data() + +/obj/item/integrated_circuit/input/tank_slot/proc/push_pressure() + if(!current_tank) + set_pin_data(IC_OUTPUT, 1, 0) + return + + var/datum/gas_mixture/tank_air = current_tank.return_air() + if(!tank_air) + set_pin_data(IC_OUTPUT, 1, 0) + return + + set_pin_data(IC_OUTPUT, 1, tank_air.return_pressure()) + push_data() + + +#undef SOURCE_TO_TARGET +#undef TARGET_TO_SOURCE +#undef PUMP_EFFICIENCY +#undef TANK_FAILURE_PRESSURE +#undef PUMP_MAX_PRESSURE +#undef PUMP_MAX_VOLUME diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index a7c58e8669..b258a15972 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -1165,8 +1165,8 @@ var/list/gas_names = list() var/list/gas_amounts = list() for(var/id in gases) - var/name = gases[id][GAS_META][META_GAS_NAME] - var/amt = round(gases[id][MOLES], 0.001) + var/name = GLOB.meta_gas_names[id] + var/amt = round(gases[id], 0.001) gas_names.Add(name) gas_amounts.Add(amt) diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index fb8fce10b2..027a03650a 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -51,7 +51,6 @@ extended_desc = "This autoinjector can push up to 30 units of reagents into another container or someone else outside of the machine. The target \ must be adjacent to the machine, and if it is a person, they cannot be wearing thick clothing. Negative given amounts makes the injector suck out reagents instead." - container_type = OPENCONTAINER volume = 30 complexity = 20 @@ -80,6 +79,10 @@ var/transfer_amount = 10 var/busy = FALSE +/obj/item/integrated_circuit/reagent/injector/Initialize() + . = ..() + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) + /obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype) push_vol() @@ -260,7 +263,6 @@ icon_state = "reagent_storage" extended_desc = "This is effectively an internal beaker." - container_type = OPENCONTAINER volume = 60 complexity = 4 @@ -272,7 +274,9 @@ activators = list("push ref" = IC_PINTYPE_PULSE_OUT) spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - +/obj/item/integrated_circuit/reagent/storage/Initialize() + . = ..() + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) /obj/item/integrated_circuit/reagent/storage/do_work() set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) @@ -302,7 +306,7 @@ /obj/item/integrated_circuit/reagent/storage/cryo/Initialize() . = ..() - reagents.set_reacting(FALSE) + ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) /obj/item/integrated_circuit/reagent/storage/grinder name = "reagent grinder" @@ -501,7 +505,6 @@ desc = "Stores liquid inside the device away from electrical components. It can store up to 60u. It will heat or cool the reagents \ to the target temperature when turned on." icon_state = "heater" - container_type = OPENCONTAINER complexity = 8 inputs = list( "target temperature" = IC_PINTYPE_NUMBER, @@ -552,7 +555,6 @@ ext_cooldown = 1 volume = 100 - container_type = OPENCONTAINER complexity = 20 cooldown_per_use = 1 SECONDS @@ -571,6 +573,10 @@ var/smoke_radius = 5 var/notified = FALSE +/obj/item/integrated_circuit/reagent/smoke/Initialize() + . = ..() + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) + /obj/item/integrated_circuit/reagent/smoke/on_reagent_change(changetype) //reset warning only if we have reagents now if(changetype == ADD_REAGENT) @@ -605,7 +611,6 @@ extended_desc = "This circuit can hold up to 30 units of any given chemicals. On each use, it sprays these reagents like a fire extinguisher. Requires at least 10 units of reagents to work." volume = 30 - container_type = OPENCONTAINER complexity = 20 cooldown_per_use = 6 SECONDS @@ -628,6 +633,7 @@ /obj/item/integrated_circuit/reagent/extinguisher/Initialize() .=..() + ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER) set_pin_data(IC_OUTPUT,2, src) /obj/item/integrated_circuit/reagent/extinguisher/on_reagent_change(changetype) diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm index e44347a208..776727a5f8 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/civilian_chaplain.dm @@ -24,14 +24,14 @@ Chaplain var/obj/item/storage/book/bible/booze/B = new - if(SSreligion.religion) - B.deity_name = SSreligion.deity - B.name = SSreligion.bible_name - B.icon_state = SSreligion.bible_icon_state - B.item_state = SSreligion.bible_item_state - to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [SSreligion.deity]. Defer to the Chaplain.") + if(GLOB.religion) + B.deity_name = GLOB.deity + B.name = GLOB.bible_name + B.icon_state = GLOB.bible_icon_state + B.item_state = GLOB.bible_item_state + to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [GLOB.deity]. Defer to the Chaplain.") H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) - var/nrt = SSreligion.holy_weapon_type || /obj/item/nullrod + var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod var/obj/item/nullrod/N = new nrt(H) H.put_in_hands(N) return @@ -74,9 +74,9 @@ Chaplain else B.name = "The Holy Book of [new_religion]" - SSreligion.religion = new_religion - SSreligion.bible_name = B.name - SSreligion.deity = B.deity_name + GLOB.religion = new_religion + GLOB.bible_name = B.name + GLOB.deity = B.deity_name H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) diff --git a/code/modules/jobs/job_types/silicon.dm b/code/modules/jobs/job_types/silicon.dm index 662f666cf1..ab963eb8f3 100644 --- a/code/modules/jobs/job_types/silicon.dm +++ b/code/modules/jobs/job_types/silicon.dm @@ -35,6 +35,7 @@ AI qdel(lateJoinCore) var/mob/living/silicon/ai/AI = H AI.apply_pref_name("ai", M.client) //If this runtimes oh well jobcode is fucked. + AI.set_core_display_icon(null, M.client) //we may have been created after our borg if(SSticker.current_state == GAME_STATE_SETTING_UP) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 8ae63a8a76..699df5de12 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -485,11 +485,11 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums if(href_list["printbible"]) if(cooldown < world.time) var/obj/item/storage/book/bible/B = new /obj/item/storage/book/bible(src.loc) - if(SSreligion.bible_icon_state && SSreligion.bible_item_state) - B.icon_state = SSreligion.bible_icon_state - B.item_state = SSreligion.bible_item_state - B.name = SSreligion.bible_name - B.deity_name = SSreligion.deity + if(GLOB.bible_icon_state && GLOB.bible_item_state) + B.icon_state = GLOB.bible_icon_state + B.item_state = GLOB.bible_item_state + B.name = GLOB.bible_name + B.deity_name = GLOB.deity cooldown = world.time + PRINTER_COOLDOWN else say("Printer currently unavailable, please wait a moment.") diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index ceba29baec..1f55f18823 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -29,6 +29,7 @@ var/list/obj/machinery/atmospherics/atmos_machines = list() var/list/obj/structure/cable/cables = list() var/list/atom/atoms = list() + var/list/area/areas = list() var/list/turfs = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) @@ -37,6 +38,7 @@ for(var/L in turfs) var/turf/B = L atoms += B + areas |= B.loc for(var/A in B) atoms += A if(istype(A, /obj/structure/cable)) @@ -48,6 +50,7 @@ var/turf/T = L T.air_update_turf(TRUE) //calculate adjacent turfs along the border to prevent runtimes + SSmapping.reg_in_areas_in_z(areas) SSatoms.InitializeAtoms(atoms) SSmachines.setup_template_powernets(cables) SSair.setup_template_machinery(atmos_machines) diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index ca313182b6..0d6c337444 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -31,7 +31,7 @@ force = 10 throwforce = 7 slot_flags = ITEM_SLOT_BELT - w_class = WEIGHT_CLASS_NORMAL + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=1000) /obj/item/pickaxe/silver @@ -41,6 +41,7 @@ toolspeed = 0.5 //mines faster than a normal pickaxe, bought from mining vendor desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." force = 17 + materials = list(MAT_SILVER=4000) /obj/item/pickaxe/diamond name = "diamond-tipped pickaxe" @@ -49,6 +50,7 @@ toolspeed = 0.3 desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt." force = 19 + materials = list(MAT_DIAMOND=4000) /obj/item/pickaxe/drill name = "mining drill" @@ -75,12 +77,13 @@ /obj/item/pickaxe/drill/cyborg/diamond //This is the BORG version! name = "diamond-tipped cyborg mining drill" //To inherit the NODROP_1 flag, and easier to change borg specific drill mechanics. icon_state = "diamonddrill" - toolspeed = 0.2 + toolspeed = 0.1 /obj/item/pickaxe/drill/jackhammer name = "sonic jackhammer" icon_state = "jackhammer" item_state = "jackhammer" + w_class = WEIGHT_CLASS_HUGE toolspeed = 0.1 //the epitome of powertools. extremely fast mining, laughs at puny walls usesound = 'sound/weapons/sonic_jackhammer.ogg' hitsound = 'sound/weapons/sonic_jackhammer.ogg' @@ -97,12 +100,12 @@ slot_flags = ITEM_SLOT_BELT force = 8 tool_behaviour = TOOL_SHOVEL - toolspeed = 1 + toolspeed = 0.1 //Can only dig ash and thats about it, out classed by the picks and drills no more! usesound = 'sound/effects/shovel_dig.ogg' throwforce = 4 item_state = "shovel" w_class = WEIGHT_CLASS_NORMAL - materials = list(MAT_METAL=50) + materials = list(MAT_METAL=350) attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") sharpness = IS_SHARP @@ -124,6 +127,8 @@ item_state = "spade" lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi' + toolspeed = 0.5 force = 5 throwforce = 7 + materials = list(MAT_METAL=50) w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index dd7f642243..5193545c4b 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -144,7 +144,12 @@ GLOBAL_LIST(labor_sheet_values) points += inp.point_value * inp.amount ..() - +/obj/machinery/mineral/stacking_machine/laborstacker/attackby(obj/item/I, mob/living/user) + if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I)) + var/obj/item/stack/sheet/inp = I + points += inp.point_value * inp.amount + return ..() + /**********************Point Lookup Console**************************/ /obj/machinery/mineral/labor_points_checker name = "points checking console" diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 23823e1e18..eaac1984e3 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -222,9 +222,9 @@ to_chat(user, "You feel your life being drained by the pendant...") if(do_after(user, 40, target = user)) to_chat(user, "Your lifeforce is now linked to the pendant! You feel like removing it would kill you, and yet you instinctively know that until then, you won't die.") - user.add_trait(TRAIT_NODEATH, "memento_mori") - user.add_trait(TRAIT_NOHARDCRIT, "memento_mori") - user.add_trait(TRAIT_NOCRITDAMAGE, "memento_mori") + ADD_TRAIT(user, TRAIT_NODEATH, "memento_mori") + ADD_TRAIT(user, TRAIT_NOHARDCRIT, "memento_mori") + ADD_TRAIT(user, TRAIT_NOCRITDAMAGE, "memento_mori") icon_state = "memento_mori_active" active_owner = user @@ -273,23 +273,12 @@ to_chat(user, "You release the wisp. It begins to bob around your head.") icon_state = "lantern" wisp.orbit(user, 20) - user.update_sight() SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Freed") else to_chat(user, "You return the wisp to the lantern.") - - var/mob/target - if(wisp.orbiting) - target = wisp.orbiting.orbiting - wisp.stop_orbit() - wisp.forceMove(src) - - if (istype(target)) - target.update_sight() - to_chat(target, "Your vision returns to normal.") - icon_state = "lantern-blue" + wisp.forceMove(src) SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned") /obj/item/wisp_lantern/Initialize() @@ -302,7 +291,7 @@ qdel(wisp) else wisp.visible_message("[wisp] has a sad feeling for a moment, then it passes.") - ..() + return ..() /obj/effect/wisp name = "friendly wisp" @@ -314,6 +303,25 @@ var/sight_flags = SEE_MOBS var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE +/obj/effect/wisp/orbit(atom/thing, radius, clockwise, rotation_speed, rotation_segments, pre_rotation, lockinorbit) + . = ..() + if(ismob(thing)) + RegisterSignal(thing, COMSIG_MOB_UPDATE_SIGHT, .proc/update_user_sight) + var/mob/being = thing + being.update_sight() + to_chat(thing, "The wisp enhances your vision.") + +/obj/effect/wisp/stop_orbit(datum/component/orbiter/orbits) + . = ..() + if(ismob(orbits.parent)) + UnregisterSignal(orbits.parent, COMSIG_MOB_UPDATE_SIGHT) + to_chat(orbits.parent, "Your vision returns to normal.") + +/obj/effect/wisp/proc/update_user_sight(mob/user) + user.sight |= sight_flags + if(!isnull(lighting_alpha)) + user.lighting_alpha = min(user.lighting_alpha, lighting_alpha) + //Red/Blue Cubes /obj/item/warp_cube name = "blue cube" @@ -662,7 +670,7 @@ playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000)) /obj/item/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user) - if(user.has_trait(TRAIT_CLUMSY) && prob(50)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) @@ -781,19 +789,17 @@ var/turf/T = get_turf(src) var/list/contents = T.GetAllContents() var/mob/dead/observer/current_spirits = list() - var/list/orbiters = list() for(var/thing in contents) var/atom/A = thing - if (A.orbiters) - orbiters += A.orbiters + A.transfer_observers_to(src) - for(var/thing in orbiters) - var/datum/orbit/O = thing - if (isobserver(O.orbiter)) - var/mob/dead/observer/G = O.orbiter - ghost_counter++ - G.invisibility = 0 - current_spirits |= G + for(var/i in orbiters?.orbiters) + if(!isobserver(i)) + continue + var/mob/dead/observer/G = i + ghost_counter++ + G.invisibility = 0 + current_spirits |= G for(var/mob/dead/observer/G in spirits - current_spirits) G.invisibility = GLOB.observer_default_invisibility diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 883f5a034f..c780d57810 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -26,7 +26,9 @@ return /mob/camera/forceMove(atom/destination) + var/oldloc = loc loc = destination + Moved(oldloc, NONE, TRUE) /mob/camera/emote(act, m_type=1, message = null, intentional = FALSE) return diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index d886a41b0f..381dc131e7 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -34,7 +34,9 @@ INITIALIZE_IMMEDIATE(/mob/dead) var/turf/new_turf = get_turf(destination) if (old_turf?.z != new_turf?.z) onTransitZ(old_turf?.z, new_turf?.z) + var/oldloc = loc loc = destination + Moved(oldloc, NONE, TRUE) /mob/dead/Stat() ..() diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index bf768d8277..463fb6f8ac 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -164,7 +164,7 @@ return var/obj/effect/mob_spawn/MS = pick(GLOB.mob_spawners[href_list["JoinAsGhostRole"]]) - if(istype(MS) && MS.attack_ghost(src, latejoinercalling = TRUE)) + if(MS?.attack_ghost(src, latejoinercalling = TRUE)) SSticker.queued_players -= src SSticker.queue_delay = 4 qdel(src) @@ -443,9 +443,10 @@ for(var/datum/job/job in SSjob.occupations) if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE) available_job_count++ - for(var/spawner in GLOB.mob_spawners) - available_job_count++ - break + for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners) + if(spawner.can_latejoin()) + available_job_count++ + break if(!available_job_count) dat += "
There are currently no open positions!
" @@ -464,8 +465,9 @@ "Science" = list(jobs = list(), titles = GLOB.science_positions, color = "#e6b3e6"), "Security" = list(jobs = list(), titles = GLOB.security_positions, color = "#ff9999"), ) - for(var/spawner in GLOB.mob_spawners) - categorizedJobs["Ghost Role"]["jobs"] += spawner + for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners) + if(spawner.can_latejoin()) + categorizedJobs["Ghost Role"]["jobs"] += spawner for(var/datum/job/job in SSjob.occupations) if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE) diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index fc879ed7a8..353df3aa66 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -28,7 +28,7 @@ if(job_engsec_high) switch(job_engsec_high) if(AI_JF) - parent.show_character_previews(image('icons/mob/ai.dmi', icon_state = "AI", dir = SOUTH)) + parent.show_character_previews(image('icons/mob/ai.dmi', resolve_ai_icon(preferred_ai_core_display), dir = SOUTH)) return if(CYBORG) parent.show_character_previews(image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH)) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm index 66c79ea0f0..f8d8d26328 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm @@ -439,6 +439,10 @@ name = "Tress Shoulder" icon_state = "hair_tressshoulder" +/datum/sprite_accessory/hair/longtwintails + name = "Twintails (Long)" + icon_state = "hair_longstraighttwintails" + /datum/sprite_accessory/hair/updo name = "Updo" icon_state = "hair_updo" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/socks.dm b/code/modules/mob/dead/new_player/sprite_accessories/socks.dm index 5a5d37d4e7..3384f3754b 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/socks.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/socks.dm @@ -11,6 +11,10 @@ // please make sure they're sorted alphabetically and categorized +/datum/sprite_accessory/socks/bee_knee + name = "Knee-high (Bee)" + icon_state = "bee_knee" + /datum/sprite_accessory/socks/black_knee name = "Knee-high (Black)" icon_state = "black_knee" @@ -63,6 +67,42 @@ name = "Short (White)" icon_state = "white_short" +/datum/sprite_accessory/socks/stockings_blue + name = "Stockings (Blue)" + icon_state = "stockings_blue" + +/datum/sprite_accessory/socks/stockings_cyan + name = "Stockings (Cyan)" + icon_state = "stockings_cyan" + +/datum/sprite_accessory/socks/stockings_dpink + name = "Stockings (Dark Pink)" + icon_state = "stockings_dpink" + +/datum/sprite_accessory/socks/stockings_green + name = "Stockings (Green)" + icon_state = "stockings_black" + +/datum/sprite_accessory/socks/stockings_orange + name = "Stockings (Orange)" + icon_state = "stockings_orange" + +/datum/sprite_accessory/socks/stockings_programmer + name = "Stockings (Programmer)" + icon_state = "stockings_lpink" + +/datum/sprite_accessory/socks/stockings_purple + name = "Stockings (Purple)" + icon_state = "stockings_purple" + +/datum/sprite_accessory/socks/stockings_yellow + name = "Stockings (Yellow)" + icon_state = "stockings_yellow" + +/datum/sprite_accessory/socks/bee_thigh + name = "Thigh-high (Bee)" + icon_state = "bee_thigh" + /datum/sprite_accessory/socks/black_thigh name = "Thigh-high (Black)" icon_state = "black_thigh" @@ -93,4 +133,4 @@ /datum/sprite_accessory/socks/white_thigh name = "Thigh-high (White)" - icon_state = "white_thigh" \ No newline at end of file + icon_state = "white_thigh" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm index 7c66ef51e3..f5af9a3849 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm @@ -248,9 +248,13 @@ icon_state = "bra_commie" /datum/sprite_accessory/undershirt/female_babyblue - name = "Bra, Baby Blue" + name = "Bra - Baby Blue" icon_state = "bra_babyblue" +/datum/sprite_accessory/undershirt/female_beekini + name = "Bra - Bee-kini" + icon_state = "bra_bee-kini" + /datum/sprite_accessory/undershirt/female_black name = "Bra - Black" icon_state = "bra_black" diff --git a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm index 7b66427eba..e7179eeb87 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm @@ -78,7 +78,7 @@ name = "Boxer Briefs - Black" icon_state = "boxer_briefs_black" -/datum/sprite_accessory/underwear/female_pinkalt +/datum/sprite_accessory/underwear/female_pink name = "Boxer Briefs - Pink" icon_state = "boxer_briefs_pink" @@ -90,15 +90,14 @@ name = "Boxer Briefs - Yellow" icon_state = "boxer_briefs_yellow" +/datum/sprite_accessory/underwear/female_beekini + name = "Panties - Bee-kini" + icon_state = "panties_bee-kini" /datum/sprite_accessory/underwear/female_black name = "Panties - Black" icon_state = "panties_black" -/datum/sprite_accessory/underwear/female_pink - name = "Panties - Pink" - icon_state = "panties_pink" - /datum/sprite_accessory/underwear/female_blue name = "Panties - Blue" icon_state = "panties_blue" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e074631640..21c97e33c5 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -435,9 +435,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/orbitsize = (I.Width()+I.Height())*0.5 orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25) - if(orbiting && orbiting.orbiting != target) - to_chat(src, "Now orbiting [target].") - var/rot_seg switch(ghost_orbit) @@ -456,10 +453,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/orbit() setDir(2)//reset dir so the right directional sprites show up - ..() + return ..() -/mob/dead/observer/stop_orbit() - ..() +/mob/dead/observer/stop_orbit(datum/component/orbiter/orbits) + . = ..() //restart our floating animation after orbit is done. pixel_y = 0 animate(src, pixel_y = 2, time = 10, loop = -1) @@ -759,7 +756,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp update_icon() -/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/dead/observer/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) return IsAdminGhost(usr) /mob/dead/observer/is_literate() diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 71a12e9ff4..815184c63d 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -16,7 +16,7 @@ /mob/living/carbon/monkey/handle_blood() - if(bodytemperature >= TCRYO && !(has_trait(TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. + if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL) blood_volume += 0.1 // regenerate blood VERY slowly @@ -30,10 +30,10 @@ bleed_rate = 0 return - if(bodytemperature >= TCRYO && !(has_trait(TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. + if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space - if(blood_volume < BLOOD_VOLUME_NORMAL && !has_trait(TRAIT_NOHUNGER)) + if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER)) var/nutrition_ratio = 0 switch(nutrition) if(0 to NUTRITION_LEVEL_STARVING) @@ -69,7 +69,7 @@ Unconscious(rand(20,60)) to_chat(src, "You feel extremely [word].") if(-INFINITY to BLOOD_VOLUME_SURVIVE) - if(!has_trait(TRAIT_NODEATH)) + if(!HAS_TRAIT(src, TRAIT_NODEATH)) death() var/temp_bleed = 0 @@ -87,7 +87,7 @@ bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases - if(bleed_rate && !bleedsuppress && !(has_trait(TRAIT_FAKEDEATH))) + if(bleed_rate && !bleedsuppress && !(HAS_TRAIT(src, TRAIT_FAKEDEATH))) bleed(bleed_rate) //Makes a blood drop, leaking amt units of blood from the mob @@ -214,13 +214,13 @@ return "blood" /mob/living/carbon/monkey/get_blood_id() - if(!(has_trait(TRAIT_NOCLONE))) + if(!(HAS_TRAIT(src, TRAIT_NOCLONE))) return "blood" /mob/living/carbon/human/get_blood_id() if(dna.species.exotic_blood) return dna.species.exotic_blood - else if((NOBLOOD in dna.species.species_traits) || (has_trait(TRAIT_NOCLONE))) + else if((NOBLOOD in dna.species.species_traits) || (HAS_TRAIT(src, TRAIT_NOCLONE))) return return "blood" diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 571b60317c..1ca6b2fed9 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -21,7 +21,7 @@ name = "brain" if(C.mind && C.mind.has_antag_datum(/datum/antagonist/changeling) && !no_id_transfer) //congrats, you're trapped in a body you don't control - if(brainmob && !(C.stat == DEAD || (C.has_trait(TRAIT_DEATHCOMA)))) + if(brainmob && !(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_DEATHCOMA)))) to_chat(brainmob, "You can't feel your body! You're still just a brain!") forceMove(C) C.update_hair() @@ -76,7 +76,7 @@ if(!brainmob.stored_dna) brainmob.stored_dna = new /datum/dna/stored(brainmob) C.dna.copy_dna(brainmob.stored_dna) - if(L.has_trait(TRAIT_NOCLONE)) + if(HAS_TRAIT(L, TRAIT_NOCLONE)) brainmob.status_traits[TRAIT_NOCLONE] = L.status_traits[TRAIT_NOCLONE] var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE) if(ZI) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 10fddfcb20..c8ece3f656 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -105,7 +105,7 @@ Des: Gives the client of the alien an image on each infected mob. if (client) for (var/i in GLOB.mob_living_list) var/mob/living/L = i - if(L.has_trait(TRAIT_XENO_HOST)) + if(HAS_TRAIT(L, TRAIT_XENO_HOST)) var/obj/item/organ/body_egg/alien_embryo/A = L.getorgan(/obj/item/organ/body_egg/alien_embryo) if(A) var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[A.stage]") diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 383edd566a..01a52b3b80 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -18,7 +18,7 @@ if(health<= -maxHealth || !getorgan(/obj/item/organ/brain)) death() return - if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (has_trait(TRAIT_DEATHCOMA)) || health <= crit_threshold) + if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold) if(stat == CONSCIOUS) stat = UNCONSCIOUS blind_eyes(1) diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 543fda9fd0..b8edd34ee9 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -15,25 +15,23 @@ var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME var/list/breath_gases = breath.gases - breath.assert_gases(/datum/gas/plasma, /datum/gas/oxygen) - //Partial pressure of the toxins in our breath - var/Toxins_pp = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure + var/Toxins_pp = (breath_gases[/datum/gas/plasma]/breath.total_moles())*breath_pressure if(Toxins_pp > tox_detect_threshold) // Detect toxins in air - adjustPlasma(breath_gases[/datum/gas/plasma][MOLES]*250) + adjustPlasma(breath_gases[/datum/gas/plasma]*250) throw_alert("alien_tox", /obj/screen/alert/alien_tox) - toxins_used = breath_gases[/datum/gas/plasma][MOLES] + toxins_used = breath_gases[/datum/gas/plasma] else clear_alert("alien_tox") //Breathe in toxins and out oxygen - breath_gases[/datum/gas/plasma][MOLES] -= toxins_used - breath_gases[/datum/gas/oxygen][MOLES] += toxins_used + breath_gases[/datum/gas/plasma] -= toxins_used + breath_gases[/datum/gas/oxygen] += toxins_used - breath.garbage_collect() + GAS_GARBAGE_COLLECT(breath.gases) //BREATH TEMPERATURE handle_breath_temperature(breath) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ea13255dfe..51ee5b372b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -167,7 +167,7 @@ if(!throwable_mob.buckled) thrown_thing = throwable_mob stop_pulling() - if(has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(src, TRAIT_PACIFISM)) to_chat(src, "You gently let go of [throwable_mob].") adjustStaminaLossBuffered(25)//CIT CHANGE - throwing an entire person shall be very tiring var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors @@ -179,7 +179,7 @@ thrown_thing = I dropItemToGround(I) - if(has_trait(TRAIT_PACIFISM) && I.throwforce) + if(HAS_TRAIT(src, TRAIT_PACIFISM) && I.throwforce) to_chat(src, "You set [I] down gently on the ground.") return @@ -416,7 +416,7 @@ var/modifier = 0 - if(has_trait(TRAIT_CLUMSY)) + if(HAS_TRAIT(src, TRAIT_CLUMSY)) modifier -= 40 //Clumsy people are more likely to hit themselves -Honk! //CIT CHANGES START HERE @@ -462,7 +462,7 @@ return ..() /mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, toxic = FALSE) - if(has_trait(TRAIT_NOHUNGER)) + if(HAS_TRAIT(src, TRAIT_NOHUNGER)) return 1 if(nutrition < 100 && !blood) @@ -759,14 +759,14 @@ if(status_flags & GODMODE) return if(stat != DEAD) - if(health <= HEALTH_THRESHOLD_DEAD && !has_trait(TRAIT_NODEATH)) + if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH)) death() return - if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (has_trait(TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !has_trait(TRAIT_NOHARDCRIT))) + if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))) stat = UNCONSCIOUS blind_eyes(1) else - if(health <= crit_threshold && !has_trait(TRAIT_NOSOFTCRIT)) + if(health <= crit_threshold && !HAS_TRAIT(src, TRAIT_NOSOFTCRIT)) stat = SOFT_CRIT else stat = CONSCIOUS @@ -895,6 +895,11 @@ var/obj/item/organ/I = X I.Insert(src) +/mob/living/carbon/proc/update_disabled_bodyparts() + for(var/B in bodyparts) + var/obj/item/bodypart/BP = B + BP.update_disabled() + /mob/living/carbon/vv_get_dropdown() . = ..() . += "---" diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index d8bb90460a..57483f64e7 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -48,18 +48,27 @@ if(affecting && affecting.dismemberable && affecting.get_damage() >= (affecting.max_damage - P.dismemberment)) affecting.dismember(P.damtype) +/mob/living/carbon/proc/can_catch_item(skip_throw_mode_check) + . = FALSE + if(!skip_throw_mode_check && !in_throw_mode) + return + if(get_active_held_item()) + return + if(restrained()) + return + return TRUE + /mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE) if(!skipcatch) //ugly, but easy - if(in_throw_mode && !get_active_held_item()) //empty active hand and we're in throw mode - if(canmove && !restrained()) - if(istype(AM, /obj/item)) - var/obj/item/I = AM - if(isturf(I.loc)) - I.attack_hand(src) - if(get_active_held_item() == I) //if our attack_hand() picks up the item... - visible_message("[src] catches [I]!") //catch that sucker! - throw_mode_off() - return 1 + if(can_catch_item()) + if(istype(AM, /obj/item)) + var/obj/item/I = AM + if(isturf(I.loc)) + I.attack_hand(src) + if(get_active_held_item() == I) //if our attack_hand() picks up the item... + visible_message("[src] catches [I]!") //catch that sucker! + throw_mode_off() + return 1 ..() @@ -224,7 +233,7 @@ /mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE) if(tesla_shock && (flags_1 & TESLA_IGNORE_1)) return FALSE - if(has_trait(TRAIT_SHOCKIMMUNE)) + if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE)) return FALSE shock_damage *= siemens_coeff if(dna && dna.species) @@ -261,7 +270,7 @@ to_chat(M, "You can't put [p_them()] out with just your bare hands!") return - if(health >= 0 && !(has_trait(TRAIT_FAKEDEATH))) + if(health >= 0 && !(HAS_TRAIT(src, TRAIT_FAKEDEATH))) if(lying) if(buckled) @@ -277,6 +286,12 @@ M.visible_message("[M] gives [H] a pat on the head to make [p_them()] feel better!", \ "You give [H] a pat on the head to make [p_them()] feel better!") SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat) + if(HAS_TRAIT(M, TRAIT_FRIENDLY)) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + if (mood.sanity >= SANITY_GREAT) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) + else if (mood.sanity >= SANITY_DISTURBED) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M) if(H.dna.species.can_wag_tail(H)) if("tail_human" in pref_species.default_features) if(H.dna.features["tail_human"] == "None") @@ -306,6 +321,12 @@ M.visible_message("[M] hugs [src] to make [p_them()] feel better!", \ "You hug [src] to make [p_them()] feel better!") SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) + if(HAS_TRAIT(M, TRAIT_FRIENDLY)) + GET_COMPONENT_FROM(mood, /datum/component/mood, M) + if (mood.sanity >= SANITY_GREAT) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) + else if (mood.sanity >= SANITY_DISTURBED) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M) AdjustStun(-60) AdjustKnockdown(-60) @@ -350,12 +371,12 @@ if(eyes.eye_damage > 20) if(prob(eyes.eye_damage - 20)) - if(!has_trait(TRAIT_NEARSIGHT)) + if(!HAS_TRAIT(src, TRAIT_NEARSIGHT)) to_chat(src, "Your eyes start to burn badly!") become_nearsighted(EYE_DAMAGE) else if(prob(eyes.eye_damage - 25)) - if(!has_trait(TRAIT_BLIND)) + if(!HAS_TRAIT(src, TRAIT_BLIND)) to_chat(src, "You can't see anything!") become_blind(EYE_DAMAGE) diff --git a/code/modules/mob/living/carbon/carbon_movement.dm b/code/modules/mob/living/carbon/carbon_movement.dm index 37b888a6b8..8e6c888c40 100644 --- a/code/modules/mob/living/carbon/carbon_movement.dm +++ b/code/modules/mob/living/carbon/carbon_movement.dm @@ -37,7 +37,7 @@ /mob/living/carbon/Move(NewLoc, direct) . = ..() if(. && mob_has_gravity()) //floating is easy - if(has_trait(TRAIT_NOHUNGER)) + if(HAS_TRAIT(src, TRAIT_NOHUNGER)) nutrition = NUTRITION_LEVEL_FED - 1 //just less than feeling vigorous else if(nutrition && stat != DEAD) nutrition -= HUNGER_FACTOR/10 diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index c21f9ce213..749ae3b5b0 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -83,7 +83,7 @@ return amount /mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) - if(!forced && has_trait(TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage + if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage amount = -amount if(amount > 0) blood_volume -= 5*amount diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index c42bd82797..22da46346c 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -67,7 +67,7 @@ else msg += "[t_He] [t_is] severely deformed!\n" - if(has_trait(TRAIT_DUMB)) + if(HAS_TRAIT(src, TRAIT_DUMB)) msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n" if(fire_stacks > 0) @@ -88,7 +88,7 @@ if(digitalcamo) msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner.\n" - + if(combatmode) msg += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]\n" diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 0b4d5f6098..64b75bc801 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -42,13 +42,13 @@ INVOKE_ASYNC(is_devil(src), /datum/antagonist/devil.proc/beginResurrectionCheck, src) /mob/living/carbon/human/proc/makeSkeleton() - add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC) set_species(/datum/species/skeleton) return 1 /mob/living/carbon/proc/Drain() become_husk(CHANGELING_DRAIN) - add_trait(TRAIT_NOCLONE, CHANGELING_DRAIN) + ADD_TRAIT(src, TRAIT_NOCLONE, CHANGELING_DRAIN) blood_volume = 0 return 1 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 26e19ff376..8550a0887f 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -10,7 +10,7 @@ if(isliving(user)) var/mob/living/L = user - if(L.has_trait(TRAIT_PROSOPAGNOSIA)) + if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA)) obscure_name = TRUE var/msg = "*---------*\nThis is [!obscure_name ? name : "Unknown"]!\n" @@ -93,7 +93,7 @@ if(!(SLOT_GLASSES in obscured)) if(glasses) msg += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes.\n" - else if(eye_color == BLOODCULT_EYE && iscultist(src) && has_trait(CULT_EYES)) + else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, TRAIT_CULT_EYES)) msg += "[t_His] eyes are glowing an unnatural red!\n" //ears @@ -126,7 +126,7 @@ msg += "[t_He] [t_is] twitching ever so slightly.\n" var/appears_dead = 0 - if(stat == DEAD || (has_trait(TRAIT_FAKEDEATH))) + if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) appears_dead = 1 if(suiciding) msg += "[t_He] appear[p_s()] to have committed suicide... there is no hope of recovery.\n" @@ -281,13 +281,34 @@ if(91.01 to INFINITY) msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n" + if(isliving(user)) + var/mob/living/L = user + if(src != user && HAS_TRAIT(L, TRAIT_EMPATH) && !appears_dead) + if (a_intent != INTENT_HELP) + msg += "[t_He] seem[p_s()] to be on guard.\n" + if (getOxyLoss() >= 10) + msg += "[t_He] seem[p_s()] winded.\n" + if (getToxLoss() >= 10) + msg += "[t_He] seem[p_s()] sickly.\n" + GET_COMPONENT_FROM(mood, /datum/component/mood, src) + if(mood.sanity <= SANITY_DISTURBED) + msg += "[t_He] seem[p_s()] distressed.\n" + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src) + if(mood.shown_mood >= 6) //So roundstart people aren't all "happy" and that antags don't show their true happiness. + msg += "[t_He] seem[p_s()] to have had something nice happen to them recently.\n" + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empathH", /datum/mood_event/happy_empath, src) + if (HAS_TRAIT(src, TRAIT_BLIND)) + msg += "[t_He] appear[p_s()] to be staring off into space.\n" + if (HAS_TRAIT(src, TRAIT_DEAF)) + msg += "[t_He] appear[p_s()] to not be responding to noises.\n" + msg += "" if(!appears_dead) if(stat == UNCONSCIOUS) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n" else - if(has_trait(TRAIT_DUMB)) + if(HAS_TRAIT(src, TRAIT_DUMB)) msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n" if(InCritical()) msg += "[t_He] [t_is] barely conscious.\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 13da7b913c..a4fca9dd78 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -8,6 +8,7 @@ /mob/living/carbon/human/Initialize() verbs += /mob/living/proc/mob_sleep verbs += /mob/living/proc/lay_down + verbs += /mob/living/carbon/human/proc/underwear_toggle //fwee //initialize limbs first create_bodyparts() @@ -499,7 +500,7 @@ . = 1 // Default to returning true. if(user && !target_zone) target_zone = user.zone_selected - if(has_trait(TRAIT_PIERCEIMMUNE) && !bypass_immunity) + if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE) && !bypass_immunity) . = 0 // If targeting the head, see if the head item is thin enough. // If targeting anything else, see if the wear suit is thin enough. @@ -604,7 +605,7 @@ threatcount += 4 //fuk u antags <3 //no you //mindshield implants imply trustworthyness - if(has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(src, TRAIT_MINDSHIELD)) threatcount -= 1 //Agent cards lower threatlevel. @@ -640,7 +641,7 @@ /mob/living/carbon/human/proc/do_cpr(mob/living/carbon/C) CHECK_DNA_AND_SPECIES(C) - if(C.stat == DEAD || (C.has_trait(TRAIT_FAKEDEATH))) + if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH))) to_chat(src, "[C.name] is dead!") return if(is_mouth_covered()) @@ -657,7 +658,7 @@ to_chat(src, "You fail to perform CPR on [C]!") return 0 - var/they_breathe = !C.has_trait(TRAIT_NOBREATH) + var/they_breathe = !HAS_TRAIT(C, TRAIT_NOBREATH) var/they_lung = C.getorganslot(ORGAN_SLOT_LUNGS) if(C.health > C.crit_threshold) @@ -724,12 +725,12 @@ remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000") cut_overlay(MA) -/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(incapacitated() || lying ) to_chat(src, "You can't do that right now!") return FALSE if(!Adjacent(M) && (M.loc != src)) - if((be_close == 0) || (dna.check_mutation(TK) && tkMaxRangeCheck(src, M))) + if((be_close == 0) || (!no_tk && (dna.check_mutation(TK) && tkMaxRangeCheck(src, M)))) return TRUE to_chat(src, "You are too far away!") return FALSE @@ -851,19 +852,24 @@ /mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user) //If they dragged themselves and we're currently aggressively grabbing them try to piggyback - if(user == target && can_piggyback(target) && pulling == target && grab_state >= GRAB_AGGRESSIVE && stat == CONSCIOUS) + if(user == target && can_piggyback(target) && pulling == target && (HAS_TRAIT(src, TRAIT_PACIFISM) || grab_state >= GRAB_AGGRESSIVE) && stat == CONSCIOUS) buckle_mob(target,TRUE,TRUE) . = ..() +/mob/living/carbon/human/proc/piggyback_instant(mob/living/M) + return buckle_mob(M, TRUE, TRUE, FALSE, TRUE) + //Can C try to piggyback at all. /mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/C) if(istype(C) && C.stat == CONSCIOUS) return TRUE return FALSE -/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE) +/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, bypass_piggybacking = FALSE, no_delay = FALSE) if(!force)//humans are only meant to be ridden through piggybacking and special cases return + if(bypass_piggybacking) + return ..() if(!is_type_in_typecache(M, can_ride_typecache)) M.visible_message("[M] really can't seem to mount [src]...") return @@ -876,7 +882,7 @@ if(can_piggyback(M)) riding_datum.ride_check_ridden_incapacitated = TRUE visible_message("[M] starts to climb onto [src]...") - if(do_after(M, 15, target = src)) + if(no_delay || do_after(M, 15, target = src)) if(can_piggyback(M)) if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE)) M.visible_message("[M] can't hang onto [src]!") diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index d280c1d311..b42346382f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -54,7 +54,12 @@ else visible_message("[src] deflects the projectile!", "You deflect the projectile!") playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) - return 0 + if(!mind.martial_art.reroute_deflection) + return FALSE + else + P.firer = src + P.setAngle(rand(0, 360))//SHING + return FALSE if(!(P.original == src && P.firer == src)) //can't block or reflect when shooting yourself if(P.is_reflectable) @@ -138,7 +143,7 @@ else if(I) if(I.throw_speed >= EMBED_THROWSPEED_THRESHOLD) if(can_embed(I)) - if(prob(I.embedding.embed_chance) && !has_trait(TRAIT_PIERCEIMMUNE)) + if(prob(I.embedding.embed_chance) && !HAS_TRAIT(src, TRAIT_PIERCEIMMUNE)) throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) var/obj/item/bodypart/L = pick(bodyparts) L.embedded_objects |= I @@ -153,7 +158,7 @@ return ..() /mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0) - if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_trait(TRAIT_FAT)) && ismonkey(pulling)) + if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (HAS_TRAIT(src, TRAIT_FAT)) && ismonkey(pulling)) devour_mob(pulling) else ..() @@ -614,7 +619,7 @@ facial_hair_style = "Shaved" hair_style = "Bald" update_hair() - add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC) update_damage_overlays() @@ -668,7 +673,7 @@ if(prob(30)) burndamage += rand(30,40) - if(has_trait(TRAIT_SELF_AWARE)) + if(HAS_TRAIT(src, TRAIT_SELF_AWARE)) status = "[brutedamage] brute damage and [burndamage] burn damage" if(!brutedamage && !burndamage) status = "no damage" @@ -695,7 +700,7 @@ var/no_damage if(status == "OK" || status == "no damage") no_damage = TRUE - to_chat(src, "\t Your [LB.name] [has_trait(TRAIT_SELF_AWARE) ? "has" : "is"] [status].") + to_chat(src, "\t Your [LB.name] [HAS_TRAIT(src, TRAIT_SELF_AWARE) ? "has" : "is"] [status].") for(var/obj/item/I in LB.embedded_objects) to_chat(src, "\t There is \a [I] embedded in your [LB.name]!") @@ -710,7 +715,7 @@ to_chat(src, "You're completely exhausted.") else to_chat(src, "You feel fatigued.") - if(has_trait(TRAIT_SELF_AWARE)) + if(HAS_TRAIT(src, TRAIT_SELF_AWARE)) if(toxloss) if(toxloss > 10) to_chat(src, "You feel sick.") diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index dd37563f8f..0b40d3d26a 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -56,7 +56,7 @@ if( head && (head.flags_inv&HIDEFACE) ) return if_no_face //Likewise for hats var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD) - if( !O || (has_trait(TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name || nameless) //disfigured. use id-name if possible + if( !O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name || nameless) //disfigured. use id-name if possible return if_no_face return real_name @@ -92,7 +92,7 @@ /mob/living/carbon/human/IsAdvancedToolUser() - if(has_trait(TRAIT_MONKEYLIKE)) + if(HAS_TRAIT(src, TRAIT_MONKEYLIKE)) return FALSE return TRUE//Humans can use guns and such @@ -138,7 +138,7 @@ if(src.dna.check_mutation(HULK)) to_chat(src, "Your meaty finger is much too large for the trigger guard!") return FALSE - if(has_trait(TRAIT_NOGUNS)) + if(HAS_TRAIT(src, TRAIT_NOGUNS)) to_chat(src, "Your fingers don't fit in the trigger guard!") return FALSE if(mind) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 1addb3615c..6ea9c985e2 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/get_movespeed_modifiers() var/list/considering = ..() . = considering - if(has_trait(TRAIT_IGNORESLOWDOWN)) + if(HAS_TRAIT(src, TRAIT_IGNORESLOWDOWN)) for(var/id in .) var/list/data = .[id] if(data[MOVESPEED_DATA_INDEX_FLAGS] & IGNORE_NOSLOW) @@ -13,10 +13,10 @@ . += dna.species.movement_delay(src) /mob/living/carbon/human/slip(knockdown_amount, obj/O, lube) - if(has_trait(TRAIT_NOSLIPALL)) + if(HAS_TRAIT(src, TRAIT_NOSLIPALL)) return 0 if (!(lube&GALOSHES_DONT_HELP)) - if(has_trait(TRAIT_NOSLIPWATER)) + if(HAS_TRAIT(src, TRAIT_NOSLIPWATER)) return 0 if(shoes && istype(shoes, /obj/item/clothing)) var/obj/item/clothing/CS = shoes diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 7e2545f93e..176d967d52 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -187,7 +187,7 @@ if(G.tint) update_tint() if(G.vision_correction) - if(has_trait(TRAIT_NEARSIGHT)) + if(HAS_TRAIT(src, TRAIT_NEARSIGHT)) overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) adjust_eye_damage(0) if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a50fb4fe79..1af9dbc5f5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -63,7 +63,7 @@ /mob/living/carbon/human/handle_traits() if(eye_blind) //blindness, heals slowly over time - if(has_trait(TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster + if(HAS_TRAIT_FROM(src, TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster adjust_blindness(-3) else adjust_blindness(-1) @@ -95,7 +95,7 @@ if(!L) if(health >= crit_threshold) adjustOxyLoss(HUMAN_MAX_OXYLOSS + 1) - else if(!has_trait(TRAIT_NOCRITDAMAGE)) + else if(!HAS_TRAIT(src, TRAIT_NOCRITDAMAGE)) adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) failed_last_breath = 1 @@ -332,7 +332,7 @@ HM.on_life(src) /mob/living/carbon/human/proc/handle_heart() - var/we_breath = !has_trait(TRAIT_NOBREATH, SPECIES_TRAIT) + var/we_breath = !HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT) if(!undergoing_cardiac_arrest()) return diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 7ce3f78da0..673249b186 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -54,7 +54,7 @@ /mob/living/carbon/human/IsVocal() // how do species that don't breathe talk? magic, that's what. - if(!has_trait(TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS)) + if(!HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS)) return FALSE if(mind) return !mind.miming diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 31fff2354a..3324b07217 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -44,6 +44,8 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/siemens_coeff = 1 //base electrocution coefficient var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded? var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"] + var/list/special_step_sounds //Sounds to override barefeet walkng + var/grab_sound //Special sound for grabbing // species-only traits. Can be found in DNA.dm var/list/species_traits = list() @@ -286,7 +288,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) C.put_in_hands(new mutanthands()) for(var/X in inherent_traits) - C.add_trait(X, SPECIES_TRAIT) + ADD_TRAIT(C, X, SPECIES_TRAIT) if(TRAIT_VIRUSIMMUNE in inherent_traits) for(var/datum/disease/A in C.diseases) @@ -313,7 +315,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(DIGITIGRADE in species_traits) C.Digitigrade_Leg_Swap(TRUE) for(var/X in inherent_traits) - C.remove_trait(X, SPECIES_TRAIT) + REMOVE_TRAIT(C, X, SPECIES_TRAIT) SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src) @@ -322,7 +324,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD) if(!HD) //Decapitated return - if(H.has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(H, TRAIT_HUSK)) return var/datum/sprite_accessory/S @@ -462,7 +464,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD) - if(HD && !(H.has_trait(TRAIT_HUSK))) + if(HD && !(HAS_TRAIT(H, TRAIT_HUSK))) // lipstick if(H.lip_style && (LIPS in species_traits)) var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER) @@ -490,11 +492,19 @@ GLOBAL_LIST_EMPTY(roundstart_races) //Underwear, Undershirts & Socks if(!(NO_UNDERWEAR in species_traits)) if(H.underwear) + if(H.hidden_underwear) + H.underwear = "Nude" + else + H.underwear = H.saved_underwear var/datum/sprite_accessory/underwear/underwear = GLOB.underwear_list[H.underwear] if(underwear) standing += mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER) if(H.undershirt) + if(H.hidden_undershirt) + H.undershirt = "Nude" + else + H.undershirt = H.saved_undershirt var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[H.undershirt] if(undershirt) if(H.dna.species.sexes && H.gender == FEMALE) @@ -502,10 +512,17 @@ GLOBAL_LIST_EMPTY(roundstart_races) else standing += mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER) - if(H.socks && H.get_num_legs(FALSE) >= 2 && !(DIGITIGRADE in species_traits)) + if(H.socks && H.get_num_legs(FALSE) >= 2) + if(H.hidden_socks) + H.socks = "Nude" + else + H.socks = H.saved_socks var/datum/sprite_accessory/socks/socks = GLOB.socks_list[H.socks] if(socks) - standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER) + if(DIGITIGRADE in species_traits) + standing += mutable_appearance(socks.icon, socks.icon_state + "_d", -BODY_LAYER) + else + standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER) if(standing.len) H.overlays_standing[BODY_LAYER] = standing @@ -757,7 +774,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) for(var/index=1, index<=colorlist.len, index++) colorlist[index] = colorlist[index]/255 - if(!(H.has_trait(TRAIT_HUSK))) + if(!HAS_TRAIT(H, TRAIT_HUSK)) if(!forced_colour) switch(S.color_src) if(SKINTONE) @@ -916,11 +933,11 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/spec_life(mob/living/carbon/human/H) - if(H.has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(H, TRAIT_NOBREATH)) H.setOxyLoss(0) H.losebreath = 0 - var/takes_crit_damage = (!H.has_trait(TRAIT_NOCRITDAMAGE)) + var/takes_crit_damage = !HAS_TRAIT(H, TRAIT_NOCRITDAMAGE) if((H.health < H.crit_threshold) && takes_crit_damage) H.adjustBruteLoss(1) @@ -1158,21 +1175,21 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/handle_digestion(mob/living/carbon/human/H) //The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with - if(H.has_trait(TRAIT_FAT))//I share your pain, past coder. + if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder. if(H.overeatduration < 100) to_chat(H, "You feel fit again!") - H.remove_trait(TRAIT_FAT, OBESITY) + REMOVE_TRAIT(H, TRAIT_FAT, OBESITY) H.update_inv_w_uniform() H.update_inv_wear_suit() else if(H.overeatduration >= 100) to_chat(H, "You suddenly feel blubbery!") - H.add_trait(TRAIT_FAT, OBESITY) + ADD_TRAIT(H, TRAIT_FAT, OBESITY) H.update_inv_w_uniform() H.update_inv_wear_suit() // nutrition decrease and satiety - if (H.nutrition > 0 && H.stat != DEAD && !H.has_trait(TRAIT_NOHUNGER)) + if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER)) // THEY HUNGER var/hunger_rate = HUNGER_FACTOR GET_COMPONENT_FROM(mood, /datum/component/mood, H) @@ -1201,7 +1218,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(H.nutrition > NUTRITION_LEVEL_FAT) H.metabolism_efficiency = 1 else if(H.nutrition > NUTRITION_LEVEL_FED && H.satiety > 80) - if(H.metabolism_efficiency != 1.25 && !H.has_trait(TRAIT_NOHUNGER)) + if(H.metabolism_efficiency != 1.25 && !HAS_TRAIT(H, TRAIT_NOHUNGER)) to_chat(H, "You feel vigorous.") H.metabolism_efficiency = 1.25 else if(H.nutrition < NUTRITION_LEVEL_STARVING + 50) @@ -1230,7 +1247,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) . = FALSE var/radiation = H.radiation - if(H.has_trait(TRAIT_RADIMMUNE)) + if(HAS_TRAIT(H, TRAIT_RADIMMUNE)) radiation = 0 return TRUE @@ -1277,17 +1294,17 @@ GLOBAL_LIST_EMPTY(roundstart_races) gravity = H.has_gravity() if(gravity && !flight) //Check for chemicals and innate speedups and slowdowns if we're on the ground - if(H.has_trait(TRAIT_GOTTAGOFAST)) + if(HAS_TRAIT(H, TRAIT_GOTTAGOFAST)) . -= 1 - if(H.has_trait(TRAIT_GOTTAGOREALLYFAST)) + if(HAS_TRAIT(H, TRAIT_GOTTAGOREALLYFAST)) . -= 2 . += speedmod . += H.physiology.speed_mod - if (H.m_intent == MOVE_INTENT_WALK && H.has_trait(TRAIT_SPEEDY_STEP)) - . -= 1 + if (H.m_intent == MOVE_INTENT_WALK && HAS_TRAIT(H, TRAIT_SPEEDY_STEP)) + . -= 1.5 - if(H.has_trait(TRAIT_IGNORESLOWDOWN)) + if(HAS_TRAIT(H, TRAIT_IGNORESLOWDOWN)) ignoreslow = 1 if(!gravity) @@ -1338,9 +1355,9 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(SANITY_UNSTABLE to SANITY_DISTURBED) . += 0.5 - if(H.has_trait(TRAIT_FAT)) + if(HAS_TRAIT(H, TRAIT_FAT)) . += (1.5 - flight) - if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTCOLD)) + if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR return . @@ -1353,13 +1370,13 @@ GLOBAL_LIST_EMPTY(roundstart_races) ////////////////// /datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) - if(target.health >= 0 && !(target.has_trait(TRAIT_FAKEDEATH))) + if(target.health >= 0 && !HAS_TRAIT(target, TRAIT_FAKEDEATH)) target.help_shake_act(user) if(target != user) log_combat(user, target, "shaked") return 1 else - var/we_breathe = !user.has_trait(TRAIT_NOBREATH) + var/we_breathe = !HAS_TRAIT(user, TRAIT_NOBREATH) var/we_lung = user.getorganslot(ORGAN_SLOT_LUNGS) if(we_breathe && we_lung) @@ -1384,7 +1401,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) - if(user.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to harm [target]!") return FALSE if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) //CITADEL CHANGE - makes it impossible to punch while in stamina softcrit @@ -1480,7 +1497,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) "You slap [user == target ? "yourself" : "\the [target]"] in the face! ",\ "You hear a slap." ) - if (!target.has_trait(TRAIT_NYMPHO)) + if (!HAS_TRAIT(target, TRAIT_NYMPHO)) stop_wagging_tail(target) user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP) user.adjustStaminaLossBuffered(3) @@ -1488,13 +1505,9 @@ GLOBAL_LIST_EMPTY(roundstart_races) else if(aim_for_groin && (target == user || target.lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin)) user.do_attack_animation(target, ATTACK_EFFECT_ASS_SLAP) user.adjustStaminaLossBuffered(3) - if(target.has_trait(TRAIT_ASSBLASTUSA)) + if(HAS_TRAIT(target, TRAIT_ASSBLASTUSA)) var/hit_zone = (user.held_index_to_dir(user.active_hand_index) == "l" ? "l_":"r_") + "arm" - user.adjustStaminaLoss(50, affected_zone = hit_zone) - var/obj/item/bodypart/affecting = user.get_bodypart(hit_zone) - if(affecting) - if(affecting.receive_damage(5, 0)) - user.update_damage_overlays() + user.adjustStaminaLoss(20, affected_zone = hit_zone) user.visible_message(\ "\The [user] slaps \the [target]'s ass, but their hand bounces off like they hit metal!",\ "You slap [user == target ? "your" : "\the [target]'s"] ass, but feel an intense amount of pain as you realise their buns are harder than steel!",\ @@ -1512,9 +1525,9 @@ GLOBAL_LIST_EMPTY(roundstart_races) ) if (target.canbearoused) target.adjustArousalLoss(5) - if (target.getArousalLoss() >= 100 && ishuman(target) && target.has_trait(TRAIT_MASO) && target.has_dna()) + if (target.getArousalLoss() >= 100 && ishuman(target) && HAS_TRAIT(target, TRAIT_MASO) && target.has_dna()) target.mob_climax(forced_climax=TRUE) - if (!target.has_trait(TRAIT_NYMPHO)) + if (!HAS_TRAIT(target, TRAIT_NYMPHO)) stop_wagging_tail(target) return FALSE @@ -1649,7 +1662,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) //dismemberment var/probability = I.get_dismemberment_chance(affecting) - if(prob(probability) || (H.has_trait(TRAIT_EASYDISMEMBER) && prob(probability))) //try twice + if(prob(probability) || (HAS_TRAIT(H, TRAIT_EASYDISMEMBER) && prob(probability))) //try twice if(affecting.dismember(I.damtype)) I.add_mob_blood(H) playsound(get_turf(H), I.get_dismember_sound(), 80, 1) @@ -1747,7 +1760,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(BP) if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0)) H.update_damage_overlays() - if(H.has_trait(TRAIT_MASO)) + if(HAS_TRAIT(H, TRAIT_MASO)) H.adjustArousalLoss(damage * brutemod * H.physiology.brute_mod) if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna()) H.mob_climax(forced_climax=TRUE) @@ -1796,7 +1809,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) ///////////// /datum/species/proc/breathe(mob/living/carbon/human/H) - if(H.has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(H, TRAIT_NOBREATH)) return TRUE @@ -1844,7 +1857,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) H.throw_alert("temp", /obj/screen/alert/hot, 3) // +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt. - if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTHEAT)) + if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTHEAT)) //Body temperature is too hot. SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold") @@ -1862,7 +1875,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) H.emote("scream") H.apply_damage(burn_damage, BURN) - else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTCOLD)) + else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD)) SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot") SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold) switch(H.bodytemperature) @@ -1881,7 +1894,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/adjusted_pressure = H.calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob. switch(adjusted_pressure) if(HAZARD_HIGH_PRESSURE to INFINITY) - if(!H.has_trait(TRAIT_RESISTHIGHPRESSURE)) + if(!HAS_TRAIT(H, TRAIT_RESISTHIGHPRESSURE)) H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 ) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod) H.throw_alert("pressure", /obj/screen/alert/highpressure, 2) else @@ -1893,7 +1906,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) H.throw_alert("pressure", /obj/screen/alert/lowpressure, 1) else - if(H.has_trait(TRAIT_RESISTLOWPRESSURE)) + if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE)) H.clear_alert("pressure") else H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod) @@ -1904,7 +1917,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) ////////// /datum/species/proc/handle_fire(mob/living/carbon/human/H, no_protection = FALSE) - if(H.has_trait(TRAIT_NOFIRE)) + if(HAS_TRAIT(H, TRAIT_NOFIRE)) return if(H.on_fire) //the fire tries to damage the exposed clothes and items @@ -1972,7 +1985,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "on_fire", /datum/mood_event/on_fire) /datum/species/proc/CanIgniteMob(mob/living/carbon/human/H) - if(H.has_trait(TRAIT_NOFIRE)) + if(HAS_TRAIT(H, TRAIT_NOFIRE)) return FALSE return TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/angel.dm b/code/modules/mob/living/carbon/human/species_types/angel.dm index 5122294956..c1c848106c 100644 --- a/code/modules/mob/living/carbon/human/species_types/angel.dm +++ b/code/modules/mob/living/carbon/human/species_types/angel.dm @@ -23,7 +23,7 @@ if(ishuman(H) && !fly) fly = new fly.Grant(H) - H.add_trait(TRAIT_HOLY, SPECIES_TRAIT) + ADD_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT) /datum/species/angel/on_species_loss(mob/living/carbon/human/H) if(fly) @@ -36,7 +36,7 @@ H.dna.species.mutant_bodyparts -= "wings" H.dna.features["wings"] = "None" H.update_body() - H.remove_trait(TRAIT_HOLY, SPECIES_TRAIT) + REMOVE_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT) ..() /datum/species/angel/spec_life(mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index b790ae0489..2907caff13 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -30,6 +30,7 @@ var/list/special_names = list("Tarkus") var/human_surname_chance = 3 var/special_name_chance = 5 + var/owner //dobby is a free golem /datum/species/golem/random_name(gender,unique,lastname) var/golem_surname = pick(GLOB.golem_names) @@ -74,10 +75,10 @@ /datum/species/golem/adamantine/on_species_gain(mob/living/carbon/C, datum/species/old_species) ..() - C.add_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT) + ADD_TRAIT(C, TRAIT_ANTIMAGIC, SPECIES_TRAIT) /datum/species/golem/adamantine/on_species_loss(mob/living/carbon/C) - C.remove_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT) + REMOVE_TRAIT(C, TRAIT_ANTIMAGIC, SPECIES_TRAIT) ..() //The suicide bombers of golemkind @@ -175,10 +176,10 @@ /datum/species/golem/silver/on_species_gain(mob/living/carbon/C, datum/species/old_species) ..() - C.add_trait(TRAIT_HOLY, SPECIES_TRAIT) + ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT) /datum/species/golem/silver/on_species_loss(mob/living/carbon/C) - C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT) + REMOVE_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT) ..() //Harder to stun, deals more damage, but it's even slower @@ -698,10 +699,10 @@ /datum/species/golem/cloth/on_species_gain(mob/living/carbon/C, datum/species/old_species) ..() - C.add_trait(TRAIT_HOLY, SPECIES_TRAIT) + ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT) /datum/species/golem/cloth/on_species_loss(mob/living/carbon/C) - C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT) + REMOVE_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT) ..() /datum/species/golem/cloth/check_roundstart_eligible() @@ -768,7 +769,7 @@ /obj/structure/cloth_pile/proc/revive() if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime return - if(cloth_golem.suiciding || cloth_golem.has_trait(TRAIT_NOCLONE)) + if(cloth_golem.suiciding || HAS_TRAIT(cloth_golem, TRAIT_NOCLONE)) QDEL_NULL(cloth_golem) return @@ -807,3 +808,196 @@ /datum/species/golem/plastic/on_species_loss(mob/living/carbon/C) . = ..() C.ventcrawler = initial(C.ventcrawler) + +/datum/species/golem/bronze + name = "Bronze Golem" + id = "bronze golem" + prefix = "Bronze" + special_names = list("Bell") + fixed_mut_color = "cd7f32" + info_text = "As a Bronze Golem, you are very resistant to loud noises, and make loud noises if something hard hits you, however this ability does hurt your hearing." + special_step_sounds = list('sound/machines/clockcult/integration_cog_install.ogg', 'sound/magic/clockwork/fellowship_armory.ogg' ) + attack_verb = "bonk" + mutantears = /obj/item/organ/ears/bronze + var/last_gong_time = 0 + var/gong_cooldown = 150 + +/datum/species/golem/bronze/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) + if(!(world.time > last_gong_time + gong_cooldown)) + return ..() + if(P.flag == "bullet" || P.flag == "bomb") + gong(H) + return ..() + +/datum/species/golem/bronze/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) + ..() + if(world.time > last_gong_time + gong_cooldown) + gong(H) + +/datum/species/golem/bronze/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style) + ..() + if(world.time > last_gong_time + gong_cooldown && M.a_intent != INTENT_HELP) + gong(H) + +/datum/species/golem/bronze/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) + ..() + if(world.time > last_gong_time + gong_cooldown) + gong(H) + +/datum/species/golem/bronze/on_hit(obj/item/projectile/P, mob/living/carbon/human/H) + ..() + if(world.time > last_gong_time + gong_cooldown) + gong(H) + +/datum/species/golem/bronze/proc/gong(mob/living/carbon/human/H) + last_gong_time = world.time + for(var/mob/living/M in get_hearers_in_view(7,H)) + if(M.stat == DEAD) //F + return + if(M == H) + H.show_message("You cringe with pain as your body rings around you!", 2) + H.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE) + H.soundbang_act(2, 0, 100, 1) + H.jitteriness += 7 + var/distance = max(0,get_dist(get_turf(H),get_turf(M))) + switch(distance) + if(0 to 1) + M.show_message("GONG!", 2) + M.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE) + M.soundbang_act(1, 0, 30, 3) + M.confused += 10 + M.jitteriness += 4 + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong) + if(2 to 3) + M.show_message("GONG!", 2) + M.playsound_local(H, 'sound/effects/gong.ogg', 75, TRUE) + M.soundbang_act(1, 0, 15, 2) + M.jitteriness += 3 + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong) + else + M.show_message("GONG!", 2) + M.playsound_local(H, 'sound/effects/gong.ogg', 50, TRUE) + + +/datum/species/golem/cardboard //Faster but weaker, can also make new shells on its own + name = "Cardboard Golem" + id = "cardboard golem" + prefix = "Cardboard" + special_names = list("Box") + info_text = "As a Cardboard Golem, you aren't very strong, but you are a bit quicker and can easily create more brethren by using cardboard on yourself." + species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS) + inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER) + fixed_mut_color = "ffffff" + limbs_id = "c_golem" //special sprites + attack_verb = "bash" + armor = 25 + burnmod = 1.25 + heatmod = 2 + speedmod = 1.5 + punchdamagelow = 4 + punchstunthreshold = 7 + punchdamagehigh = 8 + var/last_creation = 0 + var/brother_creation_cooldown = 300 + +/datum/species/golem/cardboard/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) + . = ..() + if(user != H) + return FALSE //forced reproduction is rape. + if(istype(I, /obj/item/stack/sheet/cardboard)) + var/obj/item/stack/sheet/cardboard/C = I + if(last_creation + brother_creation_cooldown > world.time) //no cheesing dork + return + if(C.amount < 10) + to_chat(H, "You do not have enough cardboard!") + return FALSE + to_chat(H, "You attempt to create a new cardboard brother.") + if(do_after(user, 30, target = user)) + if(last_creation + brother_creation_cooldown > world.time) //no cheesing dork + return + if(!C.use(10)) + to_chat(H, "You do not have enough cardboard!") + return FALSE + to_chat(H, "You create a new cardboard golem shell.") + create_brother(H.loc) + +/datum/species/golem/cardboard/proc/create_brother(var/location) + new /obj/effect/mob_spawn/human/golem/servant(location, /datum/species/golem/cardboard, owner) + last_creation = world.time + +/datum/species/golem/leather + name = "Leather Golem" + id = "leather golem" + special_names = list("Face", "Man", "Belt") //Ah dude 4 strength 4 stam leather belt AHHH + inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER, TRAIT_STRONG_GRABBER) + prefix = "Leather" + fixed_mut_color = "624a2e" + info_text = "As a Leather Golem, you are flammable, but you can grab things with incredible ease, allowing all your grabs to start at a strong level." + attack_verb = "whipp" + grab_sound = 'sound/weapons/whipgrab.ogg' + attack_sound = 'sound/weapons/whip.ogg' + +/datum/species/golem/bone + name = "Bone Golem" + id = "bone golem" + say_mod = "rattles" + prefix = "Bone" + limbs_id = "b_golem" + special_names = list("Head", "Broth", "Fracture", "Rattler", "Appetit") + liked_food = GROSS | MEAT | RAW + toxic_food = null + inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID) + mutanttongue = /obj/item/organ/tongue/bone + sexes = FALSE + fixed_mut_color = "ffffff" + attack_verb = "rattl" + species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS) + inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_FAKEDEATH,TRAIT_CALCIUM_HEALER) + info_text = "As a Bone Golem, You have a powerful spell that lets you chill your enemies with fear, and milk heals you! Just make sure to watch our for bone-hurting juice." + var/datum/action/innate/bonechill/bonechill + +/datum/species/golem/bone/on_species_gain(mob/living/carbon/C, datum/species/old_species) + ..() + if(ishuman(C)) + bonechill = new + bonechill.Grant(C) + +/datum/species/golem/bone/on_species_loss(mob/living/carbon/C) + if(bonechill) + bonechill.Remove(C) + ..() + +/datum/action/innate/bonechill + name = "Bone Chill" + desc = "Rattle your bones and strike fear into your enemies!" + check_flags = AB_CHECK_CONSCIOUS + icon_icon = 'icons/mob/actions/actions_spells.dmi' + button_icon_state = "bonechill" + var/cooldown = 600 + var/last_use + var/snas_chance = 3 + +/datum/action/innate/bonechill/Activate() + if(world.time < last_use + cooldown) + to_chat("You aren't ready yet to rattle your bones again") + return + owner.visible_message("[owner] rattles [owner.p_their()] bones harrowingly.", "You rattle your bones") + last_use = world.time + if(prob(snas_chance)) + playsound(get_turf(owner),'sound/magic/RATTLEMEBONES2.ogg', 100) + if(ishuman(owner)) + var/mob/living/carbon/human/H = owner + var/mutable_appearance/badtime = mutable_appearance('icons/mob/human_parts.dmi', "b_golem_eyes", -FIRE_LAYER-0.5) + badtime.appearance_flags = RESET_COLOR + H.overlays_standing[FIRE_LAYER+0.5] = badtime + H.apply_overlay(FIRE_LAYER+0.5) + addtimer(CALLBACK(H, /mob/living/carbon/.proc/remove_overlay, FIRE_LAYER+0.5), 25) + else + playsound(get_turf(owner),'sound/magic/RATTLEMEBONES.ogg', 100) + for(var/mob/living/L in orange(7, get_turf(owner))) + if((MOB_UNDEAD in L.mob_biotypes) || isgolem(L) || HAS_TRAIT(L, TRAIT_RESISTCOLD)) + return //Do not affect our brothers + + to_chat(L, "A spine-chilling sound chills you to the bone!") + L.apply_status_effect(/datum/status_effect/bonechill) + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "spooked", /datum/mood_event/spooked) diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 0461fb9b79..b218b2cefc 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -594,7 +594,7 @@ /datum/species/jelly/stargazer/proc/link_mob(mob/living/M) if(QDELETED(M) || M.stat == DEAD) return FALSE - if(M.has_trait(TRAIT_MINDSHIELD)) //mindshield implant, no dice + if(HAS_TRAIT(M, TRAIT_MINDSHIELD)) //mindshield implant, no dice return FALSE if(M in linked_mobs) return FALSE diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index 3095ca48ae..d7bb151ddc 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -5,7 +5,7 @@ sexes = 0 meat = /obj/item/stack/sheet/mineral/plasma species_traits = list(NOBLOOD,NOTRANSSTING,NOGENITALS) - inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOHUNGER) + inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_NOHUNGER,TRAIT_CALCIUM_HEALER) inherent_biotypes = list(MOB_INORGANIC, MOB_HUMANOID) mutantlungs = /obj/item/organ/lungs/plasmaman mutanttongue = /obj/item/organ/tongue/bone/plasmaman @@ -33,7 +33,7 @@ if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed) if(environment) if(environment.total_moles()) - if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire + if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen]) >= 1) //Same threshhold that extinguishes fire H.adjust_fire_stacks(0.5) if(!H.on_fire && H.fire_stacks > 0) H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!") diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index 5c2b01a179..135992f3a6 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -7,7 +7,7 @@ sexes = 0 meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL) - inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH) + inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER) inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID) mutanttongue = /obj/item/organ/tongue/bone damage_overlay_type = ""//let's not show bloody wounds or burns over bones. @@ -21,4 +21,4 @@ /datum/species/skeleton/pirate name = "Space Queen's Skeleton" - inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH) + inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER) diff --git a/code/modules/mob/living/carbon/human/status_procs.dm b/code/modules/mob/living/carbon/human/status_procs.dm index 844545a748..5c20b0ce75 100644 --- a/code/modules/mob/living/carbon/human/status_procs.dm +++ b/code/modules/mob/living/carbon/human/status_procs.dm @@ -9,12 +9,12 @@ /mob/living/carbon/human/Unconscious(amount, updating = 1, ignore_canunconscious = 0) amount = dna.species.spec_stun(src,amount) - if(has_trait(TRAIT_HEAVY_SLEEPER)) + if(HAS_TRAIT(src, TRAIT_HEAVY_SLEEPER)) amount *= rand(1.25, 1.3) return ..() /mob/living/carbon/human/Sleeping(amount, updating = 1, ignore_sleepimmune = 0) - if(has_trait(TRAIT_HEAVY_SLEEPER)) + if(HAS_TRAIT(src, TRAIT_HEAVY_SLEEPER)) amount *= rand(1.25, 1.3) return ..() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ef5b9045ca..feb80e8d2c 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -663,7 +663,7 @@ generate/load female uniform sprites matching all previously decided variables else . += "-no_marking" - if(has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(src, TRAIT_HUSK)) . += "-husk" /mob/living/carbon/human/load_limb_from_cache() @@ -705,7 +705,7 @@ generate/load female uniform sprites matching all previously decided variables add_overlay(HD.get_limb_icon()) update_damage_overlays() - if(HD && !(has_trait(TRAIT_HUSK))) + if(HD && !(HAS_TRAIT(src, TRAIT_HUSK))) // lipstick if(lip_style && (LIPS in dna.species.species_traits)) var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]", -BODY_LAYER) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index e757e6dcf4..b2eb83d668 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -116,7 +116,7 @@ air_update_turf() /mob/living/carbon/proc/has_smoke_protection() - if(has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(src, TRAIT_NOBREATH)) return TRUE return FALSE @@ -150,10 +150,9 @@ var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME var/list/breath_gases = breath.gases - breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz) - var/O2_partialpressure = (breath_gases[/datum/gas/oxygen][MOLES]/breath.total_moles())*breath_pressure - var/Toxins_partialpressure = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure - var/CO2_partialpressure = (breath_gases[/datum/gas/carbon_dioxide][MOLES]/breath.total_moles())*breath_pressure + var/O2_partialpressure = (breath_gases[/datum/gas/oxygen]/breath.total_moles())*breath_pressure + var/Toxins_partialpressure = (breath_gases[/datum/gas/plasma]/breath.total_moles())*breath_pressure + var/CO2_partialpressure = (breath_gases[/datum/gas/carbon_dioxide]/breath.total_moles())*breath_pressure //OXYGEN @@ -177,7 +176,7 @@ var/ratio = 1 - O2_partialpressure/safe_oxy_min adjustOxyLoss(min(5*ratio, 3)) failed_last_breath = 1 - oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]*ratio + oxygen_used = breath_gases[/datum/gas/oxygen]*ratio else adjustOxyLoss(3) failed_last_breath = 1 @@ -189,12 +188,12 @@ o2overloadtime = 0 //reset our counter for this too if(health >= crit_threshold) adjustOxyLoss(-5) - oxygen_used = breath_gases[/datum/gas/oxygen][MOLES] + oxygen_used = breath_gases[/datum/gas/oxygen] clear_alert("not_enough_oxy") SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "suffocation") - breath_gases[/datum/gas/oxygen][MOLES] -= oxygen_used - breath_gases[/datum/gas/carbon_dioxide][MOLES] += oxygen_used + breath_gases[/datum/gas/oxygen] -= oxygen_used + breath_gases[/datum/gas/carbon_dioxide] += oxygen_used //CARBON DIOXIDE if(CO2_partialpressure > safe_co2_max) @@ -213,7 +212,7 @@ //TOXINS/PLASMA if(Toxins_partialpressure > safe_tox_max) - var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_tox_max) * 10 + var/ratio = (breath_gases[/datum/gas/plasma]/safe_tox_max) * 10 adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE)) throw_alert("too_much_tox", /obj/screen/alert/too_much_tox) else @@ -221,7 +220,7 @@ //NITROUS OXIDE if(breath_gases[/datum/gas/nitrous_oxide]) - var/SA_partialpressure = (breath_gases[/datum/gas/nitrous_oxide][MOLES]/breath.total_moles())*breath_pressure + var/SA_partialpressure = (breath_gases[/datum/gas/nitrous_oxide]/breath.total_moles())*breath_pressure if(SA_partialpressure > SA_para_min) Unconscious(60) if(SA_partialpressure > SA_sleep_min) @@ -232,7 +231,7 @@ //BZ (Facepunch port of their Agent B) if(breath_gases[/datum/gas/bz]) - var/bz_partialpressure = (breath_gases[/datum/gas/bz][MOLES]/breath.total_moles())*breath_pressure + var/bz_partialpressure = (breath_gases[/datum/gas/bz]/breath.total_moles())*breath_pressure if(bz_partialpressure > 1) hallucination += 10 else if(bz_partialpressure > 0.01) @@ -240,17 +239,17 @@ //TRITIUM if(breath_gases[/datum/gas/tritium]) - var/tritium_partialpressure = (breath_gases[/datum/gas/tritium][MOLES]/breath.total_moles())*breath_pressure + var/tritium_partialpressure = (breath_gases[/datum/gas/tritium]/breath.total_moles())*breath_pressure radiation += tritium_partialpressure/10 //NITRYL if(breath_gases[/datum/gas/nitryl]) - var/nitryl_partialpressure = (breath_gases[/datum/gas/nitryl][MOLES]/breath.total_moles())*breath_pressure + var/nitryl_partialpressure = (breath_gases[/datum/gas/nitryl]/breath.total_moles())*breath_pressure adjustFireLoss(nitryl_partialpressure/4) //MIASMA if(breath_gases[/datum/gas/miasma]) - var/miasma_partialpressure = (breath_gases[/datum/gas/miasma][MOLES]/breath.total_moles())*breath_pressure + var/miasma_partialpressure = (breath_gases[/datum/gas/miasma]/breath.total_moles())*breath_pressure if(prob(1 * miasma_partialpressure)) var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3) @@ -292,7 +291,7 @@ - breath.garbage_collect() + GAS_GARBAGE_COLLECT(breath.gases) //BREATH TEMPERATURE handle_breath_temperature(breath) @@ -324,7 +323,7 @@ return // No decay if formaldehyde in corpse or when the corpse is charred - if(reagents.has_reagent("formaldehyde", 15) || has_trait(TRAIT_HUSK)) + if(reagents.has_reagent("formaldehyde", 15) || HAS_TRAIT(src, TRAIT_HUSK)) return // Also no decay if corpse chilled or not organic/undead @@ -345,8 +344,7 @@ var/list/cached_gases = miasma_turf.air.gases - ASSERT_GAS(/datum/gas/miasma, miasma_turf.air) - cached_gases[/datum/gas/miasma][MOLES] += 0.02 + cached_gases[/datum/gas/miasma] += 0.02 /mob/living/carbon/proc/handle_blood() return @@ -551,7 +549,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(drunkenness >= 6) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "drunk", /datum/mood_event/drunk) jitteriness = max(jitteriness - 3, 0) - if(has_trait(TRAIT_DRUNK_HEALING)) + if(HAS_TRAIT(src, TRAIT_DRUNK_HEALING)) adjustBruteLoss(-0.12, FALSE) adjustFireLoss(-0.06, FALSE) @@ -576,7 +574,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(prob(25)) confused += 2 Dizzy(10) - if(has_trait(TRAIT_DRUNK_HEALING)) // effects stack with lower tiers + if(HAS_TRAIT(src, TRAIT_DRUNK_HEALING)) // effects stack with lower tiers adjustBruteLoss(-0.3, FALSE) adjustFireLoss(-0.15, FALSE) @@ -589,7 +587,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(drunkenness >= 61) if(prob(50)) blur_eyes(5) - if(has_trait(TRAIT_DRUNK_HEALING)) + if(HAS_TRAIT(src, TRAIT_DRUNK_HEALING)) adjustBruteLoss(-0.4, FALSE) adjustFireLoss(-0.2, FALSE) @@ -656,8 +654,9 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put L.damage += d /mob/living/carbon/proc/liver_failure() + reagents.end_metabolization(src, keep_liverless = TRUE) //Stops trait-based effects on reagents, to prevent permanent buffs reagents.metabolize(src, can_overdose=FALSE, liverless = TRUE) - if(has_trait(TRAIT_STABLEHEART)) + if(HAS_TRAIT(src, TRAIT_STABLEHEART)) return adjustToxLoss(4, TRUE, TRUE) if(prob(30)) @@ -693,7 +692,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put return TRUE /mob/living/carbon/proc/needs_heart() - if(has_trait(TRAIT_STABLEHEART)) + if(HAS_TRAIT(src, TRAIT_STABLEHEART)) return FALSE if(dna && dna.species && (NOBLOOD in dna.species.species_traits)) //not all carbons have species! return FALSE diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 901fb48b20..85436178fe 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -73,39 +73,21 @@ if(I.loc == src) return TRUE - if(I.anchored) + if(I.anchored || !put_in_hands(I)) blacklistItems[I] ++ return FALSE - // WEAPONS - if(istype(I, /obj/item)) - var/obj/item/W = I - if(W.force >= best_force) - put_in_hands(W) - best_force = W.force - return TRUE - - // CLOTHING - else if(istype(I, /obj/item/clothing)) - var/obj/item/clothing/C = I - monkeyDrop(C) - addtimer(CALLBACK(src, .proc/pickup_and_wear, C), 5) - return TRUE - - // EVERYTHING ELSE + if(I.force >= best_force) + best_force = I.force else - if(!get_item_for_held_index(1) || !get_item_for_held_index(2)) - put_in_hands(I) - return TRUE + addtimer(CALLBACK(src, .proc/pickup_and_wear, I), 5) - blacklistItems[I] ++ - return FALSE + return TRUE -/mob/living/carbon/monkey/proc/pickup_and_wear(var/obj/item/clothing/C) - if(!equip_to_appropriate_slot(C)) - monkeyDrop(get_item_by_slot(C)) // remove the existing item if worn - sleep(5) - equip_to_appropriate_slot(C) +/mob/living/carbon/monkey/proc/pickup_and_wear(obj/item/I) + if(QDELETED(I) || I.loc != src) + return + equip_to_appropriate_slot(I) /mob/living/carbon/monkey/resist_restraints() var/obj/item/I = null @@ -119,7 +101,7 @@ cuff_resist(I) /mob/living/carbon/monkey/proc/should_target(var/mob/living/L) - if(has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(src, TRAIT_PACIFISM)) return FALSE if(enemies[L]) @@ -143,7 +125,7 @@ pickupTimer = 0 else INVOKE_ASYNC(src, .proc/walk2derpless, pickupTarget.loc) - if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target + if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target drop_all_held_items() // who cares about these items, i want that one! if(isturf(pickupTarget.loc)) // on floor equip_item(pickupTarget) @@ -167,7 +149,7 @@ battle_screech() retaliate(L) return TRUE - else + else bodyDisposal = locate(/obj/machinery/disposal/) in around if(bodyDisposal) target = L @@ -311,7 +293,8 @@ if(I == pickupTarget) M.visible_message("[src] snatches [pickupTarget] from [M].", "[src] snatched [pickupTarget]!") if(M.temporarilyRemoveItemFromInventory(pickupTarget) && !QDELETED(pickupTarget)) - equip_item(pickupTarget) + if(!equip_item(pickupTarget)) + dropItemToGround(pickupTarget) else M.visible_message("[src] tried to snatch [pickupTarget] from [M], but failed!", "[src] tried to grab [pickupTarget]!") pickpocketing = FALSE diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 55b5d67c24..906e138b0a 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -81,7 +81,7 @@ adjust_bodytemperature(min((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX)) - if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !has_trait(TRAIT_RESISTHEAT)) + if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(src, TRAIT_RESISTHEAT)) switch(bodytemperature) if(360 to 400) throw_alert("temp", /obj/screen/alert/hot, 1) @@ -96,7 +96,7 @@ else apply_damage(HEAT_DAMAGE_LEVEL_2, BURN) - else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !has_trait(TRAIT_RESISTCOLD)) + else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(src, TRAIT_RESISTCOLD)) if(!istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell)) switch(bodytemperature) if(200 to 260) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 1ffa3316ab..f1a6b58cd1 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -147,7 +147,7 @@ threatcount += 4 //trigger look_for_perp() since they're nonhuman and very likely hostile //mindshield implants imply trustworthyness - if(has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(src, TRAIT_MINDSHIELD)) threatcount -= 1 return threatcount diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm index c807251af4..6311776596 100644 --- a/code/modules/mob/living/carbon/monkey/update_icons.dm +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -19,7 +19,7 @@ if(!HD) //Decapitated return - if(has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(src, TRAIT_HUSK)) return var/hair_hidden = 0 diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 212b96e6d9..87bf662c4f 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -279,7 +279,7 @@ else . += "-robotic" - if(has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(src, TRAIT_HUSK)) . += "-husk" diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 4e5c7decc5..b2eed2d19e 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -101,14 +101,14 @@ if(EFFECT_SLUR) slurring = max(slurring,(effect * hit_percent)) if(EFFECT_STUTTER) - if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) // stun is usually associated with stutter + if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) // stun is usually associated with stutter stuttering = max(stuttering,(effect * hit_percent)) if(EFFECT_EYE_BLUR) blur_eyes(effect * hit_percent) if(EFFECT_DROWSY) drowsyness = max(drowsyness,(effect * hit_percent)) if(EFFECT_JITTER) - if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) + if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) jitteriness = max(jitteriness,(effect * hit_percent)) return 1 diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 9ef4c1567a..201e5fea24 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -109,7 +109,7 @@ ExtinguishMob() return var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment - if(!G.gases[/datum/gas/oxygen] || G.gases[/datum/gas/oxygen][MOLES] < 1) + if(G.gases[/datum/gas/oxygen] < 1) ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire return var/turf/location = get_turf(src) @@ -126,7 +126,7 @@ /mob/living/proc/handle_traits() //Eyes if(eye_blind) //blindness, heals slowly over time - if(!stat && !(has_trait(TRAIT_BLIND))) + if(!stat && !(HAS_TRAIT(src, TRAIT_BLIND))) eye_blind = max(eye_blind-1,0) if(client && !eye_blind) clear_alert("blind") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0e35dd24d0..fad29d5146 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -170,7 +170,7 @@ return 1 if(isliving(M)) var/mob/living/L = M - if(L.has_trait(TRAIT_PUSHIMMUNE)) + if(HAS_TRAIT(L, TRAIT_PUSHIMMUNE)) return 1 //If they're a human, and they're not in help intent, block pushing if(ishuman(M) && (M.a_intent != INTENT_HELP)) @@ -263,7 +263,7 @@ var/mob/M = AM log_combat(src, M, "grabbed", addition="passive grab") - if(!supress_message) + if(!supress_message && !(iscarbon(AM) && HAS_TRAIT(src, TRAIT_STRONG_GRABBER))) visible_message("[src] has grabbed [M][(zone_selected == "l_arm" || zone_selected == "r_arm")? " by their hands":" passively"]!") //Cit change - And they thought ERP was bad. if(!iscarbon(src)) M.LAssailant = null @@ -281,6 +281,11 @@ var/datum/disease/D = thing if(D.spread_flags & DISEASE_SPREAD_CONTACT_SKIN) ContactContractDisease(D) + + if(iscarbon(L)) + var/mob/living/carbon/C = L + if(HAS_TRAIT(src, TRAIT_STRONG_GRABBER)) + C.grippedby(src) //mob verbs are a lot faster than object verbs //for more info on why this is not atom/pull, see examinate() in mob.dm @@ -306,7 +311,7 @@ /mob/living/pointed(atom/A as mob|obj|turf in view()) if(incapacitated()) return FALSE - if(has_trait(TRAIT_DEATHCOMA)) + if(HAS_TRAIT(src, TRAIT_DEATHCOMA)) return FALSE if(!..()) return FALSE @@ -814,7 +819,7 @@ /mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering return -/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(incapacitated()) to_chat(src, "You can't do that right now!") return FALSE @@ -889,7 +894,7 @@ /mob/living/rad_act(amount) . = ..() - if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || has_trait(TRAIT_RADIMMUNE)) + if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE)) return amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated @@ -905,7 +910,7 @@ . = ..() if(.) return - if((magic && has_trait(TRAIT_ANTIMAGIC)) || (holy && has_trait(TRAIT_HOLY))) + if((magic && HAS_TRAIT(src, TRAIT_ANTIMAGIC)) || (holy && HAS_TRAIT(src, TRAIT_HOLY))) return src /mob/living/proc/fakefireextinguish() @@ -988,7 +993,7 @@ //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. //Robots, animals and brains have their own version so don't worry about them /mob/living/proc/update_canmove() - var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_DEATHCOMA)) + var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) var/move_and_fall = stat == SOFT_CRIT && !pulledby var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK var/buckle_lying = !(buckled && !buckled.buckle_lying) @@ -1182,3 +1187,39 @@ update_transform() if("lighting_alpha") sync_lighting_plane_alpha() + +/mob/living/proc/do_adrenaline( + stamina_boost = 150, + put_on_feet = TRUE, + clamp_unconscious_to = 0, + clamp_immobility_to = 0, + reset_misc = TRUE, + healing_chems = list("inaprovaline" = 3, "synaptizine" = 10, "regen_jelly" = 10, "stimulants" = 10), + message = "You feel a surge of energy!", + stamina_buffer_boost = 0, //restores stamina buffer rather than just health + scale_stamina_loss_recovery, //defaults to null. if this is set, restores loss * this stamina. make sure it's a fraction. + stamina_loss_recovery_bypass = 0 //amount of stamina loss to ignore during calculation + ) + to_chat(src, message) + if(AmountSleeping() > clamp_unconscious_to) + SetSleeping(clamp_unconscious_to) + if(AmountUnconscious() > clamp_unconscious_to) + SetUnconscious(clamp_unconscious_to) + if(AmountStun() > clamp_immobility_to) + SetStun(clamp_immobility_to) + if(AmountKnockdown() > clamp_immobility_to) + SetKnockdown(clamp_immobility_to) + adjustStaminaLoss(min(0, -stamina_boost)) + adjustStaminaLossBuffered(min(0, -stamina_buffer_boost)) + if(scale_stamina_loss_recovery) + adjustStaminaLoss(min(-((getStaminaLoss() - stamina_loss_recovery_bypass) * scale_stamina_loss_recovery), 0)) + if(put_on_feet) + resting = FALSE + lying = FALSE + if(reset_misc) + stuttering = 0 + updatehealth() + update_stamina() + update_canmove() + for(var/chem in healing_chems) + reagents.add_reagent(chem, healing_chems[chem]) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0d74094d81..e434bc4e95 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -124,6 +124,18 @@ if(user == anchored || !isturf(user.loc)) return FALSE + //pacifist vore check. + if(user.pulling && HAS_TRAIT(user, TRAIT_PACIFISM) && user.voremode) //they can only do heals, noisy guts, absorbing (technically not harm) + if(ismob(user.pulling)) + var/mob/P = user.pulling + if(src != user) + to_chat(user, "You can't risk digestion!") + return FALSE + else + user.vore_attack(user, P, user) + return + + //normal vore check. if(user.pulling && user.grab_state == GRAB_AGGRESSIVE && user.voremode) if(ismob(user.pulling)) var/mob/P = user.pulling @@ -137,11 +149,11 @@ user.start_pulling(src, supress_message) return - if(!(status_flags & CANPUSH) || has_trait(TRAIT_PUSHIMMUNE)) + if(!(status_flags & CANPUSH) || HAS_TRAIT(src, TRAIT_PUSHIMMUNE)) to_chat(user, "[src] can't be grabbed more aggressively!") return FALSE - if(user.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to risk hurting [src]!") return FALSE @@ -204,7 +216,7 @@ M.Feedstop() return // can't attack while eating! - if(has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(src, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -221,7 +233,7 @@ M.visible_message("\The [M] [M.friendly] [src]!") return FALSE else - if(M.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(M, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -240,7 +252,7 @@ return FALSE if (M.a_intent == INTENT_HARM) - if(M.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(M, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE @@ -266,7 +278,7 @@ return FALSE else - if(L.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(L, TRAIT_PACIFISM)) to_chat(L, "You don't want to hurt anyone!") return @@ -291,7 +303,7 @@ grabbedby(M) return FALSE if("harm") - if(M.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(M, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE M.do_attack_animation(src) @@ -315,7 +327,7 @@ SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage) if(tesla_shock && (flags_1 & TESLA_IGNORE_1)) return FALSE - if(has_trait(TRAIT_SHOCKIMMUNE)) + if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE)) return FALSE if(shock_damage > 0) if(!illusion) @@ -385,7 +397,7 @@ //called when the mob receives a bright flash /mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash) - if(get_eye_protection() < intensity && (override_blindness_check || !(has_trait(TRAIT_BLIND)))) + if(get_eye_protection() < intensity && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND)))) overlay_fullscreen("flash", type) addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25) return TRUE diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 0ba5b4c56d..3b0af53866 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -33,8 +33,6 @@ var/incorporeal_move = FALSE //FALSE is off, INCORPOREAL_MOVE_BASIC is normal, INCORPOREAL_MOVE_SHADOW is for ninjas //and INCORPOREAL_MOVE_JAUNT is blocked by holy water/salt - var/list/status_traits = list() - var/list/roundstart_quirks = list() var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them. diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 871e33349a..e2f62b054c 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -301,7 +301,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( return 1 /mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels - if(has_trait(TRAIT_MUTE)) + if(HAS_TRAIT(src, TRAIT_MUTE)) return 0 if(is_muzzled()) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 3e72cbf875..1b1eb1a805 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -92,6 +92,7 @@ var/list/multicam_screens = list() var/list/all_eyes = list() var/max_multicams = 6 + var/display_icon_override /mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai) . = ..() @@ -127,6 +128,8 @@ create_eye() apply_pref_name("ai") + set_core_display_icon() + holo_icon = getHologramIcon(icon('icons/mob/ai.dmi',"default")) spark_system = new /datum/effect_system/spark_spread() @@ -172,81 +175,34 @@ fire_stacks = 0 . = ..() +/mob/living/silicon/ai/proc/set_core_display_icon(input, client/C) + if(client && !C) + C = client + if(!input && !C?.prefs?.preferred_ai_core_display) + icon_state = initial(icon_state) + else + var/preferred_icon = input ? input : C.prefs.preferred_ai_core_display + icon_state = resolve_ai_icon(preferred_icon) + /mob/living/silicon/ai/verb/pick_icon() set category = "AI Commands" set name = "Set AI Core Display" if(incapacitated()) return + var/list/iconstates = GLOB.ai_core_display_screens + for(var/option in iconstates) + if(option == "Random") + iconstates[option] = image(icon = src.icon, icon_state = "ai-random") + continue + iconstates[option] = image(icon = src.icon, icon_state = resolve_ai_icon(option)) - var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Clown", ":thinking:", "Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static", "Red October", "House", "Heartline", "Hades", "Helios", "President", "Syndicat Meow", "Alien", "Too Deep", "Triumvirate", "Triumvirate-M", "Text", "Matrix", "Dorf", "Bliss", "Not Malf", "Fuzzy", "Goon", "Database", "Glitchman", "Murica", "Nanotrasen", "Gentoo", "Angel", "TechDemon") //CIT CHANGE - adds 'TechDemon - if(icontype == "Clown") - icon_state = "ai-clown2" - else if (icontype == ":thinking:") - icon_state = "ai-:thinking:" - else if(icontype == "Monochrome") - icon_state = "ai-mono" - else if(icontype == "Blue") - icon_state = "ai" - else if(icontype == "Inverted") - icon_state = "ai-u" - else if(icontype == "Firewall") - icon_state = "ai-magma" - else if(icontype == "Green") - icon_state = "ai-wierd" - else if(icontype == "Red") - icon_state = "ai-malf" - else if(icontype == "Static") - icon_state = "ai-static" - else if(icontype == "Red October") - icon_state = "ai-redoctober" - else if(icontype == "House") - icon_state = "ai-house" - else if(icontype == "Heartline") - icon_state = "ai-heartline" - else if(icontype == "Hades") - icon_state = "ai-hades" - else if(icontype == "Helios") - icon_state = "ai-helios" - else if(icontype == "President") - icon_state = "ai-pres" - else if(icontype == "Syndicat Meow") - icon_state = "ai-syndicatmeow" - else if(icontype == "Alien") - icon_state = "ai-alien" - else if(icontype == "Too Deep") - icon_state = "ai-toodeep" - else if(icontype == "Triumvirate") - icon_state = "ai-triumvirate" - else if(icontype == "Triumvirate-M") - icon_state = "ai-triumvirate-malf" - else if(icontype == "Text") - icon_state = "ai-text" - else if(icontype == "Matrix") - icon_state = "ai-matrix" - else if(icontype == "Dorf") - icon_state = "ai-dorf" - else if(icontype == "Bliss") - icon_state = "ai-bliss" - else if(icontype == "Not Malf") - icon_state = "ai-notmalf" - else if(icontype == "Fuzzy") - icon_state = "ai-fuzz" - else if(icontype == "Goon") - icon_state = "ai-goon" - else if(icontype == "Database") - icon_state = "ai-database" - else if(icontype == "Glitchman") - icon_state = "ai-glitchman" - else if(icontype == "Murica") - icon_state = "ai-murica" - else if(icontype == "Nanotrasen") - icon_state = "ai-nanotrasen" - else if(icontype == "Gentoo") - icon_state = "ai-gentoo" - else if(icontype == "Angel") - icon_state = "ai-angel" - else if(icontype == "TechDemon") //CIT CHANGE - adds 'TechDemon - icon_state = "ai-techdemon" + view_core() + var/ai_core_icon = show_radial_menu(src, src , iconstates, radius = 42) + + if(!ai_core_icon || incapacitated()) + return + display_icon_override = ai_core_icon + set_core_display_icon(ai_core_icon) /mob/living/silicon/ai/Stat() ..() @@ -332,8 +288,17 @@ /mob/living/silicon/ai/can_interact_with(atom/A) . = ..() + var/turf/ai = get_turf(src) + var/turf/target = get_turf(A) if (.) return + + if(!target) + return + + if ((ai.z != target.z) && !is_station_level(ai.z)) + return FALSE + if (istype(loc, /obj/item/aicard)) var/turf/T0 = get_turf(src) var/turf/T1 = get_turf(A) @@ -823,7 +788,7 @@ return TRUE return ..() -/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(control_disabled || incapacitated()) to_chat(src, "You can't do that right now!") return FALSE @@ -915,9 +880,9 @@ clear_fullscreen("remote_view", 0) /mob/living/silicon/ai/revive(full_heal = 0, admin_revive = 0) - if(..()) //successfully ressuscitated from death - icon_state = "ai" - . = 1 + . = ..() + if(.) //successfully ressuscitated from death + set_core_display_icon(display_icon_override) /mob/living/silicon/ai/proc/malfhacked(obj/machinery/power/apc/apc) malfhack = null diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 9b982d4bd5..301d2bd218 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -4,10 +4,13 @@ . = ..() - if("[icon_state]_dead" in icon_states(src.icon,1)) + var/old_icon = icon_state + if("[icon_state]_dead" in icon_states(icon)) icon_state = "[icon_state]_dead" else icon_state = "ai_dead" + if("[old_icon]_death_transition" in icon_states(icon)) + flick("[old_icon]_death_transition", src) cameraFollow = null diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 6ea1e96a06..0f1e65dc33 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -183,7 +183,7 @@ // See software.dm for Topic() -/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/silicon/pai/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(be_close && !in_range(M, src)) to_chat(src, "You are too far away!") return FALSE diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 90070f1d5d..0e8d37a807 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -544,9 +544,9 @@ if (total_moles) for(var/id in env_gases) - var/gas_level = env_gases[id][MOLES]/total_moles + var/gas_level = env_gases[id]/total_moles if(gas_level > 0.01) - dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100)]%
" + dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100)]%
" dat += "Temperature: [round(environment.temperature-T0C)]°C
" dat += "Refresh Reading
" dat += "
" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 335645b17e..e71e269222 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -910,7 +910,7 @@ if(DISCONNECT) //Tampering with the wires to_chat(connected_ai, "

NOTICE - Remote telemetry lost with [name].
") -/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) if(stat || lockcharge || low_power_mode) to_chat(src, "You can't do that right now!") return FALSE diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index a92c1ff9e1..793df63c87 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -15,7 +15,7 @@ grabbedby(M) if("harm", "disarm") - if(M.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(M, TRAIT_PACIFISM)) to_chat(M, "You don't want to hurt [src]!") return M.do_attack_animation(src, ATTACK_EFFECT_PUNCH) @@ -29,7 +29,7 @@ /mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == INTENT_HARM) - if(user.has_trait(TRAIT_PACIFISM)) + if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "You don't want to hurt [src]!") return FALSE ..(user, 1) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 7167d87bde..5a21d33d5a 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -343,7 +343,7 @@ /mob/living/simple_animal/bot/medbot/proc/assess_patient(mob/living/carbon/C) //Time to see if they need medical help! - if(C.stat == DEAD || (C.has_trait(TRAIT_FAKEDEATH))) + if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH))) return FALSE //welp too late for them! if(!(loc == C.loc) && !(isturf(C.loc) && isturf(loc))) @@ -421,7 +421,7 @@ soft_reset() return - if(C.stat == DEAD || (C.has_trait(TRAIT_FAKEDEATH))) + if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH))) var/list/messagevoice = list("No! Stay with me!" = 'sound/voice/medbot/no.ogg',"Live, damnit! LIVE!" = 'sound/voice/medbot/live.ogg',"I...I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/lost.ogg') var/message = pick(messagevoice) speak(message) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index ff91ca7dc3..3cc8822d02 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -343,7 +343,7 @@ /mob/living/simple_animal/hostile/construct/harvester/AttackingTarget() if(iscarbon(target)) var/mob/living/carbon/C = target - if(C.has_trait(TRAIT_NODISMEMBER)) + if(HAS_TRAIT(C, TRAIT_NODISMEMBER)) return ..() //ATTACK! var/list/parts = list() var/undismembermerable_limbs = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/panda.dm b/code/modules/mob/living/simple_animal/friendly/panda.dm new file mode 100644 index 0000000000..a7b6143ef5 --- /dev/null +++ b/code/modules/mob/living/simple_animal/friendly/panda.dm @@ -0,0 +1,20 @@ +/mob/living/simple_animal/pet/redpanda + name = "Red panda" + desc = "Wah't a dork." + icon = 'icons/mob/pets.dmi' + icon_state = "red_panda" + icon_living = "red_panda" + icon_dead = "dead_panda" + speak = list("Churip","Chuuriip","Cheep-cheep","Chiteurp","squueeaacipt") + speak_emote = list("chirps", "huff-quacks") + emote_hear = list("squeak-chrips.", "huff-squacks.") + emote_see = list("shakes its head.", "rolls about.") + speak_chance = 1 + turns_per_move = 5 + see_in_dark = 6 + butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 3) + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "kicks" + gold_core_spawnable = FRIENDLY_SPAWN + do_footstep = TRUE diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 7ce2a11314..5e604cb92e 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -596,6 +596,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians /obj/item/guardiancreator/tech/choose/traitor possible_guardians = list("Assassin", "Chaos", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support") +/obj/item/guardiancreator/tech/choose/traitor/check_uplink_validity() + return !used + /obj/item/guardiancreator/tech/choose random = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index 646987b155..80e0172f45 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -43,7 +43,7 @@ // Changeling egg can survive in aliens! var/mob/living/carbon/C = target if(C.stat == DEAD) - if(C.has_trait(TRAIT_XENO_HOST)) + if(HAS_TRAIT(C, TRAIT_XENO_HOST)) to_chat(src, "A foreign presence repels us from this body. Perhaps we should try to infest another?") return Infect(target) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index a70ca2a8e6..368c5ad4a8 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -348,7 +348,7 @@ if(vore_active) if(isliving(target)) var/mob/living/L = target - if(L.Adjacent(src) && L.devourable) // aggressive check to ensure vore attacks can be made + if(!client && L.Adjacent(src) && L.devourable) // aggressive check to ensure vore attacks can be made if(prob(voracious_chance)) vore_attack(src,L,src) else diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index d626af96f6..d3be3a0fbf 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -558,7 +558,7 @@ Difficulty: Very Hard H.regenerate_limbs() H.regenerate_organs() H.revive(1,0) - H.add_trait(TRAIT_NOCLONE, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal + ADD_TRAIT(H, TRAIT_NOCLONE, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal H.grab_ghost(force = TRUE) /obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans @@ -721,7 +721,7 @@ Difficulty: Very Hard if(isliving(A) && holder_animal) var/mob/living/L = A L.notransform = 1 - L.add_trait(TRAIT_MUTE, STASIS_MUTE) + ADD_TRAIT(L, TRAIT_MUTE, STASIS_MUTE) L.status_flags |= GODMODE L.mind.transfer_to(holder_animal) var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession @@ -731,7 +731,7 @@ Difficulty: Very Hard /obj/structure/closet/stasis/dump_contents(var/kill = 1) STOP_PROCESSING(SSobj, src) for(var/mob/living/L in src) - L.remove_trait(TRAIT_MUTE, STASIS_MUTE) + REMOVE_TRAIT(L, TRAIT_MUTE, STASIS_MUTE) L.status_flags &= ~GODMODE L.notransform = 0 if(holder_animal) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 293e3e21fd..6577553a6a 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -30,7 +30,7 @@ Cross Blasts and the AoE burst gain additional range as Hierophant loses health, When Hierophant dies, it stops trying to murder you and shrinks into a small form, which, while much weaker, is still quite effective. - The smaller club can place a teleport beacon, allowing the user to teleport themself and their allies to the beacon. -Difficulty: Hard +Difficulty: Normal */ @@ -47,11 +47,11 @@ Difficulty: Hard icon = 'icons/mob/lavaland/hierophant_new.dmi' faction = list("boss") //asteroid mobs? get that shit out of my beautiful square house speak_emote = list("preaches") - armour_penetration = 50 + armour_penetration = 75 melee_damage_lower = 15 - melee_damage_upper = 15 + melee_damage_upper = 20 speed = 1 - move_to_delay = 10 + move_to_delay = 11 ranged = 1 ranged_cooldown_time = 40 aggro_vision_range = 21 //so it can see to one side of the arena to the other diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index 3d10bfd121..fc51b9afe4 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -1,71 +1,71 @@ -/mob/living/simple_animal/hostile/tree - name = "pine tree" - desc = "A pissed off tree-like alien. It seems annoyed with the festivities..." - icon = 'icons/obj/flora/pinetrees.dmi' - icon_state = "pine_1" - icon_living = "pine_1" - icon_dead = "pine_1" - icon_gib = "pine_1" - gender = NEUTER - speak_chance = 0 - turns_per_move = 5 - response_help = "brushes" - response_disarm = "pushes" - response_harm = "hits" - speed = 1 - maxHealth = 250 - health = 250 - mob_size = MOB_SIZE_LARGE - - pixel_x = -16 - - harm_intent_damage = 5 - melee_damage_lower = 8 - melee_damage_upper = 12 - attacktext = "bites" - attack_sound = 'sound/weapons/bite.ogg' - speak_emote = list("pines") - emote_taunt = list("growls") - taunt_chance = 20 - - atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) - unsuitable_atmos_damage = 5 - minbodytemp = 0 - maxbodytemp = 1200 - - faction = list("hostile") - deathmessage = "is hacked into pieces!" - loot = list(/obj/item/stack/sheet/mineral/wood) - gold_core_spawnable = HOSTILE_SPAWN - del_on_death = 1 - -/mob/living/simple_animal/hostile/tree/Life() - ..() - if(isopenturf(loc)) - var/turf/open/T = src.loc - if(T.air && T.air.gases[/datum/gas/carbon_dioxide]) - var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES] - if(co2 > 0) - if(prob(25)) - var/amt = min(co2, 9) - T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt - T.atmos_spawn_air("o2=[amt]") - -/mob/living/simple_animal/hostile/tree/AttackingTarget() - . = ..() - if(iscarbon(target)) - var/mob/living/carbon/C = target - if(prob(15)) - C.Knockdown(60) - C.visible_message("\The [src] knocks down \the [C]!", \ - "\The [src] knocks you down!") - -/mob/living/simple_animal/hostile/tree/festivus - name = "festivus pole" - desc = "Serenity now... SERENITY NOW!" - icon_state = "festivus_pole" - icon_living = "festivus_pole" - icon_dead = "festivus_pole" - icon_gib = "festivus_pole" - loot = list(/obj/item/stack/rods) - speak_emote = list("polls") +/mob/living/simple_animal/hostile/tree + name = "pine tree" + desc = "A pissed off tree-like alien. It seems annoyed with the festivities..." + icon = 'icons/obj/flora/pinetrees.dmi' + icon_state = "pine_1" + icon_living = "pine_1" + icon_dead = "pine_1" + icon_gib = "pine_1" + gender = NEUTER + speak_chance = 0 + turns_per_move = 5 + response_help = "brushes" + response_disarm = "pushes" + response_harm = "hits" + speed = 1 + maxHealth = 250 + health = 250 + mob_size = MOB_SIZE_LARGE + + pixel_x = -16 + + harm_intent_damage = 5 + melee_damage_lower = 8 + melee_damage_upper = 12 + attacktext = "bites" + attack_sound = 'sound/weapons/bite.ogg' + speak_emote = list("pines") + emote_taunt = list("growls") + taunt_chance = 20 + + atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + unsuitable_atmos_damage = 5 + minbodytemp = 0 + maxbodytemp = 1200 + + faction = list("hostile") + deathmessage = "is hacked into pieces!" + loot = list(/obj/item/stack/sheet/mineral/wood) + gold_core_spawnable = HOSTILE_SPAWN + del_on_death = 1 + +/mob/living/simple_animal/hostile/tree/Life() + ..() + if(isopenturf(loc)) + var/turf/open/T = src.loc + if(T.air && T.air.gases[/datum/gas/carbon_dioxide]) + var/co2 = T.air.gases[/datum/gas/carbon_dioxide] + if(co2 > 0) + if(prob(25)) + var/amt = min(co2, 9) + T.air.gases[/datum/gas/carbon_dioxide] -= amt + T.atmos_spawn_air("o2=[amt]") + +/mob/living/simple_animal/hostile/tree/AttackingTarget() + . = ..() + if(iscarbon(target)) + var/mob/living/carbon/C = target + if(prob(15)) + C.Knockdown(60) + C.visible_message("\The [src] knocks down \the [C]!", \ + "\The [src] knocks you down!") + +/mob/living/simple_animal/hostile/tree/festivus + name = "festivus pole" + desc = "Serenity now... SERENITY NOW!" + icon_state = "festivus_pole" + icon_living = "festivus_pole" + icon_dead = "festivus_pole" + icon_gib = "festivus_pole" + loot = list(/obj/item/stack/rods) + speak_emote = list("polls") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index fcb201d0ad..1f81899d8a 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -1,589 +1,588 @@ -/mob/living/simple_animal - name = "animal" - icon = 'icons/mob/animal.dmi' - health = 20 - maxHealth = 20 - gender = PLURAL //placeholder - - status_flags = CANPUSH - - var/icon_living = "" - var/icon_dead = "" //icon when the animal is dead. Don't use animated icons for this. - var/icon_gib = null //We only try to show a gibbing animation if this exists. - - var/list/speak = list() - var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable. - var/speak_chance = 0 - var/list/emote_hear = list() //Hearable emotes - var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps - - var/turns_per_move = 1 - var/turns_since_move = 0 - var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals. - var/wander = 1 // Does the mob wander around when idle? - var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it. - - //Interaction - var/response_help = "pokes" - var/response_disarm = "shoves" - var/response_harm = "hits" - var/harm_intent_damage = 3 - var/force_threshold = 0 //Minimum force required to deal any damage - - //Temperature effect - var/minbodytemp = 250 - var/maxbodytemp = 350 - - //Healable by medical stacks? Defaults to yes. - var/healable = 1 - - //Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage - var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum - var/unsuitable_atmos_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above - - //LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly - var/melee_damage_lower = 0 - var/melee_damage_upper = 0 - var/obj_damage = 0 //how much damage this simple animal does to objects, if any - var/armour_penetration = 0 //How much armour they ignore, as a flat reduction from the targets armour value - var/melee_damage_type = BRUTE //Damage type of a simple mob's melee attack, should it do damage. - var/list/damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) // 1 for full damage , 0 for none , -1 for 1:1 heal from that source - var/attacktext = "attacks" - var/attack_sound = null - var/friendly = "nuzzles" //If the mob does no damage with it's attack - var/environment_smash = ENVIRONMENT_SMASH_NONE //Set to 1 to allow breaking of crates,lockers,racks,tables; 2 for walls; 3 for Rwalls - - var/speed = 1 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster - - //Hot simple_animal baby making vars - var/list/childtype = null - var/next_scan_time = 0 - var/animal_species //Sorry, no spider+corgi buttbabies. - - //simple_animal access - var/obj/item/card/id/access_card = null //innate access uses an internal ID card - var/buffed = 0 //In the event that you want to have a buffing effect on the mob, but don't want it to stack with other effects, any outside force that applies a buff to a simple mob should at least set this to 1, so we have something to check against - var/gold_core_spawnable = NO_SPAWN //If the mob can be spawned with a gold slime core. HOSTILE_SPAWN are spawned with plasma, FRIENDLY_SPAWN are spawned with blood - - var/mob/living/simple_animal/hostile/spawner/nest - - var/sentience_type = SENTIENCE_ORGANIC // Sentience type, for slime potions - - var/list/loot = list() //list of things spawned at mob's loc when it dies - var/del_on_death = 0 //causes mob to be deleted on death, useful for mobs that spawn lootable corpses - var/deathmessage = "" - var/death_sound = null //The sound played on death - - var/allow_movement_on_non_turfs = FALSE - - var/attacked_sound = "punch" //Played when someone punches the creature - - var/dextrous = FALSE //If the creature has, and can use, hands - var/dextrous_hud_type = /datum/hud/dextrous - var/datum/personal_crafting/handcrafting - - var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players) - - var/shouldwakeup = FALSE //convenience var for forcibly waking up an idling AI on next check. - - //domestication - var/tame = 0 - - var/my_z // I don't want to confuse this with client registered_z - - var/do_footstep = FALSE - -/mob/living/simple_animal/Initialize() - . = ..() - GLOB.simple_animals[AIStatus] += src - handcrafting = new() - if(gender == PLURAL) - gender = pick(MALE,FEMALE) - if(!real_name) - real_name = name - if(!loc) - stack_trace("Simple animal being instantiated in nullspace") - update_simplemob_varspeed() - -/mob/living/simple_animal/Destroy() - GLOB.simple_animals[AIStatus] -= src - if (SSnpcpool.state == SS_PAUSED && LAZYLEN(SSnpcpool.currentrun)) - SSnpcpool.currentrun -= src - - if(nest) - nest.spawned_mobs -= src - nest = null - - var/turf/T = get_turf(src) - if (T && AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src - - return ..() - -/mob/living/simple_animal/initialize_footstep() - if(do_footstep) - ..() - -/mob/living/simple_animal/updatehealth() - ..() - health = CLAMP(health, 0, maxHealth) - -/mob/living/simple_animal/update_stat() - if(status_flags & GODMODE) - return - if(stat != DEAD) - if(health <= 0) - death() - else - stat = CONSCIOUS - med_hud_set_status() - - -/mob/living/simple_animal/handle_status_effects() - ..() - if(stuttering) - stuttering = 0 - -/mob/living/simple_animal/proc/handle_automated_action() - set waitfor = FALSE - return - -/mob/living/simple_animal/proc/handle_automated_movement() - set waitfor = FALSE - if(!stop_automated_movement && wander) - if((isturf(src.loc) || allow_movement_on_non_turfs) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc. - turns_since_move++ - if(turns_since_move >= turns_per_move) - if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled - var/anydir = pick(GLOB.cardinals) - if(Process_Spacemove(anydir)) - Move(get_step(src, anydir), anydir) - turns_since_move = 0 - return 1 - -/mob/living/simple_animal/proc/handle_automated_speech(var/override) - set waitfor = FALSE - if(speak_chance) - if(prob(speak_chance) || override) - if(speak && speak.len) - if((emote_hear && emote_hear.len) || (emote_see && emote_see.len)) - var/length = speak.len - if(emote_hear && emote_hear.len) - length += emote_hear.len - if(emote_see && emote_see.len) - length += emote_see.len - var/randomValue = rand(1,length) - if(randomValue <= speak.len) - say(pick(speak), forced = "poly") - else - randomValue -= speak.len - if(emote_see && randomValue <= emote_see.len) - emote("me [pick(emote_see)]", 1) - else - emote("me [pick(emote_hear)]", 2) - else - say(pick(speak), forced = "poly") - else - if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len)) - emote("me", 1, pick(emote_see)) - if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len)) - emote("me", 2, pick(emote_hear)) - if((emote_hear && emote_hear.len) && (emote_see && emote_see.len)) - var/length = emote_hear.len + emote_see.len - var/pick = rand(1,length) - if(pick <= emote_see.len) - emote("me", 1, pick(emote_see)) - else - emote("me", 2, pick(emote_hear)) - - -/mob/living/simple_animal/proc/environment_is_safe(datum/gas_mixture/environment, check_temp = FALSE) - . = TRUE - - if(pulledby && pulledby.grab_state >= GRAB_KILL && atmos_requirements["min_oxy"]) - . = FALSE //getting choked - - if(isturf(src.loc) && isopenturf(src.loc)) - var/turf/open/ST = src.loc - if(ST.air) - var/ST_gases = ST.air.gases - ST.air.assert_gases(arglist(GLOB.hardcoded_gases)) - - var/tox = ST_gases[/datum/gas/plasma][MOLES] - var/oxy = ST_gases[/datum/gas/oxygen][MOLES] - var/n2 = ST_gases[/datum/gas/nitrogen][MOLES] - var/co2 = ST_gases[/datum/gas/carbon_dioxide][MOLES] - - ST.air.garbage_collect() - - if(atmos_requirements["min_oxy"] && oxy < atmos_requirements["min_oxy"]) - . = FALSE - else if(atmos_requirements["max_oxy"] && oxy > atmos_requirements["max_oxy"]) - . = FALSE - else if(atmos_requirements["min_tox"] && tox < atmos_requirements["min_tox"]) - . = FALSE - else if(atmos_requirements["max_tox"] && tox > atmos_requirements["max_tox"]) - . = FALSE - else if(atmos_requirements["min_n2"] && n2 < atmos_requirements["min_n2"]) - . = FALSE - else if(atmos_requirements["max_n2"] && n2 > atmos_requirements["max_n2"]) - . = FALSE - else if(atmos_requirements["min_co2"] && co2 < atmos_requirements["min_co2"]) - . = FALSE - else if(atmos_requirements["max_co2"] && co2 > atmos_requirements["max_co2"]) - . = FALSE - else - if(atmos_requirements["min_oxy"] || atmos_requirements["min_tox"] || atmos_requirements["min_n2"] || atmos_requirements["min_co2"]) - . = FALSE - - if(check_temp) - var/areatemp = get_temperature(environment) - if((areatemp < minbodytemp) || (areatemp > maxbodytemp)) - . = FALSE - - -/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment) - var/atom/A = src.loc - if(isturf(A)) - var/areatemp = get_temperature(environment) - if( abs(areatemp - bodytemperature) > 5) - var/diff = areatemp - bodytemperature - diff = diff / 5 - adjust_bodytemperature(diff) - - if(!environment_is_safe(environment)) - adjustHealth(unsuitable_atmos_damage) - - handle_temperature_damage() - -/mob/living/simple_animal/proc/handle_temperature_damage() - if((bodytemperature < minbodytemp) || (bodytemperature > maxbodytemp)) - adjustHealth(unsuitable_atmos_damage) - -/mob/living/simple_animal/gib() - if(butcher_results) - var/atom/Tsec = drop_location() - for(var/path in butcher_results) - for(var/i in 1 to butcher_results[path]) - new path(Tsec) - ..() - -/mob/living/simple_animal/gib_animation() - if(icon_gib) - new /obj/effect/temp_visual/gib_animation/animal(loc, icon_gib) - -/mob/living/simple_animal/say_mod(input, message_mode) - if(speak_emote && speak_emote.len) - verb_say = pick(speak_emote) - . = ..() - -/mob/living/simple_animal/emote(act, m_type=1, message = null, intentional = FALSE) - if(stat) - return - if(act == "scream") - message = "makes a loud and pained whimper." //ugly hack to stop animals screaming when crushed :P - act = "me" - ..(act, m_type, message) - -/mob/living/simple_animal/proc/set_varspeed(var_value) - speed = var_value - update_simplemob_varspeed() - -/mob/living/simple_animal/proc/update_simplemob_varspeed() - if(speed == 0) - remove_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE) - add_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE, 100, multiplicative_slowdown = speed, override = TRUE) - -/mob/living/simple_animal/Stat() - ..() - if(statpanel("Status")) - stat(null, "Health: [round((health / maxHealth) * 100)]%") - return 1 - -/mob/living/simple_animal/proc/drop_loot() - if(loot.len) - for(var/i in loot) - new i(loc) - -/mob/living/simple_animal/death(gibbed) - movement_type &= ~FLYING - if(nest) - nest.spawned_mobs -= src - nest = null - drop_loot() - if(dextrous) - drop_all_held_items() - if(!gibbed) - if(death_sound) - playsound(get_turf(src),death_sound, 200, 1) - if(deathmessage || !del_on_death) - emote("deathgasp") - if(del_on_death) - ..() - //Prevent infinite loops if the mob Destroy() is overridden in such - //a manner as to cause a call to death() again - del_on_death = FALSE - qdel(src) - else - health = 0 - icon_state = icon_dead - density = FALSE - lying = 1 - ..() - -/mob/living/simple_animal/proc/CanAttack(atom/the_target) - if(see_invisible < the_target.invisibility) - return FALSE - if(ismob(the_target)) - var/mob/M = the_target - if(M.status_flags & GODMODE) - return FALSE - if (isliving(the_target)) - var/mob/living/L = the_target - if(L.stat != CONSCIOUS) - return FALSE - if (ismecha(the_target)) - var/obj/mecha/M = the_target - if (M.occupant) - return FALSE - return TRUE - -/mob/living/simple_animal/handle_fire() - return - -/mob/living/simple_animal/IgniteMob() - return FALSE - -/mob/living/simple_animal/ExtinguishMob() - return - -/mob/living/simple_animal/revive(full_heal = 0, admin_revive = 0) - if(..()) //successfully ressuscitated from death - icon = initial(icon) - icon_state = icon_living - density = initial(density) - lying = 0 - . = 1 - movement_type = initial(movement_type) - -/mob/living/simple_animal/proc/make_babies() // <3 <3 <3 - if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress()) - return - next_scan_time = world.time + 400 - var/alone = 1 - var/mob/living/simple_animal/partner - var/children = 0 - for(var/mob/M in view(7, src)) - if(M.stat != CONSCIOUS) //Check if it's conscious FIRST. - continue - else if(istype(M, childtype)) //Check for children SECOND. - children++ - else if(istype(M, animal_species)) - if(M.ckey) - continue - else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_; - partner = M - - else if(isliving(M) && !faction_check_mob(M)) //shyness check. we're not shy in front of things that share a faction with us. - return //we never mate when not alone, so just abort early - - if(alone && partner && children < 3) - var/childspawn = pickweight(childtype) - var/turf/target = get_turf(loc) - if(target) - return new childspawn(target) - -/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) - if(incapacitated()) - to_chat(src, "You can't do that right now!") - return FALSE - if(be_close && !in_range(M, src)) - to_chat(src, "You are too far away!") - return FALSE - if(!(no_dextery || dextrous)) - to_chat(src, "You don't have the dexterity to do this!") - return FALSE - return TRUE - -/mob/living/simple_animal/stripPanelUnequip(obj/item/what, mob/who, where) - if(!canUseTopic(who, BE_CLOSE)) - return - else - ..() - -/mob/living/simple_animal/stripPanelEquip(obj/item/what, mob/who, where) - if(!canUseTopic(who, BE_CLOSE)) - return - else - ..() - -/mob/living/simple_animal/update_canmove(value_otherwise = TRUE) - if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting) - drop_all_held_items() - canmove = FALSE - else if(buckled) - canmove = FALSE - else - canmove = value_otherwise - update_transform() - update_action_buttons_icon() - return canmove - -/mob/living/simple_animal/update_transform() - var/matrix/ntransform = matrix(transform) //aka transform.Copy() - var/changed = 0 - - if(resize != RESIZE_DEFAULT_SIZE) - changed++ - ntransform.Scale(resize) - resize = RESIZE_DEFAULT_SIZE - - if(changed) - animate(src, transform = ntransform, time = 2, easing = EASE_IN|EASE_OUT) - -/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion - toggle_ai(AI_OFF) // To prevent any weirdness. - -/mob/living/simple_animal/update_sight() - if(!client) - return - if(stat == DEAD) - sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS) - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_OBSERVER - 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 - sync_lighting_plane_alpha() - -/mob/living/simple_animal/get_idcard() - return access_card - -/mob/living/simple_animal/OpenCraftingMenu() - if(dextrous) - handcrafting.ui_interact(src) - -/mob/living/simple_animal/can_hold_items() - return dextrous - -/mob/living/simple_animal/IsAdvancedToolUser() - return dextrous - -/mob/living/simple_animal/activate_hand(selhand) - if(!dextrous) - return ..() - if(!selhand) - selhand = (active_hand_index % held_items.len)+1 - if(istext(selhand)) - selhand = lowertext(selhand) - if(selhand == "right" || selhand == "r") - selhand = 2 - if(selhand == "left" || selhand == "l") - selhand = 1 - if(selhand != active_hand_index) - swap_hand(selhand) - else - mode() - -/mob/living/simple_animal/swap_hand(hand_index) - if(!dextrous) - return ..() - if(!hand_index) - hand_index = (active_hand_index % held_items.len)+1 - var/obj/item/held_item = get_active_held_item() - if(held_item) - if(istype(held_item, /obj/item/twohanded)) - var/obj/item/twohanded/T = held_item - if(T.wielded == 1) - to_chat(usr, "Your other hand is too busy holding the [T.name].") - return - var/oindex = active_hand_index - active_hand_index = hand_index - if(hud_used) - var/obj/screen/inventory/hand/H - H = hud_used.hand_slots["[hand_index]"] - if(H) - H.update_icon() - H = hud_used.hand_slots["[oindex]"] - if(H) - H.update_icon() - -/mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE) - . = ..(I, del_on_fail, merge_stacks) - update_inv_hands() - -/mob/living/simple_animal/update_inv_hands() - if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD) - var/obj/item/l_hand = get_item_for_held_index(1) - var/obj/item/r_hand = get_item_for_held_index(2) - if(r_hand) - r_hand.layer = ABOVE_HUD_LAYER - r_hand.plane = ABOVE_HUD_PLANE - r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand)) - client.screen |= r_hand - if(l_hand) - l_hand.layer = ABOVE_HUD_LAYER - l_hand.plane = ABOVE_HUD_PLANE - l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand)) - client.screen |= l_hand - -//ANIMAL RIDING - -/mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user) - GET_COMPONENT(riding_datum, /datum/component/riding) - if(riding_datum) - if(user.incapacitated()) - return - for(var/atom/movable/A in get_turf(src)) - if(A != src && A != M && A.density) - return - M.forceMove(get_turf(src)) - return ..() - -/mob/living/simple_animal/relaymove(mob/user, direction) - GET_COMPONENT(riding_datum, /datum/component/riding) - if(tame && riding_datum) - riding_datum.handle_ride(user, direction) - -/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1) - . = ..() - LoadComponent(/datum/component/riding) - -/mob/living/simple_animal/proc/toggle_ai(togglestatus) - if (AIStatus != togglestatus) - if (togglestatus > 0 && togglestatus < 5) - if (togglestatus == AI_Z_OFF || AIStatus == AI_Z_OFF) - var/turf/T = get_turf(src) - if (AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src - else - SSidlenpcpool.idle_mobs_by_zlevel[T.z] += src - GLOB.simple_animals[AIStatus] -= src - GLOB.simple_animals[togglestatus] += src - AIStatus = togglestatus - else - stack_trace("Something attempted to set simple animals AI to an invalid state: [togglestatus]") - -/mob/living/simple_animal/proc/consider_wakeup() - if (pulledby || shouldwakeup) - toggle_ai(AI_ON) - -/mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE, forced = FALSE) - . = ..() - if(!ckey && !stat)//Not unconscious - if(AIStatus == AI_IDLE) - toggle_ai(AI_ON) - - -/mob/living/simple_animal/onTransitZ(old_z, new_z) - ..() - if (AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src - toggle_ai(initial(AIStatus)) +/mob/living/simple_animal + name = "animal" + icon = 'icons/mob/animal.dmi' + health = 20 + maxHealth = 20 + gender = PLURAL //placeholder + + status_flags = CANPUSH + + var/icon_living = "" + var/icon_dead = "" //icon when the animal is dead. Don't use animated icons for this. + var/icon_gib = null //We only try to show a gibbing animation if this exists. + + var/list/speak = list() + var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable. + var/speak_chance = 0 + var/list/emote_hear = list() //Hearable emotes + var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps + + var/turns_per_move = 1 + var/turns_since_move = 0 + var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals. + var/wander = 1 // Does the mob wander around when idle? + var/stop_automated_movement_when_pulled = 1 //When set to 1 this stops the animal from moving when someone is pulling it. + + //Interaction + var/response_help = "pokes" + var/response_disarm = "shoves" + var/response_harm = "hits" + var/harm_intent_damage = 3 + var/force_threshold = 0 //Minimum force required to deal any damage + + //Temperature effect + var/minbodytemp = 250 + var/maxbodytemp = 350 + + //Healable by medical stacks? Defaults to yes. + var/healable = 1 + + //Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage + var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum + var/unsuitable_atmos_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above + + //LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly + var/melee_damage_lower = 0 + var/melee_damage_upper = 0 + var/obj_damage = 0 //how much damage this simple animal does to objects, if any + var/armour_penetration = 0 //How much armour they ignore, as a flat reduction from the targets armour value + var/melee_damage_type = BRUTE //Damage type of a simple mob's melee attack, should it do damage. + var/list/damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) // 1 for full damage , 0 for none , -1 for 1:1 heal from that source + var/attacktext = "attacks" + var/attack_sound = null + var/friendly = "nuzzles" //If the mob does no damage with it's attack + var/environment_smash = ENVIRONMENT_SMASH_NONE //Set to 1 to allow breaking of crates,lockers,racks,tables; 2 for walls; 3 for Rwalls + + var/speed = 1 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster + + //Hot simple_animal baby making vars + var/list/childtype = null + var/next_scan_time = 0 + var/animal_species //Sorry, no spider+corgi buttbabies. + + //simple_animal access + var/obj/item/card/id/access_card = null //innate access uses an internal ID card + var/buffed = 0 //In the event that you want to have a buffing effect on the mob, but don't want it to stack with other effects, any outside force that applies a buff to a simple mob should at least set this to 1, so we have something to check against + var/gold_core_spawnable = NO_SPAWN //If the mob can be spawned with a gold slime core. HOSTILE_SPAWN are spawned with plasma, FRIENDLY_SPAWN are spawned with blood + + var/mob/living/simple_animal/hostile/spawner/nest + + var/sentience_type = SENTIENCE_ORGANIC // Sentience type, for slime potions + + var/list/loot = list() //list of things spawned at mob's loc when it dies + var/del_on_death = 0 //causes mob to be deleted on death, useful for mobs that spawn lootable corpses + var/deathmessage = "" + var/death_sound = null //The sound played on death + + var/allow_movement_on_non_turfs = FALSE + + var/attacked_sound = "punch" //Played when someone punches the creature + + var/dextrous = FALSE //If the creature has, and can use, hands + var/dextrous_hud_type = /datum/hud/dextrous + var/datum/personal_crafting/handcrafting + + var/AIStatus = AI_ON //The Status of our AI, can be set to AI_ON (On, usual processing), AI_IDLE (Will not process, but will return to AI_ON if an enemy comes near), AI_OFF (Off, Not processing ever), AI_Z_OFF (Temporarily off due to nonpresence of players) + + var/shouldwakeup = FALSE //convenience var for forcibly waking up an idling AI on next check. + + //domestication + var/tame = 0 + + var/my_z // I don't want to confuse this with client registered_z + + var/do_footstep = FALSE + +/mob/living/simple_animal/Initialize() + . = ..() + GLOB.simple_animals[AIStatus] += src + handcrafting = new() + if(gender == PLURAL) + gender = pick(MALE,FEMALE) + if(!real_name) + real_name = name + if(!loc) + stack_trace("Simple animal being instantiated in nullspace") + update_simplemob_varspeed() + +/mob/living/simple_animal/Destroy() + GLOB.simple_animals[AIStatus] -= src + if (SSnpcpool.state == SS_PAUSED && LAZYLEN(SSnpcpool.currentrun)) + SSnpcpool.currentrun -= src + + if(nest) + nest.spawned_mobs -= src + nest = null + + var/turf/T = get_turf(src) + if (T && AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src + + return ..() + +/mob/living/simple_animal/initialize_footstep() + if(do_footstep) + ..() + +/mob/living/simple_animal/updatehealth() + ..() + health = CLAMP(health, 0, maxHealth) + +/mob/living/simple_animal/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) + if(health <= 0) + death() + else + stat = CONSCIOUS + med_hud_set_status() + + +/mob/living/simple_animal/handle_status_effects() + ..() + if(stuttering) + stuttering = 0 + +/mob/living/simple_animal/proc/handle_automated_action() + set waitfor = FALSE + return + +/mob/living/simple_animal/proc/handle_automated_movement() + set waitfor = FALSE + if(!stop_automated_movement && wander) + if((isturf(src.loc) || allow_movement_on_non_turfs) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc. + turns_since_move++ + if(turns_since_move >= turns_per_move) + if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled + var/anydir = pick(GLOB.cardinals) + if(Process_Spacemove(anydir)) + Move(get_step(src, anydir), anydir) + turns_since_move = 0 + return 1 + +/mob/living/simple_animal/proc/handle_automated_speech(var/override) + set waitfor = FALSE + if(speak_chance) + if(prob(speak_chance) || override) + if(speak && speak.len) + if((emote_hear && emote_hear.len) || (emote_see && emote_see.len)) + var/length = speak.len + if(emote_hear && emote_hear.len) + length += emote_hear.len + if(emote_see && emote_see.len) + length += emote_see.len + var/randomValue = rand(1,length) + if(randomValue <= speak.len) + say(pick(speak), forced = "poly") + else + randomValue -= speak.len + if(emote_see && randomValue <= emote_see.len) + emote("me [pick(emote_see)]", 1) + else + emote("me [pick(emote_hear)]", 2) + else + say(pick(speak), forced = "poly") + else + if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len)) + emote("me", 1, pick(emote_see)) + if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len)) + emote("me", 2, pick(emote_hear)) + if((emote_hear && emote_hear.len) && (emote_see && emote_see.len)) + var/length = emote_hear.len + emote_see.len + var/pick = rand(1,length) + if(pick <= emote_see.len) + emote("me", 1, pick(emote_see)) + else + emote("me", 2, pick(emote_hear)) + + +/mob/living/simple_animal/proc/environment_is_safe(datum/gas_mixture/environment, check_temp = FALSE) + . = TRUE + + if(pulledby && pulledby.grab_state >= GRAB_KILL && atmos_requirements["min_oxy"]) + . = FALSE //getting choked + + if(isturf(src.loc) && isopenturf(src.loc)) + var/turf/open/ST = src.loc + if(ST.air) + var/ST_gases = ST.air.gases + + var/tox = ST_gases[/datum/gas/plasma] + var/oxy = ST_gases[/datum/gas/oxygen] + var/n2 = ST_gases[/datum/gas/nitrogen] + var/co2 = ST_gases[/datum/gas/carbon_dioxide] + + GAS_GARBAGE_COLLECT(ST.air.gases) + + if(atmos_requirements["min_oxy"] && oxy < atmos_requirements["min_oxy"]) + . = FALSE + else if(atmos_requirements["max_oxy"] && oxy > atmos_requirements["max_oxy"]) + . = FALSE + else if(atmos_requirements["min_tox"] && tox < atmos_requirements["min_tox"]) + . = FALSE + else if(atmos_requirements["max_tox"] && tox > atmos_requirements["max_tox"]) + . = FALSE + else if(atmos_requirements["min_n2"] && n2 < atmos_requirements["min_n2"]) + . = FALSE + else if(atmos_requirements["max_n2"] && n2 > atmos_requirements["max_n2"]) + . = FALSE + else if(atmos_requirements["min_co2"] && co2 < atmos_requirements["min_co2"]) + . = FALSE + else if(atmos_requirements["max_co2"] && co2 > atmos_requirements["max_co2"]) + . = FALSE + else + if(atmos_requirements["min_oxy"] || atmos_requirements["min_tox"] || atmos_requirements["min_n2"] || atmos_requirements["min_co2"]) + . = FALSE + + if(check_temp) + var/areatemp = get_temperature(environment) + if((areatemp < minbodytemp) || (areatemp > maxbodytemp)) + . = FALSE + + +/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment) + var/atom/A = src.loc + if(isturf(A)) + var/areatemp = get_temperature(environment) + if( abs(areatemp - bodytemperature) > 5) + var/diff = areatemp - bodytemperature + diff = diff / 5 + adjust_bodytemperature(diff) + + if(!environment_is_safe(environment)) + adjustHealth(unsuitable_atmos_damage) + + handle_temperature_damage() + +/mob/living/simple_animal/proc/handle_temperature_damage() + if((bodytemperature < minbodytemp) || (bodytemperature > maxbodytemp)) + adjustHealth(unsuitable_atmos_damage) + +/mob/living/simple_animal/gib() + if(butcher_results) + var/atom/Tsec = drop_location() + for(var/path in butcher_results) + for(var/i in 1 to butcher_results[path]) + new path(Tsec) + ..() + +/mob/living/simple_animal/gib_animation() + if(icon_gib) + new /obj/effect/temp_visual/gib_animation/animal(loc, icon_gib) + +/mob/living/simple_animal/say_mod(input, message_mode) + if(speak_emote && speak_emote.len) + verb_say = pick(speak_emote) + . = ..() + +/mob/living/simple_animal/emote(act, m_type=1, message = null, intentional = FALSE) + if(stat) + return + if(act == "scream") + message = "makes a loud and pained whimper." //ugly hack to stop animals screaming when crushed :P + act = "me" + ..(act, m_type, message) + +/mob/living/simple_animal/proc/set_varspeed(var_value) + speed = var_value + update_simplemob_varspeed() + +/mob/living/simple_animal/proc/update_simplemob_varspeed() + if(speed == 0) + remove_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE) + add_movespeed_modifier(MOVESPEED_ID_SIMPLEMOB_VARSPEED, TRUE, 100, multiplicative_slowdown = speed, override = TRUE) + +/mob/living/simple_animal/Stat() + ..() + if(statpanel("Status")) + stat(null, "Health: [round((health / maxHealth) * 100)]%") + return 1 + +/mob/living/simple_animal/proc/drop_loot() + if(loot.len) + for(var/i in loot) + new i(loc) + +/mob/living/simple_animal/death(gibbed) + movement_type &= ~FLYING + if(nest) + nest.spawned_mobs -= src + nest = null + drop_loot() + if(dextrous) + drop_all_held_items() + if(!gibbed) + if(death_sound) + playsound(get_turf(src),death_sound, 200, 1) + if(deathmessage || !del_on_death) + emote("deathgasp") + if(del_on_death) + ..() + //Prevent infinite loops if the mob Destroy() is overridden in such + //a manner as to cause a call to death() again + del_on_death = FALSE + qdel(src) + else + health = 0 + icon_state = icon_dead + density = FALSE + lying = 1 + ..() + +/mob/living/simple_animal/proc/CanAttack(atom/the_target) + if(see_invisible < the_target.invisibility) + return FALSE + if(ismob(the_target)) + var/mob/M = the_target + if(M.status_flags & GODMODE) + return FALSE + if (isliving(the_target)) + var/mob/living/L = the_target + if(L.stat != CONSCIOUS) + return FALSE + if (ismecha(the_target)) + var/obj/mecha/M = the_target + if (M.occupant) + return FALSE + return TRUE + +/mob/living/simple_animal/handle_fire() + return + +/mob/living/simple_animal/IgniteMob() + return FALSE + +/mob/living/simple_animal/ExtinguishMob() + return + +/mob/living/simple_animal/revive(full_heal = 0, admin_revive = 0) + if(..()) //successfully ressuscitated from death + icon = initial(icon) + icon_state = icon_living + density = initial(density) + lying = 0 + . = 1 + movement_type = initial(movement_type) + +/mob/living/simple_animal/proc/make_babies() // <3 <3 <3 + if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress()) + return + next_scan_time = world.time + 400 + var/alone = 1 + var/mob/living/simple_animal/partner + var/children = 0 + for(var/mob/M in view(7, src)) + if(M.stat != CONSCIOUS) //Check if it's conscious FIRST. + continue + else if(istype(M, childtype)) //Check for children SECOND. + children++ + else if(istype(M, animal_species)) + if(M.ckey) + continue + else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_; + partner = M + + else if(isliving(M) && !faction_check_mob(M)) //shyness check. we're not shy in front of things that share a faction with us. + return //we never mate when not alone, so just abort early + + if(alone && partner && children < 3) + var/childspawn = pickweight(childtype) + var/turf/target = get_turf(loc) + if(target) + return new childspawn(target) + +/mob/living/simple_animal/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) + if(incapacitated()) + to_chat(src, "You can't do that right now!") + return FALSE + if(be_close && !in_range(M, src)) + to_chat(src, "You are too far away!") + return FALSE + if(!(no_dextery || dextrous)) + to_chat(src, "You don't have the dexterity to do this!") + return FALSE + return TRUE + +/mob/living/simple_animal/stripPanelUnequip(obj/item/what, mob/who, where) + if(!canUseTopic(who, BE_CLOSE)) + return + else + ..() + +/mob/living/simple_animal/stripPanelEquip(obj/item/what, mob/who, where) + if(!canUseTopic(who, BE_CLOSE)) + return + else + ..() + +/mob/living/simple_animal/update_canmove(value_otherwise = TRUE) + if(IsUnconscious() || IsStun() || IsKnockdown() || stat || resting) + drop_all_held_items() + canmove = FALSE + else if(buckled) + canmove = FALSE + else + canmove = value_otherwise + update_transform() + update_action_buttons_icon() + return canmove + +/mob/living/simple_animal/update_transform() + var/matrix/ntransform = matrix(transform) //aka transform.Copy() + var/changed = 0 + + if(resize != RESIZE_DEFAULT_SIZE) + changed++ + ntransform.Scale(resize) + resize = RESIZE_DEFAULT_SIZE + + if(changed) + animate(src, transform = ntransform, time = 2, easing = EASE_IN|EASE_OUT) + +/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion + toggle_ai(AI_OFF) // To prevent any weirdness. + +/mob/living/simple_animal/update_sight() + if(!client) + return + if(stat == DEAD) + sight = (SEE_TURFS|SEE_MOBS|SEE_OBJS) + see_in_dark = 8 + see_invisible = SEE_INVISIBLE_OBSERVER + 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 + sync_lighting_plane_alpha() + +/mob/living/simple_animal/get_idcard() + return access_card + +/mob/living/simple_animal/OpenCraftingMenu() + if(dextrous) + handcrafting.ui_interact(src) + +/mob/living/simple_animal/can_hold_items() + return dextrous + +/mob/living/simple_animal/IsAdvancedToolUser() + return dextrous + +/mob/living/simple_animal/activate_hand(selhand) + if(!dextrous) + return ..() + if(!selhand) + selhand = (active_hand_index % held_items.len)+1 + if(istext(selhand)) + selhand = lowertext(selhand) + if(selhand == "right" || selhand == "r") + selhand = 2 + if(selhand == "left" || selhand == "l") + selhand = 1 + if(selhand != active_hand_index) + swap_hand(selhand) + else + mode() + +/mob/living/simple_animal/swap_hand(hand_index) + if(!dextrous) + return ..() + if(!hand_index) + hand_index = (active_hand_index % held_items.len)+1 + var/obj/item/held_item = get_active_held_item() + if(held_item) + if(istype(held_item, /obj/item/twohanded)) + var/obj/item/twohanded/T = held_item + if(T.wielded == 1) + to_chat(usr, "Your other hand is too busy holding the [T.name].") + return + var/oindex = active_hand_index + active_hand_index = hand_index + if(hud_used) + var/obj/screen/inventory/hand/H + H = hud_used.hand_slots["[hand_index]"] + if(H) + H.update_icon() + H = hud_used.hand_slots["[oindex]"] + if(H) + H.update_icon() + +/mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE) + . = ..(I, del_on_fail, merge_stacks) + update_inv_hands() + +/mob/living/simple_animal/update_inv_hands() + if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD) + var/obj/item/l_hand = get_item_for_held_index(1) + var/obj/item/r_hand = get_item_for_held_index(2) + if(r_hand) + r_hand.layer = ABOVE_HUD_LAYER + r_hand.plane = ABOVE_HUD_PLANE + r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand)) + client.screen |= r_hand + if(l_hand) + l_hand.layer = ABOVE_HUD_LAYER + l_hand.plane = ABOVE_HUD_PLANE + l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand)) + client.screen |= l_hand + +//ANIMAL RIDING + +/mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user) + GET_COMPONENT(riding_datum, /datum/component/riding) + if(riding_datum) + if(user.incapacitated()) + return + for(var/atom/movable/A in get_turf(src)) + if(A != src && A != M && A.density) + return + M.forceMove(get_turf(src)) + return ..() + +/mob/living/simple_animal/relaymove(mob/user, direction) + GET_COMPONENT(riding_datum, /datum/component/riding) + if(tame && riding_datum) + riding_datum.handle_ride(user, direction) + +/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1) + . = ..() + LoadComponent(/datum/component/riding) + +/mob/living/simple_animal/proc/toggle_ai(togglestatus) + if (AIStatus != togglestatus) + if (togglestatus > 0 && togglestatus < 5) + if (togglestatus == AI_Z_OFF || AIStatus == AI_Z_OFF) + var/turf/T = get_turf(src) + if (AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[T.z] -= src + else + SSidlenpcpool.idle_mobs_by_zlevel[T.z] += src + GLOB.simple_animals[AIStatus] -= src + GLOB.simple_animals[togglestatus] += src + AIStatus = togglestatus + else + stack_trace("Something attempted to set simple animals AI to an invalid state: [togglestatus]") + +/mob/living/simple_animal/proc/consider_wakeup() + if (pulledby || shouldwakeup) + toggle_ai(AI_ON) + +/mob/living/simple_animal/adjustHealth(amount, updating_health = TRUE, forced = FALSE) + . = ..() + if(!ckey && !stat)//Not unconscious + if(AIStatus == AI_IDLE) + toggle_ai(AI_ON) + + +/mob/living/simple_animal/onTransitZ(old_z, new_z) + ..() + if (AIStatus == AI_Z_OFF) + SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src + toggle_ai(initial(AIStatus)) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index 161362c187..ebb34fe77a 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -132,7 +132,7 @@ if(stat != DEAD) var/bz_percentage =0 if(environment.gases[/datum/gas/bz]) - bz_percentage = environment.gases[/datum/gas/bz][MOLES] / environment.total_moles() + bz_percentage = environment.gases[/datum/gas/bz] / environment.total_moles() var/stasis = (bz_percentage >= 0.05 && bodytemperature < (T0C + 100)) || force_stasis if(stat == CONSCIOUS && stasis) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index d1c72069ac..5006bd2920 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -15,7 +15,7 @@ return 0 /mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration - if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun) + if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(absorb_stun(amount, ignore_canstun)) return var/datum/status_effect/incapacitating/stun/S = IsStun() @@ -26,7 +26,7 @@ return S /mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration - if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun) + if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) var/datum/status_effect/incapacitating/stun/S = IsStun() if(amount <= 0) if(S) @@ -41,7 +41,7 @@ return S /mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration - if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun) + if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) if(absorb_stun(amount, ignore_canstun)) return var/datum/status_effect/incapacitating/stun/S = IsStun() @@ -63,7 +63,7 @@ return 0 /mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Can't go below remaining duration - if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown) + if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown) if(absorb_stun(amount, ignore_canknockdown)) return var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown() @@ -74,7 +74,7 @@ return K /mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Sets remaining duration - if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown) + if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown) var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown() if(amount <= 0) if(K) @@ -89,7 +89,7 @@ return K /mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Adds to remaining duration - if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown) + if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown) if(absorb_stun(amount, ignore_canknockdown)) return var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown() @@ -140,19 +140,8 @@ /////////////////////////////////// DISABILITIES //////////////////////////////////// -/mob/living/proc/add_trait(trait, source) - if(!status_traits[trait]) - status_traits[trait] = list(source) - on_add_trait(trait, source) - else - status_traits[trait] |= list(source) - -/mob/living/proc/on_add_trait(trait, source) - if(trait == TRAIT_IGNORESLOWDOWN) - update_movespeed(FALSE) - /mob/living/proc/add_quirk(quirk, spawn_effects) //separate proc due to the way these ones are handled - if(has_trait(quirk)) + if(HAS_TRAIT(src, quirk)) return if(!SSquirks || !SSquirks.quirks[quirk]) return @@ -160,119 +149,54 @@ new T (src, spawn_effects) return TRUE -/mob/living/proc/remove_trait(trait, list/sources, force) - if(!status_traits[trait]) - return - - if(locate(ROUNDSTART_TRAIT) in status_traits[trait] && !force) //mob traits applied through roundstart cannot normally be removed - return - - if(!sources) // No defined source cures the trait entirely. - status_traits -= trait - on_remove_trait(trait, sources, force) - return - - if(!islist(sources)) - sources = list(sources) - - if(LAZYLEN(sources)) - for(var/S in sources) - if(S in status_traits[trait]) - status_traits[trait] -= S - else - status_traits[trait] = list() - - if(!LAZYLEN(status_traits[trait])) - status_traits -= trait - on_remove_trait(trait, sources, force) - -/mob/living/proc/on_remove_trait(trait, list/sources, force) - if(trait == TRAIT_IGNORESLOWDOWN) - update_movespeed(FALSE) - /mob/living/proc/remove_quirk(quirk) var/datum/quirk/T = roundstart_quirks[quirk] if(T) qdel(T) return TRUE -/mob/living/proc/has_trait(trait, list/sources) - if(!status_traits[trait]) - return FALSE - - . = FALSE - - if(sources && !islist(sources)) - sources = list(sources) - if(LAZYLEN(sources)) - for(var/S in sources) - if(S in status_traits[trait]) - return TRUE - else if(LAZYLEN(status_traits[trait])) - return TRUE - /mob/living/proc/has_quirk(quirk) return roundstart_quirks[quirk] -/mob/living/proc/remove_all_traits(remove_species_traits = FALSE, remove_organ_traits = FALSE, remove_quirks = FALSE) - - var/list/blacklisted_sources = list() - if(!remove_species_traits) - blacklisted_sources += SPECIES_TRAIT - if(!remove_organ_traits) - blacklisted_sources += ORGAN_TRAIT - if(!remove_quirks) - blacklisted_sources += ROUNDSTART_TRAIT - - for(var/kebab in status_traits) - var/skip - for(var/S in blacklisted_sources) - if(S in status_traits[kebab]) - skip = TRUE - break - if(!skip) - remove_trait(kebab, null, TRUE) - CHECK_TICK - /////////////////////////////////// TRAIT PROCS //////////////////////////////////// /mob/living/proc/cure_blind(list/sources) - remove_trait(TRAIT_BLIND, sources) - if(!has_trait(TRAIT_BLIND)) + REMOVE_TRAIT(src, TRAIT_BLIND, sources) + if(!HAS_TRAIT(src, TRAIT_BLIND)) adjust_blindness(-1) /mob/living/proc/become_blind(source) - if(!has_trait(TRAIT_BLIND)) + if(!HAS_TRAIT(src, TRAIT_BLIND)) blind_eyes(1) - add_trait(TRAIT_BLIND, source) + ADD_TRAIT(src, TRAIT_BLIND, source) /mob/living/proc/cure_nearsighted(list/sources) - remove_trait(TRAIT_NEARSIGHT, sources) - if(!has_trait(TRAIT_NEARSIGHT)) + REMOVE_TRAIT(src, TRAIT_NEARSIGHT, sources) + if(!HAS_TRAIT(src, TRAIT_NEARSIGHT)) clear_fullscreen("nearsighted") /mob/living/proc/become_nearsighted(source) - if(!has_trait(TRAIT_NEARSIGHT)) + if(!HAS_TRAIT(src, TRAIT_NEARSIGHT)) overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) - add_trait(TRAIT_NEARSIGHT, source) + ADD_TRAIT(src, TRAIT_NEARSIGHT, source) /mob/living/proc/cure_husk(list/sources) - remove_trait(TRAIT_HUSK, sources) - if(!has_trait(TRAIT_HUSK)) - remove_trait(TRAIT_DISFIGURED, "husk") + REMOVE_TRAIT(src, TRAIT_HUSK, sources) + if(!HAS_TRAIT(src, TRAIT_HUSK)) + REMOVE_TRAIT(src, TRAIT_DISFIGURED, "husk") update_body() return TRUE /mob/living/proc/become_husk(source) - if(!has_trait(TRAIT_HUSK)) - add_trait(TRAIT_DISFIGURED, "husk") + if(!HAS_TRAIT(src, TRAIT_HUSK)) + ADD_TRAIT(src, TRAIT_DISFIGURED, "husk") update_body() . = TRUE - add_trait(TRAIT_HUSK, source) + ADD_TRAIT(src, TRAIT_HUSK, source) /mob/living/proc/cure_fakedeath(list/sources) - remove_trait(TRAIT_FAKEDEATH, sources) - remove_trait(TRAIT_DEATHCOMA, sources) + REMOVE_TRAIT(src, TRAIT_FAKEDEATH, sources) + REMOVE_TRAIT(src, TRAIT_DEATHCOMA, sources) if(stat != DEAD) tod = null update_stat() @@ -282,7 +206,15 @@ return if(!silent) emote("deathgasp") - add_trait(TRAIT_FAKEDEATH, source) - add_trait(TRAIT_DEATHCOMA, source) + ADD_TRAIT(src, TRAIT_FAKEDEATH, source) + ADD_TRAIT(src, TRAIT_DEATHCOMA, source) tod = STATION_TIME_TIMESTAMP("hh:mm:ss") - update_stat() \ No newline at end of file + update_stat() + +/mob/living/proc/unignore_slowdown(list/sources) + REMOVE_TRAIT(src, TRAIT_IGNORESLOWDOWN, sources) + update_movespeed(FALSE) + +/mob/living/proc/ignore_slowdown(source) + ADD_TRAIT(src, TRAIT_IGNORESLOWDOWN, source) + update_movespeed(FALSE) \ No newline at end of file diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index 534bf36c59..fec024cebf 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -9,7 +9,7 @@ /mob/living/carbon/get_taste_sensitivity() var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE) - if(istype(tongue) && !has_trait(TRAIT_AGEUSIA)) + if(istype(tongue) && !HAS_TRAIT(src, TRAIT_AGEUSIA)) . = tongue.taste_sensitivity else . = 101 // can't taste anything without a tongue diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d1f83e69de..a1e8bad336 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -69,8 +69,8 @@ t += "Temperature: [environment.temperature] \n" for(var/id in environment.gases) var/gas = environment.gases[id] - if(gas[MOLES]) - t+="[gas[GAS_META][META_GAS_NAME]]: [gas[MOLES]] \n" + if(gas) + t+="[GLOB.meta_gas_names[id]]: [gas] \n" to_chat(usr, t) @@ -789,7 +789,7 @@ return 0 //Can the mob use Topic to interact with machines -/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) return /mob/proc/faction_check_mob(mob/target, exact_match) @@ -876,13 +876,7 @@ return /mob/proc/update_sight() - for(var/O in orbiters) - var/datum/orbit/orbit = O - var/obj/effect/wisp/wisp = orbit.orbiter - if (istype(wisp)) - sight |= wisp.sight_flags - if(!isnull(wisp.lighting_alpha)) - lighting_alpha = min(lighting_alpha, wisp.lighting_alpha) + SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index cb532e4d5e..82e2b11f8e 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -8,7 +8,7 @@ if(ismob(mover)) if (mover in buckled_mobs) return TRUE - return (!mover.density || !density || lying) + return (!mover.density || !density || lying || (mover.throwing && mover.throwing.thrower == src && !ismob(mover))) //DO NOT USE THIS UNLESS YOU ABSOLUTELY HAVE TO. THIS IS BEING PHASED OUT FOR THE MOVESPEED MODIFICATION SYSTEM. //See mob_movespeed.dm @@ -148,7 +148,7 @@ if(INCORPOREAL_MOVE_BASIC) var/T = get_step(L,direct) if(T) - L.loc = T + L.forceMove(T) L.setDir(direct) if(INCORPOREAL_MOVE_SHADOW) if(prob(50)) @@ -190,7 +190,7 @@ new /obj/effect/temp_visual/dir_setting/ninja/shadow(mobloc, L.dir) var/T = get_step(L,direct) if(T) - L.loc = T + L.forceMove(T) L.setDir(direct) if(INCORPOREAL_MOVE_JAUNT) //Incorporeal move, but blocked by holy-watered tiles and salt piles. var/turf/open/floor/stepTurf = get_step(L, direct) @@ -209,7 +209,7 @@ to_chat(L, "Holy energies block your path!") return - L.loc = get_step(L, direct) + L.forceMove(stepTurf) L.setDir(direct) return TRUE diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 850566f625..66444abf91 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -7,9 +7,9 @@ /mob/proc/update_flavor_text() set src in usr if(usr != src) - usr << "No." + to_chat(usr, "No.") var/msg = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Flavor Text", html_decode(flavor_text), MAX_MESSAGE_LEN*2, TRUE) - + if(!isnull(msg)) msg = copytext(msg, 1, MAX_MESSAGE_LEN) msg = html_encode(msg) @@ -18,8 +18,8 @@ /mob/proc/warn_flavor_changed() if(flavor_text && flavor_text != "") // don't spam people that don't use it! - src << "

OOC Warning:

" - src << "Your flavor text is likely out of date! Change" + to_chat(src, "

OOC Warning:

") + to_chat(src, "Your flavor text is likely out of date! Change") /mob/proc/print_flavor_text() if(flavor_text && flavor_text != "") @@ -195,7 +195,7 @@ proc/get_top_level_mob(var/mob/S) ///////////////// VERB CODE 2 /mob/living/verb/subtler() - set name = "Subtler" + set name = "Subtler Anti-Ghost" set category = "IC" if(GLOB.say_disabled) //This is here to try to identify lag problems to_chat(usr, "Speech is currently admin-disabled.") diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index a1a1bbe502..606d6d4f66 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -28,7 +28,7 @@ return 0 /mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Can't go below remaining duration - if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious) + if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious) var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() if(U) U.duration = max(world.time + amount, U.duration) @@ -37,7 +37,7 @@ return U /mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Sets remaining duration - if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious) + if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious) var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() if(amount <= 0) if(U) @@ -49,7 +49,7 @@ return U /mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Adds to remaining duration - if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious) + if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious) var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() if(U) U.duration += amount @@ -72,7 +72,7 @@ return 0 /mob/living/proc/Sleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Can't go below remaining duration - if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) + if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() if(S) S.duration = max(world.time + amount, S.duration) @@ -81,7 +81,7 @@ return S /mob/living/proc/SetSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Sets remaining duration - if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) + if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() if(amount <= 0) if(S) @@ -93,7 +93,7 @@ return S /mob/living/proc/AdjustSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Adds to remaining duration - if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) + if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune) var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() if(S) S.duration += amount @@ -170,7 +170,7 @@ blind_minimum = 1 if(isliving(src)) var/mob/living/L = src - if(L.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(L, TRAIT_BLIND)) blind_minimum = 1 eye_blind = max(eye_blind+amount, blind_minimum) if(!eye_blind) @@ -191,7 +191,7 @@ blind_minimum = 1 if(isliving(src)) var/mob/living/L = src - if(L.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(L, TRAIT_BLIND)) blind_minimum = 1 eye_blind = blind_minimum if(!eye_blind) diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index 20ad2214cf..99d648d02b 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -44,7 +44,7 @@ return machinery_computer.update_icon() // This thing is not meant to be used on it's own, get topic data from our machinery owner. -//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE) +//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) // if(!machinery_computer) // return 0 diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm index 138e8bb9dd..e7dd42a797 100644 --- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm @@ -81,13 +81,13 @@ if(air.total_moles()) for(var/gasid in air.gases) gasdata.Add(list(list( - "name"= air.gases[gasid][GAS_META][META_GAS_NAME], - "amount" = round(100*air.gases[gasid][MOLES]/air.total_moles(),0.01)))) + "name"= GLOB.meta_gas_names[gasid], + "amount" = round(100*air.gases[gasid]/air.total_moles(),0.01)))) else for(var/gasid in air.gases) gasdata.Add(list(list( - "name"= air.gases[gasid][GAS_META][META_GAS_NAME], + "name"= GLOB.meta_gas_names[gasid], "amount" = 0))) data["gases"] = gasdata diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm index 4308120c4f..a01b354ca1 100644 --- a/code/modules/ninja/suit/gloves.dm +++ b/code/modules/ninja/suit/gloves.dm @@ -37,6 +37,8 @@ var/mindrain = 200 var/maxdrain = 400 + var/stunforce = 140 //Same as stunbaton, adjustable. + /obj/item/clothing/gloves/space_ninja/Touch(atom/A,proximity) if(!candrain || draining) diff --git a/code/modules/ninja/suit/mask.dm b/code/modules/ninja/suit/mask.dm index 81d37886dd..2200af7cab 100644 --- a/code/modules/ninja/suit/mask.dm +++ b/code/modules/ninja/suit/mask.dm @@ -17,3 +17,44 @@ Contents: item_state = "s-ninja_mask" strip_delay = 120 resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + +/obj/item/clothing/mask/gas/space_ninja/speechModification(message) + if(copytext(message, 1, 2) != "*") + var/list/temp_message = text2list(message, " ") + var/list/pick_list = list() + for(var/i = 1, i <= temp_message.len, i++) + pick_list += i + for(var/i=1, i <= abs(temp_message.len/3), i++) + var/H = pick(pick_list) + if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue + temp_message[H] = ninjaspeak(temp_message[H]) + pick_list -= H + message = list2text(temp_message, " ") + + //The Alternate speech mod is now the main one. + message = replacetext(message, "l", "r") + message = replacetext(message, "rr", "ru") + message = replacetext(message, "v", "b") + message = replacetext(message, "f", "hu") + message = replacetext(message, "'t", "") + message = replacetext(message, "t ", "to ") + message = replacetext(message, " I ", " ai ") + message = replacetext(message, "th", "z") + message = replacetext(message, "is", "izu") + message = replacetext(message, "ziz", "zis") + message = replacetext(message, "se", "su") + message = replacetext(message, "br", "bur") + message = replacetext(message, "ry", "ri") + message = replacetext(message, "you", "yuu") + message = replacetext(message, "ck", "cku") + message = replacetext(message, "eu", "uu") + message = replacetext(message, "ow", "au") + message = replacetext(message, "are", "aa") + message = replacetext(message, "ay", "ayu") + message = replacetext(message, "ea", "ii") + message = replacetext(message, "ch", "chi") + message = replacetext(message, "than", "sen") + message = replacetext(message, ".", "") + message = lowertext(message) + + return message diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 270e1f106f..c98a0440e3 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -14,7 +14,7 @@ It is possible to destroy the net by the occupant or someone else. mouse_opacity = MOUSE_OPACITY_ICON//So you can hit it with stuff. anchored = TRUE//Can't drag/grab the net. layer = ABOVE_ALL_MOB_LAYER - max_integrity = 25 //How much health it has. + max_integrity = 50 //How much health it has. can_buckle = 1 buckle_lying = 0 buckle_prevents_pull = TRUE @@ -59,6 +59,41 @@ It is possible to destroy the net by the occupant or someone else. continue H.dropItemToGround(W) + var/datum/antagonist/antag_datum + for(var/datum/antagonist/ninja/AD in GLOB.antagonists) //Because only ninjas get capture objectives; They're not doable without the suit. + if(AD.owner == master) + antag_datum = AD + break + + for(var/datum/objective/capture/capture in antag_datum) + if(istype(affecting, /mob/living/carbon/human)) //Humans. + if(affecting.stat == DEAD)//Dead folks are worth less. + capture.captured_amount+=0.5 + continue + capture.captured_amount+=1 + if(istype(affecting, /mob/living/carbon/monkey)) //Monkeys are almost worthless, you failure. + capture.captured_amount+=0.1 + if(istype(affecting, /mob/living/carbon/alien/larva)) //Larva are important for research. + if(affecting.stat == DEAD) + capture.captured_amount+=0.5 + continue + capture.captured_amount+=1 + if(istype(affecting, /mob/living/carbon/alien/humanoid)) //Aliens are worth twice as much as humans. + if(istype(affecting, /mob/living/carbon/alien/humanoid/royal/queen)) //Queens are worth three times as much as humans. + if(affecting.stat == DEAD) + capture.captured_amount+=1.5 + else + capture.captured_amount+=3 + continue + if(affecting.stat == DEAD) + capture.captured_amount+=1 + continue + capture.captured_amount+=2 + + + affecting.revive(1, 1) //Basically a revive and full heal, including limbs/organs + //In case people who have been captured dead want to hang out at the holding area + playsound(affecting, 'sound/effects/sparks4.ogg', 50, 1) new /obj/effect/temp_visual/dir_setting/ninja/phase/out(affecting.drop_location(), affecting.dir) @@ -73,8 +108,9 @@ It is possible to destroy the net by the occupant or someone else. playsound(affecting, 'sound/effects/sparks2.ogg', 50, 1) new /obj/effect/temp_visual/dir_setting/ninja/phase(affecting.drop_location(), affecting.dir) -/obj/structure/energy_net/attack_paw(mob/user) - return attack_hand() +/obj/attack_alien(mob/living/carbon/alien/humanoid/user) + if(attack_generic(user, 15, BRUTE, "melee", 0)) //Aliens normally deal 60 damage to structures. They'd one-shot nets without this. + playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) /obj/structure/energy_net/user_buckle_mob(mob/living/M, mob/living/user) return//We only want our target to be buckled diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm index 5c19a67284..816ae58749 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm @@ -4,22 +4,7 @@ if(!ninjacost(0,N_ADRENALINE)) var/mob/living/carbon/human/H = affecting - H.SetSleeping(0) - H.SetStun(0) - H.SetKnockdown(0) - H.SetUnconscious(0) - H.adjustStaminaLoss(-150) - H.stuttering = 0 - H.updatehealth() - H.update_stamina() - H.resting = 0 - H.lying = 0 - H.update_canmove() - - H.reagents.add_reagent("inaprovaline", 3) //let's give another chance to dumb fucks who forget to breathe - H.reagents.add_reagent("synaptizine", 10) - H.reagents.add_reagent("omnizine", 10) - H.reagents.add_reagent("stimulants", 10) + H.do_adrenaline(150, TRUE, 0, 0, TRUE, list("inaprovaline" = 3, "synaptizine" = 10, "omnizine" = 10), "You feel a sudden surge of energy!") H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"), forced = "ninjaboost") diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm index 8c8f92e522..41f7b8af83 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -2,21 +2,34 @@ //Allows the ninja to kidnap people /obj/item/clothing/suit/space/space_ninja/proc/ninjanet() var/mob/living/carbon/human/H = affecting - var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in oview(H) + var/mob/living/carbon/C + + //If there's only one valid target, let's actually try to capture it, rather than forcing + //the user to fiddle with the dialog displaying a list of one + //Also, let's make this smarter and not list mobs you can't currently net. + var/Candidates[] + for(var/mob/mob in oview(H)) + if(!mob.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. + //to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!") + continue + if(locate(/obj/structure/energy_net) in get_turf(mob))//Check if they are already being affected by an energy net. + //to_chat(H, "[C.p_they(TRUE)] are already trapped inside an energy net!") + continue + for(var/turf/T in getline(get_turf(H), get_turf(mob))) + if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. + //to_chat(H, "You may not use an energy net through solid obstacles!") + continue + Candidates+=mob + + if(Candidates.len == 1) + C = Candidates[1] + else + C = input("Select who to capture:","Capture who?",null) as null|mob in Candidates + if(QDELETED(C)||!(C in oview(H))) return 0 - if(!C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. - to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!") - return - if(locate(/obj/structure/energy_net) in get_turf(C))//Check if they are already being affected by an energy net. - to_chat(H, "[C.p_they(TRUE)] are already trapped inside an energy net!") - return - for(var/turf/T in getline(get_turf(H), get_turf(C))) - if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. - to_chat(H, "You may not use an energy net through solid obstacles!") - return if(!ninjacost(200,N_STEALTH_CANCEL)) H.Beam(C,"n_beam",time=15) H.say("Get over here!", forced = "ninja net") diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index 861ffb9446..10fce3d74e 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -261,4 +261,19 @@ They *could* go in their appropriate files, but this is supposed to be modular spark_system.set_up(5, 0, loc) playsound(src, "sparks", 50, 1) visible_message("[H] electrocutes [src] with [H.p_their()] touch!", "[H] electrocutes you with [H.p_their()] touch!") - electrocute_act(25, H) + electrocute_act(15, H) + + Knockdown(G.stunforce) + adjustStaminaLoss(G.stunforce*0.1, affected_zone = (istype(H) ? H.zone_selected : BODY_ZONE_CHEST)) + apply_effect(EFFECT_STUTTER, G.stunforce) + SEND_SIGNAL(src, COMSIG_LIVING_MINOR_SHOCK) + + lastattacker = H.real_name + lastattackerckey = H.ckey + log_combat(H, src, "stunned") + + playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) + + if(ishuman(src)) + var/mob/living/carbon/human/Hsrc = src + Hsrc.forcesay(GLOB.hit_appends) diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm deleted file mode 100644 index 79685b9104..0000000000 --- a/code/modules/orbit/orbit.dm +++ /dev/null @@ -1,135 +0,0 @@ -/datum/orbit - var/atom/movable/orbiter - var/atom/orbiting - var/lock = TRUE - var/turf/lastloc - var/lastprocess - -/datum/orbit/New(_orbiter, _orbiting, _lock) - orbiter = _orbiter - orbiting = _orbiting - SSorbit.processing += src - if (!orbiting.orbiters) - orbiting.orbiters = list() - orbiting.orbiters += src - - if (orbiter.orbiting) - orbiter.stop_orbit() - orbiter.orbiting = src - Check() - lock = _lock - -//do not qdel directly, use stop_orbit on the orbiter. (This way the orbiter can bind to the orbit stopping) -/datum/orbit/Destroy(force = FALSE) - SSorbit.processing -= src - if (orbiter) - orbiter.orbiting = null - orbiter = null - if (orbiting) - if (orbiting.orbiters) - orbiting.orbiters -= src - if (!orbiting.orbiters.len)//we are the last orbit, delete the list - orbiting.orbiters = null - orbiting = null - return ..() - -/datum/orbit/proc/Check(turf/targetloc, list/checked_already = list()) - //Avoid infinite loops for people who end up orbiting themself through another orbiter - checked_already[src] = TRUE - if (!orbiter) - qdel(src) - return - if (!orbiting) - orbiter.stop_orbit() - return - if (!orbiter.orbiting) //admin wants to stop the orbit. - orbiter.orbiting = src //set it back to us first - orbiter.stop_orbit() - var/atom/movable/AM = orbiting - if(istype(AM) && AM.orbiting && AM.orbiting.orbiting == orbiter) - orbiter.stop_orbit() - return - lastprocess = world.time - if (!targetloc) - targetloc = get_turf(orbiting) - if (!targetloc || (!lock && orbiter.loc != lastloc && orbiter.loc != targetloc)) - orbiter.stop_orbit() - return - var/turf/old_turf = get_turf(orbiter) - var/turf/new_turf = get_turf(targetloc) - if (old_turf?.z != new_turf?.z) - orbiter.onTransitZ(old_turf?.z, new_turf?.z) - // DO NOT PORT TO FORCEMOVE - MEMECODE WILL KILL MC - orbiter.loc = targetloc - orbiter.update_parallax_contents() - orbiter.update_light() - lastloc = orbiter.loc - for(var/other_orbit in orbiter.orbiters) - var/datum/orbit/OO = other_orbit - //Skip if checked already - if(checked_already[OO]) - continue - OO.Check(targetloc, checked_already) - -/atom/movable/var/datum/orbit/orbiting = null -/atom/var/list/orbiters = null - -//A: atom to orbit -//radius: range to orbit at, radius of the circle formed by orbiting (in pixels) -//clockwise: whether you orbit clockwise or anti clockwise -//rotation_speed: how fast to rotate (how many ds should it take for a rotation to complete) -//rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default. -//pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts -//lockinorbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts) - -/atom/movable/proc/orbit(atom/A, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE, lockinorbit = FALSE) - if (!istype(A)) - return - - new/datum/orbit(src, A, lockinorbit) - if (!orbiting) //something failed, and our orbit datum deleted itself - return - var/matrix/initial_transform = matrix(transform) - - //Head first! - if (pre_rotation) - var/matrix/M = matrix(transform) - var/pre_rot = 90 - if(!clockwise) - pre_rot = -90 - M.Turn(pre_rot) - transform = M - - var/matrix/shift = matrix(transform) - shift.Translate(0,radius) - transform = shift - - SpinAnimation(rotation_speed, -1, clockwise, rotation_segments) - - //we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit - transform = initial_transform - -/atom/movable/proc/stop_orbit() - SpinAnimation(0,0) - qdel(orbiting) - -/atom/Destroy(force = FALSE) - . = ..() - if (orbiters) - for (var/thing in orbiters) - var/datum/orbit/O = thing - if (O.orbiter) - O.orbiter.stop_orbit() - -/atom/movable/Destroy(force = FALSE) - . = ..() - if (orbiting) - stop_orbit() - -/atom/movable/proc/transfer_observers_to(atom/movable/target) - if(orbiters) - for(var/thing in orbiters) - var/datum/orbit/O = thing - if(O.orbiter && isobserver(O.orbiter)) - var/mob/dead/observer/D = O.orbiter - D.ManualFollow(target) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 006151c4eb..676774ff88 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -202,7 +202,7 @@ if(!user.mind.hasSoul) to_chat(user, "You do not possess a soul.") return 0 - if(user.has_trait(TRAIT_DUMB)) + if(HAS_TRAIT(user, TRAIT_DUMB)) to_chat(user, "You quickly scrawl 'your name' on the contract.") signIncorrectly() return 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index d6d0a3dc4f..37877ffb09 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -89,7 +89,7 @@ return if(ishuman(usr)) var/mob/living/carbon/human/H = usr - if(H.has_trait(TRAIT_CLUMSY) && prob(25)) + if(HAS_TRAIT(H, TRAIT_CLUMSY) && prob(25)) to_chat(H, "You cut yourself on the paper! Ahhhh! Ahhhhh!") H.damageoverlaytemp = 9001 H.update_damage_hud() @@ -314,7 +314,7 @@ to_chat(user, "You stamp the paper with your rubber stamp.") if(P.is_hot()) - if(user.has_trait(TRAIT_CLUMSY) && prob(10)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10)) user.visible_message("[user] accidentally ignites [user.p_them()]self!", \ "You miss the paper and accidentally light yourself on fire!") user.dropItemToGround(P) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 73eadfbc45..4b08ccf608 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -1,3 +1,4 @@ + /obj/item/paperplane name = "paper plane" desc = "Paper, folded in the shape of a plane." @@ -10,8 +11,14 @@ resistance_flags = FLAMMABLE max_integrity = 50 + var/hit_probability = 2//% var/obj/item/paper/internalPaper +/obj/item/paperplane/origami + desc = "Paper, masterfully folded in the shape of a plane." + throwforce = 20 //same as throwing stars, but no chance of embedding. + hit_probability = 100 //guaranteed to cause eye damage when it hits a mob. + /obj/item/paperplane/Initialize(mapload, obj/item/paper/newPaper) . = ..() pixel_y = rand(-8, 8) @@ -22,13 +29,18 @@ color = newPaper.color newPaper.forceMove(src) else - internalPaper = new /obj/item/paper(src) + internalPaper = new(src) update_icon() -/obj/item/paperplane/Destroy() - if(internalPaper) - qdel(internalPaper) +/obj/item/paperplane/handle_atom_del(atom/A) + if(A == internalPaper) internalPaper = null + if(!QDELETED(src)) + qdel(src) + return ..() + +/obj/item/paperplane/Destroy() + QDEL_NULL(internalPaper) return ..() /obj/item/paperplane/suicide_act(mob/living/user) @@ -48,7 +60,7 @@ /obj/item/paperplane/attack_self(mob/user) to_chat(user, "You unfold [src].") - var/atom/movable/internal_paper_tmp = internalPaper + var/obj/item/paper/internal_paper_tmp = internalPaper internal_paper_tmp.forceMove(loc) internalPaper = null qdel(src) @@ -65,7 +77,7 @@ update_icon() else if(P.is_hot()) - if(user.has_trait(TRAIT_CLUMSY) && prob(10)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10)) user.visible_message("[user] accidentally ignites [user.p_them()]self!", \ "You miss [src] and accidentally light yourself on fire!") user.dropItemToGround(P) @@ -86,11 +98,18 @@ . = ..(target, range, speed, thrower, FALSE, diagonals_first, callback) /obj/item/paperplane/throw_impact(atom/hit_atom) + if(iscarbon(hit_atom)) + var/mob/living/carbon/C = hit_atom + if(C.can_catch_item(TRUE)) + var/datum/action/innate/origami/origami_action = locate() in C.actions + if(origami_action?.active) //if they're a master of origami and have the ability turned on, force throwmode on so they'll automatically catch the plane. + C.throw_mode_on() + if(..() || !ishuman(hit_atom))//if the plane is caught or it hits a nonhuman return var/mob/living/carbon/human/H = hit_atom - if(prob(2)) - if((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES)) + if(prob(hit_probability)) + if(H.is_eyes_covered()) return visible_message("\The [src] hits [H] in the eye!") H.adjust_blurriness(6) @@ -103,9 +122,15 @@ to_chat(user, "Alt-click [src] to fold it into a paper plane.") /obj/item/paper/AltClick(mob/living/carbon/user, obj/item/I) - if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user), NO_TK)) return to_chat(user, "You fold [src] into the shape of a plane!") user.temporarilyRemoveItemFromInventory(src) - I = new /obj/item/paperplane(user, src) + var/obj/item/paperplane/plane_type = /obj/item/paperplane + //Origami Master + var/datum/action/innate/origami/origami_action = locate() in user.actions + if(origami_action?.active) + plane_type = /obj/item/paperplane/origami + + I = new plane_type(user, src) user.put_in_hands(I) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index c99b094ab0..6125ac9b82 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -151,9 +151,6 @@ /* * Sleepypens */ -/obj/item/pen/sleepy - container_type = OPENCONTAINER - /obj/item/pen/sleepy/attack(mob/living/M, mob/user) if(!istype(M)) @@ -167,7 +164,7 @@ /obj/item/pen/sleepy/Initialize() . = ..() - create_reagents(45) + create_reagents(45, OPENCONTAINER) reagents.add_reagent("chloralhydratedelayed", 20) reagents.add_reagent("mutetoxin", 15) reagents.add_reagent("tirizene", 10) diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index b3f59abfae..8c51fd31ea 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -124,7 +124,7 @@ var/realcooldown = cooldown var/mob/living/carbon/human/H = user - if (H.has_trait(TRAIT_PHOTOGRAPHER)) + if (HAS_TRAIT(H, TRAIT_PHOTOGRAPHER)) realcooldown *= 0.5 addtimer(CALLBACK(src, .proc/cooldown), realcooldown) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7b3b2ba7bd..a3dc6e7394 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -639,7 +639,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai // called when cable_coil is click on an installed obj/cable // or click on a turf that already contains a "node" cable -/obj/item/stack/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user, var/showerror = TRUE) +/obj/item/stack/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user, showerror = TRUE, forceddir) var/turf/U = user.loc if(!isturf(U)) return @@ -654,14 +654,14 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai return - if(U == T) //if clicked on the turf we're standing on, try to put a cable in the direction we're facing + if(U == T && !forceddir) //if clicked on the turf we're standing on and a direction wasn't supplied, try to put a cable in the direction we're facing place_turf(T,user) return var/dirn = get_dir(C, user) - // one end of the clicked cable is pointing towards us - if(C.d1 == dirn || C.d2 == dirn) + // one end of the clicked cable is pointing towards us and no direction was supplied + if((C.d1 == dirn || C.d2 == dirn) && !forceddir) if(!U.can_have_cabling()) //checking if it's a plating or catwalk if (showerror) to_chat(user, "You can only lay cables on catwalks and plating!") @@ -706,7 +706,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai return - // exisiting cable doesn't point at our position, so see if it's a stub + // exisiting cable doesn't point at our position or we have a supplied direction, so see if it's a stub else if(C.d1 == 0) // if so, make it a full cable pointing from it's old direction to our dirn var/nd1 = C.d2 // these will be the new directions diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 9fcdf091a1..3e93d9f42b 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -20,15 +20,15 @@ var/self_recharge = 0 //does it self recharge, over time, or not? var/ratingdesc = TRUE var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it. - container_type = INJECTABLE|DRAINABLE /obj/item/stock_parts/cell/get_cell() return src /obj/item/stock_parts/cell/Initialize(mapload, override_maxcharge) . = ..() - START_PROCESSING(SSobj, src) - create_reagents(5) + if(self_recharge) + START_PROCESSING(SSobj, src) + create_reagents(5, INJECTABLE | DRAINABLE) if (override_maxcharge) maxcharge = override_maxcharge charge = maxcharge @@ -70,8 +70,8 @@ return 100*charge/maxcharge // use power from a cell -/obj/item/stock_parts/cell/use(amount) - if(rigged && amount > 0) +/obj/item/stock_parts/cell/use(amount, can_explode = TRUE) + if(rigged && amount > 0 && can_explode) explode() return 0 if(charge < amount) @@ -104,9 +104,8 @@ return (FIRELOSS) /obj/item/stock_parts/cell/on_reagent_change(changetype) - rigged = !isnull(reagents.has_reagent("plasma", 5)) //has_reagent returns the reagent datum ..() - + rigged = reagents?.has_reagent("plasma", 5) ? TRUE : FALSE //has_reagent returns the reagent datum /obj/item/stock_parts/cell/proc/explode() var/turf/T = get_turf(src.loc) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 1c05b6c11a..b77ea9d13a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -604,7 +604,7 @@ else prot = 1 - if(prot > 0 || user.has_trait(TRAIT_RESISTHEAT) || user.has_trait(TRAIT_RESISTHEATHANDS)) + if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS)) to_chat(user, "You remove the light [fitting].") else if(istype(user) && user.dna.check_mutation(TK)) to_chat(user, "You telekinetically remove the light [fitting].") diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 3b9c3a549b..4159d9898a 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -43,11 +43,10 @@ playsound(src, 'sound/machines/ding.ogg', 50, 1) eject() else - var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES]) - loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= gasdrained - loaded_tank.air_contents.assert_gas(/datum/gas/tritium) - loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] += gasdrained - loaded_tank.air_contents.garbage_collect() + var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma]) + loaded_tank.air_contents.gases[/datum/gas/plasma] -= gasdrained + loaded_tank.air_contents.gases[/datum/gas/tritium] += gasdrained + GAS_GARBAGE_COLLECT(loaded_tank.air_contents.gases) var/power_produced = RAD_COLLECTOR_OUTPUT add_avail(power_produced) @@ -58,11 +57,10 @@ eject() else var/gasdrained = bitcoinproduction_drain*drainratio - loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] -= gasdrained - loaded_tank.air_contents.gases[/datum/gas/oxygen][MOLES] -= gasdrained - loaded_tank.air_contents.assert_gas(/datum/gas/carbon_dioxide) - loaded_tank.air_contents.gases[/datum/gas/carbon_dioxide][MOLES] += gasdrained*2 - loaded_tank.air_contents.garbage_collect() + loaded_tank.air_contents.gases[/datum/gas/tritium] -= gasdrained + loaded_tank.air_contents.gases[/datum/gas/oxygen] -= gasdrained + loaded_tank.air_contents.gases[/datum/gas/carbon_dioxide] += gasdrained*2 + GAS_GARBAGE_COLLECT(loaded_tank.air_contents.gases) var/bitcoins_mined = RAD_COLLECTOR_OUTPUT SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, bitcoins_mined*RAD_COLLECTOR_MINING_CONVERSION_RATE) stored_power-=bitcoins_mined @@ -76,7 +74,6 @@ var/fuel if(loaded_tank) fuel = loaded_tank.air_contents.gases[/datum/gas/plasma] - fuel = fuel ? fuel[MOLES] : 0 investigate_log("turned [active?"on":"off"] by [key_name(user)]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"It is empty"].", INVESTIGATE_SINGULO) return else diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 99b4a3f27e..d87f9821ef 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -351,16 +351,15 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(damage > damage_archived && prob(10)) playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1) - removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen) //calculating gas related values combined_gas = max(removed.total_moles(), 0) - plasmacomp = max(removed.gases[/datum/gas/plasma][MOLES]/combined_gas, 0) - o2comp = max(removed.gases[/datum/gas/oxygen][MOLES]/combined_gas, 0) - co2comp = max(removed.gases[/datum/gas/carbon_dioxide][MOLES]/combined_gas, 0) + plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0) + o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0) + co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0) - n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0) - n2comp = max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0) + n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0) + n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0) gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1) @@ -412,9 +411,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) removed.temperature = max(0, min(removed.temperature, 2500 * dynamic_heat_modifier)) //Calculate how much gas to release - removed.gases[/datum/gas/plasma][MOLES] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0) + removed.gases[/datum/gas/plasma] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0) - removed.gases[/datum/gas/oxygen][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0) + removed.gases[/datum/gas/oxygen] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0) if(produces_gas) env.merge(removed) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 0a54bcab33..bbad3e08b0 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -33,8 +33,8 @@ return /obj/singularity/energy_ball/Destroy() - if(orbiting && istype(orbiting.orbiting, /obj/singularity/energy_ball)) - var/obj/singularity/energy_ball/EB = orbiting.orbiting + if(orbiting && istype(orbiting.parent, /obj/singularity/energy_ball)) + var/obj/singularity/energy_ball/EB = orbiting.parent EB.orbiting_balls -= src for(var/ball in orbiting_balls) @@ -146,12 +146,12 @@ . = ..() /obj/singularity/energy_ball/stop_orbit() - if (orbiting && istype(orbiting.orbiting, /obj/singularity/energy_ball)) - var/obj/singularity/energy_ball/orbitingball = orbiting.orbiting + if (orbiting && istype(orbiting.parent, /obj/singularity/energy_ball)) + var/obj/singularity/energy_ball/orbitingball = orbiting.parent orbitingball.orbiting_balls -= src orbitingball.dissipate_strength = orbitingball.orbiting_balls.len - ..() - if (!loc && !QDELETED(src)) + . = ..() + if (!QDELETED(src)) qdel(src) diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm index d57edf154d..ab463163f0 100644 --- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm +++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm @@ -111,23 +111,23 @@ icon_state = "cshell" projectile_type = /obj/item/projectile/bullet/dart var/reagent_amount = 30 - var/reagent_react = TRUE + +/obj/item/ammo_casing/shotgun/dart/Initialize() + . = ..() + create_reagents(reagent_amount, OPENCONTAINER) + +/obj/item/ammo_casing/shotgun/dart/attackby() + return /obj/item/ammo_casing/shotgun/dart/noreact name = "cryostasis shotgun dart" desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical." icon_state = "cnrshell" reagent_amount = 10 - reagent_react = FALSE -/obj/item/ammo_casing/shotgun/dart/Initialize() +/obj/item/ammo_casing/shotgun/dart/noreact/Initialize() . = ..() - container_type |= OPENCONTAINER - create_reagents(reagent_amount) - reagents.set_reacting(reagent_react) - -/obj/item/ammo_casing/shotgun/dart/attackby() - return + ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) /obj/item/ammo_casing/shotgun/dart/bioterror desc = "A shotgun dart filled with deadly toxins." diff --git a/code/modules/projectiles/ammunition/energy/stun.dm b/code/modules/projectiles/ammunition/energy/stun.dm index 9b24571d12..c9e60ddc1d 100644 --- a/code/modules/projectiles/ammunition/energy/stun.dm +++ b/code/modules/projectiles/ammunition/energy/stun.dm @@ -21,6 +21,7 @@ /obj/item/ammo_casing/energy/disabler projectile_type = /obj/item/projectile/beam/disabler select_name = "disable" - e_cost = 50 + e_cost = 40 fire_sound = 'sound/weapons/taser2.ogg' harmful = FALSE + click_cooldown_override = 3.5 diff --git a/code/modules/projectiles/ammunition/special/syringe.dm b/code/modules/projectiles/ammunition/special/syringe.dm index 4a2a354ca6..d5cba6936f 100644 --- a/code/modules/projectiles/ammunition/special/syringe.dm +++ b/code/modules/projectiles/ammunition/special/syringe.dm @@ -59,3 +59,20 @@ S.forceMove(D) D.injector = S ..() + +/obj/item/ammo_casing/syringegun/dart + name = "used air canister" + desc = "A small canister of compressed gas." + projectile_type = /obj/item/projectile/bullet/dart/syringe/dart + firing_effect_type = null + harmful = FALSE + +/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "") + ..() + var/obj/item/gun/syringe/SG = loc + if(!SG.syringes.len) + return + var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1] + if(S.emptrig == TRUE) + var/obj/item/projectile/bullet/dart/syringe/dart/D = BB + D.emptrig = TRUE diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a7474fd8cb..542e4ecffa 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -162,7 +162,7 @@ //Exclude lasertag guns from the TRAIT_CLUMSY check. if(clumsy_check) if(istype(user)) - if (user.has_trait(TRAIT_CLUMSY) && prob(40)) + if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40)) to_chat(user, "You shoot yourself in the foot with [src]!") var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) process_fire(user, user, FALSE, params, shot_leg) @@ -220,7 +220,7 @@ firing_burst = FALSE return FALSE if(chambered && chambered.BB) - if(user.has_trait(TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal. + if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal. if(chambered.harmful) // Is the bullet chambered harmful? to_chat(user, " [src] is lethally chambered! You don't want to risk harming anyone...") return @@ -259,7 +259,7 @@ var/rand_spr = rand() if(spread) randomized_gun_spread = rand(0,spread) - if(user.has_trait(TRAIT_POOR_AIM)) //nice shootin' tex + if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex bonus_spread += 25 var/randomized_bonus_spread = rand(0, bonus_spread) @@ -269,7 +269,7 @@ addtimer(CALLBACK(src, .proc/process_burst, user, target, message, params, zone_override, sprd, randomized_gun_spread, randomized_bonus_spread, rand_spr, i), fire_delay * (i - 1)) else if(chambered) - if(user.has_trait(TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal. + if(HAS_TRAIT(user, TRAIT_PACIFISM)) // If the user has the pacifist trait, then they won't be able to fire [src] if the round chambered inside of [src] is lethal. if(chambered.harmful) // Is the bullet chambered harmful? to_chat(user, " [src] is lethally chambered! You don't want to risk harming anyone...") return diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 2116f037a3..f455e0f138 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -351,7 +351,7 @@ clumsy_check = 0 /obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user) - if((user.has_trait(TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown")) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown")) return ..() if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD)) user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!") diff --git a/code/modules/projectiles/guns/misc/chem_gun.dm b/code/modules/projectiles/guns/misc/chem_gun.dm index 17e3bd1876..9f65c5ec24 100644 --- a/code/modules/projectiles/guns/misc/chem_gun.dm +++ b/code/modules/projectiles/guns/misc/chem_gun.dm @@ -12,7 +12,6 @@ materials = list(MAT_METAL=2000) clumsy_check = FALSE fire_sound = 'sound/items/syringeproj.ogg' - container_type = OPENCONTAINER var/time_per_syringe = 250 var/syringes_left = 4 var/max_syringes = 4 @@ -22,7 +21,7 @@ . = ..() chambered = new /obj/item/ammo_casing/chemgun(src) START_PROCESSING(SSobj, src) - create_reagents(100) + create_reagents(100, OPENCONTAINER) /obj/item/gun/chem/Destroy() . = ..() diff --git a/code/modules/projectiles/guns/misc/medbeam.dm b/code/modules/projectiles/guns/misc/medbeam.dm index 17c0f63955..7bdefe5e91 100644 --- a/code/modules/projectiles/guns/misc/medbeam.dm +++ b/code/modules/projectiles/guns/misc/medbeam.dm @@ -116,7 +116,7 @@ new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF") target.adjustBruteLoss(-4) target.adjustFireLoss(-4) - target.adjustToxLoss(-1) + target.adjustToxLoss(-1, forced = TRUE) target.adjustOxyLoss(-1) return diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm index cc1b321e3a..26e66b1987 100644 --- a/code/modules/projectiles/guns/misc/syringe_gun.dm +++ b/code/modules/projectiles/guns/misc/syringe_gun.dm @@ -102,3 +102,23 @@ else to_chat(user, "[src] cannot hold more syringes!") return FALSE + +/obj/item/gun/syringe/dart + name = "dart gun" + desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach." + icon_state = "dartgun" + item_state = "dartgun" + materials = list(MAT_METAL=2000, MAT_GLASS=500) + suppressed = TRUE //Softer fire sound + can_unsuppress = FALSE + +/obj/item/gun/syringe/dart/Initialize() + ..() + chambered = new /obj/item/ammo_casing/syringegun/dart(src) + +/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE) + if(istype(A, /obj/item/reagent_containers/syringe/dart)) + ..() + else + to_chat(user, "You can't put the [A] into \the [src]!") + return FALSE diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 3698eb1ede..05d6367306 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -133,7 +133,7 @@ // A gun with ultra-honk pin is useful for clown and useless for everyone else. /obj/item/firing_pin/clown/ultra/pin_auth(mob/living/user) playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1) - if(user && (!(user.has_trait(TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown"))) + if(user && (!(HAS_TRAIT(user, TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown"))) return FALSE return TRUE diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index f4ca82b4e6..cbd0348743 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -74,6 +74,7 @@ flag = "energy" hitsound = 'sound/weapons/tap.ogg' eyeblur = 0 + speed = 0.7 impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser light_color = LIGHT_COLOR_BLUE tracer_type = /obj/effect/projectile/tracer/disabler diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index 023c3b9090..bdbf706448 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -6,15 +6,16 @@ /obj/item/projectile/bullet/dart/Initialize() . = ..() - create_reagents(50) - reagents.set_reacting(FALSE) + create_reagents(50, NO_REACT) -/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE) +/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE) if(iscarbon(target)) var/mob/living/carbon/M = target if(blocked != 100) // not completely blocked if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. ..() + if(skip == TRUE) + return reagents.reaction(M, INJECT) reagents.trans_to(M, reagents.total_volume) return TRUE @@ -24,7 +25,7 @@ "You were protected against \the [src]!") ..(target, blocked) - reagents.set_reacting(TRUE) + DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) reagents.handle_reactions() return TRUE @@ -37,3 +38,44 @@ /obj/item/projectile/bullet/dart/syringe name = "syringe" icon_state = "syringeproj" + +//I am in a mess of my own making +/obj/item/projectile/bullet/dart/syringe/dart + name = "Smartdart" + icon_state = "dartproj" + damage = 0 + var/emptrig = FALSE + +/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE) + if(iscarbon(target)) + var/mob/living/carbon/M = target + if(blocked != 100) + if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. + ..(target, blocked, TRUE) + for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time! + if(istype(R, /datum/reagent/medicine)) //Is this a medicine? + if(M.reagents.has_reagent(R.id)) + if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD? + M.reagents.add_reagent(R.id, R.volume) + else + var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.id)) -1) + M.reagents.add_reagent(R.id, transVol) + else + if(!R.overdose_threshold == 0) + var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1) + M.reagents.add_reagent(R.id, transVol) + else + M.reagents.add_reagent(R.id, R.volume) + + + + target.visible_message("\The [src] beeps!") + to_chat("You feel a tiny prick as a smartdart embeds itself in you with a beep.") + return TRUE + else + blocked = 100 + target.visible_message("\The [src] was deflected!", \ + "You see a [src] bounce off you, booping sadly!") + + target.visible_message("\The [src] fails to land on target!") + return TRUE diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm index c8c4a73b3b..f9aa47c6a3 100644 --- a/code/modules/projectiles/projectile/bullets/shotgun.dm +++ b/code/modules/projectiles/projectile/bullets/shotgun.dm @@ -18,6 +18,7 @@ /obj/item/projectile/bullet/shotgun_stunslug name = "stunslug" damage = 5 + stamina = 20 knockdown = 100 stutter = 5 jitter = 20 diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index af01a0049f..047d50beaf 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -31,7 +31,7 @@ var/mob/living/carbon/C = target if(C.dna && C.dna.check_mutation(HULK)) C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE)) + else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE)) addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5) /obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet diff --git a/code/modules/projectiles/projectile/energy/stun.dm b/code/modules/projectiles/projectile/energy/stun.dm index db1ad403a7..895a165f49 100644 --- a/code/modules/projectiles/projectile/energy/stun.dm +++ b/code/modules/projectiles/projectile/energy/stun.dm @@ -22,7 +22,7 @@ SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK) if(C.dna && C.dna.check_mutation(HULK)) C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") - else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE)) + else if((C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE)) addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5) /obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet diff --git a/code/modules/projectiles/projectile/special/hallucination.dm b/code/modules/projectiles/projectile/special/hallucination.dm index f65ebce51f..5814e7138e 100644 --- a/code/modules/projectiles/projectile/special/hallucination.dm +++ b/code/modules/projectiles/projectile/special/hallucination.dm @@ -170,7 +170,7 @@ hal_target.stuttering += 20 if(hal_target.dna && hal_target.dna.check_mutation(HULK)) hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") - else if((hal_target.status_flags & CANKNOCKDOWN) && !hal_target.has_trait(TRAIT_STUNIMMUNE)) + else if((hal_target.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(hal_target, TRAIT_STUNIMMUNE)) addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5) /obj/item/projectile/hallucination/disabler diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 442ef191a9..dc86ab4e6c 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -21,7 +21,9 @@ if(GLOB.chemical_reactions_list) return - var/paths = subtypesof(/datum/chemical_reaction) + + //Randomized need to go last since they need to check against conflicts with normal recipes + var/paths = subtypesof(/datum/chemical_reaction) - typesof(/datum/chemical_reaction/randomized) + subtypesof(/datum/chemical_reaction/randomized) GLOB.chemical_reactions_list = list() for(var/path in paths) @@ -29,6 +31,9 @@ var/datum/chemical_reaction/D = new path() var/list/reaction_ids = list() + if(!D.id) + continue + if(D.required_reagents && D.required_reagents.len) for(var/reaction in D.required_reagents) reaction_ids += reaction @@ -53,7 +58,7 @@ var/list/datum/reagent/addiction_list = new/list() var/reagents_holder_flags -/datum/reagents/New(maximum=100) +/datum/reagents/New(maximum=100, new_flags) maximum_volume = maximum //I dislike having these here but map-objects are initialised before world/New() is called. >_> @@ -62,6 +67,8 @@ if(!GLOB.chemical_reactions_list) build_chemical_reactions_list() + reagents_holder_flags = new_flags + /datum/reagents/Destroy() . = ..() var/list/cached_reagents = reagent_list @@ -265,6 +272,9 @@ continue if(!C) C = R.holder.my_atom + if(!R.metabolizing) + R.metabolizing = TRUE + R.on_mob_metabolize(C) if(C && R) if(C.reagent_check(R) != 1) if(can_overdose) @@ -311,12 +321,20 @@ C.update_stamina() update_total() - -/datum/reagents/proc/set_reacting(react = TRUE) - if(react) - reagents_holder_flags &= ~(REAGENT_NOREACT) - else - reagents_holder_flags |= REAGENT_NOREACT +//Signals that metabolization has stopped, triggering the end of trait-based effects +/datum/reagents/proc/end_metabolization(mob/living/carbon/C, keep_liverless = TRUE) + var/list/cached_reagents = reagent_list + for(var/reagent in cached_reagents) + var/datum/reagent/R = reagent + if(QDELETED(R.holder)) + continue + if(keep_liverless && R.self_consuming) //Will keep working without a liver + continue + if(!C) + C = R.holder.my_atom + if(R.metabolizing) + R.metabolizing = FALSE + R.on_mob_end_metabolize(C) /datum/reagents/proc/conditional_update_move(atom/A, Running = 0) var/list/cached_reagents = reagent_list @@ -333,11 +351,11 @@ update_total() /datum/reagents/proc/handle_reactions() + if(reagents_holder_flags & NO_REACT) + return //Yup, no reactions here. No siree. var/list/cached_reagents = reagent_list var/list/cached_reactions = GLOB.chemical_reactions_list var/datum/cached_my_atom = my_atom - if(reagents_holder_flags & REAGENT_NOREACT) - return //Yup, no reactions here. No siree. var/reaction_occurred = 0 do @@ -471,6 +489,9 @@ if(R.id == reagent) if(my_atom && isliving(my_atom)) var/mob/living/M = my_atom + if(R.metabolizing) + R.metabolizing = FALSE + R.on_mob_end_metabolize(M) R.on_mob_delete(M) qdel(R) reagent_list -= R @@ -555,7 +576,7 @@ if(!D) WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") return FALSE - + update_total() var/cached_total = total_volume if(cached_total + amount > maximum_volume) @@ -599,9 +620,9 @@ if(data) R.data = data R.on_new(data) - + if(isliving(my_atom)) - R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete + R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete update_total() if(my_atom) my_atom.on_reagent_change(ADD_REAGENT) @@ -800,10 +821,10 @@ // Convenience proc to create a reagents holder for an atom // Max vol is maximum volume of holder -/atom/proc/create_reagents(max_vol) +/atom/proc/create_reagents(max_vol, flags) if(reagents) qdel(reagents) - reagents = new/datum/reagents(max_vol) + reagents = new/datum/reagents(max_vol, flags) reagents.my_atom = src /proc/get_random_reagent_id() // Returns a random reagent ID minus blacklisted reagents diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 10282e5e0a..8b18eb7805 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -9,7 +9,6 @@ interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE resistance_flags = FIRE_PROOF | ACID_PROOF circuit = /obj/item/circuitboard/machine/chem_dispenser - var/cell_type = /obj/item/stock_parts/cell/high var/obj/item/stock_parts/cell/cell var/powerefficiency = 0.1 var/amount = 30 @@ -52,7 +51,8 @@ //these become available once upgraded. var/list/upgrade_reagents = list( "oil", - "ammonia" + "ammonia", + "ash" ) var/list/upgrade_reagents2 = list( @@ -79,7 +79,6 @@ /obj/machinery/chem_dispenser/Initialize() . = ..() - cell = new cell_type dispensable_reagents = sortList(dispensable_reagents) update_icon() @@ -250,13 +249,8 @@ work_animation() . = TRUE if("eject") - if(beaker) - beaker.forceMove(drop_location()) - if(Adjacent(usr) && !issilicon(usr)) - usr.put_in_hands(beaker) - beaker = null - update_icon() - . = TRUE + replace_beaker(usr) + . = TRUE //no afterattack if("dispense_recipe") if(!is_operational() || QDELETED(cell)) return @@ -269,7 +263,7 @@ if(beaker && dispensable_reagents.Find(r_id)) // but since we verify we have the reagent, it'll be fine var/datum/reagents/R = beaker.reagents var/free = R.maximum_volume - R.total_volume - var/actual = min(round(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free) + var/actual = min(max(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free) if(actual) if(!cell.use(actual / powerefficiency)) say("Not enough energy to complete operation!") @@ -322,14 +316,12 @@ return if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container()) var/obj/item/reagent_containers/B = I - . = 1 //no afterattack - if(beaker) - to_chat(user, "A container is already loaded into [src]!") - return + . = TRUE //no afterattack if(!user.transferItemToLoc(B, src)) return - beaker = B + replace_beaker(user, B) to_chat(user, "You add [B] to [src].") + updateUsrDialog() update_icon() else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag)) to_chat(user, "You can't load [I] into [src]!") @@ -381,7 +373,17 @@ dispensable_reagents |= upgrade_reagents3 powerefficiency = round(newpowereff, 0.01) - +/obj/machinery/chem_dispenser/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) + if(beaker) + beaker.forceMove(drop_location()) + if(user && Adjacent(user) && !issiliconoradminghost(user)) + user.put_in_hands(beaker) + if(new_beaker) + beaker = new_beaker + else + beaker = null + update_icon() + return TRUE /obj/machinery/chem_dispenser/on_deconstruction() cell = null @@ -417,6 +419,12 @@ final_list += list(avoid_assoc_duplicate_keys(fuck[1],key_list) = text2num(fuck[2])) return final_list +/obj/machinery/chem_dispenser/AltClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + replace_beaker(user) + return + /obj/machinery/chem_dispenser/drinks/Initialize() . = ..() AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE) @@ -480,9 +488,16 @@ "tomatojuice", "lemonjuice", "menthol" - ) //prevents the soda machine from obtaining chemical upgrades. . - upgrade_reagents = null - upgrade_reagents2 = null + ) + upgrade_reagents = list( + "mushroomhallucinogen", + "nothing", + "cryoxadone" + ) + upgrade_reagents2 = list( + "banana", + "berryjuice" + ) upgrade_reagents3 = null emagged_reagents = list( "thirteenloko", @@ -535,18 +550,19 @@ "creme_de_cacao", "triple_sec", "sake" - )//prevents the booze machine from obtaining chemical upgrades. - upgrade_reagents = null + ) + upgrade_reagents = list( + "ethanol", + "fernet" + ) upgrade_reagents2 = null upgrade_reagents3 = null emagged_reagents = list( - "ethanol", "iron", "alexander", "clownstears", "minttoxin", "atomicbomb", - "fernet", "aphro", "aphro+" ) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index e4c6966cff..a17b1e8190 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -28,13 +28,23 @@ else icon_state = "mixer0b" -/obj/machinery/chem_heater/proc/eject_beaker(mob/user) +/obj/machinery/chem_heater/AltClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + replace_beaker(user) + return + +/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) if(beaker) beaker.forceMove(drop_location()) - if(Adjacent(user) && !issilicon(user)) + if(user && Adjacent(user) && !issiliconoradminghost(user)) user.put_in_hands(beaker) + if(new_beaker) + beaker = new_beaker + else beaker = null update_icon() + return TRUE /obj/machinery/chem_heater/RefreshParts() heater_coefficient = 0.1 @@ -58,21 +68,19 @@ return if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container()) - . = 1 //no afterattack - if(beaker) - to_chat(user, "A container is already loaded into [src]!") + . = TRUE //no afterattack + var/obj/item/reagent_containers/B = I + if(!user.transferItemToLoc(B, src)) return - - if(!user.transferItemToLoc(I, src)) - return - beaker = I - to_chat(user, "You add [I] to [src].") + replace_beaker(user, B) + to_chat(user, "You add [B] to [src].") + updateUsrDialog() update_icon() return return ..() /obj/machinery/chem_heater/on_deconstruction() - eject_beaker() + replace_beaker() return ..() /obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ @@ -122,5 +130,5 @@ target_temperature = CLAMP(target, 0, 1000) if("eject") on = FALSE - eject_beaker(usr) + replace_beaker(usr) . = TRUE diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 6327c5ba3a..aeed5ffc37 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -60,16 +60,6 @@ else icon_state = "mixer0" -/obj/machinery/chem_master/proc/eject_beaker(mob/user) - if(beaker) - beaker.forceMove(drop_location()) - if(Adjacent(user) && !issilicon(user)) - user.put_in_hands(beaker) - else - adjust_item_drop_location(beaker) - beaker = null - update_icon() - /obj/machinery/chem_master/blob_act(obj/structure/blob/B) if (prob(50)) qdel(src) @@ -85,36 +75,49 @@ return if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container()) - . = 1 // no afterattack + . = TRUE // no afterattack if(panel_open) to_chat(user, "You can't use the [src.name] while its panel is opened!") return - if(beaker) - to_chat(user, "A container is already loaded into [src]!") + var/obj/item/reagent_containers/B = I + if(!user.transferItemToLoc(B, src)) return - if(!user.transferItemToLoc(I, src)) - return - - beaker = I - to_chat(user, "You add [I] to [src].") - src.updateUsrDialog() + replace_beaker(user, B) + to_chat(user, "You add [B] to [src].") + updateUsrDialog() update_icon() - else if(!condi && istype(I, /obj/item/storage/pill_bottle)) if(bottle) to_chat(user, "A pill bottle is already loaded into [src]!") return if(!user.transferItemToLoc(I, src)) return - bottle = I to_chat(user, "You add [I] into the dispenser slot.") - src.updateUsrDialog() + updateUsrDialog() else return ..() +/obj/machinery/chem_master/AltClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + replace_beaker(user) + return + +/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) + if(beaker) + beaker.forceMove(drop_location()) + if(user && Adjacent(user) && !issiliconoradminghost(user)) + user.put_in_hands(beaker) + if(new_beaker) + beaker = new_beaker + else + beaker = null + update_icon() + return TRUE + /obj/machinery/chem_master/on_deconstruction() - eject_beaker() + replace_beaker(usr) if(bottle) bottle.forceMove(drop_location()) adjust_item_drop_location(bottle) @@ -164,7 +167,7 @@ return switch(action) if("eject") - eject_beaker(usr) + replace_beaker(usr) . = TRUE if("ejectp") diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 5c39cd9db2..1847f1f722 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -19,6 +19,12 @@ var/speed = 1 var/list/holdingitems + var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine") + var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject") + var/static/radial_grind = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_grind") + var/static/radial_juice = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_juice") + var/static/radial_mix = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_mix") + /obj/machinery/reagentgrinder/Initialize() . = ..() holdingitems = list() @@ -51,7 +57,6 @@ if(A == beaker) beaker = null update_icon() - updateUsrDialog() if(holdingitems[A]) holdingitems -= A @@ -67,6 +72,18 @@ else icon_state = "juicer0" +/obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) + if(beaker) + beaker.forceMove(drop_location()) + if(user && Adjacent(user) && !issiliconoradminghost(user)) + user.put_in_hands(beaker) + if(new_beaker) + beaker = new_beaker + else + beaker = null + update_icon() + return TRUE + /obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) //You can only screw open empty grinder if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I)) @@ -82,17 +99,14 @@ return TRUE if (istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container()) - if (!beaker) - if(!user.transferItemToLoc(I, src)) - to_chat(user, "[I] is stuck to your hand!") - return TRUE - to_chat(user, "You slide [I] into [src].") - beaker = I - update_icon() - updateUsrDialog() - else - to_chat(user, "There's already a container inside [src].") - return TRUE //no afterattack + var/obj/item/reagent_containers/B = I + . = TRUE + if(!user.transferItemToLoc(B, src)) + return + replace_beaker(user, B) + to_chat(user, "You add [B] to [src].") + update_icon() + return if(holdingitems.len >= limit) to_chat(user, "[src] is filled to capacity!") @@ -108,8 +122,6 @@ to_chat(user, "You empty [I] into [src].") else to_chat(user, "You fill [src] to the brim.") - - updateUsrDialog() return TRUE if(!I.grind_results && !I.juice_results) @@ -125,104 +137,89 @@ if(user.transferItemToLoc(I, src)) to_chat(user, "You add [I] to [src].") holdingitems[I] = TRUE - updateUsrDialog() return FALSE /obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave . = ..() - var/is_chamber_empty = FALSE - var/is_beaker_ready = FALSE - var/processing_chamber = "" - var/beaker_contents = "" - var/dat = "" - if(!operating) - for (var/i in holdingitems) - var/obj/item/O = i - processing_chamber += "\A [O.name]
" + if(operating || !user.canUseTopic(src, !issilicon(user))) + return - if (!processing_chamber) - is_chamber_empty = TRUE - processing_chamber = "Nothing." - if (!beaker) - beaker_contents = "No beaker attached.
" - else - is_beaker_ready = TRUE - beaker_contents = "The beaker contains:
" - var/anything = FALSE - for(var/datum/reagent/R in beaker.reagents.reagent_list) - anything = TRUE - beaker_contents += "[R.volume] - [R.name]
" - if(!anything) - beaker_contents += "Nothing
" + var/list/options = list() - dat = {" - Processing chamber contains:
- [processing_chamber]
- [beaker_contents]
- "} - if (is_beaker_ready) - if(!is_chamber_empty && !(stat & (NOPOWER|BROKEN))) - dat += "Grind the reagents
" - dat += "Juice the reagents

" - else if (beaker.reagents.total_volume) - dat += "Mix the reagents

" - if(length(holdingitems)) - dat += "Eject the reagents
" - if(beaker) - dat += "Detach the beaker
" + if(beaker || length(holdingitems)) + options["eject"] = radial_eject + + if(isAI(user)) + if(stat & NOPOWER) + return + options["examine"] = radial_examine + + // if there is no power or it's broken, the procs will fail but the buttons will still show + if(length(holdingitems)) + options["grind"] = radial_grind + options["juice"] = radial_juice + else if(beaker?.reagents.total_volume) + options["mix"] = radial_mix + + var/choice + + if(length(options) < 1) + return + if(length(options) == 1) + for(var/key in options) + choice = key else - dat += "Please wait..." + choice = show_radial_menu(user, src, options, require_near = !issilicon(user)) - var/datum/browser/popup = new(user, "reagentgrinder", "All-In-One Grinder") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) - popup.open(1) - return + // post choice verification + if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user))) + return -/obj/machinery/reagentgrinder/Topic(href, href_list) - if(..()) - return - var/mob/user = usr - if(!user.canUseTopic(src)) - return - if(stat & (NOPOWER|BROKEN)) - return - user.set_machine(src) - if(operating) - updateUsrDialog() - return - switch(href_list["action"]) - if ("grind") + switch(choice) + if("eject") + eject(user) + if("grind") grind(user) if("juice") juice(user) if("mix") mix(user) - if("eject") - eject(user) - if("detach") - detach(user) - updateUsrDialog() + if("examine") + examine(user) -/obj/machinery/reagentgrinder/proc/detach(mob/user) - if(!beaker) +/obj/machinery/reagentgrinder/examine(mob/user) + . = ..() + if(!in_range(user, src) && !issilicon(user) && !isobserver(user)) + to_chat(user, "You're too far away to examine [src]'s contents and display!") return - beaker.forceMove(drop_location()) - if(Adjacent(user) && !issilicon(user)) - user.put_in_hands(beaker) - beaker = null - update_icon() - updateUsrDialog() + + if(operating) + to_chat(user, "\The [src] is operating.") + return + + if(beaker || length(holdingitems)) + to_chat(user, "\The [src] contains:") + if(beaker) + to_chat(user, "- \A [beaker].") + for(var/i in holdingitems) + var/obj/item/O = i + to_chat(user, "- \A [O.name].") + + if(!(stat & (NOPOWER|BROKEN))) + to_chat(user, "The status display reads:") + to_chat(user, "- Grinding reagents at [speed*100]%.") + if(beaker) + for(var/datum/reagent/R in beaker.reagents.reagent_list) + to_chat(user, "- [R.volume] units of [R.name].") /obj/machinery/reagentgrinder/proc/eject(mob/user) - if(!length(holdingitems)) - return for(var/i in holdingitems) var/obj/item/O = i O.forceMove(drop_location()) holdingitems -= O - updateUsrDialog() + if(beaker) + replace_beaker(user) /obj/machinery/reagentgrinder/proc/remove_object(obj/item/O) holdingitems -= O @@ -240,7 +237,6 @@ /obj/machinery/reagentgrinder/proc/operate_for(time, silent = FALSE, juicing = FALSE) shake_for(time / speed) - updateUsrDialog() operating = TRUE if(!silent) if(!juicing) @@ -251,11 +247,10 @@ /obj/machinery/reagentgrinder/proc/stop_operating() operating = FALSE - updateUsrDialog() /obj/machinery/reagentgrinder/proc/juice() power_change() - if(!beaker || (beaker && (beaker.reagents.total_volume >= beaker.reagents.maximum_volume))) + if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume) return operate_for(50, juicing = TRUE) for(var/obj/item/i in holdingitems) @@ -274,7 +269,7 @@ /obj/machinery/reagentgrinder/proc/grind() power_change() - if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) + if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume) return operate_for(60) for(var/i in holdingitems) @@ -296,13 +291,13 @@ /obj/machinery/reagentgrinder/proc/mix(mob/user) //For butter and other things that would change upon shaking or mixing power_change() - if(!beaker) + if(!beaker || stat & (NOPOWER|BROKEN)) return operate_for(50, juicing = TRUE) addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50) /obj/machinery/reagentgrinder/proc/mix_complete() - if(beaker && beaker.reagents.total_volume) + if(beaker?.reagents.total_volume) //Recipe to make Butter var/butter_amt = FLOOR(beaker.reagents.get_reagent_amount("milk") / MILK_TO_BUTTER_COEFF, 1) beaker.reagents.remove_reagent("milk", MILK_TO_BUTTER_COEFF * butter_amt) diff --git a/code/modules/reagents/chemistry/readme.md b/code/modules/reagents/chemistry/readme.md index 9a9be7c5a6..20dce0e72e 100644 --- a/code/modules/reagents/chemistry/readme.md +++ b/code/modules/reagents/chemistry/readme.md @@ -230,7 +230,7 @@ By default, all atom have a reagents var - but its empty. if you want to use an 'pouring' our reagents into something else. atom/proc/is_open_container() - Checks obj/var/container_type & OPENCONTAINER. + Checks atom/var/reagents.reagents_holder_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 diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index a52bb1ecfe..9bfbffd330 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -33,6 +33,10 @@ var/addiction_stage4_end = 40 var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick. var/self_consuming = FALSE + var/metabolizing = FALSE + + + /datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references . = ..() @@ -68,6 +72,14 @@ /datum/reagent/proc/on_mob_delete(mob/living/L) return +// Called when this reagent first starts being metabolized by a liver +/datum/reagent/proc/on_mob_metabolize(mob/living/L) + return + +// Called when this reagent stops being metabolized by a liver +/datum/reagent/proc/on_mob_end_metabolize(mob/living/L) + return + /datum/reagent/proc/on_move(mob/M) return diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 92d9da401b..80e195d5ac 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -37,7 +37,7 @@ All effects don't start immediately, but rather get worse over time; the rate is /datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C) if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) var/booze_power = boozepwr - if(C.has_trait(TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker + if(HAS_TRAIT(C, TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker booze_power *= 0.7 C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER) @@ -111,7 +111,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY) return ..() -/datum/reagent/consumable/ethanol/beer/green/on_mob_delete(mob/living/M) +/datum/reagent/consumable/ethanol/beer/green/on_mob_end_metabolize(mob/living/M) M.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, color) /datum/reagent/consumable/ethanol/kahlua @@ -129,7 +129,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.dizziness = max(0,M.dizziness-5) M.drowsyness = max(0,M.drowsyness-3) M.AdjustSleeping(-40, FALSE) - if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE)) M.Jitter(5) ..() . = 1 @@ -165,7 +165,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.drowsyness = max(0,M.drowsyness-7) M.AdjustSleeping(-40) M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL) - if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE)) M.Jitter(5) return ..() @@ -186,7 +186,7 @@ All effects don't start immediately, but rather get worse over time; the rate is to_chat(M, "[pick("You have a really bad headache.", "Your eyes hurt.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]") if(prob(5) && iscarbon(M)) - if(M.has_trait(TRAIT_BLIND)) + if(HAS_TRAIT(M, TRAIT_BLIND)) var/obj/item/organ/eyes/eye = M.getorganslot(ORGAN_SLOT_EYES) if(istype(eye)) eye.Remove(M) @@ -364,7 +364,7 @@ All effects don't start immediately, but rather get worse over time; the rate is shot_glass_icon_state = "shotglassgreen" /datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/carbon/M) - if(prob(10) && !M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(prob(10) && !HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE)) M.hallucination += 4 //Reference to the urban myth ..() @@ -569,13 +569,13 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Tequila and Coffee liqueur, brought together in a mouthwatering mixture. Drink up." var/tough_text -/datum/reagent/consumable/ethanol/brave_bull/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/brave_bull/on_mob_metabolize(mob/living/M) tough_text = pick("brawny", "tenacious", "tough", "hardy", "sturdy") //Tuff stuff to_chat(M, "You feel [tough_text]!") M.maxHealth += 10 //Brave Bull makes you sturdier, and thus capable of withstanding a tiny bit more punishment. M.health += 10 -/datum/reagent/consumable/ethanol/brave_bull/on_mob_delete(mob/living/M) +/datum/reagent/consumable/ethanol/brave_bull/on_mob_end_metabolize(mob/living/M) to_chat(M, "You no longer feel [tough_text].") M.maxHealth -= 10 M.health = min(M.health - 10, M.maxHealth) //This can indeed crit you if you're alive solely based on alchol ingestion @@ -593,7 +593,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." var/obj/effect/light_holder -/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_metabolize(mob/living/M) to_chat(M, "You feel gentle warmth spread through your body!") light_holder = new(M) light_holder.set_light(3, 0.7, "#FFCC00") //Tequila Sunrise makes you radiate dim light, like a sunrise! @@ -605,7 +605,7 @@ All effects don't start immediately, but rather get worse over time; the rate is light_holder.forceMove(M) return ..() -/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_delete(mob/living/M) +/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_end_metabolize(mob/living/M) to_chat(M, "The warmth in your body fades.") QDEL_NULL(light_holder) @@ -640,7 +640,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." /datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/carbon/M) - if(M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE)) M.Stun(30, 0) //this realistically does nothing to prevent chainstunning but will cause them to recover faster once it's out of their system else M.Stun(40, 0) @@ -671,10 +671,10 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "A manly concoction made from Ale and Beer. Intended for true men only." var/dorf_mode -/datum/reagent/consumable/ethanol/manly_dorf/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.dna.check_mutation(DWARFISM) || H.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE)) to_chat(H, "Now THAT is MANLY!") boozepwr = 5 //We've had worse in the mines dorf_mode = TRUE @@ -722,7 +722,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "Kahlua, Irish Cream, and cognac. You will get bombed." shot_glass_icon_state = "b52glass" -/datum/reagent/consumable/ethanol/b52/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/b52/on_mob_metabolize(mob/living/M) playsound(M, 'sound/effects/explosion_distant.ogg', 100, FALSE) /datum/reagent/consumable/ethanol/irishcoffee @@ -1274,7 +1274,7 @@ All effects don't start immediately, but rather get worse over time; the rate is /datum/reagent/consumable/ethanol/atomicbomb/on_mob_life(mob/living/carbon/M) M.set_drugginess(50) - if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) + if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE)) M.confused = max(M.confused+2,0) M.Dizzy(10) M.slurring = max(M.slurring,50) @@ -1534,7 +1534,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "If you're feeling low, count on the buttery flavor of our own bastion bourbon." shot_glass_icon_state = "shotglassgreen" -/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_add(mob/living/L) +/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_metabolize(mob/living/L) var/heal_points = 10 if(L.health <= 0) heal_points = 20 //heal more if we're in softcrit @@ -1618,7 +1618,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_name = "Crevice Spike" glass_desc = "It'll either knock the drunkenness out of you or knock you out cold. Both, probably." -/datum/reagent/consumable/ethanol/crevice_spike/on_mob_add(mob/living/L) //damage only applies when drink first enters system and won't again until drink metabolizes out +/datum/reagent/consumable/ethanol/crevice_spike/on_mob_metabolize(mob/living/L) //damage only applies when drink first enters system and won't again until drink metabolizes out L.adjustBruteLoss(3 * min(5,volume)) //minimum 3 brute damage on ingestion to limit non-drink means of injury - a full 5 unit gulp of the drink trucks you for the full 15 /datum/reagent/consumable/ethanol/sake @@ -1661,7 +1661,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "A creamy, indulgent delight that is stronger than it seems." var/obj/item/shield/mighty_shield -/datum/reagent/consumable/ethanol/alexander/on_mob_add(mob/living/L) +/datum/reagent/consumable/ethanol/alexander/on_mob_metabolize(mob/living/L) if(ishuman(L)) var/mob/living/carbon/human/thehuman = L for(var/obj/item/shield/theshield in thehuman.contents) @@ -1675,7 +1675,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(mighty_shield && !(mighty_shield in L.contents)) //If you had a shield and lose it, you lose the reagent as well. Otherwise this is just a normal drink. L.reagents.del_reagent("alexander") -/datum/reagent/consumable/ethanol/alexander/on_mob_delete(mob/living/L) +/datum/reagent/consumable/ethanol/alexander/on_mob_end_metabolize(mob/living/L) if(mighty_shield) mighty_shield.block_chance -= 10 to_chat(L,"You notice [mighty_shield] looks worn again. Weird.") @@ -1796,7 +1796,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.overeatduration = 0 return ..() -/datum/reagent/consumable/ethanol/fanciulli/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/fanciulli/on_mob_metabolize(mob/living/M) if(M.health > 0) M.adjustStaminaLoss(20) . = TRUE @@ -1820,7 +1820,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.adjust_bodytemperature(-20 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C) return ..() -/datum/reagent/consumable/ethanol/branca_menta/on_mob_add(mob/living/M) +/datum/reagent/consumable/ethanol/branca_menta/on_mob_metabolize(mob/living/M) if(M.health > 0) M.adjustStaminaLoss(35) . = TRUE diff --git a/code/modules/reagents/chemistry/reagents/blob_reagents.dm b/code/modules/reagents/chemistry/reagents/blob_reagents.dm index 8ee9449468..af85b6b35f 100644 --- a/code/modules/reagents/chemistry/reagents/blob_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/blob_reagents.dm @@ -204,7 +204,7 @@ C.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest ..() -/datum/reagent/blob/regenerative_materia/on_mob_delete(mob/living/M) +/datum/reagent/blob/regenerative_materia/on_mob_end_metabolize(mob/living/M) if(iscarbon(M)) var/mob/living/carbon/N = M N.hal_screwyhud = 0 diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 6ec37f3ec4..d2ca7d0c87 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -213,15 +213,15 @@ glass_desc = "White and nutritious goodness!" /datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M) - if(M.getBruteLoss() && prob(20)) - M.heal_bodypart_damage(1,0, 0) + if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER)) + M.heal_bodypart_damage(1.5,0, 0) . = 1 + else + if(M.getBruteLoss() && prob(20)) + M.heal_bodypart_damage(1,0, 0) + . = 1 if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 2) - var/datum/dna/Mdna = M.has_dna() - if(Mdna && Mdna.species && (Mdna.species.id == "plasmaman" || Mdna.species.id == "skeleton")) - M.heal_bodypart_damage(1,0, 0) - . = 1 ..() /datum/reagent/consumable/soymilk @@ -390,12 +390,12 @@ glass_name = "glass of Nuka Cola" glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland." -/datum/reagent/consumable/nuka_cola/on_mob_add(mob/living/L) +/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_GOTTAGOFAST, id) + ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id) -/datum/reagent/consumable/nuka_cola/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_GOTTAGOFAST, id) +/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id) ..() /datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M) diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index d77756a649..a4586dd997 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -5,7 +5,7 @@ taste_description = "bitterness" var/trippy = TRUE //Does this drug make you trip? -/datum/reagent/drug/on_mob_delete(mob/living/M) +/datum/reagent/drug/on_mob_end_metabolize(mob/living/M) if(trippy) SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "[id]_high") @@ -164,13 +164,16 @@ overdose_threshold = 20 addiction_threshold = 10 metabolization_rate = 0.75 * REAGENTS_METABOLISM + var/brain_damage = TRUE + var/jitter = TRUE + var/confusion = TRUE -/datum/reagent/drug/methamphetamine/on_mob_add(mob/living/L) +/datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_IGNORESLOWDOWN, id) + L.ignore_slowdown(id) -/datum/reagent/drug/methamphetamine/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_IGNORESLOWDOWN, id) +/datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L) + L.unignore_slowdown(id) ..() /datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M) @@ -181,10 +184,10 @@ M.AdjustKnockdown(-40, 0) M.AdjustUnconscious(-40, 0) M.adjustStaminaLoss(-7.5 * REM, 0) - M.Jitter(2) - M.adjustBrainLoss(rand(1,4)) - if(prob(30)) - M.confused = max(1, M.confused) + if(jitter) + M.Jitter(2) + if(brain_damage) + M.adjustBrainLoss(rand(1,4)) M.heal_overall_damage(2, 2) if(prob(5)) M.emote(pick("twitch", "shiver")) @@ -240,6 +243,14 @@ ..() . = 1 +/datum/reagent/drug/methamphetamine/changeling + id = "changelingmeth" + name = "Changeling Adrenaline" + addiction_threshold = 35 + overdose_threshold = 35 + jitter = FALSE + brain_damage = FALSE + /datum/reagent/drug/bath_salts name = "Bath Salts" id = "bath_salts" @@ -251,18 +262,18 @@ taste_description = "salt" // because they're bathsalts? var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage -/datum/reagent/drug/bath_salts/on_mob_add(mob/living/L) +/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_STUNIMMUNE, id) - L.add_trait(TRAIT_SLEEPIMMUNE, id) + ADD_TRAIT(L, TRAIT_STUNIMMUNE, id) + ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id) if(iscarbon(L)) var/mob/living/carbon/C = L rage = new() C.gain_trauma(rage, TRAUMA_RESILIENCE_ABSOLUTE) -/datum/reagent/drug/bath_salts/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_STUNIMMUNE, id) - L.remove_trait(TRAIT_SLEEPIMMUNE, id) +/datum/reagent/drug/bath_salts/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id) + REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id) if(rage) QDEL_NULL(rage) ..() @@ -370,9 +381,9 @@ addiction_stage3_end = 40 addiction_stage4_end = 240 -/datum/reagent/drug/skooma/on_mob_add(mob/living/L) +/datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L) . = ..() - L.add_trait(TRAIT_GOTTAGOFAST, id) + ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id) L.next_move_modifier *= 2 if(ishuman(L)) var/mob/living/carbon/human/H = L @@ -381,9 +392,9 @@ if(H.dna && H.dna.species) H.dna.species.punchdamagehigh *= 5 -/datum/reagent/drug/skooma/on_mob_delete(mob/living/L) +/datum/reagent/drug/skooma/on_mob_end_metabolize(mob/living/L) . = ..() - L.remove_trait(TRAIT_GOTTAGOFAST, id) + REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id) L.next_move_modifier *= 0.5 if(ishuman(L)) var/mob/living/carbon/human/H = L diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index a65a1f4adb..38db62fd2a 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -22,7 +22,7 @@ /datum/reagent/consumable/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(method == INGEST) - if (quality && !M.has_trait(TRAIT_AGEUSIA)) + if (quality && !HAS_TRAIT(M, TRAIT_AGEUSIA)) switch(quality) if (DRINK_NICE) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_nice) @@ -32,6 +32,8 @@ SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood) if (DRINK_FANTASTIC) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic) + if (FOOD_AMAZING) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_food", /datum/mood_event/amazingtaste) return ..() /datum/reagent/consumable/nutriment @@ -401,7 +403,7 @@ metabolization_rate = 0.2 * REAGENTS_METABOLISM taste_description = "mushroom" -/datum/reagent/mushroomhallucinogen/on_mob_life(mob/living/carbon/M) +/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M) M.slurring = max(M.slurring,50) switch(current_cycle) if(1 to 5) @@ -686,7 +688,7 @@ /datum/reagent/consumable/tinlux/reaction_mob(mob/living/M) M.set_light(2) -/datum/reagent/consumable/tinlux/on_mob_delete(mob/living/M) +/datum/reagent/consumable/tinlux/on_mob_end_metabolize(mob/living/M) M.set_light(-2) /datum/reagent/consumable/vitfro @@ -711,3 +713,14 @@ nutriment_factor = 5 * REAGENTS_METABOLISM color = "#eef442" // rgb: 238, 244, 66 taste_description = "mournful honking" + +/datum/reagent/consumable/secretsauce + name = "secret sauce" + id = "secret_sauce" + description = "What could it be." + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#792300" + taste_description = "indescribable" + quality = FOOD_AMAZING + taste_mult = 100 + can_synth = FALSE diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 3970e8157b..ed441504a5 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -44,7 +44,7 @@ M.adjustToxLoss(-5, 0, TRUE) M.hallucination = 0 M.setBrainLoss(0) - M.remove_all_traits() + REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT)) M.set_blurriness(0) M.set_blindness(0) M.SetKnockdown(0, 0) @@ -136,7 +136,7 @@ M.adjustFireLoss(-power, 0) M.adjustToxLoss(-power, 0, TRUE) //heals TOXINLOVERs M.adjustCloneLoss(-power, 0) - M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration + REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration . = 1 metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5) ..() @@ -152,7 +152,7 @@ /datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M) if(M.bodytemperature < T0C) M.adjustCloneLoss(0.00006 * (M.bodytemperature ** 2) - 6, 0) - M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) . = 1 metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75) ..() @@ -182,7 +182,7 @@ M.adjustFireLoss(-1.5 * power, 0) M.adjustToxLoss(-power, 0, TRUE) M.adjustCloneLoss(-power, 0) - M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) . = 1 ..() @@ -198,7 +198,7 @@ /datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M) M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. M.heal_bodypart_damage(1,1) - M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) ..() . = 1 @@ -366,7 +366,7 @@ to_chat(M, "You feel your wounds fade away to nothing!" ) ..() -/datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M) +/datum/reagent/medicine/mine_salve/on_mob_end_metabolize(mob/living/M) if(iscarbon(M)) var/mob/living/carbon/N = M N.hal_screwyhud = SCREWYHUD_NONE @@ -483,16 +483,24 @@ reagent_state = LIQUID color = "#E6FFF0" metabolization_rate = 0.5 * REAGENTS_METABOLISM + var/healtoxinlover = FALSE /datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M) M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/50 - M.adjustToxLoss(-2*REM, 0) + M.adjustToxLoss(-2*REM, 0, healtoxinlover) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,2) ..() . = 1 +/datum/reagent/medicine/pen_acid/pen_jelly + name = "Pentetic Jelly" + id = "pen_jelly" + description = "Reduces massive amounts of radiation and toxin damage while purging other chemicals from the body. Slimepeople friendly!" + color = "#91D865" + healtoxinlover = TRUE + /datum/reagent/medicine/sal_acid name = "Salicyclic Acid" id = "sal_acid" @@ -630,12 +638,12 @@ overdose_threshold = 30 addiction_threshold = 25 -/datum/reagent/medicine/morphine/on_mob_add(mob/living/L) +/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_IGNORESLOWDOWN, id) + L.ignore_slowdown(id) -/datum/reagent/medicine/morphine/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_IGNORESLOWDOWN, id) +/datum/reagent/medicine/morphine/on_mob_end_metabolize(mob/living/L) + L.unignore_slowdown(id) ..() /datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M) @@ -702,14 +710,14 @@ var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return - if(M.has_trait(TRAIT_BLIND, EYE_DAMAGE)) + if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE)) if(prob(20)) to_chat(M, "Your vision slowly returns...") M.cure_blind(EYE_DAMAGE) M.cure_nearsighted(EYE_DAMAGE) M.blur_eyes(35) - else if(M.has_trait(TRAIT_NEARSIGHT, EYE_DAMAGE)) + else if(HAS_TRAIT_FROM(M, TRAIT_NEARSIGHT, EYE_DAMAGE)) to_chat(M, "The blackness in your peripheral vision fades.") M.cure_nearsighted(EYE_DAMAGE) M.blur_eyes(10) @@ -800,7 +808,7 @@ M.visible_message("[M]'s body convulses a bit, and then falls still once more.") return M.visible_message("[M]'s body convulses a bit.") - if(!M.suiciding && !(M.has_trait(TRAIT_NOCLONE)) && !M.hellbound) + if(!M.suiciding && !(HAS_TRAIT(M, TRAIT_NOCLONE)) && !M.hellbound) if(!M) return if(M.notify_ghost_cloning(source = M)) @@ -875,12 +883,12 @@ metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 60 -/datum/reagent/medicine/stimulants/on_mob_add(mob/living/L) +/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_GOTTAGOFAST, id) + ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id) -/datum/reagent/medicine/stimulants/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_GOTTAGOFAST, id) +/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id) ..() /datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M) @@ -1102,7 +1110,7 @@ M.adjustBruteLoss(-3 * REM, 0) M.adjustFireLoss(-3 * REM, 0) M.adjustOxyLoss(-15 * REM, 0) - M.adjustToxLoss(-3 * REM, 0) + M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS M.adjustBrainLoss(2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that! M.adjustCloneLoss(-1 * REM, 0) M.adjustStaminaLoss(-30 * REM, 0) @@ -1113,7 +1121,7 @@ /datum/reagent/medicine/earthsblood/overdose_process(mob/living/M) M.hallucination = min(max(0, M.hallucination + 5), 60) - M.adjustToxLoss(5 * REM, 0) + M.adjustToxLoss(8 * REM, 0, TRUE) //Hurts TOXINLOVERS ..() . = 1 @@ -1171,6 +1179,7 @@ M.AdjustUnconscious(-20, 0) M.AdjustStun(-20, 0) M.AdjustKnockdown(-20, 0) + M.AdjustSleeping(-20, 0) M.adjustStaminaLoss(-30, 0) ..() return TRUE @@ -1187,12 +1196,12 @@ color = "#C8A5DC" metabolization_rate = 1 -/datum/reagent/medicine/changelinghaste/on_mob_add(mob/living/L) +/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_GOTTAGOREALLYFAST, id) + ADD_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id) -/datum/reagent/medicine/changelinghaste/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_GOTTAGOREALLYFAST, id) +/datum/reagent/medicine/changelinghaste/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id) ..() /datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/M) @@ -1209,12 +1218,12 @@ color = "#F5F5F5" self_consuming = TRUE -/datum/reagent/medicine/corazone/on_mob_add(mob/living/M) +/datum/reagent/medicine/corazone/on_mob_metabolize(mob/living/M) ..() - M.add_trait(TRAIT_STABLEHEART, id) + ADD_TRAIT(M, TRAIT_STABLEHEART, id) -/datum/reagent/medicine/corazone/on_mob_delete(mob/living/M) - M.remove_trait(TRAIT_STABLEHEART, id) +/datum/reagent/medicine/corazone/on_mob_end_metabolize(mob/living/M) + REMOVE_TRAIT(M, TRAIT_STABLEHEART, id) ..() /datum/reagent/medicine/muscle_stimulant @@ -1222,13 +1231,13 @@ id = "muscle_stimulant" description = "A potent chemical that allows someone under its influence to be at full physical ability even when under massive amounts of pain." -/datum/reagent/medicine/muscle_stimulant/on_mob_add(mob/living/M) +/datum/reagent/medicine/muscle_stimulant/on_mob_metabolize(mob/living/M) . = ..() - M.add_trait(TRAIT_IGNORESLOWDOWN, id) + M.ignore_slowdown(id) -/datum/reagent/medicine/muscle_stimulant/on_mob_delete(mob/living/M) +/datum/reagent/medicine/muscle_stimulant/on_mob_end_metabolize(mob/living/M) . = ..() - M.remove_trait(TRAIT_IGNORESLOWDOWN, id) + M.unignore_slowdown(id) /datum/reagent/medicine/modafinil name = "Modafinil" @@ -1241,12 +1250,12 @@ taste_description = "salt" // it actually does taste salty var/overdose_progress = 0 // to track overdose progress -/datum/reagent/medicine/modafinil/on_mob_add(mob/living/M) - M.add_trait(TRAIT_SLEEPIMMUNE, id) +/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/M) + ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, id) ..() -/datum/reagent/medicine/modafinil/on_mob_delete(mob/living/M) - M.remove_trait(TRAIT_SLEEPIMMUNE, id) +/datum/reagent/medicine/modafinil/on_mob_end_metabolize(mob/living/M) + REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, id) ..() /datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/M) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 5d1593d1e7..890403691e 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -196,12 +196,12 @@ glass_name = "glass of holy water" glass_desc = "A glass of holy water." -/datum/reagent/water/holywater/on_mob_add(mob/living/L) +/datum/reagent/water/holywater/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_HOLY, id) + ADD_TRAIT(L, TRAIT_HOLY, id) -/datum/reagent/water/holywater/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_HOLY, id) +/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_HOLY, id) ..() /datum/reagent/water/holywater/reaction_mob(mob/living/M, method=TOUCH, reac_volume) @@ -1241,14 +1241,14 @@ color = "E1A116" taste_description = "sourness" -/datum/reagent/stimulum/on_mob_add(mob/living/L) +/datum/reagent/stimulum/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_STUNIMMUNE, id) - L.add_trait(TRAIT_SLEEPIMMUNE, id) + ADD_TRAIT(L, TRAIT_STUNIMMUNE, id) + ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id) -/datum/reagent/stimulum/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_STUNIMMUNE, id) - L.remove_trait(TRAIT_SLEEPIMMUNE, id) +/datum/reagent/stimulum/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id) + REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id) ..() /datum/reagent/stimulum/on_mob_life(mob/living/carbon/M) @@ -1266,12 +1266,12 @@ color = "90560B" taste_description = "burning" -/datum/reagent/nitryl/on_mob_add(mob/living/L) +/datum/reagent/nitryl/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_GOTTAGOFAST, id) + ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id) -/datum/reagent/nitryl/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_GOTTAGOFAST, id) +/datum/reagent/nitryl/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id) ..() /////////////////////////Coloured Crayon Powder//////////////////////////// @@ -1723,7 +1723,7 @@ H.update_transform() ..() -/datum/reagent/growthserum/on_mob_delete(mob/living/M) +/datum/reagent/growthserum/on_mob_end_metabolize(mob/living/M) M.resize = 1/current_size M.update_transform() ..() @@ -1777,12 +1777,12 @@ taste_description = "water" metabolization_rate = 0.25 * REAGENTS_METABOLISM -/datum/reagent/pax/on_mob_add(mob/living/L) +/datum/reagent/pax/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_PACIFISM, id) + ADD_TRAIT(L, TRAIT_PACIFISM, id) -/datum/reagent/pax/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_PACIFISM, id) +/datum/reagent/pax/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_PACIFISM, id) ..() /datum/reagent/bz_metabolites @@ -1793,13 +1793,13 @@ taste_description = "acrid cinnamon" metabolization_rate = 0.2 * REAGENTS_METABOLISM -/datum/reagent/bz_metabolites/on_mob_add(mob/living/L) +/datum/reagent/bz_metabolites/on_mob_metabolize(mob/living/L) ..() - L.add_trait(CHANGELING_HIVEMIND_MUTE, id) + ADD_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id) -/datum/reagent/bz_metabolites/on_mob_delete(mob/living/L) +/datum/reagent/bz_metabolites/on_mob_end_metabolize(mob/living/L) ..() - L.remove_trait(CHANGELING_HIVEMIND_MUTE, id) + REMOVE_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id) /datum/reagent/bz_metabolites/on_mob_life(mob/living/L) if(L.mind) @@ -1814,14 +1814,14 @@ description = "A colorless liquid that suppresses violence on the subjects. Cheaper to synthetize, but wears out faster than normal Pax." metabolization_rate = 1.5 * REAGENTS_METABOLISM -/datum/reagent/peaceborg/confuse +/datum/reagent/peaceborg_confuse name = "Dizzying Solution" id = "dizzysolution" description = "Makes the target off balance and dizzy" metabolization_rate = 1.5 * REAGENTS_METABOLISM taste_description = "dizziness" -/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M) +/datum/reagent/peaceborg_confuse/on_mob_life(mob/living/carbon/M) if(M.confused < 6) M.confused = CLAMP(M.confused + 3, 0, 5) if(M.dizziness < 6) @@ -1830,14 +1830,14 @@ to_chat(M, "You feel confused and disorientated.") ..() -/datum/reagent/peaceborg/tire +/datum/reagent/peaceborg_tire name = "Tiring Solution" id = "tiresolution" description = "An extremely weak stamina-toxin that tires out the target. Completely harmless." metabolization_rate = 1.5 * REAGENTS_METABOLISM taste_description = "tiredness" -/datum/reagent/peaceborg/tire/on_mob_life(mob/living/carbon/M) +/datum/reagent/peaceborg_tire/on_mob_life(mob/living/carbon/M) var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS. if(M.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.) M.adjustStaminaLoss(10) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index edf12a3413..6bd165f23e 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -97,7 +97,7 @@ /datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C) . = TRUE - if(C.has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(C, TRAIT_NOBREATH)) . = FALSE if(.) @@ -135,7 +135,7 @@ taste_description = "mint" /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M) - if(M.has_trait(TRAIT_FAT)) + if(HAS_TRAIT(M, TRAIT_FAT)) M.gib() return ..() @@ -156,11 +156,11 @@ toxpwr = 0.5 taste_description = "death" -/datum/reagent/toxin/zombiepowder/on_mob_add(mob/living/L) +/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L) ..() L.fakedeath(id) -/datum/reagent/toxin/zombiepowder/on_mob_delete(mob/living/L) +/datum/reagent/toxin/zombiepowder/on_mob_end_metabolize(mob/living/L) L.cure_fakedeath(id) ..() @@ -178,12 +178,12 @@ toxpwr = 0.8 taste_description = "death" -/datum/reagent/toxin/ghoulpowder/on_mob_add(mob/living/L) +/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L) ..() - L.add_trait(TRAIT_FAKEDEATH, id) + ADD_TRAIT(L, TRAIT_FAKEDEATH, id) -/datum/reagent/toxin/ghoulpowder/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_FAKEDEATH, id) +/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_FAKEDEATH, id) ..() /datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M) @@ -626,7 +626,7 @@ toxpwr = 0 metabolization_rate = 0.5 * REAGENTS_METABOLISM -/datum/reagent/toxin/amanitin/on_mob_delete(mob/living/M) +/datum/reagent/toxin/amanitin/on_mob_end_metabolize(mob/living/M) var/toxdamage = current_cycle*3*REM M.log_message("has taken [toxdamage] toxin damage from amanitin toxin", LOG_ATTACK) M.adjustToxLoss(toxdamage) @@ -742,7 +742,7 @@ animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING) return ..() -/datum/reagent/toxin/rotatium/on_mob_delete(mob/living/M) +/datum/reagent/toxin/rotatium/on_mob_end_metabolize(mob/living/M) if(M && M.hud_used) var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) for(var/whole_screen in screens) @@ -779,7 +779,7 @@ */ return ..() -/datum/reagent/toxin/skewium/on_mob_delete(mob/living/M) +/datum/reagent/toxin/skewium/on_mob_end_metabolize(mob/living/M) if(M && M.hud_used) var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) for(var/whole_screen in screens) @@ -798,7 +798,7 @@ /datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M) var/remove_amt = 5 - if(holder.has_reagent("calomel") || holder.has_reagent("pen_acid")) + if(holder.has_reagent("calomel") || holder.has_reagent("pen_acid") || holder.has_reagent("pen_jelly")) remove_amt = 0.5 for(var/datum/reagent/medicine/R in M.reagents.reagent_list) M.reagents.remove_reagent(R.id,remove_amt) @@ -882,8 +882,69 @@ toxpwr = 0 taste_description = "stillness" -/datum/reagent/toxin/mimesbane/on_mob_add(mob/living/L) - L.add_trait(TRAIT_EMOTEMUTE, id) +/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/L) + ADD_TRAIT(L, TRAIT_EMOTEMUTE, id) -/datum/reagent/toxin/mimesbane/on_mob_delete(mob/living/L) - L.remove_trait(TRAIT_EMOTEMUTE, id) +/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, id) + +/datum/reagent/toxin/bonehurtingjuice //oof ouch + name = "Bone Hurting Juice" + id = "bonehurtingjuice" + description = "A strange substance that looks a lot like water. Drinking it is oddly tempting. Oof ouch." + color = "#AAAAAA77" //RGBA: 170, 170, 170, 77 + toxpwr = 0 + taste_description = "bone hurting" + overdose_threshold = 20 + +/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/M) + M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice) + +/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M) + M.adjustStaminaLoss(7.5, 0) + if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER)) + M.adjustBruteLoss(3.5, 0) + if(prob(12)) + switch(rand(1, 3)) + if(1) + var/list/possible_says = list("oof.", "ouch!", "my bones.", "oof ouch.", "oof ouch my bones.") + M.say(pick(possible_says), forced = /datum/reagent/toxin/bonehurtingjuice) + if(2) + var/list/possible_mes = list("oofs softly.", "looks like their bones hurt.", "grimaces, as though their bones hurt.") + M.say("*custom " + pick(possible_mes), forced = /datum/reagent/toxin/bonehurtingjuice) + if(3) + to_chat(M, "Your bones hurt!") + return ..() + +/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M) + if(prob(6) && iscarbon(M)) //big oof + var/selected_part + switch(rand(1, 4)) //God help you if the same limb gets picked twice quickly. + if(1) + selected_part = BODY_ZONE_L_ARM + if(2) + selected_part = BODY_ZONE_R_ARM + if(3) + selected_part = BODY_ZONE_L_LEG + if(4) + selected_part = BODY_ZONE_R_LEG + var/obj/item/bodypart/bp = M.get_bodypart(selected_part) + if(M.dna.species.type != /datum/species/skeleton || M.dna.species.type != /datum/species/plasmaman || M.dna.species.type != /datum/species/golem/bone) //We're so sorry skeletons, you're so misunderstood + if(bp) + bp.receive_damage(0, 0, 200) + playsound(M, get_sfx("desceration"), 50, TRUE, -1) + M.visible_message("[M]'s bones hurt too much!!", "Your bones hurt too much!!") + M.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice) + else //SUCH A LUST FOR REVENGE!!! + to_chat(M, "A phantom limb hurts!") + M.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice) + else //you just want to socialize + if(bp) + playsound(M, get_sfx("desceration"), 50, TRUE, -1) + M.visible_message("[M] rattles loudly and flails around!!", "Your bones hurt so much that your missing muscles spasm!!") + M.say("OOF!!", forced=/datum/reagent/toxin/bonehurtingjuice) + bp.receive_damage(200, 0, 0) //But I don't think we should + else + to_chat(M, "Your missing arm aches from wherever you left it.") + M.emote("sigh") + return ..() diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index dc7c32d925..727048a12c 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -94,6 +94,12 @@ results = list("pen_acid" = 6) required_reagents = list("welding_fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1) +/datum/chemical_reaction/pen_jelly + name = "Pentetic Jelly" + id = "pen_jelly" + results = list("pen_jelly" = 2) + required_reagents = list("pen_acid" = 1, "slimejelly" = 1) + /datum/chemical_reaction/sal_acid name = "Salicyclic Acid" id = "sal_acid" diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 29863c2b90..b29a1c6809 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -64,8 +64,8 @@ strengthdiv = 8 for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom))) var/deity - if(SSreligion.deity) - deity = SSreligion.deity + if(GLOB.deity) + deity = GLOB.deity else deity = "Christ" to_chat(R, "The power of [deity] compels you!") diff --git a/code/modules/reagents/chemistry/recipes/special.dm b/code/modules/reagents/chemistry/recipes/special.dm new file mode 100644 index 0000000000..153372101e --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/special.dm @@ -0,0 +1,212 @@ +GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related food types + +/proc/build_reagents_to_food() + . = list() + for (var/type in subtypesof(/obj/item/reagent_containers/food)) + var/obj/item/reagent_containers/food/item = new type() + for(var/r in item.list_reagents) + if (!.[r]) + .[r] = list() + .[r] += type + qdel(item) + //dang plant snowflake + for (var/type in subtypesof(/obj/item/seeds)) + var/obj/item/seeds/item = new type() + for(var/r in item.reagents_add) + if (!.[r]) + .[r] = list() + .[r] += type + qdel(item) + + +#define RNGCHEM_INPUT "input" +#define RNGCHEM_CATALYSTS "catalysts" +#define RNGCHEM_OUTPUT "output" + +/datum/chemical_reaction/randomized + name = "semi randomized reaction" + + var/persistent = FALSE + var/persistence_period = 7 //Will reset every x days + var/created //creation timestamp + + var/randomize_container = FALSE + var/list/possible_containers = list() + + var/randomize_req_temperature = TRUE + var/min_temp = 1 + var/max_temp = 600 + + var/randomize_inputs = TRUE + var/min_input_reagent_amount = 1 + var/max_input_reagent_amount = 10 + var/min_input_reagents = 2 + var/max_input_reagents = 5 + var/list/possible_reagents = list() + var/min_catalysts = 0 + var/max_catalysts = 2 + var/list/possible_catalysts = list() + + var/randomize_results = FALSE + var/min_output_reagent_amount = 1 + var/max_output_reagent_amount = 5 + var/min_result_reagents = 1 + var/max_result_reagents = 1 + var/list/possible_results = list() + +/datum/chemical_reaction/randomized/proc/GenerateRecipe() + created = world.time + if(randomize_container) + required_container = pick(possible_containers) + if(randomize_req_temperature) + required_temp = rand(min_temp,max_temp) + is_cold_recipe = pick(TRUE,FALSE) + + if(randomize_results) + results = list() + var/list/remaining_possible_results = GetPossibleReagents(RNGCHEM_OUTPUT) + var/out_reagent_count = min(rand(min_result_reagents,max_result_reagents),remaining_possible_results.len) + for(var/i in 1 to out_reagent_count) + var/r_id = pick_n_take(remaining_possible_results) + results[r_id] = rand(min_output_reagent_amount,max_output_reagent_amount) + + if(randomize_inputs) + var/list/remaining_possible_reagents = GetPossibleReagents(RNGCHEM_INPUT) + var/list/remaining_possible_catalysts = GetPossibleReagents(RNGCHEM_CATALYSTS) + + //We're going to assume we're not doing any weird partial reactions for now. + for(var/reagent_type in results) + remaining_possible_catalysts -= reagent_type + remaining_possible_reagents -= reagent_type + + var/in_reagent_count = min(rand(min_input_reagents,max_input_reagents),remaining_possible_reagents.len) + if(in_reagent_count <= 0) + return FALSE + + required_reagents = list() + for(var/i in 1 to in_reagent_count) + var/r_id = pick_n_take(remaining_possible_reagents) + required_reagents[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount) + remaining_possible_catalysts -= r_id //Can't have same reagents both as catalyst and reagent. Or can we ? + + required_catalysts = list() + var/in_catalyst_count = min(rand(min_catalysts,max_catalysts),remaining_possible_catalysts.len) + for(var/i in 1 to in_catalyst_count) + var/r_id = pick_n_take(remaining_possible_catalysts) + required_catalysts[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount) + + return TRUE + +/datum/chemical_reaction/randomized/proc/GetPossibleReagents(kind) + switch(kind) + if(RNGCHEM_INPUT) + return possible_reagents.Copy() + if(RNGCHEM_CATALYSTS) + return possible_catalysts.Copy() + if(RNGCHEM_OUTPUT) + return possible_results.Copy() + +/datum/chemical_reaction/randomized/proc/HasConflicts() + for(var/x in required_reagents) + for(var/datum/chemical_reaction/R in GLOB.chemical_reactions_list[x]) + if(chem_recipes_do_conflict(R,src)) + return TRUE + return FALSE + +/datum/chemical_reaction/randomized/proc/unwrap_reagent_list(list/textreagents) + . = list() + for(var/R in textreagents) + var/pathR = text2path(R) + if(!pathR) + return null + .[pathR] = textreagents[R] + +/datum/chemical_reaction/randomized/proc/LoadOldRecipe(recipe_data) + created = text2num(recipe_data["timestamp"]) + + var/req_reag = unwrap_reagent_list(recipe_data["required_reagents"]) + if(!req_reag) + return FALSE + required_reagents = req_reag + + var/req_catalysts = unwrap_reagent_list(recipe_data["required_catalysts"]) + if(!req_catalysts) + return FALSE + required_catalysts = req_catalysts + + required_temp = recipe_data["required_temp"] + is_cold_recipe = recipe_data["is_cold_recipe"] + + var/temp_results = unwrap_reagent_list(recipe_data["results"]) + if(!temp_results) + return FALSE + results = temp_results + var/containerpath = text2path(recipe_data["required_container"]) + if(!containerpath) + return FALSE + required_container = containerpath + return TRUE + +/datum/chemical_reaction/randomized/secret_sauce + name = "secret sauce creation" + id = "secretsauce" + persistent = TRUE + persistence_period = 7 //Reset every week + randomize_container = TRUE + possible_containers = list(/obj/item/reagent_containers/glass/bucket) //easy way to ensure no common conflicts + randomize_req_temperature = TRUE + results = list("secret_sauce" =1) + +/datum/chemical_reaction/randomized/secret_sauce/GetPossibleReagents(kind) + switch(kind) + if(RNGCHEM_INPUT,RNGCHEM_CATALYSTS) + var/food_reagent_ids = list() + for(var/key in GLOB.food_reagents) + food_reagent_ids += key + return food_reagent_ids + return ..() + + +/obj/item/paper/secretrecipe + name = "old recipe" + var/recipe_id = "secretsauce" + +/obj/item/paper/secretrecipe/examine(mob/user) //Extra secret + if(isobserver(user)) + return + . = ..() + +/obj/item/paper/secretrecipe/Initialize() + . = ..() + if(SSpersistence.initialized) + UpdateInfo() + else + SSticker.OnRoundstart(CALLBACK(src,.proc/UpdateInfo)) + +/obj/item/paper/secretrecipe/proc/UpdateInfo() + var/datum/chemical_reaction/recipe = get_chemical_reaction(recipe_id) + if(!recipe) + info = "This recipe is illegible." + var/list/dat = list("
    ") + for(var/rid in recipe.required_reagents) + var/datum/reagent/R = GLOB.chemical_reagents_list[rid] + dat += "
  • [recipe.required_reagents[rid]]u of [R.name]
  • " + dat += "
" + if(recipe.required_catalysts.len) + dat += "With following present:
    " + for(var/rid in recipe.required_catalysts) + var/datum/reagent/R = GLOB.chemical_reagents_list[rid] + dat += "
  • [recipe.required_catalysts[rid]]u of [R.name]
  • " + dat += "
" + dat += "Mix slowly" + if(recipe.required_container) + var/obj/item/I = recipe.required_container + dat += " in [initial(I.name)]" + if(recipe.required_temp != 0) + if(recipe.is_cold_recipe) + dat += " below [recipe.required_temp] degrees" + else + dat += " above [recipe.required_temp] degrees" + dat += "." + info = dat.Join("") + update_icon() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 22e21b1db0..726175a6c6 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -119,3 +119,10 @@ id = "mimesbane" results = list("mimesbane" = 3) required_reagents = list("radium" = 1, "mutetoxin" = 1, "nothing" = 1) + +/datum/chemical_reaction/bonehurtingjuice + name = "Bone Hurting Juice" + id = "bonehurtingjuice" + results = list("bonehurtingjuice" = 5) + required_reagents = list("mutagen" = 1, "itching_powder" = 3, "milk" = 1) + mix_message = "The mixture suddenly becomes clear and looks a lot like water. You feel a strong urge to drink it." diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 98c85b875f..13e809f7cb 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -7,6 +7,7 @@ var/amount_per_transfer_from_this = 5 var/list/possible_transfer_amounts = list(5,10,15,20,25,30) var/volume = 30 + var/reagent_flags var/list/list_reagents = null var/spawned_disease = null var/disease_amount = 20 @@ -16,7 +17,7 @@ . = ..() if(isnum(vol) && vol > 0) volume = vol - create_reagents(volume) + create_reagents(volume, reagent_flags) if(spawned_disease) var/datum/disease/F = new spawned_disease() var/list/data = list("viruses"= list(F)) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 1c75c76458..efe9c378d9 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -6,7 +6,7 @@ amount_per_transfer_from_this = 5 possible_transfer_amounts = list(1, 2, 3, 4, 5) volume = 5 - container_type = TRANSPARENT + reagent_flags = TRANSPARENT /obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity) . = ..() diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 05f30a7092..9bc6bef8a5 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -3,7 +3,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50) volume = 50 - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER spillable = TRUE resistance_flags = ACID_PROOF @@ -194,13 +194,10 @@ reactions. Can hold up to 50 units." icon_state = "beakernoreact" materials = list(MAT_METAL=3000) + reagent_flags = OPENCONTAINER | NO_REACT volume = 50 amount_per_transfer_from_this = 10 -/obj/item/reagent_containers/glass/beaker/noreact/Initialize() - . = ..() - reagents.set_reacting(FALSE) - /obj/item/reagent_containers/glass/beaker/bluespace name = "bluespace beaker" desc = "A bluespace beaker, powered by experimental bluespace technology \ @@ -291,11 +288,11 @@ to_chat(user, "[src]'s contents spill all over you!") reagents.reaction(user, TOUCH) reagents.clear_reagents() - container_type = NONE + reagent_flags = NONE /obj/item/reagent_containers/glass/bucket/dropped(mob/user) . = ..() - container_type = initial(container_type) + reagent_flags = initial(reagent_flags) /obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M) if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index f59f00a4b8..82d95cea40 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -10,7 +10,7 @@ volume = 30 possible_transfer_amounts = list() resistance_flags = ACID_PROOF - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER slot_flags = ITEM_SLOT_BELT var/ignore_flags = 0 var/infinite = FALSE @@ -73,7 +73,7 @@ desc = "A modified air-needle autoinjector with a small single-use reservoir. It contains an experimental serum." icon_state = "combat_hypo" volume = 5 - container_type = NONE + reagent_flags = NONE list_reagents = list("magillitis" = 5) //MediPens @@ -88,7 +88,7 @@ amount_per_transfer_from_this = 10 volume = 10 ignore_flags = 1 //so you can medipen through hardsuits - container_type = DRAWABLE + reagent_flags = DRAWABLE flags_1 = null list_reagents = list("epinephrine" = 10) @@ -103,7 +103,7 @@ ..() if(!iscyborg(user)) reagents.maximum_volume = 0 //Makes them useless afterwards - container_type = NONE + reagent_flags = NONE update_icon() addtimer(CALLBACK(src, .proc/cyborg_recharge, user), 80) diff --git a/code/modules/reagents/reagent_containers/medspray.dm b/code/modules/reagents/reagent_containers/medspray.dm index 8631c14ac0..54a38eef86 100644 --- a/code/modules/reagents/reagent_containers/medspray.dm +++ b/code/modules/reagents/reagent_containers/medspray.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi' item_flags = NOBLUDGEON obj_flags = UNIQUE_RENAME - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index afb985120e..d2e3f95bdc 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' item_flags = NOBLUDGEON - container_type = OPENCONTAINER + reagent_flags = OPENCONTAINER slot_flags = ITEM_SLOT_BELT throwforce = 0 w_class = WEIGHT_CLASS_SMALL @@ -224,7 +224,7 @@ return /obj/item/reagent_containers/spray/waterflower/cyborg - container_type = NONE + reagent_flags = NONE volume = 100 list_reagents = list("water" = 100) var/generate_amount = 5 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index b2b7ab88a7..cc83eb28f6 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -13,7 +13,7 @@ var/busy = FALSE // needed for delayed drawing of blood var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun materials = list(MAT_METAL=10, MAT_GLASS=20) - container_type = TRANSPARENT + reagent_flags = TRANSPARENT /obj/item/reagent_containers/syringe/Initialize() . = ..() @@ -249,10 +249,7 @@ name = "cryo syringe" desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units." volume = 20 - -/obj/item/reagent_containers/syringe/noreact/Initialize() - . = ..() - reagents.set_reacting(FALSE) + reagent_flags = TRANSPARENT | NO_REACT /obj/item/reagent_containers/syringe/piercing name = "piercing syringe" @@ -262,3 +259,92 @@ /obj/item/reagent_containers/syringe/get_belt_overlay() return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch") + +/obj/item/reagent_containers/syringe/dart + name = "medicinal smartdart" + desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented." + volume = 20 + amount_per_transfer_from_this = 20 + icon_state = "empty" + item_state = "syringe_empty" + var/emptrig = FALSE + +/obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity) + + if(busy) + return + if(!proximity) + return + if(!target.reagents) + return + + var/mob/living/L + if(isliving(target)) + L = target + if(!L.can_inject(user, 1)) + return + + switch(mode) + if(SYRINGE_DRAW) + + if(reagents.total_volume >= reagents.maximum_volume) + to_chat(user, "The dart is full!") + return + + if(L) //living mob + to_chat(user, "You can't draw blood using a dart!") + return + + else //if not mob + if(!target.reagents.total_volume) + to_chat(user, "[target] is empty!") + return + + if(!target.is_drawable()) + to_chat(user, "You cannot directly remove reagents from [target]!") + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + + to_chat(user, "You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.") + if (reagents.total_volume >= reagents.maximum_volume) + mode=!mode + update_icon() + + if(SYRINGE_INJECT) + src.visible_message("The smartdart gives a frustrated boop! It's fully saturated; You need to shoot someone with it!") + +/obj/item/reagent_containers/syringe/dart/attack_self(mob/user) + return + +/obj/item/reagent_containers/syringe/dart/update_icon() + cut_overlays() + var/rounded_vol + + rounded_vol = "empty" + if(reagents && reagents.total_volume) + if(volume/reagents.total_volume == 1) + rounded_vol="full" + + icon_state = "[rounded_vol]" + item_state = "syringe_[rounded_vol]" + if(ismob(loc)) + var/mob/M = loc + var/injoverlay + switch(mode) + if (SYRINGE_DRAW) + injoverlay = "draw" + if (SYRINGE_INJECT) + injoverlay = "ready" + add_overlay(injoverlay) + M.update_inv_hands() + +/obj/item/reagent_containers/syringe/dart/emp_act(severity) + emptrig = TRUE + ..() + +/obj/item/reagent_containers/syringe/dart/bluespace + name = "bluespace smartdart" + desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam." + amount_per_transfer_from_this = 50 + volume = 50 diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 45154a70f4..19afab2e6e 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -5,7 +5,6 @@ icon_state = "water" density = TRUE anchored = FALSE - container_type = DRAINABLE | AMOUNT_VISIBLE pressure_resistance = 2*ONE_ATMOSPHERE max_integrity = 300 var/tank_volume = 1000 //In units, how much the dispenser can hold @@ -24,7 +23,7 @@ return ..() /obj/structure/reagent_dispensers/Initialize() - create_reagents(tank_volume) + create_reagents(tank_volume, DRAINABLE | AMOUNT_VISIBLE) reagents.add_reagent(reagent_id, tank_volume) . = ..() diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm index 780a1bc97d..65a435a309 100644 --- a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm +++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm @@ -21,6 +21,14 @@ category = list("Computer Boards") departmental_flags = DEPARTMENTAL_FLAG_ALL +/datum/design/board/minesweeper + name = "Computer Design (Minesweeper Arcade Machine)" + desc = "Allows for the construction of circuit boards used to build a new Minesweeper machine." + id = "arcade_minesweeper" + build_path = /obj/item/circuitboard/computer/arcade/minesweeper + category = list("Computer Boards") + departmental_flags = DEPARTMENTAL_FLAG_ALL + /datum/design/board/slot_machine name = "Computer Design (Slot Machine)" desc = "Allows for the construction of circuit boards used to build a new slot machine." diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 7224d0e4e8..3a7ef68903 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -92,6 +92,36 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/medicinalsmartdart + name = "Medicinal Smartdart" + desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented." + id = "medicinalsmartdart" + build_type = PROTOLATHE + materials = list(MAT_GLASS = 100, MAT_PLASTIC = 100, MAT_METAL = 100) + build_path = /obj/item/reagent_containers/syringe/dart + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/bluespacesmartdart + name = "bluespace smartdart" + desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam." + id = "bluespacesmartdart" + build_type = PROTOLATHE + materials = list(MAT_GLASS = 250, MAT_PLASTIC = 250, MAT_METAL = 250, MAT_BLUESPACE = 250) + build_path = /obj/item/reagent_containers/syringe/dart/bluespace + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/smartdartgun + name = "dart gun" + desc = "A compressed air gun, designed to fit medicinal darts for application of medicine for those patients just out of reach." + id = "smartdartgun" + build_type = PROTOLATHE + materials = list(MAT_GLASS = 500, MAT_PLASTIC = 1000, MAT_METAL = 500) + build_path = /obj/item/gun/syringe/dart + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + /datum/design/bluespacebodybag name = "Bluespace Body Bag" desc = "A bluespace body bag, powered by experimental bluespace technology. It can hold loads of bodies and the largest of creatures." @@ -172,6 +202,16 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE +/datum/design/organbox + name = "Empty Organ Box" + desc = "A large cool box that can hold large amouts of medical tools or organs." + id = "organbox" + build_type = PROTOLATHE + materials = list(MAT_METAL = 3000, MAT_GLASS = 1000, MAT_SILVER= 3500, MAT_GOLD = 3500, MAT_PLASTIC = 5000) + build_path = /obj/item/storage/belt/organbox + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + //////////////////////////////////////// //////////Defibrillator Tech//////////// //////////////////////////////////////// diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index 0d699a1d67..59df0f6e85 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -1,475 +1,517 @@ - -///////////////////////////////////////// -/////////////////HUDs//////////////////// -///////////////////////////////////////// - -/datum/design/health_hud - name = "Health Scanner HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." - id = "health_hud" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/hud/health - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL - -/datum/design/health_hud_prescription - name = "Prescription Health Scanner HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. This one has a prescription lens." - id = "health_hud_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) - build_path = /obj/item/clothing/glasses/hud/health/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL - -/datum/design/health_hud_night - name = "Night Vision Health Scanner HUD" - desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness." - id = "health_hud_night" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_SILVER = 350) - build_path = /obj/item/clothing/glasses/hud/health/night - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL - -/datum/design/security_hud - name = "Security HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status." - id = "security_hud" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/hud/security - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - -/datum/design/security_hud_prescription - name = "Prescription Security HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status. This one has a prescription lens." - id = "security_hud_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) - build_path = /obj/item/clothing/glasses/hud/security/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - - -/datum/design/security_hud_night - name = "Night Vision Security HUD" - desc = "A heads-up display which provides id data and vision in complete darkness." - id = "security_hud_night" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_GOLD = 350) - build_path = /obj/item/clothing/glasses/hud/security/night - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - -/datum/design/diagnostic_hud - name = "Diagnostic HUD" - desc = "A HUD used to analyze and determine faults within robotic machinery." - id = "diagnostic_hud" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/hud/diagnostic - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/diagnostic_hud_prescription - name = "Prescription Diagnostic HUD" - desc = "A HUD used to analyze and determine faults within robotic machinery. This one has a prescription lens." - id = "diagnostic_hud_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_GOLD = 350) - build_path = /obj/item/clothing/glasses/hud/diagnostic/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/diagnostic_hud_night - name = "Night Vision Diagnostic HUD" - desc = "Upgraded version of the diagnostic HUD designed to function during a power failure." - id = "diagnostic_hud_night" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_PLASMA = 300) - build_path = /obj/item/clothing/glasses/hud/diagnostic/night - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/sci_goggles - name = "Science Goggles" - desc = "Goggles fitted with a portable analyzer capable of determining the research worth of an item or components of a machine." - id = "scigoggles" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/science - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/mesons - name = "Optical Meson Scanners" - desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." - id = "mesons" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/meson - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/mesons_prescription - name = "Prescription Optical Meson Scanners" - desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition. Prescription lens has been added into this design." - id = "mesons_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) - build_path = /obj/item/clothing/glasses/meson/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/engine_goggles - name = "Engineering Scanner Goggles" - desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes." - id = "engine_goggles" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100) - build_path = /obj/item/clothing/glasses/meson/engine - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/engine_goggles_prescription - name = "Prescription Engineering Scanner Goggles" - desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes. Prescription lens has been added into this design." - id = "engine_goggles_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100, MAT_SILVER = 350) - build_path = /obj/item/clothing/glasses/meson/engine/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/tray_goggles - name = "Optical T-Ray Scanners" - desc = "Used by engineering staff to see underfloor objects such as cables and pipes." - id = "tray_goggles" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/clothing/glasses/meson/engine/tray - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/tray_goggles_prescription - name = "Prescription Optical T-Ray Scanners" - desc = "Used by engineering staff to see underfloor objects such as cables and pipes. Prescription lens has been added into this design." - id = "tray_goggles_prescription" - build_type = PROTOLATHE - materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 150) - build_path = /obj/item/clothing/glasses/meson/engine/tray/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/nvgmesons - name = "Night Vision Optical Meson Scanners" - desc = "Prototype meson scanners fitted with an extra sensor which amplifies the visible light spectrum and overlays it to the UHD display." - id = "nvgmesons" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) - build_path = /obj/item/clothing/glasses/meson/night - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO - -/datum/design/night_vision_goggles - name = "Night Vision Goggles" - desc = "Goggles that let you see through darkness unhindered." - id = "night_visision_goggles" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) - build_path = /obj/item/clothing/glasses/night - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY - -/datum/design/night_vision_goggles_glasses - name = "Prescription Night Vision Goggles" - desc = "Goggles that let you see through darkness unhindered. Corrects vision." - id = "night_visision_goggles_glasses" - build_type = PROTOLATHE - materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) - build_path = /obj/item/clothing/glasses/night/prescription - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_ENGINEERING - -///////////////////////////////////////// -//////////////////Misc/////////////////// -///////////////////////////////////////// - -/datum/design/welding_mask - name = "Welding Gas Mask" - desc = "A gas mask with built in welding goggles and face shield. Looks like a skull, clearly designed by a nerd." - id = "weldingmask" - build_type = PROTOLATHE - materials = list(MAT_METAL = 3000, MAT_GLASS = 1000) - build_path = /obj/item/clothing/mask/gas/welding - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/portaseeder - name = "Portable Seed Extractor" - desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant." - id = "portaseeder" - build_type = PROTOLATHE - materials = list(MAT_METAL = 1000, MAT_GLASS = 400) - build_path = /obj/item/storage/bag/plants/portaseeder - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/air_horn - name = "Air Horn" - desc = "Damn son, where'd you find this?" - id = "air_horn" - build_type = PROTOLATHE - materials = list(MAT_METAL = 4000, MAT_BANANIUM = 1000) - build_path = /obj/item/bikehorn/airhorn - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ALL //HONK! - -/datum/design/magboots - name = "Magnetic Boots" - desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle." - id = "magboots" - build_type = PROTOLATHE - materials = list(MAT_METAL = 4500, MAT_SILVER = 1500, MAT_GOLD = 2500) - build_path = /obj/item/clothing/shoes/magboots - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/diskplantgene - name = "Plant Data Disk" - desc = "A disk for storing plant genetic data." - id = "diskplantgene" - build_type = PROTOLATHE - materials = list(MAT_METAL=200, MAT_GLASS=100) - build_path = /obj/item/disk/plantgene - category = list("Electronics") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/roastingstick - name = "Advanced roasting stick" - desc = "A roasting stick for cooking sausages in exotic ovens." - id = "roastingstick" - build_type = PROTOLATHE - materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_BLUESPACE = 250) - build_path = /obj/item/melee/roastingstick - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/locator - name = "Bluespace locator" - desc = "Used to track portable teleportation beacons and targets with embedded tracking implants." - id = "locator" - build_type = PROTOLATHE - materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_SILVER = 500) - build_path = /obj/item/locator - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - -///////////////////////////////////////// -////////////Janitor Designs////////////// -///////////////////////////////////////// - -/datum/design/advmop - name = "Advanced Mop" - desc = "An upgraded mop with a large internal capacity for holding water or other cleaning chemicals." - id = "advmop" - build_type = PROTOLATHE - materials = list(MAT_METAL = 2500, MAT_GLASS = 200) - build_path = /obj/item/mop/advanced - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/blutrash - name = "Trashbag of Holding" - desc = "An advanced trash bag with bluespace properties; capable of holding a plethora of garbage." - id = "blutrash" - build_type = PROTOLATHE - materials = list(MAT_GOLD = 1500, MAT_URANIUM = 250, MAT_PLASMA = 1500) - build_path = /obj/item/storage/bag/trash/bluespace - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/buffer - name = "Floor Buffer Upgrade" - desc = "A floor buffer that can be attached to vehicular janicarts." - id = "buffer" - build_type = PROTOLATHE - materials = list(MAT_METAL = 3000, MAT_GLASS = 200) - build_path = /obj/item/janiupgrade - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -///////////////////////////////////////// -////////////Holosign Designs///////////// -///////////////////////////////////////// - -/datum/design/holosign - name = "Holographic Sign Projector" - desc = "A holograpic projector used to project various warning signs." - id = "holosign" - build_type = PROTOLATHE - materials = list(MAT_METAL = 2000, MAT_GLASS = 1000) - build_path = /obj/item/holosign_creator - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SERVICE - -/datum/design/holosignsec - name = "Security Holobarrier Projector" - desc = "A holographic projector that creates holographic security barriers." - id = "holosignsec" - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) - build_path = /obj/item/holosign_creator/security - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SECURITY - -/datum/design/holosignengi - name = "Engineering Holobarrier Projector" - desc = "A holographic projector that creates holographic engineering barriers." - id = "holosignengi" - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) - build_path = /obj/item/holosign_creator/engineering - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/holosignatmos - name = "ATMOS Holofan Projector" - desc = "A holographic projector that creates holographic barriers that prevent changes in atmospheric conditions." - id = "holosignatmos" - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) - build_path = /obj/item/holosign_creator/atmos - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/forcefield_projector - name = "Forcefield Projector" - desc = "A device which can project temporary forcefields to seal off an area." - id = "forcefield_projector" - build_type = PROTOLATHE - materials = list(MAT_METAL = 2500, MAT_GLASS = 1000) - build_path = /obj/item/forcefield_projector - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/////////////////////////////// -////////////Tools////////////// -/////////////////////////////// - -/datum/design/exwelder - name = "Experimental Welding Tool" - desc = "An experimental welder capable of self-fuel generation." - id = "exwelder" - build_type = PROTOLATHE - materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_PLASMA = 1500, MAT_URANIUM = 200) - build_path = /obj/item/weldingtool/experimental - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/handdrill - name = "Hand Drill" - desc = "A small electric hand drill with an interchangeable screwdriver and bolt bit" - id = "handdrill" - build_type = PROTOLATHE - materials = list(MAT_METAL = 3500, MAT_SILVER = 1500, MAT_TITANIUM = 2500) - build_path = /obj/item/screwdriver/power - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/jawsoflife - name = "Jaws of Life" - desc = "A small, compact Jaws of Life with an interchangeable pry jaws and cutting jaws" - id = "jawsoflife" // added one more requirment since the Jaws of Life are a bit OP - build_path = /obj/item/crowbar/power - build_type = PROTOLATHE - materials = list(MAT_METAL = 4500, MAT_SILVER = 2500, MAT_TITANIUM = 3500) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/alienwrench - name = "Alien Wrench" - desc = "An advanced wrench obtained through Abductor technology." - id = "alien_wrench" - build_path = /obj/item/wrench/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/alienwirecutters - name = "Alien Wirecutters" - desc = "Advanced wirecutters obtained through Abductor technology." - id = "alien_wirecutters" - build_path = /obj/item/wirecutters/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/alienscrewdriver - name = "Alien Screwdriver" - desc = "An advanced screwdriver obtained through Abductor technology." - id = "alien_screwdriver" - build_path = /obj/item/screwdriver/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/aliencrowbar - name = "Alien Crowbar" - desc = "An advanced crowbar obtained through Abductor technology." - id = "alien_crowbar" - build_path = /obj/item/crowbar/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/alienwelder - name = "Alien Welding Tool" - desc = "An advanced welding tool obtained through Abductor technology." - id = "alien_welder" - build_path = /obj/item/weldingtool/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/alienmultitool - name = "Alien Multitool" - desc = "An advanced multitool obtained through Abductor technology." - id = "alien_multitool" - build_path = /obj/item/multitool/abductor - build_type = PROTOLATHE - materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING - -/datum/design/anomaly_neutralizer - name = "Anomaly Neutralizer" - desc = "An advanced tool capable of instantly neutralizing anomalies, designed to capture the fleeting aberrations created by the engine." - id = "anomaly_neutralizer" - build_type = PROTOLATHE - materials = list(MAT_METAL = 2000, MAT_GOLD = 2000, MAT_PLASMA = 5000, MAT_URANIUM = 2000) - build_path = /obj/item/anomaly_neutralizer - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING - -///////////////////////////////////////// -////////////Armour/////////////////////// -///////////////////////////////////////// - -/datum/design/reactive_armour - name = "Reactive Armour Shell" - desc = "An experimental suit of armour capable of utilizing an implanted anomaly core to protect the user." - id = "reactive_armour" - build_type = PROTOLATHE - materials = list(MAT_METAL = 10000, MAT_DIAMOND = 5000, MAT_URANIUM = 8000, MAT_SILVER = 4500, MAT_GOLD = 5000) - build_path = /obj/item/reactive_armour_shell - category = list("Equipment") - departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING + +///////////////////////////////////////// +/////////////////HUDs//////////////////// +///////////////////////////////////////// + +/datum/design/health_hud + name = "Health Scanner HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." + id = "health_hud" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/hud/health + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/health_hud_prescription + name = "Prescription Health Scanner HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. This one has a prescription lens." + id = "health_hud_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) + build_path = /obj/item/clothing/glasses/hud/health/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/health_hud_night + name = "Night Vision Health Scanner HUD" + desc = "An advanced medical head-up display that allows doctors to find patients in complete darkness." + id = "health_hud_night" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_SILVER = 350) + build_path = /obj/item/clothing/glasses/hud/health/night + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/security_hud + name = "Security HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status." + id = "security_hud" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/hud/security + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/security_hud_prescription + name = "Prescription Security HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status. This one has a prescription lens." + id = "security_hud_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) + build_path = /obj/item/clothing/glasses/hud/security/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/security_hud_night + name = "Night Vision Security HUD" + desc = "A heads-up display which provides id data and vision in complete darkness." + id = "security_hud_night" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_GOLD = 350) + build_path = /obj/item/clothing/glasses/hud/security/night + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/diagnostic_hud + name = "Diagnostic HUD" + desc = "A HUD used to analyze and determine faults within robotic machinery." + id = "diagnostic_hud" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/hud/diagnostic + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/diagnostic_hud_prescription + name = "Prescription Diagnostic HUD" + desc = "A HUD used to analyze and determine faults within robotic machinery. This one has a prescription lens." + id = "diagnostic_hud_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_GOLD = 350) + build_path = /obj/item/clothing/glasses/hud/diagnostic/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/diagnostic_hud_night + name = "Night Vision Diagnostic HUD" + desc = "Upgraded version of the diagnostic HUD designed to function during a power failure." + id = "diagnostic_hud_night" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_PLASMA = 300) + build_path = /obj/item/clothing/glasses/hud/diagnostic/night + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/sci_goggles + name = "Science Goggles" + desc = "Goggles fitted with a portable analyzer capable of determining the research worth of an item or components of a machine." + id = "scigoggles" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/science + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/mesons + name = "Optical Meson Scanners" + desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." + id = "mesons" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/meson + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/mesons_prescription + name = "Prescription Optical Meson Scanners" + desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition. Prescription lens has been added into this design." + id = "mesons_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 350) + build_path = /obj/item/clothing/glasses/meson/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/engine_goggles + name = "Engineering Scanner Goggles" + desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes." + id = "engine_goggles" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100) + build_path = /obj/item/clothing/glasses/meson/engine + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/engine_goggles_prescription + name = "Prescription Engineering Scanner Goggles" + desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, regardless of lighting condition. The T-ray Scanner mode lets you see underfloor objects such as cables and pipes. Prescription lens has been added into this design." + id = "engine_goggles_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_PLASMA = 100, MAT_SILVER = 350) + build_path = /obj/item/clothing/glasses/meson/engine/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/tray_goggles + name = "Optical T-Ray Scanners" + desc = "Used by engineering staff to see underfloor objects such as cables and pipes." + id = "tray_goggles" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/meson/engine/tray + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/tray_goggles_prescription + name = "Prescription Optical T-Ray Scanners" + desc = "Used by engineering staff to see underfloor objects such as cables and pipes. Prescription lens has been added into this design." + id = "tray_goggles_prescription" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 150) + build_path = /obj/item/clothing/glasses/meson/engine/tray/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/nvgmesons + name = "Night Vision Optical Meson Scanners" + desc = "Prototype meson scanners fitted with an extra sensor which amplifies the visible light spectrum and overlays it to the UHD display." + id = "nvgmesons" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) + build_path = /obj/item/clothing/glasses/meson/night + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO + +/datum/design/night_vision_goggles + name = "Night Vision Goggles" + desc = "Goggles that let you see through darkness unhindered." + id = "night_visision_goggles" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) + build_path = /obj/item/clothing/glasses/night + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY + +/datum/design/night_vision_goggles_glasses + name = "Prescription Night Vision Goggles" + desc = "Goggles that let you see through darkness unhindered. Corrects vision." + id = "night_visision_goggles_glasses" + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_PLASMA = 350, MAT_URANIUM = 1000) + build_path = /obj/item/clothing/glasses/night/prescription + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_ENGINEERING + +///////////////////////////////////////// +//////////////////Misc/////////////////// +///////////////////////////////////////// + +/datum/design/welding_mask + name = "Welding Gas Mask" + desc = "A gas mask with built in welding goggles and face shield. Looks like a skull, clearly designed by a nerd." + id = "weldingmask" + build_type = PROTOLATHE + materials = list(MAT_METAL = 3000, MAT_GLASS = 1000) + build_path = /obj/item/clothing/mask/gas/welding + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/portaseeder + name = "Portable Seed Extractor" + desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant." + id = "portaseeder" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1000, MAT_GLASS = 400) + build_path = /obj/item/storage/bag/plants/portaseeder + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/air_horn + name = "Air Horn" + desc = "Damn son, where'd you find this?" + id = "air_horn" + build_type = PROTOLATHE + materials = list(MAT_METAL = 4000, MAT_BANANIUM = 1000) + build_path = /obj/item/bikehorn/airhorn + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ALL //HONK! + +/datum/design/magboots + name = "Magnetic Boots" + desc = "Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle." + id = "magboots" + build_type = PROTOLATHE + materials = list(MAT_METAL = 4500, MAT_SILVER = 1500, MAT_GOLD = 2500) + build_path = /obj/item/clothing/shoes/magboots + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/sci_goggles + name = "Science Goggles" + desc = "Goggles fitted with a portable analyzer capable of determining the research worth of an item or components of a machine." + id = "scigoggles" + build_type = PROTOLATHE + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/clothing/glasses/science + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/diskplantgene + name = "Plant Data Disk" + desc = "A disk for storing plant genetic data." + id = "diskplantgene" + build_type = PROTOLATHE + materials = list(MAT_METAL=200, MAT_GLASS=100) + build_path = /obj/item/disk/plantgene + category = list("Electronics") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/roastingstick + name = "Advanced roasting stick" + desc = "A roasting stick for cooking sausages in exotic ovens." + id = "roastingstick" + build_type = PROTOLATHE + materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_BLUESPACE = 250) + build_path = /obj/item/melee/roastingstick + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/locator + name = "Bluespace locator" + desc = "Used to track portable teleportation beacons and targets with embedded tracking implants." + id = "locator" + build_type = PROTOLATHE + materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_SILVER = 500) + build_path = /obj/item/locator + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +///////////////////////////////////////// +////////////Janitor Designs////////////// +///////////////////////////////////////// + +/datum/design/advmop + name = "Advanced Mop" + desc = "An upgraded mop with a large internal capacity for holding water or other cleaning chemicals." + id = "advmop" + build_type = PROTOLATHE + materials = list(MAT_METAL = 2500, MAT_GLASS = 200) + build_path = /obj/item/mop/advanced + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/blutrash + name = "Trashbag of Holding" + desc = "An advanced trash bag with bluespace properties; capable of holding a plethora of garbage." + id = "blutrash" + build_type = PROTOLATHE + materials = list(MAT_GOLD = 1500, MAT_URANIUM = 250, MAT_PLASMA = 1500) + build_path = /obj/item/storage/bag/trash/bluespace + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/buffer + name = "Floor Buffer Upgrade" + desc = "A floor buffer that can be attached to vehicular janicarts." + id = "buffer" + build_type = PROTOLATHE + materials = list(MAT_METAL = 3000, MAT_GLASS = 200) + build_path = /obj/item/janiupgrade + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +///////////////////////////////////////// +////////////Holosign Designs////////////// +///////////////////////////////////////// + +/datum/design/holosign + name = "Holographic Sign Projector" + desc = "A holograpic projector used to project various warning signs." + id = "holosign" + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_GLASS = 1000) + build_path = /obj/item/holosign_creator + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SERVICE + +/datum/design/holosignsec + name = "Security Holobarrier Projector" + desc = "A holographic projector that creates holographic security barriers." + id = "holosignsec" + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) + build_path = /obj/item/holosign_creator/security + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/holosignengi + name = "Engineering Holobarrier Projector" + desc = "A holographic projector that creates holographic engineering barriers." + id = "holosignengi" + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) + build_path = /obj/item/holosign_creator/engineering + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/holosignatmos + name = "ATMOS Holofan Projector" + desc = "A holographic projector that creates holographic barriers that prevent changes in atmospheric conditions." + id = "holosignatmos" + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_GOLD = 1000, MAT_SILVER = 1000) + build_path = /obj/item/holosign_creator/atmos + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/forcefield_projector + name = "Forcefield Projector" + desc = "A device which can project temporary forcefields to seal off an area." + id = "forcefield_projector" + build_type = PROTOLATHE + materials = list(MAT_METAL = 2500, MAT_GLASS = 1000) + build_path = /obj/item/forcefield_projector + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + + +/////////////////////////////// +////////////Tools////////////// +/////////////////////////////// + +/datum/design/exwelder + name = "Experimental Welding Tool" + desc = "An experimental welder capable of self-fuel generation." + id = "exwelder" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_PLASMA = 1500, MAT_URANIUM = 200) + build_path = /obj/item/weldingtool/experimental + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/handdrill + name = "Hand Drill" + desc = "A small electric hand drill with an interchangeable screwdriver and bolt bit" + id = "handdrill" + build_type = PROTOLATHE + materials = list(MAT_METAL = 3500, MAT_SILVER = 1500, MAT_TITANIUM = 2500) + build_path = /obj/item/screwdriver/power + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/jawsoflife + name = "Jaws of Life" + desc = "A small, compact Jaws of Life with an interchangeable pry jaws and cutting jaws" + id = "jawsoflife" // added one more requirment since the Jaws of Life are a bit OP + build_path = /obj/item/crowbar/power + build_type = PROTOLATHE + materials = list(MAT_METAL = 4500, MAT_SILVER = 2500, MAT_TITANIUM = 3500) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/alienwrench + name = "Alien Wrench" + desc = "An advanced wrench obtained through Abductor technology." + id = "alien_wrench" + build_path = /obj/item/wrench/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/alienwirecutters + name = "Alien Wirecutters" + desc = "Advanced wirecutters obtained through Abductor technology." + id = "alien_wirecutters" + build_path = /obj/item/wirecutters/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/alienscrewdriver + name = "Alien Screwdriver" + desc = "An advanced screwdriver obtained through Abductor technology." + id = "alien_screwdriver" + build_path = /obj/item/screwdriver/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/aliencrowbar + name = "Alien Crowbar" + desc = "An advanced crowbar obtained through Abductor technology." + id = "alien_crowbar" + build_path = /obj/item/crowbar/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/alienwelder + name = "Alien Welding Tool" + desc = "An advanced welding tool obtained through Abductor technology." + id = "alien_welder" + build_path = /obj/item/weldingtool/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/alienmultitool + name = "Alien Multitool" + desc = "An advanced multitool obtained through Abductor technology." + id = "alien_multitool" + build_path = /obj/item/multitool/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_TITANIUM = 2000, MAT_DIAMOND = 2000) + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/anomaly_neutralizer + name = "Anomaly Neutralizer" + desc = "An advanced tool capable of instantly neutralizing anomalies, designed to capture the fleeting aberrations created by the engine." + id = "anomaly_neutralizer" + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_GOLD = 2000, MAT_PLASMA = 5000, MAT_URANIUM = 2000) + build_path = /obj/item/anomaly_neutralizer + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING + +///////////////////////////////////////// +////////////Armour/////////////////////// +///////////////////////////////////////// + +/datum/design/reactive_armour + name = "Reactive Armour Shell" + desc = "An experimental suit of armour capable of utilizing an implanted anomaly core to protect the user." + id = "reactive_armour" + build_type = PROTOLATHE + materials = list(MAT_METAL = 10000, MAT_DIAMOND = 5000, MAT_URANIUM = 8000, MAT_SILVER = 4500, MAT_GOLD = 5000) + build_path = /obj/item/reactive_armour_shell + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING + +///////////////////////////////////////// +////////////Meteor/////////////////////// +///////////////////////////////////////// + +/datum/design/meteor_defence + name = "Meteor Defence" + desc = "A blue print of a early model of the Meteor defence turret." + id = "meteor_defence" + build_type = PROTOLATHE + materials = list(MAT_METAL = 50000, MAT_GLASS = 50000, MAT_SILVER = 8500, MAT_GOLD = 8500, MAT_TITANIUM = 7500, MAT_URANIUM = 7500) + build_path = /obj/machinery/satellite/meteor_shield/sci + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/meteor_disk + name = "Meteor Defence Upgrade Disk" + desc = "A disk containing debugging programming to solve and monitor meteors more effectively." + id = "meteor_disk" + build_type = PROTOLATHE + materials = list(MAT_METAL = 1500, MAT_GLASS = 1500, MAT_SILVER = 2500, MAT_GOLD = 1000) + build_path = /obj/item/disk/meteor + category = list("Electronics") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + +/datum/design/board/meteor_console + name = "Computer Design (Meteor Satellite Console)" + desc = "Allows for the construction of circuit boards used to build a new Meteor Satellite monitor console." + id = "meteor_console" + build_path = /obj/item/circuitboard/computer/sat_control + category = list("Computer Boards") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 6670a01284..c7d02486dd 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -1,7 +1,6 @@ /obj/machinery/rnd/production name = "technology fabricator" desc = "Makes researched and prototype items with materials and energy." - container_type = OPENCONTAINER layer = BELOW_OBJ_LAYER var/consoleless_interface = FALSE //Whether it can be used without a console. var/efficiency_coeff = 1 //Materials needed / coeff = actual. @@ -21,7 +20,7 @@ /obj/machinery/rnd/production/Initialize(mapload) . = ..() - create_reagents(0) + create_reagents(0, OPENCONTAINER) matching_designs = list() cached_designs = list() stored_research = new diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm index 5a84f2f663..09cf9cda87 100644 --- a/code/modules/research/machinery/circuit_imprinter.dm +++ b/code/modules/research/machinery/circuit_imprinter.dm @@ -2,7 +2,6 @@ name = "circuit imprinter" desc = "Manufactures circuit boards for the construction of machines." icon_state = "circuit_imprinter" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/circuit_imprinter categories = list( "AI Modules", diff --git a/code/modules/research/machinery/departmental_circuit_imprinter.dm b/code/modules/research/machinery/departmental_circuit_imprinter.dm index e47bd97494..53d4a21a9d 100644 --- a/code/modules/research/machinery/departmental_circuit_imprinter.dm +++ b/code/modules/research/machinery/departmental_circuit_imprinter.dm @@ -2,7 +2,6 @@ name = "department circuit imprinter" desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type." icon_state = "circuit_imprinter" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/circuit_imprinter/department requires_console = FALSE consoleless_interface = TRUE diff --git a/code/modules/research/machinery/departmental_protolathe.dm b/code/modules/research/machinery/departmental_protolathe.dm index f91f3282d5..7fad6825fe 100644 --- a/code/modules/research/machinery/departmental_protolathe.dm +++ b/code/modules/research/machinery/departmental_protolathe.dm @@ -2,7 +2,6 @@ name = "department protolathe" desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type." icon_state = "protolathe" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/protolathe/department requires_console = FALSE consoleless_interface = TRUE diff --git a/code/modules/research/machinery/departmental_techfab.dm b/code/modules/research/machinery/departmental_techfab.dm index cf0e30596f..8b82fd2b37 100644 --- a/code/modules/research/machinery/departmental_techfab.dm +++ b/code/modules/research/machinery/departmental_techfab.dm @@ -2,7 +2,6 @@ name = "department techfab" desc = "An advanced fabricator designed to print out the latest prototypes and circuits researched from Science. Contains hardware to sync to research networks. This one is department-locked and only possesses a limited set of decryption keys." icon_state = "protolathe" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/techfab/department /obj/machinery/rnd/production/techfab/department/engineering diff --git a/code/modules/research/machinery/protolathe.dm b/code/modules/research/machinery/protolathe.dm index ef74fec666..6acfc9ec42 100644 --- a/code/modules/research/machinery/protolathe.dm +++ b/code/modules/research/machinery/protolathe.dm @@ -2,7 +2,6 @@ name = "protolathe" desc = "Converts raw materials into useful objects." icon_state = "protolathe" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/protolathe categories = list( "Power Designs", diff --git a/code/modules/research/machinery/techfab.dm b/code/modules/research/machinery/techfab.dm index 40b407ac61..332a1ccf88 100644 --- a/code/modules/research/machinery/techfab.dm +++ b/code/modules/research/machinery/techfab.dm @@ -2,7 +2,6 @@ name = "technology fabricator" desc = "Produces researched prototypes with raw materials and energy." icon_state = "protolathe" - container_type = OPENCONTAINER circuit = /obj/item/circuitboard/machine/techfab categories = list( "Power Designs", diff --git a/code/modules/research/nanites/nanite_programs.dm b/code/modules/research/nanites/nanite_programs.dm index f691c828c9..a06311f26f 100644 --- a/code/modules/research/nanites/nanite_programs.dm +++ b/code/modules/research/nanites/nanite_programs.dm @@ -57,6 +57,7 @@ deactivate() if(passive_enabled) disable_passive_effect() + on_mob_remove() if(nanites) nanites.programs -= src return ..() @@ -107,6 +108,9 @@ if(activated) //apply activation effects if it starts active activate() +datum/nanite_program/proc/on_mob_remove() + return + /datum/nanite_program/proc/toggle() if(!activated) activate() @@ -115,6 +119,7 @@ /datum/nanite_program/proc/activate() activated = TRUE + timer_counter = activation_delay /datum/nanite_program/proc/deactivate() if(passive_enabled) @@ -135,8 +140,10 @@ if(timer && timer_counter > timer) if(timer_type == NANITE_TIMER_DEACTIVATE) deactivate() + return else if(timer_type == NANITE_TIMER_SELFDELETE) qdel(src) + return else if(can_trigger && timer_type == NANITE_TIMER_TRIGGER) trigger() timer_counter = activation_delay @@ -251,4 +258,3 @@ return "Trigger" if(NANITE_TIMER_RESET) return "Reset Activation Timer" - diff --git a/code/modules/research/nanites/nanite_programs/buffing.dm b/code/modules/research/nanites/nanite_programs/buffing.dm index 578e7731bb..c80c5c5d96 100644 --- a/code/modules/research/nanites/nanite_programs/buffing.dm +++ b/code/modules/research/nanites/nanite_programs/buffing.dm @@ -106,11 +106,11 @@ /datum/nanite_program/conductive/enable_passive_effect() . = ..() - host_mob.add_trait(TRAIT_SHOCKIMMUNE, "nanites") + ADD_TRAIT(host_mob, TRAIT_SHOCKIMMUNE, "nanites") /datum/nanite_program/conductive/disable_passive_effect() . = ..() - host_mob.remove_trait(TRAIT_SHOCKIMMUNE, "nanites") + REMOVE_TRAIT(host_mob, TRAIT_SHOCKIMMUNE, "nanites") /datum/nanite_program/mindshield name = "Mental Barrier" @@ -121,10 +121,10 @@ /datum/nanite_program/mindshield/enable_passive_effect() . = ..() if(!host_mob.mind.has_antag_datum(/datum/antagonist/rev)) //won't work if on a rev, to avoid having implanted revs - host_mob.add_trait(TRAIT_MINDSHIELD, "nanites") + ADD_TRAIT(host_mob, TRAIT_MINDSHIELD, "nanites") host_mob.sec_hud_set_implants() /datum/nanite_program/mindshield/disable_passive_effect() . = ..() - host_mob.remove_trait(TRAIT_MINDSHIELD, "nanites") + REMOVE_TRAIT(host_mob, TRAIT_MINDSHIELD, "nanites") host_mob.sec_hud_set_implants() \ No newline at end of file diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm index df32a5d127..ab314cb33c 100644 --- a/code/modules/research/nanites/nanite_programs/healing.dm +++ b/code/modules/research/nanites/nanite_programs/healing.dm @@ -215,7 +215,7 @@ if(!iscarbon(host_mob)) //nonstandard biology return FALSE var/mob/living/carbon/C = host_mob - if(C.suiciding || C.has_trait(TRAIT_NOCLONE) || C.hellbound) //can't revive + if(C.suiciding || HAS_TRAIT(C, TRAIT_NOCLONE) || C.hellbound) //can't revive return FALSE if((world.time - C.timeofdeath) > 1800) //too late return FALSE diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm index 3d89baba68..a6225fd337 100644 --- a/code/modules/research/nanites/nanite_programs/suppression.dm +++ b/code/modules/research/nanites/nanite_programs/suppression.dm @@ -65,11 +65,11 @@ /datum/nanite_program/pacifying/enable_passive_effect() . = ..() - host_mob.add_trait(TRAIT_PACIFISM, "nanites") + ADD_TRAIT(host_mob, TRAIT_PACIFISM, "nanites") /datum/nanite_program/pacifying/disable_passive_effect() . = ..() - host_mob.remove_trait(TRAIT_PACIFISM, "nanites") + REMOVE_TRAIT(host_mob, TRAIT_PACIFISM, "nanites") /datum/nanite_program/blinding name = "Blindness" @@ -93,11 +93,11 @@ /datum/nanite_program/mute/enable_passive_effect() . = ..() - host_mob.add_trait(TRAIT_MUTE, "nanites") + ADD_TRAIT(host_mob, TRAIT_MUTE, "nanites") /datum/nanite_program/mute/disable_passive_effect() . = ..() - host_mob.remove_trait(TRAIT_MUTE, "nanites") + REMOVE_TRAIT(host_mob, TRAIT_MUTE, "nanites") /datum/nanite_program/fake_death name = "Death Simulation" diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm index 4405401cec..77fb4e1005 100644 --- a/code/modules/research/nanites/nanite_programs/utility.dm +++ b/code/modules/research/nanites/nanite_programs/utility.dm @@ -237,7 +237,11 @@ if(prob(10)) var/list/mob/living/target_hosts = list() for(var/mob/living/L in oview(5, host_mob)) + if(!(MOB_ORGANIC in L.mob_biotypes) && !(MOB_UNDEAD in L.mob_biotypes)) + continue target_hosts += L + if(!target_hosts.len) + return var/mob/living/infectee = pick(target_hosts) if(prob(100 - (infectee.get_permeability_protection() * 100))) //this will potentially take over existing nanites! diff --git a/code/modules/research/research_disk.dm b/code/modules/research/research_disk.dm index 268e6a1be9..2ec2398d88 100644 --- a/code/modules/research/research_disk.dm +++ b/code/modules/research/research_disk.dm @@ -20,3 +20,12 @@ /obj/item/disk/tech_disk/debug/Initialize() . = ..() stored_research = new /datum/techweb/admin + +/obj/item/disk/tech_disk/illegal + name = "Illegal technology disk" + desc = "A technology disk containing schematics for syndicate inspired equipment." + materials = list() + +/obj/item/disk/tech_disk/illegal/Initialize() + . = ..() + stored_research = new /datum/techweb/syndicate diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index dbfca477d6..cd5a190fd6 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -41,6 +41,14 @@ research_points[i] = INFINITY hidden_nodes = list() +/datum/techweb/syndicate + id = "SYNDICATE" + organization = "Syndicate" + +/datum/techweb/syndicate/New() + var/datum/techweb_node/syndicate_basic/Node = new() + research_node(Node, TRUE) + /datum/techweb/science //Global science techweb for RND consoles. id = "SCIENCE" organization = "Nanotrasen" diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index e25dced31c..4331d8858b 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -69,7 +69,7 @@ display_name = "Advanced Biotechnology" description = "Advanced Biotechnology" prereq_ids = list("biotech") - design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med") + design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "defibrillator", "meta_beaker", "healthanalyzer_advanced","harvester","holobarrier_med","smartdartgun","medicinalsmartdart") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -115,7 +115,7 @@ display_name = "Advanced Surgery" description = "When simple medicine doesn't cut it." prereq_ids = list("adv_biotech") - design_ids = list("surgery_lobotomy", "surgery_reconstruction") + design_ids = list("surgery_lobotomy", "surgery_reconstruction", "organbox") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -203,6 +203,24 @@ research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000) export_price = 5000 +/datum/techweb_node/basic_meteor_defense + id = "basic_meteor_defense" + display_name = "Meteor Defense Research" + description = "Unlock the potential of the mysterious of why CC decided to not build these around the station themselves." + prereq_ids = list("adv_engi", "high_efficiency") + design_ids = list("meteor_defence", "meteor_console") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + export_price = 5000 + +//datum/techweb_node/adv_meteor_defense + //id = "adv_meteor_defense" + //display_name = "Meteor Defense Research" + //description = "New and improved coding and lock on tech for meteor defence!" + //prereq_ids = list("basic_meteor_defense", "adv_datatheory", "emp_adv") + //design_ids = list("meteor_disk") + //research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500) + //export_price = 5000 + /////////////////////////Bluespace tech///////////////////////// /datum/techweb_node/bluespace_basic //Bluespace-memery id = "bluespace_basic" @@ -228,7 +246,7 @@ display_name = "Applied Bluespace Research" description = "Using bluespace to make things faster and better." prereq_ids = list("bluespace_basic", "engineering") - design_ids = list("bs_rped","biobag_holding","minerbag_holding", "bluespacebeaker", "bluespacesyringe", "phasic_scanning", "roastingstick", "ore_silo") + design_ids = list("bs_rped","biobag_holding","minerbag_holding", "bluespacebeaker", "bluespacesyringe", "phasic_scanning", "roastingstick", "ore_silo", "bluespacesmartdart") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500) export_price = 5000 diff --git a/code/modules/research/xenobiology/crossbreeding/__corecross.dm b/code/modules/research/xenobiology/crossbreeding/__corecross.dm index d9d58083cb..1146f01f0b 100644 --- a/code/modules/research/xenobiology/crossbreeding/__corecross.dm +++ b/code/modules/research/xenobiology/crossbreeding/__corecross.dm @@ -90,12 +90,11 @@ To add a crossbreed: icon = 'icons/obj/slimecrossing.dmi' icon_state = "base" var/del_on_empty = TRUE - container_type = INJECTABLE | DRAWABLE var/list/list_reagents /obj/item/slimecrossbeaker/Initialize() . = ..() - create_reagents(50) + create_reagents(50, INJECTABLE | DRAWABLE) if(list_reagents) for(var/reagent in list_reagents) reagents.add_reagent(reagent, list_reagents[reagent]) @@ -130,10 +129,13 @@ To add a crossbreed: list_reagents = list("omnizine" = 15) /obj/item/slimecrossbeaker/autoinjector //As with the above, but automatically injects whomever it is used on with contents. - container_type = DRAWABLE //Cannot be refilled, since it's basically an autoinjector! var/ignore_flags = FALSE var/self_use_only = FALSE +/obj/item/slimecrossbeaker/autoinjector/Initialize() + . = ..() + reagents.reagents_holder_flags = DRAWABLE // Cannot be refilled, since it's basically an autoinjector! + /obj/item/slimecrossbeaker/autoinjector/attack(mob/living/M, mob/user) if(!reagents.total_volume) to_chat(user, "[src] is empty!") @@ -169,12 +171,15 @@ To add a crossbreed: list_reagents = list("slimejelly" = 50) /obj/item/slimecrossbeaker/autoinjector/peaceandlove - container_type = null //It won't be *that* easy to get your hands on pax. name = "peaceful distillation" desc = "A light pink gooey sphere. Simply touching it makes you a little dizzy." color = "#DDAAAA" list_reagents = list("synthpax" = 10, "space_drugs" = 15) //Peace, dudes +/obj/item/slimecrossbeaker/autoinjector/peaceandlove/Initialize() + . = ..() + reagents.reagents_holder_flags = NONE // It won't be *that* easy to get your hands on pax. + /obj/item/slimecrossbeaker/autoinjector/slimestimulant name = "invigorating gel" desc = "A bubbling purple mixture, designed to heal and boost movement." diff --git a/code/modules/research/xenobiology/crossbreeding/_clothing.dm b/code/modules/research/xenobiology/crossbreeding/_clothing.dm index 016fd95899..b8bdffbabf 100644 --- a/code/modules/research/xenobiology/crossbreeding/_clothing.dm +++ b/code/modules/research/xenobiology/crossbreeding/_clothing.dm @@ -20,14 +20,14 @@ Slimecrossing Armor /obj/item/clothing/mask/nobreath/equipped(mob/living/carbon/human/user, slot) . = ..() if(slot == SLOT_WEAR_MASK) - user.add_trait(TRAIT_NOBREATH, "breathmask_[REF(src)]") + ADD_TRAIT(user, TRAIT_NOBREATH, "breathmask_[REF(src)]") user.failed_last_breath = FALSE user.clear_alert("not_enough_oxy") user.apply_status_effect(/datum/status_effect/rebreathing) /obj/item/clothing/mask/nobreath/dropped(mob/living/carbon/human/user) ..() - user.remove_trait(TRAIT_NOBREATH, "breathmask_[REF(src)]") + REMOVE_TRAIT(user, TRAIT_NOBREATH, "breathmask_[REF(src)]") user.remove_status_effect(/datum/status_effect/rebreathing) /obj/item/clothing/glasses/prism_glasses @@ -112,11 +112,11 @@ Slimecrossing Armor /obj/item/clothing/head/peaceflower/equipped(mob/living/carbon/human/user, slot) . = ..() if(slot == SLOT_HEAD) - user.add_trait(TRAIT_PACIFISM, "peaceflower_[REF(src)]") + ADD_TRAIT(user, TRAIT_PACIFISM, "peaceflower_[REF(src)]") /obj/item/clothing/head/peaceflower/dropped(mob/living/carbon/human/user) ..() - user.remove_trait(TRAIT_PACIFISM, "peaceflower_[REF(src)]") + REMOVE_TRAIT(user, TRAIT_PACIFISM, "peaceflower_[REF(src)]") /obj/item/clothing/head/peaceflower/attack_hand(mob/user) if(iscarbon(user)) diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm index 0784946a37..b28f1676a1 100644 --- a/code/modules/research/xenobiology/crossbreeding/_misc.dm +++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm @@ -56,7 +56,7 @@ if(last_check_time + 50 < world.time) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.mind && !H.has_trait(TRAIT_AGEUSIA)) + if(H.mind && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"That didn't taste very good...") //No disgust, though. It's just not good tasting. GET_COMPONENT_FROM(mood, /datum/component/mood, H) if(mood) diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index aba54cfdf3..ad5bfa27dc 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -11,7 +11,7 @@ /datum/status_effect/rainbow_protection/on_apply() owner.status_flags |= GODMODE - owner.add_trait(TRAIT_PACIFISM, "slimestatus") + ADD_TRAIT(owner, TRAIT_PACIFISM, "slimestatus") owner.visible_message("[owner] shines with a brilliant rainbow light.", "You feel protected by an unknown force!") originalcolor = owner.color @@ -24,7 +24,7 @@ /datum/status_effect/rainbow_protection/on_remove() owner.status_flags &= ~GODMODE owner.color = originalcolor - owner.remove_trait(TRAIT_PACIFISM, "slimestatus") + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "slimestatus") owner.visible_message("[owner] stops glowing, the rainbow light fading away.", "You no longer feel protected...") @@ -246,12 +246,12 @@ datum/status_effect/rebreathing/tick() duration = 100 /datum/status_effect/firecookie/on_apply() - owner.add_trait(TRAIT_RESISTCOLD,"firecookie") + ADD_TRAIT(owner, TRAIT_RESISTCOLD,"firecookie") owner.adjust_bodytemperature(110) return ..() /datum/status_effect/firecookie/on_remove() - owner.remove_trait(TRAIT_RESISTCOLD,"firecookie") + REMOVE_TRAIT(owner, TRAIT_RESISTCOLD,"firecookie") /datum/status_effect/watercookie id = "watercookie" @@ -260,7 +260,7 @@ datum/status_effect/rebreathing/tick() duration = 100 /datum/status_effect/watercookie/on_apply() - owner.add_trait(TRAIT_NOSLIPWATER,"watercookie") + ADD_TRAIT(owner, TRAIT_NOSLIPWATER,"watercookie") return ..() /datum/status_effect/watercookie/tick() @@ -268,7 +268,7 @@ datum/status_effect/rebreathing/tick() T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = 5) /datum/status_effect/watercookie/on_remove() - owner.remove_trait(TRAIT_NOSLIPWATER,"watercookie") + REMOVE_TRAIT(owner, TRAIT_NOSLIPWATER,"watercookie") /datum/status_effect/metalcookie id = "metalcookie" @@ -313,11 +313,11 @@ datum/status_effect/rebreathing/tick() duration = 600 /datum/status_effect/toxincookie/on_apply() - owner.add_trait(TRAIT_TOXINLOVER,"toxincookie") + ADD_TRAIT(owner, TRAIT_TOXINLOVER,"toxincookie") return ..() /datum/status_effect/toxincookie/on_remove() - owner.remove_trait(TRAIT_TOXINLOVER,"toxincookie") + REMOVE_TRAIT(owner, TRAIT_TOXINLOVER,"toxincookie") /datum/status_effect/timecookie id = "timecookie" @@ -417,11 +417,11 @@ datum/status_effect/rebreathing/tick() duration = 30 /datum/status_effect/plur/on_apply() - owner.add_trait(TRAIT_PACIFISM, "peacecookie") + ADD_TRAIT(owner, TRAIT_PACIFISM, "peacecookie") return ..() /datum/status_effect/plur/on_remove() - owner.remove_trait(TRAIT_PACIFISM, "peacecookie") + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "peacecookie") /datum/status_effect/adamantinecookie id = "adamantinecookie" @@ -515,11 +515,11 @@ datum/status_effect/rebreathing/tick() colour = "blue" /datum/status_effect/stabilized/blue/on_apply() - owner.add_trait(TRAIT_NOSLIPWATER, "slimestatus") + ADD_TRAIT(owner, TRAIT_NOSLIPWATER, "slimestatus") return ..() datum/status_effect/stabilized/blue/on_remove() - owner.remove_trait(TRAIT_NOSLIPWATER, "slimestatus") + REMOVE_TRAIT(owner, TRAIT_NOSLIPWATER, "slimestatus") /datum/status_effect/stabilized/metal id = "stabilizedmetal" @@ -580,7 +580,7 @@ datum/status_effect/stabilized/blue/on_remove() examine_text = "Their fingertips burn brightly!" /datum/status_effect/stabilized/darkpurple/on_apply() - owner.add_trait(TRAIT_RESISTHEATHANDS, "slimestatus") + ADD_TRAIT(owner, TRAIT_RESISTHEATHANDS, "slimestatus") fire = new(owner) return ..() @@ -596,7 +596,7 @@ datum/status_effect/stabilized/blue/on_remove() return ..() /datum/status_effect/stabilized/darkpurple/on_remove() - owner.remove_trait(TRAIT_RESISTHEATHANDS, "slimestatus") + REMOVE_TRAIT(owner, TRAIT_RESISTHEATHANDS, "slimestatus") qdel(fire) /datum/status_effect/stabilized/darkblue @@ -767,11 +767,11 @@ datum/status_effect/stabilized/blue/on_remove() colour = "red" /datum/status_effect/stabilized/red/on_apply() - owner.add_trait(TRAIT_IGNORESLOWDOWN,"slimestatus") + owner.ignore_slowdown("slimestatus") return ..() /datum/status_effect/stabilized/red/on_remove() - owner.remove_trait(TRAIT_IGNORESLOWDOWN,"slimestatus") + owner.unignore_slowdown("slimestatus") /datum/status_effect/stabilized/green id = "stabilizedgreen" @@ -916,7 +916,7 @@ datum/status_effect/stabilized/blue/on_remove() colour = "light pink" /datum/status_effect/stabilized/lightpink/on_apply() - owner.add_trait(TRAIT_GOTTAGOFAST,"slimestatus") + ADD_TRAIT(owner, TRAIT_GOTTAGOFAST,"slimestatus") return ..() /datum/status_effect/stabilized/lightpink/tick() @@ -927,7 +927,7 @@ datum/status_effect/stabilized/blue/on_remove() return ..() /datum/status_effect/stabilized/lightpink/on_remove() - owner.remove_trait(TRAIT_GOTTAGOFAST,"slimestatus") + REMOVE_TRAIT(owner, TRAIT_GOTTAGOFAST,"slimestatus") /datum/status_effect/stabilized/adamantine id = "stabilizedadamantine" diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm index 3b2131dd81..38362e6d64 100644 --- a/code/modules/research/xenobiology/crossbreeding/burning.dm +++ b/code/modules/research/xenobiology/crossbreeding/burning.dm @@ -7,12 +7,11 @@ Burning extracts: name = "burning extract" desc = "It's boiling over with barely-contained energy." effect = "burning" - container_type = INJECTABLE | DRAWABLE icon_state = "burning" /obj/item/slimecross/burning/Initialize() . = ..() - create_reagents(10) + create_reagents(10, INJECTABLE | DRAWABLE) /obj/item/slimecross/burning/attack_self(mob/user) if(!reagents.has_reagent("plasma",10)) diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm index b664380d9e..7b5fe9e8b8 100644 --- a/code/modules/research/xenobiology/crossbreeding/charged.dm +++ b/code/modules/research/xenobiology/crossbreeding/charged.dm @@ -8,12 +8,11 @@ Charged extracts: name = "charged extract" desc = "It sparks with electric power." effect = "charged" - container_type = INJECTABLE | DRAWABLE icon_state = "charged" /obj/item/slimecross/charged/Initialize() . = ..() - create_reagents(10) + create_reagents(10, INJECTABLE | DRAWABLE) /obj/item/slimecross/charged/attack_self(mob/user) if(!reagents.has_reagent("plasma",10)) @@ -427,7 +426,7 @@ Charged extracts: else to_chat(user, "You drink the pacification potion!") if(isanimal(M)) - M.add_trait(TRAIT_PACIFISM, MAGIC_TRAIT) + ADD_TRAIT(M, TRAIT_PACIFISM, MAGIC_TRAIT) else if(iscarbon(M)) var/mob/living/carbon/C = M C.gain_trauma(/datum/brain_trauma/severe/pacifism, TRAUMA_RESILIENCE_SURGERY) diff --git a/code/modules/research/xenobiology/crossbreeding/chilling.dm b/code/modules/research/xenobiology/crossbreeding/chilling.dm index 25dbaa461f..881c830e5e 100644 --- a/code/modules/research/xenobiology/crossbreeding/chilling.dm +++ b/code/modules/research/xenobiology/crossbreeding/chilling.dm @@ -7,12 +7,11 @@ Chilling extracts: name = "chilling extract" desc = "It's cold to the touch, as if frozen solid." effect = "chilling" - container_type = INJECTABLE | DRAWABLE icon_state = "chilling" /obj/item/slimecross/chilling/Initialize() . = ..() - create_reagents(10) + create_reagents(10, INJECTABLE | DRAWABLE) /obj/item/slimecross/chilling/attack_self(mob/user) if(!reagents.has_reagent("plasma",10)) @@ -101,10 +100,9 @@ Chilling extracts: for(var/turf/open/T in A) var/datum/gas_mixture/G = T.air if(istype(G)) - G.assert_gas(/datum/gas/plasma) - G.gases[/datum/gas/plasma][MOLES] = 0 + G.gases[/datum/gas/plasma] = 0 filtered = TRUE - G.garbage_collect() + GAS_GARBAGE_COLLECT(G.gases) T.air_update_turf() if(filtered) user.visible_message("Cracks spread throughout [src], and some air is sucked in!") diff --git a/code/modules/research/xenobiology/crossbreeding/industrial.dm b/code/modules/research/xenobiology/crossbreeding/industrial.dm index 2ab39eb06f..4d39d956e7 100644 --- a/code/modules/research/xenobiology/crossbreeding/industrial.dm +++ b/code/modules/research/xenobiology/crossbreeding/industrial.dm @@ -5,7 +5,6 @@ Industrial extracts: /obj/item/slimecross/industrial name = "industrial extract" desc = "A gel-like, sturdy extract, fond of plasma and industry." - container_type = INJECTABLE | DRAWABLE effect = "industrial" icon_state = "industrial_still" var/plasmarequired = 2 //Units of plasma required to be consumed to produce item. @@ -22,7 +21,7 @@ Industrial extracts: /obj/item/slimecross/industrial/Initialize() . = ..() - create_reagents(100) + create_reagents(100, INJECTABLE | DRAWABLE) START_PROCESSING(SSobj,src) /obj/item/slimecross/industrial/Destroy() diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 0af9cb9011..db460ad72b 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -10,7 +10,6 @@ throwforce = 0 throw_speed = 3 throw_range = 6 - container_type = INJECTABLE | DRAWABLE grind_results = list() var/Uses = 1 // uses before it goes inert var/qdel_timer = null // deletion timer, for delayed reactions @@ -39,7 +38,7 @@ /obj/item/slime_extract/Initialize() . = ..() - create_reagents(100) + create_reagents(100, INJECTABLE | DRAWABLE) /obj/item/slime_extract/on_grind() if(Uses) diff --git a/code/modules/ruins/lavaland_ruin_code.dm b/code/modules/ruins/lavaland_ruin_code.dm index b8d19a7018..92a637ce43 100644 --- a/code/modules/ruins/lavaland_ruin_code.dm +++ b/code/modules/ruins/lavaland_ruin_code.dm @@ -16,6 +16,17 @@ /obj/item/seeds/sunflower/moonflower = 8 ) +/obj/item/disk/design_disk/plant_disk + name = "Plant Disk Blueprints" + desc = "A disk to be uploaded into the autolathen for more plant disks." + icon_state = "datadisk1" + max_blueprints = 1 + +/obj/item/disk/design_disk/plant_disk/Initialize() + . = ..() + var/datum/design/diskplantgene/P = new + blueprints[1] = P + //Free Golems /obj/item/disk/design_disk/golem_shell @@ -70,7 +81,11 @@ /obj/item/stack/sheet/cloth = /datum/species/golem/cloth, /obj/item/stack/sheet/mineral/adamantine = /datum/species/golem/adamantine, /obj/item/stack/sheet/plastic = /datum/species/golem/plastic, - /obj/item/stack/tile/brass = /datum/species/golem/clockwork) + /obj/item/stack/tile/brass = /datum/species/golem/clockwork, + /obj/item/stack/tile/bronze = /datum/species/golem/bronze, + /obj/item/stack/sheet/cardboard = /datum/species/golem/cardboard, + /obj/item/stack/sheet/leather = /datum/species/golem/leather, + /obj/item/stack/sheet/bone = /datum/species/golem/bone) if(istype(I, /obj/item/stack)) var/obj/item/stack/O = I diff --git a/code/modules/spells/spell_types/construct_spells.dm b/code/modules/spells/spell_types/construct_spells.dm index 39066ae4a9..bb3cc1f7e3 100644 --- a/code/modules/spells/spell_types/construct_spells.dm +++ b/code/modules/spells/spell_types/construct_spells.dm @@ -146,11 +146,14 @@ clothes_req = 0 invocation = "none" invocation_type = "none" + proj_type = /obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile/lesser proj_lifespan = 10 max_targets = 6 action_icon_state = "magicm" action_background_icon_state = "bg_demon" +/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile/lesser + amt_knockdown = 84 /obj/effect/proc_holder/spell/targeted/smoke/disable name = "Paralysing Smoke" @@ -304,7 +307,8 @@ name = "Gauntlet Echo" alpha = 180 amt_dam_brute = 30 - amt_knockdown = 50 + amt_knockdown = 84 + amt_dam_stam = 30 sound = 'sound/weapons/punch3.ogg' /obj/effect/proc_holder/spell/targeted/inflict_handler/juggernaut/cast(list/targets,mob/user = usr) diff --git a/code/modules/spells/spell_types/genetic.dm b/code/modules/spells/spell_types/genetic.dm index 37fca86f46..02d3c087f6 100644 --- a/code/modules/spells/spell_types/genetic.dm +++ b/code/modules/spells/spell_types/genetic.dm @@ -26,7 +26,7 @@ for(var/A in mutations) target.dna.add_mutation(A) for(var/A in traits) - target.add_trait(A, GENETICS_SPELL) + ADD_TRAIT(target, A, GENETICS_SPELL) active_on += target addtimer(CALLBACK(src, .proc/remove, target), duration) @@ -41,4 +41,4 @@ for(var/A in mutations) target.dna.remove_mutation(A) for(var/A in traits) - target.remove_trait(A, GENETICS_SPELL) \ No newline at end of file + REMOVE_TRAIT(target, A, GENETICS_SPELL) \ No newline at end of file diff --git a/code/modules/spells/spell_types/inflict_handler.dm b/code/modules/spells/spell_types/inflict_handler.dm index da0af7a601..25bdc7c9d2 100644 --- a/code/modules/spells/spell_types/inflict_handler.dm +++ b/code/modules/spells/spell_types/inflict_handler.dm @@ -3,10 +3,12 @@ desc = "This spell blinds and/or destroys/damages/heals and/or knockdowns/stuns the target." var/amt_knockdown = 0 + var/amt_hardstun var/amt_unconscious = 0 var/amt_stun = 0 //set to negatives for healing + var/amt_dam_stam var/amt_dam_fire = 0 var/amt_dam_brute = 0 var/amt_dam_oxy = 0 @@ -41,7 +43,10 @@ target.adjustToxLoss(amt_dam_tox) target.adjustOxyLoss(amt_dam_oxy) //disabling - target.Knockdown(amt_knockdown) + if(!amt_knockdown && amt_dam_stam) + target.adjustStaminaLoss(amt_dam_stam) + else + target.Knockdown(amt_knockdown, override_hardstun = amt_hardstun, amt_dam_stam) target.Unconscious(amt_unconscious) target.Stun(amt_stun) diff --git a/code/modules/spells/spell_types/rod_form.dm b/code/modules/spells/spell_types/rod_form.dm index 06f38b8346..5a532db7ac 100644 --- a/code/modules/spells/spell_types/rod_form.dm +++ b/code/modules/spells/spell_types/rod_form.dm @@ -28,7 +28,6 @@ /obj/effect/immovablerod/wizard var/max_distance = 13 var/damage_bonus = 0 - var/mob/living/wizard var/turf/start_turf notify = FALSE diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm index aec0e7806b..c4d2c34a71 100644 --- a/code/modules/spells/spell_types/wizard.dm +++ b/code/modules/spells/spell_types/wizard.dm @@ -28,7 +28,8 @@ sound = 'sound/magic/magic_missile.ogg' /obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile - amt_knockdown = 60 + amt_knockdown = 120 + amt_hardstun = 5 sound = 'sound/magic/mm_hit.ogg' /obj/effect/proc_holder/spell/targeted/genetic/mutate @@ -262,7 +263,7 @@ action_icon_state = "repulse" -/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets,mob/user = usr, var/stun_amt = 40) +/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets,mob/user = usr, stun_amt = 50) var/list/thrownatoms = list() var/atom/throwtarget var/distfromcaster @@ -286,14 +287,14 @@ if(distfromcaster == 0) if(isliving(AM)) var/mob/living/M = AM - M.Knockdown(100) + M.Knockdown(100, override_hardstun = 20) M.adjustBruteLoss(5) to_chat(M, "You're slammed into the floor by [user]!") else new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own if(isliving(AM)) var/mob/living/M = AM - M.Knockdown(stun_amt) + M.Knockdown(stun_amt, override_hardstun = stun_amt * 0.2) to_chat(M, "You're thrown back by [user]!") AM.throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time. diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 7f291be674..3073a6fcc3 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -258,25 +258,25 @@ var/obj/item/organ/lungs/L = H.internal_organs_slot[ORGAN_SLOT_LUNGS] L.tox_breath_dam_min = 0 L.tox_breath_dam_max = 0 - H.add_trait(TRAIT_VIRUSIMMUNE, "dna_vault") + ADD_TRAIT(H, TRAIT_VIRUSIMMUNE, "dna_vault") if(VAULT_NOBREATH) to_chat(H, "Your lungs feel great.") - H.add_trait(TRAIT_NOBREATH, "dna_vault") + ADD_TRAIT(H, TRAIT_NOBREATH, "dna_vault") if(VAULT_FIREPROOF) to_chat(H, "You feel fireproof.") S.burnmod = 0.5 - H.add_trait(TRAIT_RESISTHEAT, "dna_vault") - H.add_trait(TRAIT_NOFIRE, "dna_vault") + ADD_TRAIT(H, TRAIT_RESISTHEAT, "dna_vault") + ADD_TRAIT(H, TRAIT_NOFIRE, "dna_vault") if(VAULT_STUNTIME) to_chat(H, "Nothing can keep you down for long.") S.stunmod = 0.5 if(VAULT_ARMOUR) to_chat(H, "You feel tough.") S.armor = 30 - H.add_trait(TRAIT_PIERCEIMMUNE, "dna_vault") + ADD_TRAIT(H, TRAIT_PIERCEIMMUNE, "dna_vault") if(VAULT_SPEED) to_chat(H, "Your legs feel faster.") - H.add_trait(TRAIT_GOTTAGOFAST, "dna_vault") + ADD_TRAIT(H, TRAIT_GOTTAGOFAST, "dna_vault") if(VAULT_QUICK) to_chat(H, "Your arms move as fast as lightning.") H.next_move_modifier = 0.5 diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 44746e595e..98f5534d06 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -134,6 +134,31 @@ speed_process = TRUE var/kill_range = 14 +/obj/machinery/satellite/meteor_shield/sci + name = "\improper Meteor Shield Satellite" + desc = "A station made meteor point-defense satellite." + mode = "M-SHIELD" + +/obj/item/disk/meteor + name = "Meteor Shield Upgrade Disk" + desc = "A floppy disk that allows meteor shields to fire at longer ranges and lowers meteor drawing from gravitational fields.." + +/obj/machinery/satellite/meteor_shield/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/disk/meteor)) + to_chat(user, "The disk uploads better tracking and rang modification software.") + kill_range = 17 + else + return ..() + +/obj/machinery/satellite/meteor_shield/sci/toggle(user) + if(!..(user)) + return FALSE + if(obj_flags & EMAGGED) + if(active) + change_meteor_chance(8) + else + change_meteor_chance(0.125) + /obj/machinery/satellite/meteor_shield/proc/space_los(meteor) for(var/turf/T in getline(src,meteor)) if(!isspaceturf(T)) @@ -177,4 +202,4 @@ obj_flags |= EMAGGED to_chat(user, "You access the satellite's debug mode, increasing the chance of meteor strikes.") if(active) - change_meteor_chance(2) + change_meteor_chance(4) diff --git a/code/modules/surgery/advanced/brainwashing.dm b/code/modules/surgery/advanced/brainwashing.dm index f4db9ddbee..23783f1bf2 100644 --- a/code/modules/surgery/advanced/brainwashing.dm +++ b/code/modules/surgery/advanced/brainwashing.dm @@ -41,7 +41,7 @@ if(!target.mind) user.visible_message("[target] doesn't respond to the brainwashing, as if [target.p_they()] lacked a mind...") return FALSE - if(target.has_trait(TRAIT_MINDSHIELD)) + if(HAS_TRAIT(target, TRAIT_MINDSHIELD)) user.visible_message("You hear a faint buzzing from a device inside [target]'s brain, and the brainwashing is erased.") return FALSE user.visible_message("[user] successfully brainwashes [target]!", "You succeed in brainwashing [target].") diff --git a/code/modules/surgery/advanced/revival.dm b/code/modules/surgery/advanced/revival.dm index 0cd7a64235..ebda8a04e2 100644 --- a/code/modules/surgery/advanced/revival.dm +++ b/code/modules/surgery/advanced/revival.dm @@ -18,7 +18,7 @@ return FALSE if(target.stat != DEAD) return FALSE - if(target.suiciding || target.has_trait(TRAIT_NOCLONE) || target.hellbound) + if(target.suiciding || HAS_TRAIT(target, TRAIT_NOCLONE) || target.hellbound) return FALSE var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN) if(!B) diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 230347fae5..a97a133685 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -21,7 +21,7 @@ var/held_index = 0 //are we a hand? if so, which one! var/is_pseudopart = FALSE //For limbs that don't really exist, eg chainsaws - var/disabled = FALSE //If TRUE, limb is as good as missing + var/disabled = BODYPART_NOT_DISABLED //If disabled, limb is as good as missing var/body_damage_coeff = 1 //Multiplier of the limb's damage that gets applied to the mob var/stam_damage_coeff = 0.5 var/brutestate = 0 @@ -88,7 +88,7 @@ /obj/item/bodypart/attack(mob/living/carbon/C, mob/user) if(ishuman(C)) var/mob/living/carbon/human/H = C - if(C.has_trait(TRAIT_LIMBATTACHMENT)) + if(HAS_TRAIT(C, TRAIT_LIMBATTACHMENT)) if(!H.get_bodypart(body_zone) && !animal_origin) if(H == user) H.visible_message("[H] jams [src] into [H.p_their()] empty socket!",\ @@ -189,7 +189,7 @@ if(stamina > DAMAGE_PRECISION) owner.update_stamina() consider_processing() - check_disabled() + update_disabled() return update_bodypart_damage_state() //Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all. @@ -209,7 +209,7 @@ if(owner && updating_health) owner.updatehealth() consider_processing() - check_disabled() + update_disabled() return update_bodypart_damage_state() //Returns total damage. @@ -220,15 +220,33 @@ return total //Checks disabled status thresholds -/obj/item/bodypart/proc/check_disabled() - if(!can_dismember() || owner.has_trait(TRAIT_NODISMEMBER)) + +//Checks disabled status thresholds +/obj/item/bodypart/proc/update_disabled() + set_disabled(is_disabled()) + +/obj/item/bodypart/proc/is_disabled() + if(HAS_TRAIT(owner, TRAIT_PARALYSIS)) + return BODYPART_DISABLED_PARALYSIS + if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER)) + . = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled + if((get_damage(TRUE) >= max_damage)) + return BODYPART_DISABLED_DAMAGE + if(disabled && (get_damage(TRUE) <= (max_damage * 0.5))) + return BODYPART_NOT_DISABLED + else + return BODYPART_NOT_DISABLED + +/obj/item/bodypart/proc/check_disabled() //This might be depreciated and should be safe to remove. + if(!can_dismember() || HAS_TRAIT(owner, TRAIT_NODISMEMBER)) return if(!disabled && (get_damage(TRUE) >= max_damage)) set_disabled(TRUE) else if(disabled && (get_damage(TRUE) <= (max_damage * 0.5))) set_disabled(FALSE) -/obj/item/bodypart/proc/set_disabled(new_disabled = TRUE) + +/obj/item/bodypart/proc/set_disabled(new_disabled) if(disabled == new_disabled) return disabled = new_disabled @@ -284,7 +302,7 @@ C = owner no_update = FALSE - if(C.has_trait(TRAIT_HUSK) && is_organic_limb()) + if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb()) species_id = "husk" //overrides species_id dmg_overlay_type = "" //no damage overlay shown when husked should_draw_gender = FALSE @@ -546,6 +564,11 @@ max_stamina_damage = 200 var/obj/item/cavity_item +/obj/item/bodypart/chest/can_dismember(obj/item/I) + if(!((owner.stat == DEAD) || owner.InFullCritical())) + return FALSE + return ..() + /obj/item/bodypart/chest/Destroy() if(cavity_item) qdel(cavity_item) @@ -601,13 +624,27 @@ px_y = 0 stam_heal_tick = 2 -/obj/item/bodypart/l_arm/set_disabled(new_disabled = TRUE) - ..() - if(disabled) - to_chat(owner, "Your [name] is too damaged to function!") - owner.emote("scream") +/obj/item/bodypart/l_arm/is_disabled() + if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM)) + return BODYPART_DISABLED_PARALYSIS + return ..() + +/obj/item/bodypart/l_arm/set_disabled(new_disabled) + . = ..() + if(disabled == new_disabled) + return + if(disabled == BODYPART_DISABLED_DAMAGE) + if(owner.stat > UNCONSCIOUS) + owner.emote("scream") + if(. && (owner.stat > DEAD)) + to_chat(owner, "Your [name] is too damaged to function!") if(held_index) owner.dropItemToGround(owner.get_item_for_held_index(held_index)) + else if(disabled == BODYPART_DISABLED_PARALYSIS) + if(. && (owner.stat > DEAD)) + to_chat(owner, "You can't feel your [name]!") + if(held_index) + owner.dropItemToGround(owner.get_item_for_held_index(held_index)) if(owner.hud_used) var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"] if(L) @@ -652,18 +689,33 @@ stam_heal_tick = 2 max_stamina_damage = 50 -/obj/item/bodypart/r_arm/set_disabled(new_disabled = TRUE) - ..() - if(disabled) - to_chat(owner, "Your [name] is too damaged to function!") - owner.emote("scream") +/obj/item/bodypart/r_arm/is_disabled() + if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM)) + return BODYPART_DISABLED_PARALYSIS + return ..() + +/obj/item/bodypart/r_arm/set_disabled(new_disabled) + . = ..() + if(disabled == new_disabled) + return + if(disabled == BODYPART_DISABLED_DAMAGE) + if(owner.stat > UNCONSCIOUS) + owner.emote("scream") + if(. && (owner.stat > DEAD)) + to_chat(owner, "Your [name] is too damaged to function!") if(held_index) owner.dropItemToGround(owner.get_item_for_held_index(held_index)) + else if(disabled == BODYPART_DISABLED_PARALYSIS) + if(. && (owner.stat > DEAD)) + to_chat(owner, "You can't feel your [name]!") + if(held_index) + owner.dropItemToGround(owner.get_item_for_held_index(held_index)) if(owner.hud_used) var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"] if(R) R.update_icon() + /obj/item/bodypart/r_arm/monkey icon = 'icons/mob/animal_parts.dmi' icon_state = "default_monkey_r_arm" @@ -700,11 +752,24 @@ stam_heal_tick = 2 max_stamina_damage = 50 -/obj/item/bodypart/l_leg/set_disabled(new_disabled = TRUE) - ..() - if(disabled) - to_chat(owner, "Your [name] is too damaged to function!") - owner.emote("scream") +/obj/item/bodypart/l_leg/is_disabled() + if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG)) + return BODYPART_DISABLED_PARALYSIS + return ..() + +/obj/item/bodypart/l_leg/set_disabled(new_disabled) + . = ..() + if(disabled == new_disabled) + return + if(disabled == BODYPART_DISABLED_DAMAGE) + if(owner.stat > UNCONSCIOUS) + owner.emote("scream") + if(. && (owner.stat > DEAD)) + to_chat(owner, "Your [name] is too damaged to function!") + else if(disabled == BODYPART_DISABLED_PARALYSIS) + if(. && (owner.stat > DEAD)) + to_chat(owner, "You can't feel your [name]!") + /obj/item/bodypart/l_leg/digitigrade name = "left digitigrade leg" @@ -747,11 +812,23 @@ max_stamina_damage = 50 stam_heal_tick = 2 -/obj/item/bodypart/r_leg/set_disabled(new_disabled = TRUE) - ..() - if(disabled) - to_chat(owner, "Your [name] is too damaged to function!") - owner.emote("scream") +/obj/item/bodypart/r_leg/is_disabled() + if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG)) + return BODYPART_DISABLED_PARALYSIS + return ..() + +/obj/item/bodypart/r_leg/set_disabled(new_disabled) + . = ..() + if(disabled == new_disabled) + return + if(disabled == BODYPART_DISABLED_DAMAGE) + if(owner.stat > UNCONSCIOUS) + owner.emote("scream") + if(. && (owner.stat > DEAD)) + to_chat(owner, "Your [name] is too damaged to function!") + else if(disabled == BODYPART_DISABLED_PARALYSIS) + if(. && (owner.stat > DEAD)) + to_chat(owner, "You can't feel your [name]!") /obj/item/bodypart/r_leg/digitigrade name = "right digitigrade leg" diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 1a46a9dcb1..9341fb6c25 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -12,7 +12,7 @@ return FALSE if(C.status_flags & GODMODE) return FALSE - if(C.has_trait(TRAIT_NODISMEMBER)) + if(HAS_TRAIT(C, TRAIT_NODISMEMBER)) return FALSE var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST) @@ -47,7 +47,7 @@ var/mob/living/carbon/C = owner if(!dismemberable) return FALSE - if(C.has_trait(TRAIT_NODISMEMBER)) + if(HAS_TRAIT(C, TRAIT_NODISMEMBER)) return FALSE . = list() var/organ_spilled = 0 diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index 1f0fa00632..46ee10a3fd 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -68,7 +68,7 @@ C = owner real_name = C.real_name - if(C.has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(C, TRAIT_HUSK)) real_name = "Unknown" hair_style = "Bald" facial_hair_style = "Shaved" diff --git a/code/modules/surgery/lipoplasty.dm b/code/modules/surgery/lipoplasty.dm index 7bc7553023..9967eba663 100644 --- a/code/modules/surgery/lipoplasty.dm +++ b/code/modules/surgery/lipoplasty.dm @@ -4,7 +4,7 @@ possible_locs = list(BODY_ZONE_CHEST) /datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target) - if(target.has_trait(TRAIT_FAT)) + if(HAS_TRAIT(target, TRAIT_FAT)) return 1 return 0 diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index ad07ce7238..f09258f19f 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -129,11 +129,14 @@ holder = null if(contents.len == 1) Extend(contents[1]) - else // TODO: make it similar to borg's storage-like module selection - var/obj/item/choise = input("Activate which item?", "Arm Implant", null, null) as null|anything in items_list - if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && istype(choise) && (choise in contents)) - // This monster sanity check is a nice example of how bad input() is. - Extend(choise) + else + var/list/choice_list = list() + for(var/obj/item/I in items_list) + choice_list[I] = getFlatIcon(I) + var/obj/item/choice = show_radial_menu(owner, owner, choice_list) + if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && (choice in contents)) + // This monster sanity check is a nice example of how bad input is. + Extend(choice) else Retract() diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index 787175e05d..0e3793d2e4 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -98,3 +98,8 @@ /obj/item/autosurgeon/reviver starting_organ = /obj/item/organ/cyberimp/chest/reviver + +/obj/item/autosurgeon/penis + desc = "A single use autosurgeon that contains a penis. A screwdriver can be used to remove it, but implants can't be placed back in." + uses = 1 + starting_organ = /obj/item/organ/genital/penis diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index c54d3bb532..8e191a41a9 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -25,7 +25,7 @@ return var/mob/living/carbon/C = owner // genetic deafness prevents the body from using the ears, even if healthy - if(C.has_trait(TRAIT_DEAF)) + if(HAS_TRAIT(C, TRAIT_DEAF)) deaf = max(deaf, 1) else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs. ear_damage = max(ear_damage - 0.05, 0) @@ -37,7 +37,7 @@ var/mob/living/carbon/C = owner - if(iscarbon(owner) && C.has_trait(TRAIT_DEAF)) + if(iscarbon(owner) && HAS_TRAIT(C, TRAIT_DEAF)) deaf = 1 /obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf) @@ -94,3 +94,9 @@ H.dna.features["ears"] = "None" H.dna.species.mutant_bodyparts -= "ears" H.update_body() + +/obj/item/organ/ears/bronze + name = "tin ears" + desc = "The robust ears of a bronze golem. " + damage_multiplier = 0.1 //STRONK + bang_protect = 1 //Fear me weaklings. diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 9f42cf0baa..98abb2528a 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -26,7 +26,7 @@ HMN.regenerate_icons() else eye_color = HMN.eye_color - if(HMN.has_trait(TRAIT_NIGHT_VISION) && !lighting_alpha) + if(HAS_TRAIT(HMN, TRAIT_NIGHT_VISION) && !lighting_alpha) lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT see_in_dark = 8 M.update_tint() diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index ee767566e6..f666fc209b 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -25,7 +25,7 @@ //slowly heal liver damage damage = max(0, damage - 0.1) - if(filterToxins && !owner.has_trait(TRAIT_TOXINLOVER)) + if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER)) //handle liver toxin filtration for(var/I in C.reagents.reagent_list) var/datum/reagent/pickedreagent = I diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 1e22796b1b..64be29c339 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -58,7 +58,7 @@ /obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) if((H.status_flags & GODMODE)) return - if(H.has_trait(TRAIT_NOBREATH)) + if(HAS_TRAIT(H, TRAIT_NOBREATH)) return if(!breath || (breath.total_moles() == 0)) @@ -66,7 +66,7 @@ return if(H.health >= H.crit_threshold) H.adjustOxyLoss(HUMAN_MAX_OXYLOSS) - else if(!H.has_trait(TRAIT_NOCRITDAMAGE)) + else if(!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE)) H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) H.failed_last_breath = TRUE @@ -84,13 +84,11 @@ var/list/breath_gases = breath.gases - breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/nitryl, /datum/gas/pluoxium, /datum/gas/stimulum) - //Partial pressures in our breath - var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES])) - var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES]) - var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES]) - var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES]) + var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium])) + var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen]) + var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma]) + var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide]) //-- OXY --// @@ -98,7 +96,7 @@ //Too much oxygen! //Yes, some species may not like it. if(safe_oxygen_max) if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check. - var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10 + var/ratio = (breath_gases[/datum/gas/oxygen]/safe_oxygen_max) * 10 H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type) H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy) @@ -121,18 +119,18 @@ //Too little oxygen! if(safe_oxygen_min) if(O2_pp < safe_oxygen_min) - gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen][MOLES]) + gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen]) H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) H.adjustOxyLoss(-5) - gas_breathed = breath_gases[/datum/gas/oxygen][MOLES] + gas_breathed = breath_gases[/datum/gas/oxygen] H.clear_alert("not_enough_oxy") //Exhale - breath_gases[/datum/gas/oxygen][MOLES] -= gas_breathed - breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed + breath_gases[/datum/gas/oxygen] -= gas_breathed + breath_gases[/datum/gas/carbon_dioxide] += gas_breathed gas_breathed = 0 //-- Nitrogen --// @@ -140,7 +138,7 @@ //Too much nitrogen! if(safe_nitro_max) if(N2_pp > safe_nitro_max) - var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10 + var/ratio = (breath_gases[/datum/gas/nitrogen]/safe_nitro_max) * 10 H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type) H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro) H.losebreath += 2 @@ -150,18 +148,18 @@ //Too little nitrogen! if(safe_nitro_min) if(N2_pp < safe_nitro_min) - gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen][MOLES]) + gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen]) H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro) else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) H.adjustOxyLoss(-5) - gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES] + gas_breathed = breath_gases[/datum/gas/nitrogen] H.clear_alert("nitro") //Exhale - breath_gases[/datum/gas/nitrogen][MOLES] -= gas_breathed - breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed + breath_gases[/datum/gas/nitrogen] -= gas_breathed + breath_gases[/datum/gas/carbon_dioxide] += gas_breathed gas_breathed = 0 //-- CO2 --// @@ -187,18 +185,18 @@ //Too little CO2! if(safe_co2_min) if(CO2_pp < safe_co2_min) - gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide][MOLES]) + gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide]) H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) H.adjustOxyLoss(-5) - gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES] + gas_breathed = breath_gases[/datum/gas/carbon_dioxide] H.clear_alert("not_enough_co2") //Exhale - breath_gases[/datum/gas/carbon_dioxide][MOLES] -= gas_breathed - breath_gases[/datum/gas/oxygen][MOLES] += gas_breathed + breath_gases[/datum/gas/carbon_dioxide] -= gas_breathed + breath_gases[/datum/gas/oxygen] += gas_breathed gas_breathed = 0 @@ -207,7 +205,7 @@ //Too much toxins! if(safe_toxins_max) if(Toxins_pp > safe_toxins_max) - var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10 + var/ratio = (breath_gases[/datum/gas/plasma]/safe_toxins_max) * 10 H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type) H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox) else @@ -217,18 +215,18 @@ //Too little toxins! if(safe_toxins_min) if(Toxins_pp < safe_toxins_min) - gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma][MOLES]) + gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma]) H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) else H.failed_last_breath = FALSE if(H.health >= H.crit_threshold) H.adjustOxyLoss(-5) - gas_breathed = breath_gases[/datum/gas/plasma][MOLES] + gas_breathed = breath_gases[/datum/gas/plasma] H.clear_alert("not_enough_tox") //Exhale - breath_gases[/datum/gas/plasma][MOLES] -= gas_breathed - breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed + breath_gases[/datum/gas/plasma] -= gas_breathed + breath_gases[/datum/gas/carbon_dioxide] += gas_breathed gas_breathed = 0 @@ -238,7 +236,7 @@ // N2O - var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide][MOLES]) + var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide]) if(SA_pp > SA_para_min) // Enough to make us stunned for a bit H.Unconscious(60) // 60 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 @@ -249,7 +247,7 @@ // BZ - var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz][MOLES]) + var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz]) if(bz_pp > BZ_trip_balls_min) H.hallucination += 10 H.reagents.add_reagent("bz_metabolites",5) @@ -262,14 +260,14 @@ // Tritium - var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES]) + var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium]) if (trit_pp > 50) H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up. else H.radiation += trit_pp/10 // Nitryl - var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl][MOLES]) + var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl]) if (prob(nitryl_pp)) to_chat(H, "Your mouth feels like it's burning!") if (nitryl_pp >40) @@ -280,22 +278,22 @@ H.silent = max(H.silent, 3) else H.adjustFireLoss(nitryl_pp/4) - gas_breathed = breath_gases[/datum/gas/nitryl][MOLES] + gas_breathed = breath_gases[/datum/gas/nitryl] if (gas_breathed > gas_stimulation_min) H.reagents.add_reagent("no2",1) - breath_gases[/datum/gas/nitryl][MOLES]-=gas_breathed + breath_gases[/datum/gas/nitryl]-=gas_breathed // Stimulum - gas_breathed = breath_gases[/datum/gas/stimulum][MOLES] + gas_breathed = breath_gases[/datum/gas/stimulum] if (gas_breathed > gas_stimulation_min) var/existing = H.reagents.get_reagent_amount("stimulum") H.reagents.add_reagent("stimulum",max(0, 1 - existing)) - breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed + breath_gases[/datum/gas/stimulum]-=gas_breathed // Miasma if (breath_gases[/datum/gas/miasma]) - var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma][MOLES]) + var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma]) //Miasma sickness if(prob(0.5 * miasma_pp)) @@ -334,14 +332,14 @@ // Then again, this is a purely hypothetical scenario and hardly reachable owner.adjust_disgust(0.1 * miasma_pp) - breath_gases[/datum/gas/miasma][MOLES]-=gas_breathed + breath_gases[/datum/gas/miasma]-=gas_breathed // Clear out moods when no miasma at all else SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell") handle_breath_temperature(breath, H) - breath.garbage_collect() + GAS_GARBAGE_COLLECT(breath.gases) return TRUE @@ -365,7 +363,7 @@ /obj/item/organ/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures var/breath_temperature = breath.temperature - if(!H.has_trait(TRAIT_RESISTCOLD)) // COLD DAMAGE + if(!HAS_TRAIT(H, TRAIT_RESISTCOLD)) // COLD DAMAGE var/cold_modifier = H.dna.species.coldmod if(breath_temperature < cold_level_3_threshold) H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type) @@ -377,7 +375,7 @@ if(prob(20)) to_chat(H, "You feel [cold_message] in your [name]!") - if(!H.has_trait(TRAIT_RESISTHEAT)) // HEAT DAMAGE + if(!HAS_TRAIT(H, TRAIT_RESISTHEAT)) // HEAT DAMAGE var/heat_modifier = H.dna.species.heatmod if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold) H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 1408bff60c..b16967b6b0 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -110,7 +110,7 @@ var/breathes = TRUE var/blooded = TRUE if(dna && dna.species) - if(has_trait(TRAIT_NOBREATH, SPECIES_TRAIT)) + if(HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT)) breathes = FALSE if(NOBLOOD in dna.species.species_traits) blooded = FALSE diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index 3a3dd6a1dd..54482ade73 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -13,8 +13,8 @@ user.visible_message("[user] begins to alter [target]'s appearance.", "You begin to alter [target]'s appearance...") /datum/surgery_step/reshape_face/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - if(target.has_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)) - target.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) + if(HAS_TRAIT_FROM(target, TRAIT_DISFIGURED, TRAIT_GENERIC)) + REMOVE_TRAIT(target, TRAIT_DISFIGURED, TRAIT_GENERIC) user.visible_message("[user] successfully restores [target]'s appearance!", "You successfully restore [target]'s appearance.") else var/list/names = list() diff --git a/code/modules/unit_tests/reagent_recipe_collisions.dm b/code/modules/unit_tests/reagent_recipe_collisions.dm index 31027c2cd3..20e875422f 100644 --- a/code/modules/unit_tests/reagent_recipe_collisions.dm +++ b/code/modules/unit_tests/reagent_recipe_collisions.dm @@ -11,57 +11,5 @@ for(var/i2 in (i+1) to reactions.len) var/datum/chemical_reaction/r1 = reactions[i] var/datum/chemical_reaction/r2 = reactions[i2] - if(recipes_do_conflict(r1, r2)) + if(chem_recipes_do_conflict(r1, r2)) Fail("Chemical recipe conflict between [r1.type] and [r2.type]") - -/datum/unit_test/reagent_recipe_collisions/proc/recipes_do_conflict(datum/chemical_reaction/r1, datum/chemical_reaction/r2) - //do the non-list tests first, because they are cheaper - if(r1.required_container != r2.required_container) - return FALSE - if(r1.is_cold_recipe == r2.is_cold_recipe) - if(r1.required_temp != r2.required_temp) - //one reaction requires a more extreme temperature than the other, so there is no conflict - return FALSE - else - var/datum/chemical_reaction/cold_one = r1.is_cold_recipe ? r1 : r2 - var/datum/chemical_reaction/warm_one = r1.is_cold_recipe ? r2 : r1 - if(cold_one.required_temp < warm_one.required_temp) - //the range of temperatures does not overlap, so there is no conflict - return FALSE - - //find the reactions with the shorter and longer required_reagents list - var/datum/chemical_reaction/long_req - var/datum/chemical_reaction/short_req - if(r1.required_reagents.len > r2.required_reagents.len) - long_req = r1 - short_req = r2 - else if(r1.required_reagents.len < r2.required_reagents.len) - long_req = r2 - short_req = r1 - else - //if they are the same length, sort instead by the length of the catalyst list - //this is important if the required_reagents lists are the same - if(r1.required_catalysts.len > r2.required_catalysts.len) - long_req = r1 - short_req = r2 - else - long_req = r2 - short_req = r1 - - - //check if the shorter reaction list is a subset of the longer one - var/list/overlap = r1.required_reagents & r2.required_reagents - if(overlap.len != short_req.required_reagents.len) - //there is at least one reagent in the short list that is not in the long list, so there is no conflict - return FALSE - - //check to see if the shorter reaction's catalyst list is also a subset of the longer reaction's catalyst list - //if the longer reaction's catalyst list is a subset of the shorter ones, that is fine - //if the reaction lists are the same, the short reaction will have the shorter required_catalysts list, so it will register as a conflict - var/list/short_minus_long_catalysts = short_req.required_catalysts - long_req.required_catalysts - if(short_minus_long_catalysts.len) - //there is at least one unique catalyst for the short reaction, so there is no conflict - return FALSE - - //if we got this far, the longer reaction will be impossible to create if the shorter one is earlier in GLOB.chemical_reactions_list, and will require the reagents to be added in a particular order otherwise - return TRUE \ No newline at end of file diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index a5872b6741..af1c954c5b 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -109,72 +109,194 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/discounts category = "Discounted Gear" -// Nuclear Operative (Special Offers) -/datum/uplink_item/nukeoffer - category = "Special Offers" +//All bundles and telecrystals +/datum/uplink_item/bundles_TC + category = "Bundles and Telecrystals" surplus = 0 - include_modes = list(/datum/game_mode/nuclear) cant_discount = TRUE -/datum/uplink_item/nukeoffer/c20r - name = "C-20r bundle" - desc = "Old faithful: The classic C-20r, bundled with two magazines, and a (surplus) suppressor at discount price." - item = /obj/item/storage/backpack/duffelbag/syndie/c20rbundle - cost = 14 // normally 16 - -/datum/uplink_item/nukeoffer/bulldog - name = "Bulldog bundle" - desc = "Lean and mean: Optimised for people that want to get up close and personal. Contains the popular \ - Bulldog shotgun, two 12g drums, and a pair of Thermal imaging goggles." - item = /obj/item/storage/backpack/duffelbag/syndie/bulldogbundle - cost = 13 // normally 16 - -/datum/uplink_item/nukeoffer/medical - name = "Medical bundle" - desc = "The support specialist: Aid your fellow operatives with this medical bundle. Contains a Donksoft machine gun, \ - a box of ammo, and a pair of magboots to rescue your friends in no-gravity environments." - item = /obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle - cost = 15 // normally 20 - -/datum/uplink_item/nukeoffer/sniper - name = "Sniper bundle" - desc = "Elegant and refined: Contains a collapsed sniper rifle in an expensive carrying case, a hollow-point \ - a soporific knockout magazine, a free surplus supressor, and a worn out suit and tie." - item = /obj/item/storage/briefcase/sniperbundle - cost = 20 // normally 26 - -/datum/uplink_item/nukeoffer/chemical +/datum/uplink_item/bundles_TC/chemical name = "Bioterror bundle" desc = "For the madman: Contains Bioterror spray, Bioterror grenade, chemicals, syringe gun, box of syringes,\ Donksoft assault rifle, and some darts. Remember: Seal suit and equip internals before use." item = /obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle cost = 30 // normally 42 + include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/nukeoffer/firestarter +/datum/uplink_item/bundles_TC/bulldog + name = "Bulldog bundle" + desc = "Lean and mean: Optimised for people that want to get up close and personal. Contains the popular \ + Bulldog shotgun, two 12g drums, and a pair of Thermal imaging goggles." + item = /obj/item/storage/backpack/duffelbag/syndie/bulldogbundle + cost = 13 // normally 16 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/c20r + name = "C-20r bundle" + desc = "Old faithful: The classic C-20r, bundled with two magazines, and a (surplus) suppressor at discount price." + item = /obj/item/storage/backpack/duffelbag/syndie/c20rbundle + cost = 14 // normally 16 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/cybernetics_bundle + name = "Cybernetic Implants Bundle" + desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. Comes with an autosurgeon." + item = /obj/item/storage/box/cyber_implants + cost = 40 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/medical + name = "Medical bundle" + desc = "The support specialist: Aid your fellow operatives with this medical bundle. Contains a Donksoft machine gun, \ + a box of ammo, and a pair of magboots to rescue your friends in no-gravity environments." + item = /obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle + cost = 15 // normally 20 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/modular + name = "Modular Pistol Kit" + desc = "A heavy briefcase containing one modular pistol (chambered in 10mm), one supressor, and spare ammunition, including a box of soporific ammo. \ + Includes a suit jacket that is padded with a robust liner." + item = /obj/item/storage/briefcase/modularbundle + cost = 12 + +/datum/uplink_item/bundles_TC/shredder + name = "Shredder bundle" + desc = "A truly horrific weapon designed simply to maim its victim, the CX Shredder is banned by several intergalactic treaties. \ + You'll get two of them with this. And spare ammo to boot. And we'll throw in an extra elite hardsuit and chest rig to hold them all!" + item = /obj/item/storage/backpack/duffelbag/syndie/shredderbundle + cost = 30 // normally 41 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/sniper + name = "Sniper bundle" + desc = "Elegant and refined: Contains a collapsed sniper rifle in an expensive carrying case, a hollow-point \ + a soporific knockout magazine, a free surplus supressor, and a worn out suit and tie." + item = /obj/item/storage/briefcase/sniperbundle + cost = 20 // normally 26 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/firestarter name = "Spetsnaz Pyro bundle" desc = "For systematic suppression of carbon lifeforms in close range: Contains a specialist Pyrotechnic equipment, foreign pistol, two magazines, a pipebomb, and a stimulant syringe." item = /obj/item/storage/backpack/duffelbag/syndie/firestarter cost = 30 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/bundles_TC/bundle + name = "Syndicate Bundle" + desc = "Syndicate Bundles are specialized groups of items that arrive in a plain box. \ + These items are collectively worth more than 20 telecrystals, but you do not know which specialization \ + you will receive." + item = /obj/item/storage/box/syndicate + cost = 20 + exclude_modes = list(/datum/game_mode/nuclear) + cant_discount = TRUE + +/datum/uplink_item/bundles_TC/surplus + name = "Syndicate Surplus Crate" + desc = "A dusty crate from the back of the Syndicate warehouse. Rumored to contain a valuable assortment of items, \ + but you never know. Contents are sorted to always be worth 50 TC." + item = /obj/structure/closet/crate + cost = 20 + player_minimum = 25 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + cant_discount = TRUE + var/starting_crate_value = 50 + +/datum/uplink_item/bundles_TC/surplus/super + name = "Super Surplus Crate" + desc = "A dusty SUPER-SIZED from the back of the Syndicate warehouse. Rumored to contain a valuable assortment of items, \ + but you never know. Contents are sorted to always be worth 125 TC." + cost = 40 + player_minimum = 40 + starting_crate_value = 125 + +/datum/uplink_item/bundles_TC/surplus/purchase(mob/user, datum/component/uplink/U) + var/list/uplink_items = get_uplink_items(SSticker && SSticker.mode? SSticker.mode : null, FALSE) + + var/crate_value = starting_crate_value + var/obj/structure/closet/crate/C = spawn_item(/obj/structure/closet/crate, user) + if(U.purchase_log) + U.purchase_log.LogPurchase(C, src, cost) + while(crate_value) + var/category = pick(uplink_items) + var/item = pick(uplink_items[category]) + var/datum/uplink_item/I = uplink_items[category][item] + + if(!I.surplus || prob(100 - I.surplus)) + continue + if(crate_value < I.cost) + continue + crate_value -= I.cost + var/obj/goods = new I.item(C) + if(U.purchase_log) + U.purchase_log.LogPurchase(goods, I, 0) + return C + +/datum/uplink_item/bundles_TC/random + name = "Random Item" + desc = "Picking this will purchase a random item. Useful if you have some TC to spare or if you haven't decided on a strategy yet." + item = /obj/effect/gibspawner/generic // non-tangible item because techwebs use this path to determine illegal tech + cost = 0 + cant_discount = TRUE + +/datum/uplink_item/bundles_TC/random/purchase(mob/user, datum/component/uplink/U) + var/list/uplink_items = U.uplink_items + var/list/possible_items = list() + for(var/category in uplink_items) + for(var/item in uplink_items[category]) + var/datum/uplink_item/I = uplink_items[category][item] + if(src == I || !I.item) + continue + if(U.telecrystals < I.cost) + continue + if(I.limited_stock == 0) + continue + possible_items += I + + if(possible_items.len) + var/datum/uplink_item/I = pick(possible_items) + SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(I.name)) + U.MakePurchase(user, I) + +/datum/uplink_item/bundles_TC/telecrystal + name = "1 Raw Telecrystal" + desc = "A telecrystal in its rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." + item = /obj/item/stack/telecrystal + cost = 1 + surplus = 0 + cant_discount = TRUE + // Don't add telecrystals to the purchase_log since + // it's just used to buy more items (including itself!) + purchase_log_vis = FALSE + +/datum/uplink_item/bundles_TC/telecrystal/five + name = "5 Raw Telecrystals" + desc = "Five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." + item = /obj/item/stack/telecrystal/five + cost = 5 + +/datum/uplink_item/bundles_TC/telecrystal/twenty + name = "20 Raw Telecrystals" + desc = "Twenty telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." + item = /obj/item/stack/telecrystal/twenty + cost = 20 // Dangerous Items /datum/uplink_item/dangerous category = "Conspicuous and Dangerous Weapons" -/datum/uplink_item/dangerous/pistol - name = "Stechkin Pistol" - desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible \ - with suppressors." - item = /obj/item/gun/ballistic/automatic/pistol - cost = 7 - exclude_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/dangerous/revolver - name = "Syndicate Revolver" - desc = "A brutally simple syndicate revolver that fires .357 Magnum rounds and has 7 chambers." - item = /obj/item/gun/ballistic/revolver - cost = 13 - surplus = 50 - exclude_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/dangerous/antitank + name = "Anti Tank Pistol" + desc = "Essentially amounting to a sniper rifle with no stock and barrel (or indeed, any rifling at all), \ + this extremely dubious pistol is guaranteed to dislocate your wrists and hit the broad side of a barn! \ + Uses sniper ammo. \ + Bullets tend to veer off-course. We are not responsible for any unintentional damage or injury resulting from inaacuracy." + item = /obj/item/gun/ballistic/automatic/pistol/antitank/syndicate + cost = 14 + surplus = 25 + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/dangerous/pie_cannon name = "Banana Cream Pie Cannon" @@ -184,6 +306,42 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 0 include_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/dangerous/bananashield + name = "Bananium Energy Shield" + desc = "A clown's most powerful defensive weapon, this personal shield provides near immunity to ranged energy attacks \ + by bouncing them back at the ones who fired them. It can also be thrown to bounce off of people, slipping them, \ + and returning to you even if you miss. WARNING: DO NOT ATTEMPT TO STAND ON SHIELD WHILE DEPLOYED, EVEN IF WEARING ANTI-SLIP SHOES." + item = /obj/item/shield/energy/bananium + cost = 16 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/dangerous/clownsword + name = "Bananium Energy Sword" + desc = "An energy sword that deals no damage, but will slip anyone it contacts, be it by melee attack, thrown \ + impact, or just stepping on it. Beware friendly fire, as even anti-slip shoes will not protect against it." + item = /obj/item/melee/transforming/energy/sword/bananium + cost = 3 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/dangerous/bioterror + name = "Biohazardous Chemical Sprayer" + desc = "A chemical sprayer that allows a wide dispersal of selected chemicals. Especially tailored by the Tiger \ + Cooperative, the deadly blend it comes stocked with will disorient, damage, and disable your foes... \ + Use with extreme caution, to prevent exposure to yourself and your fellow operatives." + item = /obj/item/reagent_containers/spray/chemsprayer/bioterror + cost = 20 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/dangerous/throwingweapons + name = "Box of Throwing Weapons" + desc = "A box of shurikens and reinforced bolas from ancient Earth martial arts. They are highly effective \ + throwing weapons. The bolas can knock a target down and the shurikens will embed into limbs." + item = /obj/item/storage/box/syndie_kit/throwing_weapons + cost = 3 + /datum/uplink_item/dangerous/shotgun name = "Bulldog Shotgun" desc = "A fully-loaded semi-automatic drum-fed shotgun. Compatible with all 12g rounds. Designed for close \ @@ -202,86 +360,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 40 include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/dangerous/carbine - name = "M-90gl Carbine" - desc = "A fully-loaded, specialized three-round burst carbine that fires 5.56mm ammunition from a 30 round magazine \ - with a togglable 40mm under-barrel grenade launcher." - item = /obj/item/gun/ballistic/automatic/m90 - cost = 18 - surplus = 50 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/machinegun - name = "L6 Squad Automatic Weapon" - desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \ - This deadly weapon has a massive 50-round magazine of devastating 1.95x129mm ammunition." - item = /obj/item/gun/ballistic/automatic/l6_saw - cost = 18 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/grenadier - name = "Grenadier's belt" - desc = "A belt of a large variety of lethally dangerous and destructive grenades." - item = /obj/item/storage/belt/grenade/full - include_modes = list(/datum/game_mode/nuclear) - cost = 22 - surplus = 0 - -/datum/uplink_item/dangerous/sniper - name = "Sniper Rifle" - desc = "Ranged fury, Syndicate style. Guaranteed to cause shock and awe or your TC back!" - item = /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate - cost = 16 - surplus = 25 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/bolt_action - name = "Surplus Rifle" - desc = "A horribly outdated bolt action weapon. You've got to be desperate to use this." - item = /obj/item/gun/ballistic/shotgun/boltaction - cost = 2 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/crossbow - name = "Miniature Energy Crossbow" - desc = "A short bow mounted across a tiller in miniature. Small enough to \ - fit into a pocket or slip into a bag unnoticed. It will synthesize \ - and fire bolts tipped with a paralyzing toxin that will briefly stun \ - targets and cause them to slur as if inebriated. It can produce an \ - infinite number of bolts, but takes time to automatically recharge \ - after each shot." - item = /obj/item/gun/energy/kinetic_accelerator/crossbow - cost = 12 - surplus = 50 - exclude_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/flamethrower - name = "Flamethrower" - desc = "A flamethrower, fueled by a portion of highly flammable biotoxins stolen previously from Nanotrasen \ - stations. Make a statement by roasting the filth in their own greed. Use with caution." - item = /obj/item/flamethrower/full/tank - cost = 4 - surplus = 40 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/dangerous/sword - name = "Energy Sword" - desc = "The energy sword is an edged weapon with a blade of pure energy. The sword is small enough to be \ - pocketed when inactive. Activating it produces a loud, distinctive noise." - item = /obj/item/melee/transforming/energy/sword/saber - cost = 8 - exclude_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/dangerous/clownsword - name = "Bananium Energy Sword" - desc = "An energy sword that deals no damage, but will slip anyone it contacts, be it by melee attack, thrown \ - impact, or just stepping on it. Beware friendly fire, as even anti-slip shoes will not protect against it." - item = /obj/item/melee/transforming/energy/sword/bananium - cost = 3 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) - /datum/uplink_item/dangerous/doublesword name = "Double-Bladed Energy Sword" desc = "The double-bladed energy sword does slightly more damage than a standard energy sword and will deflect \ @@ -294,6 +372,90 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/dangerous/doublesword/get_discount() return pick(4;0.8,2;0.65,1;0.5) +/datum/uplink_item/dangerous/cxneb + name = "Dragon's Tooth Non-Eutactic Blade" + desc = "An illegal modification of a weapon that is functionally identical to the energy sword, \ + the Non-Eutactic Blade (NEB) forges a hardlight blade on-demand, \ + generating an extremely sharp, unbreakable edge that is guaranteed to satisfy your every need. \ + This particular model has a polychromic hardlight generator, allowing you to murder in style! \ + The illegal modifications bring this weapon up to par with the classic energy sword, and also gives it the energy sword's distinctive sounds." + item = /obj/item/melee/transforming/energy/sword/cx/traitor + cost = 8 + +/datum/uplink_item/dangerous/sword + name = "Energy Sword" + desc = "The energy sword is an edged weapon with a blade of pure energy. The sword is small enough to be \ + pocketed when inactive. Activating it produces a loud, distinctive noise." + item = /obj/item/melee/transforming/energy/sword/saber + cost = 8 + exclude_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/dangerous/shield + name = "Energy Shield" + desc = "An incredibly useful personal shield projector, capable of reflecting energy projectiles and defending \ + against other attacks. Pair with an Energy Sword for a killer combination." + item = /obj/item/shield/energy + cost = 16 + surplus = 20 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/dangerous/flamethrower + name = "Flamethrower" + desc = "A flamethrower, fueled by a portion of highly flammable biotoxins stolen previously from Nanotrasen \ + stations. Make a statement by roasting the filth in their own greed. Use with caution." + item = /obj/item/flamethrower/full/tank + cost = 4 + surplus = 40 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/dangerous/flechettegun + name = "Flechette Launcher" + desc = "A compact bullpup that fires micro-flechettes.\ + Flechettes have very poor performance idividually, but can be very deadly in numbers. \ + Pre-loaded with armor piercing flechettes that are capable of puncturing most kinds of armor." + item = /obj/item/gun/ballistic/automatic/flechette + cost = 12 + surplus = 30 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/badass/rapid + name = "Gloves of the North Star" + desc = "These gloves let the user punch people very fast. Does not improve weapon attack speed or the meaty fists of a hulk." + item = /obj/item/clothing/gloves/rapid + cost = 8 + +/datum/uplink_item/dangerous/guardian + name = "Holoparasites" + desc = "Though capable of near sorcerous feats via use of hardlight holograms and nanomachines, they require an \ + organic host as a home base and source of fuel." + item = /obj/item/storage/box/syndie_kit/guardian + cost = 15 + refundable = TRUE + cant_discount = TRUE + surplus = 0 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + player_minimum = 25 + restricted = TRUE + refund_path = /obj/item/guardiancreator/tech/choose/traitor + +/datum/uplink_item/dangerous/machinegun + name = "L6 Squad Automatic Weapon" + desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \ + This deadly weapon has a massive 50-round magazine of devastating 1.95x129mm ammunition." + item = /obj/item/gun/ballistic/automatic/l6_saw + cost = 18 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/dangerous/carbine + name = "M-90gl Carbine" + desc = "A fully-loaded, specialized three-round burst carbine that fires 5.56mm ammunition from a 30 round magazine \ + with a togglable 40mm under-barrel grenade launcher." + item = /obj/item/gun/ballistic/automatic/m90 + cost = 18 + surplus = 50 + include_modes = list(/datum/game_mode/nuclear) + /datum/uplink_item/dangerous/powerfist name = "Power Fist" desc = "The power-fist is a metal gauntlet with a built-in piston-ram powered by an external gas supply.\ @@ -303,38 +465,36 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/melee/powerfist cost = 8 -/datum/uplink_item/dangerous/emp - name = "EMP Grenades and Implanter Kit" - desc = "A box that contains two EMP grenades and an EMP implant. Useful to disrupt communication, \ - security's energy weapons, and silicon lifeforms when you're in a tight spot." - item = /obj/item/storage/box/syndie_kit/emp - cost = 2 +/datum/uplink_item/dangerous/sniper + name = "Sniper Rifle" + desc = "Ranged fury, Syndicate style. Guaranteed to cause shock and awe or your TC back!" + item = /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate + cost = 16 + surplus = 25 + include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/dangerous/syndicate_minibomb - name = "Syndicate Minibomb" - desc = "The minibomb is a grenade with a five-second fuse. Upon detonation, it will create a small hull breach \ - in addition to dealing high amounts of damage to nearby personnel." - item = /obj/item/grenade/syndieminibomb - cost = 6 +/datum/uplink_item/dangerous/pistol + name = "Stechkin Pistol" + desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible \ + with suppressors." + item = /obj/item/gun/ballistic/automatic/pistol + cost = 7 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/dangerous/bombanana - name = "Bombanana" - desc = "A banana with an explosive taste! discard the peel quickly, as it will explode with the force of a syndicate minibomb \ - a few seconds after the banana is eaten." - item = /obj/item/reagent_containers/food/snacks/grown/banana/bombanana - cost = 4 //it is a bit cheaper than a minibomb because you have to take off your helmet to eat it, which is how you arm it - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/dangerous/bolt_action + name = "Surplus Rifle" + desc = "A horribly outdated bolt action weapon. You've got to be desperate to use this." + item = /obj/item/gun/ballistic/shotgun/boltaction + cost = 2 + include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/dangerous/tearstache - name = "Teachstache Grenade" - desc = "A teargas grenade that launches sticky moustaches onto the face of anyone not wearing a clown or mime mask. The moustaches will \ - remain attached to the face of all targets for one minute, preventing the use of breath masks and other such devices." - item = /obj/item/grenade/chem_grenade/teargas/moustache - cost = 3 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/dangerous/revolver + name = "Syndicate Revolver" + desc = "A brutally simple syndicate revolver that fires .357 Magnum rounds and has 7 chambers." + item = /obj/item/gun/ballistic/revolver/syndie + cost = 13 + surplus = 50 + exclude_modes = list(/datum/game_mode/nuclear/clown_ops) /datum/uplink_item/dangerous/foamsmg name = "Toy Submachine Gun" @@ -353,65 +513,132 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 0 include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/dangerous/viscerators - name = "Viscerator Delivery Grenade" - desc = "A unique grenade that deploys a swarm of viscerators upon activation, which will chase down and shred \ - any non-operatives in the area." - item = /obj/item/grenade/spawnergrenade/manhacks - cost = 5 - surplus = 35 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/dangerous/foampistol + name = "Toy Gun with Riot Darts" + desc = "An innocent-looking toy pistol designed to fire foam darts. Comes loaded with riot-grade \ + darts effective at incapacitating a target." + item = /obj/item/gun/ballistic/automatic/toy/pistol/riot + cost = 3 + surplus = 10 -/datum/uplink_item/dangerous/bioterrorfoam - name = "Chemical Foam Grenade" - desc = "A powerful chemical foam grenade which creates a deadly torrent of foam that will mute, blind, confuse, \ - mutate, and irritate carbon lifeforms. Specially brewed by Tiger Cooperative chemical weapons specialists \ - using additional spore toxin. Ensure suit is sealed before use." - item = /obj/item/grenade/chem_grenade/bioterrorfoam - cost = 5 - surplus = 35 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) +// Stealthy Weapons +/datum/uplink_item/stealthy_weapons + category = "Stealthy and Inconspicuous Weapons" -/datum/uplink_item/dangerous/bioterror - name = "Biohazardous Chemical Sprayer" - desc = "A chemical sprayer that allows a wide dispersal of selected chemicals. Especially tailored by the Tiger \ - Cooperative, the deadly blend it comes stocked with will disorient, damage, and disable your foes... \ - Use with extreme caution, to prevent exposure to yourself and your fellow operatives." - item = /obj/item/reagent_containers/spray/chemsprayer/bioterror - cost = 20 +/datum/uplink_item/stealthy_weapons/combatglovesplus + name = "Combat Gloves Plus" + desc = "A pair of gloves that are fireproof and shock resistant, however unlike the regular Combat Gloves this one uses nanotechnology \ + to learn the abilities of krav maga to the wearer." + item = /obj/item/clothing/gloves/krav_maga/combatglovesplus + cost = 5 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) surplus = 0 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/stealthy_weapons/virus_grenade - name = "Fungal Tuberculosis Grenade" - desc = "A primed bio-grenade packed into a compact box. Comes with five Bio Virus Antidote Kit (BVAK) \ - autoinjectors for rapid application on up to two targets each, a syringe, and a bottle containing \ - the BVAK solution." - item = /obj/item/storage/box/syndie_kit/tuberculosisgrenade - cost = 8 - surplus = 35 +/datum/uplink_item/stealthy_weapons/cqc + name = "CQC Manual" + desc = "A manual that teaches a single user tactical Close-Quarters Combat before self-destructing." + item = /obj/item/book/granter/martial/cqc include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - restricted = TRUE + cost = 13 + surplus = 0 -/datum/uplink_item/dangerous/guardian - name = "Holoparasites" - desc = "Though capable of near sorcerous feats via use of hardlight holograms and nanomachines, they require an \ - organic host as a home base and source of fuel." - item = /obj/item/storage/box/syndie_kit/guardian - cost = 18 +/datum/uplink_item/stealthy_weapons/dart_pistol + name = "Dart Pistol" + desc = "A miniaturized version of a normal syringe gun. It is very quiet when fired and can fit into any \ + space a small item can." + item = /obj/item/gun/syringe/syndicate + cost = 4 + surplus = 50 + +/datum/uplink_item/stealthy_weapons/dehy_carp + name = "Dehydrated Space Carp" + desc = "Looks like a plush toy carp, but just add water and it becomes a real-life space carp! Activate in \ + your hand before use so it knows not to kill you." + item = /obj/item/toy/plush/carpplushie/dehy_carp + cost = 1 + +/datum/uplink_item/stealthy_weapons/edagger + name = "Energy Dagger" + desc = "A dagger made of energy that looks and functions as a pen when off." + item = /obj/item/pen/edagger + cost = 2 + +/datum/uplink_item/stealthy_weapons/martialarts + name = "Martial Arts Scroll" + desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \ + deflecting all ranged weapon fire, but you also refuse to use dishonorable ranged weaponry." + item = /obj/item/book/granter/martial/carp + cost = 17 surplus = 0 exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - player_minimum = 25 - restricted = TRUE -/datum/uplink_item/dangerous/buzzkill - name = "Buzzkill Grenade Box" - desc = "A box with three grenades that release a swarm of angry bees upon activation. These bees indiscriminately attack friend or foe \ - with random toxins. Courtesy of the BLF and Tiger Cooperative." - item = /obj/item/storage/box/syndie_kit/bee_grenades - cost = 15 - surplus = 35 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/stealthy_weapons/crossbow + name = "Miniature Energy Crossbow" + desc = "A short bow mounted across a tiller in miniature. Small enough to \ + fit into a pocket or slip into a bag unnoticed. It will synthesize \ + and fire bolts tipped with a paralyzing toxin that will briefly stun \ + targets and cause them to slur as if inebriated. It can produce an \ + infinite number of bolts, but takes time to automatically recharge \ + after each shot." + item = /obj/item/gun/energy/kinetic_accelerator/crossbow + cost = 12 + surplus = 50 + exclude_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/stealthy_weapons/traitor_chem_bottle + name = "Poison Kit" + desc = "An assortment of deadly chemicals packed into a compact box. Comes with a syringe for more precise application." + item = /obj/item/storage/box/syndie_kit/chemical + cost = 6 + surplus = 50 + +/datum/uplink_item/stealthy_weapons/romerol_kit + name = "Romerol" + desc = "A highly experimental bioterror agent which creates dormant nodules to be etched into the grey matter of the brain. On death, these nodules take control of the dead body, causing limited revivification, along with slurred speech, aggression, and the ability to infect others with this agent." + item = /obj/item/storage/box/syndie_kit/romerol + cost = 25 + cant_discount = TRUE + exclude_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/stealthy_weapons/sleepy_pen + name = "Sleepy Pen" + desc = "A syringe disguised as a functional pen, filled with a potent mix of drugs, including a \ + strong anesthetic and a chemical that prevents the target from speaking. \ + The pen holds one dose of the mixture, and can be refilled. Note that before the target \ + falls asleep, they will be able to move and act." + item = /obj/item/pen/sleepy + cost = 4 + exclude_modes = list(/datum/game_mode/nuclear) + +datum/uplink_item/stealthy_weapons/taeclowndo_shoes + name = "Tae-clown-do Shoes" + desc = "A pair of shoes for the most elite agents of the honkmotherland. They grant the mastery of taeclowndo with some honk-fu moves as long as they're worn." + cost = 12 + item = /obj/item/clothing/shoes/clown_shoes/taeclowndo + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/stealthy_weapons/suppressor + name = "Universal Suppressor" + desc = "Fitted for use on any small caliber weapon with a threaded barrel, this suppressor will silence the \ + shots of the weapon for increased stealth and superior ambushing capability." + item = /obj/item/suppressor + cost = 1 + surplus = 10 + exclude_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/stealthy_weapons/soap + name = "Syndicate Soap" + desc = "A sinister-looking surfactant used to clean blood stains to hide murders and prevent DNA analysis. \ + You can also drop it underfoot to slip people." + item = /obj/item/soap/syndie + cost = 1 + surplus = 50 + +/datum/uplink_item/stealthy_weapons/soap_clusterbang + name = "Slipocalypse Clusterbang" + desc = "A traditional clusterbang grenade with a payload consisting entirely of Syndicate soap. Useful in any scenario!" + item = /obj/item/grenade/clusterbuster/soap + cost = 6 // Ammunition /datum/uplink_item/ammo @@ -433,13 +660,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 2 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/ammo/pistolfire - name = "10mm Incendiary Magazine" - desc = "An additional 8-round 10mm magazine; compatible with the Stechkin Pistol. Loaded with incendiary rounds which ignite the target." - item = /obj/item/ammo_box/magazine/m10mm/fire - cost = 2 - exclude_modes = list(/datum/game_mode/nuclear/clown_ops) - /datum/uplink_item/ammo/pistolhp name = "10mm Hollow Point Magazine" desc = "An additional 8-round 10mm magazine; compatible with the Stechkin Pistol. These rounds are more damaging but ineffective against armour." @@ -447,51 +667,35 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 3 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/ammo/pistolaps - name = "9mm Handgun Magazine" - desc = "An additional 15-round 9mm magazine, compatible with the Stetchkin APS pistol, found in the Spetsnaz Pyro bundle." - item = /obj/item/ammo_box/magazine/pistolm9mm +/datum/uplink_item/ammo/pistolfire + name = "10mm Incendiary Magazine" + desc = "An additional 8-round 10mm magazine; compatible with the Stechkin Pistol. Loaded with incendiary rounds which ignite the target." + item = /obj/item/ammo_box/magazine/m10mm/fire cost = 2 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/ammo/bolt_action - name = "Surplus Rifle Clip" - desc = "A stripper clip used to quickly load bolt action rifles. Contains 5 rounds." - item = /obj/item/ammo_box/a762 - cost = 1 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/ammo/revolver - name = ".357 Speed Loader" - desc = "A speed loader that contains seven additional .357 Magnum rounds; usable with the Syndicate revolver. \ - For when you really need a lot of things dead." - item = /obj/item/ammo_box/a357 - cost = 4 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/ammo/pistolzzz + name = "10mm Soporific Magazine" + desc = "An additional 8-round 10mm magazine; compatible with the Stechkin Pistol. Loaded with soporific rounds that put the target to sleep. \ + NOTE: Soporific is not instant acting due to the constraints of the round's scale. Will usually require three shots to take effect." + item = /obj/item/ammo_box/magazine/m10mm/soporific + cost = 2 + /datum/uplink_item/ammo/shotgun cost = 2 include_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/ammo/shotgun/bag + name = "12g Ammo Duffel Bag" + desc = "A duffel bag filled with enough 12g ammo to supply an entire team, at a discounted price." + item = /obj/item/storage/backpack/duffelbag/syndie/ammo/shotgun + cost = 12 + /datum/uplink_item/ammo/shotgun/buck name = "12g Buckshot Drum" desc = "An additional 8-round buckshot magazine for use with the Bulldog shotgun. Front towards enemy." item = /obj/item/ammo_box/magazine/m12g -/datum/uplink_item/ammo/shotgun/slug - name = "12g Slug Drum" - desc = "An additional 8-round slug magazine for use with the Bulldog shotgun. \ - Now 8 times less likely to shoot your pals." - cost = 3 - item = /obj/item/ammo_box/magazine/m12g/slug - -/datum/uplink_item/ammo/shotgun/stun - name = "12g Stun Slug Drum" - desc = "An alternative 8-round stun slug magazine for use with the Bulldog shotgun. \ - Saying that they're completely non-lethal would be lying." - item = /obj/item/ammo_box/magazine/m12g/stun - include_modes = list(/datum/game_mode/nuclear) - /datum/uplink_item/ammo/shotgun/dragon name = "12g Dragon's Breath Drum" desc = "An alternative 8-round dragon's breath magazine for use in the Bulldog shotgun. \ @@ -512,18 +716,34 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/ammo_box/magazine/m12g/scatter cost = 4 // most armor has less laser protection then bullet -/datum/uplink_item/ammo/shotgun/bag - name = "12g Ammo Duffel Bag" - desc = "A duffel bag filled with enough 12g ammo to supply an entire team, at a discounted price." - item = /obj/item/storage/backpack/duffelbag/syndie/ammo/shotgun - cost = 12 - -/datum/uplink_item/ammo/smg - name = ".45 SMG Magazine" - desc = "An additional 24-round .45 magazine suitable for use with the C-20r submachine gun. \ - These bullets pack a lot of punch that can knock most targets down, but do limited overall damage." - item = /obj/item/ammo_box/magazine/smgm45 +/datum/uplink_item/ammo/shotgun/slug + name = "12g Slug Drum" + desc = "An additional 8-round slug magazine for use with the Bulldog shotgun. \ + Now 8 times less likely to shoot your pals." cost = 3 + item = /obj/item/ammo_box/magazine/m12g/slug + +/datum/uplink_item/ammo/shotgun/stun + name = "12g Stun Slug Drum" + desc = "An alternative 8-round stun slug magazine for use with the Bulldog shotgun. \ + Saying that they're completely non-lethal would be lying." + item = /obj/item/ammo_box/magazine/m12g/stun + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/ammo/revolver + name = ".357 Speed Loader" + desc = "A speed loader that contains seven additional .357 Magnum rounds; usable with the Syndicate revolver. \ + For when you really need a lot of things dead." + item = /obj/item/ammo_box/a357 + cost = 4 + exclude_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/ammo/a40mm + name = "40mm Grenade" + desc = "A 40mm HE grenade for use with the M-90gl's under-barrel grenade launcher. \ + Your teammates will ask you to not shoot these down small hallways." + item = /obj/item/ammo_casing/a40mm + cost = 2 include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/ammo/smg/bag @@ -533,6 +753,36 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 20 include_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/ammo/smg + name = ".45 SMG Magazine" + desc = "An additional 24-round .45 magazine suitable for use with the C-20r submachine gun. \ + These bullets pack a lot of punch that can knock most targets down, but do limited overall damage." + item = /obj/item/ammo_box/magazine/smgm45 + cost = 3 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/ammo/sniper + cost = 4 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/ammo/sniper/basic + name = ".50 Magazine" + desc = "An additional standard 6-round magazine for use with .50 sniper rifles." + item = /obj/item/ammo_box/magazine/sniper_rounds + +/datum/uplink_item/ammo/sniper/penetrator + name = ".50 Penetrator Magazine" + desc = "A 5-round magazine of penetrator ammo designed for use with .50 sniper rifles. \ + Can pierce walls and multiple enemies." + item = /obj/item/ammo_box/magazine/sniper_rounds/penetrator + cost = 5 + +/datum/uplink_item/ammo/sniper/soporific + name = ".50 Soporific Magazine" + desc = "A 3-round magazine of soporific ammo designed for use with .50 sniper rifles. Put your enemies to sleep today!" + item = /obj/item/ammo_box/magazine/sniper_rounds/soporific + cost = 6 + /datum/uplink_item/ammo/carbine name = "5.56mm Toploader Magazine" desc = "An additional 30-round 5.56mm magazine; suitable for use with the M-90gl carbine. \ @@ -541,14 +791,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 4 include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/ammo/a40mm - name = "40mm Grenade" - desc = "A 40mm HE grenade for use with the M-90gl's under-barrel grenade launcher. \ - Your teammates will ask you to not shoot these down small hallways." - item = /obj/item/ammo_casing/a40mm - cost = 2 - include_modes = list(/datum/game_mode/nuclear) - /datum/uplink_item/ammo/machinegun cost = 6 surplus = 0 @@ -560,12 +802,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) By the time you need to use this, you'll already be on a pile of corpses." item = /obj/item/ammo_box/magazine/mm195x129 -/datum/uplink_item/ammo/machinegun/hollow - name = "1.95x129mm (Hollow-Point) Box Magazine" - desc = "A 50-round magazine of 1.95x129mm ammunition for use in the L6 SAW; equipped with hollow-point tips to help \ - with the unarmored masses of crew." - item = /obj/item/ammo_box/magazine/mm195x129/hollow - /datum/uplink_item/ammo/machinegun/ap name = "1.95x129mm (Armor Penetrating) Box Magazine" desc = "A 50-round magazine of 1.95x129mm ammunition for use in the L6 SAW; equipped with special properties \ @@ -573,33 +809,41 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/ammo_box/magazine/mm195x129/ap cost = 9 +/datum/uplink_item/ammo/machinegun/hollow + name = "1.95x129mm (Hollow-Point) Box Magazine" + desc = "A 50-round magazine of 1.95x129mm ammunition for use in the L6 SAW; equipped with hollow-point tips to help \ + with the unarmored masses of crew." + item = /obj/item/ammo_box/magazine/mm195x129/hollow + /datum/uplink_item/ammo/machinegun/incen name = "1.95x129mm (Incendiary) Box Magazine" desc = "A 50-round magazine of 1.95x129mm ammunition for use in the L6 SAW; tipped with a special flammable \ mixture that'll ignite anyone struck by the bullet. Some men just want to watch the world burn." item = /obj/item/ammo_box/magazine/mm195x129/incen -/datum/uplink_item/ammo/sniper - cost = 4 +/datum/uplink_item/ammo/pistolaps + name = "9mm Handgun Magazine" + desc = "An additional 15-round 9mm magazine, compatible with the Stetchkin APS pistol, found in the Spetsnaz Pyro bundle." + item = /obj/item/ammo_box/magazine/pistolm9mm + cost = 2 include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/ammo/sniper/basic - name = ".50 Magazine" - desc = "An additional standard 6-round magazine for use with .50 sniper rifles." - item = /obj/item/ammo_box/magazine/sniper_rounds +/datum/uplink_item/ammo/flechetteap + name = "Armor Piercing Flechette Magazine" + desc = "An additional 40-round flechette magazine; compatible with the Flechette Launcer. \ + Loaded with armor piercing flechettes that very nearly ignore armor, but are not very effective agaisnt flesh." + item = /obj/item/ammo_box/magazine/flechette + cost = 2 + include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/ammo/sniper/soporific - name = ".50 Soporific Magazine" - desc = "A 3-round magazine of soporific ammo designed for use with .50 sniper rifles. Put your enemies to sleep today!" - item = /obj/item/ammo_box/magazine/sniper_rounds/soporific - cost = 6 - -/datum/uplink_item/ammo/sniper/penetrator - name = ".50 Penetrator Magazine" - desc = "A 5-round magazine of penetrator ammo designed for use with .50 sniper rifles. \ - Can pierce walls and multiple enemies." - item = /obj/item/ammo_box/magazine/sniper_rounds/penetrator - cost = 5 +/datum/uplink_item/ammo/flechettes + name = "Serrated Flechette Magazine" + desc = "An additional 40-round flechette magazine; compatible with the Flechette Launcer. \ + Loaded with serrated flechettes that shreds flesh, but is stopped dead in its tracks by armor. \ + These flechettes are highly likely to sever arteries, and even limbs." + item = /obj/item/ammo_box/magazine/flechette/s + cost = 2 + include_modes = list(/datum/game_mode/nuclear) /datum/uplink_item/ammo/toydarts name = "Box of Riot Darts" @@ -616,12 +860,184 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 6 include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/ammo/bolt_action + name = "Surplus Rifle Clip" + desc = "A stripper clip used to quickly load bolt action rifles. Contains 5 rounds." + item = /obj/item/ammo_box/a762 + cost = 1 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/explosives + category = "Grenades and Explosives" + +/datum/uplink_item/explosives/bioterrorfoam + name = "Chemical Foam Grenade" + desc = "A powerful chemical foam grenade which creates a deadly torrent of foam that will mute, blind, confuse, \ + mutate, and irritate carbon lifeforms. Specially brewed by Tiger Cooperative chemical weapons specialists \ + using additional spore toxin. Ensure suit is sealed before use." + item = /obj/item/grenade/chem_grenade/bioterrorfoam + cost = 5 + surplus = 35 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/bombanana + name = "Bombanana" + desc = "A banana with an explosive taste! discard the peel quickly, as it will explode with the force of a syndicate minibomb \ + a few seconds after the banana is eaten." + item = /obj/item/reagent_containers/food/snacks/grown/banana/bombanana + cost = 4 //it is a bit cheaper than a minibomb because you have to take off your helmet to eat it, which is how you arm it + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/buzzkill + name = "Buzzkill Grenade Box" + desc = "A box with three grenades that release a swarm of angry bees upon activation. These bees indiscriminately attack friend or foe \ + with random toxins. Courtesy of the BLF and Tiger Cooperative." + item = /obj/item/storage/box/syndie_kit/bee_grenades + cost = 15 + surplus = 35 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/c4 + name = "Composition C-4" + desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls, sabotage equipment, or connect \ + an assembly to it in order to alter the way it detonates. It has a modifiable timer with a \ + minimum setting of 10 seconds." + item = /obj/item/grenade/plastic/c4 + cost = 1 + +/datum/uplink_item/explosives/c4bag + name = "Bag of C-4 explosives" + desc = "Because sometimes quantity is quality. Contains 10 C-4 plastic explosives." + item = /obj/item/storage/backpack/duffelbag/syndie/c4 + cost = 9 //10% discount! + cant_discount = TRUE + +/datum/uplink_item/explosives/x4bag + name = "Bag of X-4 explosives" + desc = "Contains 3 X-4 plastic explosives. Similar, but more powerful than C-4. X-4 can be placed on a solid surface, such as a wall or window, and it will \ + blast through the wall, injuring anything on the opposite side, while being safer to the user. For when you want a wider, deeper, hole." + item = /obj/item/storage/backpack/duffelbag/syndie/x4 + cost = 4 // + cant_discount = TRUE + +/datum/uplink_item/explosives/clown_bomb_clownops + name = "Clown Bomb" + desc = "The Clown bomb is a hilarious device capable of massive pranks. It has an adjustable timer, \ + with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ + movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ + transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ + be defused, and some crew may attempt to do so." + item = /obj/item/sbeacondrop/clownbomb + cost = 15 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/detomatix + name = "Detomatix PDA Cartridge" + desc = "When inserted into a personal digital assistant, this cartridge gives you four opportunities to \ + detonate PDAs of crewmembers who have their message feature enabled. \ + The concussive effect from the explosion will knock the recipient out for a short period, and deafen \ + them for longer. Beware, it has a chance to detonate your PDA." + item = /obj/item/cartridge/virus/syndicate + cost = 5 + restricted = TRUE + +/datum/uplink_item/explosives/emp + name = "EMP Grenades and Implanter Kit" + desc = "A box that contains two EMP grenades and an EMP implant. Useful to disrupt communication, \ + security's energy weapons, and silicon lifeforms when you're in a tight spot." + item = /obj/item/storage/box/syndie_kit/emp + cost = 2 + +/datum/uplink_item/explosives/virus_grenade + name = "Fungal Tuberculosis Grenade" + desc = "A primed bio-grenade packed into a compact box. Comes with five Bio Virus Antidote Kit (BVAK) \ + autoinjectors for rapid application on up to two targets each, a syringe, and a bottle containing \ + the BVAK solution." + item = /obj/item/storage/box/syndie_kit/tuberculosisgrenade + cost = 8 + surplus = 35 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + restricted = TRUE + +/datum/uplink_item/explosives/grenadier + name = "Grenadier's belt" + desc = "A belt of a large variety of lethally dangerous and destructive grenades." + item = /obj/item/storage/belt/grenade/full + include_modes = list(/datum/game_mode/nuclear) + cost = 22 + surplus = 0 + +/datum/uplink_item/explosives/pizza_bomb + name = "Pizza Bomb" + desc = "A pizza box with a bomb cunningly attached to the lid. The timer needs to be set by opening the box; afterwards, \ + opening the box again will trigger the detonation after the timer has elapsed. Comes with free pizza, for you or your target!" + item = /obj/item/pizzabox/bomb + cost = 6 + surplus = 8 + +/datum/uplink_item/explosives/syndicate_bomb + name = "Syndicate Bomb" + desc = "The Syndicate bomb is a fearsome device capable of massive destruction. It has an adjustable timer, \ + with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ + movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ + transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ + be defused, and some crew may attempt to do so." + item = /obj/item/sbeacondrop/bomb + cost = 11 + +/datum/uplink_item/explosives/syndicate_detonator + name = "Syndicate Detonator" + desc = "The Syndicate detonator is a companion device to the Syndicate bomb. Simply press the included button \ + and an encrypted radio frequency will instruct all live Syndicate bombs to detonate. \ + Useful for when speed matters or you wish to synchronize multiple bomb blasts. Be sure to stand clear of \ + the blast radius before using the detonator." + item = /obj/item/syndicatedetonator + cost = 3 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/syndicate_minibomb + name = "Syndicate Minibomb" + desc = "The minibomb is a grenade with a five-second fuse. Upon detonation, it will create a small hull breach \ + in addition to dealing high amounts of damage to nearby personnel." + item = /obj/item/grenade/syndieminibomb + cost = 6 + exclude_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/tearstache + name = "Teachstache Grenade" + desc = "A teargas grenade that launches sticky moustaches onto the face of anyone not wearing a clown or mime mask. The moustaches will \ + remain attached to the face of all targets for one minute, preventing the use of breath masks and other such devices." + item = /obj/item/grenade/chem_grenade/teargas/moustache + cost = 3 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/explosives/viscerators + name = "Viscerator Delivery Grenade" + desc = "A unique grenade that deploys a swarm of viscerators upon activation, which will chase down and shred \ + any non-operatives in the area." + item = /obj/item/grenade/spawnergrenade/manhacks + cost = 5 + surplus = 35 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + + //Support and Mechs /datum/uplink_item/support category = "Support and Mechanized Exosuits" surplus = 0 include_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/support/clown_reinforcement + name = "Clown Reinforcements" + desc = "Call in an additional clown to share the fun, equipped with full starting gear, but no telecrystals." + item = /obj/item/antag_spawner/nuke_ops/clown + cost = 20 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + restricted = TRUE + /datum/uplink_item/support/reinforcement name = "Reinforcements" desc = "Call in an additional team member. They won't come with any gear, so you'll have to save some telecrystals \ @@ -656,13 +1072,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/mecha/combat/gygax/dark/loaded cost = 80 -/datum/uplink_item/support/mauler - name = "Mauler Exosuit" - desc = "A massive and incredibly deadly military-grade exosuit. Features long-range targeting, thrust vectoring, \ - and deployable smoke." - item = /obj/mecha/combat/marauder/mauler/loaded - cost = 140 - /datum/uplink_item/support/honker name = "Dark H.O.N.K." desc = "A clown combat mech equipped with bombanana peel and tearstache grenade launchers, as well as the ubiquitous HoNkER BlAsT 5000." @@ -670,141 +1079,36 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 80 include_modes = list(/datum/game_mode/nuclear/clown_ops) -/datum/uplink_item/support/clown_reinforcement - name = "Clown Reinforcements" - desc = "Call in an additional clown to share the fun, equipped with full starting gear, but no telecrystals." - item = /obj/item/antag_spawner/nuke_ops/clown - cost = 20 - include_modes = list(/datum/game_mode/nuclear/clown_ops) - restricted = TRUE - -// Stealthy Weapons -/datum/uplink_item/stealthy_weapons - category = "Stealthy and Inconspicuous Weapons" - -/datum/uplink_item/stealthy_weapons/martialarts - name = "Martial Arts Scroll" - desc = "This scroll contains the secrets of an ancient martial arts technique. You will master unarmed combat, \ - deflecting all ranged weapon fire, but you also refuse to use dishonorable ranged weaponry." - item = /obj/item/book/granter/martial/carp - cost = 17 - surplus = 0 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/stealthy_weapons/cqc - name = "CQC Manual" - desc = "A manual that teaches a single user tactical Close-Quarters Combat before self-destructing." - item = /obj/item/book/granter/martial/cqc - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - cost = 13 - surplus = 0 - -/datum/uplink_item/stealthy_weapons/throwingweapons - name = "Box of Throwing Weapons" - desc = "A box of shurikens and reinforced bolas from ancient Earth martial arts. They are highly effective \ - throwing weapons. The bolas can knock a target down and the shurikens will embed into limbs." - item = /obj/item/storage/box/syndie_kit/throwing_weapons - cost = 3 - -/datum/uplink_item/stealthy_weapons/edagger - name = "Energy Dagger" - desc = "A dagger made of energy that looks and functions as a pen when off." - item = /obj/item/pen/edagger - cost = 2 - -/datum/uplink_item/stealthy_weapons/foampistol - name = "Toy Gun with Riot Darts" - desc = "An innocent-looking toy pistol designed to fire foam darts. Comes loaded with riot-grade \ - darts effective at incapacitating a target." - item = /obj/item/gun/ballistic/automatic/toy/pistol/riot - cost = 3 - surplus = 10 - -/datum/uplink_item/stealthy_weapons/sleepy_pen - name = "Sleepy Pen" - desc = "A syringe disguised as a functional pen, filled with a potent mix of drugs, including a \ - strong anesthetic and a chemical that prevents the target from speaking. \ - The pen holds one dose of the mixture, and can be refilled. Note that before the target \ - falls asleep, they will be able to move and act." - item = /obj/item/pen/sleepy - cost = 4 - exclude_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/stealthy_weapons/soap - name = "Syndicate Soap" - desc = "A sinister-looking surfactant used to clean blood stains to hide murders and prevent DNA analysis. \ - You can also drop it underfoot to slip people." - item = /obj/item/soap/syndie - cost = 1 - surplus = 50 - -/datum/uplink_item/stealthy_weapons/traitor_chem_bottle - name = "Poison Kit" - desc = "An assortment of deadly chemicals packed into a compact box. Comes with a syringe for more precise application." - item = /obj/item/storage/box/syndie_kit/chemical - cost = 6 - surplus = 50 - -/datum/uplink_item/stealthy_weapons/romerol_kit - name = "Romerol" - desc = "A highly experimental bioterror agent which creates dormant nodules to be etched into the grey matter of the brain. On death, these nodules take control of the dead body, causing limited revivification, along with slurred speech, aggression, and the ability to infect others with this agent." - item = /obj/item/storage/box/syndie_kit/romerol - cost = 25 - cant_discount = TRUE - exclude_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/stealthy_weapons/dart_pistol - name = "Dart Pistol" - desc = "A miniaturized version of a normal syringe gun. It is very quiet when fired and can fit into any \ - space a small item can." - item = /obj/item/gun/syringe/syndicate - cost = 4 - surplus = 50 - -/datum/uplink_item/stealthy_weapons/detomatix - name = "Detomatix PDA Cartridge" - desc = "When inserted into a personal digital assistant, this cartridge gives you four opportunities to \ - detonate PDAs of crewmembers who have their message feature enabled. \ - The concussive effect from the explosion will knock the recipient out for a short period, and deafen \ - them for longer. Beware, it has a chance to detonate your PDA." - item = /obj/item/cartridge/virus/syndicate - cost = 5 - restricted = TRUE - -/datum/uplink_item/stealthy_weapons/suppressor - name = "Universal Suppressor" - desc = "Fitted for use on any small caliber weapon with a threaded barrel, this suppressor will silence the \ - shots of the weapon for increased stealth and superior ambushing capability." - item = /obj/item/suppressor - cost = 1 - surplus = 10 - exclude_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/stealthy_weapons/pizza_bomb - name = "Pizza Bomb" - desc = "A pizza box with a bomb cunningly attached to the lid. The timer needs to be set by opening the box; afterwards, \ - opening the box again will trigger the detonation after the timer has elapsed. Comes with free pizza, for you or your target!" - item = /obj/item/pizzabox/bomb - cost = 6 - surplus = 8 - -/datum/uplink_item/stealthy_weapons/dehy_carp - name = "Dehydrated Space Carp" - desc = "Looks like a plush toy carp, but just add water and it becomes a real-life space carp! Activate in \ - your hand before use so it knows not to kill you." - item = /obj/item/toy/plush/carpplushie/dehy_carp - cost = 1 - -/datum/uplink_item/stealthy_weapons/soap_clusterbang - name = "Slipocalypse Clusterbang" - desc = "A traditional clusterbang grenade with a payload consisting entirely of Syndicate soap. Useful in any scenario!" - item = /obj/item/grenade/clusterbuster/soap - cost = 6 +/datum/uplink_item/support/mauler + name = "Mauler Exosuit" + desc = "A massive and incredibly deadly military-grade exosuit. Features long-range targeting, thrust vectoring, \ + and deployable smoke." + item = /obj/mecha/combat/marauder/mauler/loaded + cost = 140 // Stealth Items /datum/uplink_item/stealthy_tools category = "Stealth and Camouflage Items" +/datum/uplink_item/stealthy_tools/agent_card + name = "Agent Identification Card" + desc = "Agent cards prevent artificial intelligences from tracking the wearer, and can copy access \ + from other identification cards. The access is cumulative, so scanning one card does not erase the \ + access gained from another. In addition, they can be forged to display a new assignment and name. \ + This can be done an unlimited amount of times. Some Syndicate areas and devices can only be accessed \ + with these cards." + item = /obj/item/card/id/syndicate + cost = 2 + +/datum/uplink_item/stealthy_tools/ai_detector + name = "Artificial Intelligence Detector" + desc = "A functional multitool that turns red when it detects an artificial intelligence watching it, and can be \ + activated to display their exact viewing location and nearby security camera blind spots. Knowing when \ + an artificial intelligence is watching you is useful for knowing when to maintain cover, and finding nearby \ + blind spots can help you identify escape routes." + item = /obj/item/multitool/ai_detect + cost = 1 + /datum/uplink_item/stealthy_tools/chameleon name = "Chameleon Kit" desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anything on the station, and more!" @@ -812,6 +1116,46 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 2 exclude_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/stealthy_tools/chameleon_proj + name = "Chameleon Projector" + desc = "Projects an image across a user, disguising them as an object scanned with it, as long as they don't \ + move the projector from their hand. Disguised users move slowly, and projectiles pass over them." + item = /obj/item/chameleon + cost = 7 + +/datum/uplink_item/stealthy_tools/codespeak_manual + name = "Codespeak Manual" + desc = "Syndicate agents can be trained to use a series of codewords to convey complex information, which sounds like random concepts and drinks to anyone listening. This manual teaches you this Codespeak. You can also hit someone else with the manual in order to teach them. This is the deluxe edition, which has unlimited used." + item = /obj/item/codespeak_manual/unlimited + cost = 3 + +/datum/uplink_item/stealthy_tools/combatbananashoes + name = "Combat Banana Shoes" + desc = "While making the wearer immune to most slipping attacks like regular combat clown shoes, these shoes \ + can generate a large number of synthetic banana peels as the wearer walks, slipping up would-be pursuers. They also \ + squeak significantly louder." + item = /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat + cost = 6 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/stealthy_tools/emplight + name = "EMP Flashlight" + desc = "A small, self-charging, short-ranged EMP device disguised as a flashlight. \ + Useful for disrupting headsets, cameras, and borgs during stealth operations." + item = /obj/item/flashlight/emp + cost = 2 + surplus = 30 + +/datum/uplink_item/stealthy_tools/mulligan + name = "Mulligan" + desc = "Screwed up and have security on your tail? This handy syringe will give you a completely new identity \ + and appearance." + item = /obj/item/reagent_containers/syringe/mulligan + cost = 3 + surplus = 30 + exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + /datum/uplink_item/stealthy_tools/syndigaloshes name = "No-Slip Chameleon Shoes" desc = "These shoes will allow the wearer to run on wet floors and slippery objects without falling down. \ @@ -827,57 +1171,22 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) exclude_modes = list() include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/stealthy_tools/combatbananashoes - name = "Combat Banana Shoes" - desc = "While making the wearer immune to most slipping attacks like regular combat clown shoes, these shoes \ - can generate a large number of synthetic banana peels as the wearer walks, slipping up would-be pursuers. They also \ - squeak significantly louder." - item = /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat - cost = 6 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/stealthy_tools/jammer + name = "Radio Jammer" + desc = "This device will disrupt any nearby outgoing radio communication when activated." + item = /obj/item/jammer + cost = 5 -datum/uplink_item/stealthy_tools/taeclowndo_shoes - name = "Tae-clown-do Shoes" - desc = "A pair of shoes for the most elite agents of the honkmotherland. They grant the mastery of taeclowndo with some honk-fu moves as long as they're worn." - cost = 12 - item = /obj/item/clothing/shoes/clown_shoes/taeclowndo - include_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/stealthy_tools/frame - name = "F.R.A.M.E. PDA Cartridge" - desc = "When inserted into a personal digital assistant, this cartridge gives you five PDA viruses which \ - when used cause the targeted PDA to become a new uplink with zero TCs, and immediately become unlocked. \ - You will receive the unlock code upon activating the virus, and the new uplink may be charged with \ - telecrystals normally." - item = /obj/item/cartridge/virus/frame - cost = 2 - restricted = TRUE - -/datum/uplink_item/stealthy_tools/agent_card - name = "Agent Identification Card" - desc = "Agent cards prevent artificial intelligences from tracking the wearer, and can copy access \ - from other identification cards. The access is cumulative, so scanning one card does not erase the \ - access gained from another. In addition, they can be forged to display a new assignment and name. \ - This can be done an unlimited amount of times. Some Syndicate areas and devices can only be accessed \ - with these cards." - item = /obj/item/card/id/syndicate - cost = 2 - -/datum/uplink_item/stealthy_tools/chameleon_proj - name = "Chameleon Projector" - desc = "Projects an image across a user, disguising them as an object scanned with it, as long as they don't \ - move the projector from their hand. Disguised users move slowly, and projectiles pass over them." - item = /obj/item/chameleon - cost = 7 - -/datum/uplink_item/stealthy_tools/camera_bug - name = "Camera Bug" - desc = "Enables you to view all cameras on the network and track a target. Bugging cameras allows you \ - to disable them remotely." - item = /obj/item/camera_bug - cost = 1 - surplus = 90 +/*/datum/uplink_item/stealthy_tools/syndi_borer + name = "Syndicate Brain Slug" + desc = "A small cortical borer, modified to be completely loyal to the owner. \ + Genetically infertile, these brain slugs can assist medically in a support role, or take direct action \ + to assist their host." + item = /obj/item/antag_spawner/syndi_borer + refundable = TRUE + cost = 10 + surplus = 20 //Let's not have this be too common + exclude_modes = list(/datum/game_mode/nuclear) */ /datum/uplink_item/stealthy_tools/smugglersatchel name = "Smuggler's Satchel" @@ -888,46 +1197,6 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes cost = 2 surplus = 30 -/datum/uplink_item/stealthy_tools/stimpack - name = "Stimpack" - desc = "Stimpacks, the tool of many great heroes, make you nearly immune to stuns and knockdowns for about \ - 5 minutes after injection." - item = /obj/item/reagent_containers/syringe/stimulants - cost = 5 - surplus = 90 - -/datum/uplink_item/stealthy_tools/mulligan - name = "Mulligan" - desc = "Screwed up and have security on your tail? This handy syringe will give you a completely new identity \ - and appearance." - item = /obj/item/reagent_containers/syringe/mulligan - cost = 3 - surplus = 30 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/stealthy_tools/emplight - name = "EMP Flashlight" - desc = "A small, self-charging, short-ranged EMP device disguised as a flashlight. \ - Useful for disrupting headsets, cameras, and borgs during stealth operations." - item = /obj/item/flashlight/emp - cost = 2 - surplus = 30 - -/datum/uplink_item/stealthy_tools/cutouts - name = "Adaptive Cardboard Cutouts" - desc = "These cardboard cutouts are coated with a thin material that prevents discoloration and makes the images on them appear more lifelike. This pack contains three as well as a \ - crayon for changing their appearances." - item = /obj/item/storage/box/syndie_kit/cutouts - cost = 1 - surplus = 20 - -/datum/uplink_item/stealthy_tools/fakenucleardisk - name = "Decoy Nuclear Authentication Disk" - desc = "It's just a normal disk. Visually it's identical to the real deal, but it won't hold up under closer scrutiny by the Captain. Don't try to give this to us to complete your objective, we know better!" - item = /obj/item/disk/nuclear/fake - cost = 1 - surplus = 1 - //Space Suits and Hardsuits /datum/uplink_item/suits category = "Space Suits and Hardsuits" @@ -974,6 +1243,74 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes /datum/uplink_item/device_tools category = "Devices and Tools" +/datum/uplink_item/device_tools/cutouts + name = "Adaptive Cardboard Cutouts" + desc = "These cardboard cutouts are coated with a thin material that prevents discoloration and makes the images on them appear more lifelike. This pack contains three as well as a \ + crayon for changing their appearances." + item = /obj/item/storage/box/syndie_kit/cutouts + cost = 1 + surplus = 20 + +/datum/uplink_item/device_tools/assault_pod + name = "Assault Pod Targeting Device" + desc = "Use to select the landing zone of your assault pod." + item = /obj/item/assault_pod + cost = 30 + surplus = 0 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + restricted = TRUE + +/datum/uplink_item/device_tools/binary + name = "Binary Translator Key" + desc = "A key that, when inserted into a radio headset, allows you to listen to and talk with silicon-based lifeforms, \ + such as AI units and cyborgs, over their private binary channel. Caution should \ + be taken while doing this, as unless they are allied with you, they are programmed to report such intrusions." + item = /obj/item/encryptionkey/binary + cost = 2 + surplus = 75 + restricted = TRUE + +/datum/uplink_item/device_tools/magboots + name = "Blood-Red Magboots" + desc = "A pair of magnetic boots with a Syndicate paintjob that assist with freer movement in space or on-station \ + during gravitational generator failures. These reverse-engineered knockoffs of Nanotrasen's \ + 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety." + item = /obj/item/clothing/shoes/magboots/syndie + cost = 2 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) + +/datum/uplink_item/device_tools/compressionkit + name = "Bluespace Compression Kit" + desc = "A modified version of a BSRPED that can be used to reduce the size of most items while retaining their original functions! \ + Does not work on storage items. \ + Recharge using bluespace crystals. \ + Comes with 5 charges." + item = /obj/item/compressionkit + cost = 5 + +/datum/uplink_item/device_tools/briefcase_launchpad + name = "Briefcase Launchpad" + desc = "A briefcase containing a launchpad, a device able to teleport items and people to and from targets up to twenty tiles away from the briefcase. \ + Also includes a remote control, disguised as an ordinary folder. Touch the briefcase with the remote to link it." + surplus = 0 + item = /obj/item/storage/briefcase/launchpad + cost = 6 + +/datum/uplink_item/device_tools/camera_bug + name = "Camera Bug" + desc = "Enables you to view all cameras on the network and track a target. Bugging cameras allows you \ + to disable them remotely." + item = /obj/item/camera_bug + cost = 1 + surplus = 90 + +/datum/uplink_item/device_tools/military_belt + name = "Chest Rig" + desc = "A robust seven-slot set of webbing that is capable of holding all manner of tactical equipment." + item = /obj/item/storage/belt/military + cost = 1 + exclude_modes = list(/datum/game_mode/nuclear) + /datum/uplink_item/device_tools/emag name = "Cryptographic Sequencer" desc = "The cryptographic sequencer, electromagnetic card, or emag, is a small card that unlocks hidden functions \ @@ -981,6 +1318,29 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/card/emag cost = 6 +/datum/uplink_item/device_tools/emagrecharge + name = "Electromagnet Charging Device" + desc = "A small device intended for recharging Cryptographic Sequencers. Using it will add five extra charges to the Cryptographic Sequencer." + item = /obj/item/emagrecharge + cost = 2 + +/datum/uplink_item/device_tools/fakenucleardisk + name = "Decoy Nuclear Authentication Disk" + desc = "It's just a normal disk. Visually it's identical to the real deal, but it won't hold up under closer scrutiny by the Captain. Don't try to give this to us to complete your objective, we know better!" + item = /obj/item/disk/nuclear/fake + cost = 1 + surplus = 1 + +/datum/uplink_item/device_tools/frame + name = "F.R.A.M.E. PDA Cartridge" + desc = "When inserted into a personal digital assistant, this cartridge gives you five PDA viruses which \ + when used cause the targeted PDA to become a new uplink with zero TCs, and immediately become unlocked. \ + You will receive the unlock code upon activating the virus, and the new uplink may be charged with \ + telecrystals normally." + item = /obj/item/cartridge/virus/frame + cost = 2 + restricted = TRUE + /datum/uplink_item/device_tools/toolbox name = "Full Syndicate Toolbox" desc = "The syndicate toolbox is a suspicious black and red. It comes loaded with a full tool set including a \ @@ -988,12 +1348,28 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/storage/toolbox/syndicate cost = 1 -/datum/uplink_item/device_tools/surgerybag - name = "Syndicate Surgery Duffel Bag" - desc = "The Syndicate surgery duffel bag is a toolkit containing all surgery tools, surgical drapes, \ - a Syndicate brand MMI, a straitjacket, and a muzzle." - item = /obj/item/storage/backpack/duffelbag/syndie/surgery - cost = 3 +/datum/uplink_item/device_tools/syndie_glue + name = "Glue" + desc = "A cheap bottle of one use syndicate brand super glue. \ + Use on any item to make it undroppable. \ + Be careful not to glue an item you're already holding!" + item = /obj/item/syndie_glue + cost = 2 + +/datum/uplink_item/device_tools/hacked_module + name = "Hacked AI Law Upload Module" + desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. \ + Be careful with wording, as artificial intelligences may look for loopholes to exploit." + item = /obj/item/aiModule/syndicate + cost = 9 + +/datum/uplink_item/device_tools/medgun + name = "Medbeam Gun" + desc = "A wonder of Syndicate engineering, the Medbeam gun, or Medi-Gun enables a medic to keep his fellow \ + operatives in the fight, even while under fire." + item = /obj/item/gun/medbeam + cost = 15 + include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) /datum/uplink_item/device_tools/nutcracker name = "Nutcracker" @@ -1001,19 +1377,39 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/nutcracker cost = 1 -/datum/uplink_item/device_tools/surgerybag_adv - name = "Advanced Syndicate Surgery Duffel Bag" - desc = "The Syndicate surgery duffel bag is a toolkit containing all newest surgery tools, surgical drapes, \ - a Syndicate brand MMI, a straitjacket, a muzzle, and a full Syndicate Combat Medic Kit." - item = /obj/item/storage/backpack/duffelbag/syndie/surgery_adv - cost = 10 +/datum/uplink_item/device_tools/singularity_beacon + name = "Power Beacon" + desc = "When screwed to wiring attached to an electric grid and activated, this large device pulls any \ + active gravitational singularities or tesla balls towards it. This will not work when the engine is still \ + in containment. Because of its size, it cannot be carried. Ordering this \ + sends you a small beacon that will teleport the larger beacon to your location upon activation." + item = /obj/item/sbeacondrop + cost = 14 -/datum/uplink_item/device_tools/military_belt - name = "Chest Rig" - desc = "A robust seven-slot set of webbing that is capable of holding all manner of tactical equipment." - item = /obj/item/storage/belt/military - cost = 1 - exclude_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/device_tools/powersink + name = "Power Sink" + desc = "When screwed to wiring attached to a power grid and activated, this large device places excessive \ + load on the grid, causing a station-wide blackout. The sink is large and cannot be stored in most \ + traditional bags and boxes." + item = /obj/item/powersink + cost = 6 + +/datum/uplink_item/device_tools/rad_laser + name = "Radioactive Microlaser" + desc = "A radioactive microlaser disguised as a standard Nanotrasen health analyzer. When used, it emits a \ + powerful burst of radiation, which, after a short delay, can incapacitate all but the most protected \ + of humanoids. It has two settings: intensity, which controls the power of the radiation, \ + and wavelength, which controls how long the radiation delay is." + item = /obj/item/healthanalyzer/rad_laser + cost = 3 + +/datum/uplink_item/device_tools/stimpack + name = "Stimpack" + desc = "Stimpacks, the tool of many great heroes, make you nearly immune to stuns and knockdowns for about \ + 5 minutes after injection." + item = /obj/item/reagent_containers/syringe/stimulants + cost = 5 + surplus = 90 /datum/uplink_item/device_tools/medkit name = "Syndicate Combat Medic Kit" @@ -1024,6 +1420,29 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes cost = 4 include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/device_tools/surgerybag + name = "Syndicate Surgery Duffel Bag" + desc = "The Syndicate surgery duffel bag is a toolkit containing all surgery tools, surgical drapes, \ + a Syndicate brand MMI, a straitjacket, and a muzzle." + item = /obj/item/storage/backpack/duffelbag/syndie/surgery + cost = 3 + +/datum/uplink_item/device_tools/surgerybag_adv + name = "Advanced Syndicate Surgery Duffel Bag" + desc = "The Syndicate surgery duffel bag is a toolkit containing all newest surgery tools, surgical drapes, \ + a Syndicate brand MMI, a straitjacket, a muzzle, and a full Syndicate Combat Medic Kit." + item = /obj/item/storage/backpack/duffelbag/syndie/surgery_adv + cost = 10 + +/datum/uplink_item/device_tools/encryptionkey + name = "Syndicate Encryption Key" + desc = "A key that, when inserted into a radio headset, allows you to listen to all station department channels \ + as well as talk on an encrypted Syndicate channel with other agents that have the same key." + item = /obj/item/encryptionkey/syndicate + cost = 2 + surplus = 75 + restricted = TRUE + /datum/uplink_item/device_tools/syndietome name = "Syndicate Tome" desc = "Using rare artifacts acquired at great cost, the syndicate has reverse engineered \ @@ -1042,175 +1461,6 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/clothing/glasses/thermal/syndi cost = 4 -/datum/uplink_item/device_tools/binary - name = "Binary Translator Key" - desc = "A key that, when inserted into a radio headset, allows you to listen to and talk with silicon-based lifeforms, \ - such as AI units and cyborgs, over their private binary channel. Caution should \ - be taken while doing this, as unless they are allied with you, they are programmed to report such intrusions." - item = /obj/item/encryptionkey/binary - cost = 2 - surplus = 75 - restricted = TRUE - -/datum/uplink_item/device_tools/encryptionkey - name = "Syndicate Encryption Key" - desc = "A key that, when inserted into a radio headset, allows you to listen to all station department channels \ - as well as talk on an encrypted Syndicate channel with other agents that have the same key." - item = /obj/item/encryptionkey/syndicate - cost = 2 - surplus = 75 - restricted = TRUE - -/datum/uplink_item/device_tools/ai_detector - name = "Artificial Intelligence Detector" - desc = "A functional multitool that turns red when it detects an artificial intelligence watching it, and can be \ - activated to display their exact viewing location and nearby security camera blind spots. Knowing when \ - an artificial intelligence is watching you is useful for knowing when to maintain cover, and finding nearby \ - blind spots can help you identify escape routes." - item = /obj/item/multitool/ai_detect - cost = 1 - -/datum/uplink_item/device_tools/hacked_module - name = "Hacked AI Law Upload Module" - desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. \ - Be careful with wording, as artificial intelligences may look for loopholes to exploit." - item = /obj/item/aiModule/syndicate - cost = 9 - -/datum/uplink_item/device_tools/briefcase_launchpad - name = "Briefcase Launchpad" - desc = "A briefcase containing a launchpad, a device able to teleport items and people to and from targets up to twenty tiles away from the briefcase. \ - Also includes a remote control, disguised as an ordinary folder. Touch the briefcase with the remote to link it." - surplus = 0 - item = /obj/item/storage/briefcase/launchpad - cost = 6 - -/datum/uplink_item/device_tools/magboots - name = "Blood-Red Magboots" - desc = "A pair of magnetic boots with a Syndicate paintjob that assist with freer movement in space or on-station \ - during gravitational generator failures. These reverse-engineered knockoffs of Nanotrasen's \ - 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety." - item = /obj/item/clothing/shoes/magboots/syndie - cost = 2 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/device_tools/c4 - name = "Composition C-4" - desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls, sabotage equipment, or connect \ - an assembly to it in order to alter the way it detonates. It has a modifiable timer with a \ - minimum setting of 10 seconds." - item = /obj/item/grenade/plastic/c4 - cost = 1 - -/datum/uplink_item/device_tools/c4bag - name = "Bag of C-4 explosives" - desc = "Because sometimes quantity is quality. Contains 10 C-4 plastic explosives." - item = /obj/item/storage/backpack/duffelbag/syndie/c4 - cost = 9 //10% discount! - cant_discount = TRUE - -/datum/uplink_item/device_tools/x4bag - name = "Bag of X-4 explosives" - desc = "Contains 3 X-4 plastic explosives. Similar, but more powerful than C-4. X-4 can be placed on a solid surface, such as a wall or window, and it will \ - blast through the wall, injuring anything on the opposite side, while being safer to the user. For when you want a wider, deeper, hole." - item = /obj/item/storage/backpack/duffelbag/syndie/x4 - cost = 4 // - cant_discount = TRUE - -/datum/uplink_item/device_tools/powersink - name = "Power Sink" - desc = "When screwed to wiring attached to a power grid and activated, this large device places excessive \ - load on the grid, causing a station-wide blackout. The sink is large and cannot be stored in most \ - traditional bags and boxes." - item = /obj/item/powersink - cost = 6 - -/datum/uplink_item/device_tools/singularity_beacon - name = "Power Beacon" - desc = "When screwed to wiring attached to an electric grid and activated, this large device pulls any \ - active gravitational singularities or tesla balls towards it. This will not work when the engine is still \ - in containment. Because of its size, it cannot be carried. Ordering this \ - sends you a small beacon that will teleport the larger beacon to your location upon activation." - item = /obj/item/sbeacondrop - cost = 14 - -/datum/uplink_item/device_tools/syndicate_bomb - name = "Syndicate Bomb" - desc = "The Syndicate bomb is a fearsome device capable of massive destruction. It has an adjustable timer, \ - with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ - movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ - transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ - be defused, and some crew may attempt to do so." - item = /obj/item/sbeacondrop/bomb - cost = 11 - -/datum/uplink_item/device_tools/clown_bomb_clownops - name = "Clown Bomb" - desc = "The Clown bomb is a hilarious device capable of massive pranks. It has an adjustable timer, \ - with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ - movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ - transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ - be defused, and some crew may attempt to do so." - item = /obj/item/sbeacondrop/clownbomb - cost = 15 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/device_tools/syndicate_detonator - name = "Syndicate Detonator" - desc = "The Syndicate detonator is a companion device to the Syndicate bomb. Simply press the included button \ - and an encrypted radio frequency will instruct all live Syndicate bombs to detonate. \ - Useful for when speed matters or you wish to synchronize multiple bomb blasts. Be sure to stand clear of \ - the blast radius before using the detonator." - item = /obj/item/syndicatedetonator - cost = 3 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/device_tools/rad_laser - name = "Radioactive Microlaser" - desc = "A radioactive microlaser disguised as a standard Nanotrasen health analyzer. When used, it emits a \ - powerful burst of radiation, which, after a short delay, can incapacitate all but the most protected \ - of humanoids. It has two settings: intensity, which controls the power of the radiation, \ - and wavelength, which controls how long the radiation delay is." - item = /obj/item/healthanalyzer/rad_laser - cost = 3 - -/datum/uplink_item/device_tools/assault_pod - name = "Assault Pod Targeting Device" - desc = "Use to select the landing zone of your assault pod." - item = /obj/item/assault_pod - cost = 30 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - restricted = TRUE - -/datum/uplink_item/device_tools/shield - name = "Energy Shield" - desc = "An incredibly useful personal shield projector, capable of reflecting energy projectiles and defending \ - against other attacks. Pair with an Energy Sword for a killer combination." - item = /obj/item/shield/energy - cost = 16 - surplus = 20 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/device_tools/bananashield - name = "Bananium Energy Shield" - desc = "A clown's most powerful defensive weapon, this personal shield provides near immunity to ranged energy attacks \ - by bouncing them back at the ones who fired them. It can also be thrown to bounce off of people, slipping them, \ - and returning to you even if you miss. WARNING: DO NOT ATTEMPT TO STAND ON SHIELD WHILE DEPLOYED, EVEN IF WEARING ANTI-SLIP SHOES." - item = /obj/item/shield/energy/bananium - cost = 16 - surplus = 0 - include_modes = list(/datum/game_mode/nuclear/clown_ops) - -/datum/uplink_item/device_tools/medgun - name = "Medbeam Gun" - desc = "A wonder of Syndicate engineering, the Medbeam gun, or Medi-Gun enables a medic to keep his fellow \ - operatives in the fight, even while under fire." - item = /obj/item/gun/medbeam - cost = 15 - include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - /datum/uplink_item/device_tools/potion name = "Syndicate Sentience Potion" item = /obj/item/slimepotion/slime/sentience/nuclear @@ -1219,62 +1469,12 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) restricted = TRUE -/datum/uplink_item/device_tools/telecrystal - name = "Raw Telecrystal" - desc = "A telecrystal in its rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." - item = /obj/item/stack/telecrystal - cost = 1 - surplus = 0 - cant_discount = TRUE - // Don't add telecrystals to the purchase_log since - // it's just used to buy more items (including itself!) - purchase_log_vis = FALSE - -/datum/uplink_item/device_tools/telecrystal/five - name = "5 Raw Telecrystals" - desc = "Five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." - item = /obj/item/stack/telecrystal/five - cost = 5 - -/datum/uplink_item/device_tools/telecrystal/twenty - name = "20 Raw Telecrystals" - desc = "Twenty telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." - item = /obj/item/stack/telecrystal/twenty - cost = 20 - -/datum/uplink_item/device_tools/jammer - name = "Radio Jammer" - desc = "This device will disrupt any nearby outgoing radio communication when activated." - item = /obj/item/jammer - cost = 5 - -/datum/uplink_item/device_tools/codespeak_manual - name = "Codespeak Manual" - desc = "Syndicate agents can be trained to use a series of codewords to convey complex information, which sounds like random concepts and drinks to anyone listening. This manual teaches you this Codespeak. You can also hit someone else with the manual in order to teach them. This is the deluxe edition, which has unlimited used." - item = /obj/item/codespeak_manual/unlimited - cost = 3 // Implants /datum/uplink_item/implants category = "Implants" surplus = 50 -/datum/uplink_item/implants/freedom - name = "Freedom Implant" - desc = "An implant injected into the body and later activated at the user's will. It will attempt to free the \ - user from common restraints such as handcuffs." - item = /obj/item/storage/box/syndie_kit/imp_freedom - cost = 5 - -/datum/uplink_item/implants/uplink - name = "Uplink Implant" - desc = "An implant injected into the body, and later activated at the user's will. Has no telecrystals, must be charged by the use of physical telecrystals. Undetectable (except via surgery), and excellent for escaping confinement." - item = /obj/item/storage/box/syndie_kit/imp_uplink - cost = 4 - // An empty uplink is kinda useless. - surplus = 0 - restricted = TRUE - /datum/uplink_item/implants/adrenal name = "Adrenal Implant" desc = "An implant injected into the body, and later activated at the user's will. It will inject a chemical \ @@ -1283,12 +1483,19 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes cost = 8 player_minimum = 25 -/datum/uplink_item/implants/storage - name = "Storage Implant" - desc = "An implant injected into the body, and later activated at the user's will. It will open a small bluespace \ - pocket capable of storing two items." - item = /obj/item/storage/box/syndie_kit/imp_storage - cost = 8 +/datum/uplink_item/implants/antistun + name = "CNS Rebooter Implant" + desc = "This implant will help you get back up on your feet faster after being stunned. Comes with an autosurgeon." + item = /obj/item/autosurgeon/anti_stun + cost = 12 + include_modes = list(/datum/game_mode/nuclear) + +/datum/uplink_item/implants/freedom + name = "Freedom Implant" + desc = "An implant injected into the body and later activated at the user's will. It will attempt to free the \ + user from common restraints such as handcuffs." + item = /obj/item/storage/box/syndie_kit/imp_freedom + cost = 5 /datum/uplink_item/implants/microbomb name = "Microbomb Implant" @@ -1315,48 +1522,49 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes cost = 4 restricted = TRUE +/datum/uplink_item/implants/reviver + name = "Reviver Implant" + desc = "This implant will attempt to revive you if you lose consciousness. Comes with an autosurgeon." + item = /obj/item/autosurgeon/reviver + cost = 8 + include_modes = list(/datum/game_mode/nuclear) + /datum/uplink_item/implants/stealthimplant name = "Stealth Implant" desc = "This one-of-a-kind implant will make you almost invisible if you play your cards right." item = /obj/item/implanter/stealth cost = 8 -// Cybernetics -/datum/uplink_item/cyber_implants - category = "Cybernetic Implants" - surplus = 0 - include_modes = list(/datum/game_mode/nuclear) +/datum/uplink_item/implants/storage + name = "Storage Implant" + desc = "An implant injected into the body, and later activated at the user's will. It will open a small bluespace \ + pocket capable of storing two items." + item = /obj/item/storage/box/syndie_kit/imp_storage + cost = 8 -/datum/uplink_item/cyber_implants/thermals +/datum/uplink_item/implants/thermals name = "Thermal Eyes" desc = "These cybernetic eyes will give you thermal vision. Comes with a free autosurgeon." item = /obj/item/autosurgeon/thermal_eyes cost = 8 + include_modes = list(/datum/game_mode/nuclear) -/datum/uplink_item/cyber_implants/xray +/datum/uplink_item/implants/uplink + name = "Uplink Implant" + desc = "An implant injected into the body, and later activated at the user's will. Has no telecrystals, must be charged by the use of physical telecrystals. Undetectable (except via surgery), and excellent for escaping confinement." + item = /obj/item/storage/box/syndie_kit/imp_uplink + cost = 4 + // An empty uplink is kinda useless. + surplus = 0 + restricted = TRUE + +/datum/uplink_item/implants/xray name = "X-ray Vision Implant" desc = "These cybernetic eyes will give you X-ray vision. Comes with an autosurgeon." item = /obj/item/autosurgeon/xray_eyes cost = 10 - -/datum/uplink_item/cyber_implants/antistun - name = "CNS Rebooter Implant" - desc = "This implant will help you get back up on your feet faster after being stunned. Comes with an autosurgeon." - item = /obj/item/autosurgeon/anti_stun - cost = 12 - -/datum/uplink_item/cyber_implants/reviver - name = "Reviver Implant" - desc = "This implant will attempt to revive you if you lose consciousness. Comes with an autosurgeon." - item = /obj/item/autosurgeon/reviver - cost = 8 - -/datum/uplink_item/cyber_implants/bundle - name = "Cybernetic Implants Bundle" - desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. Comes with an autosurgeon." - item = /obj/item/storage/box/cyber_implants - cost = 40 - cant_discount = TRUE + surplus = 0 + include_modes = list(/datum/game_mode/nuclear) // Role-specific items /datum/uplink_item/role_restricted @@ -1364,23 +1572,62 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) surplus = 0 -/datum/uplink_item/role_restricted/reverse_revolver - name = "Reverse Revolver" - desc = "A revolver that always fires at its user. \"Accidentally\" drop your weapon, then watch as the greedy corporate pigs blow their own brains all over the wall. \ - The revolver itself is actually real. Only clumsy people, and clowns, can fire it normally. Comes in a box of hugs. Honk." - cost = 14 - item = /obj/item/storage/box/hug/reverse_revolver +/datum/uplink_item/role_restricted/ancient_jumpsuit + name = "Ancient Jumpsuit" + desc = "A tattered old jumpsuit that will provide absolutely no benefit to you. It fills the wearer with a strange compulsion to blurt out 'glorf'." + item = /obj/item/clothing/under/color/grey/glorf + cost = 20 + restricted_roles = list("Assistant") + +/datum/uplink_item/role_restricted/pie_cannon + name = "Banana Cream Pie Cannon" + desc = "A special pie cannon for a special clown, this gadget can hold up to 20 pies and automatically fabricates one every two seconds!" + cost = 10 + item = /obj/item/pneumatic_cannon/pie/selfcharge restricted_roles = list("Clown") -/datum/uplink_item/role_restricted/reverse_bear_trap - name = "Reverse Bear Trap" - desc = "An ingenious execution device worn on (or forced onto) the head. Arming it starts a 1-minute kitchen timer mounted on the bear trap. When it goes off, the trap's jaws will \ - violently open, instantly killing anyone wearing it by tearing their jaws in half. To arm, attack someone with it while they're not wearing headgear, and you will force it onto their \ - head after three seconds uninterrupted." - cost = 5 - item = /obj/item/reverse_bear_trap +/datum/uplink_item/role_restricted/blastcannon + name = "Blast Cannon" + desc = "A highly specialized weapon, the Blast Cannon is actually relatively simple. It contains an attachment for a tank transfer valve mounted to an angled pipe specially constructed \ + withstand extreme pressure and temperatures, and has a mechanical trigger for triggering the transfer valve. Essentially, it turns the explosive force of a bomb into a narrow-angle \ + blast wave \"projectile\". Aspiring scientists may find this highly useful, as forcing the pressure shockwave into a narrow angle seems to be able to bypass whatever quirk of physics \ + disallows explosive ranges above a certain distance, allowing for the device to use the theoretical yield of a transfer valve bomb, instead of the factual yield." + item = /obj/item/gun/blastcannon + cost = 14 //High cost because of the potential for extreme damage in the hands of a skilled gas masked scientist. + restricted_roles = list("Research Director", "Scientist") + +/datum/uplink_item/role_restricted/brainwash_disk + name = "Brainwashing Surgery Program" + desc = "A disk containing the procedure to perform a brainwashing surgery, allowing you to implant an objective onto a target. \ + Insert into an Operating Console to enable the procedure." + item = /obj/item/disk/surgery/brainwashing + restricted_roles = list("Medical Doctor") + cost = 3 + +/datum/uplink_item/role_restricted/clown_bomb + name = "Clown Bomb" + desc = "The Clown bomb is a hilarious device capable of massive pranks. It has an adjustable timer, \ + with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ + movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ + transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ + be defused, and some crew may attempt to do so." + item = /obj/item/sbeacondrop/clownbomb + cost = 15 restricted_roles = list("Clown") +/* +/datum/uplink_item/role_restricted/clowncar + name = "Clown Car" + desc = "The Clown Car is the ultimate transportation method for any worthy clown! \ + Simply insert your bikehorn and get in, and get ready to have the funniest ride of your life! \ + You can ram any spacemen you come across and stuff them into your car, kidnapping them and locking them inside until \ + someone saves them or they manage to crawl out. Be sure not to ram into any walls or vending machines, as the springloaded seats \ + are very sensetive. Now with our included lube defense mechanism which will protect you against any angry shitcurity!" + item = /obj/vehicle/sealed/car/clowncar + cost = 15 + restricted_roles = list("Clown") +*/ + /datum/uplink_item/role_restricted/clumsyDNA name = "Clumsy Clown DNA" desc = "A DNA injector that has been loaded with the clown gene that makes people clumsy.. \ @@ -1389,19 +1636,31 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/dnainjector/clumsymut restricted_roles = list("Clown") -/datum/uplink_item/role_restricted/taeclowndo_shoes - name = "Tae-clown-do Shoes" - desc = "A pair of shoes for the most elite agents of the honkmotherland. They grant the mastery of taeclowndo with some honk-fu moves as long as they're worn." - cost = 14 - item = /obj/item/clothing/shoes/clown_shoes/taeclowndo - restricted_roles = list("Clown") +/datum/uplink_item/role_restricted/haunted_magic_eightball + name = "Haunted Magic Eightball" + desc = "Most magic eightballs are toys with dice inside. Although identical in appearance to the harmless toys, this occult device reaches into the spirit world to find its answers. Be warned, that spirits are often capricious or just little assholes. To use, simply speak your question aloud, then begin shaking." + item = /obj/item/toy/eightball/haunted + cost = 2 + restricted_roles = list("Curator") + limited_stock = 1 //please don't spam deadchat -/datum/uplink_item/role_restricted/mimery - name = "Guide to Advanced Mimery Series" - desc = "The classical two part series on how to further hone your mime skills. Upon studying the series, the user should be able to make 3x1 invisible walls, and shoot bullets out of their fingers. Obviously only works for Mimes." - cost = 12 - item = /obj/item/storage/box/syndie_kit/mimery - restricted_roles = list("Mime") +/datum/uplink_item/role_restricted/his_grace + name = "His Grace" + desc = "An incredibly dangerous weapon recovered from a station overcome by the grey tide. Once activated, He will thirst for blood and must be used to kill to sate that thirst. \ + His Grace grants gradual regeneration and complete stun immunity to His wielder, but be wary: if He gets too hungry, He will become impossible to drop and eventually kill you if not fed. \ + However, if left alone for long enough, He will fall back to slumber. \ + To activate His Grace, simply unlatch Him." + item = /obj/item/his_grace + cost = 20 + restricted_roles = list("Chaplain") + surplus = 5 //Very low chance to get it in a surplus crate even without being the chaplain + +/datum/uplink_item/role_restricted/explosive_hot_potato + name = "Exploding Hot Potato" + desc = "A potato rigged with explosives. On activation, a special mechanism is activated that prevents it from being dropped. The only way to get rid of it if you are holding it is to attack someone else with it, causing it to latch to that person instead." + item = /obj/item/hot_potato/syndicate + cost = 4 + restricted_roles = list("Cook", "Botanist", "Clown", "Mime") /datum/uplink_item/role_restricted/ez_clean_bundle name = "EZ Clean Grenade Bundle" @@ -1411,6 +1670,36 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes surplus = 20 restricted_roles = list("Janitor") +/datum/uplink_item/role_restricted/goldenbox + name = "Gold Toolbox" + desc = "A gold planted plastitanium toolbox loaded with tools. Comes with a set of AI detection multi-tool and a pare of combat gloves." + item = /obj/item/storage/toolbox/gold_real + cost = 3 // Has syndie tools + gloves + a robust weapon + restricted_roles = list("Assistant", "Curator") //Curator due to this being made of gold - It fits the theme + +/datum/uplink_item/role_restricted/mimery + name = "Guide to Advanced Mimery Series" + desc = "The classical two part series on how to further hone your mime skills. Upon studying the series, the user should be able to make 3x1 invisible walls, and shoot bullets out of their fingers. Obviously only works for Mimes." + cost = 12 + item = /obj/item/storage/box/syndie_kit/mimery + restricted_roles = list("Mime") + +/datum/uplink_item/role_restricted/ultrahonkpins + name = "Hilarious firing pin" + desc = "A single firing pin made for Clown agents, this firing pin makes any gun honk when fired if not a true clown! \ + This firing pin also helps you fire the gun correctly. May the HonkMother HONK you agent." + item = /obj/item/firing_pin/clown/ultra + cost = 2 + restricted_roles = list("Clown") + +/datum/uplink_item/role_restricted/pressure_mod + name = "Kinetic Accelerator Pressure Mod" + desc = "A modification kit which allows Kinetic Accelerators to do greatly increased damage while indoors. Occupies 35% mod capacity." + item = /obj/item/borg/upgrade/modkit/indoors + cost = 5 //you need two for full damage, so total of 10 for maximum damage + limited_stock = 2 //you can't use more than two! + restricted_roles = list("Shaft Miner") + /datum/uplink_item/role_restricted/kitchen_gun name = "Kitchen Gun (TM)" desc = "A revolutionary .45 caliber cleaning solution! Say goodbye to daily stains and dirty surfaces with Kitchen Gun (TM)! Just five shots from Kitchen Gun (TM), and it'll sparkle like new! Includes two extra ammunition clips!" @@ -1426,60 +1715,12 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes restricted_roles = list("Cook", "Janitor") item = /obj/item/ammo_box/magazine/m45/kitchengun -/datum/uplink_item/role_restricted/explosive_hot_potato - name = "Exploding Hot Potato" - desc = "A potato rigged with explosives. On activation, a special mechanism is activated that prevents it from being dropped. The only way to get rid of it if you are holding it is to attack someone else with it, causing it to latch to that person instead." - item = /obj/item/hot_potato/syndicate - cost = 4 - restricted_roles = list("Cook", "Botanist", "Clown", "Mime") - -/datum/uplink_item/role_restricted/his_grace - name = "His Grace" - desc = "An incredibly dangerous weapon recovered from a station overcome by the grey tide. Once activated, He will thirst for blood and must be used to kill to sate that thirst. \ - His Grace grants gradual regeneration and complete stun immunity to His wielder, but be wary: if He gets too hungry, He will become impossible to drop and eventually kill you if not fed. \ - However, if left alone for long enough, He will fall back to slumber. \ - To activate His Grace, simply unlatch Him." - item = /obj/item/his_grace - cost = 20 - restricted_roles = list("Chaplain") - surplus = 5 //Very low chance to get it in a surplus crate even without being the chaplain - -/datum/uplink_item/role_restricted/pie_cannon - name = "Banana Cream Pie Cannon" - desc = "A special pie cannon for a special clown, this gadget can hold up to 20 pies and automatically fabricates one every two seconds!" - cost = 10 - item = /obj/item/pneumatic_cannon/pie/selfcharge - restricted_roles = list("Clown") - -/datum/uplink_item/role_restricted/ancient_jumpsuit - name = "Ancient Jumpsuit" - desc = "A tattered old jumpsuit that will provide absolutely no benefit to you. It fills the wearer with a strange compulsion to blurt out 'glorf'." - item = /obj/item/clothing/under/color/grey/glorf - cost = 20 - restricted_roles = list("Assistant") - -/datum/uplink_item/role_restricted/goldenbox - name = "Gold Toolbox" - desc = "A gold planted plastitanium toolbox loaded with tools. Comes with a set of AI detection multi-tool and a pare of combat gloves." - item = /obj/item/storage/toolbox/gold_real - cost = 3 // Has synda tools + gloves + a robust weapon - restricted_roles = list("Assistant", "Curator") //Curator do to being made of gold - It fits the theme - -/datum/uplink_item/role_restricted/brainwash_disk - name = "Brainwashing Surgery Program" - desc = "A disk containing the procedure to perform a brainwashing surgery, allowing you to implant an objective onto a target. \ - Insert into an Operating Console to enable the procedure." - item = /obj/item/disk/surgery/brainwashing - restricted_roles = list("Medical Doctor") - cost = 3 - -/datum/uplink_item/role_restricted/haunted_magic_eightball - name = "Haunted Magic Eightball" - desc = "Most magic eightballs are toys with dice inside. Although identical in appearance to the harmless toys, this occult device reaches into the spirit world to find its answers. Be warned, that spirits are often capricious or just little assholes. To use, simply speak your question aloud, then begin shaking." - item = /obj/item/toy/eightball/haunted - cost = 2 - restricted_roles = list("Curator") - limited_stock = 1 //please don't spam deadchat +/datum/uplink_item/role_restricted/magillitis_serum + name = "Magillitis Serum Autoinjector" + desc = "A single-use autoinjector which contains an experimental serum that causes rapid muscular growth in Hominidae. Side-affects may include hypertrichosis, violent outbursts, and an unending affinity for bananas." + item = /obj/item/reagent_containers/hypospray/magillitis + cost = 15 + restricted_roles = list("Geneticist", "Chief Medical Officer") /datum/uplink_item/role_restricted/modified_syringe_gun name = "Modified Syringe Gun" @@ -1495,100 +1736,41 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes cost = 12 restricted_roles = list("Chemist", "Chief Medical Officer") -/datum/uplink_item/role_restricted/magillitis_serum - name = "Magillitis Serum Autoinjector" - desc = "A single-use autoinjector which contains an experimental serum that causes rapid muscular growth in Hominidae. Side-affects may include hypertrichosis, violent outbursts, and an unending affinity for bananas." - item = /obj/item/reagent_containers/hypospray/magillitis - cost = 15 - restricted_roles = list("Geneticist", "Chief Medical Officer") - -/datum/uplink_item/role_restricted/pressure_mod - name = "Kinetic Accelerator Pressure Mod" - desc = "A modification kit which allows Kinetic Accelerators to do greatly increased damage while indoors. Occupies 35% mod capacity." - item = /obj/item/borg/upgrade/modkit/indoors - cost = 5 //you need two for full damage, so total of 10 for maximum damage - limited_stock = 2 //you can't use more than two! - restricted_roles = list("Shaft Miner") - -/datum/uplink_item/role_restricted/blastcannon - name = "Blast Cannon" - desc = "A highly specialized weapon, the Blast Cannon is actually relatively simple. It contains an attachment for a tank transfer valve mounted to an angled pipe specially constructed \ - withstand extreme pressure and temperatures, and has a mechanical trigger for triggering the transfer valve. Essentially, it turns the explosive force of a bomb into a narrow-angle \ - blast wave \"projectile\". Aspiring scientists may find this highly useful, as forcing the pressure shockwave into a narrow angle seems to be able to bypass whatever quirk of physics \ - disallows explosive ranges above a certain distance, allowing for the device to use the theoretical yield of a transfer valve bomb, instead of the factual yield." - item = /obj/item/gun/blastcannon - cost = 14 //High cost because of the potential for extreme damage in the hands of a skilled gas masked scientist. - restricted_roles = list("Research Director", "Scientist") - -/datum/uplink_item/device_tools/clown_bomb - name = "Clown Bomb" - desc = "The Clown bomb is a hilarious device capable of massive pranks. It has an adjustable timer, \ - with a minimum of 60 seconds, and can be bolted to the floor with a wrench to prevent \ - movement. The bomb is bulky and cannot be moved; upon ordering this item, a smaller beacon will be \ - transported to you that will teleport the actual bomb to it upon activation. Note that this bomb can \ - be defused, and some crew may attempt to do so." - item = /obj/item/sbeacondrop/clownbomb - cost = 15 +/datum/uplink_item/role_restricted/reverse_bear_trap + name = "Reverse Bear Trap" + desc = "An ingenious execution device worn on (or forced onto) the head. Arming it starts a 1-minute kitchen timer mounted on the bear trap. When it goes off, the trap's jaws will \ + violently open, instantly killing anyone wearing it by tearing their jaws in half. To arm, attack someone with it while they're not wearing headgear, and you will force it onto their \ + head after three seconds uninterrupted." + cost = 5 + item = /obj/item/reverse_bear_trap restricted_roles = list("Clown") -/datum/uplink_item/device_tools/ultrahonkpins //Idealy so they can place it into their own guns without needing cargo - name = "Hilarious firing pin" - desc = "A single firing pin made for Clown agents, this firing pin makes any gun honk when fired if not a true clown! \ - This firing pin also helps you fire the gun correctly. May the HonkMother HONK you agent." - item = /obj/item/firing_pin/clown/ultra - cost = 2 +/datum/uplink_item/role_restricted/reverse_revolver + name = "Reverse Revolver" + desc = "A revolver that always fires at its user. \"Accidentally\" drop your weapon, then watch as the greedy corporate pigs blow their own brains all over the wall. \ + The revolver itself is actually real. Only clumsy people, and clowns, can fire it normally. Comes in a box of hugs. Honk." + cost = 14 + item = /obj/item/storage/box/hug/reverse_revolver restricted_roles = list("Clown") -/* -/datum/uplink_item/role_restricted/clowncar - name = "Clown Car" - desc = "The Clown Car is the ultimate transportation method for any worthy clown! \ - Simply insert your bikehorn and get in, and get ready to have the funniest ride of your life! \ - You can ram any spacemen you come across and stuff them into your car, kidnapping them and locking them inside until \ - someone saves them or they manage to crawl out. Be sure not to ram into any walls or vending machines, as the springloaded seats \ - are very sensetive. Now with our included lube defense mechanism which will protect you against any angry shitcurity!" - item = /obj/vehicle/sealed/car/clowncar - cost = 15 +/datum/uplink_item/role_restricted/taeclowndo_shoes + name = "Tae-clown-do Shoes" + desc = "A pair of shoes for the most elite agents of the honkmotherland. They grant the mastery of taeclowndo with some honk-fu moves as long as they're worn." + cost = 14 + item = /obj/item/clothing/shoes/clown_shoes/taeclowndo restricted_roles = list("Clown") -*/ + // Pointless /datum/uplink_item/badass category = "(Pointless) Badassery" surplus = 0 -/datum/uplink_item/badass/syndiecards - name = "Syndicate Playing Cards" - desc = "A special deck of space-grade playing cards with a mono-molecular edge and metal reinforcement, \ - making them slightly more robust than a normal deck of cards. \ - You can also play card games with them or leave them on your victims." - item = /obj/item/toy/cards/deck/syndicate - cost = 1 - surplus = 40 - -/datum/uplink_item/badass/syndiecash - name = "Syndicate Briefcase Full of Cash" - desc = "A secure briefcase containing 5000 space credits. Useful for bribing personnel, or purchasing goods \ - and services at lucrative prices. The briefcase also feels a little heavier to hold; it has been \ - manufactured to pack a little bit more of a punch if your client needs some convincing." - item = /obj/item/storage/secure/briefcase/syndie - cost = 1 - -/datum/uplink_item/badass/syndiecigs - name = "Syndicate Smokes" - desc = "Strong flavor, dense smoke, infused with omnizine." - item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate - cost = 2 - -/datum/uplink_item/badass/balloon - name = "Syndicate Balloon" - desc = "For showing that you are THE BOSS: A useless red balloon with the Syndicate logo on it. \ - Can blow the deepest of covers." - item = /obj/item/toy/syndicateballoon - cost = 20 - cant_discount = TRUE +/datum/uplink_item/badass/costumes/obvious_chameleon + name = "Broken Chameleon Kit" + desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anything on the station, and more! Please note that this kit did NOT pass quality control." + item = /obj/item/storage/box/syndie_kit/chameleon/broken /datum/uplink_item/badass/costumes - surplus = 0 include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) cost = 4 cant_discount = TRUE @@ -1603,90 +1785,45 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes desc = "Nothing is more terrifying than clowns with fully automatic weaponry." item = /obj/item/storage/backpack/duffelbag/clown/syndie -/datum/uplink_item/badass/costumes/obvious_chameleon - name = "Broken Chameleon Kit" - desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anything on the station, and more! Please note that this kit did NOT pass quality control." - item = /obj/item/storage/box/syndie_kit/chameleon/broken +/datum/uplink_item/badass/plastitanium_toolbox + name = "Plastitanium Toolbox" + desc = "A very high impact toolbox. Excels at destroying stationary structures." + item = /obj/item/storage/toolbox/plastitanium + cost = 2 //18 damage on mobs, 50 on objects, 4.5 stam/hit -/datum/uplink_item/badass/rapid - name = "Gloves of the North Star" - desc = "These gloves let the user punch people very fast. Does not improve weapon attack speed or the meaty fists of a hulk." - item = /obj/item/clothing/gloves/rapid - cost = 8 - -/datum/uplink_item/badass/bundle - name = "Syndicate Bundle" - desc = "Syndicate Bundles are specialized groups of items that arrive in a plain box. \ - These items are collectively worth more than 20 telecrystals, but you do not know which specialization \ - you will receive." - item = /obj/item/storage/box/syndicate +/datum/uplink_item/badass/balloon + name = "Syndicate Balloon" + desc = "For showing that you are THE BOSS: A useless red balloon with the Syndicate logo on it. \ + Can blow the deepest of covers." + item = /obj/item/toy/syndicateballoon cost = 20 - exclude_modes = list(/datum/game_mode/nuclear) cant_discount = TRUE -/datum/uplink_item/badass/surplus - name = "Syndicate Surplus Crate" - desc = "A dusty crate from the back of the Syndicate warehouse. Rumored to contain a valuable assortment of items, \ - but you never know. Contents are sorted to always be worth 50 TC." - item = /obj/structure/closet/crate - cost = 20 - player_minimum = 25 - exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) - cant_discount = TRUE - var/starting_crate_value = 50 +/datum/uplink_item/badass/syndiecash + name = "Syndicate Briefcase Full of Cash" + desc = "A secure briefcase containing 5000 space credits. Useful for bribing personnel, or purchasing goods \ + and services at lucrative prices. The briefcase also feels a little heavier to hold; it has been \ + manufactured to pack a little bit more of a punch if your client needs some convincing." + item = /obj/item/storage/secure/briefcase/syndie + cost = 1 -/datum/uplink_item/badass/surplus/super - name = "Super Surplus Crate" - desc = "A dusty SUPER-SIZED from the back of the Syndicate warehouse. Rumored to contain a valuable assortment of items, \ - but you never know. Contents are sorted to always be worth 125 TC." - cost = 40 - player_minimum = 40 - starting_crate_value = 125 +/datum/uplink_item/badass/phantomthief + name = "Syndicate Mask" + desc = "A cheap plastic mask fitted with an adrenaline autoinjector, which can be used by simply tensing your muscles" + item = /obj/item/clothing/glasses/phantomthief/syndicate + cost = 2 -/datum/uplink_item/badass/surplus/purchase(mob/user, datum/component/uplink/U) - var/list/uplink_items = get_uplink_items(SSticker && SSticker.mode? SSticker.mode : null, FALSE) +/datum/uplink_item/badass/syndiecards + name = "Syndicate Playing Cards" + desc = "A special deck of space-grade playing cards with a mono-molecular edge and metal reinforcement, \ + making them slightly more robust than a normal deck of cards. \ + You can also play card games with them or leave them on your victims." + item = /obj/item/toy/cards/deck/syndicate + cost = 1 + surplus = 40 - var/crate_value = starting_crate_value - var/obj/structure/closet/crate/C = spawn_item(/obj/structure/closet/crate, user) - if(U.purchase_log) - U.purchase_log.LogPurchase(C, src, cost) - while(crate_value) - var/category = pick(uplink_items) - var/item = pick(uplink_items[category]) - var/datum/uplink_item/I = uplink_items[category][item] - - if(!I.surplus || prob(100 - I.surplus)) - continue - if(crate_value < I.cost) - continue - crate_value -= I.cost - var/obj/goods = new I.item(C) - if(U.purchase_log) - U.purchase_log.LogPurchase(goods, I, 0) - return C - -/datum/uplink_item/badass/random - name = "Random Item" - desc = "Picking this will purchase a random item. Useful if you have some TC to spare or if you haven't decided on a strategy yet." - item = /obj/effect/gibspawner/generic // non-tangible item because techwebs use this path to determine illegal tech - cost = 0 - cant_discount = TRUE - -/datum/uplink_item/badass/random/purchase(mob/user, datum/component/uplink/U) - var/list/uplink_items = U.uplink_items - var/list/possible_items = list() - for(var/category in uplink_items) - for(var/item in uplink_items[category]) - var/datum/uplink_item/I = uplink_items[category][item] - if(src == I || !I.item) - continue - if(U.telecrystals < I.cost) - continue - if(I.limited_stock == 0) - continue - possible_items += I - - if(possible_items.len) - var/datum/uplink_item/I = pick(possible_items) - SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(I.name)) - U.MakePurchase(user, I) +/datum/uplink_item/badass/syndiecigs + name = "Syndicate Smokes" + desc = "Strong flavor, dense smoke, infused with omnizine." + item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate + cost = 2 diff --git a/code/modules/vehicles/_vehicle.dm b/code/modules/vehicles/_vehicle.dm index be59a6df65..54bc03bcf3 100644 --- a/code/modules/vehicles/_vehicle.dm +++ b/code/modules/vehicles/_vehicle.dm @@ -31,6 +31,19 @@ occupant_actions = list() generate_actions() +/obj/vehicle/examine(mob/user) + ..() + if(resistance_flags & ON_FIRE) + to_chat(user, "It's on fire!") + var/healthpercent = obj_integrity/max_integrity * 100 + switch(healthpercent) + if(50 to 99) + to_chat(user, "It looks slightly damaged.") + if(25 to 50) + to_chat(user, "It appears heavily damaged.") + if(0 to 25) + to_chat(user, "It's falling apart!") + /obj/vehicle/proc/is_key(obj/item/I) return I? (key_type_exact? (I.type == key_type) : istype(I, key_type)) : FALSE diff --git a/code/modules/vehicles/ridden.dm b/code/modules/vehicles/ridden.dm index 25a337bc22..8fe7322579 100644 --- a/code/modules/vehicles/ridden.dm +++ b/code/modules/vehicles/ridden.dm @@ -4,8 +4,8 @@ max_buckled_mobs = 1 buckle_lying = FALSE default_driver_move = FALSE - var/legs_required = 2 - var/arms_requires = 0 //why not? + var/legs_required = 1 + var/arms_required = 0 //why not? /obj/vehicle/ridden/Initialize() . = ..() @@ -31,6 +31,9 @@ /obj/vehicle/ridden/post_buckle_mob(mob/living/M) add_occupant(M) + if(M.get_num_legs() < legs_required) + to_chat(M, "You don't have enough legs to operate the pedals!") + unbuckle_mob(M) return ..() /obj/vehicle/ridden/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm new file mode 100644 index 0000000000..a5ba06e6fb --- /dev/null +++ b/code/modules/vehicles/wheelchair.dm @@ -0,0 +1,110 @@ +/obj/vehicle/ridden/wheelchair //ported from Hippiestation (by Jujumatic) Then ported by Fermis from tg! + name = "wheelchair" + desc = "A chair with big wheels. It looks like you can move in this on your own." + icon = 'icons/obj/vehicles.dmi' + icon_state = "wheelchair" + layer = OBJ_LAYER + max_integrity = 100 + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 30) //Wheelchairs aren't super tough yo + legs_required = 0 //You'll probably be using this if you don't have legs + canmove = TRUE + density = FALSE //Thought I couldn't fix this one easily, phew + arms_required = 1 + +/obj/vehicle/ridden/wheelchair/Initialize() + . = ..() + var/datum/component/riding/D = LoadComponent(/datum/component/riding) + D.vehicle_move_delay = 0 + D.set_vehicle_dir_layer(SOUTH, OBJ_LAYER) + D.set_vehicle_dir_layer(NORTH, ABOVE_MOB_LAYER) + D.set_vehicle_dir_layer(EAST, OBJ_LAYER) + D.set_vehicle_dir_layer(WEST, OBJ_LAYER) + +/obj/vehicle/ridden/wheelchair/ComponentInitialize() //Since it's technically a chair I want it to have chair properties + . = ..() + AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, .proc/can_user_rotate),CALLBACK(src, .proc/can_be_rotated),null) + +/obj/vehicle/ridden/wheelchair/obj_destruction(damage_flag) + new /obj/item/stack/rods(drop_location(), 1) + new /obj/item/stack/sheet/metal(drop_location(), 1) + ..() + +/obj/vehicle/ridden/wheelchair/Destroy() + if(has_buckled_mobs()) + var/mob/living/carbon/H = buckled_mobs[1] + unbuckle_mob(H) + return ..() + +/obj/vehicle/ridden/wheelchair/driver_move(mob/living/user, direction) + if(istype(user)) + if(canmove && (user.get_num_arms() < arms_required)) + to_chat(user, "You don't have enough arms to operate the wheels!") + canmove = FALSE + addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20) + return FALSE + var/datum/component/riding/D = GetComponent(/datum/component/riding) + //1.5 (movespeed as of this change) multiplied by 6.7 gets ABOUT 10 (rounded), the old constant for the wheelchair that gets divided by how many arms they have + //if that made no sense this simply makes the wheelchair speed change along with movement speed delay + D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / min(user.get_num_arms(), 2) + return ..() + +/obj/vehicle/ridden/wheelchair/Moved() + . = ..() + cut_overlays() + playsound(src, 'sound/effects/roll.ogg', 75, 1) + if(has_buckled_mobs()) + handle_rotation_overlayed() + + +/obj/vehicle/ridden/wheelchair/post_buckle_mob(mob/living/user) + . = ..() + handle_rotation_overlayed() + +/obj/vehicle/ridden/wheelchair/post_unbuckle_mob() + . = ..() + cut_overlays() + +/obj/vehicle/ridden/wheelchair/setDir(newdir) + ..() + handle_rotation(newdir) + +/obj/vehicle/ridden/wheelchair/wrench_act(mob/living/user, obj/item/I) //Attackby should stop it attacking the wheelchair after moving away during decon + to_chat(user, "You begin to detach the wheels...") + if(I.use_tool(src, user, 40, volume=50)) + to_chat(user, "You detach the wheels and deconstruct the chair.") + new /obj/item/stack/rods(drop_location(), 6) + new /obj/item/stack/sheet/metal(drop_location(), 4) + qdel(src) + return TRUE + +/obj/vehicle/ridden/wheelchair/proc/handle_rotation(direction) + if(has_buckled_mobs()) + handle_rotation_overlayed() + for(var/m in buckled_mobs) + var/mob/living/buckled_mob = m + buckled_mob.setDir(direction) + +/obj/vehicle/ridden/wheelchair/proc/handle_rotation_overlayed() + cut_overlays() + var/image/V = image(icon = icon, icon_state = "wheelchair_overlay", layer = FLY_LAYER, dir = src.dir) + add_overlay(V) + + + +/obj/vehicle/ridden/wheelchair/proc/can_be_rotated(mob/living/user) + return TRUE + +/obj/vehicle/ridden/wheelchair/proc/can_user_rotate(mob/living/user) + var/mob/living/L = user + if(istype(L)) + if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + return FALSE + if(isobserver(user) && CONFIG_GET(flag/ghost_interaction)) + return TRUE + return FALSE + +/obj/vehicle/ridden/wheelchair/the_whip/driver_move(mob/living/user, direction) + if(istype(user)) + var/datum/component/riding/D = GetComponent(/datum/component/riding) + D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / user.get_num_arms() + return ..() diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index 5ff07cc842..523606aa6a 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -23,14 +23,19 @@ /obj/item/reagent_containers/glass/bottle/salglu_solution = 3, /obj/item/reagent_containers/glass/bottle/morphine = 4, /obj/item/reagent_containers/glass/bottle/toxin = 3, - /obj/item/reagent_containers/syringe/antiviral = 6) + /obj/item/reagent_containers/syringe/antiviral = 6, + /obj/item/storage/briefcase/medical = 2) contraband = list(/obj/item/reagent_containers/pill/tox = 3, /obj/item/reagent_containers/pill/morphine = 4, /obj/item/reagent_containers/pill/charcoal = 6) premium = list(/obj/item/storage/box/hug/medical = 1, /obj/item/reagent_containers/hypospray/medipen = 3, /obj/item/storage/belt/medical = 3, - /obj/item/wrench/medical = 1) + /obj/item/wrench/medical = 1, + /obj/item/storage/belt/medolier/full = 2, + /obj/item/gun/syringe/dart = 2, + /obj/item/storage/briefcase/medical = 2) + armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/medical @@ -41,4 +46,4 @@ /obj/machinery/vending/medical/syndicate_access name = "\improper SyndiMed Plus" - req_access = list(ACCESS_SYNDICATE) \ No newline at end of file + req_access = list(ACCESS_SYNDICATE) diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm index 018eb09d86..514bbd8730 100644 --- a/code/modules/vending/medical_wall.dm +++ b/code/modules/vending/medical_wall.dm @@ -10,7 +10,8 @@ /obj/item/reagent_containers/medspray/styptic = 2, /obj/item/reagent_containers/medspray/silver_sulf = 2, /obj/item/reagent_containers/pill/charcoal = 2, - /obj/item/reagent_containers/medspray/sterilizine = 1) + /obj/item/reagent_containers/medspray/sterilizine = 1, + /obj/item/reagent_containers/syringe/dart = 10) contraband = list(/obj/item/reagent_containers/pill/tox = 2, /obj/item/reagent_containers/pill/morphine = 2) premium = list(/obj/item/reagent_containers/medspray/synthflesh = 2) diff --git a/config/spaceRuinBlacklist.txt b/config/spaceRuinBlacklist.txt index 628e08f8f1..cba9a01e73 100644 --- a/config/spaceRuinBlacklist.txt +++ b/config/spaceRuinBlacklist.txt @@ -45,3 +45,7 @@ #_maps/RandomRuins/SpaceRuins/way_home.dmm #_maps/RandomRuins/SpaceRuins/whiteshipdock.dmm #_maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm +#_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm +#_maps/RandomRuins/SpaceRuins/bigape.dmm +#_maps/RandomRuins/SpaceRuins/arcade.dmm +#_maps/RandomRuins/SpaceRuins/spacehermit.dmm diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css deleted file mode 100644 index 820537e32b..0000000000 --- a/goon/browserassets/css/browserOutput.css +++ /dev/null @@ -1,362 +0,0 @@ -/***************************************** -* -* GLOBAL STYLES -* -******************************************/ -html, body { - padding: 0; - margin: 0; - height: 100%; - color: #000000; -} -body { - background: #fff; - font-family: Verdana, sans-serif; - font-size: 9pt; - line-height: 1.4; - overflow-x: hidden; - overflow-y: scroll; - word-wrap: break-word; -} - -em { - font-style: normal; - font-weight: bold; -} - -img { - margin: 0; - padding: 0; - line-height: 1; -} -img.icon { - width: 16px; - height: 16px; -} - -a {color: #0000ff;} -a.visited {color: #ff00ff;} -a:visited {color: #ff00ff;} -a.popt {text-decoration: none;} - -/***************************************** -* -* OUTPUT NOT RELATED TO ACTUAL MESSAGES -* -******************************************/ -#loading { - position: fixed; - width: 300px; - height: 150px; - text-align: center; - left: 50%; - top: 50%; - margin: -75px 0 0 -150px; -} -#loading i {display: block; padding-bottom: 3px;} - -#messages { - font-size: 14px; - padding: 3px; - margin: 0; - word-wrap: break-word; -} -#newMessages { - position: fixed; - display: block; - bottom: 0; - right: 0; - padding: 8px; - background: #ddd; - text-decoration: none; - font-variant: small-caps; - font-size: 1.1em; - font-weight: bold; - color: #333; -} -#newMessages:hover {background: #ccc;} -#newMessages i {vertical-align: middle; padding-left: 3px;} -#ping { - position: fixed; - top: 0; - right: 40px; - width: 45px; - background: #ddd; - height: 30px; - padding: 8px 0 2px 0; -} -#ping i {display: block; text-align: center;} -#ping .ms { - display: block; - text-align: center; - font-size: 8pt; - padding-top: 2px; -} -#options { - position: fixed; - top: 0; - right: 0; -} -#options a { - background: #ddd; - height: 30px; - padding: 5px 0; - display: block; - color: #333; - text-decoration: none; - line-height: 28px; - border-top: 1px solid #b4b4b4; -} -#options a:hover {background: #ccc;} -#options .toggle { - width: 40px; - background: #ccc; - border-top: 0; - float: right; - text-align: center; -} -#options .sub {clear: both; display: none; width: 160px;} -#options .sub.scroll {overflow-y: scroll;} -#options .sub a {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} -#options .sub span { - display: block; - line-height: 30px; - float: left; -} -#options .sub i { - display: block; - padding: 0 5px; - font-size: 1.1em; - width: 22px; - text-align: center; - line-height: 30px; - float: right; -} -#options .decreaseFont {border-top: 0;} - -/* POPUPS */ -.popup { - position: fixed; - top: 50%; - left: 50%; - background: #ddd; -} -.popup .close { - position: absolute; - background: #aaa; - top: 0; - right: 0; - color: #333; - text-decoration: none; - z-index: 2; - padding: 0 10px; - height: 30px; - line-height: 30px; -} -.popup .close:hover {background: #999;} -.popup .head { - background: #999; - color: #ddd; - padding: 0 10px; - height: 30px; - line-height: 30px; - text-transform: uppercase; - font-size: 0.9em; - font-weight: bold; - border-bottom: 2px solid green; -} -.popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;} -.popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;} -.popup input[type=submit] {padding: 5px 10px; background: #999; color: #ddd; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} -.popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;} - -.changeFont {padding: 10px;} -.changeFont a {display: block; text-decoration: none; padding: 3px; color: #333;} -.changeFont a:hover {background: #ccc;} - -.highlightPopup {padding: 10px; text-align: center;} -.highlightPopup input[type=text] {display: block; width: 215px; text-align: left; margin-top: 5px;} -.highlightPopup input.highlightColor {background-color: #FFFF00;} -.highlightPopup input.highlightTermSubmit {margin-top: 5px;} - -/* ADMIN CONTEXT MENU */ -.contextMenu { - background-color: #ddd; - position: fixed; - margin: 2px; - width: 150px; -} -.contextMenu a { - display: block; - padding: 2px 5px; - text-decoration: none; - color: #333; -} - -.contextMenu a:hover { - background-color: #ccc; -} - -/* ADMIN FILTER MESSAGES MENU */ -.filterMessages {padding: 5px;} -.filterMessages div {padding: 2px 0;} -.filterMessages input {} -.filterMessages label {} - -.icon-stack {height: 1em; line-height: 1em; width: 1em; vertical-align: middle; margin-top: -2px;} - - -/***************************************** -* -* OUTPUT ACTUALLY RELATED TO MESSAGES -* -******************************************/ - -/* MOTD */ -.motd {color: #638500; font-family: Verdana, sans-serif;} -.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #638500; text-decoration: underline;} -.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} - -/* ADD HERE FOR BOLD */ -.bold, .name, .prefix, .ooc, .looc, .adminooc, .admin, .medal, .yell {font-weight: bold;} - -/* ADD HERE FOR ITALIC */ -.italic, .italics, .emote {font-style: italic;} - -/* OUTPUT COLORS */ -.highlight {background: yellow;} - -h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;} -h1.alert, h2.alert {color: #000000;} - -em {font-style: normal; font-weight: bold;} - -.adminobserverooc {color: #0099cc; font-weight: bold;} -.adminooc {color: #b82e00; font-weight: bold;} -.adminobserver {color: #996600; font-weight: bold;} -.admin {color: #386aff; font-weight: bold;} -/* SAY CLASSES */ -.say {} -.deadsay {color: #5c00e6;} -.siliconsay {font-family: 'Courier New', Courier, monospace;} -/* RADIO CLASSES */ -.radio {color: #008000;} - -.syndradio {color: #6d3f40;} -.centradio {color: #686868;} - -.aiprivradio {color: #ff00ff;} -.comradio {color: #948f02;} - -.secradio {color: #a30000;} -.engradio {color: #fb5613;} -.medradio {color: #337296;} -.sciradio {color: #993399;} -.supradio {color: #a8732b;} -.servadio {color: #6eaa2c;} - -.attack {color: #ff0000;} -.disarm {color: #990000;} -.passive {color: #660000;} - -.selecteddna {color: #ffffff; background-color: #001B1B} -.alert {color: #ff0000;} -.userdanger {color: #ff0000; font-weight: bold; font-size: 3;} -.danger {color: #ff0000;} -.warning {color: #ff0000; font-style: italic;} -.boldwarning {color: #ff0000; font-style: italic; font-weight: bold} -.announce {color: #228b22; font-weight: bold;} -.boldannounce {color: #ff0000; font-weight: bold;} -.greenannounce {color: #00ff00; font-weight: bold;} -.rose {color: #ff5050;} -.info {color: #0000CC;} -.notice {color: #000099;} -.boldnotice {color: #000099; font-weight: bold;} -.adminnotice {color: #0000ff;} -.unconscious {color: #0000ff; font-weight: bold;} -.suicide {color: #ff5050; font-style: italic;} -.green {color: #03ff39;} -.shadowling {color: #3b2769;} -.cult {color: #960000;} -.cultitalic {color: #960000; font-style: italic;} -.cultlarge {color: #960000; font-weight: bold; font-size: 3;} -.narsie {color: #960000; font-weight: bold; font-size: 125px;} -.narsiesmall {color: #960000; font-weight: bold; font-size: 6;} -.colossus {color: #7F282A; font-size: 5;} -.hierophant {color: #660099; font-weight: bold; font-style: italic;} -.hierophant_warning {color: #660099; font-style: italic;} -.purple {color: #5e2d79;} -.holoparasite {color: #35333a;} -.holoparasitebold {color: #35333a; font-weight: bold;} - -.revennotice {color: #1d2953;} -.revenboldnotice {color: #1d2953; font-weight: bold;} -.revenbignotice {color: #1d2953; font-weight: bold; font-size: 3;} -.revenminor {color: #823abb} -.revenwarning {color: #760fbb; font-style: italic;} -.revendanger {color: #760fbb; font-weight: bold; font-size: 3;} -.umbra {color: #5000A0;} -.umbra_bold {color: #5000A0; font-weight: bold;} -.umbra_italics {color: #5000A0; font-style: italic;} -.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;} -.umbra_large {color: #5000A0; font-size: 3;} - -.brass {color: #BE8700;} -.heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;} -.large_brass {color: #BE8700; font-size: 3;} -.big_brass {color: #BE8700; font-size: 3; font-weight: bold; font-style: italic;} -.ratvar {color: #BE8700; font-size: 6; font-weight: bold; font-style: italic;} -.alloy {color: #42474D;} -.heavy_alloy {color: #42474D; font-weight: bold; font-style: italic;} -.large_alloy {color: #42474D; font-size: 3;} -.nezbere_large {color: #42474D; font-size: 3; font-weight: bold; font-style: italic;} -.nezbere {color: #42474D; font-weight: bold; font-style: italic;} -.nezbere_small {color: #42474D;} -.sevtug_large {color: #AF0AAF; font-size: 3; font-weight: bold; font-style: italic;} -.sevtug {color: #AF0AAF; font-weight: bold; font-style: italic;} -.sevtug_small {color: #AF0AAF;} -.inathneq_large {color: #1E8CE1; font-size: 3; font-weight: bold; font-style: italic;} -.inathneq {color: #1E8CE1; font-weight: bold; font-style: italic;} -.inathneq_small {color: #1E8CE1;} -.nzcrentr_large {color: #DAAA18; font-size: 3; font-weight: bold; font-style: italic;} -.nzcrentr {color: #DAAA18; font-weight: bold; font-style: italic;} -.nzcrentr_small {color: #DAAA18;} -.neovgre_large {color: #6E001A; font-size: 3; font-weight: bold; font-style: italic;} -.neovgre {color: #6E001A; font-weight: bold; font-style: italic;} -.neovgre_small {color: #6E001A;} - -.newscaster {color: #800000;} -.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;} - -.alien {color: #543354;} -.noticealien {color: #00c000;} -.alertalien {color: #00c000; font-weight: bold;} -.borer {color: #543354; font-style: italic;} -.changeling {color: #800080; font-style: italic;} - -.interface {color: #330033;} - -.sans {font-family: "Comic Sans MS", cursive, sans-serif;} -.papyrus {font-family: "Papyrus", cursive, sans-serif;} -.robot {font-family: "Courier New", cursive, sans-serif;} - -.command_headset {font-weight: bold; font-size: 3;} -.big {font-size: 3;} -.reallybig {font-size: 4;} -.greentext {color: #00FF00; font-size: 3;} -.redtext {color: #FF0000; font-size: 3;} -.clown {color: #FF69Bf; font-size: 3; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} - -big img.icon {width: 32px; height: 32px;} - -.memo {color: #638500; text-align: center;} -.memoedit {text-align: center; font-size: 2;} -.abductor {color: #800080; font-style: italic;} - -.connectionClosed, .fatalError {background: red; color: white; padding: 5px;} -.connectionClosed.restored {background: green;} -.internal.boldnshit {color: blue; font-weight: bold;} - -/* HELPER CLASSES */ -.text-normal {font-weight: normal; font-style: normal;} -.hidden {display: none; visibility: hidden;} \ No newline at end of file diff --git a/goon/browserassets/css/font-awesome.css b/goon/browserassets/css/font-awesome.css deleted file mode 100644 index cc99d7b337..0000000000 --- a/goon/browserassets/css/font-awesome.css +++ /dev/null @@ -1,788 +0,0 @@ -@font-face{font-family:'FontAwesome';src:url('fontawesome-webfont.eot');src:url('fontawesome-webfont.eot') format('embedded-opentype'),url('fontawesome-webfont.woff') format('woff'),url('fontawesome-webfont.ttf') format('truetype'),url('fontawesome-webfont.svg') format('svg');font-weight:normal;font-style:normal;}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;} -[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none;} -.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em;} -a [class^="icon-"],a [class*=" icon-"]{display:inline;} -[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em;}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em;} -.icons-ul{margin-left:2.142857142857143em;list-style-type:none;}.icons-ul>li{position:relative;} -.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit;} -[class^="icon-"].hide,[class*=" icon-"].hide{display:none;} -.icon-muted{color:#eeeeee;} -.icon-light{color:#ffffff;} -.icon-dark{color:#333333;} -.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.icon-2x{font-size:2em;}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.icon-3x{font-size:3em;}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.icon-4x{font-size:4em;}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} -.icon-5x{font-size:5em;}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;} -.pull-right{float:right;} -.pull-left{float:left;} -[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em;} -[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em;} -[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0;} -.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none;} -.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em;} -.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block;} -.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em;} -.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em;} -.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em;} -.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em;} -.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;} -.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;} -.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;} -.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;} -.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;} -.icon-stack .icon-stack-base{font-size:2em;*line-height:1em;} -.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;} -a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none;} -@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);} 100%{-moz-transform:rotate(359deg);}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);} 100%{-webkit-transform:rotate(359deg);}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);} 100%{-o-transform:rotate(359deg);}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);} 100%{-ms-transform:rotate(359deg);}}@keyframes spin{0%{transform:rotate(0deg);} 100%{transform:rotate(359deg);}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);} -.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);} -.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);} -.icon-flip-horizontal:before{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);} -.icon-flip-vertical:before{-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1);} -a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block;} -.icon-glass:before{content:"\f000";} -.icon-music:before{content:"\f001";} -.icon-search:before{content:"\f002";} -.icon-envelope-alt:before{content:"\f003";} -.icon-heart:before{content:"\f004";} -.icon-star:before{content:"\f005";} -.icon-star-empty:before{content:"\f006";} -.icon-user:before{content:"\f007";} -.icon-film:before{content:"\f008";} -.icon-th-large:before{content:"\f009";} -.icon-th:before{content:"\f00a";} -.icon-th-list:before{content:"\f00b";} -.icon-ok:before{content:"\f00c";} -.icon-remove:before{content:"\f00d";} -.icon-zoom-in:before{content:"\f00e";} -.icon-zoom-out:before{content:"\f010";} -.icon-power-off:before,.icon-off:before{content:"\f011";} -.icon-signal:before{content:"\f012";} -.icon-gear:before,.icon-cog:before{content:"\f013";} -.icon-trash:before{content:"\f014";} -.icon-home:before{content:"\f015";} -.icon-file-alt:before{content:"\f016";} -.icon-time:before{content:"\f017";} -.icon-road:before{content:"\f018";} -.icon-download-alt:before{content:"\f019";} -.icon-download:before{content:"\f01a";} -.icon-upload:before{content:"\f01b";} -.icon-inbox:before{content:"\f01c";} -.icon-play-circle:before{content:"\f01d";} -.icon-rotate-right:before,.icon-repeat:before{content:"\f01e";} -.icon-refresh:before{content:"\f021";} -.icon-list-alt:before{content:"\f022";} -.icon-lock:before{content:"\f023";} -.icon-flag:before{content:"\f024";} -.icon-headphones:before{content:"\f025";} -.icon-volume-off:before{content:"\f026";} -.icon-volume-down:before{content:"\f027";} -.icon-volume-up:before{content:"\f028";} -.icon-qrcode:before{content:"\f029";} -.icon-barcode:before{content:"\f02a";} -.icon-tag:before{content:"\f02b";} -.icon-tags:before{content:"\f02c";} -.icon-book:before{content:"\f02d";} -.icon-bookmark:before{content:"\f02e";} -.icon-print:before{content:"\f02f";} -.icon-camera:before{content:"\f030";} -.icon-font:before{content:"\f031";} -.icon-bold:before{content:"\f032";} -.icon-italic:before{content:"\f033";} -.icon-text-height:before{content:"\f034";} -.icon-text-width:before{content:"\f035";} -.icon-align-left:before{content:"\f036";} -.icon-align-center:before{content:"\f037";} -.icon-align-right:before{content:"\f038";} -.icon-align-justify:before{content:"\f039";} -.icon-list:before{content:"\f03a";} -.icon-indent-left:before{content:"\f03b";} -.icon-indent-right:before{content:"\f03c";} -.icon-facetime-video:before{content:"\f03d";} -.icon-picture:before{content:"\f03e";} -.icon-pencil:before{content:"\f040";} -.icon-map-marker:before{content:"\f041";} -.icon-adjust:before{content:"\f042";} -.icon-tint:before{content:"\f043";} -.icon-edit:before{content:"\f044";} -.icon-share:before{content:"\f045";} -.icon-check:before{content:"\f046";} -.icon-move:before{content:"\f047";} -.icon-step-backward:before{content:"\f048";} -.icon-fast-backward:before{content:"\f049";} -.icon-backward:before{content:"\f04a";} -.icon-play:before{content:"\f04b";} -.icon-pause:before{content:"\f04c";} -.icon-stop:before{content:"\f04d";} -.icon-forward:before{content:"\f04e";} -.icon-fast-forward:before{content:"\f050";} -.icon-step-forward:before{content:"\f051";} -.icon-eject:before{content:"\f052";} -.icon-chevron-left:before{content:"\f053";} -.icon-chevron-right:before{content:"\f054";} -.icon-plus-sign:before{content:"\f055";} -.icon-minus-sign:before{content:"\f056";} -.icon-remove-sign:before{content:"\f057";} -.icon-ok-sign:before{content:"\f058";} -.icon-question-sign:before{content:"\f059";} -.icon-info-sign:before{content:"\f05a";} -.icon-screenshot:before{content:"\f05b";} -.icon-remove-circle:before{content:"\f05c";} -.icon-ok-circle:before{content:"\f05d";} -.icon-ban-circle:before{content:"\f05e";} -.icon-arrow-left:before{content:"\f060";} -.icon-arrow-right:before{content:"\f061";} -.icon-arrow-up:before{content:"\f062";} -.icon-arrow-down:before{content:"\f063";} -.icon-mail-forward:before,.icon-share-alt:before{content:"\f064";} -.icon-resize-full:before{content:"\f065";} -.icon-resize-small:before{content:"\f066";} -.icon-plus:before{content:"\f067";} -.icon-minus:before{content:"\f068";} -.icon-asterisk:before{content:"\f069";} -.icon-exclamation-sign:before{content:"\f06a";} -.icon-gift:before{content:"\f06b";} -.icon-leaf:before{content:"\f06c";} -.icon-fire:before{content:"\f06d";} -.icon-eye-open:before{content:"\f06e";} -.icon-eye-close:before{content:"\f070";} -.icon-warning-sign:before{content:"\f071";} -.icon-plane:before{content:"\f072";} -.icon-calendar:before{content:"\f073";} -.icon-random:before{content:"\f074";} -.icon-comment:before{content:"\f075";} -.icon-magnet:before{content:"\f076";} -.icon-chevron-up:before{content:"\f077";} -.icon-chevron-down:before{content:"\f078";} -.icon-retweet:before{content:"\f079";} -.icon-shopping-cart:before{content:"\f07a";} -.icon-folder-close:before{content:"\f07b";} -.icon-folder-open:before{content:"\f07c";} -.icon-resize-vertical:before{content:"\f07d";} -.icon-resize-horizontal:before{content:"\f07e";} -.icon-bar-chart:before{content:"\f080";} -.icon-twitter-sign:before{content:"\f081";} -.icon-facebook-sign:before{content:"\f082";} -.icon-camera-retro:before{content:"\f083";} -.icon-key:before{content:"\f084";} -.icon-gears:before,.icon-cogs:before{content:"\f085";} -.icon-comments:before{content:"\f086";} -.icon-thumbs-up-alt:before{content:"\f087";} -.icon-thumbs-down-alt:before{content:"\f088";} -.icon-star-half:before{content:"\f089";} -.icon-heart-empty:before{content:"\f08a";} -.icon-signout:before{content:"\f08b";} -.icon-linkedin-sign:before{content:"\f08c";} -.icon-pushpin:before{content:"\f08d";} -.icon-external-link:before{content:"\f08e";} -.icon-signin:before{content:"\f090";} -.icon-trophy:before{content:"\f091";} -.icon-github-sign:before{content:"\f092";} -.icon-upload-alt:before{content:"\f093";} -.icon-lemon:before{content:"\f094";} -.icon-phone:before{content:"\f095";} -.icon-unchecked:before,.icon-check-empty:before{content:"\f096";} -.icon-bookmark-empty:before{content:"\f097";} -.icon-phone-sign:before{content:"\f098";} -.icon-twitter:before{content:"\f099";} -.icon-facebook:before{content:"\f09a";} -.icon-github:before{content:"\f09b";} -.icon-unlock:before{content:"\f09c";} -.icon-credit-card:before{content:"\f09d";} -.icon-rss:before{content:"\f09e";} -.icon-hdd:before{content:"\f0a0";} -.icon-bullhorn:before{content:"\f0a1";} -.icon-bell:before{content:"\f0a2";} -.icon-certificate:before{content:"\f0a3";} -.icon-hand-right:before{content:"\f0a4";} -.icon-hand-left:before{content:"\f0a5";} -.icon-hand-up:before{content:"\f0a6";} -.icon-hand-down:before{content:"\f0a7";} -.icon-circle-arrow-left:before{content:"\f0a8";} -.icon-circle-arrow-right:before{content:"\f0a9";} -.icon-circle-arrow-up:before{content:"\f0aa";} -.icon-circle-arrow-down:before{content:"\f0ab";} -.icon-globe:before{content:"\f0ac";} -.icon-wrench:before{content:"\f0ad";} -.icon-tasks:before{content:"\f0ae";} -.icon-filter:before{content:"\f0b0";} -.icon-briefcase:before{content:"\f0b1";} -.icon-fullscreen:before{content:"\f0b2";} -.icon-group:before{content:"\f0c0";} -.icon-link:before{content:"\f0c1";} -.icon-cloud:before{content:"\f0c2";} -.icon-beaker:before{content:"\f0c3";} -.icon-cut:before{content:"\f0c4";} -.icon-copy:before{content:"\f0c5";} -.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6";} -.icon-save:before{content:"\f0c7";} -.icon-sign-blank:before{content:"\f0c8";} -.icon-reorder:before{content:"\f0c9";} -.icon-list-ul:before{content:"\f0ca";} -.icon-list-ol:before{content:"\f0cb";} -.icon-strikethrough:before{content:"\f0cc";} -.icon-underline:before{content:"\f0cd";} -.icon-table:before{content:"\f0ce";} -.icon-magic:before{content:"\f0d0";} -.icon-truck:before{content:"\f0d1";} -.icon-pinterest:before{content:"\f0d2";} -.icon-pinterest-sign:before{content:"\f0d3";} -.icon-google-plus-sign:before{content:"\f0d4";} -.icon-google-plus:before{content:"\f0d5";} -.icon-money:before{content:"\f0d6";} -.icon-caret-down:before{content:"\f0d7";} -.icon-caret-up:before{content:"\f0d8";} -.icon-caret-left:before{content:"\f0d9";} -.icon-caret-right:before{content:"\f0da";} -.icon-columns:before{content:"\f0db";} -.icon-sort:before{content:"\f0dc";} -.icon-sort-down:before{content:"\f0dd";} -.icon-sort-up:before{content:"\f0de";} -.icon-envelope:before{content:"\f0e0";} -.icon-linkedin:before{content:"\f0e1";} -.icon-rotate-left:before,.icon-undo:before{content:"\f0e2";} -.icon-legal:before{content:"\f0e3";} -.icon-dashboard:before{content:"\f0e4";} -.icon-comment-alt:before{content:"\f0e5";} -.icon-comments-alt:before{content:"\f0e6";} -.icon-bolt:before{content:"\f0e7";} -.icon-sitemap:before{content:"\f0e8";} -.icon-umbrella:before{content:"\f0e9";} -.icon-paste:before{content:"\f0ea";} -.icon-lightbulb:before{content:"\f0eb";} -.icon-exchange:before{content:"\f0ec";} -.icon-cloud-download:before{content:"\f0ed";} -.icon-cloud-upload:before{content:"\f0ee";} -.icon-user-md:before{content:"\f0f0";} -.icon-stethoscope:before{content:"\f0f1";} -.icon-suitcase:before{content:"\f0f2";} -.icon-bell-alt:before{content:"\f0f3";} -.icon-coffee:before{content:"\f0f4";} -.icon-food:before{content:"\f0f5";} -.icon-file-text-alt:before{content:"\f0f6";} -.icon-building:before{content:"\f0f7";} -.icon-hospital:before{content:"\f0f8";} -.icon-ambulance:before{content:"\f0f9";} -.icon-medkit:before{content:"\f0fa";} -.icon-fighter-jet:before{content:"\f0fb";} -.icon-beer:before{content:"\f0fc";} -.icon-h-sign:before{content:"\f0fd";} -.icon-plus-sign-alt:before{content:"\f0fe";} -.icon-double-angle-left:before{content:"\f100";} -.icon-double-angle-right:before{content:"\f101";} -.icon-double-angle-up:before{content:"\f102";} -.icon-double-angle-down:before{content:"\f103";} -.icon-angle-left:before{content:"\f104";} -.icon-angle-right:before{content:"\f105";} -.icon-angle-up:before{content:"\f106";} -.icon-angle-down:before{content:"\f107";} -.icon-desktop:before{content:"\f108";} -.icon-laptop:before{content:"\f109";} -.icon-tablet:before{content:"\f10a";} -.icon-mobile-phone:before{content:"\f10b";} -.icon-circle-blank:before{content:"\f10c";} -.icon-quote-left:before{content:"\f10d";} -.icon-quote-right:before{content:"\f10e";} -.icon-spinner:before{content:"\f110";} -.icon-circle:before{content:"\f111";} -.icon-mail-reply:before,.icon-reply:before{content:"\f112";} -.icon-github-alt:before{content:"\f113";} -.icon-folder-close-alt:before{content:"\f114";} -.icon-folder-open-alt:before{content:"\f115";} -.icon-expand-alt:before{content:"\f116";} -.icon-collapse-alt:before{content:"\f117";} -.icon-smile:before{content:"\f118";} -.icon-frown:before{content:"\f119";} -.icon-meh:before{content:"\f11a";} -.icon-gamepad:before{content:"\f11b";} -.icon-keyboard:before{content:"\f11c";} -.icon-flag-alt:before{content:"\f11d";} -.icon-flag-checkered:before{content:"\f11e";} -.icon-terminal:before{content:"\f120";} -.icon-code:before{content:"\f121";} -.icon-reply-all:before{content:"\f122";} -.icon-mail-reply-all:before{content:"\f122";} -.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123";} -.icon-location-arrow:before{content:"\f124";} -.icon-crop:before{content:"\f125";} -.icon-code-fork:before{content:"\f126";} -.icon-unlink:before{content:"\f127";} -.icon-question:before{content:"\f128";} -.icon-info:before{content:"\f129";} -.icon-exclamation:before{content:"\f12a";} -.icon-superscript:before{content:"\f12b";} -.icon-subscript:before{content:"\f12c";} -.icon-eraser:before{content:"\f12d";} -.icon-puzzle-piece:before{content:"\f12e";} -.icon-microphone:before{content:"\f130";} -.icon-microphone-off:before{content:"\f131";} -.icon-shield:before{content:"\f132";} -.icon-calendar-empty:before{content:"\f133";} -.icon-fire-extinguisher:before{content:"\f134";} -.icon-rocket:before{content:"\f135";} -.icon-maxcdn:before{content:"\f136";} -.icon-chevron-sign-left:before{content:"\f137";} -.icon-chevron-sign-right:before{content:"\f138";} -.icon-chevron-sign-up:before{content:"\f139";} -.icon-chevron-sign-down:before{content:"\f13a";} -.icon-html5:before{content:"\f13b";} -.icon-css3:before{content:"\f13c";} -.icon-anchor:before{content:"\f13d";} -.icon-unlock-alt:before{content:"\f13e";} -.icon-bullseye:before{content:"\f140";} -.icon-ellipsis-horizontal:before{content:"\f141";} -.icon-ellipsis-vertical:before{content:"\f142";} -.icon-rss-sign:before{content:"\f143";} -.icon-play-sign:before{content:"\f144";} -.icon-ticket:before{content:"\f145";} -.icon-minus-sign-alt:before{content:"\f146";} -.icon-check-minus:before{content:"\f147";} -.icon-level-up:before{content:"\f148";} -.icon-level-down:before{content:"\f149";} -.icon-check-sign:before{content:"\f14a";} -.icon-edit-sign:before{content:"\f14b";} -.icon-external-link-sign:before{content:"\f14c";} -.icon-share-sign:before{content:"\f14d";} -.icon-compass:before{content:"\f14e";} -.icon-collapse:before{content:"\f150";} -.icon-collapse-top:before{content:"\f151";} -.icon-expand:before{content:"\f152";} -.icon-euro:before,.icon-eur:before{content:"\f153";} -.icon-gbp:before{content:"\f154";} -.icon-dollar:before,.icon-usd:before{content:"\f155";} -.icon-rupee:before,.icon-inr:before{content:"\f156";} -.icon-yen:before,.icon-jpy:before{content:"\f157";} -.icon-renminbi:before,.icon-cny:before{content:"\f158";} -.icon-won:before,.icon-krw:before{content:"\f159";} -.icon-bitcoin:before,.icon-btc:before{content:"\f15a";} -.icon-file:before{content:"\f15b";} -.icon-file-text:before{content:"\f15c";} -.icon-sort-by-alphabet:before{content:"\f15d";} -.icon-sort-by-alphabet-alt:before{content:"\f15e";} -.icon-sort-by-attributes:before{content:"\f160";} -.icon-sort-by-attributes-alt:before{content:"\f161";} -.icon-sort-by-order:before{content:"\f162";} -.icon-sort-by-order-alt:before{content:"\f163";} -.icon-thumbs-up:before{content:"\f164";} -.icon-thumbs-down:before{content:"\f165";} -.icon-youtube-sign:before{content:"\f166";} -.icon-youtube:before{content:"\f167";} -.icon-xing:before{content:"\f168";} -.icon-xing-sign:before{content:"\f169";} -.icon-youtube-play:before{content:"\f16a";} -.icon-dropbox:before{content:"\f16b";} -.icon-stackexchange:before{content:"\f16c";} -.icon-instagram:before{content:"\f16d";} -.icon-flickr:before{content:"\f16e";} -.icon-adn:before{content:"\f170";} -.icon-bitbucket:before{content:"\f171";} -.icon-bitbucket-sign:before{content:"\f172";} -.icon-tumblr:before{content:"\f173";} -.icon-tumblr-sign:before{content:"\f174";} -.icon-long-arrow-down:before{content:"\f175";} -.icon-long-arrow-up:before{content:"\f176";} -.icon-long-arrow-left:before{content:"\f177";} -.icon-long-arrow-right:before{content:"\f178";} -.icon-apple:before{content:"\f179";} -.icon-windows:before{content:"\f17a";} -.icon-android:before{content:"\f17b";} -.icon-linux:before{content:"\f17c";} -.icon-dribbble:before{content:"\f17d";} -.icon-skype:before{content:"\f17e";} -.icon-foursquare:before{content:"\f180";} -.icon-trello:before{content:"\f181";} -.icon-female:before{content:"\f182";} -.icon-male:before{content:"\f183";} -.icon-gittip:before{content:"\f184";} -.icon-sun:before{content:"\f185";} -.icon-moon:before{content:"\f186";} -.icon-archive:before{content:"\f187";} -.icon-bug:before{content:"\f188";} -.icon-vk:before{content:"\f189";} -.icon-weibo:before{content:"\f18a";} -.icon-renren:before{content:"\f18b";} - -.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle;} -.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%;} -.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px;} -.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit;} -.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em;} -a [class^="icon-"],a [class*=" icon-"]{cursor:pointer;} -.icon-glass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-music{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-search{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-envelope-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-heart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-user{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-film{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th-large{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-zoom-in{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-zoom-out{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-power-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cog{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gear{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trash{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-home{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-time{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-road{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-download-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-inbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-repeat{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rotate-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-refresh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-headphones{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-qrcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-barcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tags{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-book{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bookmark{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-print{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-camera{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-font{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bold{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-italic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-text-height{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-text-width{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-center{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-justify{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-indent-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-indent-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facetime-video{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-picture{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pencil{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-map-marker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-adjust{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tint{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-edit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-move{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-step-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fast-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pause{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fast-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-step-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eject{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-question-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-info-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-screenshot{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ban-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-small{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-asterisk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exclamation-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gift{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-leaf{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fire{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eye-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eye-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-warning-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plane{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-calendar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-random{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comment{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-magnet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-retweet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-shopping-cart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bar-chart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-twitter-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facebook-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-camera-retro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-key{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cogs{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gears{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comments{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-up-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-down-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-heart-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signout{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linkedin-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pushpin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-external-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trophy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-upload-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lemon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unchecked{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bookmark-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-phone-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-twitter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facebook{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-credit-card{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rss{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hdd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bullhorn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bell{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-certificate{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-globe{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-wrench{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tasks{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-filter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-briefcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fullscreen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-group{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-beaker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cut{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-copy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paper-clip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paperclip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-save{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sign-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reorder{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-ul{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-ol{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-strikethrough{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-underline{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-table{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-magic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-truck{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pinterest{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pinterest-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-google-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-google-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-money{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-columns{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-envelope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linkedin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-undo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rotate-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-legal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dashboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comment-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comments-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bolt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sitemap{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-umbrella{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paste{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lightbulb{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-user-md{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stethoscope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-suitcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bell-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-coffee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-food{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-text-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-building{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hospital{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ambulance{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-medkit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fighter-jet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-beer{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-h-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-desktop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-laptop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tablet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mobile-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-quote-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-quote-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-spinner{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-close-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-open-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-expand-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-smile{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-frown{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-meh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gamepad{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-keyboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag-checkered{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-terminal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-code{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-location-arrow{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-crop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-code-fork{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlink{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-question{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-info{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exclamation{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-superscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-subscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eraser{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-puzzle-piece{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-microphone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-microphone-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-shield{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-calendar-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fire-extinguisher{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rocket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-maxcdn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-html5{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-css3{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-anchor{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlock-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bullseye{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ellipsis-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ellipsis-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rss-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ticket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-level-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-level-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-edit-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-external-link-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-compass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse-top{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-expand{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eur{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-euro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gbp{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-usd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dollar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-inr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rupee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-jpy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-yen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cny{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-renminbi{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-krw{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-won{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-btc{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitcoin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-text{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-alphabet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-alphabet-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-attributes{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-attributes-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-order{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-order-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-xing{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-xing-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dropbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stackexchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-instagram{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flickr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-adn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitbucket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitbucket-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tumblr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tumblr-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-apple{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-windows{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-android{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linux{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dribbble{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-skype{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-foursquare{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trello{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-female{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-male{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gittip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sun{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-moon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-archive{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bug{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-vk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-weibo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-renren{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} \ No newline at end of file diff --git a/goon/browserassets/html/browserOutput.html b/goon/browserassets/html/browserOutput.html deleted file mode 100644 index 74212fd815..0000000000 --- a/goon/browserassets/html/browserOutput.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - Chat - - - - - - - - -
- -
- Loading...

- If this takes longer than 30 seconds, it will automatically reload a maximum of 5 times.
- If it still doesn't work, use the bug report button at the top right of the window. -
-
-
- -
- - - - \ No newline at end of file diff --git a/goon/browserassets/js/browserOutput.js b/goon/browserassets/js/browserOutput.js deleted file mode 100644 index 0fb7386dd8..0000000000 --- a/goon/browserassets/js/browserOutput.js +++ /dev/null @@ -1,908 +0,0 @@ -/***************************************** -* -* FUNCTION AND VAR DECLARATIONS -* -******************************************/ - -//DEBUG STUFF -var escaper = encodeURIComponent || escape; -var decoder = decodeURIComponent || unescape; -window.onerror = function(msg, url, line, col, error) { - if (document.location.href.indexOf("proc=debug") <= 0) { - var extra = !col ? '' : ' | column: ' + col; - extra += !error ? '' : ' | error: ' + error; - extra += !navigator.userAgent ? '' : ' | user agent: ' + navigator.userAgent; - var debugLine = 'Error: ' + msg + ' | url: ' + url + ' | line: ' + line + extra; - window.location = '?_src_=chat&proc=debug¶m[error]='+escaper(debugLine); - } - return true; -}; - -//Globals -window.status = 'Output'; -var $messages, $subOptions, $contextMenu, $filterMessages; -var opts = { - //General - 'messageCount': 0, //A count...of messages... - 'messageLimit': 2053, //A limit...for the messages... - 'scrollSnapTolerance': 5, //If within x pixels of bottom - 'clickTolerance': 10, //Keep focus if outside x pixels of mousedown position on mouseup - 'popups': 0, //Amount of popups opened ever - 'wasd': false, //Is the user in wasd mode? - 'chatMode': 'default', //The mode the chat is in - 'priorChatHeight': 0, //Thing for height-resizing detection - 'restarting': false, //Is the round restarting? - - //Options menu - 'subOptionsLoop': null, //Contains the interval loop for closing the options menu - 'suppressOptionsClose': false, //Whether or not we should be hiding the suboptions menu - 'highlightTerms': [], - 'highlightLimit': 5, - 'highlightColor': '#FFFF00', //The color of the highlighted message - 'pingDisabled': false, //Has the user disabled the ping counter - - //Ping display - 'lastPang': 0, //Timestamp of the last response from the server. - 'pangLimit': 35000, - 'pingTime': 0, //Timestamp of when ping sent - 'pongTime': 0, //Timestamp of when ping received - 'noResponse': false, //Tracks the state of the previous ping request - 'noResponseCount': 0, //How many failed pings? - - //Clicks - 'mouseDownX': null, - 'mouseDownY': null, - 'preventFocus': false, //Prevents switching focus to the game window - - //Client Connection Data - 'clientDataLimit': 5, - 'clientData': [], - -}; - -function outerHTML(el) { - var wrap = document.createElement('div'); - wrap.appendChild(el.cloneNode(true)); - return wrap.innerHTML; -} - -//Polyfill for fucking date now because of course IE8 and below don't support it -if (!Date.now) { - Date.now = function now() { - return new Date().getTime(); - }; -} -//Polyfill for trim() (IE8 and below) -if (typeof String.prototype.trim !== 'function') { - String.prototype.trim = function () { - return this.replace(/^\s+|\s+$/g, ''); - }; -} - -//Shit fucking piece of crap that doesn't work god fuckin damn it -function linkify(text) { - var rex = /((?:'+$0+''; - } - else { - return $1 ? $0: ''+$0+''; - } - }); -} - -//Actually turns the highlight term match into appropriate html -function addHighlightMarkup(match) { - var extra = ''; - if (opts.highlightColor) { - extra += ' style="background-color: '+opts.highlightColor+'"'; - } - return ''+match+''; -} - -//Highlights words based on user settings -function highlightTerms(el) { - if (el.children.length > 0) { - for(var h = 0; h < el.children.length; h++){ - highlightTerms(el.children[h]); - } - } - - var hasTextNode = false; - for (var node = 0; node < el.childNodes.length; node++) - { - if (el.childNodes[node].nodeType === 3) - { - hasTextNode = true; - break; - } - } - - if (hasTextNode) { //If element actually has text - var newText = ''; - for (var c = 0; c < el.childNodes.length; c++) { //Each child element - if (el.childNodes[c].nodeType === 3) { //Is it text only? - var words = el.childNodes[c].data.split(' '); - for (var w = 0; w < words.length; w++) { //Each word in the text - var newWord = null; - for (var i = 0; i < opts.highlightTerms.length; i++) { //Each highlight term - if (opts.highlightTerms[i] && words[w].toLowerCase().indexOf(opts.highlightTerms[i].toLowerCase()) > -1) { //If a match is found - newWord = words[w].replace("<", "<").replace(new RegExp(opts.highlightTerms[i], 'gi'), addHighlightMarkup); - break; - } - console.log(newWord) - } - newText += newWord || words[w].replace("<", "<"); - newText += w >= words.length ? '' : ' '; - } - } else { //Every other type of element - newText += outerHTML(el.childNodes[c]); - } - } - el.innerHTML = newText; - } -} -//Send a message to the client -function output(message, flag) { - if (typeof message === 'undefined') { - return; - } - if (typeof flag === 'undefined') { - flag = ''; - } - - if (flag !== 'internal') - opts.lastPang = Date.now(); - - // Basically we url_encode twice server side so we can manually read the encoded version and actually do UTF-8. - // The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b. - // Marvelous. - message = message.replace(/\+/g, "%20") - message = decoder(message) - - //The behemoth of filter-code (for Admin message filters) - //Note: This is proooobably hella inefficient - var filteredOut = false; - if (opts.hasOwnProperty('showMessagesFilters') && !opts.showMessagesFilters['All'].show) { - //Get this filter type (defined by class on message) - var messageHtml = $.parseHTML(message), - messageClasses; - if (opts.hasOwnProperty('filterHideAll') && opts.filterHideAll) { - var internal = false; - messageClasses = (!!$(messageHtml).attr('class') ? $(messageHtml).attr('class').split(/\s+/) : false); - if (messageClasses) { - for (var i = 0; i < messageClasses.length; i++) { //Every class - if (messageClasses[i] == 'internal') { - internal = true; - break; - } - } - } - if (!internal) { - filteredOut = 'All'; - } - } else { - //If the element or it's child have any classes - if (!!$(messageHtml).attr('class') || !!$(messageHtml).children().attr('class')) { - messageClasses = $(messageHtml).attr('class').split(/\s+/); - if (!!$(messageHtml).children().attr('class')) { - messageClasses = messageClasses.concat($(messageHtml).children().attr('class').split(/\s+/)); - } - var tempCount = 0; - for (var i = 0; i < messageClasses.length; i++) { //Every class - var thisClass = messageClasses[i]; - $.each(opts.showMessagesFilters, function(key, val) { //Every filter - if (key !== 'All' && val.show === false && typeof val.match != 'undefined') { - for (var i = 0; i < val.match.length; i++) { - var matchClass = val.match[i]; - if (matchClass == thisClass) { - filteredOut = key; - break; - } - } - } - if (filteredOut) return false; - }); - if (filteredOut) break; - tempCount++; - } - } else { - if (!opts.showMessagesFilters['Misc'].show) { - filteredOut = 'Misc'; - } - } - } - } - - //Stuff we do along with appending a message - var atBottom = false; - if (!filteredOut) { - var bodyHeight = $('body').height(); - var messagesHeight = $messages.outerHeight(); - var scrollPos = $('body,html').scrollTop(); - - //Should we snap the output to the bottom? - if (bodyHeight + scrollPos >= messagesHeight - opts.scrollSnapTolerance) { - atBottom = true; - if ($('#newMessages').length) { - $('#newMessages').remove(); - } - //If not, put the new messages box in - } else { - if ($('#newMessages').length) { - var messages = $('#newMessages .number').text(); - messages = parseInt(messages); - messages++; - $('#newMessages .number').text(messages); - if (messages == 2) { - $('#newMessages .messageWord').append('s'); - } - } else { - $messages.after('1 new message '); - } - } - } - - //Url stuff - if (message.length && flag != 'preventLink') { - message = linkify(message); - } - - opts.messageCount++; - - //Pop the top message off if history limit reached - if (opts.messageCount >= opts.messageLimit) { - $messages.children('div.entry:first-child').remove(); - opts.messageCount--; //I guess the count should only ever equal the limit - } - - //Actually append the message - var entry = document.createElement('div'); - entry.className = 'entry'; - - if (filteredOut) { - entry.className += ' hidden'; - entry.setAttribute('data-filter', filteredOut); - } - - entry.innerHTML = message.trim(); - $messages[0].appendChild(entry); - - //Actually do the snap - if (!filteredOut && atBottom) { - $('body,html').scrollTop($messages.outerHeight()); - } - - //Stuff we can do after the message shows can go here, in the interests of responsiveness - if (opts.highlightTerms && opts.highlightTerms.length > 0) { - highlightTerms(entry); - } -} - -function internalOutput(message, flag) -{ - output(escaper(message), flag) -} - -//Runs a route within byond, client or server side. Consider this "ehjax" for byond. -function runByond(uri) { - window.location = uri; -} - -function setCookie(cname, cvalue, exdays) { - cvalue = escaper(cvalue); - var d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); - var expires = 'expires='+d.toUTCString(); - document.cookie = cname + '=' + cvalue + '; ' + expires; -} - -function getCookie(cname) { - var name = cname + '='; - var ca = document.cookie.split(';'); - for(var i=0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0)==' ') c = c.substring(1); - if (c.indexOf(name) === 0) { - return decoder(c.substring(name.length,c.length)); - } - } - return ''; -} - -function rgbToHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B);} -function toHex(n) { - n = parseInt(n,10); - if (isNaN(n)) return "00"; - n = Math.max(0,Math.min(n,255)); - return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16); -} - -function changeMode(mode) { - switch (mode) { - case 'geocities': - //switch in stylesheet - opts.chatMode = mode; - break; - case 'console': - - opts.chatMode = mode; - break; - case 'default': - default: - //remove loaded stylesheet/s - opts.chatMode = 'default'; - } -} - -function handleClientData(ckey, ip, compid) { - //byond sends player info to here - var currentData = {'ckey': ckey, 'ip': ip, 'compid': compid}; - if (opts.clientData && !$.isEmptyObject(opts.clientData)) { - runByond('?_src_=chat&proc=analyzeClientData¶m[cookie]='+JSON.stringify({'connData': opts.clientData})); - - for (var i = 0; i < opts.clientData.length; i++) { - var saved = opts.clientData[i]; - if (currentData.ckey == saved.ckey && currentData.ip == saved.ip && currentData.compid == saved.compid) { - return; //Record already exists - } - } - - if (opts.clientData.length >= opts.clientDataLimit) { - opts.clientData.shift(); - } - } else { - runByond('?_src_=chat&proc=analyzeClientData¶m[cookie]=none'); - } - - //Update the cookie with current details - opts.clientData.push(currentData); - setCookie('connData', JSON.stringify(opts.clientData), 365); -} - -//Server calls this on ehjax response -//Or, y'know, whenever really -function ehjaxCallback(data) { - opts.lastPang = Date.now(); - if (data == 'softPang') { - return; - } else if (data == 'pang') { - opts.pingCounter = 0; //reset - opts.pingTime = Date.now(); - runByond('?_src_=chat&proc=ping'); - - } else if (data == 'pong') { - if (opts.pingDisabled) {return;} - opts.pongTime = Date.now(); - var pingDuration = Math.ceil((opts.pongTime - opts.pingTime) / 2); - $('#pingMs').text(pingDuration+'ms'); - pingDuration = Math.min(pingDuration, 255); - var red = pingDuration; - var green = 255 - pingDuration; - var blue = 0; - var hex = rgbToHex(red, green, blue); - $('#pingDot').css('color', '#'+hex); - - } else if (data == 'roundrestart') { - opts.restarting = true; - internalOutput('
The connection has been closed because the server is restarting. Please wait while you automatically reconnect.
', 'internal'); - } else if (data == 'stopaudio') { - $('.dectalk').remove(); - } else { - //Oh we're actually being sent data instead of an instruction - var dataJ; - try { - dataJ = $.parseJSON(data); - } catch (e) { - //But...incorrect :sadtrombone: - window.onerror('JSON: '+e+'. '+data, 'browserOutput.html', 327); - return; - } - data = dataJ; - - if (data.clientData) { - if (opts.restarting) { - opts.restarting = false; - $('.connectionClosed.restarting:not(.restored)').addClass('restored').text('The round restarted and you successfully reconnected!'); - } - if (!data.clientData.ckey && !data.clientData.ip && !data.clientData.compid) { - //TODO: Call shutdown perhaps - return; - } else { - handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid); - } - } else if (data.modeChange) { - changeMode(data.modeChange); - } else if (data.firebug) { - if (data.trigger) { - internalOutput('Loading firebug console, triggered by '+data.trigger+'...', 'internal'); - } else { - internalOutput('Loading firebug console...', 'internal'); - } - var firebugEl = document.createElement('script'); - firebugEl.src = 'https://getfirebug.com/firebug-lite-debug.js'; - document.body.appendChild(firebugEl); - } else if (data.dectalk) { - var message = ''; - if (data.decTalkTrigger) { - message = ' '+ - 'You hear a strange robotic voice...' + message; - } - internalOutput(message, 'preventLink'); - } - } -} - -function createPopup(contents, width) { - opts.popups++; - $('body').append(''); - - //Attach close popup event - var $popup = $('#popup'+opts.popups); - var height = $popup.outerHeight(); - $popup.css({'height': height+'px', 'margin': '-'+(height/2)+'px 0 0 -'+(width/2)+'px'}); - - $popup.on('click', '.close', function(e) { - e.preventDefault(); - $popup.remove(); - }); -} - -function toggleWasd(state) { - opts.wasd = (state == 'on' ? true : false); -} - -/***************************************** -* -* DOM READY -* -******************************************/ - -if (typeof $ === 'undefined') { - var div = document.getElementById('loading').childNodes[1]; - div += '

ERROR: Jquery did not load.'; -} - -$(function() { - $messages = $('#messages'); - $subOptions = $('#subOptions'); - - //Hey look it's a controller loop! - setInterval(function() { - if (opts.lastPang + opts.pangLimit < Date.now() && !opts.restarting) { //Every pingLimit - if (!opts.noResponse) { //Only actually append a message if the previous ping didn't also fail (to prevent spam) - opts.noResponse = true; - opts.noResponseCount++; - internalOutput('
You are either AFK, experiencing lag or the connection has closed.
', 'internal'); - } - } else if (opts.noResponse) { //Previous ping attempt failed ohno - $('.connectionClosed[data-count="'+opts.noResponseCount+'"]:not(.restored)').addClass('restored').text('Your connection has been restored (probably)!'); - opts.noResponse = false; - } - }, 2000); //2 seconds - - - /***************************************** - * - * LOAD SAVED CONFIG - * - ******************************************/ - var savedConfig = { - 'sfontSize': getCookie('fontsize'), - 'sfontType': getCookie('fonttype'), - 'spingDisabled': getCookie('pingdisabled'), - 'shighlightTerms': getCookie('highlightterms'), - 'shighlightColor': getCookie('highlightcolor'), - }; - - if (savedConfig.sfontSize) { - $messages.css('font-size', savedConfig.sfontSize); - internalOutput('Loaded font size setting of: '+savedConfig.sfontSize+'', 'internal'); - } - if (savedConfig.sfontType) { - $messages.css('font-family', savedConfig.sfontType); - internalOutput('Loaded font type setting of: '+savedConfig.sfontType+'', 'internal'); - } - if (savedConfig.spingDisabled) { - if (savedConfig.spingDisabled == 'true') { - opts.pingDisabled = true; - $('#ping').hide(); - } - internalOutput('Loaded ping display of: '+(opts.pingDisabled ? 'hidden' : 'visible')+'', 'internal'); - } - if (savedConfig.shighlightTerms) { - var savedTerms = $.parseJSON(savedConfig.shighlightTerms); - var actualTerms = ''; - for (var i = 0; i < savedTerms.length; i++) { - if (savedTerms[i]) { - actualTerms += savedTerms[i] + ', '; - } - } - if (actualTerms) { - actualTerms = actualTerms.substring(0, actualTerms.length - 2); - internalOutput('Loaded highlight strings of: ' + actualTerms+'', 'internal'); - opts.highlightTerms = savedTerms; - } - } - if (savedConfig.shighlightColor) { - opts.highlightColor = savedConfig.shighlightColor; - internalOutput('Loaded highlight color of: '+savedConfig.shighlightColor+'', 'internal'); - } - - (function() { - var dataCookie = getCookie('connData'); - if (dataCookie) { - var dataJ; - try { - dataJ = $.parseJSON(dataCookie); - } catch (e) { - window.onerror('JSON '+e+'. '+dataCookie, 'browserOutput.html', 434); - return; - } - opts.clientData = dataJ; - } - })(); - - - /***************************************** - * - * BASE CHAT OUTPUT EVENTS - * - ******************************************/ - - $('body').on('click', 'a', function(e) { - e.preventDefault(); - }); - - $('body').on('mousedown', function(e) { - var $target = $(e.target); - - if ($contextMenu && opts.hasOwnProperty('contextMenuTarget') && opts.contextMenuTarget) { - hideContextMenu(); - return false; - } - - if ($target.is('a') || $target.parent('a').length || $target.is('input') || $target.is('textarea')) { - opts.preventFocus = true; - } else { - opts.preventFocus = false; - opts.mouseDownX = e.pageX; - opts.mouseDownY = e.pageY; - } - }); - - $messages.on('mousedown', function(e) { - if ($subOptions && $subOptions.is(':visible')) { - $subOptions.slideUp('fast', function() { - $(this).removeClass('scroll'); - $(this).css('height', ''); - }); - clearInterval(opts.subOptionsLoop); - } - }); - - $('body').on('mouseup', function(e) { - if (!opts.preventFocus && - (e.pageX >= opts.mouseDownX - opts.clickTolerance && e.pageX <= opts.mouseDownX + opts.clickTolerance) && - (e.pageY >= opts.mouseDownY - opts.clickTolerance && e.pageY <= opts.mouseDownY + opts.clickTolerance) - ) { - opts.mouseDownX = null; - opts.mouseDownY = null; - runByond('byond://winset?mapwindow.map.focus=true'); - } - }); - - $messages.on('click', 'a', function(e) { - var href = $(this).attr('href'); - $(this).addClass('visited'); - if (href[0] == '?' || (href.length >= 8 && href.substring(0,8) == 'byond://')) { - runByond(href); - } else { - href = escaper(href); - runByond('?action=openLink&link='+href); - } - }); - - //Fuck everything about this event. Will look into alternatives. - $('body').on('keydown', function(e) { - if (e.target.nodeName == 'INPUT' || e.target.nodeName == 'TEXTAREA') { - return; - } - - if (e.ctrlKey || e.altKey || e.shiftKey) { //Band-aid "fix" for allowing ctrl+c copy paste etc. Needs a proper fix. - return; - } - - e.preventDefault() - - var k = e.which; - var command; // Command to execute through winset. - - // Hardcoded because else there would be no feedback message. - if (k == 113) { // F2 - runByond('byond://winset?screenshot=auto'); - internalOutput('Screenshot taken', 'internal'); - } - - var c = ""; - switch (k) { - case 8: - c = 'BACK'; - case 9: - c = 'TAB'; - case 13: - c = 'ENTER'; - case 19: - c = 'PAUSE'; - case 27: - c = 'ESCAPE'; - case 33: // Page up - c = 'NORTHEAST'; - case 34: // Page down - c = 'SOUTHEAST'; - case 35: // End - c = 'SOUTHWEST'; - case 36: // Home - c = 'NORTHWEST'; - case 37: - c = 'WEST'; - case 38: - c = 'NORTH'; - case 39: - c = 'EAST'; - case 40: - c = 'SOUTH'; - case 45: - c = 'INSERT'; - case 46: - c = 'DELETE'; - case 93: // That weird thing to the right of alt gr. - c = 'APPS'; - - default: - c = String.fromCharCode(k); - } - -// if(opts.macros.hasOwnProperty(c.toUpperCase())) - // command = opts.macros[c]; - - if (command) { - runByond('byond://winset?mapwindow.map.focus=true;command='+command); - return false; - } - else if (c.length == 0) { - if (!e.shiftKey) { - c = c.toLowerCase(); - } - runByond('byond://winset?mapwindow.map.focus=true;mainwindow.input.text='+c); - return false; - } else { - runByond('byond://winset?mapwindow.map.focus=true'); - return false; - } - }); - - //Mildly hacky fix for scroll issues on mob change (interface gets resized sometimes, messing up snap-scroll) - $(window).on('resize', function(e) { - if ($(this).height() !== opts.priorChatHeight) { - $('body,html').scrollTop($messages.outerHeight()); - opts.priorChatHeight = $(this).height(); - } - }); - - //Audio sound prevention - $messages.on('click', '.stopAudio', function() { - var $audio = $(this).parent().children('audio'); - if ($audio) { - $audio.remove(); - } - }); - - - /***************************************** - * - * OPTIONS INTERFACE EVENTS - * - ******************************************/ - - $('body').on('click', '#newMessages', function(e) { - var messagesHeight = $messages.outerHeight(); - $('body,html').scrollTop(messagesHeight); - $('#newMessages').remove(); - runByond('byond://winset?mapwindow.map.focus=true'); - }); - - $('#toggleOptions').click(function(e) { - if ($subOptions.is(':visible')) { - $subOptions.slideUp('fast', function() { - $(this).removeClass('scroll'); - $(this).css('height', ''); - }); - clearInterval(opts.subOptionsLoop); - } else { - $subOptions.slideDown('fast', function() { - var windowHeight = $(window).height(); - var toggleHeight = $('#toggleOptions').outerHeight(); - var priorSubHeight = $subOptions.outerHeight(); - var newSubHeight = windowHeight - toggleHeight; - $(this).height(newSubHeight); - if (priorSubHeight > (windowHeight - toggleHeight)) { - $(this).addClass('scroll'); - } - }); - opts.subOptionsLoop = setInterval(function() { - if (!opts.suppressOptionsClose && $('#subOptions').is(':visible')) { - $subOptions.slideUp('fast', function() { - $(this).removeClass('scroll'); - $(this).css('height', ''); - }); - clearInterval(opts.subOptionsLoop); - } - }, 5000); //Every 5 seconds - } - }); - - $('#subOptions, #toggleOptions').mouseenter(function() { - opts.suppressOptionsClose = true; - }); - - $('#subOptions, #toggleOptions').mouseleave(function() { - opts.suppressOptionsClose = false; - }); - - $('#decreaseFont').click(function(e) { - var fontSize = parseInt($messages.css('font-size')); - fontSize = fontSize - 1 + 'px'; - $messages.css({'font-size': fontSize}); - setCookie('fontsize', fontSize, 365); - internalOutput('Font size set to '+fontSize+'', 'internal'); - }); - - $('#increaseFont').click(function(e) { - var fontSize = parseInt($messages.css('font-size')); - fontSize = fontSize + 1 + 'px'; - $messages.css({'font-size': fontSize}); - setCookie('fontsize', fontSize, 365); - internalOutput('Font size set to '+fontSize+'', 'internal'); - }); - - $('#chooseFont').click(function(e) { - if ($('.popup .changeFont').is(':visible')) {return;} - var popupContent = '
Change Font
' + - ''; - createPopup(popupContent, 200); - }); - - $('body').on('click', '#changeFont a', function(e) { - var font = $(this).attr('data-font'); - $messages.css('font-family', font); - setCookie('fonttype', font, 365); - }); - - $('#togglePing').click(function(e) { - if (opts.pingDisabled) { - $('#ping').slideDown('fast'); - opts.pingDisabled = false; - } else { - $('#ping').slideUp('fast'); - opts.pingDisabled = true; - } - setCookie('pingdisabled', (opts.pingDisabled ? 'true' : 'false'), 365); - }); - - $('#saveLog').click(function(e) { - var saved = ''; - - if (window.XMLHtpRequest) { - xmlHttp = new XMLHttpRequest(); - } else { - xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - xmlHttp.open('GET', 'browserOutput.css', false); - xmlHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); - xmlHttp.send(); - saved += ''; - - saved += $messages.html(); - saved = saved.replace(/&/g, '&'); - saved = saved.replace(/'; - } - var popupContent = '
String Highlighting
' + - '
' + - '
Choose up to '+opts.highlightLimit+' strings that will highlight the line when they appear in chat.
' + - '
' + - termInputs + - '
' + - '
' + - '
' + - '
'; - createPopup(popupContent, 250); - }); - - $('body').on('keyup', '#highlightColor', function() { - var color = $('#highlightColor').val(); - color = color.trim(); - if (!color || color.charAt(0) != '#') return; - $('#highlightColor').css('background-color', color); - }); - - $('body').on('submit', '#highlightTermForm', function(e) { - e.preventDefault(); - - var count = 0; - while (count < opts.highlightLimit) { - var term = $('#highlightTermInput'+count).val(); - if (term) { - term = term.trim(); - if (term === '') { - opts.highlightTerms[count] = null; - } else { - opts.highlightTerms[count] = term.toLowerCase(); - } - } else { - opts.highlightTerms[count] = null; - } - count++; - } - - var color = $('#highlightColor').val(); - color = color.trim(); - if (color == '' || color.charAt(0) != '#') { - opts.highlightColor = '#FFFF00'; - } else { - opts.highlightColor = color; - } - var $popup = $('#highlightPopup').closest('.popup'); - $popup.remove(); - - setCookie('highlightterms', JSON.stringify(opts.highlightTerms), 365); - setCookie('highlightcolor', opts.highlightColor, 365); - }); - - $('#clearMessages').click(function() { - $messages.empty(); - opts.messageCount = 0; - }); - - - /***************************************** - * - * KICK EVERYTHING OFF - * - ******************************************/ - - runByond('?_src_=chat&proc=doneLoading'); - if ($('#loading').is(':visible')) { - $('#loading').remove(); - } - $('#userBar').show(); - opts.priorChatHeight = $(window).height(); -}); \ No newline at end of file diff --git a/goon/browserassets/js/json2.min.js b/goon/browserassets/js/json2.min.js deleted file mode 100644 index d867407f26..0000000000 --- a/goon/browserassets/js/json2.min.js +++ /dev/null @@ -1 +0,0 @@ -"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var r,n,o,u,f,a=gap,i=e[t];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(t)),"function"==typeof rep&&(i=rep.call(e,t,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(u=i.length,r=0;u>r;r+=1)f[r]=str(r,i)||"null";return o=0===f.length?"[]":gap?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"["+f.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(u=rep.length,r=0;u>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));else for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));return o=0===f.length?"{}":gap?"{\n"+gap+f.join(",\n"+gap)+"\n"+a+"}":"{"+f.join(",")+"}",gap=a,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var r,n,o=t[e];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(t,e,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(); \ No newline at end of file diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm deleted file mode 100644 index d928397728..0000000000 --- a/goon/code/datums/browserOutput.dm +++ /dev/null @@ -1,289 +0,0 @@ -/********************************* -For the main html chat area -*********************************/ - -//Precaching a bunch of shit -GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of icons for the browser output - -//On client, created on login -/datum/chatOutput - var/client/owner //client ref - var/loaded = FALSE // Has the client loaded the browser output area? - var/list/messageQueue //If they haven't loaded chat, this is where messages will go until they do - var/cookieSent = FALSE // Has the client sent a cookie for analysis - var/list/connectionHistory //Contains the connection history passed from chat cookie - var/broken = FALSE - -/datum/chatOutput/New(client/C) - owner = C - messageQueue = list() - connectionHistory = list() - // log_world("chatOutput: New()") - -/datum/chatOutput/proc/start() - //Check for existing chat - if(!owner) - return FALSE - - if(!winexists(owner, "browseroutput")) // Oh goddamnit. - alert(owner.mob, "Updated chat window does not exist. If you are using a custom skin file please allow the game to update.") - broken = TRUE - return FALSE - - if(winget(owner, "browseroutput", "is-disabled") == "false") //Already setup - doneLoading() - - else //Not setup - load() - - return TRUE - -/datum/chatOutput/proc/load() - set waitfor = FALSE - if(!owner) - return - - var/static/list/chatResources = list( - "code/modules/html_interface/js/jquery.min.js", - "goon/browserassets/js/json2.min.js", - "goon/browserassets/js/browserOutput.js", - "tgui/assets/fonts/fontawesome-webfont.eot", - "tgui/assets/fonts/fontawesome-webfont.svg", - "tgui/assets/fonts/fontawesome-webfont.ttf", - "tgui/assets/fonts/fontawesome-webfont.woff", - "goon/browserassets/css/font-awesome.css", - "goon/browserassets/css/browserOutput.css" - ) - - // to_chat(world.log, "chatOutput: load()") - for(var/attempts in 1 to 5) - for(var/asset in chatResources) - owner << browse_rsc(file(asset)) - - //log_world("Sending main chat window to client [owner.ckey]") - owner << browse(file("goon/browserassets/html/browserOutput.html"), "window=browseroutput") - sleep(14 + (chatResources.len * 7)) - if(!owner || loaded) - break - - if(owner && !loaded) - doneLoading() // try doing this manually - CRASH("[owner] failed to load chat. Attempting doneLoading() manually") - // log_world("chatOutput: [owner.ckey] load() completed") - -/datum/chatOutput/Topic(href, list/href_list) - if(usr.client != owner) - return TRUE - - // Build arguments. - // Arguments are in the form "param[paramname]=thing" - var/list/params = list() - for(var/key in href_list) - if(length(key) > 7 && findtext(key, "param")) // 7 is the amount of characters in the basic param key template. - var/param_name = copytext(key, 7, -1) - var/item = href_list[key] - - params[param_name] = item - - var/data // Data to be sent back to the chat. - switch(href_list["proc"]) - if("doneLoading") - data = doneLoading(arglist(params)) - - if("debug") - data = debug(arglist(params)) - - if("ping") - data = ping(arglist(params)) - - if("analyzeClientData") - data = analyzeClientData(arglist(params)) - - if(data) - ehjax_send(data = data) - -//Called on chat output done-loading by JS. -/datum/chatOutput/proc/doneLoading() - if(loaded) - return - - loaded = TRUE - winset(owner, "browseroutput", "is-disabled=false") - for(var/message in messageQueue) - to_chat(owner, message) - - messageQueue = null - sendClientData() - - pingLoop() - -/datum/chatOutput/proc/pingLoop() - set waitfor = FALSE - - while (owner) - ehjax_send(data = owner.is_afk(29) ? "softPang" : "pang") // SoftPang isn't handled anywhere but it'll always reset the opts.lastPang. - sleep(30) - -/datum/chatOutput/proc/ehjax_send(client/C = owner, window = "browseroutput", data) - if(islist(data)) - data = json_encode(data) - C << output("[data]", "[window]:ehjaxCallback") - -//Sends client connection details to the chat to handle and save -/datum/chatOutput/proc/sendClientData() - //Get dem deets - var/list/deets = list("clientData" = list()) - deets["clientData"]["ckey"] = owner.ckey - deets["clientData"]["ip"] = owner.address - deets["clientData"]["compid"] = owner.computer_id - var/data = json_encode(deets) - ehjax_send(data = data) - -//Called by client, sent data to investigate (cookie history so far) -/datum/chatOutput/proc/analyzeClientData(cookie = "") - if(!cookie) - return - - if(cookie != "none") - var/list/connData = json_decode(cookie) - if (connData && islist(connData) && connData.len > 0 && connData["connData"]) - connectionHistory = connData["connData"] //lol fuck - var/list/found = new() - for(var/i in connectionHistory.len to 1 step -1) - var/list/row = src.connectionHistory[i] - if (!row || row.len < 3 || (!row["ckey"] && !row["compid"] && !row["ip"])) //Passed malformed history object - return - if (world.IsBanned(row["ckey"], row["compid"], row["ip"])) - found = row - break - - //Uh oh this fucker has a history of playing on a banned account!! - if (found.len > 0) - //TODO: add a new evasion ban for the CURRENT client details, using the matched row details - message_admins("[key_name(src.owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])") - log_admin("[key_name(src.owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])") - - cookieSent = TRUE - -//Called by js client every 60 seconds -/datum/chatOutput/proc/ping() - return "pong" - -//Called by js client on js error -/datum/chatOutput/proc/debug(error) - log_world("\[[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]\] Client: [(src.owner.key ? src.owner.key : src.owner)] triggered JS error: [error]") - -#ifdef TESTING -/client/verb/debug_chat() - set hidden = TRUE - chatOutput.ehjax_send(data = list("firebug" = TRUE)) -#endif -//Global chat procs - -GLOBAL_LIST_EMPTY(bicon_cache) - -//Converts an icon to base64. Operates by putting the icon in the iconCache savefile, -// exporting it as text, and then parsing the base64 from that. -// (This relies on byond automatically storing icons in savefiles as base64) -/proc/icon2base64(icon/icon, iconKey = "misc") - if (!isicon(icon)) - return FALSE - GLOB.iconCache[iconKey] << icon - var/iconData = GLOB.iconCache.ExportText(iconKey) - var/list/partial = splittext(iconData, "{") - return replacetext(copytext(partial[2], 3, -5), "\n", "") - -/proc/bicon(obj) - if (!obj) - return - - if (isicon(obj)) - //Icons get pooled constantly, references are no good here. - /*if (!bicon_cache["\ref[obj]"]) // Doesn't exist yet, make it. - bicon_cache["\ref[obj]"] = icon2base64(obj) - return ""*/ - return "" - - // Either an atom or somebody fucked up and is gonna get a runtime, which I'm fine with. - var/atom/A = obj - var/key = "[istype(A.icon, /icon) ? "\ref[A.icon]" : A.icon]:[A.icon_state]" - if (!GLOB.bicon_cache[key]) // Doesn't exist, make it. - var/icon/I = icon(A.icon, A.icon_state, SOUTH, 1) - if (ishuman(obj)) // Shitty workaround for a BYOND issue. - var/icon/temp = I - I = icon() - I.Insert(temp, dir = SOUTH) - GLOB.bicon_cache[key] = icon2base64(I, key) - - return "" - -//Costlier version of bicon() that uses getFlatIcon() to account for overlays, underlays, etc. Use with extreme moderation, ESPECIALLY on mobs. -/proc/costly_bicon(obj) - if (!obj) - return - - if (isicon(obj)) - return bicon(obj) - - var/icon/I = getFlatIcon(obj) - return bicon(I) - -/proc/to_chat(target, message) - if(isnull(target)) - return - //Ok so I did my best but I accept that some calls to this will be for shit like sound and images - //It stands that we PROBABLY don't want to output those to the browser output so just handle them here - if (istype(message, /image) || istype(message, /sound) || istype(target, /savefile) || !(ismob(target) || islist(target) || istype(target, /client) || istype(target, /datum/log) || target == world)) - target << message - if (!istype(target, /atom)) // Really easy to mix these up, and not having to make sure things are mobs makes the code cleaner. - CRASH("DEBUG: Boutput called with invalid message") - return - - //Otherwise, we're good to throw it at the user - else if (istext(message)) - if (istext(target)) - return - - //Some macros remain in the string even after parsing and fuck up the eventual output - if (findtext(message, "\improper")) - message = replacetext(message, "\improper", "") - if (findtext(message, "\proper")) - message = replacetext(message, "\proper", "") - - //Grab us a client if possible - var/client/C = grab_client(target) - - if (C && C.chatOutput) - if(C.chatOutput.broken) // A player who hasn't updated his skin file. - to_chat(C, message) - return TRUE - if(!C.chatOutput.loaded && C.chatOutput.messageQueue && islist(C.chatOutput.messageQueue)) - //Client sucks at loading things, put their messages in a queue - C.chatOutput.messageQueue.Add(message) - return - - if(istype(target, /datum/log)) - var/datum/log/L = target - L.log += (message + "\n") - return - - message = replacetext(message, "\n", "
") - message = replacetext(message, "\t", "    ") - - // url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript. - target << output(url_encode(url_encode(message)), "browseroutput:output") - -/proc/grab_client(target) - if(istype(target, /client)) - return target - else if(istype(target, /mob)) - var/mob/M = target - if(M.client) - return M.client - else if(istype(target, /datum/mind)) - var/datum/mind/M = target - if(M.current && M.current.client) - return M.current.client - -/datum/log //exists purely to capture to_chat() output - var/log = "" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-8236.yml b/html/changelogs/AutoChangeLog-pr-8236.yml new file mode 100644 index 0000000000..3e266fb6fc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8236.yml @@ -0,0 +1,4 @@ +author: "deathride58" +delete-after: True +changes: + - refactor: "Added unomos, which is basically listmos except gas mixtures only use one single list for handling their gasses. This is a significant performance improvement that also offers a mild memory improvement under normal circumstances." diff --git a/html/changelogs/AutoChangeLog-pr-8391.yml b/html/changelogs/AutoChangeLog-pr-8391.yml new file mode 100644 index 0000000000..32e837a0a6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8391.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "replaces a sink with a autolathen" diff --git a/html/changelogs/AutoChangeLog-pr-8414.yml b/html/changelogs/AutoChangeLog-pr-8414.yml new file mode 100644 index 0000000000..eaec60b3a9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8414.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "MASON SUIT!" diff --git a/html/changelogs/AutoChangeLog-pr-8416.yml b/html/changelogs/AutoChangeLog-pr-8416.yml new file mode 100644 index 0000000000..34bac362be --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8416.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "adds the sec jetpack to sec hardsuit storge" diff --git a/html/changelogs/AutoChangeLog-pr-8432.yml b/html/changelogs/AutoChangeLog-pr-8432.yml new file mode 100644 index 0000000000..e65bfd68d3 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8432.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - balance: "Nukes the stunprod's 3 seconds delay." + - bugfix: "Fixes teleprods." diff --git a/html/changelogs/AutoChangeLog-pr-8442.yml b/html/changelogs/AutoChangeLog-pr-8442.yml new file mode 100644 index 0000000000..e73c67c6dc --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8442.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "clothing needing a emag" diff --git a/html/changelogs/AutoChangeLog-pr-8476.yml b/html/changelogs/AutoChangeLog-pr-8476.yml new file mode 100644 index 0000000000..551a443f94 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8476.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "hierophant movment and melee attack" diff --git a/html/changelogs/AutoChangeLog-pr-8479.yml b/html/changelogs/AutoChangeLog-pr-8479.yml new file mode 100644 index 0000000000..b6c8340527 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8479.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - balance: "Buffed krav maga leg sweep stun and stamina damage. On the other hand, it's now unable to be used on already lying targets." diff --git a/html/changelogs/AutoChangeLog-pr-8483.yml b/html/changelogs/AutoChangeLog-pr-8483.yml new file mode 100644 index 0000000000..2e3b35ca92 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8483.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by mrhugo13 on tgstation13)" +delete-after: True +changes: + - rscadd: "The Syndicate has decided to equip their Syndicate leaders operative (Aswell as their clown counterparts) with the new Combat Glove Plus! The new Combat Glove Plus does everything the old boring Combat Gloves does but with the added extra of learning Krav Maga upon wearing them, any other Syndicate operative who wants to get in on the action will have to pay 5tc." diff --git a/html/changelogs/AutoChangeLog-pr-8494.yml b/html/changelogs/AutoChangeLog-pr-8494.yml new file mode 100644 index 0000000000..2e4d7ac65e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8494.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "bone satchles" diff --git a/html/changelogs/AutoChangeLog-pr-8497.yml b/html/changelogs/AutoChangeLog-pr-8497.yml new file mode 100644 index 0000000000..4c42899313 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8497.yml @@ -0,0 +1,5 @@ +author: "BurgerBB" +delete-after: True +changes: + - rscadd: "Adds clockwork reflectors, a fragile anti-laser reflection shield object that can be constructed for 10 brass sheets. Upon firing on the object in the direction where it is shielded, it ricochets the bullet off of it relative to the shooting angle." + - tweak: "Renames some windows in the build menu for consistency." diff --git a/html/changelogs/AutoChangeLog-pr-8500.yml b/html/changelogs/AutoChangeLog-pr-8500.yml new file mode 100644 index 0000000000..09bfbd9748 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8500.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - balance: "rebalanced stunslugs" diff --git a/html/changelogs/AutoChangeLog-pr-8501.yml b/html/changelogs/AutoChangeLog-pr-8501.yml new file mode 100644 index 0000000000..fba27c4d52 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8501.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "colored boxes, and more types" diff --git a/html/changelogs/AutoChangeLog-pr-8503.yml b/html/changelogs/AutoChangeLog-pr-8503.yml new file mode 100644 index 0000000000..f6c4a7dc75 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8503.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "harm and such" + - balance: "item classes" diff --git a/html/changelogs/AutoChangeLog-pr-8505.yml b/html/changelogs/AutoChangeLog-pr-8505.yml new file mode 100644 index 0000000000..57d6399680 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8505.yml @@ -0,0 +1,4 @@ +author: "BurgerBB" +delete-after: True +changes: + - balance: "Clockwork Cult walls can no longer be deconstructed by RCDs when heated." diff --git a/html/changelogs/AutoChangeLog-pr-8514.yml b/html/changelogs/AutoChangeLog-pr-8514.yml new file mode 100644 index 0000000000..f1d01a97e4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8514.yml @@ -0,0 +1,6 @@ +author: "BurgerBB" +delete-after: True +changes: + - rscadd: "Adds several new toy loot to the arcade machine." + - balance: "Rebalanced the arcade machine loot. Battlemachines now have a 0.5 second delay instead of a second delay between actions." + - bugfix: "Fixed a bug that would not allow the one in a million pulse rifle to spawn." diff --git a/html/changelogs/AutoChangeLog-pr-8522.yml b/html/changelogs/AutoChangeLog-pr-8522.yml new file mode 100644 index 0000000000..eb646034fd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8522.yml @@ -0,0 +1,4 @@ +author: "Useroth" +delete-after: True +changes: + - tweak: "The tentacle now directly puts the item in your hands, instead of toggling your throwing and tossing it at you. Tentacles suffer from ranged inaccuracies as if they were guns, I think it's enough of an inconvenience." diff --git a/html/changelogs/AutoChangeLog-pr-8538.yml b/html/changelogs/AutoChangeLog-pr-8538.yml new file mode 100644 index 0000000000..7349a31683 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8538.yml @@ -0,0 +1,4 @@ +author: "dtfe3" +delete-after: True +changes: + - rscadd: "Twintails" diff --git a/html/changelogs/AutoChangeLog-pr-8540.yml b/html/changelogs/AutoChangeLog-pr-8540.yml new file mode 100644 index 0000000000..895b80bfa6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8540.yml @@ -0,0 +1,4 @@ +author: "BurgerBB" +delete-after: True +changes: + - balance: "Ass slapping blowback from the Buns of Steel perk now deals 20 stamina damage instead of 50, and no brute damage." diff --git a/html/changelogs/AutoChangeLog-pr-8541.yml b/html/changelogs/AutoChangeLog-pr-8541.yml new file mode 100644 index 0000000000..82e76fe74b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8541.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "items to syndie surgery bags" diff --git a/html/changelogs/AutoChangeLog-pr-8543.yml b/html/changelogs/AutoChangeLog-pr-8543.yml new file mode 100644 index 0000000000..1e1ce8922b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8543.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "SNOW CONES" diff --git a/html/changelogs/AutoChangeLog-pr-8544.yml b/html/changelogs/AutoChangeLog-pr-8544.yml new file mode 100644 index 0000000000..1641eed42e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8544.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "carts buy-able cargo" diff --git a/html/changelogs/AutoChangeLog-pr-8547.yml b/html/changelogs/AutoChangeLog-pr-8547.yml new file mode 100644 index 0000000000..51c2252138 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8547.yml @@ -0,0 +1,6 @@ +author: "Ghommie (original PRs by Naksu and XDTM)" +delete-after: True +changes: + - bugfix: "Transferring quirks now properly removes the roundstart trait from the person losing the quirk." + - bugfix: "Roundstart traits no longer block the removal of other sources of that trait." + - code_imp: "status traits are now a datum var, the accessors are now defines rather than functions." diff --git a/html/changelogs/AutoChangeLog-pr-8548.yml b/html/changelogs/AutoChangeLog-pr-8548.yml new file mode 100644 index 0000000000..cd49f38686 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8548.yml @@ -0,0 +1,4 @@ +author: "dtfe3" +delete-after: True +changes: + - rscadd: "Schoolgirl outfits for the loadout menu!" diff --git a/html/changelogs/AutoChangeLog-pr-8549.yml b/html/changelogs/AutoChangeLog-pr-8549.yml new file mode 100644 index 0000000000..32b99d1d49 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8549.yml @@ -0,0 +1,6 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "selling/time to craft" + - bugfix: "crafting problems, and red stamp exsplote" + - rscadd: "gives paper work sprites that are nicer" diff --git a/html/changelogs/AutoChangeLog-pr-8551.yml b/html/changelogs/AutoChangeLog-pr-8551.yml new file mode 100644 index 0000000000..738b410e26 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8551.yml @@ -0,0 +1,4 @@ +author: "tigercat2000@Paradise" +delete-after: True +changes: + - bugfix: "fixed invalid characters breaking chat output for that message" diff --git a/html/changelogs/AutoChangeLog-pr-8552.yml b/html/changelogs/AutoChangeLog-pr-8552.yml new file mode 100644 index 0000000000..2b63c79756 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8552.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PR by LaKiller8)" +delete-after: True +changes: + - bugfix: "Goonchat options should now save properly." diff --git a/html/changelogs/AutoChangeLog-pr-8553.yml b/html/changelogs/AutoChangeLog-pr-8553.yml new file mode 100644 index 0000000000..e89e04537b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8553.yml @@ -0,0 +1,5 @@ +author: "Poojawa" +delete-after: True +changes: + - tweak: "tweaked the name of Sublter to distinguish its use" + - tweak: "Gave a hint for vore posting." diff --git a/html/changelogs/AutoChangeLog-pr-8554.yml b/html/changelogs/AutoChangeLog-pr-8554.yml new file mode 100644 index 0000000000..8bf00955b5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8554.yml @@ -0,0 +1,10 @@ +author: "Ghommie (original PRs by Nichlas0010 and ShizCalev)" +delete-after: True +changes: + - tweak: "AI core display screen can now be set in character preferences." + - bugfix: "AI core display screen will now be restore when revived." + - spellcheck: "Corrected some inconsistent capitalization in the player preferences screen." + - imageadd: "Readded some forgotten AI sprites." + - bugfix: "Fixed Hades AI death animation not playing." + - tweak: "the AI icon-selection menu now uses a radial." + - imageadd: "Added in the death icon_states for the \"TechDemon\" AI screen." diff --git a/html/changelogs/AutoChangeLog-pr-8555.yml b/html/changelogs/AutoChangeLog-pr-8555.yml new file mode 100644 index 0000000000..bb2c116dfa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8555.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - code_imp: "Ported some radials code updates." + - rscadd: "Ported the RCL wiring menu and a comfier RCD interface." diff --git a/html/changelogs/AutoChangeLog-pr-8556.yml b/html/changelogs/AutoChangeLog-pr-8556.yml new file mode 100644 index 0000000000..e84af4f774 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8556.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Readded Ninja speech modifications with their mask" diff --git a/html/changelogs/AutoChangeLog-pr-8557.yml b/html/changelogs/AutoChangeLog-pr-8557.yml new file mode 100644 index 0000000000..601f70f2cb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8557.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original pr by Dennok on tgstation)" +delete-after: True +changes: + - bugfix: "Now you don't lose your pulled thing on the z level edge." diff --git a/html/changelogs/AutoChangeLog-pr-8558.yml b/html/changelogs/AutoChangeLog-pr-8558.yml new file mode 100644 index 0000000000..6bb951f8a2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8558.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PR by coiax)" +delete-after: True +changes: + - refactor: "atom/var/container_type has been moved into datum/reagents/var/reagents_holder_flags. There should be no visible changes to effects." diff --git a/html/changelogs/AutoChangeLog-pr-8559.yml b/html/changelogs/AutoChangeLog-pr-8559.yml new file mode 100644 index 0000000000..aee1727348 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8559.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by Naksu)" +delete-after: True +changes: + - code_imp: "get_area() is now a define rather than a proc." diff --git a/html/changelogs/AutoChangeLog-pr-8560.yml b/html/changelogs/AutoChangeLog-pr-8560.yml new file mode 100644 index 0000000000..aa1be89e09 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8560.yml @@ -0,0 +1,5 @@ +author: "Ghommie (original PR by 4dplanner)" +delete-after: True +changes: + - bugfix: "thrown objects (but not mobs) no longer hit the thrower" + - bugfix: "mirror shield rebound no longer depends on the original thrower's momentum" diff --git a/html/changelogs/AutoChangeLog-pr-8561.yml b/html/changelogs/AutoChangeLog-pr-8561.yml new file mode 100644 index 0000000000..dca2bff2ff --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8561.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PR by JJRcop)" +delete-after: True +changes: + - rscadd: "Ports in more emojis, including : flushed :" diff --git a/html/changelogs/AutoChangeLog-pr-8562.yml b/html/changelogs/AutoChangeLog-pr-8562.yml new file mode 100644 index 0000000000..a93babfdae --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8562.yml @@ -0,0 +1,5 @@ +author: "AnalWerewolf" +delete-after: True +changes: + - rscadd: "Fritz plushie" + - rscadd: "Donor item" diff --git a/html/changelogs/AutoChangeLog-pr-8565.yml b/html/changelogs/AutoChangeLog-pr-8565.yml new file mode 100644 index 0000000000..91faa4d8b6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8565.yml @@ -0,0 +1,4 @@ +author: "Skully)" +delete-after: True +changes: + - rscadd: "Nudity Permit, a completely invisible uniform that still has pockets and such, to loadout options. It is more or less a direct port from the RP server." diff --git a/html/changelogs/AutoChangeLog-pr-8566.yml b/html/changelogs/AutoChangeLog-pr-8566.yml new file mode 100644 index 0000000000..085b74e87a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8566.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - tweak: "A milder combat stance message will show up if the user switch combat mode on while on help intent." diff --git a/html/changelogs/AutoChangeLog-pr-8567.yml b/html/changelogs/AutoChangeLog-pr-8567.yml new file mode 100644 index 0000000000..3814607aaa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8567.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - rscadd: "You can now use RPDs on windows and grilles." diff --git a/html/changelogs/AutoChangeLog-pr-8569.yml b/html/changelogs/AutoChangeLog-pr-8569.yml new file mode 100644 index 0000000000..9a51ab1099 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8569.yml @@ -0,0 +1,4 @@ +author: "dtfe3" +delete-after: True +changes: + - tweak: "Now the fox ears are located in front of hair meaning they now behave much like cat ears, that being they are on-top of the hair layer." diff --git a/html/changelogs/AutoChangeLog-pr-8570.yml b/html/changelogs/AutoChangeLog-pr-8570.yml new file mode 100644 index 0000000000..787b486685 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8570.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "origami" diff --git a/html/changelogs/AutoChangeLog-pr-8578.yml b/html/changelogs/AutoChangeLog-pr-8578.yml new file mode 100644 index 0000000000..39ded33f2d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8578.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - spellcheck: "Properly rewords the extinguisher's instructions on how to empty it on the floor since it was changed to be a screwdriver action instead of Alt Click a while ago." diff --git a/html/changelogs/AutoChangeLog-pr-8579.yml b/html/changelogs/AutoChangeLog-pr-8579.yml new file mode 100644 index 0000000000..56ecea119f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8579.yml @@ -0,0 +1,5 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "gang tower shield" + - tweak: "costs of boots" diff --git a/html/changelogs/AutoChangeLog-pr-8581.yml b/html/changelogs/AutoChangeLog-pr-8581.yml new file mode 100644 index 0000000000..90433ecb88 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8581.yml @@ -0,0 +1,6 @@ +author: "Ghommie" +delete-after: True +changes: + - rscadd: "Reskinnable PDAs. A related game preference." + - refactor: "Refactoring the pda, pda painter, obj reskinning and chameleon pda a bit to support this feature." + - imageadd: "more PDA sprites and ported reskins." diff --git a/html/changelogs/AutoChangeLog-pr-8584.yml b/html/changelogs/AutoChangeLog-pr-8584.yml new file mode 100644 index 0000000000..2621812d64 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8584.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "organ box" diff --git a/html/changelogs/AutoChangeLog-pr-8587.yml b/html/changelogs/AutoChangeLog-pr-8587.yml new file mode 100644 index 0000000000..4b7fdeb64c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8587.yml @@ -0,0 +1,4 @@ +author: "SkullyRoberts" +delete-after: True +changes: + - rscadd: "Penis autosurgeon as rare maint loot." diff --git a/html/changelogs/AutoChangeLog-pr-8591.yml b/html/changelogs/AutoChangeLog-pr-8591.yml new file mode 100644 index 0000000000..09eb449899 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8591.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PR by Vile Beggar)" +delete-after: True +changes: + - rscadd: "Warden now has an added drill hat in his locker. You can change the loudness setting of it by using a screwdriver on it. Use wirecutters on it for a surprise." diff --git a/html/changelogs/AutoChangeLog-pr-8599.yml b/html/changelogs/AutoChangeLog-pr-8599.yml new file mode 100644 index 0000000000..41134f4d5b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8599.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Pacifists can eat people for heal belly or noisy. Digestive modes are auto-swapped to noisy" diff --git a/html/changelogs/AutoChangeLog-pr-8602.yml b/html/changelogs/AutoChangeLog-pr-8602.yml new file mode 100644 index 0000000000..4974c1ae79 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8602.yml @@ -0,0 +1,5 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Added an underwear toggle button under 'Object' tab" + - tweak: "Genitals now layer under underwear. Hide these if they're too obnoxious." diff --git a/html/changelogs/AutoChangeLog-pr-8605.yml b/html/changelogs/AutoChangeLog-pr-8605.yml new file mode 100644 index 0000000000..c6a601f1ca --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8605.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Medical breifcaseses" diff --git a/html/changelogs/AutoChangeLog-pr-8611.yml b/html/changelogs/AutoChangeLog-pr-8611.yml new file mode 100644 index 0000000000..8176d10a84 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8611.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - rscadd: "Added digitigrade socks of all known ones anyway." diff --git a/html/changelogs/AutoChangeLog-pr-8614.yml b/html/changelogs/AutoChangeLog-pr-8614.yml new file mode 100644 index 0000000000..e9473181fb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8614.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by SpaceManiac)" +delete-after: True +changes: + - bugfix: "Disassembling a chem dispenser for the first time will no longer always yield a fully-charged cell." diff --git a/html/changelogs/AutoChangeLog-pr-8618.yml b/html/changelogs/AutoChangeLog-pr-8618.yml new file mode 100644 index 0000000000..77ba2439a1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8618.yml @@ -0,0 +1,7 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "New cargo crate for tech-slugs!" + - rscadd: "Ammo to each fitting crate" + - bugfix: "Cat-code" + - spellcheck: "fixed a few typos - Again my bad" diff --git a/html/changelogs/AutoChangeLog-pr-8623.yml b/html/changelogs/AutoChangeLog-pr-8623.yml new file mode 100644 index 0000000000..63f51b18eb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8623.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - rscadd: "The RD can now suplex a immovable rod. Good fucking luck." diff --git a/html/changelogs/AutoChangeLog-pr-8624.yml b/html/changelogs/AutoChangeLog-pr-8624.yml new file mode 100644 index 0000000000..598ed9b457 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8624.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - bugfix: "Fixes high alert ERT suit sprites. You can see them now!" diff --git a/html/changelogs/AutoChangeLog-pr-8633.yml b/html/changelogs/AutoChangeLog-pr-8633.yml new file mode 100644 index 0000000000..3cbc9a78aa --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8633.yml @@ -0,0 +1,4 @@ +author: "Arturlang" +delete-after: True +changes: + - rscadd: "You can now examine pumps filters and mixers to see if you can use CTRL and Alt click on them." diff --git a/html/changelogs/AutoChangeLog-pr-8634.yml b/html/changelogs/AutoChangeLog-pr-8634.yml new file mode 100644 index 0000000000..d351579640 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8634.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes power cells being unable to be rigged. Also prevents them from starting processing on init if they don't self recharge." + - bugfix: "Fixes many, little or otherwise, issues with the stunbaton status refactor." diff --git a/html/changelogs/AutoChangeLog-pr-8639.yml b/html/changelogs/AutoChangeLog-pr-8639.yml new file mode 100644 index 0000000000..f2f24d33ad --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8639.yml @@ -0,0 +1,10 @@ +author: "Useroth" +delete-after: True +changes: + - tweak: "Makes the netting much less clunky. If there's only one target you can net while you press the +button, it will just net that target instead of bringing up a list of mobs." + - tweak: "Energy nets now revive and fully heal capturees (even dead ones, after calculating points). If someone's got a scan and wants to get cloned, they can always kill themselves still." + - tweak: "Capture points are added on capture, rather than round-end, so it no longer matters whether your captures kill themselves in the holding facility or not." + - balance: "Makes the nets a bit more sturdy. (previously it took mere two welder hits to break one)" + - balance: "Makes stungloves actually stun people (currently comparably with stunbatons, adjustable). Because electrocute_act(25, H) did fuck all, stunwise, and on top of that, people in insulated gloves were completely unaffected." + - balance: "Reduced the stunglove electrocute_act value to 15 due to above. Could possibly be lowered further." diff --git a/html/changelogs/AutoChangeLog-pr-8640.yml b/html/changelogs/AutoChangeLog-pr-8640.yml new file mode 100644 index 0000000000..b06feb4613 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8640.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "baklava" diff --git a/html/changelogs/AutoChangeLog-pr-8643.yml b/html/changelogs/AutoChangeLog-pr-8643.yml new file mode 100644 index 0000000000..b172071e2e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8643.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "The sacrificial target icon will now display onto the cult objective ui alert once again." diff --git a/html/changelogs/AutoChangeLog-pr-8645.yml b/html/changelogs/AutoChangeLog-pr-8645.yml new file mode 100644 index 0000000000..c299dcbbb5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8645.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Stopping borgs from sprinting into negative cell charge." diff --git a/html/changelogs/AutoChangeLog-pr-8648.yml b/html/changelogs/AutoChangeLog-pr-8648.yml new file mode 100644 index 0000000000..8d0f9d20c8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8648.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - balance: "makes uplink kits more usefull for the risk" diff --git a/html/changelogs/AutoChangeLog-pr-8652.yml b/html/changelogs/AutoChangeLog-pr-8652.yml new file mode 100644 index 0000000000..b788c5785c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8652.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PR by Dennok)" +delete-after: True +changes: + - bugfix: "Now areas_in_z get areas spawned by templates and blueprints." diff --git a/html/changelogs/AutoChangeLog-pr-8658.yml b/html/changelogs/AutoChangeLog-pr-8658.yml new file mode 100644 index 0000000000..ad35118c3f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8658.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - tweak: "Moving some tablecrafting recipes to the appropriate categories: Kitty ears and lizard cloche hats to \"clothing\"; Hot dogs to \"Sandwichs\"; Cuban carb, fish and chips and fish fingers to \"Fish\"." + - bugfix: "Fixes the not-a-sandwich recipe being M.I.A." diff --git a/html/changelogs/AutoChangeLog-pr-8659.yml b/html/changelogs/AutoChangeLog-pr-8659.yml new file mode 100644 index 0000000000..6287f1307f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8659.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by ninjanomnom)" +delete-after: True +changes: + - bugfix: "Orbiting is a little more aggressive about staying in orbit. The wisp as a result now correctly follows you over shuttle moves." diff --git a/html/changelogs/AutoChangeLog-pr-8665.yml b/html/changelogs/AutoChangeLog-pr-8665.yml new file mode 100644 index 0000000000..fc34f9ac3e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8665.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - balance: "Buffed wizard and artificier's Magic Missile, wizard and xeno queen's Repulse and juggernaut's Gauntlet Echo." diff --git a/html/changelogs/AutoChangeLog-pr-8666.yml b/html/changelogs/AutoChangeLog-pr-8666.yml new file mode 100644 index 0000000000..df2e2e3af0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8666.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by YPOQ)" +delete-after: True +changes: + - bugfix: "Fixing roffle waffle, mushroom halluginogen and some invalid reagents." diff --git a/html/changelogs/AutoChangeLog-pr-8667.yml b/html/changelogs/AutoChangeLog-pr-8667.yml new file mode 100644 index 0000000000..1f80a2917d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8667.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by Anturk)" +delete-after: True +changes: + - rscadd: "Recipe for fabled secret sauce can now be found in the deepest reaches of space." diff --git a/html/changelogs/AutoChangeLog-pr-8669.yml b/html/changelogs/AutoChangeLog-pr-8669.yml new file mode 100644 index 0000000000..20770e8cc2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8669.yml @@ -0,0 +1,5 @@ +author: "Ghommie (original PRs by Denton and Skoglol)" +delete-after: True +changes: + - tweak: "Reorganized the syndicate uplinks. Items are now mostly alphabetical, some misplaced items moved to more fitting categories. Bundles, random item and TC have been moved into a new category called \"Bundles and Telecrystals\". Gloves of the North Star and Box of Throwing Weapons have been moved to Conspicuous and Dangerous Weapons. Combat Gloves Plus have been moved to Stealthy and Inconspicuous Weapons. Moved all implants into the Implants category." + - tweak: "Added a new category to the uplink: Grenades and Explosives." diff --git a/html/changelogs/AutoChangeLog-pr-8671.yml b/html/changelogs/AutoChangeLog-pr-8671.yml new file mode 100644 index 0000000000..bb01481d5c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8671.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by wesoda25)" +delete-after: True +changes: + - balance: "disembowelment no longer works on mobs that aren't dead or in critical condition" diff --git a/html/changelogs/AutoChangeLog-pr-8674.yml b/html/changelogs/AutoChangeLog-pr-8674.yml new file mode 100644 index 0000000000..3277946844 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8674.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "fixing cat code that dosnt work, my bad" diff --git a/html/changelogs/AutoChangeLog-pr-8675.yml b/html/changelogs/AutoChangeLog-pr-8675.yml new file mode 100644 index 0000000000..170a44ca25 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8675.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "Arcades stealing from noodles" diff --git a/html/changelogs/AutoChangeLog-pr-8677.yml b/html/changelogs/AutoChangeLog-pr-8677.yml new file mode 100644 index 0000000000..181f6d2932 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8677.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "speedy quirk" diff --git a/html/changelogs/AutoChangeLog-pr-8681.yml b/html/changelogs/AutoChangeLog-pr-8681.yml new file mode 100644 index 0000000000..1cd5f04124 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8681.yml @@ -0,0 +1,6 @@ +author: "Ghommie (Original PRs by Tortellini Tony and BuffEngineering)" +delete-after: True +changes: + - bugfix: "E-cigs will continue to display their setting after being emagged." + - bugfix: "Vapes now come out of the mouth. +fix Fixes an E-cig initialize() runtime." diff --git a/html/changelogs/AutoChangeLog-pr-8687.yml b/html/changelogs/AutoChangeLog-pr-8687.yml new file mode 100644 index 0000000000..65347093ef --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8687.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by monster860)" +delete-after: True +changes: + - bugfix: "fixes advanced proccall" diff --git a/html/changelogs/AutoChangeLog-pr-8688.yml b/html/changelogs/AutoChangeLog-pr-8688.yml new file mode 100644 index 0000000000..b22c2c52fd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8688.yml @@ -0,0 +1,5 @@ +author: "Ghommie (Original PR by nemvar)" +delete-after: True +changes: + - rscadd: "Botanists can now get beeplushies (or cultivator and bucket) as an heirloom." + - bugfix: "Clowns and mimes will now properly pick either a can of paint or their brand as heirloom now." diff --git a/html/changelogs/AutoChangeLog-pr-8689.yml b/html/changelogs/AutoChangeLog-pr-8689.yml new file mode 100644 index 0000000000..bf44770c76 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8689.yml @@ -0,0 +1,4 @@ +author: "Fermis" +delete-after: True +changes: + - rscadd: "Added a panda simplemob" diff --git a/html/changelogs/AutoChangeLog-pr-8690.yml b/html/changelogs/AutoChangeLog-pr-8690.yml new file mode 100644 index 0000000000..3ac76333a2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8690.yml @@ -0,0 +1,4 @@ +author: "Fermis" +delete-after: True +changes: + - bugfix: "fixes empathy exploit." diff --git a/html/changelogs/AutoChangeLog-pr-8691.yml b/html/changelogs/AutoChangeLog-pr-8691.yml new file mode 100644 index 0000000000..680904cc5c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8691.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Original PRs by nemvar and Rowell)" +delete-after: True +changes: + - rscadd: "Added beekini bras and panties, thigh-high and knee-high bee socks." diff --git a/html/changelogs/AutoChangeLog-pr-8692.yml b/html/changelogs/AutoChangeLog-pr-8692.yml new file mode 100644 index 0000000000..f1d87676ab --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8692.yml @@ -0,0 +1,7 @@ +author: "Ghommie (original PRs by ShizCalev)" +delete-after: True +changes: + - bugfix: "Fixed a bug that allowed you to teleport an ID in your possession to a PDA anywhere ingame." + - bugfix: "Fixed an exploit allowing you to steal ID's/pens from PDA's not in your possession." + - bugfix: "Fixed an exploit allowing you unlimited control of a PDA's interface even if it wasn't near you/in your possession." + - bugfix: "Fixed Pride Mirror exploits." diff --git a/html/changelogs/AutoChangeLog-pr-8695.yml b/html/changelogs/AutoChangeLog-pr-8695.yml new file mode 100644 index 0000000000..671eaa519e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8695.yml @@ -0,0 +1,6 @@ +author: "Ghommie (original PRs by grandpawalton and Mickyan)" +delete-after: True +changes: + - tweak: "the contents on the smartfridge icon now change depending on how many items it contains" + - bugfix: "opening the maintenance panel of smartfridges now correctly updates the icon" + - bugfix: "Screwing a disk compartmentalizer no longer makes it look like a smartfridge." diff --git a/html/changelogs/AutoChangeLog-pr-8698.yml b/html/changelogs/AutoChangeLog-pr-8698.yml new file mode 100644 index 0000000000..464f74427e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8698.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes flashlights being unable to be used for rudimentary eyes and mouth exams." diff --git a/html/changelogs/AutoChangeLog-pr-8708.yml b/html/changelogs/AutoChangeLog-pr-8708.yml new file mode 100644 index 0000000000..0929c2ee6c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8708.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - spellcheck: "Ironic" diff --git a/html/changelogs/AutoChangeLog-pr-8711.yml b/html/changelogs/AutoChangeLog-pr-8711.yml new file mode 100644 index 0000000000..f836783659 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8711.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - rscadd: "Adds in a grey jumpsuit to the loadout choices, restricted to Assistants." diff --git a/html/changelogs/AutoChangeLog-pr-8715.yml b/html/changelogs/AutoChangeLog-pr-8715.yml new file mode 100644 index 0000000000..b99309cdd9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8715.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "Pentetic Jelly, new chemical made through mixing 1:1 slime jelly and pentetic acid." + - tweak: "Anatomic panacea now gives pent jelly instead of pent acid. Medbeams now have TRUE tox healing to heal TOXINLOVER as well." diff --git a/html/changelogs/AutoChangeLog-pr-8718.yml b/html/changelogs/AutoChangeLog-pr-8718.yml new file mode 100644 index 0000000000..102fbd4f23 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8718.yml @@ -0,0 +1,4 @@ +author: "Linzolle" +delete-after: True +changes: + - rscadd: "ability to quickly max sensors" diff --git a/html/changelogs/AutoChangeLog-pr-8720.yml b/html/changelogs/AutoChangeLog-pr-8720.yml new file mode 100644 index 0000000000..81684baeac --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8720.yml @@ -0,0 +1,4 @@ +author: "Ghommie (Credits to Kmc2000 for the original PR)" +delete-after: True +changes: + - rscadd: "Porting in MRE boxes from Yogstation. But be careful, eating possibly expired MREs found in maintenance comes with an unrealistically large (actually small) chance of food poisoning. Otherwise just bail out and order actually safe-to-eat MREs from cargo for 2000 credits." diff --git a/html/changelogs/AutoChangeLog-pr-8721.yml b/html/changelogs/AutoChangeLog-pr-8721.yml new file mode 100644 index 0000000000..4b616e9923 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8721.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by XDTM)" +delete-after: True +changes: + - bugfix: "Reagents now stop their passive effects (for example, stun immunity) if the liver stops working while they're active." diff --git a/html/changelogs/AutoChangeLog-pr-8722.yml b/html/changelogs/AutoChangeLog-pr-8722.yml new file mode 100644 index 0000000000..fe858768af --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8722.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - bugfix: "I didn't code it right it in the first place" diff --git a/html/changelogs/AutoChangeLog-pr-8726.yml b/html/changelogs/AutoChangeLog-pr-8726.yml new file mode 100644 index 0000000000..49da4299ce --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8726.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "Changed bible heal proc, halving the healed damage and increasing brain damage 5x in exchange for a much wider array of items to protect you from it." diff --git a/html/changelogs/AutoChangeLog-pr-8727.yml b/html/changelogs/AutoChangeLog-pr-8727.yml new file mode 100644 index 0000000000..b1ca5f0d51 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8727.yml @@ -0,0 +1,5 @@ +author: "Ghommie (original PRs by Jujumatic and PKPenguin321, respectively)" +delete-after: True +changes: + - rscadd: "Minesweeper Arcade machines. The higher the difficulty setting, the better the prizes will be." + - rscadd: "Also keep your eye out for another new (and rare) arcade game!" diff --git a/html/changelogs/AutoChangeLog-pr-8728.yml b/html/changelogs/AutoChangeLog-pr-8728.yml new file mode 100644 index 0000000000..2e860e737f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8728.yml @@ -0,0 +1,6 @@ +author: "Sishen1542" +delete-after: True +changes: + - tweak: "Moved around some chems from emag list into upgrades." + - balance: "Added some fun chems to dispensers." + - bugfix: "Gave dispensers old tg functionality." diff --git a/html/changelogs/AutoChangeLog-pr-8729.yml b/html/changelogs/AutoChangeLog-pr-8729.yml new file mode 100644 index 0000000000..a72f624352 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8729.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by AffectedArc07)" +delete-after: True +changes: + - tweak: "Religion is now a globalvar instead of being a subsystem for some reason" diff --git a/html/changelogs/AutoChangeLog-pr-8730.yml b/html/changelogs/AutoChangeLog-pr-8730.yml new file mode 100644 index 0000000000..d0204f2830 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8730.yml @@ -0,0 +1,6 @@ +author: "Ghommie (original PRs by Tlaltecuhtli and nicbn)" +delete-after: True +changes: + - rscadd: "alt click to eject beakers from chem masters + chem dispensers + grinders + chem heaters" + - rscadd: "hit chem master + chem dispenser + chem heaters with a beaker and if its loaded with another it swaps em" + - rscadd: "All-In-One Blender UI uses a radial menu now. You can see the contents and reagents by examining." diff --git a/html/changelogs/AutoChangeLog-pr-8731.yml b/html/changelogs/AutoChangeLog-pr-8731.yml new file mode 100644 index 0000000000..0728c12124 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8731.yml @@ -0,0 +1,9 @@ +author: "Ghommie (original PRs by nicbn and coiax)" +delete-after: True +changes: + - rscadd: "Microwave UI uses a radial menu now. You can see the contents by examining." + - rscadd: "Microwaves have a single wire accessible when open, the activation wire. +When cut, the microwave will no longer function, when pulsed, the microwave +will turn on." + - rscadd: "Stabilized dark purple extracts now cook items in your hands, rather than dropping +the cooked item on the floor." diff --git a/html/changelogs/AutoChangeLog-pr-8732.yml b/html/changelogs/AutoChangeLog-pr-8732.yml new file mode 100644 index 0000000000..69a79b93ac --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8732.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by Nicjh)" +delete-after: True +changes: + - rscadd: "Abductor console's select disguise option now uses a radial" diff --git a/html/changelogs/AutoChangeLog-pr-8733.yml b/html/changelogs/AutoChangeLog-pr-8733.yml new file mode 100644 index 0000000000..593c06bd90 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8733.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by Swindly)" +delete-after: True +changes: + - rscadd: "Arm-mounted implants that contain more than one item use a radial menu instead of a list menu." diff --git a/html/changelogs/AutoChangeLog-pr-8736.yml b/html/changelogs/AutoChangeLog-pr-8736.yml new file mode 100644 index 0000000000..68d64e2410 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8736.yml @@ -0,0 +1,6 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "gear harness and a conflict merg" + - rscdel: "Nudity permits" + - bugfix: "nothing" diff --git a/html/changelogs/AutoChangeLog-pr-8737.yml b/html/changelogs/AutoChangeLog-pr-8737.yml new file mode 100644 index 0000000000..d8e868df33 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8737.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes CWC construct shells being visible as ghost role to latejoiners." diff --git a/html/changelogs/AutoChangeLog-pr-8738.yml b/html/changelogs/AutoChangeLog-pr-8738.yml new file mode 100644 index 0000000000..f0e48a77b5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8738.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by ShizCalev)" +delete-after: True +changes: + - bugfix: "Pineapple haters/lovers will get/no longer get pineapple pizzas respectively from infinite pizza boxes." diff --git a/html/changelogs/AutoChangeLog-pr-8739.yml b/html/changelogs/AutoChangeLog-pr-8739.yml new file mode 100644 index 0000000000..0c25a1a649 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8739.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "Leather, cardboard, bronze & bone golems!" + - rscadd: "Bone hurting juice and interactions with plasmamen, skeletons & bone golems!" diff --git a/html/changelogs/AutoChangeLog-pr-8741.yml b/html/changelogs/AutoChangeLog-pr-8741.yml new file mode 100644 index 0000000000..be803933ae --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8741.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by AffectedArc07 and Shazbot)" +delete-after: True +changes: + - imageadd: "Added 8 new sock styles" diff --git a/html/changelogs/AutoChangeLog-pr-8742.yml b/html/changelogs/AutoChangeLog-pr-8742.yml new file mode 100644 index 0000000000..03428fc8d1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8742.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Donner item" diff --git a/html/changelogs/AutoChangeLog-pr-8744.yml b/html/changelogs/AutoChangeLog-pr-8744.yml new file mode 100644 index 0000000000..2979a4a842 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8744.yml @@ -0,0 +1,4 @@ +author: "Linzolle" +delete-after: True +changes: + - bugfix: "atmos helmet visual bug" diff --git a/html/changelogs/AutoChangeLog-pr-8745.yml b/html/changelogs/AutoChangeLog-pr-8745.yml new file mode 100644 index 0000000000..6feaa2eadd --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8745.yml @@ -0,0 +1,5 @@ +author: "Sishen1542" +delete-after: True +changes: + - rscadd: "Ported addition of new CAS cards." + - bugfix: "Ported a fix for CAS." diff --git a/html/changelogs/AutoChangeLog-pr-8747.yml b/html/changelogs/AutoChangeLog-pr-8747.yml new file mode 100644 index 0000000000..c8a4689c60 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8747.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Luna's Gauntlets" diff --git a/html/changelogs/AutoChangeLog-pr-8753.yml b/html/changelogs/AutoChangeLog-pr-8753.yml new file mode 100644 index 0000000000..04fd009e2f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8753.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "Ported the inability for non-station AI to interact with station z-level." diff --git a/html/changelogs/AutoChangeLog-pr-8755.yml b/html/changelogs/AutoChangeLog-pr-8755.yml new file mode 100644 index 0000000000..a1c4742802 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8755.yml @@ -0,0 +1,6 @@ +author: "Poojawa" +delete-after: True +changes: + - tweak: "tweaked the Genital character creation layout to look better" + - bugfix: "fixed having balls/womb when you don't have the linked organ at character creation" + - bugfix: "fixed being able to squeeze semen directly from your balls. Probably." diff --git a/html/changelogs/AutoChangeLog-pr-8756.yml b/html/changelogs/AutoChangeLog-pr-8756.yml new file mode 100644 index 0000000000..8d78c6d5e8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8756.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "HoS mains can now peacefully sleep in their office." diff --git a/html/changelogs/AutoChangeLog-pr-8760.yml b/html/changelogs/AutoChangeLog-pr-8760.yml new file mode 100644 index 0000000000..78812c5c05 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8760.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - balance: "rebalanced lingy dingy powery gamey" diff --git a/html/changelogs/AutoChangeLog-pr-8762.yml b/html/changelogs/AutoChangeLog-pr-8762.yml new file mode 100644 index 0000000000..e248589b1b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8762.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - imageadd: "new sprites for the flechette gun, its magazines and the toy ray gun" diff --git a/html/changelogs/AutoChangeLog-pr-8764.yml b/html/changelogs/AutoChangeLog-pr-8764.yml new file mode 100644 index 0000000000..ad5b82505a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8764.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "holster doing holster things" diff --git a/html/changelogs/AutoChangeLog-pr-8766.yml b/html/changelogs/AutoChangeLog-pr-8766.yml new file mode 100644 index 0000000000..33c2a47a71 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8766.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixes being able to teleport papers to your location with TK." diff --git a/html/changelogs/AutoChangeLog-pr-8767.yml b/html/changelogs/AutoChangeLog-pr-8767.yml new file mode 100644 index 0000000000..ce01bf471b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8767.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Fixed some monkey-code shenanigeans making items sometimes disappear from pickpocketing." diff --git a/html/changelogs/AutoChangeLog-pr-8779.yml b/html/changelogs/AutoChangeLog-pr-8779.yml new file mode 100644 index 0000000000..b5e90f7ecb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8779.yml @@ -0,0 +1,4 @@ +author: "Sishen1542" +delete-after: True +changes: + - balance: "Roundstart carbon jetpacks now have full_speed FALSE." diff --git a/html/changelogs/AutoChangeLog-pr-8784.yml b/html/changelogs/AutoChangeLog-pr-8784.yml new file mode 100644 index 0000000000..7d6d9d4739 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8784.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - rscadd: "Donor item" diff --git a/icons/emoji.dmi b/icons/emoji.dmi index f0286dd33c..128a3b243c 100644 Binary files a/icons/emoji.dmi and b/icons/emoji.dmi differ diff --git a/icons/misc/minesweeper_tiles/eight.png b/icons/misc/minesweeper_tiles/eight.png new file mode 100644 index 0000000000..3a5c4179ef Binary files /dev/null and b/icons/misc/minesweeper_tiles/eight.png differ diff --git a/icons/misc/minesweeper_tiles/empty.png b/icons/misc/minesweeper_tiles/empty.png new file mode 100644 index 0000000000..8a4fb536bb Binary files /dev/null and b/icons/misc/minesweeper_tiles/empty.png differ diff --git a/icons/misc/minesweeper_tiles/five.png b/icons/misc/minesweeper_tiles/five.png new file mode 100644 index 0000000000..dacf837f9b Binary files /dev/null and b/icons/misc/minesweeper_tiles/five.png differ diff --git a/icons/misc/minesweeper_tiles/flag.png b/icons/misc/minesweeper_tiles/flag.png new file mode 100644 index 0000000000..e71d8685ed Binary files /dev/null and b/icons/misc/minesweeper_tiles/flag.png differ diff --git a/icons/misc/minesweeper_tiles/four.png b/icons/misc/minesweeper_tiles/four.png new file mode 100644 index 0000000000..17a2bdfeb4 Binary files /dev/null and b/icons/misc/minesweeper_tiles/four.png differ diff --git a/icons/misc/minesweeper_tiles/hidden.png b/icons/misc/minesweeper_tiles/hidden.png new file mode 100644 index 0000000000..8d34a2a7f3 Binary files /dev/null and b/icons/misc/minesweeper_tiles/hidden.png differ diff --git a/icons/misc/minesweeper_tiles/mine.png b/icons/misc/minesweeper_tiles/mine.png new file mode 100644 index 0000000000..e16c89c2a8 Binary files /dev/null and b/icons/misc/minesweeper_tiles/mine.png differ diff --git a/icons/misc/minesweeper_tiles/minehit.png b/icons/misc/minesweeper_tiles/minehit.png new file mode 100644 index 0000000000..f0c9699d97 Binary files /dev/null and b/icons/misc/minesweeper_tiles/minehit.png differ diff --git a/icons/misc/minesweeper_tiles/one.png b/icons/misc/minesweeper_tiles/one.png new file mode 100644 index 0000000000..a84e6010a3 Binary files /dev/null and b/icons/misc/minesweeper_tiles/one.png differ diff --git a/icons/misc/minesweeper_tiles/seven.png b/icons/misc/minesweeper_tiles/seven.png new file mode 100644 index 0000000000..10d71c427e Binary files /dev/null and b/icons/misc/minesweeper_tiles/seven.png differ diff --git a/icons/misc/minesweeper_tiles/six.png b/icons/misc/minesweeper_tiles/six.png new file mode 100644 index 0000000000..fe2ba800f4 Binary files /dev/null and b/icons/misc/minesweeper_tiles/six.png differ diff --git a/icons/misc/minesweeper_tiles/three.png b/icons/misc/minesweeper_tiles/three.png new file mode 100644 index 0000000000..1c128d88ee Binary files /dev/null and b/icons/misc/minesweeper_tiles/three.png differ diff --git a/icons/misc/minesweeper_tiles/two.png b/icons/misc/minesweeper_tiles/two.png new file mode 100644 index 0000000000..ff74af5c82 Binary files /dev/null and b/icons/misc/minesweeper_tiles/two.png differ diff --git a/icons/mob/AI.dmi b/icons/mob/AI.dmi index dac88d62fc..7de8152118 100644 Binary files a/icons/mob/AI.dmi and b/icons/mob/AI.dmi differ diff --git a/icons/mob/actions.dmi b/icons/mob/actions.dmi index 0ef4996b07..65b5733ffe 100644 Binary files a/icons/mob/actions.dmi and b/icons/mob/actions.dmi differ diff --git a/icons/mob/actions/actions_items.dmi b/icons/mob/actions/actions_items.dmi index ca380a5376..39e2ea0584 100644 Binary files a/icons/mob/actions/actions_items.dmi and b/icons/mob/actions/actions_items.dmi differ diff --git a/icons/mob/actions/actions_spells.dmi b/icons/mob/actions/actions_spells.dmi index dd8a6fb869..30927d3608 100644 Binary files a/icons/mob/actions/actions_spells.dmi and b/icons/mob/actions/actions_spells.dmi differ diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index 6099a3f037..e3c80708c3 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/custom_w.dmi b/icons/mob/custom_w.dmi index dcb36e7b47..d974d0ca6c 100644 Binary files a/icons/mob/custom_w.dmi and b/icons/mob/custom_w.dmi differ diff --git a/icons/mob/hands.dmi b/icons/mob/hands.dmi index c41cdf06d0..b69c6c88b1 100644 Binary files a/icons/mob/hands.dmi and b/icons/mob/hands.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index b479fa0764..9540599364 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/human_parts_greyscale.dmi b/icons/mob/human_parts_greyscale.dmi index f49a27fda4..3bb3874d35 100644 Binary files a/icons/mob/human_parts_greyscale.dmi and b/icons/mob/human_parts_greyscale.dmi differ diff --git a/icons/mob/inhands/weapons/hammers_lefthand.dmi b/icons/mob/inhands/weapons/hammers_lefthand.dmi index acdb551174..0ea340f1f3 100644 Binary files a/icons/mob/inhands/weapons/hammers_lefthand.dmi and b/icons/mob/inhands/weapons/hammers_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons/hammers_righthand.dmi b/icons/mob/inhands/weapons/hammers_righthand.dmi index b20dce8d0a..dbe34513ea 100644 Binary files a/icons/mob/inhands/weapons/hammers_righthand.dmi and b/icons/mob/inhands/weapons/hammers_righthand.dmi differ diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi index fbfa039451..5f0b665ff4 100644 Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ diff --git a/icons/mob/neck.dmi b/icons/mob/neck.dmi index 3c126daba6..3463065bc7 100644 Binary files a/icons/mob/neck.dmi and b/icons/mob/neck.dmi differ diff --git a/icons/mob/pets.dmi b/icons/mob/pets.dmi index 45b0ab1f04..fe0146ccc4 100644 Binary files a/icons/mob/pets.dmi and b/icons/mob/pets.dmi differ diff --git a/icons/mob/radial.dmi b/icons/mob/radial.dmi index ba3179a421..cfdd0e549a 100644 Binary files a/icons/mob/radial.dmi and b/icons/mob/radial.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 0f3438dfc4..42c32f134a 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/underwear.dmi b/icons/mob/underwear.dmi index 76a200a3cf..5e6725cec7 100644 Binary files a/icons/mob/underwear.dmi and b/icons/mob/underwear.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 2ed1783941..3d281606de 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clockwork_objects.dmi b/icons/obj/clockwork_objects.dmi index 56cfdf468b..1948bb605c 100644 Binary files a/icons/obj/clockwork_objects.dmi and b/icons/obj/clockwork_objects.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index dc5dde9cb6..3e56574fbf 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ diff --git a/icons/obj/clothing/gloves.dmi b/icons/obj/clothing/gloves.dmi index 619db9290d..7e0d03abd5 100644 Binary files a/icons/obj/clothing/gloves.dmi and b/icons/obj/clothing/gloves.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 2cb473fb00..568adb69b3 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index 84155bfe43..3e3a1cefcb 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/icons/obj/custom.dmi b/icons/obj/custom.dmi index 9faaf8f81a..eb4f5813c8 100644 Binary files a/icons/obj/custom.dmi and b/icons/obj/custom.dmi differ diff --git a/icons/obj/dart.dmi b/icons/obj/dart.dmi new file mode 100644 index 0000000000..50ba4fc1ab Binary files /dev/null and b/icons/obj/dart.dmi differ diff --git a/icons/obj/flora/pinetrees.dmi b/icons/obj/flora/pinetrees.dmi index a68e0388b0..3ee4a89f07 100644 Binary files a/icons/obj/flora/pinetrees.dmi and b/icons/obj/flora/pinetrees.dmi differ diff --git a/icons/obj/food/piecake.dmi b/icons/obj/food/piecake.dmi index 16bb9bf448..57dda21757 100644 Binary files a/icons/obj/food/piecake.dmi and b/icons/obj/food/piecake.dmi differ diff --git a/icons/obj/food/snowcones.dmi b/icons/obj/food/snowcones.dmi new file mode 100644 index 0000000000..bdaa89fdf7 Binary files /dev/null and b/icons/obj/food/snowcones.dmi differ diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index e4a39903b3..7d44d35f55 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index fbb55434d1..140f6a4d9e 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ diff --git a/icons/obj/pda.dmi b/icons/obj/pda.dmi index 241bb46b98..1957fb1666 100644 Binary files a/icons/obj/pda.dmi and b/icons/obj/pda.dmi differ diff --git a/icons/obj/pda_alt.dmi b/icons/obj/pda_alt.dmi new file mode 100644 index 0000000000..4f03d2c574 Binary files /dev/null and b/icons/obj/pda_alt.dmi differ diff --git a/icons/obj/pda_modern.dmi b/icons/obj/pda_modern.dmi new file mode 100644 index 0000000000..26c3b9ce16 Binary files /dev/null and b/icons/obj/pda_modern.dmi differ diff --git a/icons/obj/pda_rugged.dmi b/icons/obj/pda_rugged.dmi new file mode 100644 index 0000000000..84c8ffd1f9 Binary files /dev/null and b/icons/obj/pda_rugged.dmi differ diff --git a/icons/obj/plushes.dmi b/icons/obj/plushes.dmi index 68c51bb4c8..586bca61aa 100644 Binary files a/icons/obj/plushes.dmi and b/icons/obj/plushes.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index d276655ae8..bff1b631c3 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 1a1e5f617b..9037bfc0d0 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/obj/syringe.dmi b/icons/obj/syringe.dmi index f77735fc3e..80e681399a 100644 Binary files a/icons/obj/syringe.dmi and b/icons/obj/syringe.dmi differ diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index 8f6b844a23..cfb36bb3ae 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ diff --git a/icons/obj/vehicles.dmi b/icons/obj/vehicles.dmi index 5e3757cedd..67079de3e2 100644 Binary files a/icons/obj/vehicles.dmi and b/icons/obj/vehicles.dmi differ diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi index e5d474f01d..553336115b 100644 Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ diff --git a/modular_citadel/code/datums/mood_events/generic_positive_events.dm b/modular_citadel/code/datums/mood_events/generic_positive_events.dm index 717fe5a47d..7b989d7700 100644 --- a/modular_citadel/code/datums/mood_events/generic_positive_events.dm +++ b/modular_citadel/code/datums/mood_events/generic_positive_events.dm @@ -24,11 +24,11 @@ description = "I came!\n" //funny meme haha mood_change = 3 timeout = 1000 - + /datum/mood_event/fedpred description = "I've devoured someone!\n" mood_change = 3 /datum/mood_event/fedprey description = "It feels quite cozy in here.\n" - mood_change = 3 \ No newline at end of file + mood_change = 3 diff --git a/modular_citadel/code/datums/mood_events/moodular.dm b/modular_citadel/code/datums/mood_events/moodular.dm index b764c0027e..b53ce417e8 100644 --- a/modular_citadel/code/datums/mood_events/moodular.dm +++ b/modular_citadel/code/datums/mood_events/moodular.dm @@ -7,12 +7,7 @@ if(mood) mood.add_event("hugbox", /datum/mood_event/hugbox) -// headpats (IMPORTANT) -/mob/living/carbon/help_shake_act(mob/living/carbon/M) - . = ..() - GET_COMPONENT_FROM(mood, /datum/component/mood, src) - if(mood) - mood.add_event("headpat", /datum/mood_event/headpat) +//Removed headpats here, duplicate code? // plush petting /obj/item/toy/plush/attack_self(mob/user) diff --git a/modular_citadel/code/datums/uplink_items_cit.dm b/modular_citadel/code/datums/uplink_items_cit.dm deleted file mode 100644 index 16130de96d..0000000000 --- a/modular_citadel/code/datums/uplink_items_cit.dm +++ /dev/null @@ -1,177 +0,0 @@ -/*/datum/uplink_item/stealthy_tools/syndi_borer - name = "Syndicate Brain Slug" - desc = "A small cortical borer, modified to be completely loyal to the owner. \ - Genetically infertile, these brain slugs can assist medically in a support role, or take direct action \ - to assist their host." - item = /obj/item/antag_spawner/syndi_borer - refundable = TRUE - cost = 10 - surplus = 20 //Let's not have this be too common - exclude_modes = list(/datum/game_mode/nuclear) */ - -/datum/uplink_item/stealthy_tools/holoparasite - name="Holoparasite Injector" - desc="An injector containing a swarm of holographic parasites. \ - They mimic the function of the guardians employed by the Space Wizard Federation, and their form can be selected upon application \ - NOTE: The precise nature of the symbiosis required by the parasites renders them incompatible with changelings" //updated to actually describe what they do and warn traitorchans not to buy it - item = /obj/item/storage/box/syndie_kit/holoparasite - refundable = TRUE - cant_discount = TRUE - cost = 15 - surplus = 20 //Nobody needs a ton of parasites - exclude_modes = list(/datum/game_mode/nuclear) - refund_path = /obj/item/guardiancreator/tech/choose/traitor - - -/obj/item/storage/box/syndie_kit/holoparasite - name = "box" - -/obj/item/storage/box/syndie_kit/holoparasite/PopulateContents() - new /obj/item/guardiancreator/tech/choose/traitor(src) - new /obj/item/paper/guides/antag/guardian(src) - -/datum/uplink_item/dangerous/antitank - name = "Anti Tank Pistol" - desc = "Essentially amounting to a sniper rifle with no stock and barrel (or indeed, any rifling at all), \ - this extremely dubious pistol is guaranteed to dislocate your wrists and hit the broad side of a barn! \ - Uses sniper ammo. \ - Bullets tend to veer off-course. We are not responsible for any unintentional damage or injury resulting from inaacuracy." - item = /obj/item/gun/ballistic/automatic/pistol/antitank/syndicate - cost = 14 - surplus = 25 - include_modes = list(/datum/game_mode/nuclear) - -/* Commented out due to introduction of reskinnable stetchkins. May still have a niche if people decide it somehow has value. -/datum/uplink_item/dangerous/stealthpistol - name = "Stealth Pistol" - desc = "A compact, easily concealable bullpup pistol that fires 10mm auto rounds in 8 round magazines. \ - Has an integrated suppressor." - item = /obj/item/gun/ballistic/automatic/pistol/stealth - cost = 10 - surplus = 30 -*/ - -///Soporific 10mm mags/// - -/datum/uplink_item/ammo/pistolzzz - name = "10mm Soporific Magazine" - desc = "An additional 8-round 10mm magazine; compatible with the Stechkin Pistol. Loaded with soporific rounds that put the target to sleep. \ - NOTE: Soporific is not instant acting due to the constraints of the round's scale. Will usually require three shots to take effect." - item = /obj/item/ammo_box/magazine/m10mm/soporific - cost = 2 - -///flechette memes/// - -/datum/uplink_item/dangerous/flechettegun - name = "Flechette Launcher" - desc = "A compact bullpup that fires micro-flechettes.\ - Flechettes have very poor performance idividually, but can be very deadly in numbers. \ - Pre-loaded with armor piercing flechettes that are capable of puncturing most kinds of armor." - item = /obj/item/gun/ballistic/automatic/flechette - cost = 12 - surplus = 30 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/ammo/flechetteap - name = "Armor Piercing Flechette Magazine" - desc = "An additional 40-round flechette magazine; compatible with the Flechette Launcer. \ - Loaded with armor piercing flechettes that very nearly ignore armor, but are not very effective agaisnt flesh." - item = /obj/item/ammo_box/magazine/flechette - cost = 2 - include_modes = list(/datum/game_mode/nuclear) - -/datum/uplink_item/ammo/flechettes - name = "Serrated Flechette Magazine" - desc = "An additional 40-round flechette magazine; compatible with the Flechette Launcer. \ - Loaded with serrated flechettes that shreds flesh, but is stopped dead in its tracks by armor. \ - These flechettes are highly likely to sever arteries, and even limbs." - item = /obj/item/ammo_box/magazine/flechette/s - cost = 2 - include_modes = list(/datum/game_mode/nuclear) - -///shredder/// - -/datum/uplink_item/nukeoffer/shredder - name = "Shredder bundle" - desc = "A truly horrific weapon designed simply to maim its victim, the CX Shredder is banned by several intergalactic treaties. \ - You'll get two of them with this. And spare ammo to boot. And we'll throw in an extra elite hardsuit and chest rig to hold them all!" - item = /obj/item/storage/backpack/duffelbag/syndie/shredderbundle - cost = 30 // normally 41 - -///Modular Pistols/// - -/datum/uplink_item/bundle/modular - name="Modular Pistol Kit" - desc="A heavy briefcase containing one modular pistol (chambered in 10mm), one supressor, and spare ammunition, including a box of soporific ammo. \ - Includes a suit jacket that is padded with a robust liner." - item = /obj/item/storage/briefcase/modularbundle - cost = 12 - -//////Bundle stuff////// - -///bundle category/// - -/datum/uplink_item/bundle - category = "Bundles" - surplus = 0 - cant_discount = TRUE - -///place bundle storage items here I guess/// - -/obj/item/storage/briefcase/modularbundle - name = "briefcase" - desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding." - icon_state = "briefcase" - flags_1 = CONDUCT_1 - force = 10 - hitsound = "swing_hit" - throw_speed = 2 - throw_range = 4 - w_class = WEIGHT_CLASS_BULKY - attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - resistance_flags = FLAMMABLE - max_integrity = 150 - -/obj/item/storage/briefcase/modularbundle/PopulateContents() - new /obj/item/gun/ballistic/automatic/pistol/modular(src) - new /obj/item/suppressor(src) - new /obj/item/ammo_box/magazine/m10mm(src) - new /obj/item/ammo_box/magazine/m10mm/soporific(src) - new /obj/item/ammo_box/c10mm/soporific(src) - new /obj/item/clothing/under/lawyer/blacksuit(src) - new /obj/item/clothing/accessory/waistcoat(src) - new /obj/item/clothing/suit/toggle/lawyer/black/syndie(src) - -/obj/item/clothing/suit/toggle/lawyer/black/syndie - desc = "A snappy dress jacket. Suspiciously has no tags or branding." - armor = list(melee = 10, bullet = 10, laser = 10, energy = 10, bomb = 10) - -/obj/item/storage/backpack/duffelbag/syndie/shredderbundle - desc = "A large duffel bag containing two CX Shredders, some magazines, an elite hardsuit, and a chest rig." - -/obj/item/storage/backpack/duffelbag/syndie/shredderbundle/PopulateContents() - new /obj/item/ammo_box/magazine/flechette/shredder(src) - new /obj/item/ammo_box/magazine/flechette/shredder(src) - new /obj/item/ammo_box/magazine/flechette/shredder(src) - new /obj/item/ammo_box/magazine/flechette/shredder(src) - new /obj/item/gun/ballistic/automatic/flechette/shredder(src) - new /obj/item/gun/ballistic/automatic/flechette/shredder(src) - new /obj/item/storage/belt/military(src) - new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src) - -///End of Bundle stuff/// - - -/*///////////////////////////////////////////////////////////////////////// -///////////// The TRUE Energy Sword /////////////////////////// -*////////////////////////////////////////////////////////////////////////// - -/datum/uplink_item/dangerous/cxneb - name = "Dragon's Tooth Non-Eutactic Blade" - desc = "An illegal modification of a weapon that is functionally identical to the energy sword, \ - the Non-Eutactic Blade (NEB) forges a hardlight blade on-demand, \ - generating an extremely sharp, unbreakable edge that is guaranteed to satisfy your every need. \ - This particular model has a polychromic hardlight generator, allowing you to murder in style! \ - The illegal modifications bring this weapon up to par with the classic energy sword, and also gives it the energy sword's distinctive sounds." - item = /obj/item/melee/transforming/energy/sword/cx/traitor - cost = 8 \ No newline at end of file diff --git a/modular_citadel/code/game/gamemodes/gangs/gang_items.dm b/modular_citadel/code/game/gamemodes/gangs/gang_items.dm index 0f16b6462b..2e9ca4dcc0 100644 --- a/modular_citadel/code/game/gamemodes/gangs/gang_items.dm +++ b/modular_citadel/code/game/gamemodes/gangs/gang_items.dm @@ -83,14 +83,12 @@ return return TRUE - /datum/gang_item/clothing/hat name = "Pimp Hat" id = "hat" cost = 16 item_path = /obj/item/clothing/head/collectable/petehat/gang - /obj/item/clothing/head/collectable/petehat/gang name = "pimpin' hat" desc = "The undisputed king of style." @@ -109,7 +107,7 @@ /datum/gang_item/clothing/shoes name = "Bling Boots" id = "boots" - cost = 22 + cost = 20 item_path = /obj/item/clothing/shoes/gang /obj/item/clothing/shoes/gang @@ -258,7 +256,6 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m /datum/gang_item/equipment category = "Purchase Equipment:" - /datum/gang_item/equipment/spraycan name = "Territory Spraycan" id = "spraycan" @@ -275,7 +272,6 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m cost = 3 item_path = /obj/item/sharpener - /datum/gang_item/equipment/emp name = "EMP Grenade" id = "EMP" @@ -329,6 +325,12 @@ datum/gang_item/equipment/shield cost = 25 item_path = /obj/item/shield/riot +datum/gang_item/equipment/gangsheild + name = "Tower Shield" + id = "metal" + cost = 45 //High block of melee and even higher for bullets + item_path = /obj/item/shield/riot/tower + /datum/gang_item/equipment/pen name = "Recruitment Pen" id = "pen" @@ -352,7 +354,6 @@ datum/gang_item/equipment/shield return "(GET ONE FREE)" return ..() - /datum/gang_item/equipment/gangtool id = "gangtool" cost = 5 @@ -413,4 +414,4 @@ datum/gang_item/equipment/shield /datum/gang_item/equipment/dominator/spawn_item(mob/living/carbon/user, datum/team/gang/gang, obj/item/device/gangtool/gangtool) new item_path(user.loc) - to_chat(user, spawn_msg) \ No newline at end of file + to_chat(user, spawn_msg) diff --git a/modular_citadel/code/game/gamemodes/gangs/gang_pen.dm b/modular_citadel/code/game/gamemodes/gangs/gang_pen.dm index 3dfdf4dd9b..0851f3b596 100644 --- a/modular_citadel/code/game/gamemodes/gangs/gang_pen.dm +++ b/modular_citadel/code/game/gamemodes/gangs/gang_pen.dm @@ -49,7 +49,7 @@ return to_chat(user, "This mind is already controlled by someone else!") return - if(check && gangster_mind.current.has_trait(TRAIT_MINDSHIELD)) //Check to see if the potential gangster is implanted + if(check && HAS_TRAIT(gangster_mind.current, TRAIT_MINDSHIELD)) //Check to see if the potential gangster is implanted to_chat(user, "This mind is too strong to control!") return var/mob/living/carbon/human/H = gangster_mind.current // we are sure the dude's human cause it's checked in attack() diff --git a/modular_citadel/code/game/objects/items/devices/PDA/PDA.dm b/modular_citadel/code/game/objects/items/devices/PDA/PDA.dm deleted file mode 100644 index d26cf28778..0000000000 --- a/modular_citadel/code/game/objects/items/devices/PDA/PDA.dm +++ /dev/null @@ -1,4 +0,0 @@ -//Overrides TG's PDA sprites with Cit's PDA sprites. Remind me to turn this into a pref somewhere down the line. - -/obj/item/pda - icon = 'modular_citadel/icons/obj/pda.dmi' diff --git a/modular_citadel/code/game/objects/items/devices/flashlight.dm b/modular_citadel/code/game/objects/items/devices/flashlight.dm deleted file mode 100644 index 3a373c9277..0000000000 --- a/modular_citadel/code/game/objects/items/devices/flashlight.dm +++ /dev/null @@ -1,31 +0,0 @@ -/obj/item/flashlight - light_color = "#FFCC66" - flashlight_power = 0.8 - -/obj/item/flashlight/pen - light_color = "#FFDDCC" - flashlight_power = 0.3 - -/obj/item/flashlight/seclite - light_color = "#CDDDFF" - flashlight_power = 0.9 - -/obj/item/flashlight/lamp - light_color = "#FFDDBB" - flashlight_power = 0.8 - -/obj/item/flashlight/flare - light_color = "#FA421A" - flashlight_power = 0.8 - -/obj/item/flashlight/flare/torch - light_color = "#FAA44B" - flashlight_power = 0.8 - -/obj/item/flashlight/lantern - light_color = "#FFAA44" - flashlight_power = 0.75 - -/obj/item/flashlight/slime - light_color = "#FFEEAA" - flashlight_power = 0.6 diff --git a/modular_citadel/code/game/objects/items/holy_weapons.dm b/modular_citadel/code/game/objects/items/holy_weapons.dm index 204a27f3fa..3ecc6cc31b 100644 --- a/modular_citadel/code/game/objects/items/holy_weapons.dm +++ b/modular_citadel/code/game/objects/items/holy_weapons.dm @@ -11,8 +11,8 @@ /obj/item/nullrod/rosary/Initialize() .=..() - if(SSreligion.religion) - deity_name = SSreligion.deity + if(GLOB.religion) + deity_name = GLOB.deity /obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!istype(M)) diff --git a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm index e6ba224f8d..ce6aada0fc 100644 --- a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm +++ b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm @@ -367,7 +367,7 @@ unwield() return ..() - if(user.has_trait(TRAIT_CLUMSY) && (wielded) && prob(40)) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40)) impale(user) return diff --git a/modular_citadel/code/game/objects/items/melee/misc.dm b/modular_citadel/code/game/objects/items/melee/misc.dm index 82ede048a8..6a53adcc1f 100644 --- a/modular_citadel/code/game/objects/items/melee/misc.dm +++ b/modular_citadel/code/game/objects/items/melee/misc.dm @@ -16,7 +16,7 @@ return //CIT CHANGE - ditto add_fingerprint(user) - if((user.has_trait(TRAIT_CLUMSY)) && prob(50)) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) to_chat(user, "You club yourself over the head.") user.Knockdown(60 * force) if(ishuman(user)) diff --git a/modular_citadel/code/modules/arousal/arousal.dm b/modular_citadel/code/modules/arousal/arousal.dm index 846a8cff62..27f7576e7f 100644 --- a/modular_citadel/code/modules/arousal/arousal.dm +++ b/modular_citadel/code/modules/arousal/arousal.dm @@ -14,6 +14,10 @@ var/saved_underwear = ""//saves their underwear so it can be toggled later var/saved_undershirt = "" + var/saved_socks = "" + var/hidden_underwear = FALSE + var/hidden_undershirt = FALSE + var/hidden_socks = FALSE /mob/living/carbon/human/New() ..() @@ -29,6 +33,33 @@ var/list/femcum_fluids = list("femcum") //Mob procs +/mob/living/carbon/human/proc/underwear_toggle() + set name = "Toggle undergarments" + set category = "Object" + if(ishuman(src)) + var/mob/living/carbon/human/humz = src + var/confirm = input(src, "Select what part of your form to alter", "Undergarment Toggling", "Cancel") in list("Top", "Bottom", "Socks", "All", "Cancel") + if(confirm == "Top") + humz.hidden_undershirt = !humz.hidden_undershirt + + if(confirm == "Bottom") + humz.hidden_underwear = !humz.hidden_underwear + + if(confirm == "Socks") + humz.hidden_socks = !humz.hidden_socks + + if(confirm == "All") + humz.hidden_undershirt = !humz.hidden_undershirt + humz.hidden_underwear = !humz.hidden_underwear + humz.hidden_socks = !humz.hidden_socks + + if(confirm == "Cancel") + return + src.update_body() + + else + to_chat(src, "Humans only. How the fuck did you get this verb anyway.") + /mob/living/proc/handle_arousal() diff --git a/modular_citadel/code/modules/arousal/organs/genitals.dm b/modular_citadel/code/modules/arousal/organs/genitals.dm index cbf14e420a..63d6834409 100644 --- a/modular_citadel/code/modules/arousal/organs/genitals.dm +++ b/modular_citadel/code/modules/arousal/organs/genitals.dm @@ -73,7 +73,7 @@ owner.exposed_genitals += src if("Hidden by clothes") through_clothes = FALSE - hidden = FALSE + hidden = TRUE if(src in owner.exposed_genitals) owner.exposed_genitals -= src if("Always hidden") @@ -286,7 +286,7 @@ return if(NOGENITALS in species_traits)//golems and such return - if(H.has_trait(TRAIT_HUSK)) + if(HAS_TRAIT(H, TRAIT_HUSK)) return var/list/genitals_to_add = list() @@ -303,6 +303,8 @@ for(var/obj/item/organ/O in H.internal_organs) if(isgenital(O)) var/obj/item/organ/genital/G = O + if(G.hidden) + return //we're gunna just hijack this for updates. if(G.is_exposed()) //Checks appropriate clothing slot and if it's through_clothes genitals_to_add += H.getorganslot(G.slot) //Now we added all genitals that aren't internal and should be rendered diff --git a/modular_citadel/code/modules/arousal/organs/testicles.dm b/modular_citadel/code/modules/arousal/organs/testicles.dm index 0cf698392c..1e6b4d62d4 100644 --- a/modular_citadel/code/modules/arousal/organs/testicles.dm +++ b/modular_citadel/code/modules/arousal/organs/testicles.dm @@ -11,7 +11,7 @@ var/sack_size = BALLS_SACK_SIZE_DEF fluid_id = "semen" producing = TRUE - can_masturbate_with = TRUE + can_masturbate_with = FALSE masturbation_verb = "massage" can_climax = TRUE var/sent_full_message = TRUE //defaults to 1 since they're full to start @@ -45,6 +45,7 @@ linked_organ = (owner.getorganslot("penis")) if(linked_organ) linked_organ.linked_organ = src + size = linked_organ.size else if(linked_organ) @@ -57,20 +58,22 @@ return TRUE /obj/item/organ/genital/testicles/update_appearance() - if(owner) - if(size == 0) - size_name = "nonexistant" - if(size == 1) + switch(size) + if(0.1 to 1) size_name = "average" - if(size == 2) + if(1.1 to 2) size_name = "enlarged" - if(size >= 3) + if(2.1 to INFINITY) size_name = "engorged" - - if(!internal) - desc = "You see an [size_name] pair of testicles dangling." else - desc = "They don't have any testicles you can see." + size_name = "nonexistant" + + if(!internal) + desc = "You see an [size_name] pair of testicles." + else + desc = "They don't have any testicles you can see." + + if(owner) var/string if(owner.dna.species.use_skintones && owner.dna.features["genitals_use_skintone"]) if(ishuman(owner)) // Check before recasting type, although someone fucked up if you're not human AND have use_skintones somehow... diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm index 70f58b3159..ab03e83b44 100644 --- a/modular_citadel/code/modules/client/loadout/__donator.dm +++ b/modular_citadel/code/modules/client/loadout/__donator.dm @@ -385,4 +385,46 @@ datum/gear/darksabresheath name = "Black, Red, and Gold Coat" category = SLOT_WEAR_SUIT path = /obj/item/clothing/suit/blackredgold - ckeywhitelist = list("ttbnc") \ No newline at end of file + ckeywhitelist = list("ttbnc") + +/datum/gear/fritzplush + name = "Fritz Plushie" + category = SLOT_IN_BACKPACK + path = /obj/item/toy/plush/mammal/dog/fritz + ckeywhitelist = list("analwerewolf") + +/datum/gear/kimono + name = "Kimono" + category = SLOT_WEAR_SUIT + path = /obj/item/clothing/suit/kimono + ckeywhitelist = list("sfox63") + +/datum/gear/commjacket + name = "Dusty Commisar's Cloak" + category = SLOT_WEAR_SUIT + path = /obj/item/clothing/suit/commjacket + ckeywhitelist = list("sadisticbatter") + +/datum/gear/mw2_russian_para + name = "Russian Paratrooper Jumper" + category = SLOT_WEAR_SUIT + path = /obj/item/clothing/suit/mw2_russian_para + ckeywhitelist = list("investigator77") + +/datum/gear/longblackgloves + name = "Luna's Gauntlets" + category = SLOT_GLOVES + path = /obj/item/clothing/gloves/longblackgloves + ckeywhitelist = list("bigmanclancy") + +/datum/gear/trendy_fit + name = "Trendy Fit" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/trendy_fit + ckeywhitelist = list("midgetdragon") + +/datum/gear/csheet + name = "NT Bedsheet" + category = SLOT_NECK + path = /obj/item/bedsheet/captain + ckeywhitelist = list("tikibomb") \ No newline at end of file diff --git a/modular_citadel/code/modules/client/loadout/_medical.dm b/modular_citadel/code/modules/client/loadout/_medical.dm index a0d0e3f2b2..eed1ad32a1 100644 --- a/modular_citadel/code/modules/client/loadout/_medical.dm +++ b/modular_citadel/code/modules/client/loadout/_medical.dm @@ -1,5 +1,32 @@ +/datum/gear/stethoscope + name = "Medical Briefcase" + category = SLOT_HANDS + path = /obj/item/storage/briefcase/medical + restricted_roles = list("Medical Doctor", "Chief Medical Officer") + /datum/gear/stethoscope name = "Stethoscope" category = SLOT_NECK path = /obj/item/clothing/neck/stethoscope restricted_roles = list("Medical Doctor", "Chief Medical Officer") + +/datum/gear/bluescrubs + name = "Blue Scrubs" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/rank/medical/blue + restricted_roles = list("Medical Doctor", "Chief Medical Officer", "Geneticist", "Chemist", "Virologist") + restricted_desc = "Medical" + +/datum/gear/greenscrubs + name = "Green Scrubs" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/rank/medical/green + restricted_roles = list("Medical Doctor", "Chief Medical Officer", "Geneticist", "Chemist", "Virologist") + restricted_desc = "Medical" + +/datum/gear/purplescrubs + name = "Purple Scrubs" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/rank/medical/purple + restricted_roles = list("Medical Doctor", "Chief Medical Officer", "Geneticist", "Chemist", "Virologist") + restricted_desc = "Medical" diff --git a/modular_citadel/code/modules/client/loadout/_service.dm b/modular_citadel/code/modules/client/loadout/_service.dm index 9b508bb93f..062e22f966 100644 --- a/modular_citadel/code/modules/client/loadout/_service.dm +++ b/modular_citadel/code/modules/client/loadout/_service.dm @@ -1,3 +1,9 @@ +/datum/gear/greytidestationwide + name = "Grey jumpsuit" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/color/grey + restricted_roles = list("Assistant") + /datum/gear/plushvar name = "Ratvar Plushie" category = SLOT_IN_BACKPACK diff --git a/modular_citadel/code/modules/client/loadout/head.dm b/modular_citadel/code/modules/client/loadout/head.dm index bd26f44482..2d65f093bb 100644 --- a/modular_citadel/code/modules/client/loadout/head.dm +++ b/modular_citadel/code/modules/client/loadout/head.dm @@ -54,6 +54,11 @@ path = /obj/item/clothing/head/flakhelm cost = 2 +/datum/gear/bunnyears + name = "Bunny Ears" + category = SLOT_HEAD + path = /obj/item/clothing/head/rabbitears + //trek fancy Hats! /datum/gear/trekcap name = "Federation Officer's Cap (White)" diff --git a/modular_citadel/code/modules/client/loadout/uniform.dm b/modular_citadel/code/modules/client/loadout/uniform.dm index 81e17e95d3..abdf8e3a24 100644 --- a/modular_citadel/code/modules/client/loadout/uniform.dm +++ b/modular_citadel/code/modules/client/loadout/uniform.dm @@ -73,6 +73,31 @@ category = SLOT_W_UNIFORM path = /obj/item/clothing/under/skirt/purple +/datum/gear/schoolgirlblue + name = "Blue Schoolgirl Uniform" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/schoolgirl + +/datum/gear/schoolgirlred + name = "Red Schoolgirl Uniform" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/schoolgirl/red + +/datum/gear/schoolgirlgreen + name = "Green Schoolgirl Uniform" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/schoolgirl/green + +/datum/gear/schoolgirlorange + name = "Orange Schoolgirl Uniform" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/schoolgirl/orange + +/datum/gear/stripeddress + name = "Striped Dress" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/stripeddress + /datum/gear/kilt name = "Kilt" category = SLOT_W_UNIFORM @@ -283,3 +308,9 @@ path = /obj/item/clothing/under/rank/trek/engsec/ent restricted_desc = "Engineering and Security" restricted_roles = list("Chief Engineer","Atmospheric Technician","Station Engineer","Warden","Detective","Security Officer","Head of Security","Cargo Technician", "Shaft Miner", "Quartermaster") + +//Memes +/datum/gear/gear_harnesses + name = "Gear Harness" + category = SLOT_W_UNIFORM + path = /obj/item/clothing/under/gear_harness \ No newline at end of file diff --git a/modular_citadel/code/modules/custom_loadout/custom_items.dm b/modular_citadel/code/modules/custom_loadout/custom_items.dm index e1b1110cf8..4fd628f9d3 100644 --- a/modular_citadel/code/modules/custom_loadout/custom_items.dm +++ b/modular_citadel/code/modules/custom_loadout/custom_items.dm @@ -417,7 +417,6 @@ icon_state = "flagcape" item_state = "flagcape" - /obj/item/clothing/shoes/lucky name = "Lucky Jackboots" icon = 'icons/obj/custom.dmi' @@ -484,4 +483,48 @@ icon_state = "redgoldjacket" item_state = "redgoldjacket" body_parts_covered = CHEST|GROIN|LEGS|ARMS + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/suit/kimono + name = "Blue Kimono" + desc = "A traditional kimono, this one is blue with purple flowers." + icon_state = "kimono" + item_state = "kimono" + icon = 'icons/obj/custom.dmi' + alternate_worn_icon = 'icons/mob/custom_w.dmi' + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/suit/commjacket + name = "Dusty Commisar's Cloak" + desc = "An Imperial Commisar's Coat, straight from the frontline of battle, filled with dirt, bulletholes, and dozens of little pockets. Alongside a curious golden eagle sitting on it's left breast, the marking '200th Venoland' is clearly visible on the inner workings of the coat. It certainly holds an imposing flair, however." + icon_state = "commjacket" + item_state = "commjacket" + icon = 'icons/obj/custom.dmi' + alternate_worn_icon = 'icons/mob/custom_w.dmi' + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/suit/mw2_russian_para + name = "Russian Paratrooper Jumper" + desc = "A Russian made old paratrooper jumpsuit, has many pockets for easy storage of gear from a by gone era. As bulky as it looks, its shockingly light!" + icon_state = "mw2_russian_para" + item_state = "mw2_russian_para" + icon = 'icons/obj/custom.dmi' + alternate_worn_icon = 'icons/mob/custom_w.dmi' + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/gloves/longblackgloves + name = "Luna's Gauntlets" + desc = "These gloves seem to have a coating of slime fluid on them, you should possibly return them to their rightful owner." + icon_state = "longblackgloves" + item_state = "longblackgloves" + icon = 'icons/obj/custom.dmi' + alternate_worn_icon = 'icons/mob/custom_w.dmi' + +/obj/item/clothing/under/trendy_fit + name = "Trendy Fitting Clothing" + desc = "An outfit straight from the boredom of space, its the type of thing only someone trying to entertain themselves on the way to their next destination would wear." + icon_state = "trendy_fit" + item_state = "trendy_fit" + icon = 'icons/obj/custom.dmi' + alternate_worn_icon = 'icons/mob/custom_w.dmi' mutantrace_variation = NO_MUTANTRACE_VARIATION \ No newline at end of file diff --git a/modular_citadel/code/modules/mob/cit_emotes.dm b/modular_citadel/code/modules/mob/cit_emotes.dm index a314baa852..aff1739ae4 100644 --- a/modular_citadel/code/modules/mob/cit_emotes.dm +++ b/modular_citadel/code/modules/mob/cit_emotes.dm @@ -183,6 +183,7 @@ key_third_person = "suddenly hits a dab" message = "suddenly hits a dab!" emote_type = EMOTE_AUDIBLE + restraint_check = TRUE diff --git a/modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm b/modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm index e552c2cbdd..bf811b777c 100644 --- a/modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm +++ b/modular_citadel/code/modules/mob/dead/new_player/sprite_accessories.dm @@ -191,6 +191,32 @@ icon = 'modular_citadel/icons/mob/mam_ears.dmi' color_src = MATRIXED +/datum/sprite_accessory/ears/human/bigwolf + name = "Big Wolf" + icon_state = "bigwolf" + icon = 'modular_citadel/icons/mob/mam_ears.dmi' + color_src = MATRIXED + +/datum/sprite_accessory/ears/human/bigwolfinner + name = "Big Wolf (ALT)" + icon_state = "bigwolfinner" + hasinner = 1 + icon = 'modular_citadel/icons/mob/mam_ears.dmi' + color_src = MATRIXED + +/datum/sprite_accessory/ears/human/bigwolfdark + name = "Dark Big Wolf" + icon_state = "bigwolfdark" + icon = 'modular_citadel/icons/mob/mam_ears.dmi' + color_src = MATRIXED + +/datum/sprite_accessory/ears/human/bigwolfinnerdark + name = "Dark Big Wolf (ALT)" + icon_state = "bigwolfinnerdark" + hasinner = 1 + icon = 'modular_citadel/icons/mob/mam_ears.dmi' + color_src = MATRIXED + /datum/sprite_accessory/ears/human/cow name = "Cow" icon_state = "cow" diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm index cd24bfc8a2..43931db689 100644 --- a/modular_citadel/code/modules/mob/living/carbon/carbon.dm +++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm @@ -34,7 +34,10 @@ for(var/obj/screen/combattoggle/selector in hud_used.static_inventory) selector.rebasetointerbay(src) if(world.time >= combatmessagecooldown && combatmode) - visible_message("[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].") + if(a_intent != INTENT_HELP) + visible_message("[src] [resting ? "tenses up" : (prob(95)? "drops into a combative stance" : (prob(95)? "poses aggressively" : "asserts dominance with their pose"))].") + else + visible_message("[src] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].") combatmessagecooldown = 10 SECONDS + world.time //This is set 100% of the time to make sure squeezing regen out of process cycles doesn't result in the combat mode message getting spammed SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode) return TRUE diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm index f0e5c35a8b..5e10e71433 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm @@ -1,390 +1,389 @@ -/* -DOG BORG EQUIPMENT HERE -SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! -*/ - -/obj/item/dogborg/jaws - name = "Dogborg jaws" - desc = "The jaws of the debug errors oh god." - icon = 'icons/mob/dogborg.dmi' - flags_1 = CONDUCT_1 - force = 1 - throwforce = 0 - w_class = 3 - hitsound = 'sound/weapons/bite.ogg' - sharpness = IS_SHARP - -/obj/item/dogborg/jaws/big - name = "combat jaws" - desc = "The jaws of the law. Very sharp." - icon_state = "jaws" - force = 12 - attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") - -/obj/item/dogborg/jaws/small - name = "puppy jaws" - desc = "Rubberized teeth designed to protect accidental harm. Sharp enough for specialized tasks however." - icon_state = "smalljaws" - force = 6 - attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") - var/status = 0 - -/obj/item/dogborg/jaws/attack(atom/A, mob/living/silicon/robot/user) - ..() - user.do_attack_animation(A, ATTACK_EFFECT_BITE) - log_combat(user, A, "bit") - -/obj/item/dogborg/jaws/small/attack_self(mob/user) - var/mob/living/silicon/robot.R = user - if(R.cell && R.cell.charge > 100) - if(R.emagged && status == 0) - name = "combat jaws" - icon_state = "jaws" - desc = "The jaws of the law." - force = 12 - attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") - status = 1 - to_chat(user, "Your jaws are now [status ? "Combat" : "Pup'd"].") - else - name = "puppy jaws" - icon_state = "smalljaws" - desc = "The jaws of a small dog." - force = 5 - attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") - status = 0 - if(R.emagged) - to_chat(user, "Your jaws are now [status ? "Combat" : "Pup'd"].") - update_icon() - -//Boop - -/obj/item/analyzer/nose - name = "boop module" - icon = 'icons/mob/dogborg.dmi' - icon_state = "nose" - desc = "The BOOP module" - flags_1 = CONDUCT_1 - force = 0 - throwforce = 0 - attack_verb = list("nuzzles", "pushes", "boops") - w_class = 1 - -/obj/item/analyzer/nose/attack_self(mob/user) - user.visible_message("[user] sniffs around the air.", "You sniff the air for gas traces.") - - var/turf/location = user.loc - if(!istype(location)) - return - - var/datum/gas_mixture/environment = location.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - - to_chat(user, "Results:") - if(abs(pressure - ONE_ATMOSPHERE) < 10) - to_chat(user, "Pressure: [round(pressure,0.1)] kPa") - else - to_chat(user, "Pressure: [round(pressure,0.1)] kPa") - if(total_moles) - var/list/env_gases = environment.gases - - environment.assert_gases(arglist(GLOB.hardcoded_gases)) - var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles - var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles - var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles - var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles - environment.garbage_collect() - - if(abs(n2_concentration - N2STANDARD) < 20) - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] %") - else - to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] %") - - if(abs(o2_concentration - O2STANDARD) < 2) - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] %") - else - to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] %") - - if(co2_concentration > 0.01) - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] %") - else - to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] %") - - if(plasma_concentration > 0.005) - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] %") - else - to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] %") - - - for(var/id in env_gases) - if(id in GLOB.hardcoded_gases) - continue - var/gas_concentration = env_gases[id][MOLES]/total_moles - to_chat(user, "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %") - to_chat(user, "Temperature: [round(environment.temperature-T0C)] °C") - -/obj/item/analyzer/nose/AltClick(mob/user) //Barometer output for measuring when the next storm happens - . = ..() - -/obj/item/analyzer/nose/afterattack(atom/target, mob/user, proximity) - . = ..() - if(!proximity) - return - do_attack_animation(target, null, src) - user.visible_message("[user] [pick(attack_verb)] \the [target.name] with their nose!") - -//Delivery -/obj/item/storage/bag/borgdelivery - name = "fetching storage" - desc = "Fetch the thing!" - icon = 'icons/mob/dogborg.dmi' - icon_state = "dbag" - w_class = WEIGHT_CLASS_BULKY - -/obj/item/storage/bag/borgdelivery/ComponentInitialize() - . = ..() - GET_COMPONENT(STR, /datum/component/storage) - STR.max_w_class = WEIGHT_CLASS_BULKY - STR.max_combined_w_class = 5 - STR.max_items = 1 - STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear, /obj/item/radio/intercom)) - -//Tongue stuff -/obj/item/soap/tongue - name = "synthetic tongue" - desc = "Useful for slurping mess off the floor before affectionally licking the crew members in the face." - icon = 'icons/mob/dogborg.dmi' - icon_state = "synthtongue" - hitsound = 'sound/effects/attackblob.ogg' - cleanspeed = 80 - var/status = 0 - -/obj/item/soap/tongue/scrubpup - cleanspeed = 25 //slightly faster than a mop. - -/obj/item/soap/tongue/New() - ..() - item_flags |= NOBLUDGEON //No more attack messages - -/obj/item/soap/tongue/attack_self(mob/user) - var/mob/living/silicon/robot.R = user - if(R.cell && R.cell.charge > 100) - if(R.emagged && status == 0) - status = !status - name = "energized tongue" - desc = "Your tongue is energized for dangerously maximum efficency." - icon_state = "syndietongue" - to_chat(user, "Your tongue is now [status ? "Energized" : "Normal"].") - cleanspeed = 10 //(nerf'd)tator soap stat - else - status = 0 - name = "synthetic tongue" - desc = "Useful for slurping mess off the floor before affectionally licking the crew members in the face." - icon_state = "synthtongue" - cleanspeed = initial(cleanspeed) - if(R.emagged) - to_chat(user, "Your tongue is now [status ? "Energized" : "Normal"].") - update_icon() - -/obj/item/soap/tongue/afterattack(atom/target, mob/user, proximity) - var/mob/living/silicon/robot.R = user - if(!proximity || !check_allowed_items(target)) - return - if(R.client && (target in R.client.screen)) - to_chat(R, "You need to take that [target.name] off before cleaning it!") - else if(is_cleanable(target)) - R.visible_message("[R] begins to lick off \the [target.name].", "You begin to lick off \the [target.name]...") - if(do_after(R, src.cleanspeed, target = target)) - if(!in_range(src, target)) //Proximity is probably old news by now, do a new check. - return //If they moved away, you can't eat them. - to_chat(R, "You finish licking off \the [target.name].") - qdel(target) - R.cell.give(50) - else if(isobj(target)) //hoo boy. danger zone man - if(istype(target,/obj/item/trash)) - R.visible_message("[R] nibbles away at \the [target.name].", "You begin to nibble away at \the [target.name]...") - if(!do_after(R, src.cleanspeed, target = target)) - return //If they moved away, you can't eat them. - to_chat(R, "You finish off \the [target.name].") - qdel(target) - R.cell.give(250) - return - if(istype(target,/obj/item/stock_parts/cell)) - R.visible_message("[R] begins cramming \the [target.name] down its throat.", "You begin cramming \the [target.name] down your throat...") - if(!do_after(R, 50, target = target)) - return //If they moved away, you can't eat them. - to_chat(R, "You finish off \the [target.name].") - var/obj/item/stock_parts/cell.C = target - R.cell.charge = R.cell.charge + (C.charge / 3) //Instant full cell upgrades op idgaf - qdel(target) - return - var/obj/item/I = target //HAHA FUCK IT, NOT LIKE WE ALREADY HAVE A SHITTON OF WAYS TO REMOVE SHIT - if(!I.anchored && R.emagged) - R.visible_message("[R] begins chewing up \the [target.name]. Looks like it's trying to loophole around its diet restriction!", "You begin chewing up \the [target.name]...") - if(!do_after(R, 100, target = I)) //Nerf dat time yo - return //If they moved away, you can't eat them. - visible_message("[R] chews up \the [target.name] and cleans off the debris!") - to_chat(R, "You finish off \the [target.name].") - qdel(I) - R.cell.give(500) - return - R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") - else if(ishuman(target)) - var/mob/living/L = target - if(status == 0 && check_zone(R.zone_selected) == "head") - R.visible_message("\the [R] affectionally licks \the [L]'s face!", "You affectionally lick \the [L]'s face!") - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - if(istype(L) && L.fire_stacks > 0) - L.adjust_fire_stacks(-10) - return - else if(status == 0) - R.visible_message("\the [R] affectionally licks \the [L]!", "You affectionally lick \the [L]!") - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - if(istype(L) && L.fire_stacks > 0) - L.adjust_fire_stacks(-10) - return - else - if(R.cell.charge <= 800) - to_chat(R, "Insufficent Power!") - return - L.Stun(4) // normal stunbaton is force 7 gimme a break good sir! - L.Knockdown(80) - L.apply_effect(EFFECT_STUTTER, 4) - L.visible_message("[R] has shocked [L] with its tongue!", \ - "[R] has shocked you with its tongue!") - playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) - R.cell.use(666) - log_combat(R, L, "tongue stunned") - - else if(istype(target, /obj/structure/window)) - R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") - if(do_after(user, src.cleanspeed, target = target)) - to_chat(user, "You clean \the [target.name].") - target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - target.set_opacity(initial(target.opacity)) - else - R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") - if(do_after(user, src.cleanspeed, target = target)) - to_chat(user, "You clean \the [target.name].") - var/obj/effect/decal/cleanable/C = locate() in target - qdel(C) - target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) - target.wash_cream() - return - -//Dogfood - -/obj/item/trash/rkibble - name = "robo kibble" - desc = "A novelty bowl of assorted mech fabricator byproducts. Mockingly feed this to the sec-dog to help it recharge." - icon = 'icons/mob/dogborg.dmi' - icon_state= "kibble" - -//Defibs - -/obj/item/twohanded/shockpaddles/cyborg/hound - name = "Paws of Life" - desc = "MediHound specific shock paws." - icon = 'icons/mob/dogborg.dmi' - icon_state = "defibpaddles0" - item_state = "defibpaddles0" - -// Pounce stuff for K-9 - -/obj/item/dogborg/pounce - name = "pounce" - icon = 'icons/mob/dogborg.dmi' - icon_state = "pounce" - desc = "Leap at your target to momentarily stun them." - force = 0 - throwforce = 0 - -/obj/item/dogborg/pounce/New() - ..() - item_flags |= NOBLUDGEON - -/mob/living/silicon/robot - var/leaping = 0 - var/pounce_cooldown = 0 - var/pounce_cooldown_time = 50 //Nearly doubled, u happy? - var/pounce_spoolup = 3 - var/leap_at - var/disabler - var/laser - var/sleeper_g - var/sleeper_r - var/sleeper_nv - -#define MAX_K9_LEAP_DIST 4 //because something's definitely borked the pounce functioning from a distance. - -/obj/item/dogborg/pounce/afterattack(atom/A, mob/user) - var/mob/living/silicon/robot/R = user - if(R && !R.pounce_cooldown) - R.pounce_cooldown = !R.pounce_cooldown - to_chat(R, "Your targeting systems lock on to [A]...") - addtimer(CALLBACK(R, /mob/living/silicon/robot.proc/leap_at, A), R.pounce_spoolup) - spawn(R.pounce_cooldown_time) - R.pounce_cooldown = !R.pounce_cooldown - else if(R && R.pounce_cooldown) - to_chat(R, "Your leg actuators are still recharging!") - -/mob/living/silicon/robot/proc/leap_at(atom/A) - if(leaping || stat || buckled || lying) - return - - if(!has_gravity(src) || !has_gravity(A)) - to_chat(src,"It is unsafe to leap without gravity!") - //It's also extremely buggy visually, so it's balance+bugfix - return - - if(cell.charge <= 500) - to_chat(src,"Insufficent reserves for jump actuators!") - return - - else - leaping = 1 - weather_immunities += "lava" - pixel_y = 10 - update_icons() - throw_at(A, MAX_K9_LEAP_DIST, 1, spin=0, diagonals_first = 1) - cell.use(500) //Doubled the energy consumption - weather_immunities -= "lava" - -/mob/living/silicon/robot/throw_impact(atom/A) - - if(!leaping) - return ..() - - if(A) - if(isliving(A)) - var/mob/living/L = A - var/blocked = 0 - if(ishuman(A)) - var/mob/living/carbon/human/H = A - if(H.check_shields(0, "the [name]", src, attack_type = LEAP_ATTACK)) - blocked = 1 - if(!blocked) - L.visible_message("[src] pounces on [L]!", "[src] pounces on you!") - L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice. - playsound(src, 'sound/weapons/Egloves.ogg', 50, 1) - sleep(2)//Runtime prevention (infinite bump() calls on hulks) - step_towards(src,L) - log_combat(src, L, "borg pounced") - else - Knockdown(45, 1, 1) - - pounce_cooldown = !pounce_cooldown - spawn(pounce_cooldown_time) //3s by default - pounce_cooldown = !pounce_cooldown - else if(A.density && !A.CanPass(src)) - visible_message("[src] smashes into [A]!", "You smash into [A]!") - playsound(src, 'sound/items/trayhit1.ogg', 50, 1) - Knockdown(45, 1, 1) - - if(leaping) - leaping = 0 - pixel_y = initial(pixel_y) - update_icons() - update_canmove() +/* +DOG BORG EQUIPMENT HERE +SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! +*/ + +/obj/item/dogborg/jaws + name = "Dogborg jaws" + desc = "The jaws of the debug errors oh god." + icon = 'icons/mob/dogborg.dmi' + flags_1 = CONDUCT_1 + force = 1 + throwforce = 0 + w_class = 3 + hitsound = 'sound/weapons/bite.ogg' + sharpness = IS_SHARP + +/obj/item/dogborg/jaws/big + name = "combat jaws" + desc = "The jaws of the law. Very sharp." + icon_state = "jaws" + force = 12 + attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") + +/obj/item/dogborg/jaws/small + name = "puppy jaws" + desc = "Rubberized teeth designed to protect accidental harm. Sharp enough for specialized tasks however." + icon_state = "smalljaws" + force = 6 + attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") + var/status = 0 + +/obj/item/dogborg/jaws/attack(atom/A, mob/living/silicon/robot/user) + ..() + user.do_attack_animation(A, ATTACK_EFFECT_BITE) + log_combat(user, A, "bit") + +/obj/item/dogborg/jaws/small/attack_self(mob/user) + var/mob/living/silicon/robot.R = user + if(R.cell && R.cell.charge > 100) + if(R.emagged && status == 0) + name = "combat jaws" + icon_state = "jaws" + desc = "The jaws of the law." + force = 12 + attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") + status = 1 + to_chat(user, "Your jaws are now [status ? "Combat" : "Pup'd"].") + else + name = "puppy jaws" + icon_state = "smalljaws" + desc = "The jaws of a small dog." + force = 5 + attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") + status = 0 + if(R.emagged) + to_chat(user, "Your jaws are now [status ? "Combat" : "Pup'd"].") + update_icon() + +//Boop + +/obj/item/analyzer/nose + name = "boop module" + icon = 'icons/mob/dogborg.dmi' + icon_state = "nose" + desc = "The BOOP module" + flags_1 = CONDUCT_1 + force = 0 + throwforce = 0 + attack_verb = list("nuzzles", "pushes", "boops") + w_class = 1 + +/obj/item/analyzer/nose/attack_self(mob/user) + user.visible_message("[user] sniffs around the air.", "You sniff the air for gas traces.") + + var/turf/location = user.loc + if(!istype(location)) + return + + var/datum/gas_mixture/environment = location.return_air() + + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles() + + to_chat(user, "Results:") + if(abs(pressure - ONE_ATMOSPHERE) < 10) + to_chat(user, "Pressure: [round(pressure,0.1)] kPa") + else + to_chat(user, "Pressure: [round(pressure,0.1)] kPa") + if(total_moles) + var/list/env_gases = environment.gases + + var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles + var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles + var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles + var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles + GAS_GARBAGE_COLLECT(environment.gases) + + if(abs(n2_concentration - N2STANDARD) < 20) + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] %") + else + to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] %") + + if(abs(o2_concentration - O2STANDARD) < 2) + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] %") + else + to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] %") + + if(co2_concentration > 0.01) + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] %") + else + to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] %") + + if(plasma_concentration > 0.005) + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] %") + else + to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] %") + + + for(var/id in env_gases) + if(id in GLOB.hardcoded_gases) + continue + var/gas_concentration = env_gases[id]/total_moles + to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] %") + to_chat(user, "Temperature: [round(environment.temperature-T0C)] °C") + +/obj/item/analyzer/nose/AltClick(mob/user) //Barometer output for measuring when the next storm happens + . = ..() + +/obj/item/analyzer/nose/afterattack(atom/target, mob/user, proximity) + . = ..() + if(!proximity) + return + do_attack_animation(target, null, src) + user.visible_message("[user] [pick(attack_verb)] \the [target.name] with their nose!") + +//Delivery +/obj/item/storage/bag/borgdelivery + name = "fetching storage" + desc = "Fetch the thing!" + icon = 'icons/mob/dogborg.dmi' + icon_state = "dbag" + w_class = WEIGHT_CLASS_BULKY + +/obj/item/storage/bag/borgdelivery/ComponentInitialize() + . = ..() + GET_COMPONENT(STR, /datum/component/storage) + STR.max_w_class = WEIGHT_CLASS_BULKY + STR.max_combined_w_class = 5 + STR.max_items = 1 + STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear, /obj/item/radio/intercom)) + +//Tongue stuff +/obj/item/soap/tongue + name = "synthetic tongue" + desc = "Useful for slurping mess off the floor before affectionally licking the crew members in the face." + icon = 'icons/mob/dogborg.dmi' + icon_state = "synthtongue" + hitsound = 'sound/effects/attackblob.ogg' + cleanspeed = 80 + var/status = 0 + +/obj/item/soap/tongue/scrubpup + cleanspeed = 25 //slightly faster than a mop. + +/obj/item/soap/tongue/New() + ..() + item_flags |= NOBLUDGEON //No more attack messages + +/obj/item/soap/tongue/attack_self(mob/user) + var/mob/living/silicon/robot.R = user + if(R.cell && R.cell.charge > 100) + if(R.emagged && status == 0) + status = !status + name = "energized tongue" + desc = "Your tongue is energized for dangerously maximum efficency." + icon_state = "syndietongue" + to_chat(user, "Your tongue is now [status ? "Energized" : "Normal"].") + cleanspeed = 10 //(nerf'd)tator soap stat + else + status = 0 + name = "synthetic tongue" + desc = "Useful for slurping mess off the floor before affectionally licking the crew members in the face." + icon_state = "synthtongue" + cleanspeed = initial(cleanspeed) + if(R.emagged) + to_chat(user, "Your tongue is now [status ? "Energized" : "Normal"].") + update_icon() + +/obj/item/soap/tongue/afterattack(atom/target, mob/user, proximity) + var/mob/living/silicon/robot.R = user + if(!proximity || !check_allowed_items(target)) + return + if(R.client && (target in R.client.screen)) + to_chat(R, "You need to take that [target.name] off before cleaning it!") + else if(is_cleanable(target)) + R.visible_message("[R] begins to lick off \the [target.name].", "You begin to lick off \the [target.name]...") + if(do_after(R, src.cleanspeed, target = target)) + if(!in_range(src, target)) //Proximity is probably old news by now, do a new check. + return //If they moved away, you can't eat them. + to_chat(R, "You finish licking off \the [target.name].") + qdel(target) + R.cell.give(50) + else if(isobj(target)) //hoo boy. danger zone man + if(istype(target,/obj/item/trash)) + R.visible_message("[R] nibbles away at \the [target.name].", "You begin to nibble away at \the [target.name]...") + if(!do_after(R, src.cleanspeed, target = target)) + return //If they moved away, you can't eat them. + to_chat(R, "You finish off \the [target.name].") + qdel(target) + R.cell.give(250) + return + if(istype(target,/obj/item/stock_parts/cell)) + R.visible_message("[R] begins cramming \the [target.name] down its throat.", "You begin cramming \the [target.name] down your throat...") + if(!do_after(R, 50, target = target)) + return //If they moved away, you can't eat them. + to_chat(R, "You finish off \the [target.name].") + var/obj/item/stock_parts/cell.C = target + R.cell.charge = R.cell.charge + (C.charge / 3) //Instant full cell upgrades op idgaf + qdel(target) + return + var/obj/item/I = target //HAHA FUCK IT, NOT LIKE WE ALREADY HAVE A SHITTON OF WAYS TO REMOVE SHIT + if(!I.anchored && R.emagged) + R.visible_message("[R] begins chewing up \the [target.name]. Looks like it's trying to loophole around its diet restriction!", "You begin chewing up \the [target.name]...") + if(!do_after(R, 100, target = I)) //Nerf dat time yo + return //If they moved away, you can't eat them. + visible_message("[R] chews up \the [target.name] and cleans off the debris!") + to_chat(R, "You finish off \the [target.name].") + qdel(I) + R.cell.give(500) + return + R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") + else if(ishuman(target)) + var/mob/living/L = target + if(status == 0 && check_zone(R.zone_selected) == "head") + R.visible_message("\the [R] affectionally licks \the [L]'s face!", "You affectionally lick \the [L]'s face!") + playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) + if(istype(L) && L.fire_stacks > 0) + L.adjust_fire_stacks(-10) + return + else if(status == 0) + R.visible_message("\the [R] affectionally licks \the [L]!", "You affectionally lick \the [L]!") + playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) + if(istype(L) && L.fire_stacks > 0) + L.adjust_fire_stacks(-10) + return + else + if(R.cell.charge <= 800) + to_chat(R, "Insufficent Power!") + return + L.Stun(4) // normal stunbaton is force 7 gimme a break good sir! + L.Knockdown(80) + L.apply_effect(EFFECT_STUTTER, 4) + L.visible_message("[R] has shocked [L] with its tongue!", \ + "[R] has shocked you with its tongue!") + playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) + R.cell.use(666) + log_combat(R, L, "tongue stunned") + + else if(istype(target, /obj/structure/window)) + R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") + if(do_after(user, src.cleanspeed, target = target)) + to_chat(user, "You clean \the [target.name].") + target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) + target.set_opacity(initial(target.opacity)) + else + R.visible_message("[R] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") + if(do_after(user, src.cleanspeed, target = target)) + to_chat(user, "You clean \the [target.name].") + var/obj/effect/decal/cleanable/C = locate() in target + qdel(C) + target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) + SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) + target.wash_cream() + return + +//Dogfood + +/obj/item/trash/rkibble + name = "robo kibble" + desc = "A novelty bowl of assorted mech fabricator byproducts. Mockingly feed this to the sec-dog to help it recharge." + icon = 'icons/mob/dogborg.dmi' + icon_state= "kibble" + +//Defibs + +/obj/item/twohanded/shockpaddles/cyborg/hound + name = "Paws of Life" + desc = "MediHound specific shock paws." + icon = 'icons/mob/dogborg.dmi' + icon_state = "defibpaddles0" + item_state = "defibpaddles0" + +// Pounce stuff for K-9 + +/obj/item/dogborg/pounce + name = "pounce" + icon = 'icons/mob/dogborg.dmi' + icon_state = "pounce" + desc = "Leap at your target to momentarily stun them." + force = 0 + throwforce = 0 + +/obj/item/dogborg/pounce/New() + ..() + item_flags |= NOBLUDGEON + +/mob/living/silicon/robot + var/leaping = 0 + var/pounce_cooldown = 0 + var/pounce_cooldown_time = 50 //Nearly doubled, u happy? + var/pounce_spoolup = 3 + var/leap_at + var/disabler + var/laser + var/sleeper_g + var/sleeper_r + var/sleeper_nv + +#define MAX_K9_LEAP_DIST 4 //because something's definitely borked the pounce functioning from a distance. + +/obj/item/dogborg/pounce/afterattack(atom/A, mob/user) + var/mob/living/silicon/robot/R = user + if(R && !R.pounce_cooldown) + R.pounce_cooldown = !R.pounce_cooldown + to_chat(R, "Your targeting systems lock on to [A]...") + addtimer(CALLBACK(R, /mob/living/silicon/robot.proc/leap_at, A), R.pounce_spoolup) + spawn(R.pounce_cooldown_time) + R.pounce_cooldown = !R.pounce_cooldown + else if(R && R.pounce_cooldown) + to_chat(R, "Your leg actuators are still recharging!") + +/mob/living/silicon/robot/proc/leap_at(atom/A) + if(leaping || stat || buckled || lying) + return + + if(!has_gravity(src) || !has_gravity(A)) + to_chat(src,"It is unsafe to leap without gravity!") + //It's also extremely buggy visually, so it's balance+bugfix + return + + if(cell.charge <= 500) + to_chat(src,"Insufficent reserves for jump actuators!") + return + + else + leaping = 1 + weather_immunities += "lava" + pixel_y = 10 + update_icons() + throw_at(A, MAX_K9_LEAP_DIST, 1, spin=0, diagonals_first = 1) + cell.use(500) //Doubled the energy consumption + weather_immunities -= "lava" + +/mob/living/silicon/robot/throw_impact(atom/A) + + if(!leaping) + return ..() + + if(A) + if(isliving(A)) + var/mob/living/L = A + var/blocked = 0 + if(ishuman(A)) + var/mob/living/carbon/human/H = A + if(H.check_shields(0, "the [name]", src, attack_type = LEAP_ATTACK)) + blocked = 1 + if(!blocked) + L.visible_message("[src] pounces on [L]!", "[src] pounces on you!") + L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice. + playsound(src, 'sound/weapons/Egloves.ogg', 50, 1) + sleep(2)//Runtime prevention (infinite bump() calls on hulks) + step_towards(src,L) + log_combat(src, L, "borg pounced") + else + Knockdown(45, 1, 1) + + pounce_cooldown = !pounce_cooldown + spawn(pounce_cooldown_time) //3s by default + pounce_cooldown = !pounce_cooldown + else if(A.density && !A.CanPass(src)) + visible_message("[src] smashes into [A]!", "You smash into [A]!") + playsound(src, 'sound/items/trayhit1.ogg', 50, 1) + Knockdown(45, 1, 1) + + if(leaping) + leaping = 0 + pixel_y = initial(pixel_y) + update_icons() + update_canmove() diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm index 598690590c..c7a2447be6 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -4,20 +4,24 @@ /mob/living/silicon/robot/Move(NewLoc, direct) . = ..() if(. && sprinting && !(movement_type & FLYING) && canmove && !resting) - if(istype(cell)) - cell.charge -= 25 + if(!(cell?.use(25))) + togglesprint(TRUE) /mob/living/silicon/robot/movement_delay() . = ..() if(!resting && !sprinting) . += 1 -/mob/living/silicon/robot/proc/togglesprint() //Basically a copypaste of the proc from /mob/living/carbon/human - sprinting = !sprinting +/mob/living/silicon/robot/proc/togglesprint(shutdown = FALSE) //Basically a copypaste of the proc from /mob/living/carbon/human + if(!shutdown && (!cell || cell.charge < 25)) + return FALSE + sprinting = shutdown ? FALSE : !sprinting if(!resting && canmove) if(sprinting) playsound_local(src, 'modular_citadel/sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE) else + if(shutdown) + playsound_local(src, 'sound/effects/light_flicker.ogg', 50, FALSE, pressure_affected = FALSE) playsound_local(src, 'modular_citadel/sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE) if(hud_used && hud_used.static_inventory) for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory) diff --git a/modular_citadel/code/modules/mob/living/status_procs.dm b/modular_citadel/code/modules/mob/living/status_procs.dm index f646af3286..851c7438a7 100644 --- a/modular_citadel/code/modules/mob/living/status_procs.dm +++ b/modular_citadel/code/modules/mob/living/status_procs.dm @@ -1,5 +1,5 @@ /mob/living/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg) //Can't go below remaining duration - if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown) + if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown) if(absorb_stun(isnull(override_hardstun)? amount : override_hardstun, ignore_canknockdown)) return var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown() diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/other_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/other_reagents.dm index 0f71a71add..00063c22d4 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -17,13 +17,13 @@ M.adjustStaminaLoss(-5*REM) . = ..() -/datum/reagent/syndicateadrenals/on_mob_add(mob/living/M) +/datum/reagent/syndicateadrenals/on_mob_metabolize(mob/living/M) . = ..() if(istype(M)) M.next_move_modifier *= 0.5 to_chat(M, "You feel an intense surge of energy rushing through your veins.") -/datum/reagent/syndicateadrenals/on_mob_delete(mob/living/M) +/datum/reagent/syndicateadrenals/on_mob_end_metabolize(mob/living/M) . = ..() if(istype(M)) M.next_move_modifier *= 2 diff --git a/modular_citadel/code/modules/reagents/reagent container/hypovial.dm b/modular_citadel/code/modules/reagents/reagent container/hypovial.dm index a58a7fc825..4b7972d0a7 100755 --- a/modular_citadel/code/modules/reagents/reagent container/hypovial.dm +++ b/modular_citadel/code/modules/reagents/reagent container/hypovial.dm @@ -16,6 +16,7 @@ "purple hypovial" = "hypovial-p", "black hypovial" = "hypovial-t" ) + always_reskinnable = TRUE /obj/item/reagent_containers/glass/bottle/vial/Initialize() . = ..() @@ -29,17 +30,6 @@ /obj/item/reagent_containers/glass/bottle/vial/on_reagent_change() update_icon() -/obj/item/reagent_containers/glass/bottle/vial/reskin_obj(mob/M) //Makes the vials completely reskinnable, and renames them - overrides /obj/proc/reskin_obj - if(!LAZYLEN(unique_reskin)) - return - var/choice = input(M,"Do you wish to recolour your [src]?","Vial Recolour") as null|anything in unique_reskin - if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src)) - if(!unique_reskin[choice]) - return - icon_state = unique_reskin[choice] - name = choice - to_chat(M, "[src] is now skinned as '[choice].'") - /obj/item/reagent_containers/glass/bottle/vial/update_icon() cut_overlays() if(reagents.total_volume) diff --git a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm index 3da35d9c6d..2a6f03fae3 100644 --- a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm +++ b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm @@ -97,7 +97,7 @@ color = "#FFADFF"//PINK, rgb(255, 173, 255) /datum/reagent/drug/aphrodisiac/on_mob_life(mob/living/M) - if(M && M.canbearoused && !M.has_trait(TRAIT_CROCRIN_IMMUNE)) + if(M && M.canbearoused && !HAS_TRAIT(M, TRAIT_CROCRIN_IMMUNE)) if(prob(33)) M.adjustArousalLoss(2) if(prob(5)) @@ -119,7 +119,7 @@ overdose_threshold = 20 /datum/reagent/drug/aphrodisiacplus/on_mob_life(mob/living/M) - if(M && M.canbearoused && !M.has_trait(TRAIT_CROCRIN_IMMUNE)) + if(M && M.canbearoused && !HAS_TRAIT(M, TRAIT_CROCRIN_IMMUNE)) if(prob(33)) M.adjustArousalLoss(6)//not quite six times as powerful, but still considerably more powerful. if(prob(5)) @@ -151,7 +151,7 @@ ..() /datum/reagent/drug/aphrodisiacplus/overdose_process(mob/living/M) - if(M && M.canbearoused && !M.has_trait(TRAIT_CROCRIN_IMMUNE) && prob(33)) + if(M && M.canbearoused && !HAS_TRAIT(M, TRAIT_CROCRIN_IMMUNE) && prob(33)) if(M.getArousalLoss() >= 100 && ishuman(M) && M.has_dna()) var/mob/living/carbon/human/H = M if(prob(50)) //Less spam diff --git a/modular_citadel/code/modules/research/techweb/all_nodes.dm b/modular_citadel/code/modules/research/techweb/all_nodes.dm index e561b106d8..c0ddaceaf7 100644 --- a/modular_citadel/code/modules/research/techweb/all_nodes.dm +++ b/modular_citadel/code/modules/research/techweb/all_nodes.dm @@ -19,7 +19,7 @@ display_name = "Games and Toys" description = "For the slackers on the station." prereq_ids = list("comptech") - design_ids = list("arcade_battle", "arcade_orion", "slotmachine", "autoylathe") + design_ids = list("arcade_battle", "arcade_orion", "arcade_minesweeper", "slotmachine", "autoylathe") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000) export_price = 5000 diff --git a/modular_citadel/code/modules/uplink/uplink_items.dm b/modular_citadel/code/modules/uplink/uplink_items.dm deleted file mode 100644 index df076c3994..0000000000 --- a/modular_citadel/code/modules/uplink/uplink_items.dm +++ /dev/null @@ -1,18 +0,0 @@ -/* -// PUT ALL YOUR NEW UPLINK STUFF HERE, OVERRIDES GO IN HERE TOO -*/ - -/datum/uplink_item/device_tools/emagrecharge - name = "Electromagnet Charging Device" - desc = "A small device intended for recharging Cryptographic Sequencers. Using it will add five extra charges to the Cryptographic Sequencer." - item = /obj/item/emagrecharge - cost = 2 - -/datum/uplink_item/dangerous/revolver - item = /obj/item/gun/ballistic/revolver/syndie - -/datum/uplink_item/dangerous/phantomthief - name = "Syndicate Mask" - desc = "A cheap plastic mask fitted with an adrenaline autoinjector, which can be used by simply tensing your muscles" - item = /obj/item/clothing/glasses/phantomthief/syndicate - cost = 2 diff --git a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm index 542241e9f2..6b6a3d30cc 100644 --- a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm +++ b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm @@ -49,13 +49,16 @@ var/sound/pred_death = sound(get_sfx("death_pred")) var/turf/source = get_turf(owner) - ///////////////////////////// DM_HOLD ///////////////////////////// if(digest_mode == DM_HOLD) return SSBELLIES_PROCESSED //////////////////////////// DM_DIGEST //////////////////////////// else if(digest_mode == DM_DIGEST) + if(HAS_TRAIT(owner, TRAIT_PACIFISM)) //obvious. + digest_mode = DM_NOISY + return + for (var/mob/living/M in contents) if(prob(25)) if((world.time - NORMIE_HEARCHECK) > last_hearcheck) @@ -210,6 +213,10 @@ //////////////////////////DM_DRAGON ///////////////////////////////////// //because dragons need snowflake guts if(digest_mode == DM_DRAGON) + if(HAS_TRAIT(owner, TRAIT_PACIFISM)) //imagine var editing this when you're a pacifist. smh + digest_mode = DM_NOISY + return + for (var/mob/living/M in contents) if(prob(55)) //if you're hearing this, you're a vore ho anyway. if((world.time - NORMIE_HEARCHECK) > last_hearcheck) diff --git a/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm b/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm index 2ac2628d1f..6f484e7a51 100644 --- a/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm +++ b/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm @@ -57,6 +57,7 @@ /datum/vore_look/proc/gen_vui(var/mob/living/user) var/dat dat += "Remember to toggle the vore mode, it's to the left of your combat toggle. Open mouth means you're voracious!
" + dat += "Remember that your prey is blind, use audible mode subtle messages to communicate to them with posts!
" dat += "
" var/atom/userloc = user.loc if (isbelly(userloc)) diff --git a/modular_citadel/icons/mob/clothing/trek_item_icon.dmi b/modular_citadel/icons/mob/clothing/trek_item_icon.dmi deleted file mode 100644 index ed3286615b..0000000000 Binary files a/modular_citadel/icons/mob/clothing/trek_item_icon.dmi and /dev/null differ diff --git a/modular_citadel/icons/mob/mam_ears.dmi b/modular_citadel/icons/mob/mam_ears.dmi index f2a788d900..569667a82d 100644 Binary files a/modular_citadel/icons/mob/mam_ears.dmi and b/modular_citadel/icons/mob/mam_ears.dmi differ diff --git a/modular_citadel/icons/mob/muzzled_helmet.dmi b/modular_citadel/icons/mob/muzzled_helmet.dmi index a96f18c3ce..e321f8ae47 100644 Binary files a/modular_citadel/icons/mob/muzzled_helmet.dmi and b/modular_citadel/icons/mob/muzzled_helmet.dmi differ diff --git a/modular_citadel/icons/mob/uniform_digi.dmi b/modular_citadel/icons/mob/uniform_digi.dmi index 9513f82c9c..5ff291f400 100644 Binary files a/modular_citadel/icons/mob/uniform_digi.dmi and b/modular_citadel/icons/mob/uniform_digi.dmi differ diff --git a/modular_citadel/icons/obj/clothing/trek_item_icon.dmi b/modular_citadel/icons/obj/clothing/trek_item_icon.dmi index 86afe16b03..ed3286615b 100644 Binary files a/modular_citadel/icons/obj/clothing/trek_item_icon.dmi and b/modular_citadel/icons/obj/clothing/trek_item_icon.dmi differ diff --git a/modular_citadel/icons/obj/genitals/breasts_onmob.dmi b/modular_citadel/icons/obj/genitals/breasts_onmob.dmi index 69a531bd11..c4b75b1172 100644 Binary files a/modular_citadel/icons/obj/genitals/breasts_onmob.dmi and b/modular_citadel/icons/obj/genitals/breasts_onmob.dmi differ diff --git a/modular_citadel/icons/obj/genitals/penis_onmob.dmi b/modular_citadel/icons/obj/genitals/penis_onmob.dmi index 2457759b73..434f171e22 100644 Binary files a/modular_citadel/icons/obj/genitals/penis_onmob.dmi and b/modular_citadel/icons/obj/genitals/penis_onmob.dmi differ diff --git a/modular_citadel/icons/obj/genitals/testicles_onmob.dmi b/modular_citadel/icons/obj/genitals/testicles_onmob.dmi index 581bcb0583..33659cf13c 100644 Binary files a/modular_citadel/icons/obj/genitals/testicles_onmob.dmi and b/modular_citadel/icons/obj/genitals/testicles_onmob.dmi differ diff --git a/modular_citadel/icons/obj/genitals/vagina_onmob.dmi b/modular_citadel/icons/obj/genitals/vagina_onmob.dmi index f5daa3fea1..c4cf891eac 100644 Binary files a/modular_citadel/icons/obj/genitals/vagina_onmob.dmi and b/modular_citadel/icons/obj/genitals/vagina_onmob.dmi differ diff --git a/modular_citadel/icons/obj/guns/cit_guns.dmi b/modular_citadel/icons/obj/guns/cit_guns.dmi index 8154a753e0..cc04fbcb14 100644 Binary files a/modular_citadel/icons/obj/guns/cit_guns.dmi and b/modular_citadel/icons/obj/guns/cit_guns.dmi differ diff --git a/modular_citadel/icons/obj/pda.dmi b/modular_citadel/icons/obj/pda.dmi deleted file mode 100644 index 5404b908c6..0000000000 Binary files a/modular_citadel/icons/obj/pda.dmi and /dev/null differ diff --git a/sound/arcade/minesweeper_boardpress.ogg b/sound/arcade/minesweeper_boardpress.ogg new file mode 100644 index 0000000000..a928a7498d Binary files /dev/null and b/sound/arcade/minesweeper_boardpress.ogg differ diff --git a/sound/arcade/minesweeper_emag1.ogg b/sound/arcade/minesweeper_emag1.ogg new file mode 100644 index 0000000000..4601f8df89 Binary files /dev/null and b/sound/arcade/minesweeper_emag1.ogg differ diff --git a/sound/arcade/minesweeper_emag2.ogg b/sound/arcade/minesweeper_emag2.ogg new file mode 100644 index 0000000000..84cb5c2e25 Binary files /dev/null and b/sound/arcade/minesweeper_emag2.ogg differ diff --git a/sound/arcade/minesweeper_explosion1.ogg b/sound/arcade/minesweeper_explosion1.ogg new file mode 100644 index 0000000000..f8272722fd Binary files /dev/null and b/sound/arcade/minesweeper_explosion1.ogg differ diff --git a/sound/arcade/minesweeper_explosion2.ogg b/sound/arcade/minesweeper_explosion2.ogg new file mode 100644 index 0000000000..aabd43851d Binary files /dev/null and b/sound/arcade/minesweeper_explosion2.ogg differ diff --git a/sound/arcade/minesweeper_explosion3.ogg b/sound/arcade/minesweeper_explosion3.ogg new file mode 100644 index 0000000000..22aa309d9d Binary files /dev/null and b/sound/arcade/minesweeper_explosion3.ogg differ diff --git a/sound/arcade/minesweeper_menuselect.ogg b/sound/arcade/minesweeper_menuselect.ogg new file mode 100644 index 0000000000..b9e0b765dc Binary files /dev/null and b/sound/arcade/minesweeper_menuselect.ogg differ diff --git a/sound/arcade/minesweeper_startup.ogg b/sound/arcade/minesweeper_startup.ogg new file mode 100644 index 0000000000..c51d473d60 Binary files /dev/null and b/sound/arcade/minesweeper_startup.ogg differ diff --git a/sound/arcade/minesweeper_win.ogg b/sound/arcade/minesweeper_win.ogg new file mode 100644 index 0000000000..214f1925b0 Binary files /dev/null and b/sound/arcade/minesweeper_win.ogg differ diff --git a/sound/arcade/minesweeper_winfail.ogg b/sound/arcade/minesweeper_winfail.ogg new file mode 100644 index 0000000000..878f153063 Binary files /dev/null and b/sound/arcade/minesweeper_winfail.ogg differ diff --git a/sound/effects/gong.ogg b/sound/effects/gong.ogg new file mode 100644 index 0000000000..4d12f5d0d2 Binary files /dev/null and b/sound/effects/gong.ogg differ diff --git a/sound/magic/RATTLEMEBONES.ogg b/sound/magic/RATTLEMEBONES.ogg new file mode 100644 index 0000000000..d42cf51253 Binary files /dev/null and b/sound/magic/RATTLEMEBONES.ogg differ diff --git a/sound/magic/RATTLEMEBONES2.ogg b/sound/magic/RATTLEMEBONES2.ogg new file mode 100644 index 0000000000..7265a06aab Binary files /dev/null and b/sound/magic/RATTLEMEBONES2.ogg differ diff --git a/sound/weapons/whipgrab.ogg b/sound/weapons/whipgrab.ogg new file mode 100644 index 0000000000..3b17632056 Binary files /dev/null and b/sound/weapons/whipgrab.ogg differ diff --git a/strings/canadian_replacement.json b/strings/canadian_replacement.json new file mode 100644 index 0000000000..1430ae8793 --- /dev/null +++ b/strings/canadian_replacement.json @@ -0,0 +1,45 @@ +{ + + "canadian": { + "toilet": "washroom", + "bathroom": "washroom", + "restroom": "washroom", + "coffee": "doubledouble", + "backpack": "knapsack", + "rucksack": "knapsack", + "candybar": "chocolate bar", + "about": "aboot", + "friend": "buddy", + "pal": "buddy", + "donut": "doughnut", + "faucet": "tap", + "give": "give'r", + "bar": "boozecan", + "leave": "leave'r", + "scruffle": "kerfuffle", + "couch": "chesterfield", + "sofa": "chesterfield", + "alcohol": "mickey", + "shoes": "runners", + "cigarrete": "dart", + "cig": "dart", + "color": "colour", + "armor": "armour", + "armory": "armoury", + "defense": "defence", + "honor": "honour", + "labor": "labour", + "humor": "humour", + "humorous": "humourous", + "gray": "grey", + "labeled": "labelled", + "luster": "lustre", + "inch": "centimetre", + "yard": "metre", + "tumor": "tumour", + "mile": "kilometre", + "pound": "kilogram" + } + + +} diff --git a/strings/cas_black.txt b/strings/cas_black.txt index b63e33cdf2..734222d1fd 100644 --- a/strings/cas_black.txt +++ b/strings/cas_black.txt @@ -1,13 +1,13 @@ Today, Security killed ____. Security, the clown's breaking into ____. -The Chaplain is worshiping the Church of _____. +Our last Chaplain believed in nothing but _____. What angered the gods this time? Why didn't engineering set up the singularity? What does the traitor steal this time? Cargo: There's a galaxy-wide shortage of _______. I don't care what they called me back on the station, I'm not a traitor. I'm a man of _________. The Syndicate is offering crew members _________ to defect. -Cargo ordered a crate full of _____. +What is Nanotrasen's highest-priority bounty? What is the gray tide protesting this time? If the Space Gods didn't want _________ they wouldn't have given us __________. Why was the death squad sent in? @@ -30,11 +30,10 @@ What made the nuclear operatives fluke? Why did the Chief Engineer disable comms? Every spaceman receives an internals box and ________. What brought the space orgy to a grinding halt? -Scientists are no longer allowed to make _____. +Scientists are no longer allowed to make ______. What was the clown's best joke? The HoP is now hiring assistants for __________. What happens when you emag an emag? -Our gang doesn't wear uniforms. Our gang wears ___________. No matter how many lizards you have, _____ is never acceptable. No, the AI's second law is NOT to serve _____. First CentCom came for the ________. Now they're coming for the __________. @@ -109,5 +108,12 @@ The auxiliary base was disabled after landing in the middle of _______. Xenobiologists have found slimes to be exceptionally responsive to _______. Why did the captain give me a medal? The curator's new exhibit is devoted solely to _________. -There's no ______ on the new escape shuttle, but there is plenty of _________! -What made me sell my soul to the devil? \ No newline at end of file +What made me sell my soul to the devil? +The engineers are testing an experimental supermatter setup involving _________. +I'm __________ in the streets, __________ in the sheets. +What's my family heirloom? +The Lawyer was fired for messaging the entire station a picture of ___________. +On Lavaland, it is rumored that ashwalkers roam, worshipping _________. +How did the traitor die a glorious death? +Nanotrasen's new state-of-the-art emergency shuttle was repurposed from _________ and _________. +What caused my brain trauma? \ No newline at end of file diff --git a/strings/cas_white.txt b/strings/cas_white.txt index 8cf224d1db..3e229862a2 100644 --- a/strings/cas_white.txt +++ b/strings/cas_white.txt @@ -2,6 +2,7 @@ Those motherfucking carp. Having sex in the maintenance tunnels. Space 'Nam. Space lesbians. +Space NEETs. Space Hitler. Space Asshole. Ragin' mages. @@ -57,7 +58,6 @@ Defusing a syndicate bomb with another bomb. Going braindead mid-murder. A petsplosion. Meat spikes. -Collecting the crew's brains. Lopping off the Captain's johnson and shooting it out a pneumatic cannon. The secret monkey technique. Putting the pAI's doorjack where it don't belong. @@ -84,7 +84,6 @@ Paranoia. Putting the boots to him, medium style. ERP-seeking meteors. Paperwork HoPs. -A sexy clown. Rampant vending machines. The prisoner transfer center. Nations. @@ -186,7 +185,6 @@ A big, black shadowling dick. Emagging. Dead lizard storage. Dermal armor. -Energy balls. Fisting somebody until they gib. Alternate uses for defibrillator paddles. Breaking spacetime with thousands of bluespace tomatoes. @@ -197,7 +195,7 @@ Plasmaman strippers. A Quartermaster who WON'T STOP ordering guns. Space lag. Polishing the captain's laser rifle. -That one asshole double agent. +That one asshole nuke op. A surprise visit from Nanotrasen's CEO. The bleeding, dismembered, beautiful corpse of the clown. A glass of ...what? @@ -220,20 +218,18 @@ Welderbombing. Validhunting. Nar'Sie making love to Lord Singulo. Fun. -Crashing the stock market. HONK! -Enough morphine to put the entire station down. +Enough morphine to make the entire station comatose. A defective comdom. Cleanbot. A beaker of dried space carp penis. An Ian storm. -voxtest2. Nuking it from orbit. My senpAI. Harmbatonning. A Nanotrasen D-Notice. TALKING MIMES. -The lusty xenomorph maid, +The lusty xenomorph maid. Using assistants as human shields. Sentient securitrons. Piloting the station into the nearest sun. @@ -247,11 +243,11 @@ Medbay stutterwhores. The scrubbers uncontrollably spewing cum. The lawyer's job. Emoting slowly drawing a gun, then slowly cocking the trigger, then slowly preparing to shoot... -NAR-SIE HAS RISEN. +NAR'SIE HAS RISEN. Pierrot's Throat. A clown bomb. Space bees? -The entire engineering team having unprotected group sex. +Driving the clown car full speed into the engine. IC in OOC. The best cookie. The wizard with his staff inserted into his anus. @@ -276,9 +272,8 @@ Draconic. Riding borgs, cowgirl style. The Voice of God. Overpowered stuns. -Unironically reading library smut. +Unironically enjoying library smut. Spiritual journeys with BZ. -Freon. Deep-fried body parts. Suit sensor unit gas chambers. Moonlighting. @@ -294,4 +289,14 @@ Mindswap. Potassium in the toilet bowls. Giving head to the heads. A lizard wearing cat ears. -DOOR STUCK!! +Precious clown gold. +Dabbing on a pile of corpses. +Tactical chairs. +The sweet, forbidden meat of the gondola. +Turning tricks for holocredits. +A captain that doesn't secure the disk. +A positive moodlet. +A sexy clown. +Razoring the wings off the moths. +Wiring the ethereals into the powernet. +Well-aged miasma. \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index e0acab0d6a..3b9f98b7e2 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -130,6 +130,7 @@ #include "code\__HELPERS\qdel.dm" #include "code\__HELPERS\radiation.dm" #include "code\__HELPERS\radio.dm" +#include "code\__HELPERS\reagents.dm" #include "code\__HELPERS\roundend.dm" #include "code\__HELPERS\sanitize_values.dm" #include "code\__HELPERS\shell.dm" @@ -199,6 +200,7 @@ #include "code\_onclick\hud\picture_in_picture.dm" #include "code\_onclick\hud\plane_master.dm" #include "code\_onclick\hud\radial.dm" +#include "code\_onclick\hud\radial_persistent.dm" #include "code\_onclick\hud\revenanthud.dm" #include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_objects.dm" @@ -246,7 +248,6 @@ #include "code\controllers\subsystem\moods.dm" #include "code\controllers\subsystem\nightshift.dm" #include "code\controllers\subsystem\npcpool.dm" -#include "code\controllers\subsystem\orbit.dm" #include "code\controllers\subsystem\overlays.dm" #include "code\controllers\subsystem\pai.dm" #include "code\controllers\subsystem\parallax.dm" @@ -255,7 +256,6 @@ #include "code\controllers\subsystem\ping.dm" #include "code\controllers\subsystem\radiation.dm" #include "code\controllers\subsystem\radio.dm" -#include "code\controllers\subsystem\religion.dm" #include "code\controllers\subsystem\research.dm" #include "code\controllers\subsystem\server_maint.dm" #include "code\controllers\subsystem\shuttle.dm" @@ -359,6 +359,7 @@ #include "code\datums\components\mood.dm" #include "code\datums\components\nanites.dm" #include "code\datums\components\ntnet_interface.dm" +#include "code\datums\components\orbiter.dm" #include "code\datums\components\paintable.dm" #include "code\datums\components\rad_insulation.dm" #include "code\datums\components\radioactive.dm" @@ -494,6 +495,7 @@ #include "code\datums\wires\autolathe.dm" #include "code\datums\wires\emitter.dm" #include "code\datums\wires\explosive.dm" +#include "code\datums\wires\microwave.dm" #include "code\datums\wires\mulebot.dm" #include "code\datums\wires\particle_accelerator.dm" #include "code\datums\wires\r_n_d.dm" @@ -638,6 +640,10 @@ #include "code\game\machinery\computer\station_alert.dm" #include "code\game\machinery\computer\telecrystalconsoles.dm" #include "code\game\machinery\computer\teleporter.dm" +#include "code\game\machinery\computer\arcade\battle.dm" +#include "code\game\machinery\computer\arcade\minesweeper.dm" +#include "code\game\machinery\computer\arcade\misc_arcade.dm" +#include "code\game\machinery\computer\arcade\orion_trail.dm" #include "code\game\machinery\doors\airlock.dm" #include "code\game\machinery\doors\airlock_electronics.dm" #include "code\game\machinery\doors\airlock_types.dm" @@ -836,12 +842,14 @@ #include "code\game\objects\items\devices\beacon.dm" #include "code\game\objects\items\devices\camera_bug.dm" #include "code\game\objects\items\devices\chameleonproj.dm" +#include "code\game\objects\items\devices\compressionkit.dm" #include "code\game\objects\items\devices\dogborg_sleeper.dm" #include "code\game\objects\items\devices\doorCharge.dm" #include "code\game\objects\items\devices\electroadaptive_pseudocircuit.dm" #include "code\game\objects\items\devices\flashlight.dm" #include "code\game\objects\items\devices\forcefieldprojector.dm" #include "code\game\objects\items\devices\geiger_counter.dm" +#include "code\game\objects\items\devices\glue.dm" #include "code\game\objects\items\devices\gps.dm" #include "code\game\objects\items\devices\instruments.dm" #include "code\game\objects\items\devices\laserpointer.dm" @@ -1234,6 +1242,7 @@ #include "code\modules\antagonists\clockcult\clock_structures\mania_motor.dm" #include "code\modules\antagonists\clockcult\clock_structures\ocular_warden.dm" #include "code\modules\antagonists\clockcult\clock_structures\ratvar_the_clockwork_justicar.dm" +#include "code\modules\antagonists\clockcult\clock_structures\reflector.dm" #include "code\modules\antagonists\clockcult\clock_structures\stargazer.dm" #include "code\modules\antagonists\clockcult\clock_structures\taunting_trail.dm" #include "code\modules\antagonists\clockcult\clock_structures\wall_gear.dm" @@ -1625,6 +1634,7 @@ #include "code\modules\food_and_drinks\food\snacks_burgers.dm" #include "code\modules\food_and_drinks\food\snacks_cake.dm" #include "code\modules\food_and_drinks\food\snacks_egg.dm" +#include "code\modules\food_and_drinks\food\snacks_frozen.dm" #include "code\modules\food_and_drinks\food\snacks_meat.dm" #include "code\modules\food_and_drinks\food\snacks_other.dm" #include "code\modules\food_and_drinks\food\snacks_pastry.dm" @@ -1653,6 +1663,7 @@ #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_burger.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_cake.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_egg.dm" +#include "code\modules\food_and_drinks\recipes\tablecraft\recipes_frozen.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_meat.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_misc.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_pastry.dm" @@ -2098,6 +2109,7 @@ #include "code\modules\mob\living\simple_animal\friendly\gondola.dm" #include "code\modules\mob\living\simple_animal\friendly\lizard.dm" #include "code\modules\mob\living\simple_animal\friendly\mouse.dm" +#include "code\modules\mob\living\simple_animal\friendly\panda.dm" #include "code\modules\mob\living\simple_animal\friendly\penguin.dm" #include "code\modules\mob\living\simple_animal\friendly\pet.dm" #include "code\modules\mob\living\simple_animal\friendly\sloth.dm" @@ -2259,7 +2271,6 @@ #include "code\modules\NTNet\network.dm" #include "code\modules\NTNet\relays.dm" #include "code\modules\NTNet\services\_service.dm" -#include "code\modules\orbit\orbit.dm" #include "code\modules\paperwork\clipboard.dm" #include "code\modules\paperwork\contract.dm" #include "code\modules\paperwork\filingcabinet.dm" @@ -2475,6 +2486,7 @@ #include "code\modules\reagents\chemistry\recipes\others.dm" #include "code\modules\reagents\chemistry\recipes\pyrotechnics.dm" #include "code\modules\reagents\chemistry\recipes\slime_extracts.dm" +#include "code\modules\reagents\chemistry\recipes\special.dm" #include "code\modules\reagents\chemistry\recipes\toxins.dm" #include "code\modules\reagents\reagent_containers\blood_pack.dm" #include "code\modules\reagents\reagent_containers\borghydro.dm" @@ -2768,6 +2780,7 @@ #include "code\modules\vehicles\speedbike.dm" #include "code\modules\vehicles\vehicle_actions.dm" #include "code\modules\vehicles\vehicle_key.dm" +#include "code\modules\vehicles\wheelchair.dm" #include "code\modules\vehicles\cars\car.dm" #include "code\modules\vehicles\cars\clowncar.dm" #include "code\modules\vending\_vending.dm" @@ -2819,7 +2832,6 @@ #include "modular_citadel\code\controllers\configuration\entries\general.dm" #include "modular_citadel\code\controllers\subsystem\job.dm" #include "modular_citadel\code\controllers\subsystem\shuttle.dm" -#include "modular_citadel\code\datums\uplink_items_cit.dm" #include "modular_citadel\code\datums\components\material_container.dm" #include "modular_citadel\code\datums\components\phantomthief.dm" #include "modular_citadel\code\datums\components\souldeath.dm" @@ -2874,8 +2886,6 @@ #include "modular_citadel\code\game\objects\items\vending_items.dm" #include "modular_citadel\code\game\objects\items\circuitboards\machine_circuitboards.dm" #include "modular_citadel\code\game\objects\items\devices\aicard.dm" -#include "modular_citadel\code\game\objects\items\devices\flashlight.dm" -#include "modular_citadel\code\game\objects\items\devices\PDA\PDA.dm" #include "modular_citadel\code\game\objects\items\devices\radio\encryptionkey.dm" #include "modular_citadel\code\game\objects\items\devices\radio\headset.dm" #include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm" @@ -3030,7 +3040,6 @@ #include "modular_citadel\code\modules\research\techweb\_techweb.dm" #include "modular_citadel\code\modules\research\techweb\all_nodes.dm" #include "modular_citadel\code\modules\research\xenobiology\xenobio_camera.dm" -#include "modular_citadel\code\modules\uplink\uplink_items.dm" #include "modular_citadel\code\modules\vehicles\secway.dm" #include "modular_citadel\code\modules\vore\hook-defs_vr.dm" #include "modular_citadel\code\modules\vore\persistence.dm" diff --git a/tools/ss13_genchangelog.py b/tools/ss13_genchangelog.py index 5c77063e96..e97bef7684 100644 --- a/tools/ss13_genchangelog.py +++ b/tools/ss13_genchangelog.py @@ -74,9 +74,9 @@ failed_cache_read = True if os.path.isfile(changelog_cache): try: with open(changelog_cache,encoding='utf-8') as f: - (_, all_changelog_entries) = yaml.load_all(f) + (_, all_changelog_entries) = yaml.load_all(f, Loader=yaml.SafeLoader) failed_cache_read = False - + # Convert old timestamps to newer format. new_entries = {} for _date in all_changelog_entries.keys(): @@ -92,10 +92,10 @@ if os.path.isfile(changelog_cache): except Exception as e: print("Failed to read cache:") print(e, file=sys.stderr) - -if args.dryRun: + +if args.dryRun: changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml') - + if failed_cache_read and os.path.isfile(args.targetFile): from bs4 import BeautifulSoup from bs4.element import NavigableString @@ -111,7 +111,7 @@ if failed_cache_read and os.path.isfile(args.targetFile): if author.endswith('updated:'): author = author[:-8] author = author.strip() - + # Find
    ulT = authorT.next_sibling while(ulT.name != 'ul'): @@ -124,14 +124,14 @@ if failed_cache_read and os.path.isfile(args.targetFile): newdat = {changeT['class'][0] + '': val + ''} if newdat not in changes: changes += [newdat] - + if len(changes) > 0: entry[author] = changes if date in all_changelog_entries: all_changelog_entries[date].update(entry) else: all_changelog_entries[date] = entry - + del_after = [] print('Reading changelogs...') for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")): @@ -142,7 +142,7 @@ for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")): print(' Reading {}...'.format(fileName)) cl = {} with open(fileName, 'r',encoding='utf-8') as f: - cl = yaml.load(f) + cl = yaml.load(f, Loader=yaml.SafeLoader) f.close() if today not in all_changelog_entries: all_changelog_entries[today] = {} @@ -156,23 +156,23 @@ for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")): print(' {0}: Invalid prefix {1}'.format(fileName, change_type), file=sys.stderr) author_entries += [change] new += 1 - all_changelog_entries[today][cl['author']] = author_entries + all_changelog_entries[today][cl['author']] = author_entries if new > 0: print(' Added {0} new changelog entries.'.format(new)) - + if cl.get('delete-after', False): if os.path.isfile(fileName): if args.dryRun: print(' Would delete {0} (delete-after set)...'.format(fileName)) else: del_after += [fileName] - + if args.dryRun: continue - + cl['changes'] = [] with open(fileName, 'w', encoding='utf-8') as f: - yaml.dump(cl, f, default_flow_style=False) - + yaml.dump(cl, f, default_flow_style=False) + targetDir = os.path.dirname(args.targetFile) with open(args.targetFile.replace('.htm', '.dry.htm') if args.dryRun else args.targetFile, 'w', encoding='utf-8') as changelog: @@ -195,18 +195,18 @@ with open(args.targetFile.replace('.htm', '.dry.htm') if args.dryRun else args.t for (css_class, change) in (dictToTuples(e)[0] for e in all_changelog_entries[_date][author]): if change in changes_added: continue write_entry = True - changes_added += [change] + changes_added += [change] author_htm += '\t\t\t\t
  • {change}
  • \n'.format(css_class=css_class, change=change.strip()) author_htm += '\t\t\t
\n' if len(changes_added) > 0: entry_htm += author_htm if write_entry: changelog.write(entry_htm) - + with open(os.path.join(targetDir, 'templates', 'footer.html'), 'r', encoding='utf-8') as h: for line in h: changelog.write(line) - + with open(changelog_cache, 'w') as f: cache_head = 'DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.' diff --git a/tools/travis/build_dependencies.sh b/tools/travis/build_dependencies.sh index 9e594733ea..2c24bdbaaf 100755 --- a/tools/travis/build_dependencies.sh +++ b/tools/travis/build_dependencies.sh @@ -41,19 +41,10 @@ if [ $BUILD_TOOLS = false ] && [ $BUILD_TESTING = false ]; then echo "Setting up MariaDB." rm -rf "$HOME/MariaDB" mkdir -p "$HOME/MariaDB" - wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-client-lgpl/libmariadb2_2.0.0-1_i386.deb - dpkg -x libmariadb2_2.0.0-1_i386.deb /tmp/extract - rm libmariadb2_2.0.0-1_i386.deb - mv /tmp/extract/usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/ - ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so - rm -rf /tmp/extract - - wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-connector-c/libmariadb-dev_2.3.3-1_i386.deb - dpkg -x libmariadb-dev_2.3.3-1_i386.deb /tmp/extract - rm libmariadb-dev_2.3.3-1_i386.deb - mv /tmp/extract/usr/include $HOME/MariaDB/ - #fuck what is this even? - mv $HOME/MariaDB/include/mariadb $HOME/MariaDB/include/mysql + mkdir -p "$HOME/MariaDB/include" + cp /usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/ + ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so + cp -r /usr/include/mariadb $HOME/MariaDB/include/ fi cd artifacts diff --git a/tools/travis/install_build_tools.sh b/tools/travis/install_build_tools.sh index 9dd73f854c..0ea2a605ab 100755 --- a/tools/travis/install_build_tools.sh +++ b/tools/travis/install_build_tools.sh @@ -4,9 +4,8 @@ set -e source dependencies.sh if [ "$BUILD_TOOLS" = true ]; then - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VERSION - pip3 install --user PyYaml -q - pip3 install --user beautifulsoup4 -q + source ~/.nvm/nvm.sh + nvm install $NODE_VERSION + pip3 install --user PyYaml + pip3 install --user beautifulsoup4 fi; - -