Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit767
This commit is contained in:
@@ -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)
|
||||
|
||||
+38
-23
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
|
||||
//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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -572,7 +572,7 @@
|
||||
if(rustle_sound)
|
||||
playsound(parent, "rustle", 50, 1, -5)
|
||||
to_chat(user, "<span class='notice'>You put [I] [insert_preposition]to [parent].</span>")
|
||||
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("<span class='notice'>[M] puts [I] [insert_preposition]to [parent].</span>", MSG_VISUAL)
|
||||
else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
|
||||
|
||||
@@ -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)))
|
||||
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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
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, "<B>Your wish is granted, but at a cost...</B>")
|
||||
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, "<B>Your wish is 'granted', but at a terrible cost...</B>")
|
||||
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, "<B>Your wish is granted, but at a terrible cost...</B>")
|
||||
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, "<B>The Wish Granter vanishes from sight!</B>")
|
||||
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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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, "<span class='warning'>You focus, pointing \the [src] at whatever outside your field of vision in that direction... to no avail.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
H.visible_message("<span class='danger'>The defibrillator safely discharges the excessive charge into the floor!</span>")
|
||||
return
|
||||
var/mob/living/M = H.pulledby
|
||||
if(M.electrocute_act(30, src))
|
||||
if(M.electrocute_act(30, H))
|
||||
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
|
||||
M.emote("scream")
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
outmsg = "<span class='warning'>You miss the lens of [C] with [src]!</span>"
|
||||
|
||||
//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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -108,7 +108,9 @@
|
||||
if(!istype(poordude))
|
||||
return TRUE
|
||||
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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("<span class='warning'>[user] slams [user.p_their()] palms down on [src].</span>", "<span class='warning'>You slam your palms down on [src].</span>")
|
||||
playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, "<span class='warning'>You may only vanish into the shadows unseen.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
to_chat(owner, "<span class='warning'>Your victim's eyes are glazed over. They cannot perceive you.</span>")
|
||||
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, "<span class='warning'>[target] has snapped out of their trance.</span>")
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='danger'>[src] blocks [attack_text], sending out arcs of lightning!</span>")
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<span class="ms" id="pingMs">--ms</span>
|
||||
</div>
|
||||
<div id="darkmodething">
|
||||
<a href="#" class="subCell toggle" id="changeColorPreset" title="Change color preset"><i class="fas fa-eye-open"></i></a>
|
||||
<a href="#" class="subCell toggle" id="changeColorPreset" title="Change color preset"><i class="fas fa-eye"></i></a>
|
||||
</div>
|
||||
<div id="audio">
|
||||
<a href="#" class="subCell toggle" id="toggleAudio" title="Audio"><i class="fas fa-volume-up"></i></a>
|
||||
|
||||
@@ -102,7 +102,22 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(..() || !ishuman(hit_atom))
|
||||
return
|
||||
var/mob/living/carbon/human/C = hit_atom
|
||||
var/mob/living/carbon/human/poorsod = hit_atom
|
||||
eyesand(poorsod)
|
||||
|
||||
/obj/item/stack/ore/glass/attack(mob/living/M, mob/living/user)
|
||||
if(!ishuman(M))
|
||||
return ..()
|
||||
if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD)
|
||||
return ..()
|
||||
var/mob/living/carbon/human/poorsod = M
|
||||
visible_message("<span class='danger'>[user] throws the sand at [poorsod]'s face!</span>")
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/sayer = user
|
||||
sayer.forcesay("POCKET SAAND!!")
|
||||
eyesand(poorsod)
|
||||
|
||||
/obj/item/stack/ore/glass/proc/eyesand(mob/living/carbon/human/C)
|
||||
if(C.head && C.head.flags_cover & HEADCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s headgear blocks the sand!</span>")
|
||||
return
|
||||
@@ -116,8 +131,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
|
||||
C.confused += 5
|
||||
to_chat(C, "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>")
|
||||
C.forcesay("*scream")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/stack/ore/glass/ex_act(severity, target)
|
||||
if (severity == EXPLODE_NONE)
|
||||
return
|
||||
|
||||
@@ -707,7 +707,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
//this is a mob verb instead of atom for performance reasons
|
||||
//see /mob/verb/examinate() in mob.dm for more info
|
||||
//overridden here and in /mob/living for different point span classes and sanity checks
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
|
||||
|
||||
@@ -234,38 +234,44 @@
|
||||
var/obj/item/organ/O = X
|
||||
O.emp_act(severity)
|
||||
|
||||
///Adds to the parent by also adding functionality to propagate shocks through pulling and doing some fluff effects.
|
||||
/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if((flags & SHOCK_TESLA) && (flags_1 & TESLA_IGNORE_1))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
|
||||
return FALSE
|
||||
shock_damage *= siemens_coeff
|
||||
if(dna && dna.species)
|
||||
shock_damage *= dna.species.siemens_coeff
|
||||
if(shock_damage < 1)
|
||||
return 0
|
||||
if(reagents.has_reagent(/datum/reagent/teslium))
|
||||
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
|
||||
if((flags & SHOCK_ILLUSION))
|
||||
adjustStaminaLoss(shock_damage)
|
||||
else
|
||||
take_overall_damage(0,shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
jitteriness += 1000 //High numbers for violent convulsions
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
//Propagation through pulling, fireman carry
|
||||
if(!(flags & SHOCK_ILLUSION))
|
||||
var/list/shocking_queue = list()
|
||||
if(iscarbon(pulling) && source != pulling)
|
||||
shocking_queue += pulling
|
||||
if(iscarbon(pulledby) && source != pulledby)
|
||||
shocking_queue += pulledby
|
||||
if(iscarbon(buckled) && source != buckled)
|
||||
shocking_queue += buckled
|
||||
for(var/mob/living/carbon/carried in buckled_mobs)
|
||||
if(source != carried)
|
||||
shocking_queue += carried
|
||||
//Found our victims, now lets shock them all
|
||||
for(var/victim in shocking_queue)
|
||||
var/mob/living/carbon/C = victim
|
||||
C.electrocute_act(shock_damage*0.75, src, 1, flags)
|
||||
//Stun
|
||||
var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
|
||||
if(should_stun)
|
||||
Stun(40)
|
||||
//Jitter and other fluff.
|
||||
jitteriness += 1000
|
||||
do_jitter_animation(jitteriness)
|
||||
stuttering += 2
|
||||
if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN))
|
||||
Stun(40)
|
||||
spawn(20)
|
||||
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN))
|
||||
DefaultCombatKnockdown(60)
|
||||
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 20)
|
||||
return shock_damage
|
||||
|
||||
///Called slightly after electrocute act to reduce jittering and apply a secondary stun.
|
||||
/mob/living/carbon/proc/secondary_shock(should_stun)
|
||||
jitteriness = max(jitteriness - 990, 10)
|
||||
if(should_stun)
|
||||
DefaultCombatKnockdown(60)
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if(on_fire)
|
||||
to_chat(M, "<span class='warning'>You can't put [p_them()] out with just your bare hands!</span>")
|
||||
|
||||
@@ -348,40 +348,34 @@
|
||||
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
|
||||
|
||||
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
|
||||
///Calculates the siemens coeff based on clothing and species, can also restart hearts.
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if(flags & SHOCK_TESLA)
|
||||
var/total_coeff = 1
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if(G.siemens_coefficient <= 0)
|
||||
total_coeff -= 0.5
|
||||
//Calculates the siemens coeff based on clothing. Completely ignores the arguments
|
||||
if(flags & SHOCK_TESLA) //I hate this entire block. This gets the siemens_coeff for tesla shocks
|
||||
if(gloves && gloves.siemens_coefficient <= 0)
|
||||
siemens_coeff -= 0.5
|
||||
if(wear_suit)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
if(S.siemens_coefficient <= 0)
|
||||
total_coeff -= 0.95
|
||||
else if(S.siemens_coefficient == (-1))
|
||||
total_coeff -= 1
|
||||
siemens_coeff = total_coeff
|
||||
if(flags_1 & TESLA_IGNORE_1)
|
||||
siemens_coeff = 0
|
||||
else if(!(flags & SHOCK_NOGLOVES))
|
||||
var/gloves_siemens_coeff = 1
|
||||
if(wear_suit.siemens_coefficient == -1)
|
||||
siemens_coeff -= 1
|
||||
else if(wear_suit.siemens_coefficient <= 0)
|
||||
siemens_coeff -= 0.95
|
||||
siemens_coeff = max(siemens_coeff, 0)
|
||||
else if(!(flags & SHOCK_NOGLOVES)) //This gets the siemens_coeff for all non tesla shocks
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
gloves_siemens_coeff = G.siemens_coefficient
|
||||
siemens_coeff = gloves_siemens_coeff
|
||||
if(undergoing_cardiac_arrest() && !(flags & SHOCK_ILLUSION))
|
||||
if(shock_damage * siemens_coeff >= 1 && prob(25))
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
heart.beating = TRUE
|
||||
if(stat == CONSCIOUS)
|
||||
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
siemens_coeff *= gloves.siemens_coefficient
|
||||
siemens_coeff *= physiology.siemens_coeff
|
||||
. = ..()
|
||||
if(.)
|
||||
electrocution_animation(40)
|
||||
|
||||
//Don't go further if the shock was blocked/too weak.
|
||||
if(!.)
|
||||
return
|
||||
//Note we both check that the user is in cardiac arrest and can actually heartattack
|
||||
//If they can't, they're missing their heart and this would runtime
|
||||
if(undergoing_cardiac_arrest() && can_heartattack() && !(flags & SHOCK_ILLUSION))
|
||||
if(shock_damage * siemens_coeff >= 1 && prob(25))
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
if(heart.Restart() && stat == CONSCIOUS)
|
||||
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
electrocution_animation(40)
|
||||
|
||||
/mob/living/carbon/human/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -121,7 +121,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
return
|
||||
//Filth Reactions - Since miasma now exists
|
||||
var/filth_counter = 0 //Holder for the filth check cycle, basically contains how much filth dwarf sees numerically.
|
||||
for(var/fuck in owner.visible_atoms(7)) //hello byond for view loop.
|
||||
for(var/fuck in owner.fov_view(7)) //hello byond for view loop.
|
||||
if(istype(fuck, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = fuck
|
||||
if(H.stat == DEAD || (HAS_TRAIT(H, TRAIT_FAKEDEATH)))
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
stop_pulling()
|
||||
|
||||
//same as above
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
if(incapacitated())
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_DEATHCOMA))
|
||||
|
||||
@@ -412,21 +412,26 @@
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return 1
|
||||
|
||||
///As the name suggests, this should be called to apply electric shocks.
|
||||
/mob/living/proc/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage, source, siemens_coeff, flags)
|
||||
if((flags & SHOCK_TESLA) && (flags_1 & TESLA_IGNORE_1))
|
||||
shock_damage *= siemens_coeff
|
||||
if((flags & SHOCK_TESLA) && HAS_TRAIT(src, TRAIT_TESLA_SHOCKIMMUNE))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
|
||||
return FALSE
|
||||
if(shock_damage > 0)
|
||||
if(!(flags & SHOCK_ILLUSION))
|
||||
adjustFireLoss(shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
return shock_damage
|
||||
if(shock_damage < 1)
|
||||
return FALSE
|
||||
if(!(flags & SHOCK_ILLUSION))
|
||||
adjustFireLoss(shock_damage)
|
||||
else
|
||||
adjustStaminaLoss(shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='hear'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
return shock_damage
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
. = ..()
|
||||
@@ -509,7 +514,6 @@
|
||||
|
||||
/mob/living/proc/getBruteLoss_nonProsthetic()
|
||||
return getBruteLoss()
|
||||
|
||||
|
||||
/mob/living/proc/getFireLoss_nonProsthetic()
|
||||
return getFireLoss()
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in fov_view())
|
||||
..()
|
||||
if(!is_blind(src))
|
||||
chemscan(src, A)
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
mouse_opacity = 2
|
||||
density = TRUE
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
verb_say = "chitters"
|
||||
verb_ask = "chitters inquisitively"
|
||||
verb_exclaim = "chitters loudly"
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
// This loop will, at most, loop twice.
|
||||
for(var/atom/check in check_list)
|
||||
for(var/mob/living/M in get_actual_viewers(world.view + 1, check) - src)
|
||||
for(var/mob/living/M in fov_viewers(world.view + 1, check) - src)
|
||||
if(M.client && CanAttack(M) && !M.silicon_privileges)
|
||||
if(!M.eye_blind)
|
||||
return M
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in visible_atoms(1,src))
|
||||
for(var/mob/living/C in fov_view(1,src))
|
||||
if(C!=src && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
|
||||
@@ -319,12 +319,12 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
return
|
||||
|
||||
//view() but with a signal, to allow blacklisting some of the otherwise visible atoms.
|
||||
/mob/proc/visible_atoms(dist = world.view)
|
||||
/mob/proc/fov_view(dist = world.view)
|
||||
. = view(dist, src)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_VISIBLE_ATOMS, .)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_FOV_VIEW, .)
|
||||
|
||||
//mob verbs are faster than object verbs. See https://secure.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
|
||||
/mob/verb/examinate(atom/A as mob|obj|turf in visible_atoms()) //It used to be oview(12), but I can't really say why
|
||||
/mob/verb/examinate(atom/A as mob|obj|turf in fov_view()) //It used to be oview(12), but I can't really say why
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
|
||||
@@ -349,7 +349,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
//note: ghosts can point, this is intended
|
||||
//visible_message will handle invisibility properly
|
||||
//overridden here and in /mob/dead/observer for different point span classes and sanity checks
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon = 'icons/obj/power_cond/cables.dmi'
|
||||
icon_state = "0-1"
|
||||
level = 1 //is underfloor
|
||||
plane = ABOVE_WALL_PLANE
|
||||
layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER
|
||||
anchored = TRUE
|
||||
obj_flags = CAN_BE_HIT | ON_BLUEPRINTS
|
||||
|
||||
@@ -39,9 +39,9 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
if(prob(20))
|
||||
set_broken()
|
||||
|
||||
/obj/machinery/gravity_generator/tesla_act(power, tesla_flags)
|
||||
/obj/machinery/gravity_generator/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
|
||||
|
||||
/obj/machinery/gravity_generator/update_icon_state()
|
||||
|
||||
@@ -687,9 +687,9 @@
|
||||
on = TRUE
|
||||
update()
|
||||
|
||||
/obj/machinery/light/tesla_act(power, tesla_flags)
|
||||
if(tesla_flags & TESLA_MACHINE_EXPLOSIVE)
|
||||
explosion(src,0,0,0,flame_range = 5, adminlog = 0)
|
||||
/obj/machinery/light/zap_act(power, zap_flags)
|
||||
if(zap_flags & ZAP_MACHINE_EXPLOSIVE)
|
||||
explosion(src,0,0,0,flame_range = 5, adminlog = FALSE)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
/obj/machinery/power/rtg/abductor/fire_act(exposed_temperature, exposed_volume)
|
||||
overload()
|
||||
|
||||
/obj/machinery/power/rtg/abductor/tesla_act()
|
||||
..() //extend the zap
|
||||
overload()
|
||||
/obj/machinery/power/rtg/abductor/zap_act(power, zap_flags, shocked_objects)
|
||||
. = ..() //extend the zap
|
||||
if(zap_flags & ZAP_MACHINE_EXPLOSIVE)
|
||||
overload()
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
|
||||
/obj/singularity/narsie/mezzer()
|
||||
for(var/mob/living/carbon/M in get_actual_viewers(consume_range, src))
|
||||
for(var/mob/living/carbon/M in fov_viewers(consume_range, src))
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(!iscultist(M))
|
||||
to_chat(M, "<span class='cultsmall'>You feel conscious thought crumble away in an instant as you gaze upon [src.name]...</span>")
|
||||
|
||||
@@ -433,7 +433,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
env.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
for(var/mob/living/carbon/human/l in get_actual_viewers(HALLUCINATION_RANGE(power), src)) // If they can see it without mesons on. Bad on them.
|
||||
for(var/mob/living/carbon/human/l in fov_viewers(HALLUCINATION_RANGE(power), src)) // If they can see it without mesons on. Bad on them.
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
|
||||
var/D = sqrt(1 / max(1, get_dist(l, src)))
|
||||
l.hallucination += power * config_hallucination_power * D
|
||||
@@ -666,7 +666,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
|
||||
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
||||
radiation_pulse(src, 3000, 2, TRUE)
|
||||
var/list/viewers = get_actual_viewers(world.view, src)
|
||||
var/list/viewers = fov_viewers(world.view, src)
|
||||
for(var/mob/living/L in range(10))
|
||||
investigate_log("has irradiated [key_name(L)] after consuming [AM].", INVESTIGATE_SUPERMATTER)
|
||||
if(L in viewers)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/tesla_coil/tesla_act(power, tesla_flags, shocked_targets)
|
||||
/obj/machinery/power/tesla_coil/zap_act(power, zap_flags, shocked_targets)
|
||||
if(anchored && !panel_open)
|
||||
obj_flags |= BEING_SHOCKED
|
||||
//don't lose arc power when it's not connected to anything
|
||||
@@ -81,17 +81,17 @@
|
||||
var/power_produced = powernet ? power / power_loss : power
|
||||
add_avail(power_produced*input_power_multiplier)
|
||||
flick("coilhit", src)
|
||||
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 5, power_produced, tesla_flags, shocked_targets)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
|
||||
if(D)
|
||||
D.adjust_money(min(power_produced, 1))
|
||||
if(istype(linked_techweb))
|
||||
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 1)) // x4 coils = ~240/m point bonus for R&D
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
tesla_buckle_check(power)
|
||||
zap_buckle_check(power)
|
||||
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
return power_produced
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/tesla_coil/proc/zap()
|
||||
if((last_zap + zap_cooldown) > world.time || !powernet)
|
||||
@@ -102,8 +102,8 @@
|
||||
var/power = (powernet.avail/2)
|
||||
add_load(power)
|
||||
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 10, power/(coeff/2), TESLA_FUSION_FLAGS)
|
||||
tesla_buckle_check(power/(coeff/2))
|
||||
tesla_zap(src, 10, power/(coeff/2), ZAP_FUSION_FLAGS)
|
||||
zap_buckle_check(power/(coeff/2))
|
||||
|
||||
// Tesla R&D researcher
|
||||
/obj/machinery/power/tesla_coil/research
|
||||
@@ -113,23 +113,23 @@
|
||||
circuit = /obj/item/circuitboard/machine/tesla_coil/research
|
||||
power_loss = 20 // something something, high voltage + resistance
|
||||
|
||||
/obj/machinery/power/tesla_coil/research/tesla_act(power, tesla_flags, shocked_things)
|
||||
/obj/machinery/power/tesla_coil/research/zap_act(power, zap_flags, shocked_targets)
|
||||
if(anchored && !panel_open)
|
||||
obj_flags |= BEING_SHOCKED
|
||||
var/power_produced = powernet ? power / power_loss : power
|
||||
add_avail(power_produced*input_power_multiplier)
|
||||
flick("rpcoilhit", src)
|
||||
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 5, power_produced, tesla_flags, shocked_things)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
|
||||
if(D)
|
||||
D.adjust_money(min(power_produced, 3))
|
||||
if(istype(linked_techweb))
|
||||
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 3)) // x4 coils with a pulse per second or so = ~720/m point bonus for R&D
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
tesla_buckle_check(power)
|
||||
zap_buckle_check(power)
|
||||
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
return power_produced
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/tesla_coil/research/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
|
||||
. = ..()
|
||||
@@ -180,9 +180,10 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/grounding_rod/tesla_act(var/power)
|
||||
/obj/machinery/power/grounding_rod/zap_act(var/power)
|
||||
if(anchored && !panel_open)
|
||||
flick("grounding_rodhit", src)
|
||||
tesla_buckle_check(power)
|
||||
zap_buckle_check(power)
|
||||
return 0
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#define TESLA_DEFAULT_POWER 1738260
|
||||
#define TESLA_MINI_POWER 869130
|
||||
//Zap constants, speeds up targeting
|
||||
#define BIKE (COIL + 1)
|
||||
#define COIL (ROD + 1)
|
||||
#define ROD (RIDE + 1)
|
||||
#define RIDE (LIVING + 1)
|
||||
#define LIVING (MACHINERY + 1)
|
||||
#define MACHINERY (BLOB + 1)
|
||||
#define BLOB (STRUCTURE + 1)
|
||||
#define STRUCTURE (1)
|
||||
|
||||
/obj/singularity/energy_ball
|
||||
name = "energy ball"
|
||||
@@ -32,6 +41,9 @@
|
||||
/obj/singularity/energy_ball/ex_act(severity, target)
|
||||
return
|
||||
|
||||
/obj/singularity/energy_ball/consume(severity, target)
|
||||
return
|
||||
|
||||
/obj/singularity/energy_ball/Destroy()
|
||||
if(orbiting && istype(orbiting.parent, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/EB = orbiting.parent
|
||||
@@ -39,7 +51,7 @@
|
||||
|
||||
for(var/ball in orbiting_balls)
|
||||
var/obj/singularity/energy_ball/EB = ball
|
||||
qdel(EB)
|
||||
QDEL_NULL(EB)
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -55,12 +67,12 @@
|
||||
|
||||
move_the_basket_ball(4 + orbiting_balls.len * 1.5)
|
||||
|
||||
playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, 1, extrarange = 30)
|
||||
playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, TRUE, extrarange = 30)
|
||||
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
tesla_zap(src, 7, TESLA_DEFAULT_POWER, TRUE)
|
||||
tesla_zap(src, 7, TESLA_DEFAULT_POWER)
|
||||
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
@@ -73,7 +85,7 @@
|
||||
/obj/singularity/energy_ball/examine(mob/user)
|
||||
. = ..()
|
||||
if(orbiting_balls.len)
|
||||
. += "The amount of orbiting mini-balls is [orbiting_balls.len]."
|
||||
. += "There are [orbiting_balls.len] mini-balls orbiting it."
|
||||
|
||||
|
||||
/obj/singularity/energy_ball/proc/move_the_basket_ball(var/move_amount)
|
||||
@@ -96,7 +108,7 @@
|
||||
energy_to_lower = energy_to_raise - 20
|
||||
energy_to_raise = energy_to_raise * 1.25
|
||||
|
||||
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, 1, extrarange = 30)
|
||||
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, TRUE, extrarange = 30)
|
||||
addtimer(CALLBACK(src, .proc/new_mini_ball), 100)
|
||||
|
||||
else if(energy < energy_to_lower && orbiting_balls.len)
|
||||
@@ -132,22 +144,19 @@
|
||||
/obj/singularity/energy_ball/attack_tk(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
log_game("[key_name(C)] has been disintegrated by a telekenetic grab on a tesla ball.</span>")
|
||||
to_chat(C, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
|
||||
C.visible_message("<span class='userdanger'>A bright flare of lightning is seen from [C]'s head, shortly before you hear a sickening sizzling!</span>")
|
||||
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
|
||||
rip_u.Remove()
|
||||
C.ghostize(0)
|
||||
qdel(rip_u)
|
||||
return
|
||||
return ..()
|
||||
C.death()
|
||||
|
||||
/obj/singularity/energy_ball/orbit(obj/singularity/energy_ball/target)
|
||||
if (istype(target))
|
||||
target.orbiting_balls += src
|
||||
GLOB.poi_list -= src
|
||||
target.dissipate_strength = target.orbiting_balls.len
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/singularity/energy_ball/stop_orbit()
|
||||
if (orbiting && istype(orbiting.parent, /obj/singularity/energy_ball))
|
||||
var/obj/singularity/energy_ball/orbitingball = orbiting.parent
|
||||
@@ -171,20 +180,19 @@
|
||||
var/mob/living/carbon/C = A
|
||||
C.dust()
|
||||
|
||||
/proc/tesla_zap(atom/source, zap_range = 3, power, tesla_flags = TESLA_DEFAULT_FLAGS, list/shocked_targets)
|
||||
/proc/tesla_zap(atom/source, zap_range = 3, power, zap_flags = ZAP_DEFAULT_FLAGS, list/shocked_targets)
|
||||
if(QDELETED(source))
|
||||
return
|
||||
. = source.dir
|
||||
if(power < 1000)
|
||||
return
|
||||
|
||||
var/closest_dist = 0
|
||||
var/closest_atom
|
||||
var/obj/machinery/power/tesla_coil/closest_tesla_coil
|
||||
var/obj/machinery/power/grounding_rod/closest_grounding_rod
|
||||
var/mob/living/closest_mob
|
||||
var/obj/machinery/closest_machine
|
||||
var/obj/structure/closest_structure
|
||||
var/obj/structure/blob/closest_blob
|
||||
var/static/things_to_shock = typecacheof(list(/obj/machinery, /mob/living, /obj/structure))
|
||||
/*
|
||||
THIS IS SO FUCKING UGLY AND I HATE IT, but I can't make it nice without making it slower, check*N rather then n. So we're stuck with it.
|
||||
*/
|
||||
var/atom/closest_atom
|
||||
var/closest_type = 0
|
||||
var/static/things_to_shock = typecacheof(list(/obj/machinery, /mob/living, /obj/structure, /obj/vehicle/ridden))
|
||||
var/static/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
|
||||
/obj/machinery/power/emitter,
|
||||
/obj/machinery/field/generator,
|
||||
@@ -205,112 +213,133 @@
|
||||
/obj/machinery/gateway,
|
||||
/obj/structure/lattice,
|
||||
/obj/structure/grille,
|
||||
/obj/machinery/the_singularitygen/tesla,
|
||||
/obj/structure/frame/machine))
|
||||
|
||||
for(var/A in typecache_filter_multi_list_exclusion(oview(source, zap_range+2), things_to_shock, blacklisted_tesla_types))
|
||||
if(!(tesla_flags & TESLA_ALLOW_DUPLICATES) && LAZYACCESS(shocked_targets, A))
|
||||
//Ok so we are making an assumption here. We assume that view() still calculates from the center out.
|
||||
//This means that if we find an object we can assume it is the closest one of its type. This is somewhat of a speed increase.
|
||||
//This also means we have no need to track distance, as the doview() proc does it all for us.
|
||||
|
||||
//Darkness fucks oview up hard. I've tried dview() but it doesn't seem to work
|
||||
//I hate existance
|
||||
for(var/a in typecache_filter_multi_list_exclusion(oview(zap_range+2, source), things_to_shock, blacklisted_tesla_types))
|
||||
var/atom/A = a
|
||||
if(!(zap_flags & ZAP_ALLOW_DUPLICATES) && LAZYACCESS(shocked_targets, A))
|
||||
continue
|
||||
if(closest_type >= BIKE)
|
||||
break
|
||||
|
||||
if(istype(A, /obj/machinery/power/tesla_coil))
|
||||
var/dist = get_dist(source, A)
|
||||
var/obj/machinery/power/tesla_coil/C = A
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_tesla_coil) && !(C.obj_flags & BEING_SHOCKED))
|
||||
closest_dist = dist
|
||||
|
||||
else if(istype(A, /obj/vehicle/ridden/bicycle))//God's not on our side cause he hates idiots.
|
||||
var/obj/vehicle/ridden/bicycle/B = A
|
||||
if(!(B.obj_flags & BEING_SHOCKED) && B.can_buckle)//Gee goof thanks for the boolean
|
||||
//we use both of these to save on istype and typecasting overhead later on
|
||||
//while still allowing common code to run before hand
|
||||
closest_tesla_coil = C
|
||||
closest_atom = C
|
||||
closest_type = BIKE
|
||||
closest_atom = B
|
||||
|
||||
|
||||
else if(closest_tesla_coil)
|
||||
else if(closest_type >= COIL)
|
||||
continue //no need checking these other things
|
||||
|
||||
else if(istype(A, /obj/machinery/power/grounding_rod))
|
||||
var/dist = get_dist(source, A)-2
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_grounding_rod))
|
||||
closest_grounding_rod = A
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
else if(istype(A, /obj/machinery/power/tesla_coil))
|
||||
var/obj/machinery/power/tesla_coil/C = A
|
||||
if(!(C.obj_flags & BEING_SHOCKED))
|
||||
closest_type = COIL
|
||||
closest_atom = C
|
||||
|
||||
else if(closest_grounding_rod)
|
||||
else if(closest_type >= ROD)
|
||||
continue
|
||||
|
||||
else if(istype(A, /obj/machinery/power/grounding_rod))
|
||||
closest_type = ROD
|
||||
closest_atom = A
|
||||
|
||||
else if(closest_type >= RIDE)
|
||||
continue
|
||||
|
||||
else if(istype(A,/obj/vehicle/ridden))
|
||||
var/obj/vehicle/ridden/R = A
|
||||
if(R.can_buckle && !(R.obj_flags & BEING_SHOCKED))
|
||||
closest_type = RIDE
|
||||
closest_atom = A
|
||||
|
||||
else if(closest_type >= LIVING)
|
||||
continue
|
||||
|
||||
else if(isliving(A))
|
||||
var/dist = get_dist(source, A)
|
||||
var/mob/living/L = A
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !(L.flags_1 & TESLA_IGNORE_1))
|
||||
closest_mob = L
|
||||
if(L.stat != DEAD && !(HAS_TRAIT(L, TRAIT_TESLA_SHOCKIMMUNE)) && !(L.flags_1 & SHOCKED_1))
|
||||
closest_type = LIVING
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
else if(closest_mob)
|
||||
else if(closest_type >= MACHINERY)
|
||||
continue
|
||||
|
||||
else if(ismachinery(A))
|
||||
var/obj/machinery/M = A
|
||||
var/dist = get_dist(source, A)
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_machine) && !(M.obj_flags & BEING_SHOCKED))
|
||||
closest_machine = M
|
||||
if(!(M.obj_flags & BEING_SHOCKED))
|
||||
closest_type = MACHINERY
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
else if(closest_mob)
|
||||
else if(closest_type >= BLOB)
|
||||
continue
|
||||
|
||||
else if(istype(A, /obj/structure/blob))
|
||||
var/obj/structure/blob/B = A
|
||||
var/dist = get_dist(source, A)
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_tesla_coil) && !(B.obj_flags & BEING_SHOCKED))
|
||||
closest_blob = B
|
||||
if(!(B.obj_flags & BEING_SHOCKED))
|
||||
closest_type = BLOB
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
else if(closest_blob)
|
||||
else if(closest_type >= STRUCTURE)
|
||||
continue
|
||||
|
||||
else if(isstructure(A))
|
||||
var/obj/structure/S = A
|
||||
var/dist = get_dist(source, A)
|
||||
if(dist <= zap_range && (dist < closest_dist || !closest_tesla_coil) && !(S.obj_flags & BEING_SHOCKED))
|
||||
closest_structure = S
|
||||
if(!(S.obj_flags & BEING_SHOCKED))
|
||||
closest_type = STRUCTURE
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
//Alright, we've done our loop, now lets see if was anything interesting in range
|
||||
if(closest_atom)
|
||||
//common stuff
|
||||
source.Beam(closest_atom, icon_state="lightning[rand(1,12)]", time=5, maxdistance = INFINITY)
|
||||
if(!(tesla_flags & TESLA_ALLOW_DUPLICATES))
|
||||
LAZYSET(shocked_targets, closest_atom, TRUE)
|
||||
var/zapdir = get_dir(source, closest_atom)
|
||||
if(zapdir)
|
||||
. = zapdir
|
||||
if(!closest_atom)
|
||||
return
|
||||
//common stuff
|
||||
source.Beam(closest_atom, icon_state="lightning[rand(1,12)]", time=5, maxdistance = INFINITY)
|
||||
if(!(zap_flags & ZAP_ALLOW_DUPLICATES))
|
||||
LAZYSET(shocked_targets, closest_atom, TRUE)
|
||||
var/zapdir = get_dir(source, closest_atom)
|
||||
if(zapdir)
|
||||
. = zapdir
|
||||
|
||||
//per type stuff:
|
||||
if(closest_tesla_coil)
|
||||
closest_tesla_coil.tesla_act(power, tesla_flags, shocked_targets)
|
||||
var/next_range = 3
|
||||
if(closest_type == COIL)
|
||||
next_range = 5
|
||||
|
||||
else if(closest_grounding_rod)
|
||||
closest_grounding_rod.tesla_act(power, tesla_flags, shocked_targets)
|
||||
|
||||
else if(closest_mob)
|
||||
var/shock_damage = (tesla_flags & TESLA_MOB_DAMAGE)? (min(round(power/600), 90) + rand(-5, 5)) : 0
|
||||
closest_mob.electrocute_act(shock_damage, source, 1, SHOCK_TESLA | ((tesla_flags & TESLA_MOB_STUN) ? NONE : SHOCK_NOSTUN))
|
||||
if(closest_type == LIVING)
|
||||
var/mob/living/closest_mob = closest_atom
|
||||
closest_mob.set_shocked()
|
||||
addtimer(CALLBACK(closest_mob, /mob/living/proc/reset_shocked), 10)
|
||||
var/shock_damage = (zap_flags & ZAP_MOB_DAMAGE) ? (min(round(power/600), 90) + rand(-5, 5)) : 0
|
||||
closest_mob.electrocute_act(shock_damage, source, 1, SHOCK_TESLA | ((zap_flags & ZAP_MOB_STUN) ? NONE : SHOCK_NOSTUN))
|
||||
if(issilicon(closest_mob))
|
||||
var/mob/living/silicon/S = closest_mob
|
||||
if((tesla_flags & TESLA_MOB_STUN) && (tesla_flags & TESLA_MOB_DAMAGE))
|
||||
if((zap_flags & ZAP_MOB_STUN) && (zap_flags & ZAP_MOB_DAMAGE))
|
||||
S.emp_act(EMP_LIGHT)
|
||||
tesla_zap(S, 7, power / 1.5, tesla_flags, shocked_targets) // metallic folks bounce it further
|
||||
next_range = 7 // metallic folks bounce it further
|
||||
else
|
||||
tesla_zap(closest_mob, 5, power / 1.5, tesla_flags, shocked_targets)
|
||||
next_range = 5
|
||||
power /= 1.5
|
||||
|
||||
else if(closest_machine)
|
||||
closest_machine.tesla_act(power, tesla_flags, shocked_targets)
|
||||
else
|
||||
power = closest_atom.zap_act(power, zap_flags, shocked_targets)
|
||||
if(prob(20))//I know I know
|
||||
tesla_zap(closest_atom, next_range, power * 0.5, zap_flags, shocked_targets)
|
||||
tesla_zap(closest_atom, next_range, power * 0.5, zap_flags, shocked_targets)
|
||||
else
|
||||
tesla_zap(closest_atom, next_range, power, zap_flags, shocked_targets)
|
||||
|
||||
else if(closest_blob)
|
||||
closest_blob.tesla_act(power, tesla_flags, shocked_targets)
|
||||
|
||||
else if(closest_structure)
|
||||
closest_structure.tesla_act(power, tesla_flags, shocked_targets)
|
||||
#undef BIKE
|
||||
#undef COIL
|
||||
#undef ROD
|
||||
#undef RIDE
|
||||
#undef LIVING
|
||||
#undef MACHINERY
|
||||
#undef BLOB
|
||||
#undef STRUCTURE
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
icon_state = "TheSingGen"
|
||||
creation_type = /obj/singularity/energy_ball
|
||||
|
||||
/obj/machinery/the_singularitygen/tesla/tesla_act(power, tesla_flags)
|
||||
if(tesla_flags & TESLA_MACHINE_EXPLOSIVE)
|
||||
/obj/machinery/the_singularitygen/tesla/zap_act(power, zap_flags)
|
||||
if(zap_flags & ZAP_MACHINE_EXPLOSIVE)
|
||||
energy += power
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
else
|
||||
BB.def_zone = user.zone_selected
|
||||
BB.suppressed = quiet
|
||||
|
||||
if(isgun(fired_from))
|
||||
var/obj/item/gun/G = fired_from
|
||||
BB.damage *= G.projectile_damage_multiplier
|
||||
|
||||
if(reagents && BB.reagents)
|
||||
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
var/datum/action/item_action/toggle_scope_zoom/azoom
|
||||
|
||||
var/dualwield_spread_mult = 1 //dualwield spread multiplier
|
||||
|
||||
/// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun.
|
||||
var/projectile_damage_multiplier = 1
|
||||
|
||||
/obj/item/gun/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "tesla_projectile"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
var/chain
|
||||
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE
|
||||
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
|
||||
var/zap_range = 3
|
||||
var/power = 10000
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/item/projectile/energy/tesla/on_hit(atom/target)
|
||||
. = ..()
|
||||
tesla_zap(target, zap_range, power, tesla_flags)
|
||||
tesla_zap(target, zap_range, power, zap_flags)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/energy/tesla/Destroy()
|
||||
|
||||
@@ -437,9 +437,9 @@
|
||||
speed = 0.3
|
||||
flag = "magic"
|
||||
|
||||
var/tesla_power = 20000
|
||||
var/tesla_range = 15
|
||||
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_MOB_STUN | TESLA_OBJ_DAMAGE
|
||||
var/zap_power = 20000
|
||||
var/zap_range = 15
|
||||
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_MOB_STUN | ZAP_OBJ_DAMAGE
|
||||
var/chain
|
||||
var/mob/living/caster
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
visible_message("<span class='warning'>[src] fizzles on contact with [target]!</span>")
|
||||
qdel(src)
|
||||
return BULLET_ACT_BLOCK
|
||||
tesla_zap(src, tesla_range, tesla_power, tesla_flags)
|
||||
tesla_zap(src, zap_range, zap_power, zap_flags)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/magic/aoe/lightning/Destroy()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(M == hal_target)
|
||||
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
|
||||
hal_apply_effect()
|
||||
else if(M in hal_target.visible_atoms())
|
||||
else if(M in hal_target.fov_view())
|
||||
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
|
||||
if(damage_type == BRUTE)
|
||||
var/splatter_dir = dir
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
|
||||
|
||||
var/list/seen = get_actual_viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/list/seen = fov_viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/iconhtml = icon2html(cached_my_atom, seen)
|
||||
if(cached_my_atom)
|
||||
if(!ismob(cached_my_atom)) // No bubbling mobs
|
||||
|
||||
@@ -227,6 +227,18 @@
|
||||
playsound(M, "sparks", 50, 1)
|
||||
..()
|
||||
|
||||
/datum/reagent/teslium/on_mob_metabolize(mob/living/carbon/human/L)
|
||||
. = ..()
|
||||
if(!istype(L))
|
||||
return
|
||||
L.physiology.siemens_coeff *= 2
|
||||
|
||||
/datum/reagent/teslium/on_mob_end_metabolize(mob/living/carbon/human/L)
|
||||
. = ..()
|
||||
if(!istype(L))
|
||||
return
|
||||
L.physiology.siemens_coeff *= 0.5
|
||||
|
||||
/datum/reagent/teslium/energized_jelly
|
||||
name = "Energized Jelly"
|
||||
description = "Electrically-charged jelly. Boosts jellypeople's nervous system, but only shocks other lifeforms."
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
noexplosion = TRUE
|
||||
mix_message = "<span class='boldannounce'>The teslium starts to spark as electricity arcs away from it!</span>"
|
||||
mix_sound = 'sound/machines/defib_zap.ogg'
|
||||
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN
|
||||
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/on_reaction(datum/reagents/holder, multiplier)
|
||||
var/T1 = multiplier * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
|
||||
@@ -437,15 +437,15 @@
|
||||
var/T3 = multiplier * 120
|
||||
sleep(5)
|
||||
if(multiplier >= 75)
|
||||
tesla_zap(holder.my_atom, 7, T1, tesla_flags)
|
||||
tesla_zap(holder.my_atom, 7, T1, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
if(multiplier >= 40)
|
||||
tesla_zap(holder.my_atom, 7, T2, tesla_flags)
|
||||
tesla_zap(holder.my_atom, 7, T2, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
if(multiplier >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
|
||||
tesla_zap(holder.my_atom, 7, T3, tesla_flags)
|
||||
tesla_zap(holder.my_atom, 7, T3, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
..()
|
||||
|
||||
|
||||
@@ -120,9 +120,10 @@
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
/obj/structure/reagent_dispensers/fueltank/zap_act(power, zap_flags, shocked_objects)
|
||||
..() //extend the zap
|
||||
boom()
|
||||
if(ZAP_OBJ_DAMAGE & zap_flags)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
|
||||
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
|
||||
plane = ABOVE_WALL_PLANE
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
var/dpdir = NONE // bitmask of pipe directions
|
||||
var/initialize_dirs = NONE // bitflags of pipe directions added on init, see \code\_DEFINES\pipe_construction.dm
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
base_icon_state = "lightning"
|
||||
sound = 'sound/magic/lightningbolt.ogg'
|
||||
active = FALSE
|
||||
projectile_var_overrides = list("tesla_range" = 15, "tesla_power" = 20000, "tesla_flags" = TESLA_MOB_DAMAGE)
|
||||
projectile_var_overrides = list("zap_range" = 15, "zap_power" = 20000, "zap_flags" = ZAP_MOB_DAMAGE)
|
||||
active_msg = "You energize your hand with arcane lightning!"
|
||||
deactive_msg = "You let the energy flow out of your hands back into yourself..."
|
||||
projectile_type = /obj/item/projectile/magic/aoe/lightning
|
||||
|
||||
@@ -32,13 +32,11 @@
|
||||
name = "Grounded Nerves"
|
||||
desc = "Nerves form a safe path for electricity to traverse, protecting the body from electric shocks."
|
||||
mod_type = BIOWARE_NERVES
|
||||
var/prev_coeff
|
||||
|
||||
/datum/bioware/grounded_nerves/on_gain()
|
||||
..()
|
||||
prev_coeff = owner.physiology.siemens_coeff
|
||||
owner.physiology.siemens_coeff = 0
|
||||
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "grounded_nerves")
|
||||
|
||||
/datum/bioware/grounded_nerves/on_lose()
|
||||
..()
|
||||
owner.physiology.siemens_coeff = prev_coeff
|
||||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "grounded_nerves")
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
* return UI_state The state of the UI.
|
||||
**/
|
||||
/mob/living/proc/shared_living_ui_distance(atom/movable/src_object)
|
||||
if(!(src_object in visible_atoms())) // If the object is obscured, close it.
|
||||
if(!(src_object in fov_view())) // If the object is obscured, close it.
|
||||
return UI_CLOSE
|
||||
|
||||
var/dist = get_dist(src_object, src)
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
buckled_mob.stop_sound_channel(CHANNEL_BICYCLE)
|
||||
. =..()
|
||||
|
||||
/obj/vehicle/ridden/bicycle/tesla_act() // :::^^^)))
|
||||
/obj/vehicle/ridden/bicycle/zap_act(zap_str, zap_flags, shocked_targets) // :::^^^)))
|
||||
//This didn't work for 3 years because none ever tested it I hate life
|
||||
name = "fried bicycle"
|
||||
desc = "Well spent."
|
||||
color = rgb(63, 23, 4)
|
||||
can_buckle = FALSE
|
||||
. = ..()
|
||||
for(var/m in buckled_mobs)
|
||||
unbuckle_mob(m,1)
|
||||
|
||||
@@ -77,3 +77,7 @@
|
||||
if(!force && occupant_amount() >= max_occupants)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/ridden/zap_act(zap_str, zap_flags, shocked_targets)
|
||||
zap_buckle_check(zap_str)
|
||||
. = ..()
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
/obj/item/reagent_containers/food/condiment/saltshaker = 5,
|
||||
/obj/item/reagent_containers/food/condiment/peppermill = 5)
|
||||
contraband = list(
|
||||
/obj/item/reagent_containers/food/snacks/cube/monkey= 1,
|
||||
/obj/item/kitchen/knife/butcher = 2,
|
||||
/obj/item/reagent_containers/syringe = 3)
|
||||
premium = list(
|
||||
/obj/item/reagent_containers/food/condiment/enzyme = 1,
|
||||
/obj/item/reagent_containers/glass/bottle/cryoxadone = 2) // Bartender can literally make this with upgraded parts, or it gets stolen from medical.
|
||||
/obj/item/reagent_containers/food/condiment/enzyme = 1)
|
||||
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
|
||||
refill_canister = /obj/item/vending_refill/dinnerware
|
||||
resistance_flags = FIRE_PROOF
|
||||
@@ -35,4 +33,4 @@
|
||||
cost_multiplier_per_dept = list(ACCOUNT_SRV = 0)
|
||||
|
||||
/obj/item/vending_refill/dinnerware
|
||||
icon_state = "refill_cook"
|
||||
icon_state = "refill_cook"
|
||||
|
||||
@@ -542,7 +542,7 @@
|
||||
if (!(R in contents))
|
||||
return // User is not in this belly
|
||||
|
||||
R.setClickCooldown(50)
|
||||
R.changeNext_move(CLICK_CD_BREAKOUT*0.5)
|
||||
|
||||
if(owner.stat) //If owner is stat (dead, KO) we can actually escape
|
||||
to_chat(R,"<span class='warning'>You attempt to climb out of \the [lowertext(name)]. (This will take around [escapetime/10] seconds.)</span>")
|
||||
|
||||
@@ -358,6 +358,9 @@
|
||||
if(incapacitated(ignore_restraints = TRUE))
|
||||
to_chat(src, "<span class='warning'>You can't do that while incapacitated.</span>")
|
||||
return
|
||||
if(next_move > world.time)
|
||||
to_chat(src, "<span class='warning'>You can't do that so fast, slow down.</span>")
|
||||
return
|
||||
|
||||
var/list/choices
|
||||
for(var/mob/living/L in view(1))
|
||||
@@ -372,7 +375,7 @@
|
||||
if(QDELETED(tasted) || (tasted.ckey && !(tasted.client?.prefs.vore_flags & LICKABLE)) || !Adjacent(tasted) || incapacitated(ignore_restraints = TRUE))
|
||||
return
|
||||
|
||||
setClickCooldown(100)
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
visible_message("<span class='warning'>[src] licks [tasted]!</span>","<span class='notice'>You lick [tasted]. They taste rather like [tasted.get_taste_message()].</span>","<b>Slurp!</b>")
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user