mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Reworking eyes of god to be risk / reward / from colossus (#20163)
* eye see what is happening here * loot it and ship it * more progress * more progress * eye see Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * removing extra comment to rerun checks while I think on sprite * name / sprite, good to go™️ * BSH no longer spawns invisible penguins * oops wrong branch Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -473,6 +473,8 @@
|
||||
#define COMSIG_CARBON_TOGGLE_THROW "carbon_toggle_throw"
|
||||
/// From /mob/living/carbon/human/hitby()
|
||||
#define COMSIG_CARBON_THROWN_ITEM_CAUGHT "carbon_thrown_item_caught"
|
||||
/// From /mob/living/carbon/flash_eyes()
|
||||
#define COMSIG_CARBON_FLASH_EYES "carbon_flash_eyes"
|
||||
|
||||
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
#define MFOAM_IRON 2
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#define EYES_OVERLAY_LAYER 42
|
||||
#define WING_LAYER 41
|
||||
#define WING_UNDERLIMBS_LAYER 40
|
||||
#define MUTANTRACE_LAYER 39
|
||||
@@ -211,7 +212,7 @@
|
||||
#define FIRE_LAYER 3 //If you're on fire
|
||||
#define MISC_LAYER 2
|
||||
#define FROZEN_LAYER 1
|
||||
#define TOTAL_LAYERS 41
|
||||
#define TOTAL_LAYERS 42
|
||||
|
||||
///Access Region Codes///
|
||||
#define REGION_ALL 0
|
||||
|
||||
@@ -296,6 +296,7 @@
|
||||
#define HEALTH_HUD_OVERRIDE_DEAD 2
|
||||
#define HEALTH_HUD_OVERRIDE_HEALTHY 3
|
||||
// Eye protection
|
||||
#define FLASH_PROTECTION_VERYVUNERABLE -4
|
||||
#define FLASH_PROTECTION_SENSITIVE -1
|
||||
#define FLASH_PROTECTION_NONE 0
|
||||
#define FLASH_PROTECTION_FLASH 1
|
||||
|
||||
@@ -231,6 +231,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define LYING_DOWN_TRAIT "lying_down"
|
||||
#define SLIME_TRAIT "slime"
|
||||
#define BERSERK_TRAIT "berserk"
|
||||
#define EYES_OF_GOD "eyes_of_god"
|
||||
|
||||
// unique trait sources
|
||||
#define STATUE_MUTE "statue"
|
||||
|
||||
@@ -497,6 +497,11 @@
|
||||
name = "Use [target.name]"
|
||||
button.name = name
|
||||
|
||||
/datum/action/item_action/organ_action/use/eyesofgod/New(target)
|
||||
..()
|
||||
name = "See with the Eyes of the Gods"
|
||||
button.name = name
|
||||
|
||||
/datum/action/item_action/voice_changer/toggle
|
||||
name = "Toggle Voice Changer"
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
severity = 0
|
||||
|
||||
//20% chance to actually hit the eyes
|
||||
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
|
||||
if(prob(effectchance * diode.rating) && C.flash_eyes(severity, laser_pointer = TRUE))
|
||||
outmsg = "<span class='notice'>You blind [C] by shining [src] in [C.p_their()] eyes.</span>"
|
||||
else
|
||||
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at [C.p_their()] eyes!</span>"
|
||||
|
||||
@@ -463,43 +463,6 @@
|
||||
item_state = "eyepatch"
|
||||
flags = NODROP
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/godeye
|
||||
name = "eye of god"
|
||||
desc = "A strange eye, said to have been torn from an omniscient creature that used to roam the wastes."
|
||||
icon_state = "godeye"
|
||||
item_state = "godeye"
|
||||
vision_flags = SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
scan_reagents = 1
|
||||
prescription = TRUE
|
||||
flags = NODROP
|
||||
flags_cover = null
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/clothing/species/vox/eyes.dmi',
|
||||
"Grey" = 'icons/mob/clothing/species/grey/eyes.dmi',
|
||||
"Drask" = 'icons/mob/clothing/species/drask/eyes.dmi'
|
||||
)
|
||||
///Have we combined this with another godeye?
|
||||
var/double_eye = FALSE
|
||||
|
||||
/obj/item/clothing/glasses/godeye/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/clothing/glasses/godeye) && W != src)
|
||||
var/obj/item/clothing/glasses/godeye/second_eye = W
|
||||
if(!second_eye.double_eye && !double_eye)
|
||||
double_eye = TRUE
|
||||
icon_state = "doublegodeye"
|
||||
item_state = "doublegodeye"
|
||||
name = "eyes of god"
|
||||
desc = "A pair of strange eyes, said to have been torn from an omniscient creature that used to roam the wastes. There's no real reason to have two, but that isn't stopping you."
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.update_inv_wear_mask()
|
||||
qdel(W)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/tajblind
|
||||
name = "embroidered veil"
|
||||
desc = "An Ahdominian made veil that allows the user to see while obscuring their eyes."
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
name = "colossus chest"
|
||||
|
||||
/obj/structure/closet/crate/necropolis/colossus/populate_contents()
|
||||
var/list/choices = subtypesof(/obj/machinery/anomalous_crystal)
|
||||
var/random_crystal = pick(choices)
|
||||
new random_crystal(src)
|
||||
new /obj/item/organ/internal/vocal_cords/colossus(src)
|
||||
var/list/crystalchoices = subtypesof(/obj/machinery/anomalous_crystal)
|
||||
var/random_crystal = pick(crystalchoices)
|
||||
var/list/choices = list(/obj/item/organ/internal/vocal_cords/colossus, /obj/item/organ/internal/eyes/cybernetic/eyesofgod, random_crystal)
|
||||
for(var/I in 1 to 2)
|
||||
var/loot = pick_n_take(choices)
|
||||
new loot(src)
|
||||
|
||||
/obj/structure/closet/crate/necropolis/colossus/crusher
|
||||
name = "angelic colossus chest"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
desc = "It's watching you suspiciously."
|
||||
|
||||
/obj/structure/closet/crate/necropolis/tendril/populate_contents()
|
||||
var/loot = rand(1, 24)
|
||||
var/loot = rand(1, 23)
|
||||
switch(loot)
|
||||
if(1)
|
||||
new /obj/item/shared_storage/red(src)
|
||||
@@ -24,7 +24,7 @@
|
||||
if(4)
|
||||
new /obj/item/organ/internal/cyberimp/arm/katana(src)
|
||||
if(5)
|
||||
new /obj/item/clothing/glasses/godeye(src)
|
||||
new /obj/item/book_of_babel(src)
|
||||
if(6)
|
||||
new /obj/item/pickaxe/diamond(src)
|
||||
if(7)
|
||||
@@ -67,8 +67,6 @@
|
||||
if(22)
|
||||
new /obj/item/spellbook/oneuse/summonitem(src)
|
||||
if(23)
|
||||
new /obj/item/book_of_babel(src)
|
||||
if(24)
|
||||
new /obj/item/borg/upgrade/modkit/lifesteal(src)
|
||||
new /obj/item/bedsheet/cult(src)
|
||||
|
||||
|
||||
@@ -357,8 +357,10 @@
|
||||
if(HAS_TRAIT(H, TRAIT_SKELETONIZED) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
. = ..()
|
||||
SIGNAL_HANDLER
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_FLASH_EYES, laser_pointer)
|
||||
var/damage = intensity - check_eye_prot()
|
||||
var/extra_damage = 0
|
||||
if(.)
|
||||
|
||||
@@ -565,6 +565,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
update_tail_layer()
|
||||
update_wing_layer()
|
||||
update_halo_layer()
|
||||
update_eyes_overlay_layer()
|
||||
overlays.Cut() // Force all overlays to regenerate
|
||||
update_fire()
|
||||
update_icons()
|
||||
@@ -1365,6 +1366,17 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
|
||||
apply_overlay(HALO_LAYER)
|
||||
|
||||
/mob/living/carbon/human/proc/update_eyes_overlay_layer()
|
||||
remove_overlay(EYES_OVERLAY_LAYER)
|
||||
|
||||
var/obj/item/organ/internal/eyes/eyes_organ = get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(istype(eyes_organ, /obj/item/organ/internal/eyes/cybernetic/eyesofgod))
|
||||
var/obj/item/organ/internal/eyes/cybernetic/eyesofgod/E = eyes_organ
|
||||
if(E.active)
|
||||
var/mutable_appearance/new_eye_overlay = mutable_appearance('icons/effects/32x64.dmi', "eyesofgod", -EYES_OVERLAY_LAYER)
|
||||
overlays_standing[EYES_OVERLAY_LAYER] = new_eye_overlay
|
||||
|
||||
apply_overlay(EYES_OVERLAY_LAYER)
|
||||
|
||||
/mob/living/carbon/human/admin_Freeze(client/admin, skip_overlays = TRUE, mech = null)
|
||||
if(..())
|
||||
|
||||
@@ -831,7 +831,7 @@
|
||||
return "You can't fit into that vent."
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
if(check_eye_prot() < intensity && (override_blindness_check || !HAS_TRAIT(src, TRAIT_BLIND)) && !HAS_TRAIT(src, TRAIT_FLASH_PROTECTION))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), "flash", 25), 25)
|
||||
|
||||
@@ -207,3 +207,144 @@
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/shield/emp_act(severity)
|
||||
return
|
||||
|
||||
#define INTACT 0
|
||||
#define ONE_SHATTERED 1
|
||||
#define BOTH_SHATTERED 2
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod //no occuline allowed
|
||||
name = "\improper Eyes of the Gods"
|
||||
desc = "Two eyes said to belong to the gods. But such vision comes at a price"
|
||||
icon_state = "eyesofgod"
|
||||
eye_color = "#58a5ec"
|
||||
see_in_dark = 8
|
||||
flash_protect = FLASH_PROTECTION_SENSITIVE
|
||||
emp_proof = TRUE //They are crystal artifacts, not metal
|
||||
min_bruised_damage = 30
|
||||
min_broken_damage = 60
|
||||
actions_types = list(/datum/action/item_action/organ_action/use/eyesofgod)
|
||||
var/active = FALSE
|
||||
var/shatter_state = INTACT
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/Destroy()
|
||||
deactivate()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/remove(mob/living/carbon/human/M, special)
|
||||
owner.cure_nearsighted() //Let's not leave the owner with blindness permamently that only admins / re-adding the eyes can remove
|
||||
owner.cure_blind()
|
||||
deactivate()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/on_life()
|
||||
. = ..()
|
||||
if(is_mining_level(owner.z)) //More lavaland use cause magic or something. Don't worry about the ash in peoples eyes.
|
||||
heal_internal_damage(1, 1)
|
||||
if(!active)
|
||||
switch(damage)
|
||||
if(0 to 10)
|
||||
heal_internal_damage(1, 1)
|
||||
if(prob(25))
|
||||
owner.cure_nearsighted()
|
||||
owner.cure_blind()
|
||||
unshatter()
|
||||
if(10 to 30)
|
||||
heal_internal_damage(0.5, 1)
|
||||
if(prob(10))
|
||||
owner.cure_blind()
|
||||
unshatter()
|
||||
if(30 to 60)
|
||||
heal_internal_damage(0.33, 1)
|
||||
if(60 to INFINITY)
|
||||
heal_internal_damage(0.25, 1)
|
||||
else
|
||||
owner.mob_light("#58a5ec", 3, _duration = 2 SECONDS)
|
||||
receive_damage(1.5, 1)
|
||||
for(var/obj/O in range(7, owner))
|
||||
var/turf/T = get_turf(O)
|
||||
for(var/mob/M in O.contents)
|
||||
receive_damage(0.25, 1)
|
||||
new /obj/effect/temp_visual/eyesofgod(T)
|
||||
if(prob(25))
|
||||
to_chat(M, "<span class='warning'>You feel like you are being watched...</span>")
|
||||
switch(damage)
|
||||
if(25 to 30)
|
||||
if(prob(50))
|
||||
to_chat(owner, "<span class='warning'>Your eyes are hurting a lot!</span>")
|
||||
if(30 to 54)
|
||||
receive_damage(0.75, 1) //more pain when damaged
|
||||
if(55 to 60)
|
||||
if(prob(50))
|
||||
to_chat(owner, "<span class='warning'>Your eyes feel like they are going to explode!</span>")
|
||||
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/proc/unshatter()
|
||||
if(shatter_state == INTACT)
|
||||
return
|
||||
if(damage <= 10)
|
||||
shatter_state = INTACT
|
||||
else
|
||||
if(shatter_state == ONE_SHATTERED)
|
||||
return
|
||||
shatter_state = ONE_SHATTERED
|
||||
to_chat(owner, "<span class='notice'>Your feel better as your [shatter_state ? "left eye" : "right eye"] fixes itself!</span>")
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/receive_damage(amount, silent)
|
||||
. = ..()
|
||||
if(damage >= 30 && shatter_state == INTACT || damage >= 60 && shatter_state == ONE_SHATTERED)
|
||||
shatter()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/proc/shatter()
|
||||
var/msg = "no eye?"
|
||||
switch(shatter_state)
|
||||
if(ONE_SHATTERED)
|
||||
shatter_state = BOTH_SHATTERED
|
||||
msg = "left eye"
|
||||
owner.become_blind(EYES_OF_GOD) //Special flag otherwise occuline heals it :gatto:
|
||||
if(INTACT)
|
||||
shatter_state = ONE_SHATTERED
|
||||
msg = "right eye"
|
||||
owner.become_nearsighted(EYES_OF_GOD)
|
||||
to_chat(owner, "<span class='userdanger'>You scream out in pain as your [msg] shatters!</span>")
|
||||
owner.emote("scream")
|
||||
owner.bleed(5)
|
||||
deactivate()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/proc/activate()
|
||||
receive_damage(2, 1) //No flicky flicky on / off to fully negate damage
|
||||
RegisterSignal(owner, COMSIG_CARBON_FLASH_EYES, PROC_REF(got_flashed))
|
||||
active = TRUE
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
|
||||
vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
flash_protect = FLASH_PROTECTION_VERYVUNERABLE //Flashing is it's weakness. I don't care how many protections you have up
|
||||
owner?.client?.color = LIGHT_COLOR_PURE_CYAN
|
||||
owner.update_sight()
|
||||
owner.update_eyes_overlay_layer()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/proc/deactivate()
|
||||
UnregisterSignal(owner, COMSIG_CARBON_FLASH_EYES)
|
||||
active = FALSE
|
||||
see_invisible = initial(see_invisible)
|
||||
vision_flags = initial(vision_flags)
|
||||
lighting_alpha = initial(lighting_alpha)
|
||||
flash_protect = initial(flash_protect)
|
||||
owner?.client?.color = null
|
||||
owner.update_sight()
|
||||
owner.update_eyes_overlay_layer()
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/proc/got_flashed(mob/living/carbon/C, laser_pointer)
|
||||
if(active && !laser_pointer) //Should be active but double checking, and no laser pointer memes, since that is ranged flashes with no skill / counter, unlike a more predectable flashbang
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/organ, receive_damage), 22), 0.1 SECONDS)//Enough with base flashing to kick people out of vision in a moment due to damage. Don't want to do it instantly, or it lets people take less damage from the base flash
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic/eyesofgod/ui_action_click()
|
||||
if(!active && shatter_state < BOTH_SHATTERED)
|
||||
activate()
|
||||
return
|
||||
deactivate()
|
||||
|
||||
/obj/effect/temp_visual/eyesofgod
|
||||
name = "eye mark"
|
||||
icon_state = "shield_reversed"
|
||||
duration = 2 SECONDS
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 397 KiB After Width: | Height: | Size: 394 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user