Skip to content

Commit

Permalink
Изменине глаз и импланта
Browse files Browse the repository at this point in the history
  • Loading branch information
msw7007 committed Oct 31, 2024
1 parent 1269f46 commit 27d0356
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,27 @@
if(!istype(item, /obj/item/grab))
owner.drop_r_hand()

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/Initialize(mapload)
. = .. ()
addtimer(CALLBACK(src, PROC_REF(update_overlays_blades)), 1 SECONDS)

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/insert(mob/living/carbon/M, special, dont_remove_slot)
. = .. ()
addtimer(CALLBACK(src, PROC_REF(update_overlays_blades)), 1 SECONDS)

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/remove(mob/living/carbon/M, special, dont_remove_slot)
update_icon(UPDATE_OVERLAYS)
. = .. ()
/obj/item/organ/internal/cyberimp/chest/serpentid_blades/render()
var/mutable_appearance/our_MA = mutable_appearance(icon_file, new_icon_state, layer = -INTORGAN_LAYER)
return our_MA

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/ui_action_click()
if(crit_fail || (!holder_l && !length(contents)))
to_chat(owner, "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>")
return
var/extended = holder_l && !(holder_l in src)
var/activation_in_progress = TRUE
var/activation_in_progress = FALSE
if(extended)
if(!activation_in_progress)
activation_in_progress = TRUE
Retract()
else if(do_after(owner, 20*(owner.dna.species.action_mult), FALSE, owner))
if(!activation_in_progress)
activation_in_progress = TRUE
holder_l = null
Extend()
activation_in_progress = FALSE

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/proc/update_overlays_blades()
update_icon(UPDATE_OVERLAYS)

/obj/item/organ/internal/cyberimp/chest/serpentid_blades/update_overlays()
. = .. ()
if(old_overlay)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
flash_protect = FLASH_PROTECTION_EXTRA_SENSITIVE
tint = FLASH_PROTECTION_NONE
var/chemical_consuption = SERPENTID_ORGAN_HUNGER_EYES
var/vision_ajust_coefficient = 0.4
var/vision_ajust_coefficient = 0.7
var/update_time_client_colour = 10
var/active = FALSE
radial_action_state = "serpentid_nvg"
Expand Down Expand Up @@ -42,9 +42,9 @@
/obj/item/organ/internal/eyes/serpentid/get_colourmatrix()
if(!owner)
return
var/chem_value = owner.nutrition/NUTRITION_LEVEL_WELL_FED
var/chem_value = (owner.nutrition - NUTRITION_LEVEL_STARVING)/NUTRITION_LEVEL_HUNGRY
var/vision_chem = clamp(chem_value, SERPENTID_EYES_LOW_VISIBLE_VALUE, SERPENTID_EYES_MAX_VISIBLE_VALUE)
var/vision_concentration = (1 - vision_chem/SERPENTID_EYES_MAX_VISIBLE_VALUE)*SERPENTID_EYES_LOW_VISIBLE_VALUE
var/vision_concentration = (1 - vision_chem/SERPENTID_EYES_MAX_VISIBLE_VALUE/2)*SERPENTID_EYES_LOW_VISIBLE_VALUE

vision_concentration = SERPENTID_EYES_LOW_VISIBLE_VALUE * (1 - chem_value ** vision_ajust_coefficient)
var/vision_adjust = clamp(vision_concentration, 0, SERPENTID_EYES_LOW_VISIBLE_VALUE)
Expand Down

0 comments on commit 27d0356

Please sign in to comment.