Field of Vision component. (#12075)
* Hopeless WIP for vision cones. * Core component and hooks done * Removing clutter. * linter bashing me for using statements as args. * Ok. * continue * bring back the macro * Configs and openspace filter. * Chat plane, reset perspective signal, mechs/vehicles cases, machineries. * view, viewers and spoopy ghosts. * Renamed component, admin fun button and snowflakes robots. * Whoopsie. * Yikes * test merge tweak. * radial yaketi sax. * Fixed tgui UIs, some messages not displayed to the target. * Documentation and a little bugfix. * Pulling QoL, seventh plane made in this PR. * Fix. * Tweaks and improvements. * Update randomverbs.dm
This commit is contained in:
@@ -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 view())
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
if(!B)
|
||||
return
|
||||
forceMove(B.loc)
|
||||
src.client.eye = src
|
||||
reset_perspective(src)
|
||||
src.visible_message("<span class='warning'><B>[src] rises out of the pool of blood!</B></span>")
|
||||
exit_blood_effect(B)
|
||||
if(iscarbon(src))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
var/emp_damage = 0//Handles a type of MMI damage
|
||||
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
|
||||
stat = DEAD //we start dead by default
|
||||
has_field_of_vision = FALSE //Not really worth it.
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM) //for mechas
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
/// Enable stamina combat
|
||||
combat_flags = COMBAT_FLAGS_DEFAULT
|
||||
status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH|CANSTAGGER
|
||||
has_field_of_vision = FALSE //Handled by species.
|
||||
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/mob/living/carbon/human/Login()
|
||||
..()
|
||||
if(dna?.species?.has_field_of_vision && CONFIG_GET(flag/use_field_of_vision))
|
||||
LoadComponent(/datum/component/field_of_vision, field_of_vision_type)
|
||||
@@ -10,6 +10,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
|
||||
|
||||
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
|
||||
var/has_field_of_vision = TRUE
|
||||
|
||||
//Species Icon Drawing Offsets - Pixel X, Pixel Y, Aka X = Horizontal and Y = Vertical, from bottom left corner
|
||||
var/list/offset_features = list(
|
||||
@@ -331,6 +332,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(mutant_bodyparts["meat_type"]) //I can't believe it's come to the meat
|
||||
H.type_of_meat = GLOB.meat_types[H.dna.features["meat_type"]]
|
||||
|
||||
if(H.client && has_field_of_vision && CONFIG_GET(flag/use_field_of_vision))
|
||||
H.LoadComponent(/datum/component/field_of_vision, H.field_of_vision_type)
|
||||
|
||||
C.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/species, TRUE, multiplicative_slowdown = speedmod)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
|
||||
@@ -364,6 +368,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
C.dna.mutation_index[location] = new_species.inert_mutation
|
||||
C.dna.mutation_index[new_species.inert_mutation] = create_sequence(new_species.inert_mutation)
|
||||
|
||||
if(!new_species.has_field_of_vision && has_field_of_vision && ishuman(C) && CONFIG_GET(flag/use_field_of_vision))
|
||||
var/datum/component/field_of_vision/F = GetComponent(/datum/component/field_of_vision)
|
||||
if(F)
|
||||
qdel(F)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
|
||||
|
||||
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
@@ -1544,9 +1553,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
else if(aim_for_mouth && ( target_on_help || target_restrained || target_aiming_for_mouth))
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
|
||||
user.visible_message(\
|
||||
"<span class='danger'>\The [user] slaps \the [target] in the face!</span>",\
|
||||
"<span class='notice'>You slap [user == target ? "yourself" : "\the [target]"] in the face! </span>",\
|
||||
target.visible_message(\
|
||||
"<span class='warning'>\The [user] slaps \the [target] in the face!</span>",\
|
||||
"<span class='danger'>You [user == target ? "slap yourself" : "are slapped by \the [target]"] in the face! </span>",\
|
||||
"You hear a slap."
|
||||
)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP)
|
||||
@@ -1566,9 +1575,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if (!HAS_TRAIT(target, TRAIT_PERMABONER))
|
||||
stop_wagging_tail(target)
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message(\
|
||||
target.visible_message(\
|
||||
"<span class='danger'>\The [user] slaps \the [target]'s ass!</span>",\
|
||||
"<span class='notice'>You slap [user == target ? "your" : "\the [target]'s"] ass!</span>",\
|
||||
"<span class='danger'>You slap [user == target ? "slap your" : "are slapped by \the [target]'s in the"] ass!</span>",\
|
||||
"You hear a slap."
|
||||
)
|
||||
return FALSE
|
||||
@@ -1864,19 +1873,19 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/targetatrest = !CHECK_MOBILITY(target, MOBILITY_STAND)
|
||||
if((directional_blocked || !(target_collateral_human || target_shove_turf.shove_act(target, user))) && !targetatrest)
|
||||
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_SOLID)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name], knocking them down!</span>",
|
||||
"<span class='danger'>You shove [target.name], knocking them down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.visible_message("<span class='danger'>[user.name] shoves [target.name], knocking them down!</span>",
|
||||
"<span class='danger'>You are shoved by [user.name] and knocked down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(user, target, "shoved", "knocking them down")
|
||||
else if(target_collateral_human && !targetatrest)
|
||||
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_HUMAN)
|
||||
target_collateral_human.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_COLLATERAL)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name] into [target_collateral_human.name]!</span>",
|
||||
"<span class='danger'>You shove [target.name] into [target_collateral_human.name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.visible_message("<span class='danger'>[user.name] shoves [target.name] into [target_collateral_human.name]!</span>",
|
||||
"<span class='danger'>You are shoved by [user.name] into [target_collateral_human.name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
append_message += ", into [target_collateral_human.name]"
|
||||
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name]!</span>",
|
||||
"<span class='danger'>You shove [target.name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.visible_message("<span class='danger'>[user.name] shoves [target.name]!</span>",
|
||||
"<span class='danger'>You are shoved by [user.name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
var/obj/item/target_held_item = target.get_active_held_item()
|
||||
if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types))
|
||||
target_held_item = null
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
blacklisted = TRUE
|
||||
limbs_id = "human"
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/human
|
||||
has_field_of_vision = FALSE //Too much of a trouble, their vision is already bound to their severed head.
|
||||
var/pumpkin = FALSE
|
||||
|
||||
var/obj/item/dullahan_relay/myhead
|
||||
@@ -132,13 +133,13 @@
|
||||
return INITIALIZE_HINT_QDEL
|
||||
owner = new_owner
|
||||
START_PROCESSING(SSobj, src)
|
||||
RegisterSignal(owner, COMSIG_CLICK_SHIFT, .proc/examinate_check)
|
||||
RegisterSignal(owner, COMSIG_MOB_CLICKED_SHIFT_ON, .proc/examinate_check)
|
||||
RegisterSignal(src, COMSIG_ATOM_HEARER_IN_VIEW, .proc/include_owner)
|
||||
RegisterSignal(owner, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head)
|
||||
RegisterSignal(owner, COMSIG_LIVING_REVIVE, .proc/retrieve_head)
|
||||
|
||||
/obj/item/dullahan_relay/proc/examinate_check(atom/source, mob/user)
|
||||
if(user.client.eye == src)
|
||||
/obj/item/dullahan_relay/proc/examinate_check(mob/source, atom/target)
|
||||
if(source.client.eye == src)
|
||||
return COMPONENT_ALLOW_EXAMINATE
|
||||
|
||||
/obj/item/dullahan_relay/proc/include_owner(datum/source, list/processing_list, list/hearers)
|
||||
|
||||
@@ -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 view(owner,7)) //hello byond for view loop.
|
||||
for(var/fuck in owner.visible_atoms(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 view())
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
if(incapacitated())
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_DEATHCOMA))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
see_in_dark = 2
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD,NANITE_HUD,DIAG_NANITE_FULL_HUD,RAD_HUD)
|
||||
pressure_resistance = 10
|
||||
has_field_of_vision = TRUE
|
||||
|
||||
typing_indicator_enabled = TRUE
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
sec_hud = DATA_HUD_SECURITY_BASIC
|
||||
d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
has_field_of_vision = FALSE //Vision through cameras.
|
||||
var/list/network = list("ss13")
|
||||
var/obj/machinery/camera/current
|
||||
var/list/connected_robots = list()
|
||||
@@ -868,30 +869,33 @@
|
||||
light_cameras()
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
if(client)
|
||||
if(ismovable(A))
|
||||
if(A != GLOB.ai_camera_room_landmark)
|
||||
end_multicam()
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
if(!client)
|
||||
return
|
||||
if(ismovable(A))
|
||||
if(A != GLOB.ai_camera_room_landmark)
|
||||
end_multicam()
|
||||
if(isturf(loc))
|
||||
if(eyeobj)
|
||||
client.eye = eyeobj
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
else
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
end_multicam()
|
||||
if(isturf(loc))
|
||||
if(eyeobj)
|
||||
client.eye = eyeobj
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
update_sight()
|
||||
if(client.eye != src)
|
||||
var/atom/AT = client.eye
|
||||
AT.get_remote_view_fullscreens(src)
|
||||
else
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
update_sight()
|
||||
if(client.eye != src)
|
||||
var/atom/AT = client.eye
|
||||
AT.get_remote_view_fullscreens(src)
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_RESET_PERSPECTIVE, A)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/ai/revive(full_heal = 0, admin_revive = 0)
|
||||
. = ..()
|
||||
|
||||
@@ -57,3 +57,5 @@
|
||||
cut_overlays()
|
||||
else
|
||||
icon_state = "[module.cyborg_base_icon]"
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ROBOT_UPDATE_ICONS)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "ghost"
|
||||
icon_living = "ghost"
|
||||
mob_biotypes = MOB_SPIRIT
|
||||
has_field_of_vision = FALSE //we are a spoopy ghost
|
||||
attacktext = "raises the hairs on the neck of"
|
||||
response_harm = "disrupts the concentration of"
|
||||
response_disarm = "wafts"
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in view())
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in visible_atoms())
|
||||
..()
|
||||
if(!is_blind(src))
|
||||
chemscan(src, A)
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
icon_state = "alienq"
|
||||
icon_living = "alienq"
|
||||
icon_dead = "alienq_dead"
|
||||
pixel_x = -16
|
||||
threat = 8
|
||||
health = 250
|
||||
maxHealth = 250
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
status_flags = 0
|
||||
a_intent = INTENT_HARM
|
||||
gender = NEUTER
|
||||
has_field_of_vision = FALSE //You are a frikkin boss
|
||||
var/list/boss_abilities = list() //list of /datum/action/boss
|
||||
var/datum/boss_active_timed_battle/atb
|
||||
var/point_regen_delay = 1
|
||||
|
||||
@@ -27,3 +27,4 @@
|
||||
|
||||
faction = list("spooky")
|
||||
del_on_death = 1
|
||||
field_of_vision_type = FOV_270_DEGREES //Obviously, it's one eyeball.
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
see_in_dark = 4
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
has_field_of_vision = FALSE // 360° vision.
|
||||
var/playable_spider = FALSE
|
||||
var/datum/action/innate/spider/lay_web/lay_web
|
||||
var/directive = "" //Message passed down to children, to relay the creator's orders
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/multiply_chance = 0 //if we multiply on hit
|
||||
del_on_death = 1
|
||||
deathmessage = "vanishes into thin air! It was a fake!"
|
||||
has_field_of_vision = FALSE //not meant to be played anyway.
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/illusion/Life()
|
||||
|
||||
@@ -232,6 +232,7 @@ Difficulty: Hard
|
||||
density = FALSE
|
||||
faction = list("mining", "boss")
|
||||
weather_immunities = list("lava","ash")
|
||||
has_field_of_vision = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/slaughter/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum))
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1 | HEAR_1
|
||||
has_field_of_vision = FALSE //You are a frikkin boss
|
||||
/// Crusher loot dropped when fauna killed with a crusher
|
||||
var/list/crusher_loot
|
||||
var/medal_type
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
crusher_loot = /obj/item/crusher_trophy/watcher_wing
|
||||
loot = list()
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1)
|
||||
field_of_vision_type = FOV_270_DEGREES //Obviously, it's one eyeball.
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
layer = LARGE_MOB_LAYER
|
||||
sentience_type = SENTIENCE_BOSS
|
||||
hud_type = /datum/hud/lavaland_elite
|
||||
has_field_of_vision = FALSE //You are a frikkin mini-boss
|
||||
var/chosen_attack = 1
|
||||
var/list/attack_action_types = list()
|
||||
var/can_talk = FALSE
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
pressure_resistance = 300
|
||||
gold_core_spawnable = NO_SPAWN //too spooky for science
|
||||
blood_volume = 0
|
||||
has_field_of_vision = FALSE
|
||||
var/ghost_hair_style
|
||||
var/ghost_hair_color
|
||||
var/mutable_appearance/ghost_hair
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
obj_damage = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
del_on_death = 0
|
||||
has_field_of_vision = FALSE //Legacy. Also they only have one dir visually.
|
||||
|
||||
do_footstep = TRUE
|
||||
|
||||
|
||||
@@ -125,14 +125,10 @@
|
||||
|
||||
// This loop will, at most, loop twice.
|
||||
for(var/atom/check in check_list)
|
||||
for(var/mob/living/M in viewers(world.view + 1, check) - src)
|
||||
for(var/mob/living/M in get_actual_viewers(world.view + 1, check) - src)
|
||||
if(M.client && CanAttack(M) && !M.silicon_privileges)
|
||||
if(!M.eye_blind)
|
||||
return M
|
||||
for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
|
||||
if(M.occupant && M.occupant.client)
|
||||
if(!M.occupant.eye_blind)
|
||||
return M.occupant
|
||||
return null
|
||||
|
||||
// Cannot talk
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
del_on_death = TRUE
|
||||
initial_language_holder = /datum/language_holder/construct
|
||||
blood_volume = 0
|
||||
has_field_of_vision = FALSE //we are a spoopy ghost
|
||||
|
||||
/mob/living/simple_animal/shade/death()
|
||||
deathmessage = "lets out a contented sigh as [p_their()] form unwinds."
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
for(var/mob/living/C in visible_atoms(1,src))
|
||||
if(C!=src && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/mob/living/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/final_pixel_y = pixel_y
|
||||
var/final_dir = dir
|
||||
var/changed = 0
|
||||
if(lying != lying_prev && rotate_on_lying)
|
||||
changed++
|
||||
@@ -14,7 +13,7 @@
|
||||
pixel_y = get_standard_pixel_y_offset()
|
||||
final_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
if(dir & (EAST|WEST)) //Facing east or west
|
||||
final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass
|
||||
setDir(pick(NORTH, SOUTH)) //So you fall on your side rather than your face or ass
|
||||
|
||||
if(resize != RESIZE_DEFAULT_SIZE)
|
||||
changed++
|
||||
@@ -22,5 +21,5 @@
|
||||
resize = RESIZE_DEFAULT_SIZE
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
|
||||
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, easing = EASE_IN|EASE_OUT)
|
||||
setMovetype(movement_type & ~FLOATING) // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
|
||||
|
||||
@@ -55,3 +55,5 @@
|
||||
log_message("Client [key_name(src)] has taken ownership of mob [src]([src.type])", LOG_OWNERSHIP)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGIN, client)
|
||||
|
||||
if(has_field_of_vision && CONFIG_GET(flag/use_field_of_vision))
|
||||
LoadComponent(/datum/component/field_of_vision, field_of_vision_type)
|
||||
|
||||
+41
-29
@@ -148,7 +148,8 @@
|
||||
msg = blind_message
|
||||
else if(T.lighting_object && T.lighting_object.invisibility <= M.see_invisible && T.is_softly_lit() && !in_range(T,M)) //the light object is dark and not invisible to us, darkness does not matter if you're directly next to the target
|
||||
msg = blind_message
|
||||
|
||||
else if(SEND_SIGNAL(M, COMSIG_MOB_GET_VISIBLE_MESSAGE, src, message, vision_distance, ignored_mobs) & COMPONENT_NO_VISIBLE_MESSAGE)
|
||||
msg = blind_message
|
||||
if(!msg)
|
||||
continue
|
||||
M.show_message(msg, MSG_VISUAL,blind_message, MSG_AUDIBLE)
|
||||
@@ -282,41 +283,48 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
// reset_perspective(thing) set the eye to the thing (if it's equal to current default reset to mob perspective)
|
||||
// reset_perspective() set eye to common default : mob on turf, loc otherwise
|
||||
/mob/proc/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(A)
|
||||
if(ismovable(A))
|
||||
//Set the the thing unless it's us
|
||||
if(A != src)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else if(isturf(A))
|
||||
//Set to the turf unless it's our current turf
|
||||
if(A != loc)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
if(!client)
|
||||
return
|
||||
if(A)
|
||||
if(ismovable(A))
|
||||
//Set the the thing unless it's us
|
||||
if(A != src)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
//Do nothing
|
||||
else
|
||||
//Reset to common defaults: mob if on turf, otherwise current loc
|
||||
if(isturf(loc))
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
else if(isturf(A))
|
||||
//Set to the turf unless it's our current turf
|
||||
if(A != loc)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
return 1
|
||||
client.eye = A
|
||||
else
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
//Do nothing
|
||||
else
|
||||
//Reset to common defaults: mob if on turf, otherwise current loc
|
||||
if(isturf(loc))
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
SEND_SIGNAL(src, COMSIG_MOB_RESET_PERSPECTIVE, A)
|
||||
return TRUE
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
return
|
||||
|
||||
//view() but with a signal, to allow blacklisting some of the otherwise visible atoms.
|
||||
/mob/proc/visible_atoms(dist = world.view)
|
||||
. = view(dist, src)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_VISIBLE_ATOMS, .)
|
||||
|
||||
//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 view()) //It used to be oview(12), but I can't really say why
|
||||
/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
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
|
||||
@@ -329,15 +337,19 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
return
|
||||
|
||||
face_atom(A)
|
||||
var/flags = SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A)
|
||||
if(flags & COMPONENT_DENY_EXAMINATE)
|
||||
if(flags & COMPONENT_EXAMINATE_BLIND)
|
||||
to_chat(src, "<span class='warning'>Something is there but you can't see it!</span>")
|
||||
return
|
||||
var/list/result = A.examine(src)
|
||||
to_chat(src, result.Join("\n"))
|
||||
SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A)
|
||||
|
||||
//same as above
|
||||
//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 view())
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
|
||||
@@ -131,8 +131,9 @@
|
||||
|
||||
var/voluntary_ghosted = FALSE //whether or not they voluntarily ghosted.
|
||||
|
||||
var/flavor_text = ""
|
||||
var/flavor_text_2 = "" //version of the above that only lasts for the current round.
|
||||
var/has_field_of_vision = FALSE
|
||||
var/field_of_vision_type = FOV_90_DEGREES
|
||||
|
||||
|
||||
///////TYPING INDICATORS///////
|
||||
/// Set to true if we want to show typing indicators.
|
||||
|
||||
@@ -100,7 +100,8 @@
|
||||
if(mob.throwing)
|
||||
mob.throwing.finalize(FALSE)
|
||||
|
||||
if(L.pulling && !(L.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
|
||||
var/atom/movable/AM = L.pulling
|
||||
if(AM && AM.density && !(L.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && !ismob(AM))
|
||||
L.setDir(turn(L.dir, 180))
|
||||
|
||||
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOVE, src, direction, n, oldloc)
|
||||
|
||||
@@ -88,18 +88,20 @@
|
||||
/mob/proc/add_eyeblur()
|
||||
if(!client)
|
||||
return
|
||||
var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen
|
||||
var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen
|
||||
GW.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
|
||||
F.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
|
||||
var/list/screens = list(hud_used.plane_masters["[GAME_PLANE]"], hud_used.plane_masters["[FLOOR_PLANE]"],
|
||||
hud_used.plane_masters["[WALL_PLANE]"], hud_used.plane_masters["[ABOVE_WALL_PLANE]"])
|
||||
for(var/A in screens)
|
||||
var/obj/screen/plane_master/P = A
|
||||
P.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
|
||||
|
||||
/mob/proc/remove_eyeblur()
|
||||
if(!client)
|
||||
return
|
||||
var/obj/screen/plane_master/game_world/GW = locate(/obj/screen/plane_master/game_world) in client.screen
|
||||
var/obj/screen/plane_master/floor/F = locate(/obj/screen/plane_master/floor) in client.screen
|
||||
GW.remove_filter("blurry_eyes")
|
||||
F.remove_filter("blurry_eyes")
|
||||
var/list/screens = list(hud_used.plane_masters["[GAME_PLANE]"], hud_used.plane_masters["[FLOOR_PLANE]"],
|
||||
hud_used.plane_masters["[WALL_PLANE]"], hud_used.plane_masters["[ABOVE_WALL_PLANE]"])
|
||||
for(var/A in screens)
|
||||
var/obj/screen/plane_master/P = A
|
||||
P.remove_filter("blurry_eyes")
|
||||
|
||||
///Adjust the drugginess of a mob
|
||||
/mob/proc/adjust_drugginess(amount)
|
||||
|
||||
Reference in New Issue
Block a user