diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 793454869f..045f9b74e3 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -149,7 +149,7 @@ // /mob signals #define COMSIG_MOB_CLICKED_SHIFT_ON "mob_shift_click_on" //from base of /atom/ShiftClick(): (atom/A), for return values, see COMSIG_CLICK_SHIFT -#define COMSIG_MOB_VISIBLE_ATOMS "mob_visible_atoms" //from base of mob/visible_atoms(): (list/visible_atoms) +#define COMSIG_MOB_FOV_VIEW "mob_visible_atoms" //from base of mob/fov_view(): (list/visible_atoms) #define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/A), for return values, see COMSIG_CLICK_SHIFT #define COMPONENT_EXAMINATE_BLIND 3 //outputs the "something is there but you can't see it" message. #define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed) @@ -185,7 +185,7 @@ #define SPEECH_LANGUAGE 5 // #define SPEECH_IGNORE_SPAM 6 // #define SPEECH_FORCED 7 -#define COMSIG_MOB_IS_VIEWER "mob_is_viewer" //from base of /get_actual_viewers(): (atom/center, depth, viewers_list) +#define COMSIG_MOB_FOV_VIEWER "mob_is_viewer" //from base of /fov_viewers(): (atom/center, depth, viewers_list) #define COMSIG_MOB_GET_VISIBLE_MESSAGE "mob_get_visible_message" //from base of atom/visible_message(): (atom/A, msg, range, ignored_mobs) #define COMPONENT_NO_VISIBLE_MESSAGE 1 //exactly what's said on the tin. #define COMSIG_MOB_ANTAG_ON_GAIN "mob_antag_on_gain" //from base of /datum/antagonist/on_gain(): (antag_datum) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 9d34bc14d2..9facaf5d70 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -20,27 +20,41 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define DF_ISPROCESSING (1<<2) //FLAGS BITMASK - -#define HEAR_1 (1<<3) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. -#define CHECK_RICOCHET_1 (1<<4) // Projectiels will check ricochet on things impacted that have this. -#define CONDUCT_1 (1<<5) // conducts electricity (metal etc.) -#define NODECONSTRUCT_1 (1<<7) // For machines and structures that should not break into parts, eg, holodeck stuff -#define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay -#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving -#define PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows +///This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. +#define HEAR_1 (1<<3) +///Projectiels will check ricochet on things impacted that have this. +#define CHECK_RICOCHET_1 (1<<4) +///Conducts electricity (metal etc.). +#define CONDUCT_1 (1<<5) +///For machines and structures that should not break into parts, eg, holodeck stuff. +#define NODECONSTRUCT_1 (1<<7) +///Atom queued to SSoverlay. +#define OVERLAY_QUEUED_1 (1<<8) +///Item has priority to check when entering or leaving. +#define ON_BORDER_1 (1<<9) +///Prevent clicking things below it on the same turf eg. doors/ fulltile windows. +#define PREVENT_CLICK_UNDER_1 (1<<11) #define HOLOGRAM_1 (1<<12) -#define TESLA_IGNORE_1 (1<<13) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity -#define INITIALIZED_1 (1<<14) //Whether /atom/Initialize() has already run for the object -#define ADMIN_SPAWNED_1 (1<<15) //was this spawned by an admin? used for stat tracking stuff. -#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16) /// should not get harmed if this gets caught by an explosion? -#define BLOCK_FACE_ATOM_1 (1<<17) /// Early returns mob.face_atom() +///Prevents mobs from getting chainshocked by teslas and the supermatter. +#define SHOCKED_1 (1<<13) +///Whether /atom/Initialize() has already run for the object. +#define INITIALIZED_1 (1<<14) +///was this spawned by an admin? used for stat tracking stuff. +#define ADMIN_SPAWNED_1 (1<<15) +/// should not get harmed if this gets caught by an explosion? +#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16) +/// Early returns mob.face_atom() +#define BLOCK_FACE_ATOM_1 (1<<17) //turf-only flags #define NOJAUNT_1 (1<<0) #define UNUSED_RESERVATION_TURF_1 (1<<1) -#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas. -#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf -#define NO_RUINS_1 (1<<10) //Blocks ruins spawning on the turf +///If a turf can be made dirty at roundstart. This is also used in areas. +#define CAN_BE_DIRTY_1 (1<<2) +///Blocks lava rivers being generated on the turf. +#define NO_LAVA_GEN_1 (1<<6) +///Blocks ruins spawning on the turf. +#define NO_RUINS_1 (1<<10) /* These defines are used specifically with the atom/pass_flags bitmask @@ -76,14 +90,15 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define GOLIATH_WEAKNESS (1<<9) //CIT CHANGE //tesla_zap -#define TESLA_MACHINE_EXPLOSIVE (1<<0) -#define TESLA_ALLOW_DUPLICATES (1<<1) -#define TESLA_OBJ_DAMAGE (1<<2) -#define TESLA_MOB_DAMAGE (1<<3) -#define TESLA_MOB_STUN (1<<4) +#define ZAP_MACHINE_EXPLOSIVE (1<<0) +#define ZAP_ALLOW_DUPLICATES (1<<1) +#define ZAP_OBJ_DAMAGE (1<<2) +#define ZAP_MOB_DAMAGE (1<<3) +#define ZAP_MOB_STUN (1<<4) -#define TESLA_DEFAULT_FLAGS ALL -#define TESLA_FUSION_FLAGS TESLA_OBJ_DAMAGE | TESLA_MOB_DAMAGE | TESLA_MOB_STUN +#define ZAP_DEFAULT_FLAGS ALL +#define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN +#define ZAP_SUPERMATTER_FLAGS NONE //EMP protection #define EMP_PROTECT_SELF (1<<0) diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm index 210e5a4a35..6f33bb1a0e 100644 --- a/code/__DEFINES/layers_planes.dm +++ b/code/__DEFINES/layers_planes.dm @@ -42,6 +42,7 @@ #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals #define BLACKNESS_PLANE_RENDER_TARGET "BLACKNESS_PLANE" +///Layers most often used by atoms of plane lower than GAME_PLANE #define SPACE_LAYER 1.8 //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define #define MID_TURF_LAYER 2.02 @@ -61,11 +62,12 @@ #define GAS_PIPE_VISIBLE_LAYER 2.47 #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 + #define LOW_OBJ_LAYER 2.5 #define LOW_SIGIL_LAYER 2.52 #define SIGIL_LAYER 2.54 #define HIGH_SIGIL_LAYER 2.56 - +///Layers most often used by atoms of plane equal or higher than GAME_PLANE #define BELOW_OPEN_DOOR_LAYER 2.6 #define BLASTDOOR_LAYER 2.65 #define OPEN_DOOR_LAYER 2.7 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 42095aba41..880b7ea89a 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define PDAIMG(what) {""} //Filters -#define AMBIENT_OCCLUSION list("type"="drop_shadow","x"=0,"y"=-2,"size"=4,"color"="#04080FAA") +#define AMBIENT_OCCLUSION(_size, _color) list("type"="drop_shadow","x"=0,"y"=-2,"size"=_size,"color"=_color) #define EYE_BLUR(size) list("type"="blur", "size"=size) #define GRAVITY_MOTION_BLUR list("type"="motion_blur","x"=0,"y"=0) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 91a4a6f2c3..a63a59c75f 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -88,6 +88,7 @@ #define TRAIT_SLEEPIMMUNE "sleep_immunity" #define TRAIT_PUSHIMMUNE "push_immunity" #define TRAIT_SHOCKIMMUNE "shock_immunity" +#define TRAIT_TESLA_SHOCKIMMUNE "tesla_shock_immunity" #define TRAIT_STABLEHEART "stable_heart" #define TRAIT_STABLELIVER "stable_liver" #define TRAIT_RESISTHEAT "resist_heat" diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index 86e8d1bc2b..5e57dd5328 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -1,9 +1,6 @@ //THIS FILE CONTAINS CONSTANTS, PROCS, AND OTHER THINGS// ///////////////////////////////////////////////////////// -/mob/proc/setClickCooldown(var/timeout) - next_move = max(world.time + timeout, next_move) - /proc/get_matrix_largest() var/matrix/mtrx=new() return mtrx.Scale(2) diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index e7b8560569..ba29205452 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -671,3 +671,13 @@ for(var/key in input) ret += key return ret + +/proc/is_type_in_ref_list(path, list/L) + if(!ispath(path))//not a path + return + for(var/i in L) + var/datum/D = i + if(!istype(D))//not an usable reference + continue + if(istype(D, path)) + return TRUE diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 6c0ffa5caa..75ac6a8b26 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -250,13 +250,13 @@ processing += A.contents //viewers() but with a signal, for blacklisting. -/proc/get_actual_viewers(depth = world.view, atom/center) +/proc/fov_viewers(depth = world.view, atom/center) if(!center) return . = viewers(depth, center) for(var/k in .) var/mob/M = k - SEND_SIGNAL(M, COMSIG_MOB_IS_VIEWER, center, depth, .) + SEND_SIGNAL(M, COMSIG_MOB_FOV_VIEWER, center, depth, .) /proc/get_mobs_in_radio_ranges(list/obj/item/radio/radios) . = list() diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 09047d32bf..2c8497d5ed 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -629,3 +629,45 @@ return null r += ascii2text(c) return r + +/proc/slot_to_string(slot) + switch(slot) + if(SLOT_BACK) + return "Backpack" + if(SLOT_WEAR_MASK) + return "Mask" + if(SLOT_HANDS) + return "Hands" + if(SLOT_BELT) + return "Belt" + if(SLOT_EARS) + return "Ears" + if(SLOT_GLASSES) + return "Glasses" + if(SLOT_GLOVES) + return "Gloves" + if(SLOT_NECK) + return "Neck" + if(SLOT_HEAD) + return "Head" + if(SLOT_SHOES) + return "Shoes" + if(SLOT_WEAR_SUIT) + return "Suit" + if(SLOT_W_UNIFORM) + return "Uniform" + if(SLOT_IN_BACKPACK) + return "In backpack" + +/proc/tg_ui_icon_to_cit_ui(ui_style) + switch(ui_style) + if('icons/mob/screen_plasmafire.dmi') + return 'modular_citadel/icons/ui/screen_plasmafire.dmi' + if('icons/mob/screen_slimecore.dmi') + return 'modular_citadel/icons/ui/screen_slimecore.dmi' + if('icons/mob/screen_operative.dmi') + return 'modular_citadel/icons/ui/screen_operative.dmi' + if('icons/mob/screen_clockwork.dmi') + return 'modular_citadel/icons/ui/screen_clockwork.dmi' + else + return 'modular_citadel/icons/ui/screen_midnight.dmi' diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 52eff15492..1aab96f85e 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -132,9 +132,11 @@ GLOBAL_LIST_INIT(bitfields, list( "NO_RUINS_1" = NO_RUINS_1, "PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1, "HOLOGRAM_1" = HOLOGRAM_1, - "TESLA_IGNORE_1" = TESLA_IGNORE_1, + "SHOCKED_1" = SHOCKED_1, "INITIALIZED_1" = INITIALIZED_1, "ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1, + "BLOCK_FACE_ATOM_1" = BLOCK_FACE_ATOM_1, + "PREVENT_CONTENTS_EXPLOSION_1" = PREVENT_CONTENTS_EXPLOSION_1 ), "clothing_flags" = list( "LAVAPROTECT" = LAVAPROTECT, @@ -148,12 +150,12 @@ GLOBAL_LIST_INIT(bitfields, list( "IGNORE_HAT_TOSS" = IGNORE_HAT_TOSS, "SCAN_REAGENTS" = SCAN_REAGENTS ), - "tesla_flags" = list( - "TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE, - "TESLA_OBJ_DAMAGE" = TESLA_OBJ_DAMAGE, - "TESLA_MOB_STUN" = TESLA_MOB_STUN, - "TESLA_ALLOW_DUPLICATES" = TESLA_ALLOW_DUPLICATES, - "TESLA_MACHINE_EXPLOSIVE" = TESLA_MACHINE_EXPLOSIVE, + "zap_flags" = list( + "ZAP_MOB_DAMAGE" = ZAP_MOB_DAMAGE, + "ZAP_OBJ_DAMAGE" = ZAP_OBJ_DAMAGE, + "ZAP_MOB_STUN" = ZAP_MOB_STUN, + "ZAP_ALLOW_DUPLICATES" = ZAP_ALLOW_DUPLICATES, + "ZAP_MACHINE_EXPLOSIVE" = ZAP_MACHINE_EXPLOSIVE, ), "smooth" = list( "SMOOTH_TRUE" = SMOOTH_TRUE, diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index dd8b9f0d94..1b100bebaf 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE, "TRAIT_PUSHIMMUNE" = TRAIT_PUSHIMMUNE, "TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE, + "TRAIT_TESLA_SHOCKIMMUNE" = TRAIT_TESLA_SHOCKIMMUNE, "TRAIT_STABLEHEART" = TRAIT_STABLEHEART, "TRAIT_STABLELIVER" = TRAIT_STABLELIVER, "TRAIT_RESISTHEAT" = TRAIT_RESISTHEAT, diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index d7557b00d3..7a8b0a1121 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -57,7 +57,7 @@ /obj/screen/plane_master/wall/backdrop(mob/mymob) if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) else remove_filter("ambient_occlusion") @@ -70,6 +70,12 @@ . = ..() add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) +/obj/screen/plane_master/above_wall/backdrop(mob/mymob) + if(mymob?.client?.prefs.ambientocclusion) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64")) + else + remove_filter("ambient_occlusion") + ///Contains most things in the game world /obj/screen/plane_master/game_world name = "game world plane master" @@ -83,7 +89,7 @@ /obj/screen/plane_master/game_world/backdrop(mob/mymob) if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) else remove_filter("ambient_occlusion") diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 7ff25eb12f..279118d877 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -44,7 +44,7 @@ return if(world.time > next_check && world.time > next_scare) next_check = world.time + 50 - var/list/seen_atoms = owner.visible_atoms(7) + var/list/seen_atoms = owner.fov_view(7) if(LAZYLEN(trigger_objs)) for(var/obj/O in seen_atoms) diff --git a/code/datums/components/field_of_vision.dm b/code/datums/components/field_of_vision.dm index b819604168..5fb7b2596c 100644 --- a/code/datums/components/field_of_vision.dm +++ b/code/datums/components/field_of_vision.dm @@ -86,10 +86,10 @@ RegisterSignal(M, COMSIG_MOB_CLIENT_LOGOUT, .proc/on_mob_logout) RegisterSignal(M, COMSIG_MOB_GET_VISIBLE_MESSAGE, .proc/on_visible_message) RegisterSignal(M, COMSIG_MOB_EXAMINATE, .proc/on_examinate) - RegisterSignal(M, COMSIG_MOB_VISIBLE_ATOMS, .proc/on_visible_atoms) + RegisterSignal(M, COMSIG_MOB_FOV_VIEW, .proc/on_fov_view) RegisterSignal(M, COMSIG_MOB_CLIENT_CHANGE_VIEW, .proc/on_change_view) RegisterSignal(M, COMSIG_MOB_RESET_PERSPECTIVE, .proc/on_reset_perspective) - RegisterSignal(M, COMSIG_MOB_IS_VIEWER, .proc/is_viewer) + RegisterSignal(M, COMSIG_MOB_FOV_VIEWER, .proc/is_viewer) /datum/component/field_of_vision/UnregisterFromParent() . = ..() @@ -109,8 +109,8 @@ UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, 1) UnregisterSignal(M, list(COMSIG_MOB_CLIENT_LOGIN, COMSIG_MOB_CLIENT_LOGOUT, COMSIG_MOB_GET_VISIBLE_MESSAGE, COMSIG_MOB_EXAMINATE, - COMSIG_MOB_VISIBLE_ATOMS, COMSIG_MOB_RESET_PERSPECTIVE, - COMSIG_MOB_CLIENT_CHANGE_VIEW, COMSIG_MOB_IS_VIEWER)) + COMSIG_MOB_FOV_VIEW, COMSIG_MOB_RESET_PERSPECTIVE, + COMSIG_MOB_CLIENT_CHANGE_VIEW, COMSIG_MOB_FOV_VIEWER)) /** * Generates the holder and images (if not generated yet) and adds them to client.images. @@ -296,7 +296,7 @@ if(fov.alpha) FOV_ANGLE_CHECK(source, target, return, return COMPONENT_NO_VISIBLE_MESSAGE) -/datum/component/field_of_vision/proc/on_visible_atoms(mob/source, list/atoms) +/datum/component/field_of_vision/proc/on_fov_view(mob/source, list/atoms) if(!fov.alpha) return for(var/k in atoms) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 68ba0e4272..44ac865aa2 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -572,7 +572,7 @@ if(rustle_sound) playsound(parent, "rustle", 50, 1, -5) to_chat(user, "You put [I] [insert_preposition]to [parent].") - for(var/mob/viewing in get_actual_viewers(world.view, user)-M) + for(var/mob/viewing in fov_viewers(world.view, user)-M) if(in_range(M, viewing)) //If someone is standing close enough, they can tell what it is... viewing.show_message("[M] puts [I] [insert_preposition]to [parent].", MSG_VISUAL) else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance... diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index a7a61802d3..216d82b4c8 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -145,4 +145,10 @@ return !is_mouth_covered() /mob/living/carbon/CanSpreadAirborneDisease() - return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating("bio") >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating("bio") >= 25))) \ No newline at end of file + return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating("bio") >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating("bio") >= 25))) + +/mob/living/proc/set_shocked() + flags_1 |= SHOCKED_1 + +/mob/living/proc/reset_shocked() + flags_1 &= ~ SHOCKED_1 \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index a63f63f4a4..1ff27bafa9 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -581,6 +581,14 @@ SEND_SIGNAL(src, COMSIG_ATOM_RCD_ACT, user, the_rcd, passed_mode) return FALSE +/** + * Respond to a electric bolt action on our item + * + * Default behaviour is to return, we define here to allow for cleaner code later on + */ +/atom/proc/zap_act(power, zap_flags, shocked_targets) + return + /atom/proc/storage_contents_dump_act(obj/item/storage/src_object, mob/user) if(GetComponent(/datum/component/storage)) return component_storage_contents_dump_act(src_object, user) diff --git a/code/game/gamemodes/gangs/dominator.dm b/code/game/gamemodes/gangs/dominator.dm index dca50be5b9..af75315ded 100644 --- a/code/game/gamemodes/gangs/dominator.dm +++ b/code/game/gamemodes/gangs/dominator.dm @@ -48,9 +48,6 @@ /obj/machinery/dominator/hulk_damage() return (max_integrity - integrity_failure) / DOM_HULK_HITS_REQUIRED -/obj/machinery/dominator/tesla_act() - qdel(src) - /obj/machinery/dominator/update_icon() cut_overlays() if(stat & BROKEN) diff --git a/code/game/gamemodes/gangs/gang_decals.dm b/code/game/gamemodes/gangs/gang_decals.dm index 7aaed769d9..a37b4cb63b 100644 --- a/code/game/gamemodes/gangs/gang_decals.dm +++ b/code/game/gamemodes/gangs/gang_decals.dm @@ -10,7 +10,7 @@ /obj/effect/decal/cleanable/crayon/gang icon = 'icons/effects/crayondecal.dmi' layer = ABOVE_NORMAL_TURF_LAYER //Harder to hide - plane = GAME_PLANE + plane = ABOVE_WALL_PLANE do_icon_rotate = FALSE //These are designed to always face south, so no rotation please. var/datum/team/gang/gang diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 470c26ed0f..e2f26d6617 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -522,11 +522,11 @@ Class Procs: /obj/machinery/proc/can_be_overridden() . = 1 -/obj/machinery/tesla_act(power, tesla_flags, shocked_objects) - ..() - if(prob(85) && (tesla_flags & TESLA_MACHINE_EXPLOSIVE)) +/obj/machinery/zap_act(power, zap_flags, shocked_objects) + . = ..() + if(prob(85) && (zap_flags & ZAP_MACHINE_EXPLOSIVE)) explosion(src, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE) - if(tesla_flags & TESLA_OBJ_DAMAGE) + else if(zap_flags & ZAP_OBJ_DAMAGE) take_damage(power/2000, BURN, "energy") if(prob(40)) emp_act(EMP_LIGHT) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 3a79ff3c82..621e486e90 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(network_holopads) desc = "It's a floor-mounted device for projecting holographic images." icon_state = "holopad0" layer = LOW_OBJ_LAYER - plane = FLOOR_PLANE + plane = ABOVE_WALL_PLANE flags_1 = HEAR_1 use_power = IDLE_POWER_USE idle_power_usage = 5 diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index f9f4eb3e80..1730569e10 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -115,8 +115,8 @@ return PROCESS_KILL /obj/machinery/space_heater/RefreshParts() - var/laser = 0 - var/cap = 0 + var/laser = 2 + var/cap = 1 for(var/obj/item/stock_parts/micro_laser/M in component_parts) laser += M.rating for(var/obj/item/stock_parts/capacitor/M in component_parts) @@ -166,6 +166,11 @@ else return ..() +/obj/machinery/space_heater/wrench_act(mob/living/user, obj/item/I) + ..() + default_unfasten_wrench(user, I, 5) + return TRUE + /obj/machinery/space_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index f618888d98..ee28f118fa 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -11,9 +11,6 @@ var/insisting = 0 /obj/machinery/wish_granter/attack_hand(mob/living/carbon/user) - . = ..() - if(.) - return if(charges <= 0) to_chat(user, "The Wish Granter lies silent.") return @@ -22,22 +19,116 @@ to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.") return - else if(is_special_character(user)) - to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.") - else if (!insisting) to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?") insisting++ else - to_chat(user, "You speak. [pick("I want the station to disappear","Humanity is corrupt, mankind must be destroyed","I want to be rich", "I want to rule the world","I want immortality.")]. The Wish Granter answers.") - to_chat(user, "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first.") + if(is_special_character(user)) + to_chat(user, "You speak. [pick("I want power","Humanity is corrupt, mankind must be destroyed", "I want to rule the world","I want immortality")]. The Wish Granter answers.") + to_chat(user, "Your head pounds for a moment, before your vision clears. The Wish Granter, sensing the darkness in your heart, has given you limitless power, and it's all yours!") + user.dna.add_mutation(HULK) + user.dna.add_mutation(XRAY) + user.dna.add_mutation(SPACEMUT) + user.dna.add_mutation(TK) + user.next_move_modifier *= 0.5 //half the delay between attacks! + to_chat(user, "Things around you feel slower!") + charges-- + insisting = FALSE + to_chat(user, "You have a very great feeling about this!") + else + to_chat(user, "The Wish Granter awaits your wish.") + var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","The Station To Disappear","To Kill","Nothing") + switch(wish) + if("Power") //Gives infinite power in exchange for infinite power going off in your face! + if(charges <= 0) + return + to_chat(user, "Your wish is granted, but at a terrible cost...") + to_chat(user, "The Wish Granter punishes you for your selfishness, warping itself into a delaminating supermatter shard!") + var/obj/item/stock_parts/cell/infinite/powah = new /obj/item/stock_parts/cell/infinite(get_turf(user)) + if(user.put_in_hands(powah)) + to_chat(user, "[powah] materializes into your hands!") + else + to_chat(user, "[powah] materializes onto the floor.") + var/obj/machinery/power/supermatter_crystal/powerwish = new /obj/machinery/power/supermatter_crystal(loc) + powerwish.damage = 700 //right at the emergency threshold + powerwish.produces_gas = FALSE + charges-- + insisting = FALSE + if(!charges) + qdel(src) + if("Wealth") //Gives 1 million space bucks in exchange for being turned into gold! + if(charges <= 0) + return + to_chat(user, "Your wish is granted, but at a cost...") + to_chat(user, "The Wish Granter punishes you for your selfishness, warping your body to match the greed in your heart.") + new /obj/structure/closet/crate/trashcart/moneywish(loc) + new /obj/structure/closet/crate/trashcart/moneywish(loc) + user.set_species(/datum/species/golem/gold) + charges-- + insisting = FALSE + if(!charges) + qdel(src) + if("The Station To Disappear") //teleports you to the station and makes you blind, making the station disappear for you! + if(charges <= 0) + return + to_chat(user, "Your wish is 'granted', but at a terrible cost...") + to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your eyes to match the darkness in your heart.") + user.dna.add_mutation(BLINDMUT) + var/obj/item/organ/eyes/eyes = user.getorganslot(ORGAN_SLOT_EYES) + if(eyes) + eyes.applyOrganDamage(eyes.maxHealth) + var/list/destinations = list() + for(var/obj/item/beacon/B in GLOB.teleportbeacons) + var/turf/T = get_turf(B) + if(is_station_level(T.z)) + destinations += B + var/chosen_beacon = pick(destinations) + var/obj/effect/portal/jaunt_tunnel/J = new (get_turf(src), src, 100, null, FALSE, get_turf(chosen_beacon)) + try_move_adjacent(J) + playsound(src,'sound/effects/sparks4.ogg',50,1) + charges-- + insisting = FALSE + if(!charges) + qdel(src) + if("To Kill") //Makes you kill things in exchange for rewards! + if(charges <= 0) + return + to_chat(user, "Your wish is granted, but at a terrible cost...") + to_chat(user, "The Wish Granter punishes you for your wickedness, warping itself into a dastardly creature for you to kill! ...but it almost seems to reward you for this.") + var/obj/item/melee/transforming/energy/sword/cx/killreward = new /obj/item/melee/transforming/energy/sword/cx(get_turf(user)) + if(user.put_in_hands(killreward)) + to_chat(user, "[killreward] materializes into your hands!") + else + to_chat(user, "[killreward] materializes onto the floor.") + user.next_move_modifier *= 0.8 //20% less delay between attacks! + to_chat(user, "Things around you feel slightly slower!") + var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc) + killwish.maxHealth = 1500 + killwish.health = killwish.maxHealth + killwish.vine_grab_distance = 6 + killwish.melee_damage_upper = 30 + killwish.loot = list(/obj/item/twohanded/dualsaber/hypereutactic) + charges-- + insisting = FALSE + if(!charges) + qdel(src) + if("Nothing") //Makes the wish granter disappear + if(charges <= 0) + return + to_chat(user, "The Wish Granter vanishes from sight!") + to_chat(user, "You feel as if you just narrowly avoided a terrible fate...") + charges-- + insisting = FALSE + qdel(src) - charges-- - insisting = 0 +//ITEMS THAT IT USES - user.mind.add_antag_datum(/datum/antagonist/wishgranter) +/obj/structure/closet/crate/trashcart/moneywish + desc = "A heavy, metal trashcart with wheels. Filled with cash." + name = "loaded trash cart" - to_chat(user, "You have a very bad feeling about this.") - - return +/obj/structure/closet/crate/trashcart/moneywish/PopulateContents() //25*20*1000=500,000 + for(var/i in 1 to 25) + var/obj/item/stack/spacecash/c1000/lodsamoney = new /obj/item/stack/spacecash/c1000(src) + lodsamoney.amount = lodsamoney.max_amount diff --git a/code/game/mecha/combat/neovgre.dm b/code/game/mecha/combat/neovgre.dm index c678912a21..fdcc4df151 100644 --- a/code/game/mecha/combat/neovgre.dm +++ b/code/game/mecha/combat/neovgre.dm @@ -62,18 +62,21 @@ /obj/mecha/combat/neovgre/process() ..() - if(GLOB.ratvar_awakens) // At this point only timley intervention by lord singulo could hople to stop the superweapon + if(GLOB.ratvar_awakens) // At this point only timley intervention by lord singulo could hope to stop the superweapon cell.charge = INFINITY max_integrity = INFINITY obj_integrity = max_integrity CHECK_TICK //Just to be on the safe side lag wise - else if(cell.charge < cell.maxcharge) - for(var/obj/effect/clockwork/sigil/transmission/T in range(SIGIL_ACCESS_RANGE, src)) - var/delta = min(recharge_rate, cell.maxcharge - cell.charge) - if (get_clockwork_power() <= delta) - cell.charge += delta - adjust_clockwork_power(-delta) - CHECK_TICK + else + if(cell.charge < cell.maxcharge) + for(var/obj/effect/clockwork/sigil/transmission/T in range(SIGIL_ACCESS_RANGE, src)) + var/delta = min(recharge_rate, cell.maxcharge - cell.charge) + if (get_clockwork_power() >= delta) + cell.charge += delta + adjust_clockwork_power(-delta) + if(obj_integrity < max_integrity && istype(loc, /turf/open/floor/clockwork)) + obj_integrity += min(max_integrity - obj_integrity, max_integrity / 200) + CHECK_TICK /obj/mecha/combat/neovgre/Initialize() .=..() @@ -90,7 +93,7 @@ energy_drain = 30 name = "Aribter Laser Cannon" desc = "Please re-attach this to neovgre and stop asking questions about why it looks like a normal Nanotrasen issue Solaris laser cannon - Nezbere" - fire_sound = "sound/weapons/neovgre_laser.ogg" + fire_sound = 'sound/weapons/neovgre_laser.ogg' /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy/neovgre/can_attach(obj/mecha/combat/neovgre/M) if(istype(M)) diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 955b9935dd..8cfdad0432 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -3,7 +3,7 @@ desc = "Graffiti. Damn kids." icon = 'icons/effects/crayondecal.dmi' icon_state = "rune1" - plane = GAME_PLANE //makes the graffiti visible over a wall. + plane = ABOVE_WALL_PLANE //makes the graffiti visible over a wall. gender = NEUTER mergeable_decal = FALSE var/do_icon_rotate = TRUE diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 3e7706282a..5dbd18aa0c 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -35,6 +35,7 @@ icon = 'icons/turf/decals.dmi' icon_state = "warningline" layer = TURF_DECAL_LAYER + plane = ABOVE_WALL_PLANE /obj/effect/turf_decal/Initialize() ..() diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 992e9c84a7..6910bb1db0 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -469,6 +469,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) /obj/effect/landmark/stationroom var/list/templates = list() layer = BULLET_HOLE_LAYER + plane = ABOVE_WALL_PLANE /obj/effect/landmark/stationroom/New() ..() diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 0676c439f0..cb44b82ad2 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -143,7 +143,7 @@ RLD //if user can't be seen from A (only checks surroundings' opaqueness) and can't see A. //jarring, but it should stop people from targetting atoms they can't see... //excluding darkness, to allow RLD to be used to light pitch black dark areas. - if(!((user in view(view_range, A)) || (user in get_actual_viewers(view_range, A)))) + if(!((user in view(view_range, A)) || (user in fov_viewers(view_range, A)))) to_chat(user, "You focus, pointing \the [src] at whatever outside your field of vision in that direction... to no avail.") return FALSE return TRUE diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 3ac3347222..7cc76da312 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -433,7 +433,7 @@ H.visible_message("The defibrillator safely discharges the excessive charge into the floor!") return var/mob/living/M = H.pulledby - if(M.electrocute_act(30, src)) + if(M.electrocute_act(30, H)) M.visible_message("[M] is electrocuted by [M.p_their()] contact with [H]!") M.emote("scream") diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 1d2a2c9ad1..c931d92379 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -135,7 +135,7 @@ outmsg = "You miss the lens of [C] with [src]!" //catpeople - var/list/viewers = get_actual_viewers(1,targloc) + var/list/viewers = fov_viewers(1,targloc) for(var/mob/living/carbon/human/H in viewers) if(!iscatperson(H) || H.incapacitated() || H.eye_blind ) continue diff --git a/code/game/objects/items/implants/implantpad.dm b/code/game/objects/items/implants/implantpad.dm index f0fc76a2e2..4766e534c9 100644 --- a/code/game/objects/items/implants/implantpad.dm +++ b/code/game/objects/items/implants/implantpad.dm @@ -66,7 +66,7 @@ if(ismob(loc)) attack_self(loc) else - for(var/mob/M in get_actual_viewers(1, src)) + for(var/mob/M in fov_viewers(1, src)) if(M.client) attack_self(M) add_fingerprint(usr) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index d3272616b3..881e4d5f1a 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -104,7 +104,7 @@ if (ismob(src.loc)) attack_self(src.loc) else - for(var/mob/M in get_actual_viewers(1, src)) + for(var/mob/M in fov_viewers(1, src)) if (M.client) src.attack_self(M) return diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 8dac972d04..87afd8e421 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -232,15 +232,16 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e cut_overlay(GLOB.fire_overlay, TRUE) SSfire_burning.processing -= src -/obj/proc/tesla_act(power, tesla_flags, shocked_targets) +/obj/zap_act(power, zap_flags, shocked_targets) + if(QDELETED(src)) + return 0 obj_flags |= BEING_SHOCKED - var/power_bounced = power / 2 - tesla_zap(src, 3, power_bounced, tesla_flags, shocked_targets) addtimer(CALLBACK(src, .proc/reset_shocked), 10) + return power / 2 //The surgeon general warns that being buckled to certain objects receiving powerful shocks is greatly hazardous to your health -//Only tesla coils and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later. -/obj/proc/tesla_buckle_check(var/strength) +//Only tesla coils, vehicles, and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later. +/obj/proc/zap_buckle_check(var/strength) if(has_buckled_mobs()) for(var/m in buckled_mobs) var/mob/living/buckled_mob = m diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 6916e7c24a..0b2fe5ac2a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -123,7 +123,7 @@ /obj/proc/updateUsrDialog() if((obj_flags & IN_USE) && !(obj_flags & USES_TGUI)) var/is_in_use = FALSE - var/list/nearby = get_actual_viewers(1, src) + var/list/nearby = fov_viewers(1, src) for(var/mob/M in nearby) if ((M.client && M.machine == src)) is_in_use = TRUE @@ -152,7 +152,7 @@ if(obj_flags & IN_USE) var/is_in_use = FALSE if(update_viewers) - for(var/mob/M in get_actual_viewers(1, src)) + for(var/mob/M in fov_viewers(1, src)) if ((M.client && M.machine == src)) is_in_use = TRUE src.interact(M) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index d3e8ecf0a6..2225c4c0c2 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -108,7 +108,9 @@ if(!istype(poordude)) return TRUE user.visible_message("[user] pulls [src] out from under [poordude].", "You pull [src] out from under [poordude].") - var/C = new item_chair(loc) + var/obj/item/chair/C = new item_chair(loc) + C.set_custom_materials(custom_materials) + TransferComponents(C) user.put_in_hands(C) poordude.DefaultCombatKnockdown(20)//rip in peace user.adjustStaminaLoss(5) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 6256de247a..500b8d6a49 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -43,7 +43,7 @@ Snake = L break if(Snake) - alerted = get_actual_viewers(world.view,src) + alerted = fov_viewers(world.view,src) ..() if(LAZYLEN(alerted)) egged = world.time + SNAKE_SPAM_TICKS diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 54e08db210..20151a0bdb 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -267,7 +267,7 @@ var/obj/structure/cable/C = T.get_cable_node() if(C) playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5) - tesla_zap(src, 3, C.newavail() * 0.01, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN | TESLA_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. + tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock. return ..() diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index b8137d1332..0a5ba6a68c 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -130,7 +130,7 @@ // The crowd is pleased // The delay is to making large crowds have a longer laster applause var/delay_offset = 0 - for(var/mob/M in get_actual_viewers(world.view, src)) + for(var/mob/M in fov_viewers(world.view, src)) var/mob/living/carbon/human/C = M if (ishuman(M)) addtimer(CALLBACK(C, /mob/.proc/emote, "clap"), delay_offset * 0.3) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 30e451aa14..3d552fa236 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -183,7 +183,7 @@ /obj/structure/table/alt_attack_hand(mob/user) if(user && Adjacent(user) && !user.incapacitated()) - user.setClickCooldown(4) + user.changeNext_move(CLICK_CD_MELEE*0.5) if(istype(user) && user.a_intent == INTENT_HARM) user.visible_message("[user] slams [user.p_their()] palms down on [src].", "You slam your palms down on [src].") playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 268e8e9109..5243341ac1 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -290,7 +290,7 @@ if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS) return - var/mutable_appearance/decal = mutable_appearance('icons/effects/effects.dmi', "", BULLET_HOLE_LAYER) + var/mutable_appearance/decal = mutable_appearance('icons/effects/effects.dmi', "", BULLET_HOLE_LAYER, ABOVE_WALL_PLANE) switch(denttype) if(WALL_DENT_SHOT) decal.icon_state = "bullet_hole" diff --git a/code/modules/antagonists/abductor/equipment/glands/electric.dm b/code/modules/antagonists/abductor/equipment/glands/electric.dm index 82ee77d192..7e52f6fcb6 100644 --- a/code/modules/antagonists/abductor/equipment/glands/electric.dm +++ b/code/modules/antagonists/abductor/equipment/glands/electric.dm @@ -23,5 +23,5 @@ addtimer(CALLBACK(src, .proc/zap), rand(30, 100)) /obj/item/organ/heart/gland/electric/proc/zap() - tesla_zap(owner, 4, 8000, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN) + tesla_zap(owner, 4, 8000, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN) playsound(get_turf(owner), 'sound/magic/lightningshock.ogg', 50, TRUE) \ No newline at end of file diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm index 5717dc557d..6a73dc579b 100644 --- a/code/modules/antagonists/blob/blob/theblob.dm +++ b/code/modules/antagonists/blob/blob/theblob.dm @@ -207,8 +207,8 @@ if(prob(100 - severity * 30)) new /obj/effect/temp_visual/emp(get_turf(src)) -/obj/structure/blob/tesla_act(power) - ..() +/obj/structure/blob/zap_act(power) + . = ..() if(overmind) if(overmind.blobstrain.tesla_reaction(src, power)) take_damage(power/400, BURN, "energy") diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index b89b681539..090ef45d89 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -492,7 +492,7 @@ /obj/structure/bloodsucker/candelabrum/process() if(!lit) return - for(var/mob/living/carbon/human/H in get_actual_viewers(7, src)) + for(var/mob/living/carbon/human/H in fov_viewers(7, src)) var/datum/antagonist/vassal/T = H.mind.has_antag_datum(ANTAG_DATUM_VASSAL) if(AmBloodsucker(H) || T) //We dont want vassals or vampires affected by this return diff --git a/code/modules/antagonists/bloodsucker/powers/cloak.dm b/code/modules/antagonists/bloodsucker/powers/cloak.dm index f8f2bb4e34..5383e8c1ac 100644 --- a/code/modules/antagonists/bloodsucker/powers/cloak.dm +++ b/code/modules/antagonists/bloodsucker/powers/cloak.dm @@ -19,7 +19,7 @@ if(!.) return // must have nobody around to see the cloak - for(var/mob/living/M in get_actual_viewers(9, owner) - owner) + for(var/mob/living/M in fov_viewers(9, owner) - owner) to_chat(owner, "You may only vanish into the shadows unseen.") return FALSE return TRUE diff --git a/code/modules/antagonists/bloodsucker/powers/feed.dm b/code/modules/antagonists/bloodsucker/powers/feed.dm index da53b5cc81..cbb9693fba 100644 --- a/code/modules/antagonists/bloodsucker/powers/feed.dm +++ b/code/modules/antagonists/bloodsucker/powers/feed.dm @@ -169,7 +169,7 @@ vision_distance = notice_range, ignored_mobs = target) // Only people who AREN'T the target will notice this action. // Warn Feeder about Witnesses... var/was_unnoticed = TRUE - for(var/mob/living/M in get_actual_viewers(notice_range, owner) - owner - target) + for(var/mob/living/M in fov_viewers(notice_range, owner) - owner - target) if(M.client && !M.silicon_privileges && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) was_unnoticed = FALSE break diff --git a/code/modules/antagonists/bloodsucker/powers/go_home.dm b/code/modules/antagonists/bloodsucker/powers/go_home.dm index 4892530d63..c46a7fce6c 100644 --- a/code/modules/antagonists/bloodsucker/powers/go_home.dm +++ b/code/modules/antagonists/bloodsucker/powers/go_home.dm @@ -64,7 +64,7 @@ var/turf/T = get_turf(user) if(T && T.lighting_object && T.get_lumcount()>= 0.1) // B) Check for Viewers - for(var/mob/living/M in get_actual_viewers(world.view, get_turf(owner)) - owner) + for(var/mob/living/M in fov_viewers(world.view, get_turf(owner)) - owner) if(M.client && !M.silicon_privileges && !M.eye_blind) am_seen = TRUE if (!M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) diff --git a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm index 04d3be439f..0a7e87029a 100644 --- a/code/modules/antagonists/bloodsucker/powers/mesmerize.dm +++ b/code/modules/antagonists/bloodsucker/powers/mesmerize.dm @@ -64,7 +64,7 @@ to_chat(owner, "Your victim's eyes are glazed over. They cannot perceive you.") return FALSE // Check: Target See Me? (behind wall) - if(!(owner in target.visible_atoms())) + if(!(owner in target.fov_view())) // Sub-Check: GET CLOSER //if (!(owner in range(target_range, get_turf(target))) // if (display_error) @@ -137,7 +137,7 @@ if(istype(target) && success) target.notransform = FALSE REMOVE_TRAIT(target, TRAIT_COMBAT_MODE_LOCKED, src) - if(istype(L) && target.stat == CONSCIOUS && (target in L.visible_atoms(10))) // They Woke Up! (Notice if within view) + if(istype(L) && target.stat == CONSCIOUS && (target in L.fov_view(10))) // They Woke Up! (Notice if within view) to_chat(L, "[target] has snapped out of their trance.") diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 431416ede0..036ea37ada 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -5,6 +5,7 @@ clockwork_desc = "A sigil of some purpose." icon_state = "sigil" layer = LOW_OBJ_LAYER + plane = ABOVE_WALL_PLANE alpha = 50 resistance_flags = NONE var/affects_servants = FALSE diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 2907a1c285..a11ecaa3df 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -451,9 +451,9 @@ return qdel(src) -/obj/machinery/nuclearbomb/tesla_act(power, tesla_flags) +/obj/machinery/nuclearbomb/zap_act(power, zap_flags) ..() - if(tesla_flags & TESLA_MACHINE_EXPLOSIVE) + if(zap_flags & ZAP_MACHINE_EXPLOSIVE) qdel(src)//like the singulo, tesla deletes it. stops it from exploding over and over #define NUKERANGE 127 diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm index d49a8f83c6..a9bc64a932 100644 --- a/code/modules/antagonists/wizard/equipment/spellbook.dm +++ b/code/modules/antagonists/wizard/equipment/spellbook.dm @@ -226,7 +226,11 @@ /datum/spellbook_entry/lightningbolt/Buy(mob/living/carbon/human/user,obj/item/spellbook/book) //return 1 on success . = ..() - user.flags_1 |= TESLA_IGNORE_1 + ADD_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "lightning_bolt_spell") + +/datum/spellbook_entry/lightningbolt/Refund(mob/living/carbon/human/user, obj/item/spellbook/book) + . = ..() + REMOVE_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "lightning_bolt_spell") /datum/spellbook_entry/infinite_guns name = "Lesser Summon Guns" diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 8f5ab7dd5e..97389848ba 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -17,6 +17,7 @@ active_power_usage = 0 power_channel = ENVIRON layer = GAS_PIPE_HIDDEN_LAYER //under wires + plane = ABOVE_WALL_PLANE resistance_flags = FIRE_PROOF max_integrity = 200 obj_flags = CAN_BE_HIT | ON_BLUEPRINTS diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index c164dc5ae3..6b685d4bc1 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -7,6 +7,7 @@ name = "circulator/heat exchanger" desc = "A gas circulator pump and heat exchanger." icon_state = "circ-off-0" + plane = GAME_PLANE var/active = FALSE diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index a45728d51f..c229a4ba27 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -32,7 +32,7 @@ var/turf/T = loc if(level == 2 || (istype(T) && !T.intact)) showpipe = TRUE - plane = GAME_PLANE + plane = ABOVE_WALL_PLANE else showpipe = FALSE plane = FLOOR_PLANE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9b7183092d..4f26a2f772 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -6,6 +6,7 @@ max_integrity = 350 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 30, "acid" = 30) layer = ABOVE_WINDOW_LAYER + plane = GAME_PLANE state_open = FALSE circuit = /obj/item/circuitboard/machine/cryo_tube pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY @@ -15,8 +16,8 @@ var/volume = 100 var/efficiency = 1 - var/sleep_factor = 0.00125 - var/unconscious_factor = 0.001 + var/base_knockout = 30 SECONDS + var/knockout_factor = 1 var/heat_capacity = 20000 var/conduction_coefficient = 0.3 @@ -53,10 +54,9 @@ var/C for(var/obj/item/stock_parts/matter_bin/M in component_parts) C += M.rating - + // 2 bins total, so C ranges from 2 to 8. efficiency = initial(efficiency) * C - sleep_factor = initial(sleep_factor) * C - unconscious_factor = initial(unconscious_factor) * C + knockout_factor = initial(knockout_factor) / max(1, (C * 0.33)) heat_capacity = initial(heat_capacity) / C conduction_coefficient = initial(conduction_coefficient) * C @@ -188,8 +188,10 @@ if(air1.gases.len) if(mob_occupant.bodytemperature < T0C) // Sleepytime. Why? More cryo magic. - mob_occupant.Sleeping((mob_occupant.bodytemperature * sleep_factor) * 2000) - mob_occupant.Unconscious((mob_occupant.bodytemperature * unconscious_factor) * 2000) + // temperature factor goes from 1 to about 2.5 + var/amount = max(1, (4 * log(T0C - mob_occupant.bodytemperature)) - 20) * knockout_factor * base_knockout + mob_occupant.Sleeping(amount) + mob_occupant.Unconscious(amount) if(beaker) if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic. beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents. diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index c1bd59f49b..79ff24e8b7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -7,6 +7,7 @@ max_integrity = 800 density = TRUE layer = ABOVE_WINDOW_LAYER + plane = GAME_PLANE pipe_flags = PIPING_ONE_PER_TURF var/volume = 10000 //in liters var/gas_type = 0 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index dddfdf08c1..7af3e57bc7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -9,6 +9,7 @@ max_integrity = 300 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) layer = OBJ_LAYER + plane = GAME_PLANE circuit = /obj/item/circuitboard/machine/thermomachine ui_x = 300 ui_y = 230 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 100dbc66ae..4ffe7f2ea4 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2385,9 +2385,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("ambientocclusion") ambientocclusion = !ambientocclusion if(parent && parent.screen && parent.screen.len) - var/obj/screen/plane_master/game_world/PM = parent.mob.hud_used.plane_masters["[GAME_PLANE]"] + var/obj/screen/plane_master/game_world/G = parent.mob.hud_used.plane_masters["[GAME_PLANE]"] + var/obj/screen/plane_master/above_wall/A = parent.mob.hud_used.plane_masters["[ABOVE_WALL_PLANE]"] var/obj/screen/plane_master/wall/W = parent.mob.hud_used.plane_masters["[WALL_PLANE]"] - PM.backdrop(parent.mob) + G.backdrop(parent.mob) + A.backdrop(parent.mob) W.backdrop(parent.mob) if("auto_fit_viewport") diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index d5aa49072d..695d25dbf4 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -649,7 +649,6 @@ max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | IMMUTABLE_SLOW resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - flags_1 = TESLA_IGNORE_1 /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason name = "M.A.S.O.N RIG helmet" @@ -665,7 +664,6 @@ max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | SCAN_REAGENTS resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - flags_1 = TESLA_IGNORE_1 /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/Initialize() . = ..() @@ -676,12 +674,14 @@ if (slot == SLOT_HEAD) var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC] DHUD.add_hud_to(user) + ADD_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "mason_hardsuit") /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/dropped(mob/living/carbon/human/user) ..() - if (user.head == src) + if (HAS_TRAIT_FROM(user, TRAIT_TESLA_SHOCKIMMUNE, "mason_hardsuit")) var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_DIAGNOSTIC_BASIC] DHUD.remove_hud_from(user) + REMOVE_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "mason_hardsuit") /obj/item/clothing/suit/space/hardsuit/ancient/proc/on_mob_move() var/mob/living/carbon/human/H = loc diff --git a/code/modules/clothing/suits/reactive_armour.dm b/code/modules/clothing/suits/reactive_armour.dm index c9b7695779..98fb836c38 100644 --- a/code/modules/clothing/suits/reactive_armour.dm +++ b/code/modules/clothing/suits/reactive_armour.dm @@ -164,21 +164,21 @@ desc = "An experimental suit of armor with sensitive detectors hooked up to a huge capacitor grid, with emitters strutting out of it. Zap." siemens_coefficient = -1 reactivearmor_cooldown_duration = 20 - var/tesla_power = 25000 - var/tesla_range = 20 - var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE + var/zap_power = 25000 + var/zap_range = 20 + var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE var/legacy = FALSE var/legacy_dmg = 30 /obj/item/clothing/suit/armor/reactive/tesla/dropped(mob/user) ..() if(istype(user)) - user.flags_1 &= ~TESLA_IGNORE_1 + REMOVE_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "reactive_tesla_armor") /obj/item/clothing/suit/armor/reactive/tesla/equipped(mob/user, slot) ..() if(slot_flags & slotdefine2slotbit(slot)) //Was equipped to a valid slot for this item? - user.flags_1 |= TESLA_IGNORE_1 + ADD_TRAIT(user, TRAIT_TESLA_SHOCKIMMUNE, "reactive_tesla_armor") /obj/item/clothing/suit/armor/reactive/tesla/block_action(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return) if(prob(hit_reaction_chance)) @@ -190,7 +190,7 @@ return owner.visible_message("[src] blocks [attack_text], sending out arcs of lightning!") if(!legacy) - tesla_zap(owner, tesla_range, tesla_power, tesla_flags) + tesla_zap(owner, zap_range, zap_power, zap_flags) else for(var/mob/living/M in view(7, owner)) if(M == owner) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index f361a72d17..2c1299f5b4 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1258,7 +1258,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( ..() if(!target.halbody) var/list/possible_points = list() - for(var/turf/open/floor/F in target.visible_atoms(world.view)) + for(var/turf/open/floor/F in target.fov_view(world.view)) possible_points += F if(possible_points.len) var/turf/open/floor/husk_point = pick(possible_points) @@ -1289,7 +1289,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( set waitfor = FALSE ..() var/list/turf/startlocs = list() - for(var/turf/open/T in target.visible_atoms(world.view+1)-view(world.view,target)) + for(var/turf/open/T in target.fov_view(world.view+1)-view(world.view,target)) startlocs += T if(!startlocs.len) qdel(src) diff --git a/code/modules/goonchat/browserassets/html/browserOutput.html b/code/modules/goonchat/browserassets/html/browserOutput.html index 314cd42446..0acb127517 100644 --- a/code/modules/goonchat/browserassets/html/browserOutput.html +++ b/code/modules/goonchat/browserassets/html/browserOutput.html @@ -29,7 +29,7 @@ --ms