mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Diona Tweaks and Changes (#11412)
This commit is contained in:
@@ -855,6 +855,7 @@
|
||||
#include "code\game\objects\items\devices\lighting\flashlight.dm"
|
||||
#include "code\game\objects\items\devices\lighting\glowstick.dm"
|
||||
#include "code\game\objects\items\devices\lighting\lamp.dm"
|
||||
#include "code\game\objects\items\devices\lighting\survival.dm"
|
||||
#include "code\game\objects\items\devices\PDA\radio.dm"
|
||||
#include "code\game\objects\items\devices\radio\_radio_defines.dm"
|
||||
#include "code\game\objects\items\devices\radio\beacon.dm"
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/cell,
|
||||
/obj/item/modular_computer,
|
||||
/obj/item/computer_hardware/battery_module
|
||||
/obj/item/computer_hardware/battery_module,
|
||||
/obj/item/device/flashlight/survival
|
||||
)
|
||||
var/icon_state_charged = "recharger100"
|
||||
var/icon_state_charging = "recharger"
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/obj/item/device/flashlight/survival
|
||||
name = "survival flashlight"
|
||||
desc = "A hand-held emergency light. This one has been modified with a larger bulb pointing inwards."
|
||||
icon_state = "survival_flashlight"
|
||||
item_state = "survival_flashlight"
|
||||
light_wedge = null
|
||||
|
||||
uv_intensity = 255
|
||||
light_power = 2
|
||||
brightness_on = 2
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
var/obj/item/cell/cell
|
||||
var/last_drain = 0
|
||||
var/drain_per_second = 4 // should last about four minutes
|
||||
|
||||
/obj/item/device/flashlight/survival/Initialize()
|
||||
. = ..()
|
||||
cell = new /obj/item/cell/device(src)
|
||||
|
||||
/obj/item/device/flashlight/survival/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/survival/examine(mob/user, distance)
|
||||
. = ..()
|
||||
to_chat(user, SPAN_NOTICE("\The [src]'s power cell is at [round(cell.percent())]%."))
|
||||
|
||||
/obj/item/device/flashlight/survival/attack_self(mob/user)
|
||||
if(!on && !cell.check_charge(1))
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have any charge!"))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/survival/toggle()
|
||||
if(!on && !cell.check_charge(1))
|
||||
return
|
||||
..()
|
||||
if(on)
|
||||
last_drain = world.time
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
else
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/device/flashlight/survival/process()
|
||||
var/cell_drain = ((world.time - last_drain) / 10) * drain_per_second
|
||||
if(!cell.use(cell_drain) && on)
|
||||
toggle()
|
||||
last_drain = world.time
|
||||
|
||||
/obj/item/device/flashlight/survival/get_cell()
|
||||
return cell
|
||||
@@ -24,7 +24,6 @@ var/list/diona_banned_languages = list(
|
||||
/mob/living/carbon/proc/diona_handle_light(var/datum/dionastats/DS) //Carbon is the highest common denominator between gestalts and nymphs. They will share light code
|
||||
//if light_organ is non null, then we're working with a gestalt. otherwise nymph
|
||||
|
||||
|
||||
var/light_amount = DS.last_lightlevel //If we're not re-fetching the light level then we'll use a recent cached version
|
||||
|
||||
if (life_tick % 2 == 0) //Only fetch the lightlevel every other proc to save performance
|
||||
@@ -32,7 +31,6 @@ var/list/diona_banned_languages = list(
|
||||
light_amount = get_lightlevel_diona(DS)
|
||||
DS.last_lightlevel = light_amount
|
||||
|
||||
|
||||
DS.stored_energy += light_amount
|
||||
|
||||
if(DS.stored_energy > DS.max_energy)
|
||||
@@ -50,13 +48,6 @@ var/list/diona_banned_languages = list(
|
||||
DS.last_location = loc
|
||||
if(light_amount)
|
||||
adjustNutritionLoss(-light_amount) // regenerate our nutrition from light.
|
||||
move_delay_mod = min(initial(move_delay_mod) - light_amount * 1, 0)
|
||||
sprint_speed_factor = initial(sprint_speed_factor)
|
||||
sprint_cost_factor = Clamp(initial(sprint_cost_factor) - light_amount * DIONA_LIGHT_COEFICIENT, 0, initial(sprint_cost_factor))
|
||||
if (total_radiation)
|
||||
move_delay_mod = max(move_delay_mod * total_radiation * 3, -4.5)
|
||||
sprint_speed_factor = 0.65
|
||||
sprint_cost_factor = 0
|
||||
|
||||
/mob/living/carbon/alien/diona/death()
|
||||
if(client && gestalt && switch_to_gestalt())
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
/datum/hud_data/diona
|
||||
has_hydration = FALSE
|
||||
has_internals = FALSE
|
||||
has_m_intent = FALSE
|
||||
gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1),
|
||||
"o_clothing" = list("loc" = ui_shoes, "name" = "suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1),
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/mob/living/carbon/proc/sample
|
||||
)
|
||||
//primitive_form = "Nymph"
|
||||
slowdown = 7
|
||||
slowdown = 4
|
||||
rarity_value = 4
|
||||
hud_type = /datum/hud_data/diona
|
||||
siemens_coefficient = 0.3
|
||||
@@ -113,9 +113,6 @@
|
||||
|
||||
reagent_tag = IS_DIONA
|
||||
|
||||
stamina = -1 // Diona sprinting uses energy instead of stamina
|
||||
sprint_speed_factor = 0.5 //Speed gained is minor
|
||||
sprint_cost_factor = 0.8
|
||||
climb_coeff = 1.3
|
||||
vision_organ = BP_HEAD
|
||||
|
||||
@@ -129,35 +126,6 @@
|
||||
|
||||
alterable_internal_organs = list()
|
||||
|
||||
/datum/species/diona/handle_sprint_cost(var/mob/living/carbon/H, var/cost)
|
||||
var/datum/dionastats/DS = H.get_dionastats()
|
||||
|
||||
if (!DS)
|
||||
return 0 //Something is very wrong
|
||||
|
||||
var/remainder = cost * H.sprint_cost_factor
|
||||
|
||||
if (H.total_radiation && !DS.regening_organ)
|
||||
if (H.total_radiation > (cost*0.5))//Radiation counts as double energy
|
||||
H.apply_radiation(cost*(-0.5))
|
||||
return 1
|
||||
else
|
||||
remainder = cost - (H.total_radiation*2)
|
||||
H.total_radiation = 0
|
||||
|
||||
if (DS.stored_energy > remainder)
|
||||
DS.stored_energy -= remainder
|
||||
return 1
|
||||
else
|
||||
remainder -= DS.stored_energy
|
||||
DS.stored_energy = 0
|
||||
H.adjustHalLoss(remainder*5, 1)
|
||||
H.updatehealth()
|
||||
H.m_intent = M_WALK
|
||||
H.hud_used.move_intent.update_move_icon(H)
|
||||
to_chat(H, SPAN_DANGER("We have expended our energy reserves, and cannot continue to move at such a pace. We must find light!"))
|
||||
return 0
|
||||
|
||||
/datum/species/diona/can_understand(var/mob/other)
|
||||
var/mob/living/carbon/alien/diona/D = other
|
||||
if(istype(D))
|
||||
@@ -200,6 +168,16 @@
|
||||
if((!D.client && !D.mind) || D.stat == DEAD)
|
||||
qdel(D)
|
||||
|
||||
/datum/species/diona/equip_later_gear(mob/living/carbon/human/H)
|
||||
var/obj/item/storage/box/survival/SB = locate() in H
|
||||
if(!SB)
|
||||
for(var/obj/item/storage/S in H)
|
||||
SB = locate() in S
|
||||
if(SB)
|
||||
break
|
||||
if(SB)
|
||||
SB.handle_item_insertion(new /obj/item/device/flashlight/survival(get_turf(H)), TRUE)
|
||||
|
||||
/datum/species/diona/has_psi_potential()
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -110,11 +110,10 @@
|
||||
if(functioning)
|
||||
for(var/mob/living/M in contents)
|
||||
if(M.stat == DEAD)
|
||||
addtimer(CALLBACK(src, .proc/digest_mob, M), 30 SECONDS, TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, .proc/digest_mob, M), 5 MINUTES, TIMER_UNIQUE)
|
||||
|
||||
M.adjustBruteLoss(3)
|
||||
M.adjustFireLoss(3)
|
||||
M.adjustToxLoss(3)
|
||||
M.adjustBruteLoss(2)
|
||||
M.adjustFireLoss(2)
|
||||
|
||||
var/digestion_product = M.get_digestion_product()
|
||||
if(digestion_product)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Diona now spawn with a survival flashlight, which is good enough to keep them alive for four minutes. It can be recharged at a recharger."
|
||||
- tweak: "Diona no longer benefit speedwise from radiation or light, instead they just get a flat speed buff."
|
||||
- rscdel: "Diona can no longer sprint."
|
||||
- tweak: "Swallowing and digesting mobs now does less damage to them, and digestion completes are five minutes, rather than thirty seconds."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user