mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Better spider eyes and more perception goodness (#29935)
* How come we still aren't making use of plane masters beyond parallax and noir? * better
This commit is contained in:
@@ -309,3 +309,28 @@ var/noir_master = list(new /obj/abstract/screen/plane_master/noir_master(),new /
|
||||
screen |= ghost_planemaster
|
||||
ghost_planemaster_dummy = new /obj/abstract/screen/plane_master/ghost_planemaster_dummy
|
||||
screen |= ghost_planemaster_dummy
|
||||
|
||||
|
||||
// DARKNESS PLANEMASTER
|
||||
// One planemaster for each client, which they gain during mob/login()
|
||||
/obj/abstract/screen/plane_master/darkness_planemaster
|
||||
plane = LIGHTING_PLANE
|
||||
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
|
||||
/obj/abstract/screen/plane_master/darkness_planemaster_dummy
|
||||
alpha = 0
|
||||
appearance_flags = 0
|
||||
plane = LIGHTING_PLANE
|
||||
|
||||
/client/proc/initialize_darkness_planemaster()
|
||||
if(darkness_planemaster)
|
||||
screen -= darkness_planemaster
|
||||
qdel(darkness_planemaster)
|
||||
if(darkness_planemaster_dummy)
|
||||
screen -= darkness_planemaster_dummy
|
||||
qdel(darkness_planemaster_dummy)
|
||||
darkness_planemaster = new /obj/abstract/screen/plane_master/darkness_planemaster
|
||||
screen |= darkness_planemaster
|
||||
darkness_planemaster_dummy = new /obj/abstract/screen/plane_master/darkness_planemaster_dummy
|
||||
screen |= darkness_planemaster_dummy
|
||||
|
||||
@@ -1089,6 +1089,7 @@ var/static/list/valid_cultpower_slots = list(
|
||||
|
||||
I.pixel_y = 16 * PIXEL_MULTIPLIER
|
||||
I.plane = ANTAG_HUD_PLANE
|
||||
I.appearance_flags |= RESET_COLOR|RESET_ALPHA
|
||||
|
||||
//inspired from the rune color matrix because boy am I proud of it
|
||||
animate(I, color = list(2,0.67,0.27,0,0.27,2,0.67,0,0.67,0.27,2,0,0,0,0,1,0,0,0,0), time = 2)//9
|
||||
|
||||
@@ -314,6 +314,7 @@ var/list/factions_with_hud_icons = list()
|
||||
I.pixel_x = 20 * PIXEL_MULTIPLIER
|
||||
I.pixel_y = 20 * PIXEL_MULTIPLIER
|
||||
I.plane = ANTAG_HUD_PLANE
|
||||
I.appearance_flags |= RESET_COLOR|RESET_ALPHA
|
||||
if (factions_with_icons > 1)
|
||||
animate(I, layer = 1, time = 0.1 + offset * HUDICON_BLINKDURATION, loop = -1)
|
||||
animate(layer = 0, time = 0.1)
|
||||
@@ -406,7 +407,7 @@ var/list/factions_with_hud_icons = list()
|
||||
or simply wandering malignant vagrants happening upon a meal of identity that can carry them to further feeding grounds."
|
||||
roletype = /datum/role/changeling
|
||||
logo_state = "change-logoa"
|
||||
|
||||
|
||||
//Hivemind Bank, contains a list of DNA that changelings can share and use.
|
||||
var/list/hivemind_bank = list()
|
||||
|
||||
|
||||
@@ -118,4 +118,5 @@
|
||||
I.pixel_x = 20 * PIXEL_MULTIPLIER
|
||||
I.pixel_y = 20 * PIXEL_MULTIPLIER
|
||||
I.plane = ANTAG_HUD_PLANE
|
||||
I.appearance_flags |= RESET_COLOR|RESET_ALPHA
|
||||
R.antag.current.client.images += I
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
var/obj/abstract/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null
|
||||
var/obj/abstract/screen/plane_master/ghost_planemaster/ghost_planemaster = null
|
||||
var/obj/abstract/screen/plane_master/ghost_planemaster_dummy/ghost_planemaster_dummy = null
|
||||
var/obj/abstract/screen/plane_master/ghost_planemaster/darkness_planemaster = null
|
||||
var/obj/abstract/screen/plane_master/ghost_planemaster_dummy/darkness_planemaster_dummy = null
|
||||
|
||||
// This gets set by goonchat.
|
||||
var/encoding = "1252"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
layer = LIGHTING_LAYER
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
|
||||
var/needs_update = FALSE
|
||||
|
||||
#if WORLD_ICON_SIZE != 32
|
||||
|
||||
@@ -1438,6 +1438,19 @@
|
||||
break
|
||||
return id
|
||||
|
||||
/mob/living/carbon/human/update_perception()
|
||||
if(client && client.darkness_planemaster)
|
||||
var/datum/organ/internal/eyes/E = src.internal_organs_by_name["eyes"]
|
||||
if(E)
|
||||
E.update_perception(src)
|
||||
|
||||
for(var/ID in virus2)
|
||||
var/datum/disease2/disease/D = virus2[ID]
|
||||
for (var/datum/disease2/effect/catvision/catvision in D.effects)
|
||||
if (catvision.count)//if catulism has activated at least once, we can see much better in the dark.
|
||||
client.darkness_planemaster.alpha = min(100, client.darkness_planemaster.alpha)
|
||||
break
|
||||
|
||||
/mob/living/carbon/human/assess_threat(var/obj/machinery/bot/secbot/judgebot, var/lasercolor)
|
||||
if(judgebot.emagged == 2)
|
||||
return 10 //Everyone is a criminal!
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#define INVERT_ANIM_TIME 50
|
||||
|
||||
/spell/targeted/genetic/invert_eyes
|
||||
name = "Invert eyesight"
|
||||
@@ -15,19 +14,10 @@
|
||||
|
||||
override_base = "genetic"
|
||||
hud_state = "wiz_sleepold"
|
||||
var/toggle = TRUE
|
||||
|
||||
|
||||
/spell/targeted/genetic/invert_eyes/cast(list/targets, mob/user)
|
||||
var/list/colourmatrix = list()
|
||||
if(toggle)
|
||||
colourmatrix = list(-1, 0, 0,
|
||||
0,-1, 0,
|
||||
0, 0,-1,
|
||||
1, 1, 1)
|
||||
else
|
||||
colourmatrix = default_colour_matrix
|
||||
for(var/mob/living/carbon/human/M in targets)
|
||||
M.update_colour(INVERT_ANIM_TIME, colourmatrix)
|
||||
toggle = !toggle
|
||||
#undef INVERT_ANIM_TIME
|
||||
var/datum/organ/internal/eyes/mushroom/E = M.internal_organs_by_name["eyes"]
|
||||
if(istype(E))
|
||||
E.dark_mode = !E.dark_mode
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
flying = 1
|
||||
treadmill_speed = 0 //It floats!
|
||||
mutations = list(M_NO_SHOCK)
|
||||
see_in_dark = 9
|
||||
|
||||
mob_property_flags = MOB_CONSTRUCT
|
||||
mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY
|
||||
@@ -63,6 +64,17 @@
|
||||
for(var/spell in construct_spells)
|
||||
src.add_spell(new spell, "cult_spell_ready", /obj/abstract/screen/movable/spell_master/bloodcult)
|
||||
|
||||
/mob/living/simple_animal/construct/update_perception()
|
||||
if(client)
|
||||
if(client.darkness_planemaster)
|
||||
client.darkness_planemaster.blend_mode = BLEND_MULTIPLY
|
||||
client.darkness_planemaster.alpha = 180
|
||||
client.color = list(
|
||||
1,0,0,0,
|
||||
0,1.3,0,0,
|
||||
0,0,1.3,0,
|
||||
0,-0.3,-0.3,1,
|
||||
0,0,0,0)
|
||||
|
||||
|
||||
/mob/living/simple_animal/construct/Move(NewLoc,Dir=0,step_x=0,step_y=0,var/glide_size_override = 0)
|
||||
@@ -214,7 +226,7 @@
|
||||
to_chat(M, "<span class='notice'>\The [src] has nothing to mend.</span>")
|
||||
return
|
||||
health = min(maxHealth, health + 5) // Constraining health to maxHealth
|
||||
anim(target = src, a_icon = 'icons/effects/effects.dmi', flick_anim = "const_heal", lay = NARSIE_GLOW, plane = LIGHTING_PLANE)
|
||||
anim(target = src, a_icon = 'icons/effects/effects.dmi', flick_anim = "const_heal", lay = NARSIE_GLOW, plane = ABOVE_LIGHTING_PLANE)
|
||||
M.visible_message("[M] mends some of \the <EM>[src]'s</EM> wounds.","You mend some of \the <em>[src]'s</em> wounds.")
|
||||
update_icons()
|
||||
else
|
||||
@@ -282,7 +294,7 @@
|
||||
if (hurt <= (maxHealth/3) && (!damage || damage <= damageblock))//when cracks start to appear
|
||||
if (A)
|
||||
visible_message("<span class='danger'>\The [A] bounces harmlessly off of \the [src]'s shell. </span>")
|
||||
anim(target = src, a_icon = 'icons/effects/64x64.dmi', flick_anim = "juggernaut_armor", lay = NARSIE_GLOW, offX = -WORLD_ICON_SIZE/2, offY = -WORLD_ICON_SIZE/2 + 4, plane = LIGHTING_PLANE)
|
||||
anim(target = src, a_icon = 'icons/effects/64x64.dmi', flick_anim = "juggernaut_armor", lay = NARSIE_GLOW, offX = -WORLD_ICON_SIZE/2, offY = -WORLD_ICON_SIZE/2 + 4, plane = ABOVE_LIGHTING_PLANE)
|
||||
playsound(src, 'sound/items/metal_impact.ogg', 25)
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -357,7 +369,6 @@
|
||||
attacktext = "slashes"
|
||||
speed = 1
|
||||
environment_smash_flags = SMASH_LIGHT_STRUCTURES | SMASH_CONTAINERS | OPEN_DOOR_WEAK
|
||||
see_in_dark = 7
|
||||
attack_sound = 'sound/weapons/rapidslice.ogg'
|
||||
construct_spells = list(/spell/targeted/ethereal_jaunt/shift)
|
||||
|
||||
@@ -468,7 +479,7 @@
|
||||
/mob/living/simple_animal/construct/update_icons()
|
||||
overlays = 0
|
||||
var/overlay_layer = ABOVE_LIGHTING_LAYER
|
||||
var/overlay_plane = LIGHTING_PLANE
|
||||
var/overlay_plane = ABOVE_LIGHTING_PLANE
|
||||
if(layer != MOB_LAYER) // ie it's hiding
|
||||
overlay_layer = FLOAT_LAYER
|
||||
overlay_plane = FLOAT_PLANE
|
||||
|
||||
@@ -153,12 +153,21 @@
|
||||
if(timestopped)
|
||||
return 0 //under effects of time magick
|
||||
. = ..()
|
||||
|
||||
regular_hud_updates()
|
||||
standard_damage_overlay_updates()
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/update_perception()
|
||||
if(client)
|
||||
client.color = list(0.8,0,0,1,
|
||||
0,0.8,0,1,
|
||||
0,0,0.8,1,
|
||||
0.2,0.2,0.2,0.5,
|
||||
0.15,0.15,0.15,0)
|
||||
if(client.darkness_planemaster)
|
||||
client.darkness_planemaster.blend_mode = BLEND_ADD
|
||||
client.darkness_planemaster.alpha = 100
|
||||
client.color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,-0.1,1,
|
||||
0,0,0,0)
|
||||
|
||||
if(a_matrix_testing_override)
|
||||
client.color = list(a_11,a_12,a_13,a_14,
|
||||
@@ -167,9 +176,6 @@
|
||||
a_41,a_42,a_43,a_44,
|
||||
a_51,a_52,a_53,a_54)
|
||||
|
||||
regular_hud_updates()
|
||||
standard_damage_overlay_updates()
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/regular_hud_updates()
|
||||
if (!client)
|
||||
return
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
client.screen += clickmaster // click catcher planesmaster on plane 0 with mouse opacity 0 - allows click catcher to work with SEE_BLACKNESS
|
||||
client.screen += clickmaster_dummy // honestly fuck you lummox
|
||||
client.initialize_ghost_planemaster() //We want to explicitly reset the planemaster's visibility on login() so if you toggle ghosts while dead you can still see cultghosts if revived etc.
|
||||
client.initialize_darkness_planemaster()
|
||||
update_perception()
|
||||
|
||||
regular_hud_updates()
|
||||
|
||||
|
||||
@@ -433,6 +433,9 @@
|
||||
|
||||
/mob/proc/Life()
|
||||
set waitfor = FALSE
|
||||
|
||||
update_perception()
|
||||
|
||||
if(timestopped)
|
||||
return 0 //under effects of time magick
|
||||
if(spell_masters && spell_masters.len)
|
||||
@@ -442,7 +445,6 @@
|
||||
for (var/time in crit_rampup)
|
||||
if (world.time > num2text(time) + 20 SECONDS) // clear out the items older than 20 seconds
|
||||
crit_rampup -= time
|
||||
return
|
||||
|
||||
/mob/proc/see_narsie(var/obj/machinery/singularity/narsie/large/N, var/dir)
|
||||
if(N.chained)
|
||||
@@ -1928,6 +1930,9 @@ mob/proc/on_foot()
|
||||
if(see_invisible_override)
|
||||
see_invisible = see_invisible_override
|
||||
|
||||
/mob/proc/update_perception()
|
||||
return
|
||||
|
||||
/mob/actual_send_to_future(var/duration)
|
||||
var/init_blinded = blinded
|
||||
var/init_eye_blind = eye_blind
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
|
||||
|
||||
|
||||
/datum/organ/internal/eyes/proc/init_perception(var/mob/living/carbon/human/M)
|
||||
return
|
||||
|
||||
/datum/organ/internal/eyes/proc/update_perception(var/mob/living/carbon/human/M)
|
||||
return
|
||||
|
||||
/datum/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
if(is_broken())
|
||||
owner.eye_blind = max(2, owner.eye_blind)
|
||||
@@ -21,9 +27,12 @@
|
||||
|
||||
/datum/organ/internal/eyes/tajaran
|
||||
name = "feline eyes"
|
||||
see_in_dark=8
|
||||
see_in_dark=9
|
||||
removed_type = /obj/item/organ/internal/eyes/tajaran
|
||||
|
||||
/datum/organ/internal/eyes/tajaran/update_perception(var/mob/living/carbon/human/M)
|
||||
M.client.darkness_planemaster.alpha = 100
|
||||
|
||||
/datum/organ/internal/eyes/grey
|
||||
name = "huge eyes"
|
||||
see_in_dark=5
|
||||
@@ -54,8 +63,31 @@
|
||||
|
||||
/datum/organ/internal/eyes/mushroom
|
||||
name = "mushroom eyes"
|
||||
see_in_dark = 8
|
||||
see_in_dark = 9
|
||||
removed_type = /obj/item/organ/internal/eyes/mushroom
|
||||
var/dark_mode = FALSE
|
||||
|
||||
/datum/organ/internal/eyes/mushroom/update_perception(var/mob/living/carbon/human/M)
|
||||
if (dark_mode)
|
||||
M.client.darkness_planemaster.blend_mode = BLEND_SUBTRACT
|
||||
M.client.darkness_planemaster.alpha = 100
|
||||
M.client.darkness_planemaster.color = "#FF0000"
|
||||
M.client.color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,-0.1,0,1,
|
||||
0,0,0,0)
|
||||
else
|
||||
M.client.darkness_planemaster.blend_mode = BLEND_MULTIPLY
|
||||
M.client.darkness_planemaster.alpha = 150
|
||||
M.client.darkness_planemaster.color = null
|
||||
M.client.color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1,
|
||||
0,0,0,0)
|
||||
|
||||
///////////////
|
||||
// BIONIC EYES
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "tube-construct-stage1"
|
||||
anchored = 1
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTBULB_LAYER
|
||||
plane = OBJ_PLANE
|
||||
layer = ABOVE_DOOR_LAYER
|
||||
var/stage = 1
|
||||
var/fixture_type = "tube"
|
||||
var/sheets_refunded = 2
|
||||
@@ -93,8 +93,8 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "bulb-construct-stage1"
|
||||
anchored = 1
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTBULB_LAYER
|
||||
plane = OBJ_PLANE
|
||||
layer = ABOVE_DOOR_LAYER
|
||||
stage = 1
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
@@ -108,8 +108,8 @@ var/global/list/obj/machinery/light/alllights = list()
|
||||
icon_state = "ltube1"
|
||||
desc = "A lighting fixture."
|
||||
anchored = 1
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTBULB_LAYER
|
||||
plane = OBJ_PLANE
|
||||
layer = ABOVE_DOOR_LAYER
|
||||
use_power = 2
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 20
|
||||
|
||||
Reference in New Issue
Block a user