diff --git a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm index 82ed8ece1a7..c53640a6726 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm @@ -82,7 +82,7 @@ "bD" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/snacks/beans,/turf/simulated/floor/plasteel{tag = "icon-bar"; icon_state = "bar"},/area/ruin/unpowered) "bE" = (/obj/structure/stool/bed/chair{dir = 8},/turf/simulated/floor/plasteel{tag = "icon-bar"; icon_state = "bar"},/area/ruin/unpowered) "bF" = (/obj/machinery/seed_extractor,/turf/simulated/floor/plasteel,/area/ruin/unpowered) -"bG" = (/obj/machinery/power/apc{dir = 8; name = "Bunker APC"; keep_preset_name = 1; pixel_x = -24; pixel_y = 0},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plasteel,/area/ruin/unpowered) +"bG" = (/obj/machinery/power/apc/noalarm{dir = 8; name = "Bunker APC"; keep_preset_name = 1; pixel_x = -24; pixel_y = 0},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "bH" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = ""},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "bI" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "bJ" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plasteel,/area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm index 30445ea3b05..482c4eee1a3 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm @@ -35,7 +35,7 @@ "aI" = (/turf/simulated/floor/plasteel/airless{icon_state = "damaged5"},/area/ruin/onehalf/hallway) "aJ" = (/obj/machinery/iv_drip,/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) "aK" = (/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) -"aL" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/cable,/obj/machinery/power/apc{keep_preset_name = 1; name = "Hallway APC"; pixel_x = 0; pixel_y = -24},/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) +"aL" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/cable,/obj/machinery/power/apc/noalarm{keep_preset_name = 1; name = "Hallway APC"; pixel_x = 0; pixel_y = -24},/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "aM" = (/obj/structure/disposalpipe/segment,/obj/structure/disposalpipe/segment,/obj/machinery/door/poddoor{id_tag = "bayint1"; name = "mining drone bay blast door"},/turf/simulated/floor/plating,/area/ruin/onehalf/drone_bay) "aN" = (/obj/machinery/door_control{id = "bayint1"; name = "Pod Bay 1 Internal"; pixel_x = -5; pixel_y = -6},/obj/machinery/door_control{id = "bayext1"; name = "Pod Bay 1 External"; pixel_x = -5; pixel_y = 6},/obj/machinery/door_control{id = "bayint2"; name = "Pod Bay 2 Internal"; pixel_x = 7; pixel_y = -6},/obj/machinery/door_control{id = "bayext2"; name = "Pod Bay 2 External"; pixel_x = 7; pixel_y = 6},/turf/simulated/wall,/area/ruin/onehalf/drone_bay) "aO" = (/obj/structure/disposalpipe/segment,/obj/machinery/door/poddoor{id_tag = "bayint2"; name = "mining drone bay blast door"},/turf/simulated/floor/plating,/area/ruin/onehalf/drone_bay) @@ -48,7 +48,7 @@ "aV" = (/obj/machinery/door/airlock/glass_medical{name = "airlock"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) "aW" = (/obj/machinery/door/airlock,/turf/simulated/floor/plasteel,/area/ruin/onehalf/dorms_med) "aX" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor/plasteel{dir = 9; icon_state = "warning"},/area/ruin/onehalf/drone_bay) -"aY" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/closet/crate/medical,/obj/item/clothing/accessory/stethoscope,/obj/item/device/healthanalyzer,/obj/item/weapon/reagent_containers/blood/OMinus,/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/power/apc{dir = 4; keep_preset_name = 1; name = "Crew Quarters APC"; pixel_x = 27},/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) +"aY" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/closet/crate/medical,/obj/item/clothing/accessory/stethoscope,/obj/item/device/healthanalyzer,/obj/item/weapon/reagent_containers/blood/OMinus,/obj/item/weapon/reagent_containers/blood/OMinus,/obj/machinery/power/apc/noalarm{dir = 4; keep_preset_name = 1; name = "Crew Quarters APC"; pixel_x = 27},/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) "aZ" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/ruin/onehalf/drone_bay) "ba" = (/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/ruin/onehalf/drone_bay) "bb" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{dir = 5; icon_state = "warning"},/area/ruin/onehalf/drone_bay) @@ -74,7 +74,7 @@ "bv" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel/airless{icon_state = "damaged3"},/area/ruin/onehalf/hallway) "bw" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "bx" = (/obj/structure/disposalpipe/segment,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel/airless{icon_state = "damaged1"},/area/ruin/onehalf/hallway) -"by" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/power/apc{dir = 1; keep_preset_name = 1; name = "Mining Drone Bay APC"; pixel_y = 26},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/ruin/onehalf/drone_bay) +"by" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/power/apc/noalarm{dir = 1; keep_preset_name = 1; name = "Mining Drone Bay APC"; pixel_y = 26},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/ruin/onehalf/drone_bay) "bz" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel/airless{icon_state = "damaged4"},/area/ruin/onehalf/hallway) "bA" = (/obj/structure/disposalpipe/segment,/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "bB" = (/obj/machinery/door/airlock/glass{name = "glass airlock"},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plasteel,/area/ruin/onehalf/drone_bay) @@ -92,7 +92,7 @@ "bN" = (/obj/structure/disposalpipe/trunk{dir = 1},/obj/machinery/disposal,/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "bO" = (/obj/structure/girder/reinforced,/obj/item/stack/sheet/plasteel,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/hallway) "bP" = (/obj/structure/girder/reinforced,/turf/simulated/floor/plating/airless,/area/ruin/onehalf/hallway) -"bQ" = (/obj/structure/cable{d2 = 4; icon_state = "0-4"},/obj/machinery/power/apc{dir = 1; keep_preset_name = 1; name = "Bridge APC"; pixel_y = 26},/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) +"bQ" = (/obj/structure/cable{d2 = 4; icon_state = "0-4"},/obj/machinery/power/apc/noalarm{dir = 1; keep_preset_name = 1; name = "Bridge APC"; pixel_y = 26},/turf/simulated/floor/plasteel,/area/ruin/onehalf/bridge) "bR" = (/turf/simulated/floor/plasteel/airless{icon_state = "damaged2"},/area/ruin/onehalf/hallway) "bS" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "bT" = (/turf/simulated/wall/r_wall,/area/ruin/onehalf/bridge) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm b/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm index 87e1a46f41f..5291cdea5a3 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm @@ -20,7 +20,7 @@ "t" = (/obj/item/weapon/rack_parts,/obj/machinery/light{dir = 1},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 8},/area/ruin/unpowered) "u" = (/obj/machinery/door/airlock/glass,/turf/simulated/floor/plasteel,/area/ruin/unpowered) "v" = (/obj/machinery/door/airlock,/turf/simulated/floor/plasteel,/area/ruin/unpowered) -"w" = (/obj/machinery/power/apc{dir = 2; name = "Outpost APC"; keep_preset_name = 1; pixel_y = -24},/turf/simulated/floor/plasteel,/area/ruin/unpowered) +"w" = (/obj/machinery/power/apc/noalarm{dir = 2; name = "Outpost APC"; keep_preset_name = 1; pixel_y = -24},/turf/simulated/floor/plasteel,/area/ruin/unpowered) "x" = (/turf/simulated/floor/plasteel{icon_state = "dark"},/area/ruin/unpowered) "y" = (/obj/structure/dispenser/oxygen,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/ruin/unpowered) "z" = (/obj/structure/table/reinforced,/obj/item/clothing/head/ushanka,/turf/simulated/floor/plasteel{dir = 4; icon_state = "darkredfull"},/area/ruin/unpowered) diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index aeadda0a7b4..fad455ed438 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/New() ..() - + if(!icon_manager) icon_manager = new() @@ -318,3 +318,6 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) Deconstruct() + +/obj/machinery/atmospherics/update_remote_sight(mob/user) + user.sight |= (SEE_TURFS|BLIND) diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 94efade9b1a..cbe1422c38a 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -108,22 +108,16 @@ return 1 -/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - var/list/data = new() - - data = build_uidata() - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330) - ui.set_initial_data(data) ui.open() -/obj/machinery/atmospherics/omni/filter/proc/build_uidata() - var/list/data = new() +/obj/machinery/atmospherics/omni/filter/ui_data(mob/user, datum/topic_state/state) + var/data[0] data["power"] = on data["config"] = configuring diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index c64703773d3..07269c5f3db 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -132,22 +132,16 @@ return 1 -/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - var/list/data = new() - - data = build_uidata() - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) - + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330) - ui.set_initial_data(data) ui.open() -/obj/machinery/atmospherics/omni/mixer/proc/build_uidata() - var/list/data = new() +/obj/machinery/atmospherics/omni/mixer/ui_data(mob/user, datum/topic_state/state) + var/data[0] data["power"] = on data["config"] = configuring diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 49ef7a72855..0397b5bcdde 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -43,4 +43,21 @@ #define R_MAXPERMISSION 32768 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. -#define R_HOST 65535 \ No newline at end of file +#define R_HOST 65535 + +#define ADMIN_QUE(user) "(?)" +#define ADMIN_FLW(user) "(FLW)" +#define ADMIN_PP(user) "(PP)" +#define ADMIN_VV(atom) "(VV)" +#define ADMIN_SM(user) "(SM)" +#define ADMIN_TP(user) "(TP)" +#define ADMIN_BSA(user) "(BSA)" +#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" +#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" +#define ADMIN_SC(user) "(SC)" +#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" +#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" +#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]" +#define ADMIN_JMP(src) "(JMP)" +#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" +#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" \ No newline at end of file diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 049019a32d2..e6804ee1f96 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -196,7 +196,7 @@ //Human Overlays Indexes///////// #define MUTANTRACE_LAYER 1 -#define TAIL_UNDERLIMBS_LAYER 2 +#define TAIL_UNDERLIMBS_LAYER 2 //Tail split-rendering. #define LIMBS_LAYER 3 #define MARKINGS_LAYER 4 #define UNDERWEAR_LAYER 5 @@ -211,21 +211,24 @@ #define BELT_LAYER 14 //Possible make this an overlay of somethign required to wear a belt? #define SUIT_STORE_LAYER 15 #define BACK_LAYER 16 -#define HAIR_LAYER 17 //TODO: make part of head layer? -#define HEAD_ACCESSORY_LAYER 18 -#define FHAIR_LAYER 19 -#define TAIL_LAYER 20 //bs12 specific. this hack is probably gonna come back to haunt me -#define GLASSES_LAYER 21 -#define FACEMASK_LAYER 22 -#define HEAD_LAYER 23 -#define COLLAR_LAYER 24 -#define HANDCUFF_LAYER 25 -#define LEGCUFF_LAYER 26 -#define L_HAND_LAYER 27 -#define R_HAND_LAYER 28 -#define TARGETED_LAYER 29 //BS12: Layer for the target overlay from weapon targeting system -#define FIRE_LAYER 30 //If you're on fire -#define TOTAL_LAYERS 30 +#define HEAD_ACCESSORY_LAYER 17 +#define FHAIR_LAYER 18 +#define GLASSES_LAYER 19 +#define HAIR_LAYER 20 //TODO: make part of head layer? +#define HEAD_ACC_OVER_LAYER 21 //Select-layer rendering. +#define FHAIR_OVER_LAYER 22 //Select-layer rendering. +#define GLASSES_OVER_LAYER 23 //Select-layer rendering. +#define TAIL_LAYER 24 //bs12 specific. this hack is probably gonna come back to haunt me +#define FACEMASK_LAYER 25 +#define HEAD_LAYER 26 +#define COLLAR_LAYER 27 +#define HANDCUFF_LAYER 28 +#define LEGCUFF_LAYER 29 +#define L_HAND_LAYER 30 +#define R_HAND_LAYER 31 +#define TARGETED_LAYER 32 //BS12: Layer for the target overlay from weapon targeting system +#define FIRE_LAYER 33 //If you're on fire +#define TOTAL_LAYERS 33 ///Access Region Codes/// #define REGION_ALL 0 diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index bf9c479d3e8..7ab8a19f86d 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -110,6 +110,9 @@ #define CHEM_MOB_SPAWN_HOSTILE 1 #define CHEM_MOB_SPAWN_FRIENDLY 2 +#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay +#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully + #define isliving(A) (istype((A), /mob/living)) #define iscarbon(A) (istype((A), /mob/living/carbon)) #define ishuman(A) (istype((A), /mob/living/carbon/human)) @@ -146,4 +149,4 @@ #define isorgan(A) (istype((A), /obj/item/organ/external)) #define hasorgans(A) (ishuman(A)) -#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) \ No newline at end of file +#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 94668321c60..3b370f8a945 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -24,3 +24,39 @@ animate(transform = matrices[i], time = speed) //doesn't have an object argument because this is "Stacking" with the animate call above //3 billion% intentional + +//Dumps the matrix data in format a-f +/matrix/proc/tolist() + . = list() + . += a + . += b + . += c + . += d + . += e + . += f + +//Dumps the matrix data in a matrix-grid format +/* + a d 0 + b e 0 + c f 1 +*/ +/matrix/proc/togrid() + . = list() + . += a + . += d + . += 0 + . += b + . += e + . += 0 + . += c + . += f + . += 1 + +//The X pixel offset of this matrix +/matrix/proc/get_x_shift() + . = c + +//The Y pixel offset of this matrix +/matrix/proc/get_y_shift() + . = f \ No newline at end of file diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index de091cb8584..e0d25da3ffd 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1009,6 +1009,50 @@ proc/get_mob_with_client_list() else if(zone == "l_foot") return "left foot" else if(zone == "r_foot") return "right foot" else return zone + +/* + + Gets the turf this atom's *ICON* appears to inhabit + It takes into account: + * Pixel_x/y + * Matrix x/y + + NOTE: if your atom has non-standard bounds then this proc + will handle it, but: + * if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked + (this may seem bad, but you're atleast as close to the center of the atom as possible, better than byond's default loc being all the way off) + * if the bounds are odd, the true middle turf of the atom is returned + +*/ + +/proc/get_turf_pixel(atom/movable/AM) + if(!istype(AM)) + return + + //Find AM's matrix so we can use it's X/Y pixel shifts + var/matrix/M = matrix(AM.transform) + + var/pixel_x_offset = AM.pixel_x + M.get_x_shift() + var/pixel_y_offset = AM.pixel_y + M.get_y_shift() + + //Irregular objects + if(AM.bound_height != world.icon_size || AM.bound_width != world.icon_size) + var/icon/AMicon = icon(AM.icon, AM.icon_state) + pixel_x_offset += ((AMicon.Width()/world.icon_size)-1)*(world.icon_size*0.5) + pixel_y_offset += ((AMicon.Height()/world.icon_size)-1)*(world.icon_size*0.5) + qdel(AMicon) + + //DY and DX + var/rough_x = round(round(pixel_x_offset,world.icon_size)/world.icon_size) + var/rough_y = round(round(pixel_y_offset,world.icon_size)/world.icon_size) + + //Find coordinates + var/turf/T = get_turf(AM) //use AM's turfs, as it's coords are the same as AM's AND AM's coords are lost if it is inside another atom + var/final_x = T.x + rough_x + var/final_y = T.y + rough_y + + if(final_x || final_y) + return locate(final_x, final_y, T.z) //Finds the distance between two atoms, in pixels //centered = 0 counts from turf edge to edge diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index cdce17f6277..f3ae2fdea48 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -31,9 +31,15 @@ return next_click = world.time + 1 - if(control_disabled || stat) return + + var/turf/pixel_turf = get_turf_pixel(A) + if(pixel_turf && !cameranet.checkTurfVis(pixel_turf)) + log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)])") + message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(A)]))") + send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(A)]))") + return var/list/modifiers = params2list(params) if(modifiers["shift"] && modifiers["ctrl"]) diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm index ab98e25c547..ada85c38611 100644 --- a/code/datums/cargoprofile.dm +++ b/code/datums/cargoprofile.dm @@ -643,9 +643,7 @@ //this is necessarily damaging var/damage = rand(1,5) to_chat(M, "The unloading machine grabs you with a hard metallic claw!") - if(M.client) - M.client.eye = master - M.client.perspective = EYE_PERSPECTIVE + M.reset_perspective(master) M.loc = master master.types[M.type] = src M.apply_damage(damage) // todo: ugly @@ -699,10 +697,7 @@ //this is necessarily damaging var/damage = rand(1,5) to_chat(M, "The unloading machine grabs you with a hard metallic claw!") - if(M.client) - M.client.eye = master - M.client.perspective = EYE_PERSPECTIVE - M.loc = master + M.forceMove(master) master.types[M.type] = src M.apply_damage(damage) // todo: ugly M.visible_message("\red [M.name] gets pulled into the machine!") @@ -710,11 +705,8 @@ outlet_reaction(var/atom/W,var/turf/D) var/mob/living/M = W - M.loc = master.loc + M.forceMove(master.loc) M.dir = master.outdir - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE D = get_step(D,master.outdir) // throw attempt eject_speed = rand(0,4) @@ -796,4 +788,4 @@ var/punches = punch(M,remaining / PUNCH_WORK) if(punches>1)master.sleep++ return punches * PUNCH_WORK -#undef MAXCOIL \ No newline at end of file +#undef MAXCOIL diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 6664c06dda0..53a927386bd 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1028,7 +1028,7 @@ body to_chat(usr, "Mob doesn't exist anymore") return - if(!(locateUID(rem_organ) in M.internal_organs)) + if(!(rem_organ in M.internal_organs)) to_chat(usr, "Mob does not have that organ.") return diff --git a/code/datums/spell.dm b/code/datums/spell.dm index f16e1f6b263..332d96779e6 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -64,7 +64,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin var/mob/living/carbon/human/caster = user if(caster.remoteview_target) caster.remoteview_target = null - caster.reset_view(0) + caster.reset_perspective(0) return 0 if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index bba4971acd9..2c5b9375918 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -207,6 +207,7 @@ var/list/uplink_items = list() item = /obj/item/weapon/caution/proximity_sign cost = 4 job = list("Janitor") + surplus = 0 //Medical diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c60d726236b..663d6c5a8f9 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -427,6 +427,15 @@ else return 0 +// Used to provide overlays when using this atom as a viewing focus +// (cameras, locker tint, etc.) +/atom/proc/get_remote_view_fullscreens(mob/user) + return + +//the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera) +/atom/proc/update_remote_sight(mob/living/user) + return + /atom/proc/checkpass(passflag) return pass_flags&passflag diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 7f4b0574450..f45f2daa07b 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -147,6 +147,18 @@ return 1 +/mob/living/forceMove(atom/destination) + stop_pulling() + if(buckled) + buckled.unbuckle_mob(src,force=1) + // in lieu of "unbuckle_all_mobs" + if(buckled_mob) + unbuckle_mob(buckled_mob,force=1) + . = ..() + if(client) + reset_perspective(destination) + update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall. + //called when src is thrown into hit_atom /atom/movable/proc/throw_impact(atom/hit_atom, var/speed) if(istype(hit_atom,/mob/living)) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 63c42687b67..0533afe2911 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -156,8 +156,6 @@ to_chat(usr, "Subject cannot have abiotic items on.") return usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src usr.forceMove(src) src.occupant = usr src.icon_state = "scanner_occupied" @@ -258,9 +256,6 @@ go_out() /obj/machinery/dna_scannernew/proc/put_in(var/mob/M) - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src M.forceMove(src) src.occupant = M src.icon_state = "scanner_occupied" @@ -283,9 +278,6 @@ to_chat(usr, "The scanner is locked!") return - if(src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE src.occupant.forceMove(src.loc) src.occupant = null src.icon_state = "scanner_open" @@ -476,7 +468,18 @@ if(user == connected.occupant) return - // this is the data which will be sent to the ui + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/computer/scan_consolenew/ui_data(mob/user, datum/topic_state/state) var/data[0] data["selectedMenuKey"] = selected_menu_key data["locked"] = src.connected.locked @@ -550,18 +553,7 @@ for(var/datum/reagent/R in connected.beaker.reagents.reagent_list) data["beakerVolume"] += R.volume - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - // auto update every Master Controller tick - ui.set_auto_update(1) + return data /obj/machinery/computer/scan_consolenew/Topic(href, href_list) if(..()) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 1ada7c0f5ac..36c9af1c48c 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -619,7 +619,7 @@ numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.remote_access_pin if(numbers.len>0) - to_chat(usr, "b>Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + to_chat(usr, "Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") to_chat(usr, "Thoughts: [M.name] is currently [thoughts].") if(EMPATH in M.mutations) diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm index 9bc3aa974e6..27c82a1d20f 100644 --- a/code/game/dna/genes/powers.dm +++ b/code/game/dna/genes/powers.dm @@ -161,6 +161,14 @@ /datum/dna/gene/basic/xray/New() block=XRAYBLOCK +/datum/dna/gene/basic/xray/activate(mob/living/M, connected, flags) + ..() + M.update_sight() + +/datum/dna/gene/basic/xray/deactivate(mob/living/M, connected, flags) + ..() + M.update_sight() + /datum/dna/gene/basic/tk name="Telekenesis" activation_messages = list("You feel smarter.") diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index a194ddfeed1..c42ac3e43e3 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -302,12 +302,12 @@ if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/)) to_chat(user, "Your mind is too busy with that telekinetic grab.") user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) return if(user.client.eye != user.client.mob) user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) return for(var/mob/living/L in targets) @@ -315,7 +315,7 @@ if(target) user.remoteview_target = target - user.reset_view(target) + user.reset_perspective(target) else user.remoteview_target = null - user.reset_view(0) + user.reset_perspective(0) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index e60b7406675..8e288c39a70 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -6,13 +6,20 @@ var/runedec = 0 var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide") /client/proc/check_words() // -- Urist - set category = "Special Verbs" + set category = "Admin" set name = "Check Rune Words" set desc = "Check the rune-word meaning" + + if(!check_rights(R_ADMIN)) + return + if(!cultwords["travel"]) runerandom() for(var/word in engwords) to_chat(usr, "[cultwords[word]] is [word]") + + log_and_message_admins("checked the rune words.") + feedback_add_details("admin_verb","CRW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/runerandom() //randomizes word meaning var/list/runewords=list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") ///"orkan" and "allaq" removed. @@ -100,6 +107,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", return return +// This is for the seer rune, so you don't get permanent ghost sight +/obj/effect/rune/Uncrossed(atom/movable/O) + if(isliving(O)) + var/mob/living/L = O + L.update_sight() /obj/effect/rune/proc/get_word_string() if(word1 == cultwords["travel"]) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 20133d972c8..ff08b31e700 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -210,6 +210,8 @@ var/list/sacrificed = list() /obj/effect/rune/proc/seer() if(usr.loc==src.loc) + // No. Bad cultcode. Bad. + var/mob/living/carbon/human/H = usr if(usr.seer==1) usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.") to_chat(usr, "\red The world beyond fades from your vision.") @@ -224,6 +226,7 @@ var/list/sacrificed = list() to_chat(usr, "\red The world beyond opens to your eyes.") usr.see_invisible = SEE_INVISIBLE_OBSERVER usr.seer = 1 + H.update_sight() return return fizzle() diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 1b31f2d554a..bc682a4f168 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -411,7 +411,7 @@ var/round_start_time = 0 var/dat dat += {"