diff --git a/.travis.yml b/.travis.yml index 7f74746d15f..979e35f6aed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,7 @@ jobs: install: - pip install --user PyYaml -q - pip install --user beautifulsoup4 -q + - tools/travis/install_dreamchecker.sh before_script: skip script: - shopt -s globstar @@ -54,6 +55,7 @@ jobs: - (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 diff --git a/_build_dependencies.sh b/_build_dependencies.sh new file mode 100644 index 00000000000..f9bddd66134 --- /dev/null +++ b/_build_dependencies.sh @@ -0,0 +1,2 @@ +# This file has all the information on what versions of libraries are thrown into the code +export SPACEMANDMM_TAG=suite-1.2 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/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/admin.dm b/code/__DEFINES/admin.dm index bbf394c6c0b..95494fb88cf 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -40,10 +40,11 @@ #define R_MOD 8192 #define R_MENTOR 16384 #define R_PROCCALL 32768 +#define R_VIEWRUNTIMES 65536 -#define R_MAXPERMISSION 32768 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. +#define R_MAXPERMISSION 65536 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. -#define R_HOST 65535 +#define R_HOST 131071 // Sum of all permissions to allow easy setting #define ADMIN_QUE(user,display) "[display]" #define ADMIN_FLW(user,display) "[display]" 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/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..d70712c0010 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 ff127fd3a48..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) @@ -316,7 +316,7 @@ This is always put in the attack log. msg_admin_attack("[key_name_admin(user)] vs [key_name_admin(target)]: [what_done]", loglevel) -/proc/do_mob(var/mob/user, var/mob/target, var/time = 30, var/uninterruptible = 0, progress = 1, datum/callback/extra_checks = null) +/proc/do_mob(mob/user, mob/target, time = 30, uninterruptible = 0, progress = 1, list/extra_checks = list()) if(!user || !target) return 0 var/user_loc = user.loc @@ -349,7 +349,7 @@ This is always put in the attack log. drifting = 0 user_loc = user.loc - if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke())) + if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying || check_for_true_callbacks(extra_checks)) . = 0 break if(progress) @@ -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/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 661d09f0412..bf44f6a4bc9 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -167,7 +167,7 @@ return SOUTH if(225.6 to 315.5) return WEST - + //returns the north-zero clockwise angle in degrees, given a direction /proc/dir2angle(var/D) @@ -212,6 +212,7 @@ if(rights & R_PROCCALL) . += "[seperator]+PROCCALL" if(rights & R_MOD) . += "[seperator]+MODERATOR" if(rights & R_MENTOR) . += "[seperator]+MENTOR" + if(rights & R_VIEWRUNTIMES) . += "[seperator]+VIEWRUNTIMES" return . /proc/ui_style2icon(ui_style) 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 b8996f2cf89..f257f2b4895 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -179,7 +179,7 @@ var/title = name if(can_fire) - title = "\[[state_letter()]][title]" + title = "[state_colour()]\[[state_letter()]][title]" stat(title, statclick.update(msg)) @@ -196,6 +196,18 @@ if(SS_IDLE) . = " " +/datum/controller/subsystem/proc/state_colour() + switch(state) + if(SS_RUNNING) // If its actively processing, colour it green + . = "" + if(SS_QUEUED) // If its in the running queue, but delayed, colour it orange + . = "" + if(SS_PAUSED, SS_PAUSING) // If its being paused due to lag, colour it red + . = "" + if(SS_SLEEPING) // If fire() slept, colour it blue + . = "" + if(SS_IDLE) // Leave it default if the SS is idle + . = "" //could be used to postpone a costly subsystem for (default one) var/cycles, cycles //for instance, during cpu intensive operations like explosions /datum/controller/subsystem/proc/postpone(cycles = 1) 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/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/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 53c755e8822..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 @@ -1100,7 +1102,7 @@ l_hand = null backpack_contents = list( /obj/item/storage/box/engineer = 1, - /obj/item/clothing/suit/space/hardsuit/shielded/wizard = 1, + /obj/item/clothing/suit/space/hardsuit/shielded/wizard/arch = 1, /obj/item/clothing/shoes/magboots = 1, /obj/item/kitchen/knife/ritual = 1, /obj/item/clothing/suit/wizrobe/red = 1, 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 30347d1e796..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]") + 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 9db46b517db..94ad0960e17 100644 --- a/code/datums/spells/lichdom.dm +++ b/code/datums/spells/lichdom.dm @@ -95,7 +95,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/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/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/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/runes.dm b/code/game/gamemodes/cult/runes.dm index 290d873bcf3..70b18377559 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -720,7 +720,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() 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/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/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/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/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 0dffc0e6159..863ce6405cc 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -448,7 +448,7 @@ //Weapons and Armors /datum/spellbook_entry/item/battlemage name = "Battlemage Armour" - desc = "An ensorceled suit of armour, protected by a powerful shield. The shield can completely negate sixteen attacks before being permanently depleted." + desc = "An ensorceled suit of armour, protected by a powerful shield. The shield can completely negate sixteen attacks before being permanently depleted. Despite appearance it is NOT spaceproof." item_path = /obj/item/clothing/suit/space/hardsuit/shielded/wizard limit = 1 category = "Weapons and Armors" 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/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/cloning.dm b/code/game/machinery/computer/cloning.dm index 14a8e2b6ddc..3091caa82a2 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -359,12 +359,12 @@ if(scan_brain && !can_brainscan()) return if(isnull(subject) || (!(ishuman(subject))) || (!subject.dna)) - if(isalien(subject)) + if(isalien(subject)) scantemp = "Error: Xenomorphs are not scannable." SSnanoui.update_uis(src) return // can add more conditions for specific non-human messages here - else + else scantemp = "Error: Subject species is not scannable." SSnanoui.update_uis(src) return @@ -372,7 +372,7 @@ var/obj/item/organ/internal/brain/Brn = subject.get_int_organ(/obj/item/organ/internal/brain) if(istype(Brn)) if(NO_SCAN in Brn.dna.species.species_traits) - scantemp = "Error: [subject.dna.species.name_plural] are not scannable." + scantemp = "Error: [Brn.dna.species.name_plural] are not scannable." SSnanoui.update_uis(src) return if(!subject.get_int_organ(/obj/item/organ/internal/brain)) 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/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 692024899a2..191d5e81079 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -276,7 +276,7 @@ About the new airlock wires panel: if(usr) shockedby += text("\[[time_stamp()]\] - [usr](ckey:[usr.ckey])") usr.create_attack_log("Electrified the [name] at [x] [y] [z]") - add_attack_logs(usr, src, "Electrified") + add_attack_logs(usr, src, "Electrified", ATKLOG_ALL) else shockedby += text("\[[time_stamp()]\] - EMP)") message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." @@ -764,7 +764,7 @@ About the new airlock wires panel: else if(activate) //electrify door for 30 seconds shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") usr.create_attack_log("Electrified the [name] at [x] [y] [z]") - add_attack_logs(usr, src, "Electrified") + add_attack_logs(usr, src, "Electrified", ATKLOG_ALL) to_chat(usr, "The door is now electrified for thirty seconds.") electrify(30) if("electrify_permanently") @@ -776,7 +776,7 @@ About the new airlock wires panel: else if(activate) shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") usr.create_attack_log("Electrified the [name] at [x] [y] [z]") - add_attack_logs(usr, src, "Electrified") + add_attack_logs(usr, src, "Electrified", ATKLOG_ALL) to_chat(usr, "The door is now electrified.") electrify(-1) if("open") @@ -1003,7 +1003,7 @@ About the new airlock wires panel: "You begin [welded ? "unwelding":"welding"] the airlock...", \ "You hear welding.") - if(I.use_tool(src, user, 40, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/weld_checks, I, user)))) + if(I.use_tool(src, user, 40, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/weld_checks, I, user))) if(!density && !welded) return welded = !welded @@ -1014,7 +1014,7 @@ About the new airlock wires panel: user.visible_message("[user] is welding the airlock.", \ "You begin repairing the airlock...", \ "You hear welding.") - if(I.use_tool(src, user, 40, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/weld_checks, I, user)))) + if(I.use_tool(src, user, 40, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/weld_checks, I, user))) obj_integrity = max_integrity stat &= ~BROKEN user.visible_message("[user.name] has repaired [src].", \ 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..502bd331cac 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 @@ -363,11 +363,13 @@ if(P) if(P.buffer && P.buffer != src) - if(!(src in P.buffer:links)) - P.buffer:links.Add(src) + if(istype(P, /obj/machinery/telecomms)) + var/obj/machinery/telecomms/TCM = P.buffer + if(!(src in TCM.links)) + TCM.links.Add(src) - if(!(P.buffer in src.links)) - src.links.Add(P.buffer) + if(!(P.buffer in src.links)) + src.links.Add(P.buffer) temp = "-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-" 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 ddc2a44b278..e693d6ed73b 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].", red=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/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 095b1ea9456..cfaea9f32f9 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -138,7 +138,7 @@ log_admin("[key_name(user)] EMPd a camera with a laser pointer") user.create_attack_log("[key_name(user)] EMPd a camera with a laser pointer") - add_attack_logs(user, C, "EMPd with [src]") + add_attack_logs(user, C, "EMPd with [src]", ATKLOG_ALL) else outmsg = "You missed the lens of [C] with [src]." 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/tools/tool_behaviour.dm b/code/game/objects/items/tools/tool_behaviour.dm index 80b00dcd1ed..986e3a981b2 100644 --- a/code/game/objects/items/tools/tool_behaviour.dm +++ b/code/game/objects/items/tools/tool_behaviour.dm @@ -57,4 +57,4 @@ // Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually. /obj/item/proc/tool_check_callback(mob/living/user, atom/target, amount, datum/callback/extra_checks) - return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke()) + return tool_use_check(user, amount) && (extra_checks && !extra_checks.Invoke()) 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/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/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/objects/structures/window.dm b/code/game/objects/structures/window.dm index 8fe46ca052d..9faab45cf97 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -254,7 +254,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", if(!can_be_reached(user)) return to_chat(user, "You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...") - if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))) + if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) return state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME) to_chat(user, "You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.") @@ -268,20 +268,20 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", if(reinf) if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME) to_chat(user, "You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...") - if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))) + if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) return state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME) to_chat(user, "You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.") else if(state == WINDOW_OUT_OF_FRAME) to_chat(user, "You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...") - if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))) + if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) return anchored = !anchored update_nearby_icons() to_chat(user, "You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.") else //if we're not reinforced, we don't need to check or update state to_chat(user, "You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...") - if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/check_anchored, anchored)))) + if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_anchored, anchored))) return anchored = !anchored air_update_turf(TRUE) @@ -297,7 +297,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", if(!can_be_reached(user)) return TOOL_ATTEMPT_DISMANTLE_MESSAGE - if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = list(CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))) + if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) return var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount) G.add_fingerprint(user) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 6c10921e6bd..19717991593 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -35,7 +35,12 @@ assume_air(lowertemp) qdel(hotspot) -/turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER, infinite = FALSE) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost +/* + * Makes a turf slippery using the given parameters + * @param wet_setting The type of slipperyness used + * @param time Time the turf is slippery. If null it will pick a random time between 790 and 820 ticks. If INFINITY then it won't dry up ever +*/ +/turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER, time = null) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost if(wet >= wet_setting) return wet = wet_setting @@ -55,13 +60,13 @@ else wet_overlay = image('icons/effects/water.dmi', src, "wet_static") overlays += wet_overlay - if(!infinite) - spawn(rand(790, 820)) // Purely so for visual effect - if(!istype(src, /turf/simulated)) //Because turfs don't get deleted, they change, adapt, transform, evolve and deform. they are one and they are all. - return - MakeDry(wet_setting) + if(time == INFINITY) + return + if(!time) + time = rand(790, 820) + addtimer(CALLBACK(src, .proc/MakeDry, wet_setting), time) -/turf/simulated/proc/MakeDry(wet_setting = TURF_WET_WATER) +/turf/simulated/MakeDry(wet_setting = TURF_WET_WATER) if(wet > wet_setting) return wet = TURF_DRY diff --git a/code/game/turfs/simulated/floor/mineral.dm b/code/game/turfs/simulated/floor/mineral.dm index 5eb387abbae..ffb1cce0b5c 100644 --- a/code/game/turfs/simulated/floor/mineral.dm +++ b/code/game/turfs/simulated/floor/mineral.dm @@ -186,7 +186,7 @@ /turf/simulated/floor/mineral/bananium/lubed/Initialize(mapload) . = ..() - MakeSlippery(TURF_WET_LUBE, TRUE) + MakeSlippery(TURF_WET_LUBE, INFINITY) /turf/simulated/floor/mineral/bananium/lubed/pry_tile(obj/item/C, mob/user, silent = FALSE) //I want to get off Mr Honk's Wild Ride if(ishuman(user)) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 33ae636090d..0ca6494497c 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -118,7 +118,7 @@ /turf/simulated/floor/lubed/Initialize(mapload) . = ..() - MakeSlippery(TURF_WET_LUBE, TRUE) + MakeSlippery(TURF_WET_LUBE, INFINITY) /turf/simulated/floor/lubed/pry_tile(obj/item/C, mob/user, silent = FALSE) //I want to get off Mr Honk's Wild Ride if(ishuman(user)) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 85b03d3378d..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 @@ -353,7 +353,7 @@ /turf/simulated/floor/plating/ice/Initialize(mapload) . = ..() - MakeSlippery(TURF_WET_PERMAFROST, TRUE) + MakeSlippery(TURF_WET_PERMAFROST, INFINITY) /turf/simulated/floor/plating/ice/try_replace_tile(obj/item/stack/tile/T, mob/user, params) return 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_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 caa46b4e245..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) @@ -309,6 +315,10 @@ for(var/atom/movable/AM in contents) AM.get_spooked() +// Defined here to avoid runtimes +/turf/proc/MakeDry(wet_setting = TURF_WET_WATER) + return + /turf/proc/burn_down() return diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index f8a31f885ed..1986bd8f787 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -44,6 +44,7 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons if("mod") rights |= R_MOD if("mentor") rights |= R_MENTOR if("proccall") rights |= R_PROCCALL + if("viewruntimes") rights |= R_VIEWRUNTIMES GLOB.admin_ranks[rank] = rights previous_rights = rights diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 34929b52f53..a8e3f33aa2c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -230,7 +230,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( /client/proc/add_admin_verbs() if(holder) - verbs += GLOB.admin_verbs_default + // If they have ANYTHING OTHER THAN ONLY VIEW RUNTIMES (65536), then give them the default admin verbs + if(holder.rights != R_VIEWRUNTIMES) + verbs += GLOB.admin_verbs_default if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself if(holder.rights & R_ADMIN) @@ -264,6 +266,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( verbs += GLOB.admin_verbs_mentor if(holder.rights & R_PROCCALL) verbs += GLOB.admin_verbs_proccall + if(holder.rights & R_VIEWRUNTIMES) + verbs += /client/proc/view_runtimes /client/proc/remove_admin_verbs() verbs.Remove( 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 464d0babf56..d518b07f285 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2818,13 +2818,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/debug.dm b/code/modules/admin/verbs/debug.dm index 5ec8ecde253..32dcf3daa7b 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -832,7 +832,7 @@ GLOBAL_PROTECT(AdminProcCaller) set name = "View Runtimes" set desc = "Open the Runtime Viewer" - if(!check_rights(R_DEBUG)) + if(!check_rights(R_DEBUG|R_VIEWRUNTIMES)) return GLOB.error_cache.showTo(usr) 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 976554a0375..ba8171990dc 100644 --- a/code/modules/admin/verbs/logging_view.dm +++ b/code/modules/admin/verbs/logging_view.dm @@ -17,4 +17,4 @@ GLOBAL_LIST_INIT(open_logging_views, list()) if(mobs_to_add?.len) cur_view.add_mobs(mobs_to_add) - cur_view.show_ui(usr) + cur_view.show_ui(usr) \ No newline at end of file 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..1aa051698de 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 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 77d7b99fde0..8421feb96ff 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 plasmamen 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/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index d02c9b40105..6795716fc7f 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -156,7 +156,7 @@ /obj/item/clothing/suit/space/hardsuit/shielded/wizard name = "battlemage armour" - desc = "Not all wizards are afraid of getting up close and personal." + desc = "Not all wizards are afraid of getting up close and personal. Not spaceproof despite its appearance." icon_state = "hardsuit-wiz" item_state = "wiz_hardsuit" recharge_rate = 0 @@ -172,6 +172,15 @@ resistance_flags = FIRE_PROOF | ACID_PROOF magical = TRUE +/obj/item/clothing/suit/space/hardsuit/shielded/wizard/arch + desc = "For the arch wizard in need of additional protection." + recharge_rate = 1 + recharge_cooldown = 0 + max_charges = 15 + min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT + max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT + helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard/arch + /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard name = "battlemage helmet" desc = "A suitably impressive helmet." @@ -188,6 +197,11 @@ /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard/attack_self(mob/user) return +/obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard/arch + desc = "A truly protective helmet." + min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT + max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT + /obj/item/wizard_armour_charge name = "battlemage shield charges" desc = "A powerful rune that will increase the number of hits a suit of battlemage armour can take before failing.." 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/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..97a16638493 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 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/martial_arts/mimejutsu.dm b/code/modules/martial_arts/mimejutsu.dm index a6d6d9e3341..38904d407de 100644 --- a/code/modules/martial_arts/mimejutsu.dm +++ b/code/modules/martial_arts/mimejutsu.dm @@ -33,8 +33,8 @@ var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_selected)) var/armor_block = D.run_armor_check(affecting, "melee") - D.visible_message("[A] has hit [D] with invisible nuncucks!", \ - "[A] has hit [D] with a with invisible nuncuck!") + D.visible_message("[A] has hit [D] with invisible nunchucks!", \ + "[A] has hit [D] with a with invisible nunchuck!") playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) D.apply_damage(damage, STAMINA, affecting, armor_block) 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/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/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index b051fda9d89..908e905c1c8 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -110,7 +110,6 @@ if(imprinted_master) to_chat(H, "You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.") - /obj/item/mmi/robotic_brain/proc/transfer_personality(mob/candidate) searching = FALSE brainmob.key = candidate.key @@ -206,6 +205,10 @@ brainmob.container = src brainmob.stat = CONSCIOUS brainmob.SetSilence(0) + brainmob.dna = new(brainmob) + brainmob.dna.species = new /datum/species/machine() // Else it will default to human. And we don't want to clone IRC humans now do we? + brainmob.dna.ResetSE() + brainmob.dna.ResetUI() GLOB.dead_mob_list -= brainmob ..() 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/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/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 953ea6bae1d..ea48884df9b 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -313,6 +313,11 @@ /mob/living/carbon/human/put_in_hands(obj/item/I) if(!I) return FALSE + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + if(S.amount == 0) + qdel(I) + return FALSE if(put_in_active_hand(I)) return TRUE else if(put_in_inactive_hand(I)) 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/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..59668d9fddb 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() 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/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..afdeaa66bee 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" @@ -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/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/floorcluwne.dm b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm index c0dfa097f16..cf55824542a 100644 --- a/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm +++ b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm @@ -285,7 +285,7 @@ if(prob(6)) for(var/turf/simulated/floor/O in range(src, 6)) - O.MakeSlippery(TURF_WET_WATER, 10) + O.MakeSlippery(TURF_WET_WATER, 10 SECONDS) playsound(src, 'sound/effects/clownstep1.ogg', 30, 1) if(prob(5)) @@ -323,7 +323,7 @@ if(!eating) addtimer(CALLBACK(src, /mob/living/simple_animal/hostile/floor_cluwne/.proc/Grab, H), 70) for(var/turf/simulated/floor/O in range(src, 6)) - O.MakeSlippery(TURF_WET_LUBE, 20) + O.MakeSlippery(TURF_WET_LUBE, 20 SECONDS) playsound(src, 'sound/effects/meteorimpact.ogg', 30, 1) eating = TRUE 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..73eebc62684 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -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/living/stat_states.dm b/code/modules/mob/living/stat_states.dm index 9ff67107abd..926bdc5970d 100644 --- a/code/modules/mob/living/stat_states.dm +++ b/code/modules/mob/living/stat_states.dm @@ -7,7 +7,7 @@ else if(stat == UNCONSCIOUS) return 0 create_attack_log("Fallen unconscious at [atom_loc_line(get_turf(src))]") - add_attack_logs(src, null, "Fallen unconscious") + add_attack_logs(src, null, "Fallen unconscious", ATKLOG_ALL) log_game("[key_name(src)] fell unconscious at [atom_loc_line(get_turf(src))]") stat = UNCONSCIOUS if(updating) @@ -23,7 +23,7 @@ else if(stat == CONSCIOUS) return 0 create_attack_log("Woken up at [atom_loc_line(get_turf(src))]") - add_attack_logs(src, null, "Woken up") + add_attack_logs(src, null, "Woken up", ATKLOG_ALL) log_game("[key_name(src)] woke up at [atom_loc_line(get_turf(src))]") stat = CONSCIOUS if(updating) @@ -47,7 +47,7 @@ if(!can_be_revived()) return 0 create_attack_log("Came back to life at [atom_loc_line(get_turf(src))]") - add_attack_logs(src, null, "Came back to life") + add_attack_logs(src, null, "Came back to life", ATKLOG_ALL) log_game("[key_name(src)] came back to life at [atom_loc_line(get_turf(src))]") stat = CONSCIOUS GLOB.dead_mob_list -= src @@ -76,4 +76,4 @@ return 1 /mob/living/proc/check_death_method() - return TRUE \ No newline at end of file + return TRUE 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/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/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/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/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 68a7e7275a7..f91d7e66734 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -51,7 +51,7 @@ user.visible_message("[user] zaps [user.p_them()]self with [src].") playsound(user, fire_sound, 50, 1) user.create_attack_log("[key_name(user)] zapped [user.p_them()]self with a [src]") - add_attack_logs(null, user, "zapped [user.p_them()]self with a [src]") + add_attack_logs(null, user, "zapped [user.p_them()]self with a [src]", ATKLOG_ALL) ///////////////////////////////////// //WAND OF DEATH 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/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 6c464a9dca1..dc70eda9cec 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -263,7 +263,7 @@ return M.create_attack_log("[key_name(M)] became [new_mob.real_name].") - add_attack_logs(null, M, "became [new_mob.real_name]") + add_attack_logs(null, M, "became [new_mob.real_name]", ATKLOG_ALL) new_mob.a_intent = INTENT_HARM if(M.mind) @@ -346,4 +346,4 @@ to_chat(target, "You get splatted by [src].") M.Weaken(slip_weaken) M.Stun(slip_stun) - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm index 2831d0e3f89..2dde295a70a 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -6,8 +6,6 @@ reagent_state = LIQUID nutriment_factor = 0 //So alcohol can fill you up! If they want to. color = "#404030" // rgb: 64, 64, 48 - addiction_chance = 1 - addiction_threshold = 10 var/dizzy_adj = 3 var/alcohol_perc = 1 //percentage of ethanol in a beverage 0.0 - 1.0 taste_description = "liquid fire" 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/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 92245d83acb..0fdca68811c 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -221,7 +221,7 @@ user.visible_message("[user] wraps [target].") user.create_attack_log("Has used [name] on [target]") - add_attack_logs(user, target, "used [name]") + add_attack_logs(user, target, "used [name]", ATKLOG_ALL) if(amount <= 0 && !src.loc) //if we used our last wrapping paper, drop a cardboard tube new /obj/item/c_tube( get_turf(user) ) 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/shuttle/supply.dm b/code/modules/shuttle/supply.dm index b20a82e7b30..e1aa537f8a8 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -425,7 +425,7 @@ var/packs_list[0] for(var/set_name in SSshuttle.supply_packs) var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name] - if(!pack.contraband && !pack.hidden && !pack.special && pack.group == cat) + if((!pack.contraband && !pack.hidden && !pack.special && pack.group == cat) || (!pack.contraband && !pack.hidden && (pack.special && pack.special_enabled) && pack.group == cat)) // 0/1 after the pack name (set_name) is a boolean for ordering multiple crates packs_list.Add(list(list("name" = pack.name, "amount" = pack.amount, "cost" = pack.cost, "command1" = list("doorder" = "[set_name]0"), "command2" = list("doorder" = "[set_name]1"), "command3" = list("contents" = set_name)))) 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/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/config/example/admin_ranks.txt b/config/example/admin_ranks.txt index c7d1cccef98..6f37f5bf234 100644 --- a/config/example/admin_ranks.txt +++ b/config/example/admin_ranks.txt @@ -23,7 +23,8 @@ # +SOUND (or +SOUNDS) = allows you to upload and play sounds # +SPAWN (or +CREATE) = mob transformations, spawning of most atoms including mobs (high-risk atoms, e.g. blackholes, will require the +FUN flag too) # +EVERYTHING (or +HOST or +ALL) = Simply gives you everything without having to type every flag - +# +VIEWRUNTIMES = Allows a player to view the runtimes of the server, but not use other debug verbs + # Admin Ranks Admin Observer Mentor +MENTOR 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/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm index f32b1d53610..e85d8e2368a 100644 --- a/goon/code/datums/browserOutput.dm +++ b/goon/code/datums/browserOutput.dm @@ -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/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/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/paradise.dme b/paradise.dme index 5ef4e7db728..ade9dec2048 100644 --- a/paradise.dme +++ b/paradise.dme @@ -17,6 +17,7 @@ #include "code\world.dm" #include "code\__DEFINES\_globals.dm" #include "code\__DEFINES\_readme.dm" +#include "code\__DEFINES\_spacemandmm.dm" #include "code\__DEFINES\_tick.dm" #include "code\__DEFINES\access.dm" #include "code\__DEFINES\admin.dm" diff --git a/tools/mapmerge2/requirements.txt b/tools/mapmerge2/requirements.txt index d24cb40dcc6..65d1a5e0b17 100644 --- a/tools/mapmerge2/requirements.txt +++ b/tools/mapmerge2/requirements.txt @@ -1,3 +1,3 @@ -pygit2==0.27.2 +pygit2==1.0.1 bidict==0.13.1 -Pillow==6.2.0 +Pillow==7.1.1 diff --git a/tools/travis/install_dreamchecker.sh b/tools/travis/install_dreamchecker.sh new file mode 100755 index 00000000000..b4ad2cd12a0 --- /dev/null +++ b/tools/travis/install_dreamchecker.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source _build_dependencies.sh + +wget -O ~/dreamchecker "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMANDMM_TAG/dreamchecker" +chmod +x ~/dreamchecker +~/dreamchecker --version