merge fixes
This commit is contained in:
@@ -193,9 +193,9 @@
|
||||
var/on = FALSE // 1 if on, 0 if off
|
||||
var/on_gs = FALSE
|
||||
var/static_power_used = 0
|
||||
var/brightness = 8 // luminosity when on, also used in power calculation
|
||||
var/brightness = 11 // luminosity when on, also used in power calculation
|
||||
var/bulb_power = 0.75 // basically the alpha of the emitted light source
|
||||
var/bulb_colour = "#FFEEDD" // befault colour of the light.
|
||||
var/bulb_colour = "#FFF6ED" // befault colour of the light.
|
||||
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
||||
var/flickering = FALSE
|
||||
var/light_type = /obj/item/light/tube // the type of light item
|
||||
@@ -232,7 +232,7 @@
|
||||
icon_state = "bulb"
|
||||
base_state = "bulb"
|
||||
fitting = "bulb"
|
||||
brightness = 4
|
||||
brightness = 6
|
||||
bulb_colour = "#FFDDBB"
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/light/bulb
|
||||
@@ -273,11 +273,11 @@
|
||||
spawn(2)
|
||||
switch(fitting)
|
||||
if("tube")
|
||||
brightness = 8
|
||||
brightness = 11
|
||||
if(prob(2))
|
||||
break_light_tube(1)
|
||||
if("bulb")
|
||||
brightness = 4
|
||||
brightness = 6
|
||||
if(prob(5))
|
||||
break_light_tube(1)
|
||||
spawn(1)
|
||||
@@ -359,11 +359,11 @@
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
active_power_usage = (brightness * 10)
|
||||
active_power_usage = (brightness * 7.2)
|
||||
if(on != on_gs)
|
||||
on_gs = on
|
||||
if(on)
|
||||
static_power_used = brightness * 20 * (hijacked ? 2 : 1) //20W per unit luminosity
|
||||
static_power_used = brightness * 14.4 * (hijacked ? 2 : 1) //20W per unit luminosity
|
||||
addStaticPower(static_power_used, STATIC_LIGHT)
|
||||
else
|
||||
removeStaticPower(static_power_used, STATIC_LIGHT)
|
||||
@@ -746,7 +746,7 @@
|
||||
icon_state = "ltube"
|
||||
base_state = "ltube"
|
||||
item_state = "c_tube"
|
||||
brightness = 8
|
||||
brightness = 11
|
||||
|
||||
/obj/item/light/tube/broken
|
||||
status = LIGHT_BROKEN
|
||||
@@ -759,7 +759,7 @@
|
||||
item_state = "contvapour"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
brightness = 4
|
||||
brightness = 6
|
||||
|
||||
/obj/item/light/bulb/broken
|
||||
status = LIGHT_BROKEN
|
||||
@@ -828,7 +828,7 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
base_state = "floor" // base description and icon_state
|
||||
icon_state = "floor"
|
||||
brightness = 4
|
||||
brightness = 6
|
||||
layer = 2.5
|
||||
light_type = /obj/item/light/bulb
|
||||
fitting = "bulb"
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
|
||||
#define SUPERMATTER_COUNTDOWN_TIME 30 SECONDS
|
||||
|
||||
#define SUPERMATTER_INTEGRITY_MULT 1.3 //(loss of integrity / 10) ^ 1.3
|
||||
|
||||
GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
|
||||
/obj/machinery/power/supermatter_crystal
|
||||
@@ -158,6 +160,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
var/datum/looping_sound/supermatter/soundloop
|
||||
|
||||
var/moveable = FALSE
|
||||
var/min_damage = 0
|
||||
var/power_calc = 0
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/Initialize()
|
||||
. = ..()
|
||||
@@ -359,6 +363,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
|
||||
//capping damage
|
||||
damage = min(damage_archived + (DAMAGE_HARDCAP * explosion_point),damage)
|
||||
damage = max(min_damage, damage) //max integrity
|
||||
if(damage > damage_archived && prob(10))
|
||||
playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1)
|
||||
|
||||
@@ -398,7 +403,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
|
||||
if(matter_power)
|
||||
var/removed_matter = max(matter_power/MATTER_POWER_CONVERSION, 40)
|
||||
power = max(power + removed_matter, 0)
|
||||
power_calc = max(power_calc + removed_matter, 0)
|
||||
matter_power = max(matter_power - removed_matter, 0)
|
||||
|
||||
var/temp_factor = 50
|
||||
@@ -411,7 +416,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
temp_factor = 30
|
||||
icon_state = base_icon_state
|
||||
|
||||
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
|
||||
power_calc = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power_calc, 0) //Total laser power plus an overload
|
||||
|
||||
if(prob(50))
|
||||
radiation_pulse(src, power * (1 + (tritiumcomp * TRITIUM_RADIOACTIVITY_MODIFIER) + ((pluoxiumcomp * PLUOXIUM_RADIOACTIVITY_MODIFIER) * pluoxiumbonus) * (power_transmission_bonus/(10-(bzcomp * BZ_RADIOACTIVITY_MODIFIER))))) // Rad Modifiers BZ(500%), Tritium(300%), and Pluoxium(-200%)
|
||||
@@ -443,15 +448,19 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // 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
|
||||
l.hallucination += power_calc * config_hallucination_power * D
|
||||
l.hallucination = CLAMP(0, 200, l.hallucination)
|
||||
|
||||
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
|
||||
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
|
||||
l.rad_act(rads)
|
||||
|
||||
power -= ((power/500)**3) * powerloss_inhibitor
|
||||
|
||||
power_calc -= ((power_calc/500)**3) * powerloss_inhibitor
|
||||
if ((100-get_integrity()) < 75)
|
||||
power = (power_calc * ((100 - (0.15*(100-get_integrity()) - 5)**2) / 100)) + power_calc*0.1
|
||||
else
|
||||
power = power_calc * (((100-get_integrity())^((3*(100-get_integrity()))/1000) + 2*(100-get_integrity()))/100) //new and improved, more linear
|
||||
//power = power_calc * ((((100-get_integrity())**1.3)-(2*(100-get_integrity())))/100)
|
||||
if(power > POWER_PENALTY_THRESHOLD || damage > damage_penalty_point)
|
||||
|
||||
if(power > POWER_PENALTY_THRESHOLD)
|
||||
@@ -474,8 +483,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
supermatter_anomaly_gen(src, GRAVITATIONAL_ANOMALY, rand(5, 10))
|
||||
if(power > SEVERE_POWER_PENALTY_THRESHOLD && prob(2) || prob(0.3) && power > POWER_PENALTY_THRESHOLD)
|
||||
supermatter_anomaly_gen(src, PYRO_ANOMALY, rand(5, 10))
|
||||
|
||||
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
|
||||
if (damage - damage_archived > 0)
|
||||
min_damage += ((damage - damage_archived) / 9) * SUPERMATTER_INTEGRITY_MULT
|
||||
if(damage > (min_damage < 200 ? min_damage : 0) + warning_point) // while the core is still damaged and it's still worth noting its status
|
||||
if((REALTIMEOFDAY - lastwarning) / 10 >= WARNING_DELAY)
|
||||
alarm()
|
||||
|
||||
@@ -514,7 +524,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
if(!istype(Proj.firer, /obj/machinery/power/emitter))
|
||||
investigate_log("has been hit by [Proj] fired by [key_name(Proj.firer)]", INVESTIGATE_SUPERMATTER)
|
||||
if(Proj.flag != "bullet")
|
||||
power += Proj.damage * config_bullet_energy
|
||||
power_calc += Proj.damage * config_bullet_energy
|
||||
if(!has_been_powered)
|
||||
investigate_log("has been powered for the first time.", INVESTIGATE_SUPERMATTER)
|
||||
message_admins("[src] has been powered for the first time [ADMIN_JMP(src)].")
|
||||
@@ -615,6 +625,17 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
to_chat(user, "<span class='notice'>You extract a sliver from \the [src]. \The [src] begins to react violently!</span>")
|
||||
new /obj/item/nuke_core/supermatter_sliver(drop_location())
|
||||
matter_power += 200
|
||||
if (istype(W, /obj/item/supermatterspray))
|
||||
var/obj/item/supermatterspray/S = W
|
||||
if (S.usesleft > 0 && do_after(user, 60, target=src))
|
||||
min_damage = max(0,min_damage - 10)
|
||||
to_chat(user, "<span class='notice'>You spray \the [src] with [S].</span>")
|
||||
playsound(user.loc,'sound/effects/spray2.ogg',50,1,-6)
|
||||
S.usesleft--
|
||||
if (prob(10))
|
||||
to_chat(user, "<span class='warning'>Your hands slip and you drop [S] into \the [src]!</span>")
|
||||
Consume(S)
|
||||
return
|
||||
else if(user.dropItemToGround(W))
|
||||
user.visible_message("<span class='danger'>As [user] touches \the [src] with \a [W], silence fills the room...</span>",\
|
||||
"<span class='userdanger'>You touch \the [src] with \the [W], and everything suddenly goes silent.</span>\n<span class='notice'>\The [W] flashes into dust as you flinch away from \the [src].</span>",\
|
||||
|
||||
Reference in New Issue
Block a user