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:
@@ -22,6 +22,11 @@
|
||||
sparks.set_up(2,0)
|
||||
sparks.attach(src)
|
||||
update_icon()
|
||||
new_occupant_dir = dir
|
||||
|
||||
/obj/machinery/vr_sleeper/setDir(newdir)
|
||||
. = ..()
|
||||
new_occupant_dir = dir
|
||||
|
||||
/obj/machinery/vr_sleeper/attackby(obj/item/I, mob/user, params)
|
||||
if(!state_open && !occupant)
|
||||
|
||||
@@ -106,6 +106,7 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/show_tip,
|
||||
/client/proc/smite,
|
||||
/client/proc/admin_away,
|
||||
/client/proc/cmd_admin_toggle_fov,
|
||||
/client/proc/roll_dices //CIT CHANGE - Adds dice verb
|
||||
))
|
||||
GLOBAL_PROTECT(admin_verbs_fun)
|
||||
|
||||
@@ -1218,6 +1218,58 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_toggle_fov()
|
||||
set category = "Fun"
|
||||
set name = "Enable/Disable Field of Vision"
|
||||
|
||||
var/static/busy_toggling_fov = FALSE
|
||||
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/on_off = CONFIG_GET(flag/use_field_of_vision)
|
||||
|
||||
if(busy_toggling_fov)
|
||||
to_chat(usr, "<span class='warning'>A previous call of this function is still busy toggling FoV [on_off ? "on" : "off"]. Have some patiece</span>.")
|
||||
return
|
||||
busy_toggling_fov = TRUE
|
||||
|
||||
log_admin("[key_name(usr)] has [on_off ? "disabled" : "enabled"] the Field of Vision configuration.")
|
||||
CONFIG_SET(flag/use_field_of_vision, !on_off)
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Field of Vision", "[on_off ? "Enabled" : "Disabled"]"))
|
||||
|
||||
if(on_off)
|
||||
for(var/k in GLOB.mob_list)
|
||||
if(!k)
|
||||
continue
|
||||
var/mob/M = k
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!(H.dna?.species.has_field_of_vision))
|
||||
continue
|
||||
else if(!M.has_field_of_vision)
|
||||
continue
|
||||
var/datum/component/field_of_vision/FoV = M.GetComponent(/datum/component/field_of_vision)
|
||||
if(FoV)
|
||||
qdel(FoV)
|
||||
CHECK_TICK
|
||||
else
|
||||
for(var/k in GLOB.clients)
|
||||
if(!k)
|
||||
continue
|
||||
var/client/C = k
|
||||
var/mob/M = C.mob
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!(H.dna?.species.has_field_of_vision))
|
||||
continue
|
||||
else if(!M.has_field_of_vision)
|
||||
continue
|
||||
M.LoadComponent(/datum/component/field_of_vision, M.field_of_vision_type)
|
||||
CHECK_TICK
|
||||
|
||||
busy_toggling_fov = FALSE
|
||||
|
||||
/client/proc/smite(mob/living/carbon/human/target as mob)
|
||||
set name = "Smite"
|
||||
set category = "Fun"
|
||||
|
||||
@@ -328,8 +328,8 @@
|
||||
// to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
|
||||
// useLock = FALSE
|
||||
// return
|
||||
user.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
|
||||
target.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
|
||||
user.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
|
||||
target.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
|
||||
target.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, TRUE)
|
||||
target.Jitter(25)
|
||||
target.emote("laugh")
|
||||
@@ -490,13 +490,14 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/process()
|
||||
if(lit)
|
||||
for(var/mob/living/carbon/human/H in 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
|
||||
H.hallucination = 20
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "vampcandle", /datum/mood_event/vampcandle)
|
||||
if(!lit)
|
||||
return
|
||||
for(var/mob/living/carbon/human/H in get_actual_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
|
||||
H.hallucination = 20
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "vampcandle", /datum/mood_event/vampcandle)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OTHER THINGS TO USE: HUMAN BLOOD. /obj/effect/decal/cleanable/blood
|
||||
|
||||
|
||||
@@ -19,10 +19,9 @@
|
||||
if(!.)
|
||||
return
|
||||
// must have nobody around to see the cloak
|
||||
for(var/mob/living/M in viewers(9, owner))
|
||||
if(M != owner)
|
||||
to_chat(owner, "<span class='warning'>You may only vanish into the shadows unseen.</span>")
|
||||
return FALSE
|
||||
for(var/mob/living/M in get_actual_viewers(9, owner) - owner)
|
||||
to_chat(owner, "<span class='warning'>You may only vanish into the shadows unseen.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/bloodsucker/cloak/ActivatePower()
|
||||
@@ -35,7 +34,7 @@
|
||||
// Pay Blood Toll (if awake)
|
||||
owner.alpha = max(35, owner.alpha - min(75, 10 + 5 * level_current))
|
||||
bloodsuckerdatum.AddBloodVolume(-0.2)
|
||||
|
||||
|
||||
runintent = (user.m_intent == MOVE_INTENT_RUN)
|
||||
var/turf/T = get_turf(user)
|
||||
lum = T.get_lumcount()
|
||||
@@ -50,7 +49,7 @@
|
||||
if(!runintent)
|
||||
user.toggle_move_intent()
|
||||
REMOVE_TRAIT(user, TRAIT_NORUNNING, "cloak of darkness")
|
||||
|
||||
|
||||
sleep(5) // Check every few ticks
|
||||
|
||||
/datum/action/bloodsucker/cloak/ContinueActive(mob/living/user, mob/living/target)
|
||||
|
||||
@@ -169,8 +169,8 @@
|
||||
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 viewers(notice_range, owner))
|
||||
if(M != owner && M != target && iscarbon(M) && M.mind && !M.silicon_privileges && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
for(var/mob/living/M in get_actual_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
|
||||
if(was_unnoticed)
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
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 viewers(get_turf(owner)))
|
||||
if(M != owner && isliving(M) && M.mind && !M.silicon_privileges && !M.eye_blind) // M.client <--- add this in after testing!
|
||||
for(var/mob/living/M in get_actual_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))
|
||||
drop_item = TRUE
|
||||
|
||||
@@ -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(!(target in viewers(target_range, get_turf(owner))))
|
||||
if(!(owner in target.visible_atoms()))
|
||||
// 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 view(10, get_turf(L)))) // They Woke Up! (Notice if within view)
|
||||
if(istype(L) && target.stat == CONSCIOUS && (target in L.visible_atoms(10))) // They Woke Up! (Notice if within view)
|
||||
to_chat(L, "<span class='warning'>[target] has snapped out of their trance.</span>")
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
sight = SEE_SELF
|
||||
throwforce = 0
|
||||
blood_volume = 0
|
||||
has_field_of_vision = FALSE //we are a spoopy ghost
|
||||
|
||||
see_in_dark = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
desc = "A machine that monitors atmosphere levels. Goes off if the area is dangerous."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "alarm0"
|
||||
plane = ABOVE_WALL_PLANE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 4
|
||||
active_power_usage = 8
|
||||
|
||||
@@ -902,23 +902,27 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
new_size = "15x15"
|
||||
//END OF CIT CHANGES
|
||||
|
||||
var/list/old_view = getviewsize(view)
|
||||
view = new_size
|
||||
apply_clickcatcher()
|
||||
var/list/actualview = getviewsize(view)
|
||||
apply_clickcatcher(actualview)
|
||||
mob.reload_fullscreen()
|
||||
if (isliving(mob))
|
||||
var/mob/living/M = mob
|
||||
M.update_damage_hud()
|
||||
if (prefs.auto_fit_viewport)
|
||||
fit_viewport()
|
||||
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_CHANGE_VIEW, src, old_view, actualview)
|
||||
|
||||
/client/proc/generate_clickcatcher()
|
||||
if(!void)
|
||||
void = new()
|
||||
screen += void
|
||||
|
||||
/client/proc/apply_clickcatcher()
|
||||
/client/proc/apply_clickcatcher(list/actualview)
|
||||
generate_clickcatcher()
|
||||
var/list/actualview = getviewsize(view)
|
||||
if(!actualview)
|
||||
actualview = getviewsize(view)
|
||||
void.UpdateGreed(actualview[1],actualview[2])
|
||||
|
||||
/client/proc/AnnouncePR(announcement)
|
||||
|
||||
@@ -2385,8 +2385,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("ambientocclusion")
|
||||
ambientocclusion = !ambientocclusion
|
||||
if(parent && parent.screen && parent.screen.len)
|
||||
var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen
|
||||
var/obj/screen/plane_master/game_world/PM = parent.mob.hud_used.plane_masters["[GAME_PLANE]"]
|
||||
var/obj/screen/plane_master/wall/W = parent.mob.hud_used.plane_masters["[WALL_PLANE]"]
|
||||
PM.backdrop(parent.mob)
|
||||
W.backdrop(parent.mob)
|
||||
|
||||
if("auto_fit_viewport")
|
||||
auto_fit_viewport = !auto_fit_viewport
|
||||
|
||||
@@ -915,8 +915,8 @@
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
energy_overlay.plane = ABOVE_LIGHTING_LAYER
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", EMISSIVE_LAYER)
|
||||
energy_overlay.plane = EMISSIVE_PLANE
|
||||
energy_overlay.color = energy_color
|
||||
. += energy_overlay
|
||||
|
||||
@@ -946,8 +946,8 @@
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
energy_overlay.plane = ABOVE_LIGHTING_LAYER
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", EMISSIVE_LAYER)
|
||||
energy_overlay.plane = EMISSIVE_PLANE
|
||||
energy_overlay.color = energy_color
|
||||
. += energy_overlay
|
||||
|
||||
|
||||
@@ -679,9 +679,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
var/list/mob/living/carbon/people = list()
|
||||
var/mob/living/carbon/person = null
|
||||
var/datum/language/understood_language = target.get_random_understood_language()
|
||||
for(var/mob/living/carbon/H in view(target))
|
||||
if(H == target)
|
||||
continue
|
||||
for(var/mob/living/carbon/H in view(target) - target)
|
||||
if(!person)
|
||||
person = H
|
||||
else
|
||||
@@ -1064,6 +1062,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/hallucination/danger
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
var/image/image
|
||||
|
||||
/obj/effect/hallucination/danger/proc/show_icon()
|
||||
@@ -1087,7 +1087,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
name = "lava"
|
||||
|
||||
/obj/effect/hallucination/danger/lava/show_icon()
|
||||
image = image('icons/turf/floors/lava.dmi',src,"smooth",TURF_LAYER)
|
||||
image = image('icons/turf/floors/lava.dmi',src,"smooth",layer)
|
||||
image.plane = plane
|
||||
if(target.client)
|
||||
target.client.images += image
|
||||
|
||||
@@ -1257,7 +1258,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
..()
|
||||
if(!target.halbody)
|
||||
var/list/possible_points = list()
|
||||
for(var/turf/open/floor/F in view(target,world.view))
|
||||
for(var/turf/open/floor/F in target.visible_atoms(world.view))
|
||||
possible_points += F
|
||||
if(possible_points.len)
|
||||
var/turf/open/floor/husk_point = pick(possible_points)
|
||||
@@ -1288,7 +1289,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
set waitfor = FALSE
|
||||
..()
|
||||
var/list/turf/startlocs = list()
|
||||
for(var/turf/open/T in view(world.view+1,target)-view(world.view,target))
|
||||
for(var/turf/open/T in target.visible_atoms(world.view+1)-view(world.view,target))
|
||||
startlocs += T
|
||||
if(!startlocs.len)
|
||||
qdel(src)
|
||||
|
||||
@@ -873,3 +873,8 @@
|
||||
pixel_x = -31
|
||||
if(WEST)
|
||||
pixel_x = 31
|
||||
plane = ABOVE_WALL_PLANE
|
||||
|
||||
/obj/item/electronic_assembly/wallmount/Moved(atom/OldLoc, Dir, Forced = FALSE) //reset the plane if moved off the wall.
|
||||
. = ..()
|
||||
plane = GAME_PLANE
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -12,6 +12,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!"
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "newscaster_normal"
|
||||
plane = ABOVE_WALL_PLANE
|
||||
verb_say = "beeps"
|
||||
verb_ask = "beeps"
|
||||
verb_exclaim = "beeps"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/machinery/power/apc
|
||||
name = "area power controller"
|
||||
desc = "A control terminal for the area's electrical systems."
|
||||
|
||||
plane = ABOVE_WALL_PLANE
|
||||
icon_state = "apc0"
|
||||
use_power = NO_POWER_USE
|
||||
req_access = null
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
|
||||
/obj/singularity/narsie/mezzer()
|
||||
for(var/mob/living/carbon/M in viewers(consume_range, src))
|
||||
for(var/mob/living/carbon/M in get_actual_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 view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them.
|
||||
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.
|
||||
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,9 +666,10 @@ 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)
|
||||
for(var/mob/living/L in range(10))
|
||||
investigate_log("has irradiated [key_name(L)] after consuming [AM].", INVESTIGATE_SUPERMATTER)
|
||||
if(L in view())
|
||||
if(L in viewers)
|
||||
L.show_message("<span class='danger'>As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", MSG_VISUAL,\
|
||||
"<span class='danger'>The unearthly ringing subsides and you notice you have new radiation burns.</span>", MSG_AUDIBLE)
|
||||
else
|
||||
|
||||
@@ -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 view(hal_target))
|
||||
else if(M in hal_target.visible_atoms())
|
||||
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 = viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/list/seen = get_actual_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
|
||||
@@ -617,10 +617,7 @@
|
||||
handle_reactions()
|
||||
update_total()
|
||||
//Reaction sounds and words
|
||||
var/list/seen = viewers(5, get_turf(my_atom))
|
||||
var/iconhtml = icon2html(my_atom, seen)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [C.mix_message]</span>")
|
||||
my_atom.visible_message("<span class='notice'>[icon2html(my_atom, viewers(DEFAULT_MESSAGE_RANGE, src))] [C.mix_message]</span>")
|
||||
|
||||
/datum/reagents/proc/fermiReact(selected_reaction, cached_temp, cached_pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier)
|
||||
var/datum/chemical_reaction/C = selected_reaction
|
||||
|
||||
@@ -765,7 +765,9 @@
|
||||
/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 20 && current_cycle%20 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"],
|
||||
M.hud_used.plane_masters["[LIGHTING_PLANE]"], M.hud_used.plane_masters["[WALL_PLANE]"],
|
||||
M.hud_used.plane_masters["[ABOVE_WALL_PLANE]"])
|
||||
var/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
@@ -793,15 +795,17 @@
|
||||
/*
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 5 && current_cycle % 3 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/matrix/skew = matrix()
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"],
|
||||
M.hud_used.plane_masters["[LIGHTING_PLANE]"], M.hud_used.plane_masters["[WALL_PLANE]"],
|
||||
M.hud_used.plane_masters["[ABOVE_WALL_PLANE]"]) var/matrix/skew = matrix()
|
||||
var/intensity = 8
|
||||
skew.set_skew(rand(-intensity,intensity), rand(-intensity,intensity))
|
||||
var/matrix/newmatrix = skew
|
||||
|
||||
if(prob(33)) // 1/3rd of the time, let's make it stack with the previous matrix! Mwhahahaha!
|
||||
var/obj/screen/plane_master/PM = M.hud_used.plane_masters["[GAME_PLANE]"]
|
||||
newmatrix = skew * PM.transform
|
||||
for(var/whole_screen in screens)
|
||||
var/obj/screen/plane_master/PM = whole_screen
|
||||
newmatrix = skew * PM.transform
|
||||
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = newmatrix, time = 5, easing = QUAD_EASING, loop = -1)
|
||||
|
||||
@@ -440,9 +440,8 @@
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, multiplier)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out foam!</span>")
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
location.visible_message("<span class='danger'>The solution spews out foam!</span>")
|
||||
var/datum/effect_system/foam_spread/s = new()
|
||||
s.set_up(multiplier*2, location, holder)
|
||||
s.start()
|
||||
@@ -457,11 +456,8 @@
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, multiplier)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out a metallic foam!</span>")
|
||||
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
location.visible_message("<span class='danger'>The solution spews out a metallic foam!</span>")
|
||||
var/datum/effect_system/foam_spread/metal/s = new()
|
||||
s.set_up(multiplier*5, location, holder, 1)
|
||||
s.start()
|
||||
@@ -488,9 +484,8 @@
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, multiplier)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out a metallic foam!</span>")
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
location.visible_message("<span class='danger'>The solution spews out metallic foam!</span>")
|
||||
var/datum/effect_system/foam_spread/metal/s = new()
|
||||
s.set_up(multiplier*5, location, holder, 2)
|
||||
s.start()
|
||||
|
||||
@@ -160,11 +160,8 @@
|
||||
/obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
reagents.expose_temperature(1000)
|
||||
if(container_flags & TEMP_WEAK)
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/H in seen)
|
||||
to_chat(H, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
visible_message("<span class='notice'>[icon2html(src, viewers(DEFAULT_MESSAGE_RANGE, src))] [src]'s melts from the temperature!</span>")
|
||||
playsound(src, 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
@@ -184,7 +181,7 @@
|
||||
if((reagents.pH < 1.5) || (reagents.pH > 12.5))
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if((reagents.pH < -3) || (reagents.pH > 17))
|
||||
visible_message("<span class='notice'>[icon2html(src, viewers(src))] \The [src] is damaged by the super pH and begins to deform!</span>")
|
||||
visible_message("<span class='notice'>[icon2html(src, viewers(DEFAULT_MESSAGE_RANGE, src))] \The [src] is damaged by the super pH and begins to deform!</span>")
|
||||
reagents.pH = clamp(reagents.pH, -3, 17)
|
||||
container_HP -= 1
|
||||
|
||||
@@ -221,15 +218,11 @@
|
||||
|
||||
container_HP -= damage
|
||||
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
|
||||
var/damage_percent = ((container_HP / initial(container_HP)*100))
|
||||
switch(damage_percent)
|
||||
if(-INFINITY to 0)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts [cause]!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
|
||||
visible_message("<span class='notice'>[icon2html(src, viewers(DEFAULT_MESSAGE_RANGE, src))] [src]'s melts [cause]!</span>")
|
||||
playsound(src, 'sound/FermiChem/acidmelt.ogg', 80, 1)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
@@ -246,5 +239,4 @@
|
||||
|
||||
update_icon()
|
||||
if(prob(25))
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s is damaged by [cause] and begins to deform!</span>")
|
||||
visible_message("<span class='notice'>[icon2html(src, viewers(DEFAULT_MESSAGE_RANGE, src))] [src]'s is damaged by [cause] and begins to deform!</span>")
|
||||
|
||||
@@ -72,9 +72,8 @@
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dissolve [src] in [target].</span>")
|
||||
for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius
|
||||
to_chat(O, "<span class='warning'>[user] slips something into [target]!</span>")
|
||||
user.visible_message("<span class='warning'>[user] slips something into [target]!</span>",
|
||||
"<span class='notice'>You dissolve [src] in [target].</span>", vision_distance = 2)
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -169,6 +169,7 @@
|
||||
name = "pepper spray refiller"
|
||||
desc = "Contains condensed capsaicin for use in law \"enforcement.\""
|
||||
icon_state = "pepper"
|
||||
plane = ABOVE_WALL_PLANE
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
reagent_id = /datum/reagent/consumable/condensedcapsaicin
|
||||
@@ -182,6 +183,7 @@
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
plane = ABOVE_WALL_PLANE
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
reagent_id = /datum/reagent/consumable/virus_food
|
||||
|
||||
@@ -9,6 +9,7 @@ GLOBAL_DATUM_INIT(keycard_events, /datum/events, new)
|
||||
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "auth_off"
|
||||
plane = ABOVE_WALL_PLANE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
|
||||
@@ -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 view(src))) // If the object is obscured, close it.
|
||||
if(!(src_object in visible_atoms())) // If the object is obscured, close it.
|
||||
return UI_CLOSE
|
||||
|
||||
var/dist = get_dist(src_object, src)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/vehicle/sealed
|
||||
var/enter_delay = 20
|
||||
flags_1 = BLOCK_FACE_ATOM_1
|
||||
|
||||
/obj/vehicle/sealed/generate_actions()
|
||||
. = ..()
|
||||
@@ -51,7 +52,7 @@
|
||||
if(randomstep)
|
||||
var/turf/target_turf = get_step(exit_location(M), pick(GLOB.cardinals))
|
||||
M.throw_at(target_turf, 5, 10)
|
||||
|
||||
|
||||
if(!silent)
|
||||
M.visible_message("<span class='notice'>[M] drops out of \the [src]!</span>")
|
||||
return TRUE
|
||||
@@ -102,7 +103,13 @@
|
||||
if(iscarbon(i))
|
||||
var/mob/living/carbon/C = i
|
||||
C.DefaultCombatKnockdown(40)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/vehicle/sealed/AllowDrop()
|
||||
return FALSE
|
||||
|
||||
/obj/vehicle/sealed/setDir(newdir)
|
||||
. = ..()
|
||||
for(var/k in occupants)
|
||||
var/mob/M = k
|
||||
M.setDir(newdir)
|
||||
|
||||
Reference in New Issue
Block a user