diff --git a/.travis.yml b/.travis.yml index 7f74746d15f..694cfb654e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,72 +1,42 @@ -#pretending we're C because otherwise ruby will initialize, even with "language: dm". language: generic -sudo: false +dist: xenial +os: linux git: depth: 1 -cache: - directories: - - $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} - -addons: - apt: - packages: - - libc6-i386 - - libgcc1:i386 - - libstdc++6:i386 - -env: - global: - - BYOND_MAJOR="513" - - BYOND_MINOR="1505" - - BYOND_MACRO_COUNT=4 - matrix: - - DM_MAPFILE="cyberiad" - - DM_MAPFILE="metastation" - - DM_MAPFILE="delta" - - DM_MAPFILE="test_all_maps" - -stages: - - File Checks - - test - -before_script: - - chmod +x ./install-byond.sh - - ./install-byond.sh -script: - - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup - - bash dm.sh -M${DM_MAPFILE} paradise.dme - jobs: include: - # Basic styling/functionality checks - - stage: File Checks - env: + - name: "Run Linters" addons: + apt: + packages: + - python3 + - python3-pip + - python3-setuptools install: - - pip install --user PyYaml -q - - pip install --user beautifulsoup4 -q - before_script: skip + - tools/travis/install_build_deps.sh + - tools/travis/install_dreamchecker.sh script: - shopt -s globstar + - find . -name "*.php" -print0 | xargs -0 -n1 php -l + - find . -name "*.json" -not -path "./nano/node_modules/*" -print0 | xargs -0 python3 ./tools/travis/json_verifier.py + - tools/travis/build_nanoui.sh + - tools/travis/check_grep.sh + - tools/travis/check_changelogs.sh - python3 tools/travis/check_line_endings.py - - (num=$(grep -Ern '\\(red|blue|green|black|italic|bold|b|i[^mc])' code/ | wc -l); echo "$num BYOND text macros (expecting ${BYOND_MACRO_COUNT} or fewer)"; [ $num -le ${BYOND_MACRO_COUNT} ]) - - md5sum -c - <<< "6dc1b6bf583f3bd4176b6df494caa5f1 *html/changelogs/example.yml" - - python tools/ss13_genchangelog.py html/changelog.html html/changelogs + - ~/dreamchecker - # Compile NanoUI to make sure it works - - stage: NanoUI - language: node_js - node_js: - - "9" - env: + - name: "Compile All Maps" addons: - before_install: - - npm install -g gulp-cli - - cd ./nano/ + apt: + packages: + - libstdc++6:i386 + cache: + directories: + - $HOME/BYOND install: - - npm install --loglevel=error - before_script: + - tools/travis/install_byond.sh + - source $HOME/BYOND/byond/bin/byondsetup script: - - node node_modules/gulp/bin/gulp.js --require less-loader + - tools/travis/dm.sh -Mtravis_map_testing paradise.dme diff --git a/README.md b/README.md index eafdb5ffe91..943397b0fa8 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,16 @@ Make sure to set the port to the one you specified in the config.txt, and set the Security box to 'Trusted'. Then press GO and the server should start up and be ready to join. +### Installation (Linux) + +The code is able to run on Linux server side, however the libraries for MySQL and logging do require extra packages. + +For MySQL, run the following: `apt-get install libmysqlclient-dev:i386` + +For RustG, run the following: `apt-get install libssl-dev:i386 pkg-config:i386 zlib1g-dev:i386` + +After installing these packages, these libraries should function as intended. + --- ### UPDATING diff --git a/_build_dependencies.sh b/_build_dependencies.sh new file mode 100644 index 00000000000..24a33ed3644 --- /dev/null +++ b/_build_dependencies.sh @@ -0,0 +1,11 @@ +# This file has all the information on what versions of libraries are thrown into the code +# For dreamchecker +export SPACEMANDMM_TAG=suite-1.2 +# For NanoUI +export NODE_VERSION=9 +# For the scripts in tools +export PHP_VERSION=5.6 +# Byond Major +export BYOND_MAJOR=513 +# Byond Minor +export BYOND_MINOR=1505 diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm index e00aedc8100..07f00c599c3 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm @@ -1241,21 +1241,6 @@ /obj/structure/sign/securearea, /turf/simulated/wall/mineral/plastitanium/explosive, /area/ruin/unpowered/syndicate_lava_base/main) -"cf" = ( -/obj/structure/table/reinforced, -/obj/effect/turf_decal/tile/neutral{ - dir = 1 - }, -/obj/effect/turf_decal/tile/neutral, -/obj/effect/turf_decal/tile/neutral{ - dir = 4 - }, -/obj/effect/turf_decal/tile/neutral{ - dir = 8 - }, -/obj/item/radio/intercom/syndicate, -/turf/simulated/floor/plasteel/dark, -/area/ruin/unpowered/syndicate_lava_base/telecomms) "cg" = ( /obj/machinery/portable_atmospherics/canister/nitrogen, /turf/simulated/floor/engine{ @@ -3529,10 +3514,6 @@ /obj/machinery/alarm/syndicate{ pixel_y = 24 }, -/obj/item/radio/headset/syndicate/alt{ - pixel_x = -3; - pixel_y = 3 - }, /turf/simulated/floor/plasteel/grimy, /area/ruin/unpowered/syndicate_lava_base/dormitories) "hN" = ( @@ -3558,10 +3539,6 @@ /obj/machinery/alarm/syndicate{ pixel_y = 24 }, -/obj/item/radio/headset/syndicate/alt{ - pixel_x = -3; - pixel_y = 3 - }, /turf/simulated/floor/plasteel/grimy, /area/ruin/unpowered/syndicate_lava_base/dormitories) "hR" = ( @@ -4479,10 +4456,6 @@ /obj/structure/table/wood, /obj/item/ammo_box/magazine/m10mm, /obj/item/ammo_box/magazine/sniper_rounds, -/obj/item/radio/headset/syndicate/alt{ - pixel_x = -3; - pixel_y = 3 - }, /turf/simulated/floor/plasteel/grimy, /area/ruin/unpowered/syndicate_lava_base/dormitories) "jB" = ( @@ -6785,7 +6758,6 @@ /obj/machinery/computer/message_monitor{ dir = 1 }, -/obj/item/paper/monitorkey, /turf/simulated/floor/plasteel/dark, /area/ruin/unpowered/syndicate_lava_base/telecomms) "ov" = ( @@ -7400,7 +7372,7 @@ mp mQ nl nJ -cf +nJ ov mn ab diff --git a/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm b/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm index d869d21f539..0f7c36fe634 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm @@ -99,14 +99,14 @@ "m" = ( /obj/structure/closet/crate/freezer, /obj/item/stack/sheet/animalhide/lizard, -/obj/item/reagent_containers/food/snacks/lizardmeat, +/obj/item/reagent_containers/food/snacks/monstermeat/lizardmeat, /turf/simulated/floor/plasteel{ icon_state = "dark" }, /area/ruin/unpowered) "n" = ( /obj/structure/closet/crate/freezer, -/obj/item/reagent_containers/food/snacks/lizardmeat, +/obj/item/reagent_containers/food/snacks/monstermeat/lizardmeat, /obj/machinery/light{ dir = 1 }, @@ -116,7 +116,7 @@ /area/ruin/unpowered) "o" = ( /obj/structure/closet/crate/freezer, -/obj/item/reagent_containers/food/snacks/lizardmeat, +/obj/item/reagent_containers/food/snacks/monstermeat/lizardmeat, /turf/simulated/floor/plasteel{ icon_state = "dark" }, diff --git a/_maps/map_files/cyberiad/z6.dmm b/_maps/map_files/cyberiad/z6.dmm index b2171008b2b..09453cfe542 100644 --- a/_maps/map_files/cyberiad/z6.dmm +++ b/_maps/map_files/cyberiad/z6.dmm @@ -5598,7 +5598,7 @@ }, /area/syndicate_depot/outer) "lZ" = ( -/obj/item/reagent_containers/food/snacks/spiderleg, +/obj/item/reagent_containers/food/snacks/monstermeat/spiderleg, /obj/structure/spider, /turf/simulated/floor/plasteel{ icon_state = "dark" diff --git a/_maps/test_all_maps.dm b/_maps/test_all_maps.dm deleted file mode 100644 index 94bd9bac437..00000000000 --- a/_maps/test_all_maps.dm +++ /dev/null @@ -1,145 +0,0 @@ -// This is for Travis testing. DO NOT SET THIS AS THE GAME'S MAP NORMALLY! - -#if !defined(USING_MAP_DATUM) - // Away missions - #include "map_files\RandomZLevels\academy.dmm" - #include "map_files\RandomZLevels\beach.dmm" - #include "map_files\RandomZLevels\blackmarketpackers.dmm" - #include "map_files\RandomZLevels\centcomAway.dmm" - #include "map_files\RandomZLevels\evil_santa.dmm" - #include "map_files\RandomZLevels\example.dmm" - #include "map_files\RandomZLevels\moonoutpost19.dmm" - #include "map_files\RandomZLevels\spacebattle.dmm" - #include "map_files\RandomZLevels\spacehotel.dmm" - #include "map_files\RandomZLevels\stationCollision.dmm" - #include "map_files\RandomZLevels\terrorspiders.dmm" - #include "map_files\RandomZLevels\undergroundoutpost45.dmm" - #include "map_files\RandomZLevels\wildwest.dmm" - - - // Lavaland Ruins - #include "map_files\RandomRuins\LavaRuins\lavaland_biodome_beach.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_biodome_clown_planet.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_biodome_winter.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_animal_hospital.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_ash_walker1.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_blooddrunk1.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_blooddrunk2.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_blooddrunk3.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_cube.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_cultaltar.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_dead_ratvar.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_envy.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_fountain_hall.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_gluttony.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_greed.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_hermit.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_hierophant.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_pizzaparty.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_pride.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_puzzle.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_random_ripley.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_seed_vault.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_sloth.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_survivalpod.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_swarmer_crash.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_syndicate_base1.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_ufo_crash.dmm" - #include "map_files\RandomRuins\LavaRuins\lavaland_surface_xeno_nest.dmm" - - - // Space Ruins - #include "map_files\RandomRuins\SpaceRuins\abandonedzoo.dmm" - #include "map_files\RandomRuins\SpaceRuins\asteroid1.dmm" - #include "map_files\RandomRuins\SpaceRuins\asteroid2.dmm" - #include "map_files\RandomRuins\SpaceRuins\asteroid3.dmm" - #include "map_files\RandomRuins\SpaceRuins\asteroid4.dmm" - #include "map_files\RandomRuins\SpaceRuins\asteroid5.dmm" - #include "map_files\RandomRuins\SpaceRuins\deepstorage.dmm" - #include "map_files\RandomRuins\SpaceRuins\derelict1.dmm" - #include "map_files\RandomRuins\SpaceRuins\derelict2.dmm" - #include "map_files\RandomRuins\SpaceRuins\derelict3.dmm" - #include "map_files\RandomRuins\SpaceRuins\derelict4.dmm" - #include "map_files\RandomRuins\SpaceRuins\derelict5.dmm" - #include "map_files\RandomRuins\SpaceRuins\emptyshell.dmm" - #include "map_files\RandomRuins\SpaceRuins\gasthelizards.dmm" - #include "map_files\RandomRuins\SpaceRuins\intactemptyship.dmm" - #include "map_files\RandomRuins\SpaceRuins\listeningpost.dmm" - #include "map_files\RandomRuins\SpaceRuins\mechtransport.dmm" - #include "map_files\RandomRuins\SpaceRuins\oldstation.dmm" - #include "map_files\RandomRuins\SpaceRuins\onehalf.dmm" - #include "map_files\RandomRuins\SpaceRuins\spacebar.dmm" - #include "map_files\RandomRuins\SpaceRuins\turretedoutpost.dmm" - #include "map_files\RandomRuins\SpaceRuins\way_home.dmm" - - - // Shuttle Templates - #include "map_files\shuttles\cargo_base.dmm" - #include "map_files\shuttles\emergency_bar.dmm" - #include "map_files\shuttles\emergency_clown.dmm" - #include "map_files\shuttles\emergency_cramped.dmm" - #include "map_files\shuttles\emergency_cyb.dmm" - #include "map_files\shuttles\emergency_dept.dmm" - #include "map_files\shuttles\emergency_meta.dmm" - #include "map_files\shuttles\emergency_mil.dmm" - #include "map_files\shuttles\emergency_narnar.dmm" - #include "map_files\shuttles\emergency_old.dmm" - #include "map_files\shuttles\ferry_base.dmm" - #include "map_files\shuttles\ferry_meat.dmm" - - // Other templates - #include "map_files\templates\spacehotel\n_01.dmm" - #include "map_files\templates\spacehotel\n_02.dmm" - #include "map_files\templates\spacehotel\n_03.dmm" - #include "map_files\templates\spacehotel\n_04.dmm" - #include "map_files\templates\spacehotel\n_05.dmm" - #include "map_files\templates\spacehotel\n_06.dmm" - #include "map_files\templates\spacehotel\n_07.dmm" - #include "map_files\templates\spacehotel\n_08.dmm" - #include "map_files\templates\spacehotel\n_09.dmm" - #include "map_files\templates\spacehotel\n_10.dmm" - #include "map_files\templates\spacehotel\n_11.dmm" - #include "map_files\templates\spacehotel\n_12.dmm" - #include "map_files\templates\spacehotel\n_13.dmm" - #include "map_files\templates\spacehotel\n_14.dmm" - #include "map_files\templates\spacehotel\n_15.dmm" - #include "map_files\templates\spacehotel\n_16.dmm" - #include "map_files\templates\spacehotel\n_17.dmm" - #include "map_files\templates\spacehotel\n_18.dmm" - #include "map_files\templates\spacehotel\n_19.dmm" - - #include "map_files\templates\spacehotel\s_01.dmm" - #include "map_files\templates\spacehotel\s_02.dmm" - #include "map_files\templates\spacehotel\s_03.dmm" - #include "map_files\templates\spacehotel\s_04.dmm" - #include "map_files\templates\spacehotel\s_05.dmm" - #include "map_files\templates\spacehotel\s_06.dmm" - - #include "map_files\templates\light_floor_1.dmm" - #include "map_files\templates\light_floor_2.dmm" - #include "map_files\templates\light_floor_3.dmm" - #include "map_files\templates\medium_shuttle1.dmm" - #include "map_files\templates\medium_shuttle2.dmm" - #include "map_files\templates\medium_shuttle3.dmm" - #include "map_files\templates\shelter_1.dmm" - #include "map_files\templates\shelter_2.dmm" - #include "map_files\templates\small_asteroid_1.dmm" - #include "map_files\templates\small_shuttle_1.dmm" - - // This is pointless, we don't run the server - /*#define MAP_TRANSITION_CONFIG list(AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED, - AWAY_MISSION = UNAFFECTED) - - #define USING_MAP_DATUM /datum/map*/ - -#elif !defined(MAP_OVERRIDE) - #warn a map has already been included. -#endif diff --git a/_maps/travis_map_testing.dm b/_maps/travis_map_testing.dm new file mode 100644 index 00000000000..89fc4ec49ce --- /dev/null +++ b/_maps/travis_map_testing.dm @@ -0,0 +1,157 @@ +// This is for Travis testing. DO NOT SET THIS AS THE GAME'S MAP NORMALLY! + +#if !defined(USING_MAP_DATUM) + // Cyberiad + #include "map_files/Cyberiad/cyberiad.dmm" + #include "map_files/Cyberiad/z2.dmm" + #include "map_files/Cyberiad/z3.dmm" + #include "map_files/Cyberiad/z4.dmm" + #include "map_files/Cyberiad/z6.dmm" + + // Debug Maps + #include "map_files/Debug/singletile.dmm" + #include "map_files/Debug/smoothing.dmm" + + // Delta + #include "map_files/Delta/delta.dmm" + + // Generic Z Levels + #include "map_files/Generic/Lavaland.dmm" + #include "map_files/Generic/z6.dmm" + #include "map_files/Generic/z7.dmm" + + // MetaStation + #include "map_files/MetaStation/MetaStation.v41A.II.dmm" + #include "map_files/MetaStation/z2.dmm" + #include "map_files/MetaStation/z3.dmm" + #include "map_files/MetaStation/z4.dmm" + + // Lavaland Ruins + #include "map_files/RandomRuins/LavaRuins/lavaland_biodome_beach.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk1.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk2.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk3.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_cube.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_cultaltar.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_dead_ratvar.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_envy.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_fountain_hall.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_gluttony.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_golem_ship.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_hermit.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_hierophant.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_pride.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_puzzle.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_random_ripley.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_sloth.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_survivalpod.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_swarmer_crash.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_ufo_crash.dmm" + #include "map_files/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm" + + // Space Ruins + #include "map_files/RandomRuins/SpaceRuins/abandonedzoo.dmm" + #include "map_files/RandomRuins/SpaceRuins/asteroid1.dmm" + #include "map_files/RandomRuins/SpaceRuins/asteroid2.dmm" + #include "map_files/RandomRuins/SpaceRuins/asteroid3.dmm" + #include "map_files/RandomRuins/SpaceRuins/asteroid4.dmm" + #include "map_files/RandomRuins/SpaceRuins/asteroid5.dmm" + #include "map_files/RandomRuins/SpaceRuins/deepstorage.dmm" + #include "map_files/RandomRuins/SpaceRuins/derelict1.dmm" + #include "map_files/RandomRuins/SpaceRuins/derelict2.dmm" + #include "map_files/RandomRuins/SpaceRuins/derelict3.dmm" + #include "map_files/RandomRuins/SpaceRuins/derelict4.dmm" + #include "map_files/RandomRuins/SpaceRuins/derelict5.dmm" + #include "map_files/RandomRuins/SpaceRuins/emptyshell.dmm" + #include "map_files/RandomRuins/SpaceRuins/gasthelizards.dmm" + #include "map_files/RandomRuins/SpaceRuins/intactemptyship.dmm" + #include "map_files/RandomRuins/SpaceRuins/listeningpost.dmm" + #include "map_files/RandomRuins/SpaceRuins/mechtransport.dmm" + #include "map_files/RandomRuins/SpaceRuins/oldstation.dmm" + #include "map_files/RandomRuins/SpaceRuins/onehalf.dmm" + #include "map_files/RandomRuins/SpaceRuins/spacebar.dmm" + #include "map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm" + #include "map_files/RandomRuins/SpaceRuins/way_home.dmm" + #include "map_files/RandomRuins/SpaceRuins/wizardcrash.dmm" + + // Gateway Missions + #include "map_files/RandomZLevels/academy.dmm" + #include "map_files/RandomZLevels/beach.dmm" + #include "map_files/RandomZLevels/blackmarketpackers.dmm" + #include "map_files/RandomZLevels/centcomAway.dmm" + #include "map_files/RandomZLevels/evil_santa.dmm" + #include "map_files/RandomZLevels/example.dmm" + #include "map_files/RandomZLevels/moonoutpost19.dmm" + #include "map_files/RandomZLevels/spacebattle.dmm" + #include "map_files/RandomZLevels/spacehotel.dmm" + #include "map_files/RandomZLevels/stationCollision.dmm" + #include "map_files/RandomZLevels/terrorspiders.dmm" + #include "map_files/RandomZLevels/undergroundoutpost45.dmm" + #include "map_files/RandomZLevels/wildwest.dmm" + + // Shuttles + #include "map_files/shuttles/admin_admin.dmm" + #include "map_files/shuttles/admin_hospital.dmm" + #include "map_files/shuttles/cargo_base.dmm" + #include "map_files/shuttles/emergency_bar.dmm" + #include "map_files/shuttles/emergency_clown.dmm" + #include "map_files/shuttles/emergency_cramped.dmm" + #include "map_files/shuttles/emergency_cyb.dmm" + #include "map_files/shuttles/emergency_dept.dmm" + #include "map_files/shuttles/emergency_meta.dmm" + #include "map_files/shuttles/emergency_mil.dmm" + #include "map_files/shuttles/emergency_narnar.dmm" + #include "map_files/shuttles/emergency_old.dmm" + #include "map_files/shuttles/ferry_base.dmm" + #include "map_files/shuttles/ferry_meat.dmm" + + // Templates + #include "map_files/templates/light_floor_1.dmm" + #include "map_files/templates/light_floor_2.dmm" + #include "map_files/templates/light_floor_3.dmm" + #include "map_files/templates/medium_shuttle1.dmm" + #include "map_files/templates/medium_shuttle2.dmm" + #include "map_files/templates/medium_shuttle3.dmm" + #include "map_files/templates/shelter_1.dmm" + #include "map_files/templates/shelter_2.dmm" + #include "map_files/templates/small_asteroid_1.dmm" + #include "map_files/templates/small_shuttle_1.dmm" + + // Spacehotel Rooms + #include "map_files/templates/spacehotel/n_01.dmm" + #include "map_files/templates/spacehotel/n_02.dmm" + #include "map_files/templates/spacehotel/n_03.dmm" + #include "map_files/templates/spacehotel/n_04.dmm" + #include "map_files/templates/spacehotel/n_05.dmm" + #include "map_files/templates/spacehotel/n_06.dmm" + #include "map_files/templates/spacehotel/n_07.dmm" + #include "map_files/templates/spacehotel/n_08.dmm" + #include "map_files/templates/spacehotel/n_09.dmm" + #include "map_files/templates/spacehotel/n_10.dmm" + #include "map_files/templates/spacehotel/n_11.dmm" + #include "map_files/templates/spacehotel/n_12.dmm" + #include "map_files/templates/spacehotel/n_13.dmm" + #include "map_files/templates/spacehotel/n_14.dmm" + #include "map_files/templates/spacehotel/n_15.dmm" + #include "map_files/templates/spacehotel/n_16.dmm" + #include "map_files/templates/spacehotel/n_17.dmm" + #include "map_files/templates/spacehotel/n_18.dmm" + #include "map_files/templates/spacehotel/n_19.dmm" + #include "map_files/templates/spacehotel/s_01.dmm" + #include "map_files/templates/spacehotel/s_02.dmm" + #include "map_files/templates/spacehotel/s_03.dmm" + #include "map_files/templates/spacehotel/s_04.dmm" + #include "map_files/templates/spacehotel/s_05.dmm" + #include "map_files/templates/spacehotel/s_06.dmm" + +#elif !defined(MAP_OVERRIDE) + #warn a map has already been included. +#endif diff --git a/code/__DEFINES/_spacemandmm.dm b/code/__DEFINES/_spacemandmm.dm new file mode 100644 index 00000000000..ca54ca4b932 --- /dev/null +++ b/code/__DEFINES/_spacemandmm.dm @@ -0,0 +1,26 @@ +// This file contains all the defines related to the spacemanDMM linter (dreamchecker). When running under normal conditions, BYOND will ignore all these +#ifdef SPACEMAN_DMM + #define RETURN_TYPE(X) set SpacemanDMM_return_type = X + #define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X + #define UNLINT(X) SpacemanDMM_unlint(X) + #define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X + #define SHOULD_NOT_SLEEP(X) + #define SHOULD_BE_PURE(X) + #define PRIVATE_PROC(X) + #define PROTECTED_PROC(X) + #define VAR_FINAL var/SpacemanDMM_final + #define VAR_PRIVATE var + #define VAR_PROTECTED var +#else + #define RETURN_TYPE(X) + #define SHOULD_CALL_PARENT(X) + #define UNLINT(X) X + #define SHOULD_NOT_OVERRIDE(X) + #define SHOULD_NOT_SLEEP(X) + #define SHOULD_BE_PURE(X) + #define PRIVATE_PROC(X) + #define PROTECTED_PROC(X) + #define VAR_FINAL var + #define VAR_PRIVATE var + #define VAR_PROTECTED var +#endif diff --git a/code/__DEFINES/clothing.dm b/code/__DEFINES/clothing.dm index c39ce0947de..8bebe478637 100644 --- a/code/__DEFINES/clothing.dm +++ b/code/__DEFINES/clothing.dm @@ -78,7 +78,7 @@ //flags for covering body parts #define GLASSESCOVERSEYES 1 -#define MASKCOVERSEYES 2 // get rid of some of the other retardation in these flags +#define MASKCOVERSEYES 2 // get rid of some of the other mess in these flags #define HEADCOVERSEYES 4 // feel free to realloc these numbers for other purposes #define MASKCOVERSMOUTH 8 // on other items, these are just for mask/head #define HEADCOVERSMOUTH 16 diff --git a/code/__DEFINES/logs.dm b/code/__DEFINES/logs.dm index a8a4a457c7c..25d1fac7323 100644 --- a/code/__DEFINES/logs.dm +++ b/code/__DEFINES/logs.dm @@ -3,4 +3,4 @@ #define CONVERSION_LOG "Conversion" #define SAY_LOG "Say" #define EMOTE_LOG "Emote" -#define MISC_LOG "Misc" \ No newline at end of file +#define MISC_LOG "Misc" diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 7eaaa86747e..39a56566315 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -345,7 +345,7 @@ #define MOUSE_OPACITY_OPAQUE 2 // Defib stats -#define DEFIB_TIME_LIMIT 120 +#define DEFIB_TIME_LIMIT 300 #define DEFIB_TIME_LOSS 60 //different types of atom colorations diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 300d3a41fc0..b1773ba10d5 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -66,6 +66,7 @@ #define INIT_ORDER_TIMER 1 #define INIT_ORDER_DEFAULT 0 #define INIT_ORDER_AIR -1 +#define INIT_ORDER_SUN -2 #define INIT_ORDER_MINIMAP -3 #define INIT_ORDER_ASSETS -4 #define INIT_ORDER_ICON_SMOOTHING -5 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 263f7a9b86f..8de2f30ad2f 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -1,4 +1,5 @@ /proc/get_area(atom/A) + RETURN_TYPE(/area) if(isarea(A)) return A var/turf/T = get_turf(A) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index fe904e6c2ed..4e11dbf4140 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -570,6 +570,18 @@ world /proc/BlendRGBasHSV(rgb1, rgb2, amount) return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount) +//Returns the perceived brightness of a color. +//https://en.wikipedia.org/wiki/Relative_luminance +//https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color +/proc/getLuminance(color) + var/list/RGB = ReadRGB(color) + var/R = RGB[1] + var/G = RGB[2] + var/B = RGB[2] + + var/Y = (0.2126 * R) + (0.7152 * G) + (0.0722 * B) + return Clamp((Y * 0.01), 0, 1) //Returns the brightness of a color in decimal percentage format. Can multiply light_power by this to receive 100% brightness or a lower brightness. Not a higher brightness. + /proc/HueToAngle(hue) // normalize hsv in case anything is screwy if(hue < 0 || hue >= 1536) hue %= 1536 diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 8f0fa4f5131..6444ca32b69 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -277,8 +277,8 @@ This is always put in the attack log. /proc/add_attack_logs(atom/user, target, what_done, custom_level) if(islist(target)) // Multi-victim adding var/list/targets = target - for(var/mob/M in targets) - add_attack_logs(user, M, what_done, custom_level) + for(var/t in targets) + add_attack_logs(user, t, what_done, custom_level) return var/user_str = key_name_log(user) + COORD(user) @@ -454,8 +454,8 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list()) /proc/do_after_once_checks(cache_key) if(GLOB.do_after_once_tracker[cache_key] && GLOB.do_after_once_tracker[cache_key] == DOAFTERONCE_MAGIC) GLOB.do_after_once_tracker[cache_key] = FALSE - return FALSE - return TRUE + return TRUE + return FALSE /proc/is_species(A, species_datum) . = FALSE diff --git a/code/_compile_options.dm b/code/_compile_options.dm index bd7e6484bdf..536ea01cc96 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -28,4 +28,4 @@ This may require updating to a beta release. #endif // Macros that must exist before world.dm -#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat +// #define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index e03c0f0187d..f257f2b4895 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -179,9 +179,9 @@ var/title = name if(can_fire) - title = "\[[state_letter()]][title]" + title = "[state_colour()]\[[state_letter()]][title]" - stat(title, "[state_colour()][statclick.update(msg)]") + stat(title, statclick.update(msg)) /datum/controller/subsystem/proc/state_letter() switch(state) diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index 1a7ae8ae81a..3612faa4a7e 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -36,7 +36,7 @@ SUBSYSTEM_DEF(events) E.process() for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR) - var/list/datum/event_container/EC = event_containers[i] + var/datum/event_container/EC = event_containers[i] EC.process() /datum/controller/subsystem/events/proc/event_complete(var/datum/event/E) @@ -65,7 +65,7 @@ SUBSYSTEM_DEF(events) log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].") /datum/controller/subsystem/events/proc/delay_events(var/severity, var/delay) - var/list/datum/event_container/EC = event_containers[severity] + var/datum/event_container/EC = event_containers[severity] EC.next_event_time += delay /datum/controller/subsystem/events/proc/Interact(var/mob/living/user) diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index b465c65c441..6f7894ca428 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -10,7 +10,7 @@ SUBSYSTEM_DEF(jobs) var/list/type_occupations = list() //Dict of all jobs, keys are types var/list/prioritized_jobs = list() // List of jobs set to priority by HoP/Captain var/list/id_change_records = list() // List of all job transfer records - var/list/id_change_counter = 1 + var/id_change_counter = 1 //Players who need jobs var/list/unassigned = list() //Debug info @@ -39,8 +39,6 @@ SUBSYSTEM_DEF(jobs) var/datum/job/job = new J() if(!job) continue - if(!job.faction in faction) - continue occupations += job name_occupations[job.title] = job type_occupations[J] = job @@ -138,7 +136,7 @@ SUBSYSTEM_DEF(jobs) if(flag && !(flag in player.client.prefs.be_special)) Debug("FOC flag failed, Player: [player], Flag: [flag], ") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) Debug("FOC incompatbile with antagonist role, Player: [player]") continue if(player.client.prefs.GetJobDepartment(job, level) & job.flag) @@ -180,7 +178,7 @@ SUBSYSTEM_DEF(jobs) Debug("GRJ player has disability rendering them ineligible for job, Player: [player]") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) Debug("GRJ incompatible with antagonist role, Player: [player], Job: [job.title]") continue @@ -357,7 +355,7 @@ SUBSYSTEM_DEF(jobs) Debug("DO player has disability rendering them ineligible for job, Player: [player], Job:[job.title]") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) Debug("DO incompatible with antagonist role, Player: [player], Job:[job.title]") continue @@ -622,7 +620,9 @@ SUBSYSTEM_DEF(jobs) if(tgtcard.assignment && tgtcard.assignment == job.title) jobs_to_formats[job.title] = "disabled" // the job they already have is pre-selected else if(!job.would_accept_job_transfer_from_player(M)) - jobs_to_formats[job.title] = "linkDiscourage" // karma jobs they don't have available are discouraged + jobs_to_formats[job.title] = "linkDiscourage" // jobs which are karma-locked and not unlocked for this player are discouraged + else if((job.title in GLOB.command_positions) && istype(M) && M.client && job.available_in_playtime(M.client)) + jobs_to_formats[job.title] = "linkDiscourage" // command jobs which are playtime-locked and not unlocked for this player are discouraged else if(job.total_positions && !job.current_positions && job.title != "Civilian") jobs_to_formats[job.title] = "linkEncourage" // jobs with nobody doing them at all are encouraged else if(job.total_positions >= 0 && job.current_positions >= job.total_positions) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 17174b02468..67e2b5c5e88 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -32,5 +32,90 @@ SUBSYSTEM_DEF(mapping) return ..() + +/datum/controller/subsystem/mapping/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins) + if(!z_levels || !z_levels.len) + WARNING("No Z levels provided - Not generating ruins") + return + + for(var/zl in z_levels) + var/turf/T = locate(1, 1, zl) + if(!T) + WARNING("Z level [zl] does not exist - Not generating ruins") + return + + var/list/ruins = potentialRuins.Copy() + + var/list/forced_ruins = list() //These go first on the z level associated (same random one by default) + var/list/ruins_availible = list() //we can try these in the current pass + var/forced_z //If set we won't pick z level and use this one instead. + + //Set up the starting ruin list + for(var/key in ruins) + var/datum/map_template/ruin/R = ruins[key] + if(R.cost > budget) //Why would you do that + continue + if(R.always_place) + forced_ruins[R] = -1 + if(R.unpickable) + continue + ruins_availible[R] = R.placement_weight + + while(budget > 0 && (ruins_availible.len || forced_ruins.len)) + var/datum/map_template/ruin/current_pick + var/forced = FALSE + if(forced_ruins.len) //We have something we need to load right now, so just pick it + for(var/ruin in forced_ruins) + current_pick = ruin + if(forced_ruins[ruin] > 0) //Load into designated z + forced_z = forced_ruins[ruin] + forced = TRUE + break + else //Otherwise just pick random one + current_pick = pickweight(ruins_availible) + + var/placement_tries = PLACEMENT_TRIES + var/failed_to_place = TRUE + var/z_placed = 0 + while(placement_tries > 0) + placement_tries-- + z_placed = pick(z_levels) + if(!current_pick.try_to_place(forced_z ? forced_z : z_placed,whitelist)) + continue + else + failed_to_place = FALSE + break + + //That's done remove from priority even if it failed + if(forced) + //TODO : handle forced ruins with multiple variants + forced_ruins -= current_pick + forced = FALSE + + if(failed_to_place) + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.id == current_pick.id) + ruins_availible -= R + log_world("Failed to place [current_pick.name] ruin.") + else + budget -= current_pick.cost + if(!current_pick.allow_duplicates) + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.id == current_pick.id) + ruins_availible -= R + if(current_pick.never_spawn_with) + for(var/blacklisted_type in current_pick.never_spawn_with) + for(var/possible_exclusion in ruins_availible) + if(istype(possible_exclusion,blacklisted_type)) + ruins_availible -= possible_exclusion + forced_z = 0 + + //Update the availible list + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.cost > budget) + ruins_availible -= R + + log_world("Ruin loader finished with [budget] left to spend.") + /datum/controller/subsystem/mapping/Recover() flags |= SS_NO_INIT diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index da3d91c1de1..14a9b507977 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -223,11 +223,12 @@ SUBSYSTEM_DEF(shuttle) return 0 //dock successful -/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed) +/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed, mob/user) var/obj/docking_port/mobile/M = getShuttle(shuttleId) var/obj/docking_port/stationary/D = getDock(dockId) if(!M) return 1 + M.last_caller = user // Save the caller of the shuttle for later logging if(timed) if(M.request(D)) return 2 diff --git a/code/controllers/subsystem/sun.dm b/code/controllers/subsystem/sun.dm index 6cfb52f2d25..b9843c57b68 100644 --- a/code/controllers/subsystem/sun.dm +++ b/code/controllers/subsystem/sun.dm @@ -1,19 +1,28 @@ SUBSYSTEM_DEF(sun) name = "Sun" wait = 600 - flags = SS_NO_TICK_CHECK|SS_NO_INIT + flags = SS_NO_TICK_CHECK + init_order = INIT_ORDER_SUN var/angle var/dx var/dy var/rate var/list/solars = list() -/datum/controller/subsystem/sun/PreInit() +/datum/controller/subsystem/sun/Initialize(start_timeofday) + // Lets work out an angle for the "sun" to rotate around the station angle = rand (0,360) // the station position to the sun is randomised at round start rate = rand(50,200)/100 // 50% - 200% of standard rotation if(prob(50)) // same chance to rotate clockwise than counter-clockwise rate = -rate + // Solar consoles need to load after machines init, so this handles that + for(var/obj/machinery/power/solar_control/SC in solars) + SC.setup() + + return ..() + + /datum/controller/subsystem/sun/stat_entry(msg) ..("P:[solars.len]") diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index bbc73cfed14..b092271fc96 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -97,7 +97,7 @@ SUBSYSTEM_DEF(ticker) mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result else game_finished |= mode.check_finished() - if(game_finished) + if(game_finished || force_ending) current_state = GAME_STATE_FINISHED if(GAME_STATE_FINISHED) current_state = GAME_STATE_FINISHED @@ -309,15 +309,12 @@ SUBSYSTEM_DEF(ticker) cinematic.mouse_opacity = MOUSE_OPACITY_TRANSPARENT cinematic.screen_loc = "1,0" - var/obj/structure/bed/temp_buckle = new(src) if(station_missed) for(var/mob/M in GLOB.mob_list) - M.buckled = temp_buckle //buckles the mob so it can't do anything if(M.client) M.client.screen += cinematic //show every client the cinematic else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" for(var/mob/M in GLOB.mob_list) - M.buckled = temp_buckle if(M.stat != DEAD) var/turf/T = get_turf(M) if(T && is_station_level(T.z) && !istype(M.loc, /obj/structure/closet/secure_closet/freezer)) @@ -387,8 +384,6 @@ SUBSYSTEM_DEF(ticker) //Otherwise if its a verb it will continue on afterwards. spawn(300) QDEL_NULL(cinematic) //end the cinematic - if(temp_buckle) - qdel(temp_buckle) //release everybody diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 0a14b0e9476..8e1a9d8bcce 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -62,15 +62,15 @@ if(sorted_laws.len) return - for(var/ion_law in ion_laws) - sorted_laws += ion_law - - for(var/evil_law in devil_laws) - sorted_laws += evil_law - if(zeroth_law) sorted_laws += zeroth_law + for(var/ion_law in ion_laws) + sorted_laws += ion_law + + for(var/evil_law in devil_laws) + sorted_laws += evil_law + var/index = 1 for(var/datum/ai_law/inherent_law in inherent_laws) inherent_law.index = index++ @@ -133,12 +133,12 @@ for(var/datum/ai_law/AL in devil_laws) if(AL.law == law) return - + var/new_law = new/datum/ai_law/sixsixsix(law) devil_laws += new_law if(state_devil.len < devil_laws.len) state_devil += 1 - + sorted_laws.Cut() /datum/ai_laws/proc/add_ion_law(var/law) @@ -209,9 +209,9 @@ /datum/ai_law/ion/delete_law(var/datum/ai_laws/laws) laws.internal_delete_law(laws.ion_laws, laws.state_ion, src) - + /datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws) - laws.internal_delete_law(laws.devil_laws, laws.state_devil, src) + laws.internal_delete_law(laws.devil_laws, laws.state_devil, src) /datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws) laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index fa8bb1db9e2..7bfc79e4e71 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -624,7 +624,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001) clothes_s = new /icon('icons/mob/uniform.dmi', "syndicate_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY) - else if(H.mind && H.mind.assigned_role in get_all_centcom_jobs()) + else if(H.mind && (H.mind.assigned_role in get_all_centcom_jobs())) clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) else diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 00054349e36..6a183987a30 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -5,7 +5,7 @@ /// Status traits attached to this datum var/list/status_traits var/list/comp_lookup - var/list/signal_procs + var/list/list/datum/callback/signal_procs var/signal_enabled = FALSE var/datum_flags = NONE var/var_edited = FALSE //Warranty void if seal is broken diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm index cacd229c429..02f36b532d7 100644 --- a/code/datums/diseases/brainrot.dm +++ b/code/datums/diseases/brainrot.dm @@ -30,7 +30,7 @@ affected_mob.emote("stare") if(prob(2)) affected_mob.emote("drool") - if(prob(10) && affected_mob.getBrainLoss()<=98)//shouldn't retard you to death now + if(prob(10) && affected_mob.getBrainLoss()<=98)//shouldn't brainpain you to death now affected_mob.adjustBrainLoss(2) if(prob(2)) to_chat(affected_mob, "Your try to remember something important...but can't.") @@ -40,7 +40,7 @@ affected_mob.emote("stare") if(prob(2)) affected_mob.emote("drool") - if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't retard you to death now + if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't brainpain you to death now affected_mob.adjustBrainLoss(3) if(prob(2)) to_chat(affected_mob, "Strange buzzing fills your head, removing all thoughts.") diff --git a/code/datums/diseases/critical.dm b/code/datums/diseases/critical.dm index 8dc910e3baf..3afb48ce534 100644 --- a/code/datums/diseases/critical.dm +++ b/code/datums/diseases/critical.dm @@ -199,4 +199,4 @@ affected_mob.emote("collapse") if(prob(12)) to_chat(affected_mob, "You feel [pick("tired", "exhausted", "sluggish")].") - affected_mob.Slowed(rand(4, 16)) \ No newline at end of file + affected_mob.Slowed(rand(4, 16)) diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index 158324e72f1..bb85f62199a 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -9,7 +9,7 @@ viable_mobtypes = list(/mob/living/carbon/human) disease_flags = CAN_CARRY|CAN_RESIST|CURABLE permeability_mod = 0.75 - desc = "Some speculate, that this virus is the cause of Wizard Federation existance. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition." + desc = "Some speculate, that this virus is the cause of Wizard Federation existance. Subjects affected show the signs of dementia, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition." severity = HARMFUL required_organs = list(/obj/item/organ/external/head) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 135114c11f9..add68cd51a7 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -54,14 +54,13 @@ var/linglink var/datum/vampire/vampire //vampire holder var/datum/abductor/abductor //abductor holder - var/datum/devilinfo/devilinfo //devil holder var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD var/datum/mindslaves/som //stands for slave or master...hush.. var/datum/devilinfo/devilinfo //Information about the devil, if any. - var/damnation_type = 0 - var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src + var/damnation_type = 0 + var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src var/hasSoul = TRUE var/rev_cooldown = 0 @@ -547,7 +546,7 @@ var/mob/def_target = null var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain) if(objective&&(objective.type in objective_list) && objective:target) - def_target = objective:target.current + def_target = objective.target.current possible_targets = sortAtom(possible_targets) possible_targets += "Free objective" diff --git a/code/datums/mutable_appearance.dm b/code/datums/mutable_appearance.dm index 0887290a6f4..4d870e1296c 100644 --- a/code/datums/mutable_appearance.dm +++ b/code/datums/mutable_appearance.dm @@ -22,5 +22,4 @@ /mutable_appearance/clean/New() . = ..() alpha = 255 - opacity = 1 transform = null diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index db5cca6e9ec..416c4f9c02d 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -1,5 +1,5 @@ /datum/outfit - var/name = "Naked" + var/name = "SOMEBODY FORGOT TO SET A NAME, NOTIFY A CODER" var/collect_not_del = FALSE var/uniform = null @@ -33,6 +33,9 @@ var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters +/datum/outfit/naked + name = "Naked" + /datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) //to be overriden for customization depending on client prefs,species etc return diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 3b136dcf92c..732c55e3fbe 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -541,7 +541,7 @@ P.attack_self(H) // activate them, display musical notes effect /datum/outfit/admin/soviet - + name = "Soviet Generic" gloves = /obj/item/clothing/gloves/combat uniform = /obj/item/clothing/under/soviet back = /obj/item/storage/backpack/satchel @@ -771,6 +771,7 @@ apply_to_card(I, H, get_all_accesses(), "Space Explorer") /datum/outfit/admin/hardsuit + name = "Hardsuit Generic" back = /obj/item/tank/jetpack/oxygen mask = /obj/item/clothing/mask/breath shoes = /obj/item/clothing/shoes/magboots @@ -823,6 +824,7 @@ /datum/outfit/admin/tournament + name = "Tournament Generic" suit = /obj/item/clothing/suit/armor/vest shoes = /obj/item/clothing/shoes/black head = /obj/item/clothing/head/helmet/thunderdome diff --git a/code/datums/radio.dm b/code/datums/radio.dm index b748a9f9229..efeebc7c973 100644 --- a/code/datums/radio.dm +++ b/code/datums/radio.dm @@ -1,7 +1,7 @@ /datum/radio_frequency var/frequency as num - var/list/list/obj/devices = list() + var/list/obj/devices = list() /datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null) var/turf/start_point @@ -108,7 +108,7 @@ . = "Domestic Animal" else . = "Unidentifiable" - + //callback used by objects to react to incoming radio signals /obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param) return null diff --git a/code/datums/spell.dm b/code/datums/spell.dm index e367e2d9aa4..6b114971258 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -241,7 +241,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) before_cast(targets) invocation() if(user && user.ckey) - add_attack_logs(user, null, "cast the spell [name]", ATKLOG_ALL) + add_attack_logs(user, targets, "cast the spell [name]", ATKLOG_ALL) spawn(0) if(charge_type == "recharge" && recharge) start_recharge() diff --git a/code/datums/spells/lichdom.dm b/code/datums/spells/lichdom.dm index 3c70ddbbdae..26c7124edfd 100644 --- a/code/datums/spells/lichdom.dm +++ b/code/datums/spells/lichdom.dm @@ -92,7 +92,7 @@ if(!marked_item) //linking item to the spell message = "" for(var/obj/item in hand_items) - if(ABSTRACT in item.flags || NODROP in item.flags) + if((ABSTRACT in item.flags) || (NODROP in item.flags)) continue marked_item = item to_chat(M, "You begin to focus your very being into the [item.name]...") diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm index d0c052649d9..11b0a75b275 100644 --- a/code/datums/spells/mime.dm +++ b/code/datums/spells/mime.dm @@ -165,4 +165,4 @@ /obj/item/spellbook/oneuse/mime/greaterwall spell = /obj/effect/proc_holder/spell/targeted/forcewall/mime spellname = "Invisible Greater Wall" - desc = "It contains illustrations of the great walls of human history." \ No newline at end of file + desc = "It contains illustrations of the great walls of human history." diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm index aaef2229856..c3301f4d6ab 100644 --- a/code/datums/spells/summonitem.dm +++ b/code/datums/spells/summonitem.dm @@ -41,7 +41,7 @@ else message = "You must hold the desired item in your hands to mark it for recall." - else if(marked_item && marked_item in hand_items) //unlinking item to the spell + else if(marked_item && (marked_item in hand_items)) //unlinking item to the spell message = "You remove the mark on [marked_item] to use elsewhere." name = "Instant Summons" marked_item = null @@ -75,7 +75,7 @@ B.transfer_identity(C) C.death() add_attack_logs(target, C, "Magically debrained INTENT: [uppertext(target.a_intent)]")*/ - if(C.stomach_contents && item_to_retrieve in C.stomach_contents) + if(C.stomach_contents && (item_to_retrieve in C.stomach_contents)) C.stomach_contents -= item_to_retrieve for(var/X in C.bodyparts) var/obj/item/organ/external/part = X diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 5ded7fa43a4..61decede9bc 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -190,7 +190,7 @@ L.adjustBrainLoss(-3.5) L.adjustCloneLoss(-1) //Becasue apparently clone damage is the bastion of all health if(ishuman(L)) - var/var/mob/living/carbon/human/H = L + var/mob/living/carbon/human/H = L for(var/obj/item/organ/external/E in H.bodyparts) if(prob(10)) E.mend_fracture() diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 91e68da427b..15c6f3fb2c0 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1204,7 +1204,7 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY containername = "hydroponics crate" announce_beacons = list("Hydroponics" = list("Hydroponics")) -/datum/supply_packs/misc/hydroponics/hydrotank +/datum/supply_packs/organic/hydroponics/hydrotank name = "Hydroponics Watertank Crate" contains = list(/obj/item/watertank) cost = 10 diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index a5155cceb4a..a0c9a19e4b0 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -108,7 +108,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) return desc /datum/uplink_item/proc/buy(var/obj/item/uplink/hidden/U, var/mob/user) - ..() if(!istype(U)) return 0 diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index b7036f9fbdc..fb8ca665906 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -7,7 +7,7 @@ /proc/key_name_helper(whom, include_name, include_link = FALSE, type = null) if(include_link != FALSE && include_link != TRUE) - log_runtime(EXCEPTION("Key_name was called with an incorrect include_link [include_link]"), src) + log_runtime(EXCEPTION("Key_name was called with an incorrect include_link [include_link]")) var/mob/M var/client/C diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm index 2ca607921ff..8f65ac634f4 100644 --- a/code/game/area/ai_monitored.dm +++ b/code/game/area/ai_monitored.dm @@ -3,16 +3,14 @@ var/obj/machinery/camera/motioncamera = null -/area/ai_monitored/New() - ..() +/area/ai_monitored/LateInitialize() + . = ..() // locate and store the motioncamera - spawn (20) // spawn on a delay to let turfs/objs load - for(var/obj/machinery/camera/M in src) - if(M.isMotion()) - motioncamera = M - M.area_motion = src - return - return + for(var/obj/machinery/camera/M in src) + if(M.isMotion()) + motioncamera = M + M.area_motion = src + break /area/ai_monitored/Entered(atom/movable/O) ..() diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index de42b5b253f..c06dc24c545 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -125,6 +125,10 @@ add_fingerprint(usr) return +/obj/machinery/dna_scannernew/Destroy() + eject_occupant() + return ..() + /obj/machinery/dna_scannernew/proc/eject_occupant() src.go_out() for(var/obj/O in src) diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index f74d0c7d2a0..8858da3fa82 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -30,7 +30,7 @@ * Is the gene active in this mob's DNA? */ /datum/dna/gene/proc/is_active(var/mob/M) - return M.active_genes && type in M.active_genes + return M.active_genes && (type in M.active_genes) // Return 1 if we can activate. // HANDLE MUTCHK_FORCED HERE! diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 3d794f1a70d..82271d0865a 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -175,7 +175,7 @@ var/cword = pick(words) words.Remove(cword) var/suffix = copytext(cword,length(cword)-1,length(cword)) - while(length(cword)>0 && suffix in list(".",",",";","!",":","?")) + while(length(cword)>0 && (suffix in list(".",",",";","!",":","?"))) cword = copytext(cword,1 ,length(cword)-1) suffix = copytext(cword,length(cword)-1,length(cword) ) if(length(cword)) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 893c2e0e8ac..6128c22f66d 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -3,7 +3,6 @@ var/interceptname = "" switch(report) if(0) - ..() return if(1) interceptname = "Level 5-6 Biohazard Response Procedures" diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 6293fd919c5..886975a2c92 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -30,7 +30,7 @@ atmosblock = FALSE air_update_turf(1) GLOB.blobs -= src - if(isturf(loc)) //Necessary because Expand() is retarded and spawns a blob and then deletes it + if(isturf(loc)) //Necessary because Expand() is screwed up and spawns a blob and then deletes it playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) return ..() diff --git a/code/game/gamemodes/changeling/powers/swap_form.dm b/code/game/gamemodes/changeling/powers/swap_form.dm index e0fc1107729..0e02df12d88 100644 --- a/code/game/gamemodes/changeling/powers/swap_form.dm +++ b/code/game/gamemodes/changeling/powers/swap_form.dm @@ -18,7 +18,7 @@ if((NOCLONE || SKELETON || HUSK) in target.mutations) to_chat(user, "DNA of [target] is ruined beyond usability!") return - if(!istype(target) || issmall(target) || NO_DNA in target.dna.species.species_traits) + if(!istype(target) || issmall(target) || (NO_DNA in target.dna.species.species_traits)) to_chat(user, "[target] is not compatible with this ability.") return if(target.mind.changeling) diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index 80b889a5bfb..f1a188022a0 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -155,12 +155,12 @@ /datum/game_mode/cult/proc/get_possible_sac_targets() var/list/possible_sac_targets = list() for(var/mob/living/carbon/human/player in GLOB.player_list) - if(player.mind && !is_convertable_to_cult(player.mind) && (player.stat != DEAD)) + if(player.mind && !is_convertable_to_cult(player.mind) && (player.stat != DEAD) && (!player.mind.offstation_role) ) possible_sac_targets += player.mind if(!possible_sac_targets.len) //There are no living Unconvertables on the station. Looking for a Sacrifice Target among the ordinary crewmembers for(var/mob/living/carbon/human/player in GLOB.player_list) - if(is_secure_level(player.z)) //We can't sacrifice people that are on the centcom z-level + if(is_secure_level(player.z) || player.mind.offstation_role) //We can't sacrifice people that are on the centcom z-level or offstation roles continue if(player.mind && !(player.mind in cult) && (player.stat != DEAD))//make DAMN sure they are not dead possible_sac_targets += player.mind diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 290d873bcf3..8c83c88f3d0 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -332,10 +332,12 @@ GLOBAL_LIST_EMPTY(teleport_runes) user.forceMove(get_turf(actual_selected_rune)) var/mob/living/carbon/human/H = user if(user.z != T.z) - H.bleed(5) + if(istype(H)) + H.bleed(5) user.apply_damage(5, BRUTE) else - H.bleed(rand(5,10)) + if(istype(H)) + H.bleed(rand(5,10)) else fail_invoke() @@ -720,7 +722,7 @@ GLOBAL_LIST_EMPTY(teleport_runes) log_game("Astral Communion rune failed - more than one user") return list() var/turf/T = get_turf(src) - if(!user in T.contents) + if(!(user in T.contents)) to_chat(user, "You must be standing on top of [src]!") log_game("Astral Communion rune failed - user not standing on rune") return list() @@ -832,7 +834,8 @@ GLOBAL_LIST_EMPTY(teleport_runes) fail_invoke() log_game("Summon Cultist rune failed - target in away mission") return - if((cultist_to_summon.reagents.has_reagent("holywater") || cultist_to_summon.restrained()) && invokers.len < 3) + var/hard_summon = (cultist_to_summon.reagents && cultist_to_summon.reagents.has_reagent("holywater")) || cultist_to_summon.restrained() + if(hard_summon && invokers.len < 3) to_chat(user, "The summoning of [cultist_to_summon] is being blocked somehow! You need 3 chanters to counter it!") fail_invoke() new /obj/effect/temp_visual/cult/sparks(get_turf(cultist_to_summon)) //observer warning @@ -840,7 +843,7 @@ GLOBAL_LIST_EMPTY(teleport_runes) return ..() - if(cultist_to_summon.reagents.has_reagent("holywater") || cultist_to_summon.restrained()) + if(hard_summon) summontime = 20 if(do_after(user, summontime, target = loc)) diff --git a/code/game/gamemodes/devil/game_mode.dm b/code/game/gamemodes/devil/game_mode.dm index dd67ccc0349..74ff27468cc 100644 --- a/code/game/gamemodes/devil/game_mode.dm +++ b/code/game/gamemodes/devil/game_mode.dm @@ -17,7 +17,7 @@ to_chat(world,text) /datum/game_mode/proc/auto_declare_completion_devils() - /var/text = "" + var/text = "" if(devils.len) text += "
The devils were:" for(var/D in devils) diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm index 1780881a51d..4adf5dc0367 100644 --- a/code/game/gamemodes/factions.dm +++ b/code/game/gamemodes/factions.dm @@ -24,7 +24,7 @@ var/uplink_contents // the contents of the uplink /datum/faction/syndicate/proc/assign_objectives(var/datum/mind/traitor) - ..() + return /* ----- Begin defining syndicate factions ------ */ diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 0981ec72a51..2b604839c62 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -164,11 +164,11 @@ if(ishuman(M)) if(!M.stat) surviving_humans++ - if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations) + if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations)) escaped_humans++ if(!M.stat) surviving_total++ - if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations) + if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations)) escaped_total++ if(M.loc && M.loc.loc && M.loc.loc.type == SSshuttle.emergency.areaInstance.type && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index ad15da69412..c1a907f9191 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -186,7 +186,7 @@ var/unlock_sound //Sound played when an ability is unlocked var/uses -/datum/AI_Module/proc/upgrade(mob/living/silicon/AI/AI) //Apply upgrades! +/datum/AI_Module/proc/upgrade(mob/living/silicon/ai/AI) //Apply upgrades! return /datum/AI_Module/large //Big, powerful stuff that can only be used once. @@ -318,7 +318,7 @@ unlock_text = "You establish a power diversion to your turrets, upgrading their health and damage." unlock_sound = 'sound/items/rped.ogg' -/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/AI/AI) +/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/ai/AI) for(var/obj/machinery/porta_turret/turret in GLOB.machines) var/turf/T = get_turf(turret) if(is_station_level(T.z)) diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index 1888d0e4a1d..60de5ba4238 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -282,4 +282,4 @@ /datum/game_mode/proc/update_abductor_icons_removed(datum/mind/alien_mind) var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_ABDUCTOR] hud.leave_hud(alien_mind.current) - set_antag_hud(alien_mind.current, null) \ No newline at end of file + set_antag_hud(alien_mind.current, null) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 387cd03aceb..126587a0c97 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -296,11 +296,12 @@ if(used == TRUE) to_chat(user, "[used_message]") return + used = TRUE // Set this BEFORE the popup to prevent people using the injector more than once, polling ghosts multiple times, and receiving multiple guardians. var/choice = alert(user, "[confirmation_message]",, "Yes", "No") if(choice == "No") to_chat(user, "You decide against using the [name].") + used = FALSE return - used = TRUE to_chat(user, "[use_message]") var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, 0, 100) var/mob/dead/observer/theghost = null diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm index c59f7f87636..e3217e0249a 100644 --- a/code/game/gamemodes/miniantags/guardian/types/healer.dm +++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm @@ -51,7 +51,7 @@ if(iscarbon(target)) changeNext_move(CLICK_CD_MELEE) if(heal_cooldown <= world.time && !stat) - var/mob/living/carbon/C = target + var/mob/living/carbon/human/C = target C.adjustBruteLoss(-5, robotic=1) C.adjustFireLoss(-5, robotic=1) C.adjustOxyLoss(-5) diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index ab54f6991b1..ccaad5bca87 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -76,13 +76,17 @@ adjustToxLoss(-1000) if(istype(src, /mob/living/simple_animal/slaughter)) //rason, do not want humans to get this - var/mob/living/simple_animal/slaughter/demon = src demon.devoured++ to_chat(kidnapped, "You feel teeth sink into your flesh, and the--") kidnapped.adjustBruteLoss(1000) kidnapped.forceMove(src) demon.consumed_mobs.Add(kidnapped) + if(ishuman(kidnapped)) + var/mob/living/carbon/human/H = kidnapped + if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/U = H.w_uniform + U.sensor_mode = SENSOR_OFF else kidnapped.ghostize() qdel(kidnapped) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 1dd254fade7..8e38f106cc7 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -51,8 +51,7 @@ GLOBAL_VAR(bomb_set) GLOB.bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed. timeleft = max(timeleft - 2, 0) // 2 seconds per process() if(timeleft <= 0) - spawn - explode() + INVOKE_ASYNC(src, .proc/explode) SSnanoui.update_uis(src) return @@ -347,6 +346,9 @@ GLOBAL_VAR(bomb_set) /obj/machinery/nuclearbomb/blob_act(obj/structure/blob/B) if(timing == -1.0) return + if(timing) //boom + INVOKE_ASYNC(src, .proc/explode) + return qdel(src) /obj/machinery/nuclearbomb/tesla_act(power, explosive) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 9974ee8305a..de15f62d09d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -231,7 +231,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) return 0 /datum/objective/block - explanation_text = "Do not allow any lifeforms, be it organic or synthetic to escape on the shuttle alive. AIs, Cyborgs, and pAIs are not considered alive." + explanation_text = "Do not allow any lifeforms, be it organic or synthetic to escape on the shuttle alive. AIs, Cyborgs, Maintenance drones, and pAIs are not considered alive." martyr_compatible = 1 /datum/objective/block/check_completion() @@ -243,15 +243,14 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) return 0 var/area/A = SSshuttle.emergency.areaInstance - var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) for(var/mob/living/player in GLOB.player_list) - if(player.type in protected_mobs) - continue + if(issilicon(player)) + continue // If they're silicon, they're not considered alive, skip them. if(player.mind && player.stat != DEAD) if(get_area(player) == A) - return 0 + return 0 // If there are any other organic mobs on the shuttle, you failed the objective. return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index e91c0d4f150..069b0915c00 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -50,7 +50,7 @@ var/turf/location = get_turf(E.loc) var/area/escape_zone = SSshuttle.emergency.areaInstance - if(E.stat != DEAD && location in escape_zone) // Escapee Scores + if(E.stat != DEAD && (location in escape_zone)) // Escapee Scores cash_score = get_score_container_worth(E) if(cash_score > GLOB.score_richestcash) diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm index de9f8fc0eb7..78a05f904a8 100644 --- a/code/game/gamemodes/steal_items.dm +++ b/code/game/gamemodes/steal_items.dm @@ -76,12 +76,12 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/aicard/C) /datum/theft_objective/blueprints name = "the station blueprints" - typepath = /obj/item/areaeditor/blueprints + typepath = /obj/item/areaeditor/blueprints/ce protected_jobs = list("Chief Engineer") altitems = list(/obj/item/photo) /datum/objective_item/steal/blueprints/check_special_completion(obj/item/I) - if(istype(I, /obj/item/areaeditor/blueprints)) + if(istype(I, /obj/item/areaeditor/blueprints/ce)) return 1 if(istype(I, /obj/item/photo)) var/obj/item/photo/P = I diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index 3dbd9211399..82f6d833d16 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -168,4 +168,4 @@ GLOBAL_VAR_INIT(summon_magic_triggered, FALSE) if(summon_type == SUMMON_MAGIC) give_magic(H) else - give_guns(H) \ No newline at end of file + give_guns(H) diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 634fc8f5a38..4bda254d930 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -280,7 +280,7 @@ SH.mind.transfer_to(C) if(iscultist(C)) var/datum/action/innate/cultcomm/CC = new() - CC.Grant(C) //We have to grant the cult comms again because they're lost during the mind transfer. + CC.Grant(C) //We have to grant the cult comms again because they're lost during the mind transfer. qdel(T) qdel(SH) to_chat(C, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index 796db23b36e..f91460ba234 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -34,6 +34,9 @@ /obj/item/implant/dust ) backpack = /obj/item/storage/backpack/satchel + backpack_contents = list( + /obj/item/stamp/centcom = 1, + ) box = /obj/item/storage/box/centcomofficer cybernetic_implants = list( /obj/item/organ/internal/cyberimp/chest/nutriment/plus diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index ad8f3bf6535..a30799f08b9 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -12,9 +12,6 @@ var/department_flag = 0 var/department_head = list() - //Players will be allowed to spawn in as jobs that are set to "Station" - var/list/faction = list("Station") - //How many players can be this job var/total_positions = 0 @@ -172,8 +169,8 @@ if(box && H.dna.species.speciesbox) box = H.dna.species.speciesbox - if(allow_loadout && H.client && (H.client.prefs.gear && H.client.prefs.gear.len)) - for(var/gear in H.client.prefs.gear) + if(allow_loadout && H.client && (H.client.prefs.loadout_gear && H.client.prefs.loadout_gear.len)) + for(var/gear in H.client.prefs.loadout_gear) var/datum/gear/G = GLOB.gear_datums[gear] if(G) var/permitted = FALSE @@ -211,7 +208,7 @@ if(gear_leftovers.len) for(var/datum/gear/G in gear_leftovers) - var/atom/placed_in = H.equip_or_collect(G.spawn_item(null, H.client.prefs.gear[G.display_name])) + var/atom/placed_in = H.equip_or_collect(G.spawn_item(null, H.client.prefs.loadout_gear[G.display_name])) if(istype(placed_in)) if(isturf(placed_in)) to_chat(H, "Placing [G.display_name] on [placed_in]!") diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index f0c6a81820f..3f5fbc374a6 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -357,7 +357,7 @@ if(istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter)) return O:id_tag in sensors -/obj/machinery/computer/general_air_control/linkWith(mob/user, obj/O, link/context) +/obj/machinery/computer/general_air_control/linkWith(mob/user, obj/O, context) sensors[O:id_tag] = reject_bad_name(clean_input(user, "Choose a sensor label:", "Sensor Label"), allow_numbers=1) return 1 diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 5bc32a0172e..24ffb494422 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -34,9 +34,8 @@ var/in_use_lights = 0 // TO BE IMPLEMENTED var/toggle_sound = 'sound/items/wirecutter.ogg' - -/obj/machinery/camera/New() - ..() +/obj/machinery/camera/Initialize() + . = ..() wires = new(src) assembly = new(src) assembly.state = 4 @@ -45,9 +44,6 @@ GLOB.cameranet.cameras += src GLOB.cameranet.addCamera(src) - -/obj/machinery/camera/Initialize() - ..() if(is_station_level(z) && prob(3) && !start_active) toggle_cam(null, FALSE) wires.CutAll() diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 0bd241ee0a0..c0949fb3c9d 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -2,8 +2,8 @@ // EMP -/obj/machinery/camera/emp_proof/New() - ..() +/obj/machinery/camera/emp_proof/Initialize() + . = ..() upgradeEmpProof() // X-RAY @@ -11,20 +11,20 @@ /obj/machinery/camera/xray icon_state = "xraycam" // Thanks to Krutchen for the icons. -/obj/machinery/camera/xray/New() - ..() +/obj/machinery/camera/xray/Initialize() + . = ..() upgradeXRay() // MOTION -/obj/machinery/camera/motion/New() - ..() +/obj/machinery/camera/motion/Initialize() + . = ..() upgradeMotion() // ALL UPGRADES -/obj/machinery/camera/all/New() - ..() +/obj/machinery/camera/all/Initialize() + . = ..() upgradeEmpProof() upgradeXRay() upgradeMotion() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 3aef616eb98..a98d7b08c13 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -4,7 +4,19 @@ //Potential replacement for genetics revives or something I dunno (?) #define CLONE_BIOMASS 150 -#define BIOMASS_MEAT_AMOUNT 50 + +#define BIOMASS_BASE_AMOUNT 50 // How much biomass a BIOMASSABLE item gives the cloning pod + +// Not a comprehensive list: Further PRs should add appropriate items here. +// Meat as usual, monstermeat covers goliath, xeno, spider, bear meat +GLOBAL_LIST_INIT(cloner_biomass_items, list(\ +/obj/item/reagent_containers/food/snacks/meat,\ +/obj/item/reagent_containers/food/snacks/monstermeat, +/obj/item/reagent_containers/food/snacks/carpmeat, +/obj/item/reagent_containers/food/snacks/salmonmeat, +/obj/item/reagent_containers/food/snacks/catfishmeat, +/obj/item/reagent_containers/food/snacks/tofurkey)) + #define MINIMUM_HEAL_LEVEL 40 #define CLONE_INITIAL_DAMAGE 190 #define BRAIN_INITIAL_DAMAGE 90 // our minds are too feeble for 190 @@ -17,6 +29,7 @@ icon = 'icons/obj/cloning.dmi' icon_state = "pod_0" req_access = list(ACCESS_GENETICS) //For premature unlocking. + var/mob/living/carbon/human/occupant var/heal_level //The clone is released once its health reaches this level. var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine. @@ -302,13 +315,14 @@ attempting = 0 return 1 -//Grow clones to maturity then kick them out. FREELOADERS +//Grow clones to maturity then kick them out. FREELOADERS /obj/machinery/clonepod/process() - var/show_message = 0 - for(var/obj/item/reagent_containers/food/snacks/meat/meat in range(1, src)) - qdel(meat) - biomass += BIOMASS_MEAT_AMOUNT - show_message = 1 + var/show_message = FALSE + for(var/obj/item/item in range(1, src)) + if(is_type_in_list(item, GLOB.cloner_biomass_items)) + qdel(item) + biomass += BIOMASS_BASE_AMOUNT + show_message = TRUE if(show_message) visible_message("[src] sucks in and processes the nearby biomass.") @@ -381,11 +395,11 @@ to_chat(user, "You force an emergency ejection.") go_out() -//Removing cloning pod biomass - else if(istype(I, /obj/item/reagent_containers/food/snacks/meat)) +// A user can feed in biomass sources manually. + else if(is_type_in_list(I, GLOB.cloner_biomass_items)) if(user.drop_item()) to_chat(user, "[src] processes [I].") - biomass += BIOMASS_MEAT_AMOUNT + biomass += BIOMASS_BASE_AMOUNT qdel(I) else return ..() diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index a8e30eb0979..123cee3ae4e 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(minor_air_alarms) /obj/machinery/computer/atmos_alert/New() ..() - SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/update_icon) + SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/.proc/update_icon) /obj/machinery/computer/atmos_alert/Destroy() SSalarms.atmosphere_alarm.unregister(src) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index de85ad842b7..40005f8fd12 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -133,7 +133,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if(!istype(id_card)) return ..() - if(!scan && ACCESS_CHANGE_IDS in id_card.access) + if(!scan && (ACCESS_CHANGE_IDS in id_card.access)) user.drop_item() id_card.loc = src scan = id_card diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 0faaff3af9d..9a1fd08d289 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -499,7 +499,6 @@ if(!frequency) return var/datum/signal/status_signal = new - status_signal.source = src status_signal.transmission_method = 1 status_signal.data["command"] = command @@ -507,13 +506,13 @@ if("message") status_signal.data["msg1"] = data1 status_signal.data["msg2"] = data2 - log_admin("STATUS: [user] set status screen message with [src]: [data1] [data2]") + log_admin("STATUS: [user] set status screen message: [data1] [data2]") //message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]") if("alert") status_signal.data["picture_state"] = data1 spawn(0) - frequency.post_signal(src, status_signal) + frequency.post_signal(null, status_signal) /obj/machinery/computer/communications/Destroy() diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index fb630d7a251..607918442ea 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -20,7 +20,7 @@ /obj/machinery/computer/station_alert/New() ..() alarm_monitor = new monitor_type(src) - alarm_monitor.register(src, /obj/machinery/computer/station_alert/update_icon) + alarm_monitor.register(src, /obj/machinery/computer/station_alert/.proc/update_icon) /obj/machinery/computer/station_alert/Destroy() alarm_monitor.unregister(src) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 37d59977f3e..de077917adf 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -275,6 +275,12 @@ return control_computer != null +// So the user can use movement keys to get out of the cryopod +/obj/machinery/cryopod/relaymove(mob/user) + if(user.incapacitated()) + return FALSE + go_out() + /obj/machinery/cryopod/proc/check_occupant_allowed(mob/M) var/correct_type = 0 for(var/type in allow_occupant_types) diff --git a/code/game/machinery/doors/checkForMultipleDoors.dm b/code/game/machinery/doors/checkForMultipleDoors.dm index d7f66f4630b..7884e3be989 100644 --- a/code/game/machinery/doors/checkForMultipleDoors.dm +++ b/code/game/machinery/doors/checkForMultipleDoors.dm @@ -12,5 +12,5 @@ for(var/obj/machinery/door/D in locate(x,y,z)) if(!istype(D, /obj/machinery/door/window) && D.density) return 0 - //There are no false wall checks because that would be fucking retarded + //There are no false wall checks because that would be foolish return 1 diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 0a0873a2605..05198a7a55f 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -95,7 +95,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays) to_chat(user, "[src] is already printing something, please wait.") return atom_say("Printing explosive log. Standby...") - addtimer(CALLBACK(src, .print), 50) + addtimer(CALLBACK(src, .proc/print), 50) /obj/machinery/doppler_array/proc/print() visible_message("[src] prints a piece of paper!") diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 2c37a3274c7..165c8dbe4cb 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -193,5 +193,5 @@ /obj/machinery/computer/guestpass/hop/get_changeable_accesses() . = ..() - if(. && ACCESS_CHANGE_IDS in .) + if(. && (ACCESS_CHANGE_IDS in .)) return get_all_accesses() diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm index 5d6dc185c83..12bae1bbf5a 100644 --- a/code/game/machinery/portable_tag_turret.dm +++ b/code/game/machinery/portable_tag_turret.dm @@ -13,8 +13,8 @@ lasercolor = "b" installation = /obj/item/gun/energy/laser/tag/blue -/obj/machinery/porta_turret/tag/New() - ..() +/obj/machinery/porta_turret/tag/Initialize(mapload) + . = ..() icon_state = "[lasercolor]grey_target_prism" /obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/gun/energy/E) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index b35af581af8..b63f4ab7f8b 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -87,8 +87,8 @@ lethal = 1 installation = /obj/item/gun/energy/laser -/obj/machinery/porta_turret/New() - ..() +/obj/machinery/porta_turret/Initialize(mapload) + . = ..() if(req_access && req_access.len) req_access.Cut() req_one_access = list(ACCESS_SECURITY, ACCESS_HEADS) @@ -105,8 +105,8 @@ QDEL_NULL(spark_system) return ..() -/obj/machinery/porta_turret/centcom/New() - ..() +/obj/machinery/porta_turret/centcom/Initialize(mapload) + . = ..() if(req_one_access && req_one_access.len) req_one_access.Cut() req_access = list(ACCESS_CENT_SPECOPS) @@ -1015,8 +1015,8 @@ GLOBAL_LIST_EMPTY(turret_icons) depotarea.declare_started() return ..(target) -/obj/machinery/porta_turret/syndicate/New() - ..() +/obj/machinery/porta_turret/syndicate/Initialize(mapload) + . = ..() if(req_one_access && req_one_access.len) req_one_access.Cut() req_access = list(ACCESS_SYNDICATE) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 99642db320e..b3745f947cd 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -78,7 +78,7 @@ try_detonate(TRUE) //Counter terrorists win else if(!active || defused) - if(defused && payload in src) + if(defused && (payload in src)) payload.defuse() countdown.stop() STOP_PROCESSING(SSfastprocess, src) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 3ce5c316ba6..452c7280e80 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -166,7 +166,7 @@ return istype(O,/obj/machinery/telecomms) /obj/machinery/telecomms/isLinkedWith(var/obj/O) - return O != null && O in links + return O != null && (O in links) /obj/machinery/telecomms/getLink(var/idx) return (idx >= 1 && idx <= links.len) ? links[idx] : null @@ -362,14 +362,15 @@ if(href_list["link"]) if(P) - if(P.buffer && P.buffer != src) - if(!(src in P.buffer:links)) - P.buffer:links.Add(src) + var/obj/machinery/telecomms/T = P.buffer + if(istype(T) && T != src) + if(!(src in T.links)) + T.links += src - if(!(P.buffer in src.links)) - src.links.Add(P.buffer) + if(!(T in links)) + links += T - temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-" + temp = "-% Successfully linked with [(T.UID())] [T.name] %-" else temp = "-% Unable to acquire buffer %-" diff --git a/code/game/machinery/telecomms/ntsl2.dm b/code/game/machinery/telecomms/ntsl2.dm index ef3db72a6a2..23c5f3c6372 100644 --- a/code/game/machinery/telecomms/ntsl2.dm +++ b/code/game/machinery/telecomms/ntsl2.dm @@ -436,7 +436,7 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new()) // Arrays if(href_list["create_item"]) - if(href_list["array"] && href_list["array"] in arrays) + if(href_list["array"] && (href_list["array"] in arrays)) if(requires_unlock[href_list["array"]] && !source.unlocked) return var/new_value = clean_input(user, "Provide a value for the new index.", "New Index") @@ -448,7 +448,7 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new()) log_action(user, "updated [href_list["array"]] - new value [new_value]", TRUE) if(href_list["delete_item"]) - if(href_list["array"] && href_list["array"] in arrays) + if(href_list["array"] && (href_list["array"] in arrays)) if(requires_unlock[href_list["array"]] && !source.unlocked) return var/list/array = vars[href_list["array"]] diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 82baea0e054..aa4eb4d9c22 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) /obj/machinery/telecomms/proc/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) // receive information from linked machinery - ..() + return /obj/machinery/telecomms/proc/is_freq_listening(datum/signal/signal) // return 1 if found, 0 if not found diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index ec6f2c6456e..7657b443daa 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -540,7 +540,7 @@ /obj/mecha/attack_alien(mob/living/user) - log_message("Attack by alien. Attacker - [user].", color = "red") + log_message("Attack by alien. Attacker - [user].", TRUE) playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE) attack_generic(user, 15, BRUTE, "melee", 0) @@ -1094,7 +1094,7 @@ to_chat(user, "You stop entering the exosuit!") /obj/mecha/proc/moved_inside(var/mob/living/carbon/human/H as mob) - if(H && H.client && H in range(1)) + if(H && H.client && (H in range(1))) occupant = H H.stop_pulling() H.forceMove(src) @@ -1141,7 +1141,7 @@ return 0 /obj/mecha/proc/mmi_moved_inside(obj/item/mmi/mmi_as_oc,mob/user) - if(mmi_as_oc && user in range(1)) + if(mmi_as_oc && (user in range(1))) if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client) to_chat(user, "Consciousness matrix not detected.") return 0 diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 0b106f2ab4c..494fc70d36b 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -139,7 +139,7 @@ ..() if(href_list["drop_from_cargo"]) var/obj/O = locate(href_list["drop_from_cargo"]) - if(O && O in cargo) + if(O && (O in cargo)) occupant_message("You unload [O].") O.loc = get_turf(src) cargo -= O diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index b10a072389a..54ddb01b653 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,7 +1,6 @@ //TODO: Flash range does nothing currently /proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0, silent = 0, smoke = 1, cause = null, breach = TRUE) - src = null //so we don't abort once src is deleted epicenter = get_turf(epicenter) // Archive the uncapped explosion for the doppler array diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index d552b3c7d8f..5f5c62abd21 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -328,3 +328,5 @@ desc = "A digital copy of the station blueprints stored in your memory." fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station." +/obj/item/areaeditor/blueprints/ce + diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index af673c7b285..5cbd562a002 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -84,27 +84,29 @@ /obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1) - add_attack_logs(user, M, "Flashed with [src]") - if(user && targeted) - if(M.weakeyes) - M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash - if(M.flash_eyes(1, 1)) - M.AdjustConfused(power) - terrible_conversion_proc(M, user) - M.Stun(1) - visible_message("[user] blinds [M] with the flash!") - to_chat(user, "You blind [M] with the flash!") - to_chat(M, "[user] blinds you with the flash!") + if(user) + add_attack_logs(user, M, "Flashed with [src]") + if(targeted) if(M.weakeyes) - M.Stun(2) - M.visible_message("[M] gasps and shields [M.p_their()] eyes!", "You gasp and shields your eyes!") - else - visible_message("[user] fails to blind [M] with the flash!") - to_chat(user, "You fail to blind [M] with the flash!") - to_chat(M, "[user] fails to blind you with the flash!") - else - if(M.flash_eyes()) - M.AdjustConfused(power) + M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash + if(M.flash_eyes(1, 1)) + M.AdjustConfused(power) + terrible_conversion_proc(M, user) + M.Stun(1) + visible_message("[user] blinds [M] with the flash!") + to_chat(user, "You blind [M] with the flash!") + to_chat(M, "[user] blinds you with the flash!") + if(M.weakeyes) + M.Stun(2) + M.visible_message("[M] gasps and shields [M.p_their()] eyes!", "You gasp and shields your eyes!") + else + visible_message("[user] fails to blind [M] with the flash!") + to_chat(user, "You fail to blind [M] with the flash!") + to_chat(M, "[user] fails to blind you with the flash!") + return + + if(M.flash_eyes()) + M.AdjustConfused(power) /obj/item/flash/attack(mob/living/M, mob/user) if(!try_use_flash(user)) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 72e584e91aa..105f6730140 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -103,6 +103,13 @@ /obj/item/radio/headset/syndicate/alt/syndteam ks1type = /obj/item/encryptionkey/syndteam +/obj/item/radio/headset/syndicate/alt/lavaland + name = "syndicate lavaland headset" + +/obj/item/radio/headset/syndicate/alt/lavaland/New() + . = ..() + set_frequency(SYND_FREQ) + /obj/item/radio/headset/binary origin_tech = "syndicate=3" ks1type = /obj/item/encryptionkey/binary diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 900b3449b27..732dc362f28 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -458,7 +458,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( R.receive_signal(signal) // Receiving code can be located in Telecommunications.dm - return signal.data["done"] && position.z in signal.data["level"] + return signal.data["done"] && (position.z in signal.data["level"]) /* ###### Intercoms and station-bounced radios ###### */ @@ -510,7 +510,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( sleep(rand(10,25)) // wait a little... - if(signal.data["done"] && position.z in signal.data["level"]) + if(signal.data["done"] && (position.z in signal.data["level"])) // we're done here. return 1 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 34183a81102..6d0f6d1dfe1 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -212,7 +212,7 @@ REAGENT SCANNER if(H.getBrainLoss() >= 100) to_chat(user, "Subject is brain dead.") else if(H.getBrainLoss() >= 60) - to_chat(user, "Severe brain damage detected. Subject likely to have mental retardation.") + to_chat(user, "Severe brain damage detected. Subject likely to have dementia.") else if(H.getBrainLoss() >= 10) to_chat(user, "Significant brain damage detected. Subject may have had a concussion.") else diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 4aa5c4532f1..c5c8f67e34d 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -168,7 +168,6 @@ GLOBAL_LIST_EMPTY(world_uplinks) to_chat(user, "[I] refunded.") qdel(I) return - ..() // HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it. /* How to create an uplink in 3 easy steps! diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 0edcafd64b5..14bb468e049 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -222,7 +222,7 @@ var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag - if(user && src in user.contents) + if(user && (src in user.contents)) var/obj/item/flag/chosen_flag = flag[input_flag] diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 59dad865acb..708070e1478 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -4,6 +4,7 @@ desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." icon = 'icons/obj/nanopaste.dmi' icon_state = "tube" + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=2;engineering=3" amount = 6 max_amount = 6 diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm index b002ed32205..270a44ee559 100644 --- a/code/game/objects/items/tools/welder.dm +++ b/code/game/objects/items/tools/welder.dm @@ -50,7 +50,8 @@ /obj/item/weldingtool/process() var/turf/T = get_turf(src) - T.hotspot_expose(2500, 5) + if(T) // Implants for instance won't find a turf + T.hotspot_expose(2500, 5) if(prob(5)) remove_fuel(1) ..() diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 7e965fdb283..1e34561c441 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -143,9 +143,8 @@ AI MODULES target.set_zeroth_law(law) GLOB.lawchanges.Add("The law specified [targetName]") else - to_chat(target, "[sender.real_name] attempted to modify your zeroth law.")// And lets them know that someone tried. --NeoFite - - to_chat(target, "It would be in your best interest to play along with [sender.real_name] that [law]") + to_chat(target, "[sender.real_name] attempted to modify your zeroth law.")// And lets them know that someone tried. --NeoFite + to_chat(target, "It would be in your best interest to play along with [sender.real_name] that [law]") GLOB.lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.") /******************** ProtectStation ********************/ @@ -222,11 +221,11 @@ AI MODULES log_law_changes(target, sender) if(!is_special_character(target)) - target.set_zeroth_law("") + target.clear_zeroth_law() target.laws.clear_supplied_laws() target.laws.clear_ion_laws() - to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.") + to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.") target.show_laws() /******************** Purge ********************/ @@ -238,8 +237,8 @@ AI MODULES /obj/item/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) ..() if(!is_special_character(target)) - target.set_zeroth_law("") - to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.") + target.clear_zeroth_law() + to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.") target.clear_supplied_laws() target.clear_ion_laws() target.clear_inherent_laws() diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm index 91bb84f880b..bf46343b963 100644 --- a/code/game/objects/items/weapons/chrono_eraser.dm +++ b/code/game/objects/items/weapons/chrono_eraser.dm @@ -32,7 +32,7 @@ if(PA) qdel(PA) else - PA = new(src) + PA = new(user, src) user.put_in_hands(PA) /obj/item/chrono_eraser/item_action_slot_check(slot, mob/user) @@ -55,7 +55,7 @@ var/obj/structure/chrono_field/field = null var/turf/startpos = null -/obj/item/gun/energy/chrono_gun/New(var/obj/item/chrono_eraser/T) +/obj/item/gun/energy/chrono_gun/Initialize(mapload, obj/item/chrono_eraser/T) . = ..() if(istype(T)) TED = T diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index be901e51ef2..415a02f4456 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -106,7 +106,7 @@ P = new(T, whatpipe, iconrotation) //Make the pipe, BUT WAIT! There's more! if(!iconrotation && P.is_bent_pipe()) //Automatically rotates dispensed pipes if the user selected auto-rotation P.dir = turn(user.dir, 135) - else if(!iconrotation && P.pipe_type in list(PIPE_CONNECTOR, PIPE_UVENT, PIPE_SCRUBBER, PIPE_HEAT_EXCHANGE, PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_INJECTOR, PIPE_PASV_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction + else if(!iconrotation && (P.pipe_type in list(PIPE_CONNECTOR, PIPE_UVENT, PIPE_SCRUBBER, PIPE_HEAT_EXCHANGE, PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_INJECTOR, PIPE_PASV_VENT))) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction P.dir = turn(user.dir, -180) else if(iconrotation && P.is_bent_pipe()) //If user selected a rotation and the pipe is bent P.dir = turn(iconrotation, -45) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 2375c42db65..55dc189fc9b 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -119,7 +119,7 @@ amount_per_transfer_from_this = 50 possible_transfer_amounts = list(25,50,100) volume = 500 - flags = NODROP | NOBLUDGEON + flags = NOBLUDGEON container_type = OPENCONTAINER var/obj/item/watertank/tank diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 112925515a0..3fa86cee3a4 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -192,13 +192,13 @@ /obj/proc/multitool_menu(var/mob/user,var/obj/item/multitool/P) return "NO MULTITOOL_MENU!" -/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/link/context) +/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/context) return 0 /obj/proc/unlinkFrom(var/mob/user, var/obj/buffer) return 0 -/obj/proc/canLink(var/obj/O, var/link/context) +/obj/proc/canLink(var/obj/O, var/context) return 0 /obj/proc/isLinkedWith(var/obj/O) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm index bba8dc2a866..5ffbdd0cda7 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm @@ -36,7 +36,7 @@ depotarea.armory_locker_looted() /obj/structure/closet/secure_closet/syndicate/depot/attack_animal(mob/M) - if(isanimal(M) && "syndicate" in M.faction) + if(isanimal(M) && ("syndicate" in M.faction)) to_chat(M, "The [src] resists your attack!") return return ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 7616aa90877..f0a7336389b 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -16,7 +16,7 @@ new /obj/item/storage/backpack/satchel_eng(src) new /obj/item/storage/backpack/duffel/engineering(src) new /obj/item/clothing/head/beret/ce(src) - new /obj/item/areaeditor/blueprints(src) + new /obj/item/areaeditor/blueprints/ce(src) new /obj/item/storage/box/permits(src) new /obj/item/clothing/under/rank/chief_engineer(src) new /obj/item/clothing/under/rank/chief_engineer/skirt(src) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index b67bc2c70d1..1102901c8bd 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(safes) var/number_of_tumblers = 3 // The amount of tumblers that will be generated. var/list/tumblers = list() // The list of tumbler dial positions that need to be hit. - var/list/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit. + var/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit. var/space = 0 // The combined w_class of everything in the safe. var/maxspace = 24 // The maximum combined w_class of stuff in the safe. diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 3f5d667a356..ba5258004a0 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -169,7 +169,7 @@ /obj/structure/sign/kiddieplaque name = "AI developers plaque" - desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\"." + desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child's eyes are crossed, and is drooling. Beneath the image, someone has scratched the word \"PACKETS\"." icon_state = "kiddieplaque" /obj/structure/sign/atmosplaque diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index f8f406d1381..9d06f870fc3 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -38,7 +38,7 @@ if(pod.contents.len) to_chat(AM, "") return - else if(!pod.moving && pod.dir in directions()) + else if(!pod.moving && (pod.dir in directions())) AM.forceMove(pod) return @@ -47,7 +47,7 @@ /obj/structure/transit_tube/station/attack_hand(mob/user as mob) if(!pod_moving) for(var/obj/structure/transit_tube_pod/pod in loc) - if(!pod.moving && pod.dir in directions()) + if(!pod.moving && (pod.dir in directions())) if(icon_state == "closed") open_animation() @@ -100,7 +100,7 @@ /obj/structure/transit_tube/station/proc/launch_pod() for(var/obj/structure/transit_tube_pod/pod in loc) - if(!pod.moving && pod.dir in directions()) + if(!pod.moving && (pod.dir in directions())) spawn(5) pod_moving = 1 close_animation() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 332786e291c..588a8387474 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -104,7 +104,7 @@ broken = FALSE update_icon() -/turf/simulated/floor/plating/proc/remove_plating(mob/user) +/turf/simulated/floor/plating/remove_plating(mob/user) if(baseturf == /turf/space) ReplaceWithLattice() else diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 078a1b8e513..c18acf19d0a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -139,7 +139,7 @@ P.setAngle(new_angle_s) return TRUE -/turf/simulated/wall/proc/dismantle_wall(devastated = 0, explode = 0) +/turf/simulated/wall/dismantle_wall(devastated = FALSE, explode = FALSE) if(devastated) devastate_wall() else @@ -156,6 +156,7 @@ O.forceMove(src) ChangeTurf(/turf/simulated/floor/plating) + return TRUE /turf/simulated/wall/proc/break_wall() new sheet_type(src, sheet_amount) diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index bc04a695da7..8b60be916c3 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -277,6 +277,9 @@ /turf/simulated/wall/mineral/titanium/nodecon/burn_down() return +/turf/simulated/wall/mineral/titanium/nodecon/welder_act() + return + /////////////////////Plastitanium walls///////////////////// /turf/simulated/wall/mineral/plastitanium diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index e43ea15f53f..d2d7f8386ee 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -109,6 +109,7 @@ P.roll_and_drop(src) else O.forceMove(src) + return TRUE /turf/simulated/wall/clockwork/devastate_wall() for(var/i in 1 to 2) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 502803bc7d3..a3e9c9ae0f2 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -43,7 +43,7 @@ update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") return - else if(RWALL_SUPPORT_RODS && istype(I, /obj/item/gun/energy/plasmacutter)) + else if(d_state == RWALL_SUPPORT_RODS && istype(I, /obj/item/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the support rods...") if(I.use_tool(src, user, 70, volume = I.tool_volume) && d_state == RWALL_SUPPORT_RODS) d_state = RWALL_SHEATH @@ -132,11 +132,11 @@ to_chat(user, "You pry off the cover.") if(RWALL_SHEATH) to_chat(user, "You struggle to pry off the outer sheath...") - if(!I.use_tool(src, user, 100, volume = I.tool_volume) || d_state != RWALL_SHEATH) + if(!I.use_tool(src, user, 100, volume = I.tool_volume)) return - to_chat(user, "You pry off the outer sheath.") - dismantle_wall() - return + if(dismantle_wall()) + to_chat(user, "You pry off the outer sheath.") + if(RWALL_BOLTS) to_chat(user, "You start to pry the cover back into place...") playsound(src, I.usesound, 100, 1) @@ -199,6 +199,9 @@ to_chat(user, "You tighten the bolts anchoring the support rods.") update_icon() +/turf/simulated/wall/r_wall/try_decon(obj/item/I, mob/user, params) //Plasma cutter only works in the deconstruction steps! + return FALSE + /turf/simulated/wall/r_wall/try_destroy(obj/item/I, mob/user, params) if(istype(I, /obj/item/pickaxe/drill/diamonddrill)) to_chat(user, "You begin to drill though the wall...") diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index a6b2a53d386..aa3f7b898a1 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -180,6 +180,9 @@ if(L) qdel(L) +/turf/proc/dismantle_wall(devastated = FALSE, explode = FALSE) + return + /turf/proc/TerraformTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE) return ChangeTurf(path, defer_change, keep_icon, ignore_air) @@ -292,6 +295,9 @@ ChangeTurf(baseturf) new /obj/structure/lattice(locate(x, y, z)) +/turf/proc/remove_plating(mob/user) + return + /turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N //Useful to batch-add creatures to the list. for(var/mob/living/M in src) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index c4313354ff1..2a1d03b79aa 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -392,11 +392,12 @@ var/logout_status logout_status = M.client ? "" : " (logged out)" var/dname = M.real_name + var/area/A = get_area(M) if(!dname) dname = M - return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] - PM[close ? "" : ""]"} + return {"[dname][caption][logout_status][istype(A, /area/security/permabrig) ? " (PERMA) " : ""][M.stat == 2 ? " (DEAD)" : ""] + PM [ADMIN_FLW(M, "FLW")] [close ? "" : ""]"} /datum/admins/proc/check_antagonists() if(!check_rights(R_ADMIN)) return @@ -492,7 +493,7 @@ dat += check_role_table("Ninjas", ticker.mode.ninjas)*/ if(SSticker.mode.cult.len) - dat += check_role_table("Cultists", SSticker.mode.cult, 0) + dat += check_role_table("Cultists", SSticker.mode.cult) dat += "
use Cult Mindspeak" if(GAMEMODE_IS_CULT) var/datum/game_mode/cult/cult_round = SSticker.mode diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index e4c889ec309..cbda6699694 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -105,7 +105,7 @@ Turn all humans into monkeys
Make all items look like guns
Warp all Players to Prison
- Make all players retarded
+ Make all players stupid
Misc
Remove firesuits, grilles, and pods   Triple AI mode (needs to be used in the lobby)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 03b5cb09720..7826a005e7d 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2813,13 +2813,13 @@ return SSweather.run_weather(/datum/weather/ash_storm) message_admins("[key_name_admin(usr)] spawned an ash storm on the mining level") - if("retardify") + if("stupify") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","RET") for(var/mob/living/carbon/human/H in GLOB.player_list) to_chat(H, "You suddenly feel stupid.") H.setBrainLoss(60) - message_admins("[key_name_admin(usr)] made everybody retarded") + message_admins("[key_name_admin(usr)] made everybody stupid") if("fakeguns") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","FG") diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 32355cd17fd..164d499e04a 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -261,7 +261,7 @@ /datum/pm_tracker var/current_title = "" var/open = FALSE - var/list/pms = list() + var/list/datum/pm_convo/pms = list() var/show_archived = FALSE var/window_id = "pms_window" diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 92bcfa25c3a..ce10383ca4e 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -85,7 +85,7 @@ var/output = "Radio Report
" for(var/fq in SSradio.frequencies) output += "Freq: [fq]
" - var/list/datum/radio_frequency/fqs = SSradio.frequencies[fq] + var/datum/radio_frequency/fqs = SSradio.frequencies[fq] if(!fqs) output += "  ERROR
" continue diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index cad93e8b880..37afe35ef6a 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -27,7 +27,7 @@ if(!themission) alert("No mission specified. Aborting.") return - var/admin_outfits = subtypesof(/datum/outfit/admin) + var/admin_outfits = subtypesof(/datum/outfit/admin) + list(/datum/outfit/naked) var/outfit_list = list() for(var/type in admin_outfits) var/datum/outfit/admin/O = type diff --git a/code/modules/admin/verbs/logging_view.dm b/code/modules/admin/verbs/logging_view.dm index 2a222e21dbd..903926f4923 100644 --- a/code/modules/admin/verbs/logging_view.dm +++ b/code/modules/admin/verbs/logging_view.dm @@ -7,4 +7,5 @@ GLOBAL_LIST_INIT(open_logging_views, list()) if(!GLOB.open_logging_views[usr.client.ckey]) GLOB.open_logging_views[usr.client.ckey] = new /datum/log_viewer() - GLOB.open_logging_views[usr.client.ckey].show_ui(usr) \ No newline at end of file + var/datum/log_viewer/LV = GLOB.open_logging_views[usr.client.ckey] + LV.show_ui(usr) diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index 6a1efba4c93..0474629dea0 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -543,7 +543,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h var/var_value if(param_var_name) - if(!param_var_name in O.vars) + if(!(param_var_name in O.vars)) to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])") return variable = param_var_name diff --git a/code/modules/admin/verbs/onlyoneteam.dm b/code/modules/admin/verbs/onlyoneteam.dm index c0847d6ff7e..9575cc5b340 100644 --- a/code/modules/admin/verbs/onlyoneteam.dm +++ b/code/modules/admin/verbs/onlyoneteam.dm @@ -82,7 +82,7 @@ else if((H in GLOB.team_bravo) && (A in GLOB.team_bravo)) to_chat(A, "He's on your team!") return - else if(!A in GLOB.team_alpha && !A in GLOB.team_bravo) + else if(!(A in GLOB.team_alpha) && !(A in GLOB.team_bravo)) to_chat(A, "You're not part of the dodgeball game, sorry!") return else diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index a8136655d8f..1864a677727 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -533,7 +533,7 @@ Traitors and the like can also be revived with the previous role mostly intact. var/list/mobs = list() var/list/ghosts = list() var/list/sortmob = sortAtom(GLOB.mob_list) // get the mob list. - /var/any=0 + var/any=0 for(var/mob/dead/observer/M in sortmob) mobs.Add(M) //filter it where it's only ghosts any = 1 //if no ghosts show up, any will just be 0 diff --git a/code/modules/arcade/claw_game.dm b/code/modules/arcade/claw_game.dm index 822011be3f6..6ee5c83b89c 100644 --- a/code/modules/arcade/claw_game.dm +++ b/code/modules/arcade/claw_game.dm @@ -58,7 +58,7 @@ GLOBAL_VAR(claw_game_html) atom_say("WINNER!") new /obj/item/toy/prizeball(get_turf(src)) playsound(src.loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) - addtimer(CALLBACK(src, .update_icon), 10) + addtimer(CALLBACK(src, .proc/update_icon), 10) /obj/machinery/arcade/claw/start_play(mob/user as mob) ..() diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 9b4c9b38677..35e80e53d18 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -89,7 +89,7 @@ /obj/item/assembly/mousetrap/attack_hand(mob/living/user) if(armed) - if((user.getBrainLoss() >= 60 || CLUMSY in user.mutations) && prob(50)) + if((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" diff --git a/code/modules/atmos_automation/implementation/sensors.dm b/code/modules/atmos_automation/implementation/sensors.dm index d86d9612470..e1ef348a617 100644 --- a/code/modules/atmos_automation/implementation/sensors.dm +++ b/code/modules/atmos_automation/implementation/sensors.dm @@ -22,7 +22,7 @@ field = json["field"] Evaluate() - if(sensor && field && sensor in parent.sensor_information) + if(sensor && field && (sensor in parent.sensor_information)) return parent.sensor_information[sensor][field] return 0 diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 1086f43dd48..bac8d64d9f2 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -163,11 +163,11 @@ var/pda = -1 var/backpack_contents = -1 var/suit_store = -1 - var/hair_style var/facial_hair_style var/skin_tone + var/list/del_types = list(/obj/item/pda, /obj/item/radio/headset) /obj/effect/mob_spawn/human/Initialize() if(ispath(outfit)) @@ -227,7 +227,6 @@ if(!isnum(T)) outfit.vars[slot] = T H.equipOutfit(outfit) - var/list/del_types = list(/obj/item/pda, /obj/item/radio/headset) for(var/del_type in del_types) var/obj/item/I = locate(del_type) in H qdel(I) diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 96c5f080a14..3b31a8bbcfc 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -172,87 +172,3 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away new /obj/effect/landmark/ruin(central_turf, src) return TRUE return FALSE - -/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins) - if(!z_levels || !z_levels.len) - WARNING("No Z levels provided - Not generating ruins") - return - - for(var/zl in z_levels) - var/turf/T = locate(1, 1, zl) - if(!T) - WARNING("Z level [zl] does not exist - Not generating ruins") - return - - var/list/ruins = potentialRuins.Copy() - - var/list/forced_ruins = list() //These go first on the z level associated (same random one by default) - var/list/ruins_availible = list() //we can try these in the current pass - var/forced_z //If set we won't pick z level and use this one instead. - - //Set up the starting ruin list - for(var/key in ruins) - var/datum/map_template/ruin/R = ruins[key] - if(R.cost > budget) //Why would you do that - continue - if(R.always_place) - forced_ruins[R] = -1 - if(R.unpickable) - continue - ruins_availible[R] = R.placement_weight - - while(budget > 0 && (ruins_availible.len || forced_ruins.len)) - var/datum/map_template/ruin/current_pick - var/forced = FALSE - if(forced_ruins.len) //We have something we need to load right now, so just pick it - for(var/ruin in forced_ruins) - current_pick = ruin - if(forced_ruins[ruin] > 0) //Load into designated z - forced_z = forced_ruins[ruin] - forced = TRUE - break - else //Otherwise just pick random one - current_pick = pickweight(ruins_availible) - - var/placement_tries = PLACEMENT_TRIES - var/failed_to_place = TRUE - var/z_placed = 0 - while(placement_tries > 0) - placement_tries-- - z_placed = pick(z_levels) - if(!current_pick.try_to_place(forced_z ? forced_z : z_placed,whitelist)) - continue - else - failed_to_place = FALSE - break - - //That's done remove from priority even if it failed - if(forced) - //TODO : handle forced ruins with multiple variants - forced_ruins -= current_pick - forced = FALSE - - if(failed_to_place) - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.id == current_pick.id) - ruins_availible -= R - log_world("Failed to place [current_pick.name] ruin.") - else - budget -= current_pick.cost - if(!current_pick.allow_duplicates) - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.id == current_pick.id) - ruins_availible -= R - if(current_pick.never_spawn_with) - for(var/blacklisted_type in current_pick.never_spawn_with) - for(var/possible_exclusion in ruins_availible) - if(istype(possible_exclusion,blacklisted_type)) - ruins_availible -= possible_exclusion - forced_z = 0 - - //Update the availible list - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.cost > budget) - ruins_availible -= R - - log_world("Ruin loader finished with [budget] left to spend.") diff --git a/code/modules/buildmode/submodes/link.dm b/code/modules/buildmode/submodes/link.dm index 136ffad6433..25a6d92bfa3 100644 --- a/code/modules/buildmode/submodes/link.dm +++ b/code/modules/buildmode/submodes/link.dm @@ -46,17 +46,21 @@ if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto line_jump + speed_execute() + return if(P.id_tag == M.id && P.id_tag && P.id_tag != "") P.id_tag = null to_chat(user, "[P] unlinked.") - goto line_jump + speed_execute() + return if(!M.normaldoorcontrol) if(link_lines.len && alert(user, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No") - goto line_jump + speed_execute() + return M.normaldoorcontrol = 1 if(P.id_tag && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No") - goto line_jump + speed_execute() + return P.id_tag = M.id if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor)) var/obj/machinery/door_control/M = link_obj @@ -64,24 +68,29 @@ if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto line_jump + speed_execute() + return if(P.id_tag == M.id && P.id_tag && P.id_tag != "") P.id_tag = null to_chat(user, "[P] unlinked.") - goto line_jump + speed_execute() + return if(M.normaldoorcontrol) if(link_lines.len && alert(user, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No") - goto line_jump + speed_execute() + return M.normaldoorcontrol = 0 if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto line_jump + speed_execute() + return if(P.id_tag && P.id_tag != 1 && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No") - goto line_jump + speed_execute() + return P.id_tag = M.id - line_jump // For the goto +/datum/buildmode_mode/link/proc/speed_execute() // For exiting out of hell clear_lines() if(istype(link_obj, /obj/machinery/door_control)) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index efe609a8a56..5fe0cb146c5 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -427,7 +427,7 @@ /client/proc/is_connecting_from_localhost() var/localhost_addresses = list("127.0.0.1", "::1") // Adresses - if(!isnull(address) && address in localhost_addresses) + if(!isnull(address) && (address in localhost_addresses)) return TRUE return FALSE @@ -920,7 +920,7 @@ return FALSE if(M && M.player_logged < SSD_WARNING_TIMER) return FALSE - to_chat(src, "Interacting with SSD players is against server rules unless you've ahelped first for permission. If you have, confirm that and proceed.") + to_chat(src, "Are you taking this person to cryo or giving them medical treatment? If you are, confirm that and proceed. Interacting with SSD players in other ways is against server rules unless you've ahelped first for permission.") return TRUE #undef SSD_WARNING_TIMER diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index ff3a5168868..b8a022c02af 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -200,7 +200,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/unlock_content = 0 //Gear stuff - var/list/gear = list() + var/list/loadout_gear = list() var/gear_tab = "General" // Parallax var/parallax = PARALLAX_HIGH @@ -508,9 +508,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(TAB_GEAR) var/total_cost = 0 var/list/type_blacklist = list() - if(gear && gear.len) - for(var/i = 1, i <= gear.len, i++) - var/datum/gear/G = GLOB.gear_datums[gear[i]] + if(loadout_gear && loadout_gear.len) + for(var/i = 1, i <= loadout_gear.len, i++) + var/datum/gear/G = GLOB.gear_datums[loadout_gear[i]] if(G) if(!G.subtype_cost_overlap) if(G.subtype_path in type_blacklist) @@ -543,7 +543,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "
" for(var/gear_name in LC.gear) var/datum/gear/G = LC.gear[gear_name] - var/ticked = (G.display_name in gear) + var/ticked = (G.display_name in loadout_gear) if(G.donator_tier > user.client.donator_level) dat += "[G.display_name]" else @@ -576,10 +576,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts /datum/preferences/proc/get_gear_metadata(var/datum/gear/G) - . = gear[G.display_name] + . = loadout_gear[G.display_name] if(!.) . = list() - gear[G.display_name] = . + loadout_gear[G.display_name] = . /datum/preferences/proc/get_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak) var/list/metadata = get_gear_metadata(G) @@ -721,7 +721,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts HTML += "" for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even - HTML += "  " + HTML += "  " HTML += "" @@ -1162,15 +1162,15 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(href_list["preference"] == "gear") if(href_list["toggle_gear"]) var/datum/gear/TG = GLOB.gear_datums[href_list["toggle_gear"]] - if(TG.display_name in gear) - gear -= TG.display_name + if(TG.display_name in loadout_gear) + loadout_gear -= TG.display_name else if(TG.donator_tier && user.client.donator_level < TG.donator_tier) to_chat(user, "That gear is only available at a higher donation tier than you are on.") return var/total_cost = 0 var/list/type_blacklist = list() - for(var/gear_name in gear) + for(var/gear_name in loadout_gear) var/datum/gear/G = GLOB.gear_datums[gear_name] if(istype(G)) if(!G.subtype_cost_overlap) @@ -1180,7 +1180,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts total_cost += G.cost if((total_cost + TG.cost) <= max_gear_slots) - gear += TG.display_name + loadout_gear += TG.display_name else if(href_list["gear"] && href_list["tweak"]) var/datum/gear/gear = GLOB.gear_datums[href_list["gear"]] @@ -1194,7 +1194,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts else if(href_list["select_category"]) gear_tab = href_list["select_category"] else if(href_list["clear_loadout"]) - gear.Cut() + loadout_gear.Cut() ShowChoices(user) return diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index ce2917373bf..a994e875372 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -259,7 +259,7 @@ //socks socks = query.item[49] body_accessory = query.item[50] - gear = params2list(query.item[51]) + loadout_gear = params2list(query.item[51]) autohiss_mode = text2num(query.item[52]) //Sanitize @@ -318,7 +318,7 @@ if(!player_alt_titles) player_alt_titles = new() if(!organ_data) src.organ_data = list() if(!rlimb_data) src.rlimb_data = list() - if(!gear) gear = list() + if(!loadout_gear) loadout_gear = list() return 1 @@ -336,8 +336,8 @@ rlimblist = list2params(rlimb_data) if(!isemptylist(player_alt_titles)) playertitlelist = list2params(player_alt_titles) - if(!isemptylist(gear)) - gearlist = list2params(gear) + if(!isemptylist(loadout_gear)) + gearlist = list2params(loadout_gear) var/DBQuery/firstquery = GLOB.dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot") firstquery.Execute() @@ -493,7 +493,8 @@ /datum/preferences/proc/SetChangelog(client/C,hash) lastchangelog=hash - if(GLOB.preferences_datums[C.ckey].toggles & UI_DARKMODE) + var/datum/preferences/P = GLOB.preferences_datums[C.ckey] + if(P.toggles & UI_DARKMODE) winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none") else winset(C, "rpane.changelog", "background-color=none;font-style=none") diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index d816e067502..bfa43b92fa3 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -335,7 +335,6 @@ BLIND // can't see anything set category = "Object" set src in usr set_sensors(usr) - ..() //Head /obj/item/clothing/head @@ -563,7 +562,7 @@ BLIND // can't see anything return user.update_inv_wear_suit() else - to_chat(user, "You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.") + to_chat(user, "You attempt to button up the velcro on \the [src], before promptly realising how foolish you are.") /obj/item/clothing/suit/equipped(var/mob/living/carbon/human/user, var/slot) //Handle tail-hiding on a by-species basis. ..() @@ -739,7 +738,7 @@ BLIND // can't see anything if(!usr.incapacitated()) if(copytext(item_color,-2) != "_d") basecolor = item_color - if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi')) + if((basecolor + "_d_s") in icon_states('icons/mob/uniform.dmi')) item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]" usr.update_inv_w_uniform() else diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 4f6468fb9b7..94773ceaa31 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -95,7 +95,7 @@ phaseanim.loc = to_turf sleep(7) if(holder) - if(user && user in holder.contents) + if(user && (user in holder.contents)) user.loc = to_turf if(user.client) if(camera) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index f86c98657be..686c0b0f765 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -93,14 +93,14 @@ /obj/item/clothing/head/helmet/space/plasmaman/security name = "security plasma envirosuit helmet" - desc = "A plasmaman containment helmet designed for security officers, protecting them from being flashed and burning alive, along-side other undesirables." + desc = "A plasmaman containment helmet designed for security officers, protecting them from being flashed and burning alive, alongside other undesirables." icon_state = "security_envirohelm" item_state = "security_envirohelm" armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) /obj/item/clothing/head/helmet/space/plasmaman/security/warden name = "warden's plasma envirosuit helmet" - desc = "A plasmaman containment helmet designed for the warden, a pair of white stripes being added to differeciate them from other members of security." + desc = "A plasmaman containment helmet designed for the warden, a pair of white stripes being added to differentiate them from other members of security." icon_state = "warden_envirohelm" item_state = "warden_envirohelm" @@ -111,14 +111,14 @@ item_state = "hos_envirohelm" /obj/item/clothing/head/helmet/space/plasmaman/medical - name = "medical's plasma envirosuit helmet" - desc = "An envriohelmet designed for plasmaman medical doctors, having two stripes down it's length to denote as much" + name = "medical plasma envirosuit helmet" + desc = "An envirohelmet designed for plasmaman medical doctors, having two stripes down its length to denote as much." icon_state = "doctor_envirohelm" item_state = "doctor_envirohelm" /obj/item/clothing/head/helmet/space/plasmaman/cmo name = "chief medical officer's plasma envirosuit helmet" - desc = "An envriohelmet designed for plasmaman employed as the cheif medical officer." + desc = "An envirohelmet designed for plasmamen employed as the chief medical officer." icon_state = "cmo_envirohelm" item_state = "cmo_envirohelm" @@ -136,7 +136,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/chemist name = "chemistry plasma envirosuit helmet" - desc = "A plasmaman envirosuit designed for chemists, two orange stripes going down it's face." + desc = "A plasmaman envirohelmet designed for chemists, two orange stripes going down its face." icon_state = "chemist_envirohelm" item_state = "chemist_envirohelm" @@ -167,7 +167,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/engineering/ce name = "chief engineer's plasma envirosuit helmet" - desc = "A space-worthy helmet specially designed for chief engineer employed plasmamen." + desc = "A space-worthy helmet specially designed for plasmamen employed as the chief engineer." icon_state = "ce_envirohelm" item_state = "ce_envirohelm" @@ -179,13 +179,13 @@ /obj/item/clothing/head/helmet/space/plasmaman/cargo name = "cargo plasma envirosuit helmet" - desc = "An plasmaman envirohelmet designed for cargo techs and quartermasters." + desc = "A plasmaman envirohelmet designed for cargo techs and quartermasters." icon_state = "cargo_envirohelm" item_state = "cargo_envirohelm" /obj/item/clothing/head/helmet/space/plasmaman/mining name = "mining plasma envirosuit helmet" - desc = "A khaki helmet given to plasmamen miners operating on lavaland." + desc = "A khaki helmet given to plasmaman miners operating on Lavaland." icon_state = "explorer_envirohelm" item_state = "explorer_envirohelm" visor_icon = "explorer_envisor" @@ -210,7 +210,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/librarian name = "librarian's plasma envirosuit helmet" - desc = "A slight modification on a tradiational voidsuit helmet, this helmet was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Despite their limitations, these helmets still see use by historian and old-styled plasmamen alike." + desc = "A slight modification on a traditional voidsuit helmet, this helmet was Nanotrasen's first solution to the *logistical problems* that come with employing plasmamen. Despite their limitations, these helmets still see use by historian and old-styled plasmamen alike." icon_state = "prototype_envirohelm" item_state = "prototype_envirohelm" actions_types = list(/datum/action/item_action/toggle_welding_screen/plasmaman) @@ -218,7 +218,7 @@ /obj/item/clothing/head/helmet/space/plasmaman/botany name = "botany plasma envirosuit helmet" - desc = "A green and blue envirohelmet designating it's wearer as a botanist. While not specially designed for it, it would protect against minor planet-related injuries." + desc = "A green and blue envirohelmet designating its wearer as a botanist. While not specially designed for it, it would protect against minor plant-related injuries." icon_state = "botany_envirohelm" item_state = "botany_envirohelm" @@ -230,14 +230,14 @@ /obj/item/clothing/head/helmet/space/plasmaman/mime name = "mime envirosuit helmet" - desc = "The make-up is painted on, it's a miracle it doesn't chip. It's not very colourful." + desc = "The makeup is painted on, it's a miracle it doesn't chip. It's not very colourful." icon_state = "mime_envirohelm" item_state = "mime_envirohelm" visor_icon = "mime_envisor" /obj/item/clothing/head/helmet/space/plasmaman/clown name = "clown envirosuit helmet" - desc = "The make-up is painted on, it's a miracle it doesn't chip. 'HONK!'" + desc = "The makeup is painted on, it's a miracle it doesn't chip. 'HONK!'" icon_state = "clown_envirohelm" item_state = "clown_envirohelm" visor_icon = "clown_envisor" diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index dfcf80f1303..749e12e8053 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -23,7 +23,7 @@ to_chat(usr, "Your module is not installed in a hardsuit.") return - module.holder.ui_interact(usr, nano_state = GLOB.contained_state) + module.holder.ui_interact(usr, state = GLOB.contained_state) /obj/item/rig_module/ai_container diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 1a2cdbd31a2..cd137f6e12b 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -958,7 +958,7 @@ if(linked_staff.faith >= 100) //if the linked staff is fully recharged, do nothing return - if(!linked_staff in range(3, get_turf(src))) //staff won't charge at range (to prevent it from being handed off / stolen and used) + if(!(linked_staff in range(3, get_turf(src)))) //staff won't charge at range (to prevent it from being handed off / stolen and used) if(prob(10)) //10% chance per process should avoid being too spammy, can tweak if it ends up still being too frequent. to_chat(H, "Your staff is unable to charge at this range. Get closer!") return diff --git a/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm b/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm index 0ef8df4d57b..ea2f0db6812 100644 --- a/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm +++ b/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm @@ -1,13 +1,13 @@ /obj/item/clothing/under/plasmaman/cargo name = "cargo plasma envirosuit" - desc = "A joint envirosuit used by plasmamen quartermasters and cargo techs alike, due to the logistical problems of differenciating the two with the length of their pant legs." + desc = "An envirosuit used by plasmaman quartermasters and cargo techs alike, due to the logistical problems of differentiating the two by the length of their pant legs." icon_state = "cargo_envirosuit" item_state = "cargo_envirosuit" item_color = "cargo_envirosuit" /obj/item/clothing/under/plasmaman/mining name = "mining plasma envirosuit" - desc = "An air-tight khaki suit designed for operations on lavaland by plasmamen." + desc = "An airtight khaki suit designed for operations on Lavaland by plasmamen." icon_state = "explorer_envirosuit" item_state = "explorer_envirosuit" item_color = "explorer_envirosuit" @@ -15,14 +15,14 @@ /obj/item/clothing/under/plasmaman/chef name = "chef's plasma envirosuit" - desc = "A white plasmaman envirosuit designed for cullinary practices. One might question why a member of a species that doesn't need to eat would become a chef." + desc = "A white plasmaman envirosuit designed for culinary practices. One might question why a member of a species that doesn't need to eat would become a chef." icon_state = "chef_envirosuit" item_state = "chef_envirosuit" item_color = "chef_envirosuit" /obj/item/clothing/under/plasmaman/enviroslacks name = "enviroslacks" - desc = "The pet project of a particularly posh plasmaman, this custom suit was quickly appropriated by Nano-Trasen for it's detectives, lawyers, and bar-tenders alike." + desc = "The pet project of a particularly posh plasmaman, this custom suit was quickly appropriated by Nanotrasen for its detectives, lawyers, and bartenders alike." icon_state = "enviroslacks" item_state = "enviroslacks" item_color = "enviroslacks" @@ -36,14 +36,14 @@ /obj/item/clothing/under/plasmaman/librarian name = "librarian's plasma envirosuit" - desc = "Made out of a modified voidsuit, this suit was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Due to the modifications, the suit is no longer space-worthy. Despite their limitations, these suits are still in used by historian and old-styled plasmamen alike." + desc = "Made out of a modified voidsuit, this suit was Nanotrasen's first solution to the *logistical problems* that come with employing plasmamen. Due to the modifications, the suit is no longer space-worthy. Despite their limitations, these suits are still in used by historian and old-styled plasmamen alike." icon_state = "prototype_envirosuit" item_state = "prototype_envirosuit" item_color = "prototype_envirosuit" /obj/item/clothing/under/plasmaman/janitor name = "janitor's plasma envirosuit" - desc = "A grey and purple envirosuit designated for plasmamen janitors." + desc = "A grey and purple envirosuit designated for plasmaman janitors." icon_state = "janitor_envirosuit" item_state = "janitor_envirosuit" item_color = "janitor_envirosuit" diff --git a/code/modules/clothing/under/jobs/plasmamen/engineering.dm b/code/modules/clothing/under/jobs/plasmamen/engineering.dm index 35f99558c1c..02a71afcaf6 100644 --- a/code/modules/clothing/under/jobs/plasmamen/engineering.dm +++ b/code/modules/clothing/under/jobs/plasmamen/engineering.dm @@ -1,6 +1,6 @@ /obj/item/clothing/under/plasmaman/engineering name = "engineering plasma envirosuit" - desc = "An air-tight suit designed to be used by plasmamen exployed as engineers, the usual purple stripes being replaced by engineer's orange. It protects the user from fire and acid damage." + desc = "An airtight suit designed to be used by plasmamen employed as engineers, the usual purple stripes being replaced by engineering's orange. It protects the user from fire and acid damage." icon_state = "engineer_envirosuit" item_state = "engineer_envirosuit" item_color = "engineer_envirosuit" @@ -8,14 +8,14 @@ /obj/item/clothing/under/plasmaman/engineering/ce name = "chief engineer plasma envirosuit" - desc = "An air-tight suit designed to be used by plasmamen exployed as the chief engineer" + desc = "An airtight suit designed to be used by plasmamen employed as the chief engineer." icon_state = "ce_envirosuit" item_state = "ce_envirosuit" item_color = "ce_envirosuit" /obj/item/clothing/under/plasmaman/atmospherics name = "atmospherics plasma envirosuit" - desc = "An air-tight suit designed to be used by plasmamen exployed as atmos technicians, the usual purple stripes being replaced by atmos's blue." + desc = "An airtight suit designed to be used by plasmamen employed as atmos technicians, the usual purple stripes being replaced by atmos' blue." icon_state = "atmos_envirosuit" item_state = "atmos_envirosuit" item_color = "atmos_envirosuit" diff --git a/code/modules/clothing/under/jobs/plasmamen/medsci.dm b/code/modules/clothing/under/jobs/plasmamen/medsci.dm index 69e14c0e878..531bc3fb124 100644 --- a/code/modules/clothing/under/jobs/plasmamen/medsci.dm +++ b/code/modules/clothing/under/jobs/plasmamen/medsci.dm @@ -20,7 +20,7 @@ item_color = "scientist_envirosuit" /obj/item/clothing/under/plasmaman/rd - name = "science plasma envirosuit" + name = "rd plasma envirosuit" desc = "A plasmaman envirosuit designed for the research director." icon_state = "rd_envirosuit" item_state = "rd_envirosuit" diff --git a/code/modules/clothing/under/jobs/plasmamen/security.dm b/code/modules/clothing/under/jobs/plasmamen/security.dm index 7060037bd90..427969307f4 100644 --- a/code/modules/clothing/under/jobs/plasmamen/security.dm +++ b/code/modules/clothing/under/jobs/plasmamen/security.dm @@ -8,7 +8,7 @@ /obj/item/clothing/under/plasmaman/security/warden name = "warden plasma envirosuit" - desc = "A plasmaman containment suit designed for the warden, white stripes being added to differeciate them from other members of security." + desc = "A plasmaman containment suit designed for the warden, white stripes being added to differentiate them from other members of security." icon_state = "warden_envirosuit" item_state = "warden_envirosuit" item_color = "warden_envirosuit" diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index ee2c9e5ba2c..a9c47e760e7 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -356,6 +356,8 @@ var/fail_msg = construct_item(usr, TR) if(!fail_msg) to_chat(usr, "[TR.name] constructed.") + if(TR.alert_admins_on_craft) + message_admins("[usr.ckey] has created a [TR.name] at [ADMIN_COORDJMP(usr)]") else to_chat(usr, "Construction failed[fail_msg]") busy = FALSE diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index ec334979cd2..15a8ae02490 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -11,6 +11,7 @@ var/category = CAT_NONE //where it shows up in the crafting UI var/subcategory = CAT_NONE var/always_availible = TRUE //Set to FALSE if it needs to be learned first. + var/alert_admins_on_craft = FALSE /datum/crafting_recipe/IED name = "IED" @@ -94,6 +95,7 @@ tools = list(TOOL_WELDER) time = 120 category = CAT_ROBOT + alert_admins_on_craft = TRUE /datum/crafting_recipe/cleanbot name = "Cleanbot" @@ -147,6 +149,7 @@ time = 10 category = CAT_WEAPONRY subcategory = CAT_WEAPON + alert_admins_on_craft = TRUE /datum/crafting_recipe/meteorshot name = "Meteorshot Shell" @@ -259,6 +262,7 @@ time = 50 category = CAT_WEAPONRY subcategory = CAT_WEAPON + alert_admins_on_craft = TRUE /datum/crafting_recipe/spear name = "Spear" @@ -378,6 +382,7 @@ time = 30 category = CAT_WEAPONRY subcategory = CAT_WEAPON + alert_admins_on_craft = TRUE /datum/crafting_recipe/chemical_payload2 name = "Chemical Payload (gibtonite)" @@ -391,6 +396,7 @@ time = 50 category = CAT_WEAPONRY subcategory = CAT_WEAPON + alert_admins_on_craft = TRUE /datum/crafting_recipe/toxins_payload name = "Toxins Payload Casing" @@ -503,6 +509,7 @@ reqs = list(/obj/item/grown/log = 5) result = /obj/structure/bonfire category = CAT_PRIMAL + alert_admins_on_craft = TRUE /datum/crafting_recipe/rake //Category resorting incoming name = "Rake" @@ -611,8 +618,8 @@ name = "Paper Jack o'Lantern" result = /obj/item/decorations/sticky_decorations/flammable/jack_o_lantern tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/pen, - /obj/item/toy/crayon/orange, + pathtools = list(/obj/item/pen, + /obj/item/toy/crayon/orange, /obj/item/toy/crayon/green)//pen ink is black category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -629,7 +636,7 @@ name = "Paper Spider" result = /obj/item/decorations/sticky_decorations/flammable/spider tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/pen, + pathtools = list(/obj/item/pen, /obj/item/toy/crayon/red) category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -670,7 +677,7 @@ name = "Paper Snowman" result = /obj/item/decorations/sticky_decorations/flammable/snowman tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/pen, + pathtools = list(/obj/item/pen, /obj/item/toy/crayon/orange) category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -687,9 +694,9 @@ name = "Paper Christmas Tree" result = /obj/item/decorations/sticky_decorations/flammable/christmas_tree tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/toy/crayon/red, - /obj/item/toy/crayon/yellow, - /obj/item/toy/crayon/blue, + pathtools = list(/obj/item/toy/crayon/red, + /obj/item/toy/crayon/yellow, + /obj/item/toy/crayon/blue, /obj/item/toy/crayon/green) category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -714,7 +721,7 @@ name = "Paper Mistletoe" result = /obj/item/decorations/sticky_decorations/flammable/mistletoe tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/toy/crayon/red, + pathtools = list(/obj/item/toy/crayon/red, /obj/item/toy/crayon/green) category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -723,7 +730,7 @@ name = "Paper Holly" result = /obj/item/decorations/sticky_decorations/flammable/holly tools = list(TOOL_WIRECUTTER) - pathtools = list(/obj/item/toy/crayon/red, + pathtools = list(/obj/item/toy/crayon/red, /obj/item/toy/crayon/green) category = CAT_DECORATIONS subcategory = CAT_HOLIDAY @@ -1012,7 +1019,7 @@ /obj/item/stack/rods = 4, /obj/item/stock_parts/cell = 1, /obj/item/stack/cable_coil = 4)//thing is a wireframe construct with an electro magnetic hover field - tools = list(TOOL_WIRECUTTER, + tools = list(TOOL_WIRECUTTER, TOOL_WELDER) pathtools = list(/obj/item/pen, /obj/item/toy/crayon/red) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 983ce229d2c..7fd3743c310 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -1658,13 +1658,16 @@ desc = "A small platinum ring with a large light blue diamond. Engraved inside the band are the words: 'To my lovely Pristine Princess. Forever yours, Savinien.'" icon_state = "benjaminfallout_ring" -/obj/item/clothing/under/fluff/voxbodysuit //Gangelwaefre: Kikeri - name = "Vox Bodysuit" - desc = "A shimmering bodysuit custom-fit to a vox. Has shorts sewn in." + +/obj/item/clothing/under/fluff/kikeridress //Gangelwaefre: Kikeri + name = "Kikeri's Dress" + desc = "A simple black dress with a white undercoat, tied with a blue ribbon." lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi' righthand_file = 'icons/mob/inhands/fluff_righthand.dmi' - icon = 'icons/mob/inhands/fluff_righthand.dmi' - icon_state = "voxbodysuit" - item_state = "voxbodysuit" - item_color = "voxbodysuit" - body_parts_covered = HEAD|UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi') + icon = 'icons/obj/custom_items.dmi' + icon_state = "kikeridress" + item_state = "kikeridress" + item_color = "kikeridress" + body_parts_covered = UPPER_TORSO|LOWER_TORSO + species_restricted = list("Vox") \ No newline at end of file diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index c1491d5c0de..8a8f44099ce 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -11,6 +11,9 @@ var/propadjust = query.item[2] var/jobmask = query.item[3] var/ok = 0 + if(!path || !ispath(path)) + log_debug("Incorrect database entry found in table 'customuseritems' path value = [path], cuiPath is null. cuiCKey='[M.ckey]' AND (cuiRealName='[sanitizeSQL(M.real_name)]' OR cuiRealName='*'") + continue if(jobmask != "*") var/list/allowed_jobs = splittext(jobmask,",") for(var/i = 1, i <= allowed_jobs.len, i++) diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index c636c3d01a7..2646d03fb0f 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -35,7 +35,7 @@ /obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity) if(!proximity) return - if(istype(A) && src in user) + if(istype(A) && (src in user)) user.visible_message("[user] starts to wipe down [A] with [src]!") if(do_after(user, wipespeed, target = A)) user.visible_message("[user] finishes wiping off the [A]!") diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index ea0cd53a6c7..b094dded37e 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -237,9 +237,9 @@ log transactions playsound(src, 'sound/machines/chime.ogg', 50, 1) //remove the money - if(amount > 10000) // prevent crashes - to_chat(usr, "The ATM's screen flashes, 'Maximum single withdrawl limit reached, defaulting to 10,000.'") - amount = 10000 + if(amount > 100000) // prevent crashes + to_chat(usr, "The ATM's screen flashes, 'Maximum single withdrawl limit reached, defaulting to 100,000.'") + amount = 100000 withdraw_arbitrary_sum(amount) authenticated_account.charge(amount, null, "Credit withdrawal", machine_id, authenticated_account.owner_name) else diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 3065ba1c0fd..6995e260500 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -40,7 +40,7 @@ GLOBAL_VAR(current_date_string) return 0 if(ACCESS_CENT_COMMANDER in held_card.access) return 2 - else if(ACCESS_HOP in held_card.access || ACCESS_CAPTAIN in held_card.access) + else if((ACCESS_HOP in held_card.access) || (ACCESS_CAPTAIN in held_card.access)) return 1 /obj/machinery/computer/account_database/proc/accounting_letterhead(report_name) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 2622d06411f..f84b40ebb10 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -150,7 +150,7 @@ var/obj/item/I = usr.get_active_hand() if(istype(I, /obj/item/card)) var/obj/item/card/id/C = I - if(ACCESS_CENT_COMMANDER in C.access || ACCESS_HOP in C.access || ACCESS_CAPTAIN in C.access) + if((ACCESS_CENT_COMMANDER in C.access) || (ACCESS_HOP in C.access) || (ACCESS_CAPTAIN in C.access)) access_code = 0 to_chat(usr, "[bicon(src)]Access code reset to 0.") else if(istype(I, /obj/item/card/emag)) @@ -190,8 +190,4 @@ playsound(src, 'sound/machines/chime.ogg', 50, 1) visible_message("[bicon(src)] The [src] chimes.") transaction_paid = 1 - - else - ..() - //emag? diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index a1e7332aa75..9c744b8060a 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -194,7 +194,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 30), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 5), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Abductor Visit", /datum/event/abductor, 80, is_one_shot = 1), - new /datum/event_meta/alien(EVENT_LEVEL_MAJOR, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 15), 1), + //new /datum/event_meta/alien(EVENT_LEVEL_MAJOR, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 15), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Traders", /datum/event/traders, 180, is_one_shot = 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Terror Spiders", /datum/event/spider_terror, 0, list(ASSIGNMENT_SECURITY = 15), is_one_shot = 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Slaughter Demon", /datum/event/spawn_slaughter, 15, is_one_shot = 1) diff --git a/code/modules/events/event_procs.dm b/code/modules/events/event_procs.dm index 2d679b60d7c..c5b7c893c26 100644 --- a/code/modules/events/event_procs.dm +++ b/code/modules/events/event_procs.dm @@ -80,18 +80,23 @@ if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive continue - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module") - active_with_role["Engineer"]++ + if(istype(M, /mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = M + if(R.module && (R.module.name == "engineering robot module")) + active_with_role["Engineer"]++ + + if(R.module && (R.module.name == "medical robot module")) + active_with_role["Medical"]++ + + if(R.module && (R.module.name == "security robot module")) + active_with_role["Security"]++ + if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer")) active_with_role["Engineer"]++ - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module") - active_with_role["Medical"]++ if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor")) active_with_role["Medical"]++ - if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module") - active_with_role["Security"]++ if(M.mind.assigned_role in GLOB.security_positions) active_with_role["Security"]++ diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 990539a6855..021004c6ee9 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -1,14 +1,15 @@ +#define ION_NOANNOUNCEMENT -1 #define ION_RANDOM 0 #define ION_ANNOUNCE 1 /datum/event/ion_storm var/botEmagChance = 10 - var/announceEvent = ION_RANDOM // -1 means don't announce, 0 means have it randomly announce, 1 means + var/announceEvent = ION_NOANNOUNCEMENT // -1 means don't announce, 0 means have it randomly announce, 1 means var/ionMessage = null var/ionAnnounceChance = 33 announceWhen = 1 -/datum/event/ion_storm/New(var/botEmagChance = 10, var/announceEvent = ION_RANDOM, var/ionMessage = null, var/ionAnnounceChance = 33) +/datum/event/ion_storm/New(var/botEmagChance = 10, var/announceEvent = ION_NOANNOUNCEMENT, var/ionMessage = null, var/ionAnnounceChance = 33) src.botEmagChance = botEmagChance src.announceEvent = announceEvent src.ionMessage = ionMessage @@ -19,11 +20,10 @@ if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance))) GLOB.event_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/AI/ionstorm.ogg') - /datum/event/ion_storm/start() //AI laws for(var/mob/living/silicon/ai/M in GLOB.living_mob_list) - if(M.stat != 2 && M.see_in_dark != 0) + if(M.stat != DEAD && M.see_in_dark != FALSE) var/message = generate_ion_law(ionMessage) if(message) M.add_ion_law(message) @@ -491,7 +491,7 @@ return message /proc/generate_static_ion_law() - /var/list/players = list() + var/list/players = list() for(var/mob/living/carbon/human/player in GLOB.player_list) if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10)) continue @@ -556,5 +556,6 @@ "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.") return pick(laws) +#undef ION_NOANNOUNCEMENT #undef ION_RANDOM #undef ION_ANNOUNCE diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm index 225304c2eaa..4159885e993 100644 --- a/code/modules/events/traders.dm +++ b/code/modules/events/traders.dm @@ -19,7 +19,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol")) if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) GLOB.event_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused") // if the docking request was refused, fire another major event in 60 seconds - var/list/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR] + var/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR] EC.next_event_time = world.time + (60 * 10) return diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 299bef675d2..32e209f98f6 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -732,7 +732,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite var/radio_messages = list("Xenos!","Singularity loose!","Comms down!","They are arming the nuke!","They butchered Ian!","H-help!","[pick("Cult", "Wizard", "Ling", "Ops", "Revenant", "Murderer", "Harm", "I hear flashing", "Help")] in [pick(GLOB.teleportlocs)][prob(50)?"!":"!!"]","Where's [target.name]?","Call the shuttle!","AI rogue!!") var/list/mob/living/carbon/people = list() - var/list/mob/living/carbon/person = null + var/mob/living/carbon/person = null for(var/mob/living/carbon/H in view(target)) if(H == target) continue @@ -835,16 +835,16 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite //To make it more realistic, I added two gunshots (enough to kill) playsound_local(null, 'sound/weapons/gunshots/gunshot.ogg', 25, 1) var/timer_pause = rand(10,30) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound_local, null, 'sound/weapons/gunshots/gunshot.ogg', 25, 1), timer_pause) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound_local, null, sound(get_sfx("bodyfall"), 25), 25, 1), timer_pause+rand(5,10)) + addtimer(CALLBACK(src, /mob/.proc/playsound_local, null, 'sound/weapons/gunshots/gunshot.ogg', 25, 1), timer_pause) + addtimer(CALLBACK(src, /mob/.proc/playsound_local, null, sound(get_sfx("bodyfall"), 25), 25, 1), timer_pause+rand(5,10)) if(10) playsound_local(null, 'sound/effects/pray_chaplain.ogg', 50) if(11) //Same as above, but with tasers. playsound_local(null, 'sound/weapons/taser.ogg', 25, 1) var/timer_pause = rand(10,30) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound_local, null, 'sound/weapons/taser.ogg', 25, 1), timer_pause) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound_local, null, sound(get_sfx("bodyfall"), 25), 25, 1), timer_pause+rand(5,10)) + addtimer(CALLBACK(src, /mob/.proc/playsound_local, null, 'sound/weapons/taser.ogg', 25, 1), timer_pause) + addtimer(CALLBACK(src, /mob/.proc/playsound_local, null, sound(get_sfx("bodyfall"), 25), 25, 1), timer_pause+rand(5,10)) //Rare audio if(12) //These sounds are (mostly) taken from Hidden: Source diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 5b759b93d68..7c253393e07 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -88,7 +88,7 @@ bro.cell.use(chargeAmount) to_chat(user, "Now synthesizing [trans] units of [refillName]...") addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300) - addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "Cyborg [src] refilled."), 300) + addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, user, "Cyborg [src] refilled."), 300) else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us. if(!is_refillable()) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 991d81f443d..382e2f39022 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -77,7 +77,22 @@ new /obj/item/reagent_containers/food/snacks/raw_bacon(loc) qdel(src) -/obj/item/reagent_containers/food/snacks/bearmeat +////////////////////////// +// Monster Meat // +////////////////////////// + +// Cannot be used in the usual meat-based food recipies but can be used as cloning pod biomass. + +/obj/item/reagent_containers/food/snacks/monstermeat + // Abstract object used for inheritance. I don't see why you would want one. + // It's just a convenience to set all monstermeats as biomass-able at once, + // in the GLOB.cloner_biomass_items list. + // DOES NOT SPAWN NATURALLY! + name = "abstract monster meat" + desc = "A slab of abstract monster meat. This shouldn't exist, contact a coder about this if you are seeing it in-game." + icon_state = "bearmeat" + +/obj/item/reagent_containers/food/snacks/monstermeat/bearmeat name = "bear meat" desc = "A very manly slab of meat." icon_state = "bearmeat" @@ -86,7 +101,7 @@ list_reagents = list("protein" = 12, "morphine" = 5, "vitamin" = 2) tastes = list("meat" = 1, "salmon" = 1) -/obj/item/reagent_containers/food/snacks/xenomeat +/obj/item/reagent_containers/food/snacks/monstermeat/xenomeat name = "meat" desc = "A slab of meat. It's green!" icon_state = "xenomeat" @@ -95,7 +110,7 @@ list_reagents = list("protein" = 3, "vitamin" = 1) tastes = list("meat" = 1, "acid" = 1) -/obj/item/reagent_containers/food/snacks/spidermeat +/obj/item/reagent_containers/food/snacks/monstermeat/spidermeat name = "spider meat" desc = "A slab of spider meat. Not very appetizing." icon_state = "spidermeat" @@ -103,7 +118,7 @@ list_reagents = list("protein" = 3, "toxin" = 3, "vitamin" = 1) tastes = list("cobwebs" = 1) -/obj/item/reagent_containers/food/snacks/lizardmeat +/obj/item/reagent_containers/food/snacks/monstermeat/lizardmeat name = "mutant lizard meat" desc = "A peculiar slab of meat. It looks scaly and radioactive." icon_state = "xenomeat" @@ -112,7 +127,7 @@ list_reagents = list("protein" = 3, "toxin" = 3) tastes = list("tough meat" = 1) -/obj/item/reagent_containers/food/snacks/spiderleg +/obj/item/reagent_containers/food/snacks/monstermeat/spiderleg name = "spider leg" desc = "A still twitching leg of a giant spider. You don't really want to eat this, do you?" icon_state = "spiderleg" @@ -126,21 +141,21 @@ list_reagents = list("nutriment" = 1, "porktonium" = 10) tastes = list("bacon" = 1) -/obj/item/reagent_containers/food/snacks/spidereggs +/obj/item/reagent_containers/food/snacks/monstermeat/spidereggs name = "spider eggs" desc = "A cluster of juicy spider eggs. A great side dish for when you don't care about your health." icon_state = "spidereggs" list_reagents = list("protein" = 2, "toxin" = 2) tastes = list("cobwebs" = 1, "spider juice" = 1) -/obj/item/reagent_containers/food/snacks/goliath +/obj/item/reagent_containers/food/snacks/monstermeat/goliath name = "goliath meat" desc = "A slab of goliath meat. It's not very edible now, but it cooks great in lava." icon_state = "goliathmeat" list_reagents = list("protein" = 3, "toxin" = 5) tastes = list("tough meat" = 1) -/obj/item/reagent_containers/food/snacks/goliath/burn() +/obj/item/reagent_containers/food/snacks/monstermeat/goliath/burn() visible_message("[src] finishes cooking!") new /obj/item/reagent_containers/food/snacks/goliath_steak(loc) qdel(src) @@ -243,7 +258,7 @@ trash = null list_reagents = list("protein" = 6, "vitamin" = 2) tastes = list("meat" = 1) - + /obj/item/reagent_containers/food/snacks/fried_vox name = "Kentucky Fried Vox" desc = "Bucket of voxxy, yaya!" diff --git a/code/modules/food_and_drinks/food/foods/seafood.dm b/code/modules/food_and_drinks/food/foods/seafood.dm index 007af8f6eb9..b74ab0c3149 100644 --- a/code/modules/food_and_drinks/food/foods/seafood.dm +++ b/code/modules/food_and_drinks/food/foods/seafood.dm @@ -114,7 +114,7 @@ trash = /obj/item/stack/rods icon = 'icons/obj/food/seafood.dmi' icon_state = "shrimpskewer" - bitesize = 3 + bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("shrimp" = 4) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index b2f0f5eb690..8d0408a74fb 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -273,7 +273,6 @@ // reagents.add_reagent("nutriment", 2) // this line of code for all the contents. // bitesize = 3 //This is the amount each bite consumes. - /obj/item/reagent_containers/food/snacks/badrecipe name = "burned mess" desc = "Someone should be demoted from chef for this." diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index 83f9aea745f..047b3968176 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -112,7 +112,7 @@ /datum/recipe/grill/wingfangchu reagents = list("soysauce" = 5) items = list( - /obj/item/reagent_containers/food/snacks/xenomeat, + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat ) result = /obj/item/reagent_containers/food/snacks/wingfangchu @@ -228,11 +228,9 @@ result = /obj/item/reagent_containers/food/snacks/sushi_Tai /datum/recipe/grill/goliath - items = list( -/obj/item/reagent_containers/food/snacks/goliath - ) + items = list(/obj/item/reagent_containers/food/snacks/monstermeat/goliath) result = /obj/item/reagent_containers/food/snacks/goliath_steak - + /datum/recipe/grill/shrimp_skewer items = list( /obj/item/reagent_containers/food/snacks/shrimp, diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 44c572b34e7..f8d720ec56c 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -87,8 +87,7 @@ /datum/recipe/microwave/xenoburger items = list( /obj/item/reagent_containers/food/snacks/bun, - /obj/item/reagent_containers/food/snacks/xenomeat - ) + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat ) result = /obj/item/reagent_containers/food/snacks/xenoburger /datum/recipe/microwave/fishburger @@ -630,22 +629,22 @@ datum/recipe/microwave/slimesandwich /datum/recipe/microwave/boiledspiderleg reagents = list("water" = 10) items = list( - /obj/item/reagent_containers/food/snacks/spiderleg, + /obj/item/reagent_containers/food/snacks/monstermeat/spiderleg ) result = /obj/item/reagent_containers/food/snacks/boiledspiderleg /datum/recipe/microwave/spidereggsham reagents = list("sodiumchloride" = 1) items = list( - /obj/item/reagent_containers/food/snacks/spidereggs, - /obj/item/reagent_containers/food/snacks/spidermeat, + /obj/item/reagent_containers/food/snacks/monstermeat/spidereggs, + /obj/item/reagent_containers/food/snacks/monstermeat/spidermeat ) result = /obj/item/reagent_containers/food/snacks/spidereggsham /datum/recipe/microwave/sashimi reagents = list("soysauce" = 5) items = list( - /obj/item/reagent_containers/food/snacks/spidereggs, + /obj/item/reagent_containers/food/snacks/monstermeat/spidereggs, /obj/item/reagent_containers/food/snacks/carpmeat, ) result = /obj/item/reagent_containers/food/snacks/sashimi diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index a53ee6e75d9..1a4b7f387a1 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -40,9 +40,9 @@ /obj/item/reagent_containers/food/snacks/dough, /obj/item/reagent_containers/food/snacks/dough, /obj/item/reagent_containers/food/snacks/dough, - /obj/item/reagent_containers/food/snacks/xenomeat, - /obj/item/reagent_containers/food/snacks/xenomeat, - /obj/item/reagent_containers/food/snacks/xenomeat, + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat, + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat, + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat, /obj/item/reagent_containers/food/snacks/cheesewedge, /obj/item/reagent_containers/food/snacks/cheesewedge, /obj/item/reagent_containers/food/snacks/cheesewedge, @@ -115,7 +115,7 @@ /datum/recipe/oven/xemeatpie items = list( /obj/item/reagent_containers/food/snacks/sliceable/flatdough, - /obj/item/reagent_containers/food/snacks/xenomeat, + /obj/item/reagent_containers/food/snacks/monstermeat/xenomeat ) result = /obj/item/reagent_containers/food/snacks/xemeatpie diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 84b5083d332..5858db2947f 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -110,6 +110,7 @@ anchored = TRUE buckle_lying = FALSE var/burning = 0 + var/lighter // Who lit the fucking thing var/fire_stack_strength = 5 /obj/structure/bonfire/dense @@ -125,6 +126,8 @@ var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16) underlays += U if(is_hot(W)) + lighter = user.ckey + user.create_log(MISC_LOG, "lit a bonfire", src) StartBurning() @@ -163,6 +166,9 @@ /obj/structure/bonfire/Crossed(atom/movable/AM, oldloc) if(burning) Burn() + if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + add_attack_logs(src, H, "Burned by a bonfire (Lit by [lighter])", ATKLOG_ALMOSTALL) /obj/structure/bonfire/proc/Burn() var/turf/current_location = get_turf(src) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 50e288bf47a..0f41ba4b602 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -560,7 +560,7 @@ if(S.has_reagent("charcoal", 1)) adjustToxic(-round(S.get_reagent_amount("charcoal") * 2)) - // NIGGA, YOU JUST WENT ON FULL RETARD. + // BRO, YOU JUST WENT ON FULL STUPID. if(S.has_reagent("toxin", 1)) adjustToxic(round(S.get_reagent_amount("toxin") * 2)) @@ -619,7 +619,7 @@ adjustHealth(round(S.get_reagent_amount("sodawater") * 0.1)) adjustNutri(round(S.get_reagent_amount("sodawater") * 0.1)) - // Man, you guys are retards + // Man, you guys are daft if(S.has_reagent("sacid", 1)) adjustHealth(-round(S.get_reagent_amount("sacid") * 1)) adjustToxic(round(S.get_reagent_amount("sacid") * 1.5)) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 091534633f9..8cfc9b7d5f0 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -348,14 +348,14 @@ for(var/i in 1 to seed.growthstages) if("[seed.icon_grow][i]" in states) continue - log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!", src) + log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!") if(!(seed.icon_dead in states)) - log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!", src) + log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!") if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product if(!(seed.icon_harvest in states)) - log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!", src) + log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!") /obj/item/seeds/proc/randomize_stats() set_lifespan(rand(25, 60)) diff --git a/code/modules/keybindings/bindings_robot.dm b/code/modules/keybindings/bindings_robot.dm index 073f0ccae84..f85264308a0 100644 --- a/code/modules/keybindings/bindings_robot.dm +++ b/code/modules/keybindings/bindings_robot.dm @@ -11,10 +11,8 @@ return if("Q") if(!(client.prefs.toggles & AZERTY)) - uneq_active() - return + on_drop_hotkey_press() // User is in QWERTY hotkey mode. if("A") if(client.prefs.toggles & AZERTY) - uneq_active() - return + on_drop_hotkey_press() return ..() diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 0b32b6aedde..dbb41229e27 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -109,7 +109,7 @@ GLOBAL_LIST(labor_sheet_values) if(!alone_in_area(get_area(src), usr)) to_chat(usr, "Prisoners are only allowed to be released while alone.") else - switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE)) + switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE, usr)) if(1) to_chat(usr, "Shuttle not found.") if(2) @@ -121,6 +121,7 @@ GLOBAL_LIST(labor_sheet_values) var/message = "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval." announcer.autosay(message, "Labor Camp Controller", "Security") to_chat(usr, "Shuttle received message and will be sent shortly.") + usr.create_log(MISC_LOG, "used [src] to call the laborcamp shuttle") return TRUE diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 49dec671301..8737fdf21b3 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -14,7 +14,7 @@ var/points = 0 //How many points this ore gets you from the ore redemption machine var/refined_type = null //What this ore defaults to being refined into -/obj/item/stack/ore/New() +/obj/item/stack/ore/New(loc, new_amount, merge = TRUE) ..() pixel_x = rand(0, 16) - 8 pixel_y = rand(0, 8) - 8 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 548d22a3fa3..91a57e1ccbe 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -117,7 +117,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) MA.blend_mode = COPY.blend_mode MA.color = COPY.color MA.dir = COPY.dir - MA.gender = COPY.gender MA.icon = COPY.icon MA.icon_state = COPY.icon_state MA.layer = COPY.layer @@ -131,7 +130,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) if(!isicon(MA.icon) && !LAZYLEN(MA.overlays)) // Gibbing/dusting/melting removes the icon before ghostize()ing the mob, so we need to account for that MA.icon = initial(icon) MA.icon_state = initial(icon_state) - MA.suffix = COPY.suffix MA.underlays = COPY.underlays . = MA diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index cc497adc3e0..2b07e10291f 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -90,7 +90,7 @@ if(speaker_name != speaker.real_name && speaker.real_name) speaker_name = "[speaker.real_name] ([speaker_name])" track = "([ghost_follow_link(speaker, ghost=src)]) " - if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src)) + if(client.prefs.toggles & CHAT_GHOSTEARS && (speaker in view(src))) message = "[message]" if(!can_hear()) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 5936a0624d0..8445dec51ee 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -98,7 +98,9 @@ if(!check_can_speak(speaker)) return FALSE - log_say("([name]-HIVE) [message]", speaker) + var/log_message = "([name]-HIVE) [message]" + log_say(log_message, speaker) + speaker.create_log(SAY_LOG, log_message) if(!speaker_mask) speaker_mask = speaker.name @@ -605,7 +607,10 @@ if(!message) return - log_say("(ROBOT) [message]", speaker) + var/log_message = "(ROBOT) [message]" + log_say(log_message, speaker) + speaker.create_log(SAY_LOG, log_message) + var/message_start = "[name], [speaker.name]" var/message_body = "[speaker.say_quote(message)],\"[message]\"
" diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 4cba49a2a03..73931aa7be9 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -83,7 +83,7 @@ else //Maybe uses plasma in the future, although that wouldn't make any sense... leaping = 1 update_icons() - throw_at(A, MAX_ALIEN_LEAP_DIST, 1, spin = 0, diagonals_first = 1, callback = CALLBACK(src, .leap_end)) + throw_at(A, MAX_ALIEN_LEAP_DIST, 1, spin = 0, diagonals_first = 1, callback = CALLBACK(src, .proc/leap_end)) /mob/living/carbon/alien/humanoid/hunter/proc/leap_end() leaping = 0 diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 29b37294cc4..63f6d3dcea9 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -2,7 +2,7 @@ name = "alien" icon_state = "alien_s" - butcher_results = list(/obj/item/reagent_containers/food/snacks/xenomeat = 5, /obj/item/stack/sheet/animalhide/xeno = 1) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/xenomeat= 5, /obj/item/stack/sheet/animalhide/xeno = 1) var/obj/item/r_store = null var/obj/item/l_store = null var/caste = "" diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 13eb62587be..9390885c558 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -54,7 +54,7 @@ else healths.icon_state = "health6" -/mob/living/carbon/alien/humanoid/queen/can_inject() +/mob/living/carbon/alien/humanoid/queen/can_inject(mob/user, error_msg, target_zone, penetrate_thick) return FALSE //Queen verbs diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index 4b7845b0a0a..4776f32596a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -69,7 +69,7 @@ /mob/living/carbon/alien/humanoid/update_transform() //The old method of updating lying/standing was update_icons(). Aliens still expect that. if(lying > 0) - lying = 90 //Anything else looks retarded + lying = 90 //Anything else looks lousy ..() update_icons() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 80f3c73d3d7..5b80f6d032f 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -83,7 +83,7 @@ return Attach(AM) return 0 -/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed) +/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force) if(!..()) return if(stat == CONSCIOUS) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 980a9b72c52..c4cd95eeb83 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -432,13 +432,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven if(!vent_found) for(var/obj/machinery/atmospherics/machine in range(1,src)) - if(is_type_in_list(machine, GLOB.ventcrawl_machinery)) + if(is_type_in_list(machine, GLOB.ventcrawl_machinery) && machine.can_crawl_through()) vent_found = machine - - if(!vent_found.can_crawl_through()) - vent_found = null - - if(vent_found) break if(vent_found) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index d8b948fc865..de9a9209925 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -431,4 +431,4 @@ if("l_hand") . = "left hand" if("r_hand") - . = "right hand" \ No newline at end of file + . = "right hand" diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index a12ef49fb7f..f2a976e46d2 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -111,7 +111,7 @@ var/obj/item/organ/external/O = get_organ(organ_name) if(amount > 0) - O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, list(), FALSE, updating_health) + O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, forbidden_limbs = list(), ignore_resists=FALSE, updating_health=updating_health) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index b0bc9e610f3..60b6da987dd 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -23,7 +23,7 @@ GLOBAL_DATUM_INIT(default_martial_art, /datum/martial_art, new()) var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack. //Equipment slots - var/obj/item/w_uniform = null + var/obj/item/clothing/under/w_uniform = null var/obj/item/shoes = null var/obj/item/belt = null var/obj/item/gloves = null diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d1b0935a6b3..17f2adb67dc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -897,7 +897,7 @@ // Not on the station or mining? var/turf/temp_turf = get_turf(remoteview_target) - if(!temp_turf in config.contact_levels) + if(!(temp_turf in config.contact_levels)) to_chat(src, "Your psy-connection grows too faint to maintain!") isRemoteObserve = 0 @@ -1123,4 +1123,4 @@ // Need this in species. //#undef HUMAN_MAX_OXYLOSS -//#undef HUMAN_CRIT_MAX_OXYLOSS \ No newline at end of file +//#undef HUMAN_CRIT_MAX_OXYLOSS diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 6034a22139b..bb3d2609010 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -347,7 +347,7 @@ if(H.LAssailant && ishuman(H.LAssailant)) //superheros still get the comical hit markers var/mob/living/carbon/human/A = H.LAssailant - if(A.mind && A.mind in (SSticker.mode.superheroes || SSticker.mode.supervillains || SSticker.mode.greyshirts)) + if(A.mind && (A.mind in (SSticker.mode.superheroes) || SSticker.mode.supervillains || SSticker.mode.greyshirts)) var/list/attack_bubble_recipients = list() var/mob/living/user for(var/mob/O in viewers(user, src)) @@ -963,7 +963,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u /datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) -/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) +/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H) /proc/get_random_species(species_name = FALSE) // Returns a random non black-listed or hazardous species, either as a string or datum var/static/list/random_species = list() diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 157995e9549..9f4a27a3c41 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -474,7 +474,7 @@ if(P.is_reflectable) H.visible_message("The [P.name] gets reflected by [H]'s glass skin!", \ "The [P.name] gets reflected by [H]'s glass skin!") - + P.reflect_back(H) return FALSE @@ -534,7 +534,7 @@ if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != INTENT_HELP) reactive_teleport(H) -/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) +/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H) ..() if(world.time > last_teleport + teleport_cooldown && user != H) reactive_teleport(H) @@ -654,7 +654,7 @@ new/obj/item/grown/bananapeel/specialpeel(get_turf(H)) last_banana = world.time -/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) +/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H) ..() if(world.time > last_banana + banana_cooldown && user != H) new/obj/item/grown/bananapeel/specialpeel(get_turf(H)) diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index 6a478c00f55..9c5b51b743b 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -18,6 +18,7 @@ is_small = 1 has_fine_manipulation = 0 ventcrawler = VENTCRAWLER_NUDE + dietflags = DIET_OMNI show_ssd = 0 eyes = "blank_eyes" death_message = "lets out a faint chimper as it collapses and stops moving..." diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 622e0919b45..3a3f4c3d3ac 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -198,4 +198,4 @@ #undef SLIMEPERSON_HUNGERCOST #undef SLIMEPERSON_MINHUNGER -#undef SLIMEPERSON_REGROWTHDELAY \ No newline at end of file +#undef SLIMEPERSON_REGROWTHDELAY diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 6139bed100f..90ba1e7fe4f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -575,7 +575,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) bloodsies.color = w_uniform.blood_color standing.overlays += bloodsies - if(w_uniform:accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun: + if(w_uniform.accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun: for(var/obj/item/clothing/accessory/A in w_uniform:accessories) var/tie_color = A.item_color if(!tie_color) diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 4d8aa1b776b..0984c56decb 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -81,6 +81,7 @@ update_canmove() timeofdeath = world.time + create_log(ATTACK_LOG, "died[gibbed ? " (Gibbed)": ""]") GLOB.living_mob_list -= src GLOB.dead_mob_list += src diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 30e10553d3e..22a48f9d9ee 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -9,7 +9,6 @@ prepare_data_huds() /mob/living/proc/prepare_data_huds() - ..() med_hud_set_health() med_hud_set_status() @@ -375,7 +374,7 @@ return 0 // Living mobs use can_inject() to make sure that the mob is not syringe-proof in general. -/mob/living/proc/can_inject() +/mob/living/proc/can_inject(mob/user, error_msg, target_zone, penetrate_thick) return TRUE /mob/living/is_injectable(mob/user, allowmobs = TRUE) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index eeaed10b9c5..edb62d0e013 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -177,6 +177,12 @@ proc/get_radio_key_from_channel(var/channel) if(handle_message_mode(message_mode, message_pieces, verb, used_radios)) return 1 + // Log of what we've said, plain message, no spans or junk + // handle_message_mode should have logged this already if it handled it + var/log_message = "[message_mode ? "([message_mode])" : ""] '[message]'" + say_log += log_message + create_log(SAY_LOG, log_message) // TODO after #13047: Include the channel + log_say(log_message, src) var/list/handle_v = handle_speech_sound() var/sound/speech_sound = handle_v[1] @@ -274,10 +280,6 @@ proc/get_radio_key_from_channel(var/channel) if(O) //It's possible that it could be deleted in the meantime. O.hear_talk(src, message_pieces, verb) - //Log of what we've said, plain message, no spans or junk - say_log += message - create_log(SAY_LOG, message) // TODO after #13047: Include the channel - log_say(message, src) return 1 /obj/effect/speech_bubble diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 5bdea06e18e..7161919df7f 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -382,14 +382,6 @@ return 1 /mob/living/silicon/pai/proc/hackloop() - var/turf/T = get_turf_or_move(src.loc) - for(var/mob/living/silicon/ai/AI in GLOB.player_list) - if(!T || !is_station_contact(T.z)) - break - if(T.loc) - to_chat(AI, "Network Alert: Brute-force encryption crack in progress in [T.loc].") - else - to_chat(AI, "Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.") var/obj/machinery/door/D = cable.machine if(!istype(D)) hack_aborted = 1 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 48f1acd80fa..dc32deaf5a7 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -48,7 +48,7 @@ if(radio) radio.wires.CutWireIndex(RADIO_WIRE_TRANSMIT) - if(camera && "Robots" in camera.network) + if(camera && ("Robots" in camera.network)) camera.network.Add("Engineering") //They are unable to be upgraded, so let's give them a bit of a better battery. diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index d200bdb075a..7958f983805 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -30,29 +30,22 @@ /obj/item/circuitboard, /obj/item/stack/tile/light, /obj/item/stack/ore/bluespace_crystal - ) + ) //Item currently being held. - var/obj/item/wrapped = null - -/obj/item/gripper/paperwork - name = "paperwork gripper" - desc = "A simple grasping tool for clerical work." - - can_hold = list( - /obj/item/clipboard, - /obj/item/paper, - /obj/item/card/id - ) + var/obj/item/gripped_item = null /obj/item/gripper/medical name = "medical gripper" desc = "A grasping tool used to help patients up once surgery is complete." can_hold = list() -/obj/item/gripper/medical/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params) +/obj/item/gripper/medical/attack_self(mob/user) + return + +/obj/item/gripper/medical/afterattack(atom/target, mob/living/user, proximity, params) var/mob/living/carbon/human/H - if(!wrapped && proximity && target && ishuman(target)) + if(!gripped_item && proximity && target && ishuman(target)) H = target if(H.lying) H.AdjustSleeping(-5) @@ -71,98 +64,69 @@ ..() can_hold = typecacheof(can_hold) -/obj/item/gripper/attack_self(mob/user as mob) - if(wrapped) - wrapped.attack_self(user) - /obj/item/gripper/verb/drop_item() - set name = "Drop Gripped Item" set desc = "Release an item from your magnetic gripper." set category = "Drone" - drop_item_p() + drop_gripped_item() -// The "p" stands for proc, since I was having annoying weird stuff happening with this in the verb -// when trying to have default values for arguments and stuff -/obj/item/gripper/proc/drop_item_p(var/silent = 0) +/obj/item/gripper/attack_self(mob/user) + if(gripped_item) + gripped_item.attack_self(user) + else + to_chat(user, "[src] is empty.") - if(!wrapped) - //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z - for(var/obj/item/thing in src.contents) - thing.forceMove(get_turf(src)) - return +/obj/item/gripper/proc/drop_gripped_item(silent = FALSE) + if(gripped_item) + if(!silent) + to_chat(loc, "You drop [gripped_item].") + gripped_item.forceMove(get_turf(src)) + gripped_item = null - if(wrapped.loc != src) - wrapped = null - return - - if(!silent) - to_chat(src.loc, "You drop \the [wrapped].") - wrapped.forceMove(get_turf(src)) - wrapped = null - -/obj/item/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) +/obj/item/gripper/attack(mob/living/carbon/M, mob/living/carbon/user) return -/obj/item/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params) +/// Grippers are snowflakey so this is needed to to prevent forceMoving grippers after `if(!user.drop_item())` checks done in certain attackby's. +/obj/item/gripper/forceMove(atom/destination) + return + +/obj/item/gripper/afterattack(atom/target, mob/living/user, proximity, params) if(!target || !proximity) //Target is invalid or we are not adjacent. - return + return FALSE - //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z - if(!wrapped) - for(var/obj/item/thing in src.contents) - wrapped = thing - break + if(gripped_item) //Already have an item. - if(wrapped) //Already have an item. - - //Temporary put wrapped into user so target's attackby() checks pass. - wrapped.forceMove(user) - - //Pass the attack on to the target. This might delete/relocate wrapped. - if(!target.attackby(wrapped, user, params) && target && wrapped) - // If the attackby didn't resolve or delete the target or wrapped, afterattack + //Pass the attack on to the target. This might delete/relocate gripped_item. + if(!target.attackby(gripped_item, user, params)) + // If the attackby didn't resolve or delete the target or gripped_item, afterattack // (Certain things, such as mountable frames, rely on afterattack) - wrapped.afterattack(target, user, 1, params) + gripped_item?.afterattack(target, user, 1, params) - //If wrapped did neither get deleted nor put into target, put it back into the gripper. - if(wrapped && user && (wrapped.loc == user)) - wrapped.forceMove(src) - else - wrapped = null - return - - else if(istype(target,/obj/item)) //Check that we're not pocketing a mob. - - //...and that the item is not in a container. - if(!isturf(target.loc)) - return + //If gripped_item either didn't get deleted, or it failed to be transfered to its target + if(!gripped_item && contents.len) + gripped_item = contents[1] + return FALSE + else if(gripped_item && !contents.len) + gripped_item = null + else if(istype(target, /obj/item)) //Check that we're not pocketing a mob. var/obj/item/I = target - - //Check if the item is blacklisted. - var/grab = 0 - if(can_hold.len) - if(is_type_in_typecache(I, can_hold)) - grab = 1 - - //We can grab the item, finally. - if(grab) - to_chat(user, "You collect \the [I].") + if(is_type_in_typecache(I, can_hold)) // Make sure the item is something the gripper can hold + to_chat(user, "You collect [I].") I.forceMove(src) - wrapped = I - return + gripped_item = I else - to_chat(user, "Your gripper cannot hold \the [target].") + to_chat(user, "Your gripper cannot hold [target].") + return FALSE else if(istype(target,/obj/machinery/power/apc)) var/obj/machinery/power/apc/A = target if(A.opened) if(A.cell) - wrapped = A.cell + gripped_item = A.cell A.cell.add_fingerprint(user) A.cell.update_icon() @@ -173,6 +137,7 @@ A.update_icon() user.visible_message("[user] removes the power cell from [A]!", "You remove the power cell.") + return TRUE //TODO: Matter decompiler. /obj/item/matter_decompiler diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index 16d9080ef7e..a68da651ee9 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -115,11 +115,11 @@ return 0 /mob/living/silicon/robot/drop_item() - var/obj/item/I = get_active_hand() - if(istype(I, /obj/item/gripper)) - var/obj/item/gripper/G = I - G.drop_item_p(silent = 1) - return + var/obj/item/gripper/G = get_active_hand() + if(istype(G)) + G.drop_gripped_item(silent = TRUE) + return TRUE // The gripper is special because it has a normal item inside that we can drop. + return FALSE // All robot inventory items have NODROP, so they should return FALSE. //Helper procs for cyborg modules on the UI. //These are hackish but they help clean up code elsewhere. diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a8bad5ebc03..cf3067b934f 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -328,7 +328,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if("Miner") module = new /obj/item/robot_module/miner(src) module.channels = list("Supply" = 1) - if(camera && "Robots" in camera.network) + if(camera && ("Robots" in camera.network)) camera.network.Add("Mining Outpost") module_sprites["Basic"] = "Miner_old" module_sprites["Advanced Droid"] = "droid-miner" @@ -340,7 +340,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if("Medical") module = new /obj/item/robot_module/medical(src) module.channels = list("Medical" = 1) - if(camera && "Robots" in camera.network) + if(camera && ("Robots" in camera.network)) camera.network.Add("Medical") module_sprites["Basic"] = "Medbot" module_sprites["Surgeon"] = "surgeon" @@ -366,7 +366,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if("Engineering") module = new /obj/item/robot_module/engineering(src) module.channels = list("Engineering" = 1) - if(camera && "Robots" in camera.network) + if(camera && ("Robots" in camera.network)) camera.network.Add("Engineering") module_sprites["Basic"] = "Engineering" module_sprites["Antique"] = "engineerrobot" @@ -1133,7 +1133,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(!updating) updating = 1 spawn(BORG_CAMERA_BUFFER) - if(oldLoc != src.loc) + if(camera && oldLoc != src.loc) GLOB.cameranet.updatePortableCamera(src.camera) updating = 0 if(module) @@ -1472,3 +1472,12 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + +/// Used in `robot_bindings.dm` when the user presses "A" if on AZERTY mode, or "Q" on QWERTY mode. +/mob/living/silicon/robot/proc/on_drop_hotkey_press() + var/obj/item/gripper/G = get_active_hand() + if(istype(G) && G.gripped_item) + G.drop_gripped_item() // if the active module is a gripper, try to drop its held item. + else + uneq_active() // else unequip the module and put it back into the robot's inventory. + return diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 47dcb93cef5..3260775c674 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -230,7 +230,7 @@ /obj/item/robot_module/engineering/handle_death() var/obj/item/gripper/G = locate(/obj/item/gripper) in modules if(G) - G.drop_item() + G.drop_gripped_item(silent = TRUE) /obj/item/robot_module/security name = "security robot module" @@ -578,7 +578,7 @@ /obj/item/robot_module/drone/handle_death() var/obj/item/gripper/G = locate(/obj/item/gripper) in modules if(G) - G.drop_item() + G.drop_gripped_item(silent = TRUE) //checks whether this item is a module of the robot it is located in. /obj/item/proc/is_robot_module() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index a62f5f9d358..65267911d7f 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -92,7 +92,7 @@ /mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0) return -/mob/living/silicon/can_inject(mob/user, error_msg) +/mob/living/silicon/can_inject(mob/user, error_msg, target_zone, penetrate_thick) if(error_msg) to_chat(user, "[p_their(TRUE)] outer shell is too tough.") return FALSE diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 1446ef7d4bb..a48b36cb0c7 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -49,11 +49,11 @@ if(C.avail()) visible_message("[src] chews through [C]. It's toast!") playsound(src, 'sound/effects/sparks2.ogg', 100, 1) - C.deconstruct() toast() // mmmm toasty. else - C.deconstruct() visible_message("[src] chews through [C].") + investigate_log("was chewed through by a mouse in [get_area(F)]([F.x], [F.y], [F.z] - [ADMIN_JMP(F)])","wires") + C.deconstruct() /mob/living/simple_animal/mouse/handle_automated_speech() ..() diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 5a369a043d7..038b3b3d221 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -11,7 +11,7 @@ response_disarm = "shoves" response_harm = "hits" speed = 0 - butcher_results = list(/obj/item/reagent_containers/food/snacks/xenomeat = 3, /obj/item/stack/sheet/animalhide/xeno = 1) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/xenomeat= 3, /obj/item/stack/sheet/animalhide/xeno = 1) maxHealth = 125 health = 125 harm_intent_damage = 5 @@ -83,7 +83,7 @@ retreat_distance = 5 minimum_distance = 5 move_to_delay = 4 - butcher_results = list(/obj/item/reagent_containers/food/snacks/xenomeat = 4, /obj/item/stack/sheet/animalhide/xeno = 1) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/xenomeat= 4, /obj/item/stack/sheet/animalhide/xeno = 1) projectiletype = /obj/item/projectile/neurotox projectilesound = 'sound/weapons/pierce.ogg' status_flags = 0 @@ -130,7 +130,7 @@ move_to_delay = 4 maxHealth = 400 health = 400 - butcher_results = list(/obj/item/reagent_containers/food/snacks/xenomeat = 10, /obj/item/stack/sheet/animalhide/xeno = 2) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/xenomeat= 10, /obj/item/stack/sheet/animalhide/xeno = 2) mob_size = MOB_SIZE_LARGE gold_core_spawnable = NO_SPAWN diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 2530fb4b389..d5b7205f09c 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -13,7 +13,7 @@ speak_chance = 1 turns_per_move = 5 see_in_dark = 6 - butcher_results = list(/obj/item/reagent_containers/food/snacks/bearmeat = 5, /obj/item/clothing/head/bearpelt = 1) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/bearmeat= 5, /obj/item/clothing/head/bearpelt = 1) response_help = "pets" response_disarm = "gently pushes aside" response_harm = "hits" diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index a0cb935ba25..7b0b52f0b4f 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -74,12 +74,11 @@ else our_color = pick(carp_colors) add_atom_colour(carp_colors[our_color], FIXED_COLOUR_PRIORITY) - add_carp_overlay() + regenerate_icons() /mob/living/simple_animal/hostile/carp/proc/add_carp_overlay() if(!random_color) return - cut_overlays() var/mutable_appearance/base_overlay = mutable_appearance(icon, "base_mouth") base_overlay.appearance_flags = RESET_COLOR add_overlay(base_overlay) @@ -87,7 +86,6 @@ /mob/living/simple_animal/hostile/carp/proc/add_dead_carp_overlay() if(!random_color) return - cut_overlays() var/mutable_appearance/base_dead_overlay = mutable_appearance(icon, "base_dead_mouth") base_dead_overlay.appearance_flags = RESET_COLOR add_overlay(base_dead_overlay) @@ -103,24 +101,22 @@ /mob/living/simple_animal/hostile/carp/death(gibbed) . = ..() - cut_overlays() if(!random_color || gibbed) return - add_dead_carp_overlay() + regenerate_icons() /mob/living/simple_animal/hostile/carp/revive() ..() regenerate_icons() /mob/living/simple_animal/hostile/carp/regenerate_icons() - cut_overlays() + ..() if(!random_color) return if(stat != DEAD) add_carp_overlay() else add_dead_carp_overlay() - ..() /mob/living/simple_animal/hostile/carp/holocarp icon_state = "holocarp" diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index b456db6efaf..614e814fc25 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -18,7 +18,7 @@ turns_per_move = 5 see_in_dark = 8 lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - butcher_results = list(/obj/item/reagent_containers/food/snacks/spidermeat = 2, /obj/item/reagent_containers/food/snacks/spiderleg = 8) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/spidermeat= 2, /obj/item/reagent_containers/food/snacks/monstermeat/spiderleg= 8) response_help = "pets" response_disarm = "gently pushes aside" response_harm = "hits" @@ -53,7 +53,7 @@ icon_state = "nurse" icon_living = "nurse" icon_dead = "nurse_dead" - butcher_results = list(/obj/item/reagent_containers/food/snacks/spidermeat = 2, /obj/item/reagent_containers/food/snacks/spiderleg = 8, /obj/item/reagent_containers/food/snacks/spidereggs = 4) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/spidermeat= 2, /obj/item/reagent_containers/food/snacks/monstermeat/spiderleg= 8, /obj/item/reagent_containers/food/snacks/monstermeat/spidereggs= 4) maxHealth = 40 health = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index b3618efff0a..4ce66ccd1d5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -91,7 +91,7 @@ else devour(L) -/mob/living/simple_animal/hostile/megafauna/onShuttleMove() +/mob/living/simple_animal/hostile/megafauna/onShuttleMove(turf/oldT, turf/T1, rotation, mob/caller) var/turf/oldloc = loc . = ..() if(!.) @@ -100,7 +100,7 @@ message_admins("Megafauna [src] \ ([ADMIN_FLW(src,"FLW")]) \ moved via shuttle from ([oldloc.x], [oldloc.y], [oldloc.z]) to \ - ([newloc.x], [newloc.y], [newloc.z])") + ([newloc.x], [newloc.y], [newloc.z])[caller ? " called by [ADMIN_LOOKUP(caller)]" : ""]") /mob/living/simple_animal/hostile/megafauna/proc/devour(mob/living/L) if(!L) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm index 288d45c9b1a..d052dd9bc23 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm @@ -89,7 +89,7 @@ throw_message = "does nothing to the tough hide of the" pre_attack_icon = "goliath2" crusher_loot = /obj/item/crusher_trophy/goliath_tentacle - butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/goliath= 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2) loot = list() stat_attack = UNCONSCIOUS robust_searching = TRUE @@ -113,7 +113,7 @@ pre_attack_icon = "Goliath_preattack" throw_message = "does nothing to the rocky hide of the" loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) //A throwback to the asteroid days - butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/bone = 2) + butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/goliath= 2, /obj/item/stack/sheet/bone = 2) crusher_drop_mod = 30 wander = FALSE var/list/cached_tentacle_turfs diff --git a/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm index 2f896f4adb0..fb2c741cb30 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/gutlunch.dm @@ -50,10 +50,9 @@ return ..() /mob/living/simple_animal/hostile/asteroid/gutlunch/regenerate_icons() - cut_overlays() + ..() if(udder.reagents.total_volume == udder.reagents.maximum_volume) add_overlay("gl_full") - ..() /mob/living/simple_animal/hostile/asteroid/gutlunch/attackby(obj/item/O, mob/user, params) if(stat == CONSCIOUS && istype(O, /obj/item/reagent_containers/glass)) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index b32cae64675..95ce5491395 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -184,7 +184,7 @@ if(L == user) continue var/turf/T = get_turf(L.loc) - if(T && T in targets) + if(T && (T in targets)) L.EyeBlind(4) return diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 49c63b59ab5..251a67a6c4b 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -374,11 +374,11 @@ return return - if(parrot_interest && parrot_interest in view(src)) + if(parrot_interest && (parrot_interest in view(src))) parrot_state = PARROT_SWOOP | PARROT_STEAL return - if(parrot_perch && parrot_perch in view(src)) + if(parrot_perch && (parrot_perch in view(src))) parrot_state = PARROT_SWOOP | PARROT_RETURN return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index b740c783ac7..2479f3c0674 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -594,7 +594,7 @@ toggle_ai(initial(AIStatus)) /mob/living/simple_animal/proc/add_collar(obj/item/clothing/accessory/petcollar/P, mob/user) - if(QDELETED(P) || pcollar) + if(!istype(P) || QDELETED(P) || pcollar) return if(user && !user.unEquip(P)) return @@ -609,7 +609,7 @@ real_name = P.tagname /mob/living/simple_animal/regenerate_icons() + cut_overlays() if(pcollar && collar_type) - cut_overlays() add_overlay("[collar_type]collar") add_overlay("[collar_type]tag") diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 339240af529..91e6c502869 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -121,7 +121,7 @@ set_colour(pick(slime_colours)) /mob/living/simple_animal/slime/regenerate_icons() - cut_overlays() + ..() var/icon_text = "[colour] [is_adult ? "adult" : "baby"] slime" icon_dead = "[icon_text] dead" if(stat != DEAD) @@ -130,7 +130,6 @@ add_overlay("aslime-[mood]") else icon_state = icon_dead - ..() /mob/living/simple_animal/slime/movement_delay() if(bodytemperature >= 330.23) // 135 F or 57.08 C @@ -262,7 +261,7 @@ Feedon(Food) return ..() -/mob/living/simple_animal/slime/unEquip(obj/item/I) +/mob/living/simple_animal/slime/unEquip(obj/item/I, force) return /mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index d5f130324bb..e5ebfb2ff61 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -60,7 +60,6 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib /mob/living/simple_animal/tribble/proc/procreate() - ..() if(GLOB.totaltribbles <= maxtribbles) for(var/mob/living/simple_animal/tribble/F in src.loc) if(!F || F == src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d93b2723024..d08ef11db0f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1413,4 +1413,4 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ ///Force set the mob nutrition /mob/proc/set_nutrition(change) - nutrition = max(0, change) \ No newline at end of file + nutrition = max(0, change) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 2f074aeaa9f..ef972ec97b3 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -211,4 +211,4 @@ var/list/tkgrabbed_objects = list() // Assoc list of items to TK grabs var/forced_look = null // This can either be a numerical direction or a soft object reference (UID). It makes the mob always face towards the selected thing. - var/registered_z \ No newline at end of file + var/registered_z diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 8fb7568cefd..69996ce1729 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -187,18 +187,24 @@ direct = newdir n = get_step(mob, direct) + delay = TICKS2DS(-round(-(DS2TICKS(delay)))) //Rounded to the next tick in equivalent ds + mob.glide_size = world.icon_size/max(DS2TICKS(delay),1) //Down to whatever decimal + . = ..() mob.setDir(direct) + if((direct & (direct - 1)) && mob.loc == n) //moved diagonally successfully + delay = mob.movement_delay() * 2 //Will prevent mob diagonal moves from smoothing accurately, sadly + + move_delay += delay + for(var/obj/item/grab/G in mob) if(G.state == GRAB_NECK) mob.setDir(angle2dir((dir2angle(direct) + 202.5) % 365)) G.adjust_position() for(var/obj/item/grab/G in mob.grabbed_by) G.adjust_position() - if((direct & (direct - 1)) && mob.loc == n) //moved diagonally successfully - delay = mob.movement_delay() * 2 - move_delay += delay + moving = 0 if(mob && .) if(mob.throwing) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 89e6ce953f5..69e27595a07 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -384,7 +384,7 @@ if(GLOB.summon_magic_triggered) give_magic(character) - if(!thisjob.is_position_available() && thisjob in SSjobs.prioritized_jobs) + if(!thisjob.is_position_available() && (thisjob in SSjobs.prioritized_jobs)) SSjobs.prioritized_jobs -= thisjob qdel(src) diff --git a/code/modules/mob/new_player/poll.dm b/code/modules/mob/new_player/poll.dm index 8a9b71426b8..f67c53c9941 100644 --- a/code/modules/mob/new_player/poll.dm +++ b/code/modules/mob/new_player/poll.dm @@ -42,8 +42,8 @@ // Show expired polls. Non admins can view admin polls at this stage // (just like tgstation's web interface so don't complain) - // (Also why was there no ingame interface tg not having an ingame - // interface is retarded because it cucks downstreams) + // (Also why was there no ingame interface? tg not having an ingame + // interface is a pain in the neck because it means downstreams have to roll their own) select_query = GLOB.dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE Now() > endtime ORDER BY id DESC") select_query.Execute() diff --git a/code/modules/mob/new_player/sprite_accessories/human/human_hair.dm b/code/modules/mob/new_player/sprite_accessories/human/human_hair.dm index f9e1ee1cc49..0dd6910e591 100644 --- a/code/modules/mob/new_player/sprite_accessories/human/human_hair.dm +++ b/code/modules/mob/new_player/sprite_accessories/human/human_hair.dm @@ -200,7 +200,7 @@ name = "Emo" icon_state = "emo" -/datum/sprite_accessory/hair/fag +/datum/sprite_accessory/hair/flow name = "Flow Hair" icon_state = "flow" diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm index 7b025087a8b..223627bd69e 100644 --- a/code/modules/modular_computers/computers/item/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop.dm @@ -89,11 +89,13 @@ /obj/item/modular_computer/laptop/proc/toggle_open(mob/living/user=null) if(screen_on) - to_chat(user, "You close \the [src].") + if(user) + to_chat(user, "You close \the [src].") slowdown = initial(slowdown) w_class = initial(w_class) else - to_chat(user, "You open \the [src].") + if(user) + to_chat(user, "You open \the [src].") slowdown = slowdown_open w_class = w_class_open diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index 76d14bb3e00..2c74a1ce844 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -12,7 +12,7 @@ if(monitored_alarm_ids) for(var/obj/machinery/alarm/alarm in GLOB.machines) - if(alarm.alarm_id && alarm.alarm_id in monitored_alarm_ids) + if(alarm.alarm_id && (alarm.alarm_id in monitored_alarm_ids)) monitored_alarms += alarm // machines may not yet be ordered at this point monitored_alarms = dd_sortedObjectList(monitored_alarms) diff --git a/code/modules/nano/nanoexternal.dm b/code/modules/nano/nanoexternal.dm index 602a46dbfa3..f57014496fd 100644 --- a/code/modules/nano/nanoexternal.dm +++ b/code/modules/nano/nanoexternal.dm @@ -37,7 +37,7 @@ * * @return nothing */ -/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/state = GLOB.default_state) +/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nanoui/master_ui = null, var/datum/topic_state/state = GLOB.default_state) return /** diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 626a3d99e59..eb350f5e29a 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -135,7 +135,6 @@ P.name = "paper - '[G.fields["name"]]'" virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. - ..() /obj/structure/filingcabinet/security/attack_hand() populate() @@ -169,7 +168,6 @@ P.name = "paper - '[G.fields["name"]]'" virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. - ..() /obj/structure/filingcabinet/medical/attack_hand() populate() diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 30e8cbd9541..8d0525c5eb1 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -265,7 +265,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor var/atom/A = sorted[i] if(A) var/icon/img = getFlatIcon(A)//build_composite_icon(A) - if(istype(A, /obj/item/areaeditor/blueprints)) + if(istype(A, /obj/item/areaeditor/blueprints/ce)) blueprints = 1 // If what we got back is actually a picture, draw it. diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index ca2f1e13ff7..89988ec9f55 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1,8 +1,3 @@ -#define APC_WIRE_IDSCAN 1 -#define APC_WIRE_MAIN_POWER1 2 -#define APC_WIRE_MAIN_POWER2 3 -#define APC_WIRE_AI_CONTROL 4 - //update_state #define UPSTATE_CELL_IN 1 #define UPSTATE_OPENED1 2 @@ -430,11 +425,11 @@ if(stat & (NOPOWER | BROKEN)) return if(!second_pass) //The first time, we just cut overlays - addtimer(CALLBACK(src, .get_spooked, TRUE), 1) + addtimer(CALLBACK(src, /obj/machinery/power/apc/proc.get_spooked, TRUE), 1) cut_overlays() else flick("apcemag", src) //Second time we cause the APC to update its icon, then add a timer to update icon later - addtimer(CALLBACK(src, .proc/update_icon, TRUE), 10) + addtimer(CALLBACK(src, /obj/machinery/power/apc/proc.update_icon, TRUE), 10) //attack with an item - open/close cover, insert cell, or (un)lock interface /obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7260c836d78..0dc2fe0a129 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -79,8 +79,10 @@ By design, d1 is the smallest direction and d2 is the highest return ..() // then go ahead and delete the cable /obj/structure/cable/deconstruct(disassembled = TRUE) + var/turf/T = get_turf(src) + if(usr) + investigate_log("was deconstructed by [key_name(usr, 1)] in [get_area(usr)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires") if(!(flags & NODECONSTRUCT)) - var/turf/T = get_turf(src) if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long new/obj/item/stack/cable_coil(T, 2, paramcolor = color) else diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index e409ccc7602..93eb3fa18c6 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -5,20 +5,19 @@ icon_state = "particle" anchored = TRUE density = FALSE - var/movement_range = 10 + var/movement_range = 11 var/energy = 10 - var/speed = 1 /obj/effect/accelerated_particle/weak - movement_range = 8 + movement_range = 9 energy = 5 /obj/effect/accelerated_particle/strong - movement_range = 15 + movement_range = 16 energy = 15 /obj/effect/accelerated_particle/powerful - movement_range = 20 + movement_range = 21 energy = 50 diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 945cc286b31..d99df1de7bb 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -285,13 +285,15 @@ autostart = 1 // Automatically start /obj/machinery/power/solar_control/Initialize() - ..() - if(!powernet) - return + SSsun.solars |= src + setup() + . = ..() + +/obj/machinery/power/solar_control/proc/setup() connect_to_network() set_panels(cdir) if(autostart) - src.search_for_connected() + search_for_connected() if(connected_tracker && track == 2) connected_tracker.set_angle(SSsun.angle) set_panels(cdir) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index d17da9a6d99..d071ad236d1 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -32,8 +32,8 @@ /obj/item/gun/energy/get_cell() return cell -/obj/item/gun/energy/New() - ..() +/obj/item/gun/energy/Initialize(mapload, ...) + . = ..() if(cell_type) cell = new cell_type(src) else diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 09b2400c165..2df2d877c53 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -36,9 +36,9 @@ can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update actions_types = list(/datum/action/item_action/toggle_gunlight) -/obj/item/gun/energy/gun/mini/New() +/obj/item/gun/energy/gun/mini/Initialize(mapload, ...) gun_light = new /obj/item/flashlight/seclite(src) - ..() + . = ..() cell.maxcharge = 600 cell.charge = 600 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7705f3eb66c..e64aced32f9 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -341,8 +341,8 @@ var/emagged = 0 //ups the temperature cap from 500 to 1000, targets hit by beams over 500 Kelvin will burst into flames var/dat = "" -/obj/item/gun/energy/temperature/New() - ..() +/obj/item/gun/energy/temperature/Initialize(mapload, ...) + . = ..() update_icon() START_PROCESSING(SSobj, src) diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index c2dc67f5773..44273f1e653 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -40,7 +40,7 @@ chambered.newshot(params) return -/obj/item/gun/magic/process_fire() +/obj/item/gun/magic/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0) newshot() return ..() diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index 501a7b63670..056c454663c 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -106,7 +106,7 @@ target.adjustBruteLoss(-4) target.adjustFireLoss(-4) if(ishuman(target)) - var/var/mob/living/carbon/human/H = target + var/mob/living/carbon/human/H = target for(var/obj/item/organ/external/E in H.bodyparts) if(prob(10)) E.mend_fracture() diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index 09d9ec15aed..761c15a6141 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -43,7 +43,8 @@ /obj/item/gun/projectile/automatic/sniper_rifle/compact //holds very little ammo, lacks zooming, and bullets are primarily damage dealers, but the gun lacks the downsides of the full size rifle name = "compact sniper rifle" - desc = "a compact, unscoped version of the standard issue syndicate sniper rifle. Still capable of sending people crying." + desc = "A compact, unscoped version of the standard issue syndicate sniper rifle. Still capable of sending people crying." + icon_state = "snipercompact" recoil = 0 weapon_weight = WEAPON_LIGHT fire_delay = 0 @@ -52,6 +53,12 @@ can_suppress = FALSE zoomable = FALSE +/obj/item/gun/projectile/automatic/sniper_rifle/compact/update_icon() + if(magazine) + icon_state = "snipercompact-mag" + else + icon_state = "snipercompact" + //Normal Boolets /obj/item/ammo_box/magazine/sniper_rounds name = "sniper rounds (.50)" diff --git a/code/modules/projectiles/guns/rocket.dm b/code/modules/projectiles/guns/rocket.dm index 53de1a16854..96a97c8fe1a 100644 --- a/code/modules/projectiles/guns/rocket.dm +++ b/code/modules/projectiles/guns/rocket.dm @@ -36,7 +36,7 @@ to_chat(user, "You put the rocket in [src].") to_chat(user, "[rockets.len] / [max_rockets] rockets.") else - to_chat(usr, "[src] cannot hold more rockets.") + to_chat(user, "[src] cannot hold more rockets.") else return ..() @@ -55,4 +55,4 @@ rockets -= I qdel(I) else - to_chat(usr, "[src] is empty.") + to_chat(user, "[src] is empty.") diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 9774021210c..ddd78b2018f 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -299,10 +299,7 @@ if(R.addiction_stage < 5) if(prob(5)) R.addiction_stage++ - if(M.reagents.has_reagent(R.id)) - R.last_addiction_dose = world.timeofday - R.addiction_stage = 1 - else + if(world.timeofday > R.last_addiction_dose) //time check so addiction act doesn't play over and over. Allows incremental dosages to work. switch(R.addiction_stage) if(1) update_flags |= R.addiction_act_stage1(M) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 2de854eff88..91d5900610d 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -275,14 +275,17 @@ if(!panel_open) return if(default_deconstruction_crowbar(user, I)) - if(beaker) - beaker.forceMove(loc) - beaker = null - if(cell) - cell.forceMove(loc) - cell = null return TRUE +/obj/machinery/chem_dispenser/deconstruct(disassembled) + if(beaker) + beaker.forceMove(loc) + beaker = null + if(cell) + cell.forceMove(loc) + cell = null + return ..() + /obj/machinery/chem_dispenser/multitool_act(mob/user, obj/item/I) . = TRUE diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 26dfa2d815f..4271b26ba17 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -54,15 +54,9 @@ if(method == REAGENT_INGEST) //Yes, even Xenos can get addicted to drugs. var/can_become_addicted = M.reagents.reaction_check(M, src) - if(can_become_addicted) if(is_type_in_list(src, M.reagents.addiction_list)) - to_chat(M, "You feel slightly better, but for how long?") - for(var/A in M.reagents.addiction_list) - var/datum/reagent/AD = A - if(AD && istype(AD, src)) - AD.last_addiction_dose = world.timeofday - AD.addiction_stage = 1 + to_chat(M, "You feel slightly better, but for how long?") //sate_addiction handles this now, but kept this for the feed back. return TRUE /datum/reagent/proc/reaction_obj(obj/O, volume) @@ -76,6 +70,7 @@ var/total_depletion_rate = metabolization_rate * M.metabolism_efficiency * M.digestion_ratio // Cache it handle_addiction(M, total_depletion_rate) + sate_addiction(M) holder.remove_reagent(id, total_depletion_rate) //By default it slowly disappears. return STATUS_UPDATE_NONE @@ -91,6 +86,14 @@ new_reagent.last_addiction_dose = world.timeofday M.reagents.addiction_list.Add(new_reagent) +/datum/reagent/proc/sate_addiction(mob/living/M) //reagents sate their own withdrawals + if(is_type_in_list(src, M.reagents.addiction_list)) + for(var/A in M.reagents.addiction_list) + var/datum/reagent/AD = A + if(AD && istype(AD, src)) + AD.last_addiction_dose = world.timeofday + AD.addiction_stage = 1 + /datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect return diff --git a/code/modules/reagents/chemistry/reagents/drinks.dm b/code/modules/reagents/chemistry/reagents/drinks.dm index ae58c806126..4bd061c14b4 100644 --- a/code/modules/reagents/chemistry/reagents/drinks.dm +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -178,7 +178,7 @@ /datum/reagent/consumable/drink/banana/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - if((ishuman(M) && COMIC in M.mutations) || issmall(M)) + if((ishuman(M) && (COMIC in M.mutations)) || issmall(M)) update_flags |= M.adjustBruteLoss(-1, FALSE) update_flags |= M.adjustFireLoss(-1, FALSE) return ..() | update_flags @@ -409,7 +409,7 @@ /datum/reagent/consumable/drink/bananahonk/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - if((ishuman(M) && COMIC in M.mutations) || issmall(M)) + if((ishuman(M) && (COMIC in M.mutations)) || issmall(M)) update_flags |= M.adjustBruteLoss(-1, FALSE) update_flags |= M.adjustFireLoss(-1, FALSE) return ..() | update_flags @@ -426,7 +426,7 @@ /datum/reagent/consumable/drink/silencer/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - if(ishuman(M) && M.job in list("Mime")) + if(ishuman(M) && (M.job in list("Mime"))) update_flags |= M.adjustBruteLoss(-1, FALSE) update_flags |= M.adjustFireLoss(-1, FALSE) return ..() | update_flags diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm index 6d1c4d74e72..565a0d483a8 100644 --- a/code/modules/reagents/chemistry/reagents/food.dm +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -376,7 +376,7 @@ /datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate")) + if(ishuman(M) && (M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate"))) update_flags |= M.adjustBruteLoss(-1, FALSE) update_flags |= M.adjustFireLoss(-1, FALSE) return ..() | update_flags diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index f80fe2cb62a..27abeca6d46 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -69,7 +69,7 @@ var/datum/reagents/R = reagent_list[reagent_list.len] R.add_reagent(reagent, 30) -/obj/item/reagent_containers/borghypo/attack(mob/living/M, mob/user) +/obj/item/reagent_containers/borghypo/attack(mob/living/carbon/human/M, mob/user) var/datum/reagents/R = reagent_list[mode] if(!R.total_volume) to_chat(user, "The injector is empty.") diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index 513344cc5a6..6155c1de6b9 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -98,7 +98,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE) ert_role_prefs.Add(input_ranked_async(M, "Please order ERT roles from most to least preferred (20 seconds):", GLOB.active_team.get_slot_list())) addtimer(CALLBACK(GLOBAL_PROC, .proc/dispatch_response_team, response_team_members, ert_gender_prefs, ert_role_prefs), 200) -/proc/dispatch_response_team(list/response_team_members, list/ert_gender_prefs, list/ert_role_prefs) +/proc/dispatch_response_team(list/response_team_members, list/datum/async_input/ert_gender_prefs, list/datum/async_input/ert_role_prefs) var/spawn_index = 1 for(var/i = 1, i <= response_team_members.len, i++) @@ -227,6 +227,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE) return cyborg_unlock /datum/response_team/proc/get_slot_list() + RETURN_TYPE(/list) var/list/slots_available = list() for(var/role in slots) if(slots[role]) diff --git a/code/modules/ruins/lavalandruin_code/syndicate_base.dm b/code/modules/ruins/lavalandruin_code/syndicate_base.dm index 33e4fb527ae..532e50831e5 100644 --- a/code/modules/ruins/lavalandruin_code/syndicate_base.dm +++ b/code/modules/ruins/lavalandruin_code/syndicate_base.dm @@ -32,6 +32,7 @@
You are free to attack anyone not aligned with the Syndicate in the vicinity of your base. DO NOT work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. DO NOT leave your base without admin permission." outfit = /datum/outfit/lavaland_syndicate assignedrole = "Lavaland Syndicate" + del_types = list() // Necessary to prevent del_types from removing radio! allow_species_pick = TRUE /obj/effect/mob_spawn/human/lavaland_syndicate/Destroy() @@ -46,7 +47,7 @@ suit = /obj/item/clothing/suit/storage/labcoat shoes = /obj/item/clothing/shoes/combat gloves = /obj/item/clothing/gloves/combat - r_ear = /obj/item/radio/headset/syndicate/alt + r_ear = /obj/item/radio/headset/syndicate/alt/lavaland // See del_types above back = /obj/item/storage/backpack r_pocket = /obj/item/gun/projectile/automatic/pistol id = /obj/item/card/id/syndicate/anyone @@ -74,9 +75,13 @@ /datum/outfit/lavaland_syndicate/comms name = "Lavaland Syndicate Comms Agent" + r_ear = /obj/item/radio/headset/syndicate/alt // See del_types above r_hand = /obj/item/melee/energy/sword/saber mask = /obj/item/clothing/mask/chameleon/gps suit = /obj/item/clothing/suit/armor/vest + backpack_contents = list( + /obj/item/paper/monitorkey = 1 // message console on lavaland does NOT spawn with this + ) /obj/item/clothing/mask/chameleon/gps/New() . = ..() diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index dbec1c611f7..f0394349f4d 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -1,5 +1,5 @@ // Shuttle on-movement // -/atom/movable/proc/onShuttleMove(turf/oldT, turf/T1, rotation) +/atom/movable/proc/onShuttleMove(turf/oldT, turf/T1, rotation, mob/caller) var/turf/newT = get_turf(src) if(newT.z != oldT.z) onTransitZ(oldT.z, newT.z) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 6441d0f9cb5..0f872b599a1 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -218,6 +218,8 @@ var/travelDir = 0 //direction the shuttle would travel in var/rebuildable = 0 //can build new shuttle consoles for this one + var/mob/last_caller // Who called the shuttle the last time + var/obj/docking_port/stationary/destination var/obj/docking_port/stationary/previous @@ -496,7 +498,7 @@ areaInstance.moving = TRUE //move mobile to new location for(var/atom/movable/AM in T0) - AM.onShuttleMove(T0, T1, rotation) + AM.onShuttleMove(T0, T1, rotation, last_caller) if(rotation) T1.shuttleRotate(rotation) @@ -809,9 +811,10 @@ // Seriously, though, NEVER trust a Topic with something like this. Ever. message_admins("move HREF ([src] attempted to move to: [href_list["move"]]) exploit attempted by [key_name_admin(usr)] on [src] (JMP)") return - switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)) + switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1, usr)) if(0) atom_say("Shuttle departing! Please stand away from the doors.") + usr.create_log(MISC_LOG, "used [src] to call the [shuttleId] shuttle") if(1) to_chat(usr, "Invalid shuttle requested.") else diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 7b154ef2a25..de24c351c4a 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -24,7 +24,7 @@ layer = 3.9 infra_luminosity = 15 - var/list/mob/pilot //There is only ever one pilot and he gets all the privledge + var/mob/pilot //There is only ever one pilot and he gets all the privledge var/list/mob/passengers = list() //passengers can't do anything and are variable in number var/max_passengers = 0 var/obj/item/storage/internal/cargo_hold @@ -698,7 +698,7 @@ return 1 /obj/spacepod/MouseDrop_T(atom/A, mob/user) - if(user == pilot || user in passengers) + if(user == pilot || (user in passengers)) return if(istype(A,/mob)) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index fab2d0fd8a4..510d3b32171 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -111,9 +111,9 @@ /obj/item/organ/internal/cyberimp/brain/anti_drop/proc/release_items() active = FALSE - if(!l_hand_ignore && l_hand_obj in owner.contents) + if(!l_hand_ignore && (l_hand_obj in owner.contents)) l_hand_obj.flags ^= NODROP - if(!r_hand_ignore && r_hand_obj in owner.contents) + if(!r_hand_ignore && (r_hand_obj in owner.contents)) r_hand_obj.flags ^= NODROP /obj/item/organ/internal/cyberimp/brain/anti_drop/remove(var/mob/living/carbon/M, special = 0) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 7491bfbad19..eca4bb8a831 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -67,7 +67,7 @@ owner.SetEyeBlurry(0) owner.SetEyeBlind(0) -/obj/item/organ/internal/eyes/robotize() +/obj/item/organ/internal/eyes/robotize(make_tough) colourmatrix = null ..() //Make sure the organ's got the robotic status indicators before updating the client colour. if(owner) diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index baf974ad944..a06cbf9456b 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -248,7 +248,7 @@ return damage = max(damage - amount, 0) -/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc +/obj/item/organ/proc/robotize(make_tough) //Being used to make robutt hearts, etc status &= ~ORGAN_BROKEN status &= ~ORGAN_SPLINTED status |= ORGAN_ROBOT diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 607944e4b6a..1813a73cee1 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -404,7 +404,7 @@ Note that amputating the affected organ does in fact remove the infection from t fracture() /obj/item/organ/external/proc/check_for_internal_bleeding(damage) - if(owner && NO_BLOOD in owner.dna.species.species_traits) + if(owner && (NO_BLOOD in owner.dna.species.species_traits)) return var/local_damage = brute_dam + damage if(damage > 15 && local_damage > 30 && prob(damage) && !is_robotic()) @@ -589,12 +589,12 @@ Note that amputating the affected organ does in fact remove the infection from t holder = owner if(!holder) return - if(holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT)) + if(holder.handcuffed && (body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))) holder.visible_message(\ "\The [holder.handcuffed.name] falls off of [holder.name].",\ "\The [holder.handcuffed.name] falls off you.") holder.unEquip(holder.handcuffed) - if(holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)) + if(holder.legcuffed && (body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))) holder.visible_message(\ "\The [holder.legcuffed.name] falls off of [holder.name].",\ "\The [holder.legcuffed.name] falls off you.") diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 7f5e520c88a..5cab4dfafd8 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -141,7 +141,7 @@ // Brain is defined in brain_item.dm. -/obj/item/organ/internal/robotize() +/obj/item/organ/internal/robotize(make_tough) if(!is_robotic()) var/list/states = icon_states('icons/obj/surgery.dmi') //Insensitive to specially-defined icon files for species like the Drask or whomever else. Everyone gets the same robotic heart. if(slot == "heart" && ("[slot]-c-on" in states) && ("[slot]-c-off" in states)) //Give the robotic heart its robotic heart icons if they exist. diff --git a/code/modules/surgery/organs/parasites.dm b/code/modules/surgery/organs/parasites.dm index 48cc4a408d5..b61a7c429bc 100644 --- a/code/modules/surgery/organs/parasites.dm +++ b/code/modules/surgery/organs/parasites.dm @@ -74,7 +74,8 @@ if(is_away_level(owner.z)) awaymission_infection = TRUE if(awaymission_infection) - if(!is_away_level(owner.z)) + var/turf/T = get_turf(owner) + if(istype(T) && !is_away_level(T.z)) owner.gib() qdel(src) return diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index c82a0e899f7..c9b26f61228 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -152,7 +152,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) message = lowertext(message) playsound(get_turf(owner), 'sound/magic/invoke_general.ogg', 300, 1, 5) - var/mob/living/list/listeners = list() + var/list/mob/living/listeners = list() for(var/mob/living/L in get_mobs_in_view(8, owner, TRUE)) if(L.can_hear() && !L.null_rod_check() && L != owner && L.stat != DEAD) if(ishuman(L)) diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index 0f9b205f391..d5df0bf9402 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -13,7 +13,7 @@ toolspeed = 1 usesound = 'sound/items/deconstruct.ogg' -/obj/item/stack/ore/bluespace_crystal/New() +/obj/item/stack/ore/bluespace_crystal/New(loc, new_amount, merge = TRUE) ..() pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) diff --git a/dreamchecker.exe b/dreamchecker.exe new file mode 100644 index 00000000000..068a9f58a0c Binary files /dev/null and b/dreamchecker.exe differ diff --git a/goon/browserassets/html/browserOutput.html b/goon/browserassets/html/browserOutput.html index a7dfb16abee..ed2c77a306c 100644 --- a/goon/browserassets/html/browserOutput.html +++ b/goon/browserassets/html/browserOutput.html @@ -15,7 +15,7 @@ - + diff --git a/goon/browserassets/json/unicode_9_annotations.json b/goon/browserassets/js/unicode_9_annotations.js similarity index 99% rename from goon/browserassets/json/unicode_9_annotations.json rename to goon/browserassets/js/unicode_9_annotations.js index 50b00d32116..483e08d47ff 100644 --- a/goon/browserassets/json/unicode_9_annotations.json +++ b/goon/browserassets/js/unicode_9_annotations.js @@ -1487,4 +1487,4 @@ var UNICODE_9_EMOJI = { "zimbabwe": "πŸ‡ΏπŸ‡Ό", "zipper_mouth_face": "🀐", "zzz": "πŸ’€" -}; \ No newline at end of file +}; diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm index f32b1d53610..8caccf84766 100644 --- a/goon/code/datums/browserOutput.dm +++ b/goon/code/datums/browserOutput.dm @@ -4,6 +4,7 @@ var/list/chatResources = list( "goon/browserassets/js/json2.min.js", "goon/browserassets/js/twemoji.min.js", "goon/browserassets/js/browserOutput.js", + "goon/browserassets/js/unicode_9_annotations.js", "goon/browserassets/css/fonts/fontawesome-webfont.eot", "goon/browserassets/css/fonts/fontawesome-webfont.svg", "goon/browserassets/css/fonts/fontawesome-webfont.ttf", @@ -12,7 +13,6 @@ var/list/chatResources = list( "goon/browserassets/css/font-awesome.css", "goon/browserassets/css/browserOutput.css", "goon/browserassets/css/browserOutput-dark.css", - "goon/browserassets/json/unicode_9_annotations.json", "goon/browserassets/html/saveInstructions.html" ) @@ -304,7 +304,7 @@ var/to_chat_src target << output(output_message, "browseroutput:output") -/proc/__to_chat(target, message, flag) +/proc/to_chat(target, message, flag) if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized) to_chat_immediate(target, message, flag) return diff --git a/icons/mob/inhands/fluff_lefthand.dmi b/icons/mob/inhands/fluff_lefthand.dmi index 0415f69679f..daed1b89256 100644 Binary files a/icons/mob/inhands/fluff_lefthand.dmi and b/icons/mob/inhands/fluff_lefthand.dmi differ diff --git a/icons/mob/inhands/fluff_righthand.dmi b/icons/mob/inhands/fluff_righthand.dmi index 1ccd153af00..83666d38747 100644 Binary files a/icons/mob/inhands/fluff_righthand.dmi and b/icons/mob/inhands/fluff_righthand.dmi differ diff --git a/icons/mob/species/vox/uniform.dmi b/icons/mob/species/vox/uniform.dmi index 3eb4fec6f6f..182fe4bfddb 100644 Binary files a/icons/mob/species/vox/uniform.dmi and b/icons/mob/species/vox/uniform.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index b632964978d..2b1c7edfa58 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index 614bac4094b..f1d09247bbd 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/install-byond.sh b/install-byond.sh deleted file mode 100644 index cca44342c60..00000000000 --- a/install-byond.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -e -if [ -d "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin" ]; -then - echo "Using cached directory." -else - echo "Setting up BYOND." - mkdir -p "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" - cd "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip - unzip byond.zip - cd byond - make here -fi diff --git a/libmariadb.so b/libmariadb.so new file mode 100644 index 00000000000..45c7741b556 Binary files /dev/null and b/libmariadb.so differ diff --git a/librust_g.so b/librust_g.so new file mode 100644 index 00000000000..d70052a39c9 Binary files /dev/null and b/librust_g.so differ diff --git a/nano/templates/card_prog.tmpl b/nano/templates/card_prog.tmpl index 8ce688e1997..7054f8bf4c2 100644 --- a/nano/templates/card_prog.tmpl +++ b/nano/templates/card_prog.tmpl @@ -62,7 +62,7 @@ Authorized Identity:
- {{:helper.link(data.scan_name, 'eject', {'action' : 'scan'})}} + {{:helper.link(data.scan_name, 'eject', {'action' : 'PRG_scan'})}}
diff --git a/nano/templates/law_manager.tmpl b/nano/templates/law_manager.tmpl index eaa2bba4329..1b66d194267 100644 --- a/nano/templates/law_manager.tmpl +++ b/nano/templates/law_manager.tmpl @@ -1,41 +1,41 @@