mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'master' of github.com:Baystation12/Baystation12 into dev-freeze
Conflicts: code/ATMOSPHERICS/pipes.dm code/game/dna/genes/powers.dm code/game/objects/items/devices/PDA/PDA.dm
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
if(pressure_checks&2)
|
||||
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(pressure_delta > 0.5)
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(pressure_checks&2)
|
||||
pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(pressure_delta > 0.5)
|
||||
if(environment.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/u
|
||||
return ..()
|
||||
|
||||
if(istype(W,/obj/item/device/pipe_painter))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
@@ -1107,4 +1107,4 @@ obj/machinery/atmospherics/pipe/vent/hide(var/i) //to make the little pipe secti
|
||||
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
|
||||
dir = get_dir(src, node1)
|
||||
else
|
||||
icon_state = "exposed"
|
||||
icon_state = "exposed"
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
|
||||
// This new system will loop at around 1000 in an empty server.
|
||||
|
||||
// SCREW THAT SHIT, we're not recursing.
|
||||
|
||||
/proc/get_mobs_in_view(var/R, var/atom/source)
|
||||
// Returns a list of mobs in range of R from source. Used in radio and say code.
|
||||
|
||||
@@ -172,18 +174,33 @@
|
||||
|
||||
var/list/range = hear(R, T)
|
||||
|
||||
for(var/atom/A in range)
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
hear += M
|
||||
//world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
|
||||
else if(istype(A, /obj/item/device/radio))
|
||||
hear += A
|
||||
for(var/mob/M in range)
|
||||
hear += M
|
||||
|
||||
var/list/objects = list()
|
||||
|
||||
if(isobj(A) || ismob(A))
|
||||
hear |= recursive_mob_check(A, hear, 3, 1, 0, 1)
|
||||
for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object
|
||||
objects += O
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(!istype(C) || !C.eye)
|
||||
continue //I have no idea when this client check would be needed, but if this runtimes people won't hear anything
|
||||
//So kinda paranoid about runtime avoidance.
|
||||
if(istype(C.eye, /obj/machinery/camera))
|
||||
continue //No microphones in cameras.
|
||||
|
||||
if(C.mob in hear)
|
||||
continue
|
||||
|
||||
var/list/hear_and_objects = (hear|objects) //Combined these lists here instead of doing the combine 3 more times.
|
||||
|
||||
if(C.eye in hear_and_objects)
|
||||
hear += C.mob
|
||||
|
||||
else if(C.mob.loc in hear_and_objects)
|
||||
hear += C.mob
|
||||
else if(C.mob.loc.loc in hear_and_objects)
|
||||
hear += C.mob
|
||||
return hear
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/rate
|
||||
var/list/solars // for debugging purposes, references solars_list at the constructor
|
||||
var/nexttime = 3600 // Replacement for var/counter to force the sun to move every X IC minutes
|
||||
var/lastAngleUpdate
|
||||
|
||||
/datum/sun/New()
|
||||
|
||||
@@ -28,15 +29,25 @@
|
||||
counter = 0 */
|
||||
|
||||
angle = ((rate*world.time/100)%360 + 360)%360
|
||||
|
||||
/*
|
||||
Yields a 45 - 75 IC minute rotational period
|
||||
Rotation rate can vary from 4.8 deg/min to 8 deg/min (288 to 480 deg/hr)
|
||||
*/
|
||||
|
||||
// To prevent excess server load the server only updates the sun's sight lines every 6 minutes
|
||||
if(nexttime < world.time)
|
||||
if(lastAngleUpdate != angle)
|
||||
for(var/obj/machinery/power/tracker/T in solars_list)
|
||||
if(!T.powernet)
|
||||
solars_list.Remove(T)
|
||||
continue
|
||||
T.set_angle(angle)
|
||||
lastAngleUpdate=angle
|
||||
|
||||
|
||||
|
||||
if(nexttime > world.time)
|
||||
return
|
||||
nexttime = nexttime + 3600 // 600 world.time ticks = 1 minute, 3600 = 6 minutes.
|
||||
nexttime = nexttime + 600 // 600 world.time ticks = 1 minute
|
||||
|
||||
// now calculate and cache the (dx,dy) increments for line drawing
|
||||
|
||||
@@ -58,22 +69,13 @@
|
||||
dy = c / abs(s)
|
||||
|
||||
|
||||
for(var/obj/machinery/power/M in solars_list)
|
||||
for(var/obj/machinery/power/solar/S in solars_list)
|
||||
|
||||
if(!M.powernet)
|
||||
solars_list.Remove(M)
|
||||
if(!S.powernet)
|
||||
solars_list.Remove(S)
|
||||
continue
|
||||
|
||||
// Solar Tracker
|
||||
if(istype(M, /obj/machinery/power/tracker))
|
||||
var/obj/machinery/power/tracker/T = M
|
||||
T.set_angle(angle)
|
||||
|
||||
// Solar Panel
|
||||
else if(istype(M, /obj/machinery/power/solar))
|
||||
var/obj/machinery/power/solar/S = M
|
||||
if(S.control)
|
||||
occlusion(S)
|
||||
if(S.control)
|
||||
occlusion(S)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ var/global/list/datum/dna/gene/dna_genes[0]
|
||||
/////////////////
|
||||
// GENE DEFINES
|
||||
/////////////////
|
||||
// Skip checking if it's already active.
|
||||
// Used for genes that check for value rather than a binary on/off.
|
||||
#define GENE_ALWAYS_ACTIVATE 1
|
||||
|
||||
// Skip checking if it's already active.
|
||||
// Used for genes that check for value rather than a binary on/off.
|
||||
@@ -96,7 +99,6 @@ var/global/list/datum/dna/gene/dna_genes[0]
|
||||
new_dna.UpdateUI()
|
||||
new_dna.UpdateSE()
|
||||
return new_dna
|
||||
|
||||
///////////////////////////////////////
|
||||
// UNIQUE IDENTITY
|
||||
///////////////////////////////////////
|
||||
@@ -150,7 +152,7 @@ var/global/list/datum/dna/gene/dna_genes[0]
|
||||
// Set a DNA UI block's raw value.
|
||||
/datum/dna/proc/SetUIValue(var/block,var/value,var/defer=0)
|
||||
if (block<=0) return
|
||||
ASSERT(value>=0)
|
||||
ASSERT(value>0)
|
||||
ASSERT(value<=4095)
|
||||
UI[block]=value
|
||||
dirtyUI=1
|
||||
@@ -166,6 +168,7 @@ var/global/list/datum/dna/gene/dna_genes[0]
|
||||
// Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list)
|
||||
/datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue,var/defer=0)
|
||||
if (block<=0) return
|
||||
if (value==0) value = 1 // FIXME: hair/beard/eye RGB values if they are 0 are not set, this is a work around we'll encode it in the DNA to be 1 instead.
|
||||
ASSERT(maxvalue<=4095)
|
||||
var/range = (4095 / maxvalue)
|
||||
if(value)
|
||||
|
||||
@@ -143,8 +143,7 @@
|
||||
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
|
||||
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
|
||||
|
||||
var/new_s_tone = dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220)
|
||||
H.s_tone = 35 - max(min( round(new_s_tone), 220),1) //Warning MATH. Blame the person that wrote modules/client/preferences.dm, line 994
|
||||
H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative.
|
||||
|
||||
if (dna.GetUIState(DNA_UI_GENDER))
|
||||
H.gender = FEMALE
|
||||
@@ -171,5 +170,3 @@
|
||||
// Used below, simple injection modifier.
|
||||
/proc/probinj(var/pr, var/inj)
|
||||
return prob(pr+inj*pr)
|
||||
|
||||
/////////////////////////// DNA MISC-PROCS
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
M.mutations.Add(mutation)
|
||||
if(disability)
|
||||
M.disabilities|=disability
|
||||
if(sdisability)
|
||||
if(mutation)
|
||||
M.sdisabilities|=sdisability
|
||||
if(activation_message)
|
||||
M << "\red [activation_message]"
|
||||
@@ -43,9 +43,9 @@
|
||||
if(mutation && (mutation in M.mutations))
|
||||
M.mutations.Remove(mutation)
|
||||
if(disability)
|
||||
M.disabilities &= ~disability
|
||||
if(sdisability)
|
||||
M.sdisabilities &= ~sdisability
|
||||
M.disabilities-=disability
|
||||
if(mutation)
|
||||
M.sdisabilities-=sdisability
|
||||
if(deactivation_message)
|
||||
M << "\red [deactivation_message]"
|
||||
else
|
||||
@@ -126,4 +126,4 @@
|
||||
disability=NEARSIGHTED
|
||||
|
||||
New()
|
||||
block=GLASSESBLOCK
|
||||
block=GLASSESBLOCK
|
||||
|
||||
@@ -191,6 +191,5 @@
|
||||
|
||||
New()
|
||||
block=TELEBLOCK
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "telekinesishead[fat]_s"
|
||||
return "telekinesishead[fat]_s"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
volume = 1000
|
||||
use_power = 0
|
||||
var/release_log = ""
|
||||
var/update_flag = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
@@ -49,30 +50,64 @@
|
||||
canister_color = "grey"
|
||||
can_label = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
update_flag = 0
|
||||
if(holding)
|
||||
update_flag |= 1
|
||||
if(connected_port)
|
||||
update_flag |= 2
|
||||
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
if(tank_pressure < 10)
|
||||
update_flag |= 4
|
||||
else if(tank_pressure < ONE_ATMOSPHERE)
|
||||
update_flag |= 8
|
||||
else if(tank_pressure < 15*ONE_ATMOSPHERE)
|
||||
update_flag |= 16
|
||||
else
|
||||
update_flag |= 32
|
||||
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/update_icon()
|
||||
src.overlays = 0
|
||||
/*
|
||||
update_flag
|
||||
1 = holding
|
||||
2 = connected_port
|
||||
4 = tank_pressure < 10
|
||||
8 = tank_pressure < ONE_ATMOS
|
||||
16 = tank_pressure < 15*ONE_ATMOS
|
||||
32 = tank_pressure go boom.
|
||||
*/
|
||||
|
||||
if (src.destroyed)
|
||||
src.overlays = 0
|
||||
src.icon_state = text("[]-1", src.canister_color)
|
||||
|
||||
else
|
||||
if(icon_state != "[canister_color]")
|
||||
icon_state = "[canister_color]"
|
||||
if(holding)
|
||||
overlays += "can-open"
|
||||
|
||||
if(check_change()) //Returns 1 if no change needed to icons.
|
||||
return
|
||||
|
||||
if(connected_port)
|
||||
overlays += "can-connector"
|
||||
src.overlays = 0
|
||||
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
|
||||
if (tank_pressure < 10)
|
||||
overlays += image('icons/obj/atmos.dmi', "can-o0")
|
||||
else if (tank_pressure < ONE_ATMOSPHERE)
|
||||
overlays += image('icons/obj/atmos.dmi', "can-o1")
|
||||
else if (tank_pressure < 15*ONE_ATMOSPHERE)
|
||||
overlays += image('icons/obj/atmos.dmi', "can-o2")
|
||||
else
|
||||
overlays += image('icons/obj/atmos.dmi', "can-o3")
|
||||
if(update_flag & 1)
|
||||
overlays += "can-open"
|
||||
if(update_flag & 2)
|
||||
overlays += "can-connector"
|
||||
if(update_flag & 4)
|
||||
overlays += "can-o0"
|
||||
if(update_flag & 8)
|
||||
overlays += "can-o1"
|
||||
else if(update_flag & 16)
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
|
||||
@@ -178,8 +178,8 @@
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
if(T>= 2)
|
||||
T -= 2
|
||||
if(T>= 1)
|
||||
T -= 1
|
||||
diff = round(initial(time_coeff) - (initial(time_coeff)*(T))/25,0.01)
|
||||
if(time_coeff!=diff)
|
||||
time_coeff = diff
|
||||
|
||||
@@ -682,7 +682,33 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
M.close()
|
||||
|
||||
if("Detonate")//Detonate PDA... maybe
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
|
||||
var/useTC = 0
|
||||
if(signal)
|
||||
if(signal.data["done"])
|
||||
useTC = 1
|
||||
var/turf/pos = get_turf(src)
|
||||
if(pos.z in signal.data["level"])
|
||||
useTC = 2
|
||||
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
if(!(useMS && useTC))
|
||||
U.show_message("\red An error flashes on your [src]: Connection unavailable", 1)
|
||||
return
|
||||
if(useTC != 2) // Does our recepient have a broadcaster on their level?
|
||||
U.show_message("\red An error flashes on your [src]: Recipient unavailable", 1)
|
||||
return
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
@@ -866,13 +892,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(useMS && useTC) // only send the message if it's stable
|
||||
if(useTC != 2) // Does our recepient have a broadcaster on their level?
|
||||
U << "ERROR: Cannot reach recepient."
|
||||
U << "ERROR: Cannot reach recipient."
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
|
||||
P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]")))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) // src.client is so that ghosts don't have to listen to mice
|
||||
if(istype(M, /mob/new_player))
|
||||
continue
|
||||
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span></span>")
|
||||
|
||||
if(!conversations.Find("\ref[P]"))
|
||||
|
||||
@@ -4,22 +4,13 @@
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/New()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
@@ -44,6 +35,7 @@
|
||||
icon_closed = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
@@ -58,6 +50,7 @@
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
@@ -77,6 +70,7 @@
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/suit/nun(src)
|
||||
@@ -97,6 +91,7 @@
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
@@ -111,6 +106,7 @@
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/unathi/mantle(src)
|
||||
new /obj/item/clothing/suit/unathi/robe(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
@@ -126,6 +122,7 @@
|
||||
icon_closed = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
@@ -141,6 +138,7 @@
|
||||
icon_closed = "wardrobe-y"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
@@ -156,6 +154,7 @@
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
@@ -178,6 +177,7 @@
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
@@ -199,6 +199,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
@@ -214,6 +215,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
@@ -231,6 +233,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
@@ -252,6 +255,7 @@
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
@@ -269,6 +273,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
@@ -284,6 +289,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
@@ -299,6 +305,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
@@ -316,6 +323,7 @@
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
@@ -336,6 +344,7 @@
|
||||
icon_closed = "grey"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
@@ -354,6 +363,7 @@
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
@@ -386,4 +396,4 @@
|
||||
new /obj/item/weapon/storage/belt/security/tactical(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -124,49 +124,147 @@ var/intercom_range_display_status = 0
|
||||
del(F)
|
||||
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/list/debug_verbs = list (
|
||||
/client/proc/do_not_use_these
|
||||
,/client/proc/camera_view
|
||||
,/client/proc/sec_camera_report
|
||||
,/client/proc/intercom_view
|
||||
,/client/proc/air_status
|
||||
,/client/proc/Cell
|
||||
,/client/proc/atmosscan
|
||||
,/client/proc/powerdebug
|
||||
,/client/proc/count_objects_on_z_level
|
||||
,/client/proc/count_objects_all
|
||||
,/client/proc/cmd_assume_direct_control
|
||||
,/client/proc/jump_to_dead_group
|
||||
,/client/proc/startSinglo
|
||||
,/client/proc/ticklag
|
||||
,/client/proc/cmd_admin_grantfullaccess
|
||||
,/client/proc/kaboom
|
||||
,/client/proc/splash
|
||||
,/client/proc/cmd_admin_areatest
|
||||
,/client/proc/cmd_admin_rejuvenate
|
||||
,/datum/admins/proc/show_traitor_panel
|
||||
,/client/proc/print_jobban_old
|
||||
,/client/proc/print_jobban_old_filter
|
||||
,/client/proc/forceEvent
|
||||
,/client/proc/break_all_air_groups
|
||||
,/client/proc/regroup_all_air_groups
|
||||
,/client/proc/kill_pipe_processing
|
||||
,/client/proc/kill_air_processing
|
||||
,/client/proc/disable_communication
|
||||
,/client/proc/disable_movement
|
||||
,/client/proc/Zone_Info
|
||||
,/client/proc/Test_ZAS_Connection
|
||||
,/client/proc/ZoneTick
|
||||
,/client/proc/TestZASRebuild
|
||||
,/client/proc/hide_debug_verbs
|
||||
,/client/proc/testZAScolors
|
||||
,/client/proc/testZAScolors_remove
|
||||
)
|
||||
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
src.verbs += /client/proc/do_not_use_these //-errorage
|
||||
src.verbs += /client/proc/camera_view //-errorage
|
||||
src.verbs += /client/proc/sec_camera_report //-errorage
|
||||
src.verbs += /client/proc/intercom_view //-errorage
|
||||
src.verbs += /client/proc/air_status //Air things
|
||||
src.verbs += /client/proc/Cell //More air things
|
||||
src.verbs += /client/proc/atmosscan //check plumbing
|
||||
src.verbs += /client/proc/powerdebug //check power
|
||||
src.verbs += /client/proc/count_objects_on_z_level
|
||||
src.verbs += /client/proc/count_objects_all
|
||||
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
|
||||
src.verbs += /client/proc/jump_to_dead_group
|
||||
src.verbs += /client/proc/startSinglo
|
||||
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
|
||||
src.verbs += /client/proc/cmd_admin_grantfullaccess
|
||||
src.verbs += /client/proc/kaboom
|
||||
src.verbs += /client/proc/splash
|
||||
src.verbs += /client/proc/cmd_admin_areatest
|
||||
src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
src.verbs += /datum/admins/proc/show_traitor_panel
|
||||
src.verbs += /client/proc/print_jobban_old
|
||||
src.verbs += /client/proc/print_jobban_old_filter
|
||||
src.verbs += /client/proc/forceEvent
|
||||
src.verbs += /client/proc/break_all_air_groups
|
||||
src.verbs += /client/proc/regroup_all_air_groups
|
||||
src.verbs += /client/proc/kill_pipe_processing
|
||||
src.verbs += /client/proc/kill_air_processing
|
||||
src.verbs += /client/proc/disable_communication
|
||||
src.verbs += /client/proc/disable_movement
|
||||
src.verbs += /client/proc/Zone_Info
|
||||
src.verbs += /client/proc/Test_ZAS_Connection
|
||||
src.verbs += /client/proc/ZoneTick
|
||||
src.verbs += /client/proc/TestZASRebuild
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
verbs += debug_verbs
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/hide_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Hide Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
verbs -= debug_verbs
|
||||
|
||||
feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/var/list/testZAScolors_turfs = list()
|
||||
/client/var/list/testZAScolors_zones = list()
|
||||
/client/var/usedZAScolors = 0
|
||||
/client/var/list/image/ZAScolors = list()
|
||||
|
||||
/client/proc/recurse_zone(var/zone/Z, var/recurse_level =1)
|
||||
testZAScolors_zones += Z
|
||||
if(recurse_level > 10)
|
||||
return
|
||||
var/icon/yellow = new('icons/misc/debug_group.dmi', "yellow")
|
||||
|
||||
for(var/turf/T in Z.contents)
|
||||
images += image(yellow, T, "zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/connected in Z.connected_zones)
|
||||
if(connected in testZAScolors_zones)
|
||||
continue
|
||||
recurse_zone(connected,recurse_level+1)
|
||||
|
||||
|
||||
/client/proc/testZAScolors()
|
||||
set category = "ZAS"
|
||||
set name = "Check ZAS connections"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
testZAScolors_remove()
|
||||
|
||||
var/turf/location = get_turf(usr)
|
||||
|
||||
if(!istype(location, /turf/simulated)) // We're in space, let's not cause runtimes.
|
||||
usr << "\red this debug tool cannot be used from space"
|
||||
return
|
||||
|
||||
var/icon/red = new('icons/misc/debug_group.dmi', "red") //created here so we don't have to make thousands of these.
|
||||
var/icon/green = new('icons/misc/debug_group.dmi', "green")
|
||||
var/icon/blue = new('icons/misc/debug_group.dmi', "blue")
|
||||
|
||||
if(!usedZAScolors)
|
||||
usr << "ZAS Test Colors"
|
||||
usr << "Green = Zone you are standing in"
|
||||
usr << "Blue = Connected zone to the zone you are standing in"
|
||||
usr << "Yellow = A zone that is connected but not one adjacent to your connected zone"
|
||||
usr << "Red = Not connected"
|
||||
usedZAScolors = 1
|
||||
|
||||
testZAScolors_zones += location.zone
|
||||
for(var/turf/T in location.zone.contents)
|
||||
images += image(green, T,"zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/Z in location.zone.connected_zones)
|
||||
testZAScolors_zones += Z
|
||||
for(var/turf/T in Z.contents)
|
||||
images += image(blue, T,"zasdebug",TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/connected in Z.connected_zones)
|
||||
if(connected in testZAScolors_zones)
|
||||
continue
|
||||
recurse_zone(connected,1)
|
||||
|
||||
for(var/turf/T in range(25,location))
|
||||
if(!istype(T))
|
||||
continue
|
||||
if(T in testZAScolors_turfs)
|
||||
continue
|
||||
images += image(red, T, "zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
|
||||
/client/proc/testZAScolors_remove()
|
||||
set category = "ZAS"
|
||||
set name = "Remove ZAS connection colors"
|
||||
|
||||
testZAScolors_turfs.Cut()
|
||||
testZAScolors_zones.Cut()
|
||||
|
||||
if(images.len)
|
||||
for(var/image/i in images)
|
||||
if(i.icon_state == "zasdebug")
|
||||
images.Remove(i)
|
||||
|
||||
|
||||
/client/proc/count_objects_on_z_level()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects On Level"
|
||||
@@ -181,7 +279,7 @@ var/intercom_range_display_status = 0
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
|
||||
var/count = 0
|
||||
var/count = 1
|
||||
|
||||
var/list/atom/atom_list = list()
|
||||
|
||||
@@ -312,4 +410,4 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
message_admins("[src.ckey] used 'Disable all movement', killing all movement.")
|
||||
movement_disabled_exception = usr.ckey
|
||||
else
|
||||
message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/
|
||||
message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/
|
||||
|
||||
@@ -38,13 +38,15 @@
|
||||
|
||||
// Type 1 (Visual) emotes are sent to anyone in view of the item
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
|
||||
can_see |= viewers(src,null)
|
||||
for (var/mob/O in can_see)
|
||||
O.show_message(message, m_type)
|
||||
|
||||
// Type 2 (Audible) emotes are sent to anyone in hear range
|
||||
// of the *LOCATION* -- this is important for pAIs to be heard
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(get_turf(src), null))
|
||||
for (var/mob/O in get_mobs_in_view(7,src))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
/mob/proc/emote_dead(var/message)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "body_m_s"
|
||||
var/list/hud_list = list()
|
||||
var/datum/species/species //Contains icon generation and language information, set during New().
|
||||
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
@@ -46,6 +47,7 @@
|
||||
|
||||
if(!dna)
|
||||
dna = new /datum/dna(null)
|
||||
dna.species=species.name
|
||||
|
||||
for(var/i=0;i<7;i++) // 2 for medHUDs and 5 for secHUDs
|
||||
hud_list += image('icons/mob/hud.dmi', src, "hudunknown")
|
||||
@@ -1184,8 +1186,14 @@
|
||||
|
||||
/mob/living/carbon/human/proc/set_species(var/new_species)
|
||||
|
||||
if(!new_species)
|
||||
new_species = "Human"
|
||||
if(!dna)
|
||||
if(!new_species)
|
||||
new_species = "Human"
|
||||
else
|
||||
if(!new_species)
|
||||
new_species = dna.species
|
||||
else
|
||||
dna.species = new_species
|
||||
|
||||
if(species && (species.name && species.name == new_species))
|
||||
return
|
||||
|
||||
@@ -251,6 +251,7 @@ This function restores all organs.
|
||||
if( (damage > (10*W.w_class)) && ( (sharp && !ismob(W.loc)) || prob(damage/W.w_class) ) )
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
W.add_blood(src)
|
||||
if(ismob(W.loc))
|
||||
@@ -258,4 +259,4 @@ This function restores all organs.
|
||||
H.drop_item()
|
||||
W.loc = src
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -99,6 +99,7 @@ emp_act
|
||||
(SP.loc) = organ
|
||||
organ.implants += SP
|
||||
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
SP.add_blood(src)
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
if(embedded_flag)
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
|
||||
if(reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
handle_environment(environment)
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp
|
||||
update_canmove()
|
||||
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
@@ -1067,6 +1067,13 @@
|
||||
if(halloss > 0)
|
||||
adjustHalLoss(-1)
|
||||
|
||||
if(embedded_flag && !(life_tick % 10))
|
||||
var/list/E
|
||||
E = get_visible_implants(0)
|
||||
if(!E.len)
|
||||
embedded_flag = 0
|
||||
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2.
|
||||
var/update_muts = 1 // Monkey gene must be set at start.
|
||||
var/alien = 0 //Used for reagent metabolism.
|
||||
var/alien = 0 //Used for reagent metabolism.
|
||||
|
||||
/mob/living/carbon/monkey/tajara
|
||||
name = "farwa"
|
||||
|
||||
@@ -302,7 +302,7 @@ var/list/department_radio_keys = list(
|
||||
var/list/listening
|
||||
|
||||
listening = get_mobs_in_view(message_range, src)
|
||||
var/list/onscreen = get_mobs_in_view(7, src)
|
||||
var/list/onscreen = viewers()
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
|
||||
@@ -643,5 +643,12 @@
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
dat += "<br><br>"
|
||||
dat += "Messages: <hr> [pda.tnote]"
|
||||
return dat
|
||||
for(var/index in pda.tnote)
|
||||
if(index["sent"])
|
||||
dat += addtext("<i><b>→ To <a href='byond://?src=\ref[src];software=pdamessage;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
dat += addtext("<i><b>← From <a href='byond://?src=\ref[src];software=pdamessage;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
|
||||
|
||||
|
||||
return dat
|
||||
|
||||
@@ -3,7 +3,33 @@
|
||||
#define APC_WIRE_MAIN_POWER2 3
|
||||
#define APC_WIRE_AI_CONTROL 4
|
||||
|
||||
#define APC_UPDATE_ICON_COOLDOWN 200 // 20 seconds
|
||||
//update_state
|
||||
#define UPSTATE_CELL_IN 1
|
||||
#define UPSTATE_OPENED1 2
|
||||
#define UPSTATE_OPENED2 4
|
||||
#define UPSTATE_MAINT 8
|
||||
#define UPSTATE_BROKE 16
|
||||
#define UPSTATE_BLUESCREEN 32
|
||||
#define UPSTATE_WIREEXP 64
|
||||
#define UPSTATE_ALLGOOD 128
|
||||
|
||||
//update_overlay
|
||||
#define APC_UPOVERLAY_CHARGEING0 1
|
||||
#define APC_UPOVERLAY_CHARGEING1 2
|
||||
#define APC_UPOVERLAY_CHARGEING2 4
|
||||
#define APC_UPOVERLAY_EQUIPMENT0 8
|
||||
#define APC_UPOVERLAY_EQUIPMENT1 16
|
||||
#define APC_UPOVERLAY_EQUIPMENT2 32
|
||||
#define APC_UPOVERLAY_LIGHTING0 64
|
||||
#define APC_UPOVERLAY_LIGHTING1 128
|
||||
#define APC_UPOVERLAY_LIGHTING2 256
|
||||
#define APC_UPOVERLAY_ENVIRON0 512
|
||||
#define APC_UPOVERLAY_ENVIRON1 1024
|
||||
#define APC_UPOVERLAY_ENVIRON2 2048
|
||||
#define APC_UPOVERLAY_LOCKED 4096
|
||||
|
||||
#define APC_UPDATE_ICON_COOLDOWN 100 // 10 seconds
|
||||
|
||||
|
||||
// the Area Power Controller (APC), formerly Power Distribution Unit (PDU)
|
||||
// one per area, needs wire conection to power network
|
||||
@@ -18,7 +44,6 @@
|
||||
|
||||
/obj/machinery/power/apc
|
||||
name = "area power controller"
|
||||
|
||||
icon_state = "apc0"
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
@@ -64,8 +89,16 @@
|
||||
"Yellow" = 4,
|
||||
)
|
||||
var/longtermpower = 10
|
||||
var/update_state = -1
|
||||
var/update_overlay = -1
|
||||
var/global/status_overlays = 0
|
||||
var/updating_icon = 0
|
||||
//var/debug = 0
|
||||
var/global/list/status_overlays_lock
|
||||
var/global/list/status_overlays_charging
|
||||
var/global/list/status_overlays_equipment
|
||||
var/global/list/status_overlays_lighting
|
||||
var/global/list/status_overlays_environ
|
||||
|
||||
|
||||
/proc/RandomAPCWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
@@ -175,36 +208,162 @@
|
||||
else
|
||||
usr << "The cover is closed."
|
||||
|
||||
|
||||
// update the APC icon to show the three base states
|
||||
// also add overlays for indicator lights
|
||||
/obj/machinery/power/apc/update_icon()
|
||||
|
||||
if (!status_overlays)
|
||||
status_overlays = 1
|
||||
status_overlays_lock = new
|
||||
status_overlays_charging = new
|
||||
status_overlays_equipment = new
|
||||
status_overlays_lighting = new
|
||||
status_overlays_environ = new
|
||||
|
||||
overlays.Cut()
|
||||
if(opened)
|
||||
var/basestate = "apc[ cell ? "2" : "1" ]" // if opened, show cell if it's inserted
|
||||
if (opened==1)
|
||||
if (stat & (MAINT|BROKEN))
|
||||
icon_state = "apcmaint" //disassembled APC cannot hold cell
|
||||
else
|
||||
icon_state = basestate
|
||||
else if (opened == 2)
|
||||
icon_state = "[basestate]-nocover"
|
||||
else if (stat & BROKEN)
|
||||
icon_state = "apc-b"
|
||||
else if(emagged || malfai)
|
||||
icon_state = "apcemag"
|
||||
else if(wiresexposed)
|
||||
icon_state = "apcewires"
|
||||
else
|
||||
icon_state = "apc0"
|
||||
// if closed, update overlays for channel status
|
||||
if(!(stat & (BROKEN|MAINT)))
|
||||
overlays.Add("apcox-[locked]","apco3-[charging]") // 0=blue 1=red // 0=red, 1=yellow/black 2=green
|
||||
status_overlays_lock.len = 2
|
||||
status_overlays_charging.len = 3
|
||||
status_overlays_equipment.len = 4
|
||||
status_overlays_lighting.len = 4
|
||||
status_overlays_environ.len = 4
|
||||
|
||||
status_overlays_lock[1] = image(icon, "apcox-0") // 0=blue 1=red
|
||||
status_overlays_lock[2] = image(icon, "apcox-1")
|
||||
|
||||
status_overlays_charging[1] = image(icon, "apco3-0")
|
||||
status_overlays_charging[2] = image(icon, "apco3-1")
|
||||
status_overlays_charging[3] = image(icon, "apco3-2")
|
||||
|
||||
status_overlays_equipment[1] = image(icon, "apco0-0") // 0=red, 1=green, 2=blue
|
||||
status_overlays_equipment[2] = image(icon, "apco0-1")
|
||||
status_overlays_equipment[3] = image(icon, "apco0-2")
|
||||
status_overlays_equipment[4] = image(icon, "apco0-3")
|
||||
|
||||
status_overlays_lighting[1] = image(icon, "apco1-0")
|
||||
status_overlays_lighting[2] = image(icon, "apco1-1")
|
||||
status_overlays_lighting[3] = image(icon, "apco1-2")
|
||||
status_overlays_lighting[4] = image(icon, "apco1-3")
|
||||
|
||||
status_overlays_environ[1] = image(icon, "apco2-0")
|
||||
status_overlays_environ[2] = image(icon, "apco2-1")
|
||||
status_overlays_environ[3] = image(icon, "apco2-2")
|
||||
status_overlays_environ[4] = image(icon, "apco2-3")
|
||||
|
||||
|
||||
|
||||
var/update = check_updates() //returns 0 if no need to update icons.
|
||||
// 1 if we need to update the icon_state
|
||||
// 2 if we need to update the overlays
|
||||
if(!update)
|
||||
return
|
||||
|
||||
if(update & 1) // Updating the icon state
|
||||
if(update_state & UPSTATE_ALLGOOD)
|
||||
icon_state = "apc0"
|
||||
else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
|
||||
var/basestate = "apc[ cell ? "2" : "1" ]"
|
||||
if(update_state & UPSTATE_OPENED1)
|
||||
if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE))
|
||||
icon_state = "apcmaint" //disabled APC cannot hold cell
|
||||
else
|
||||
icon_state = basestate
|
||||
else if(update_state & UPSTATE_OPENED2)
|
||||
icon_state = "[basestate]-nocover"
|
||||
else if(update_state & UPSTATE_BROKE)
|
||||
icon_state = "apc-b"
|
||||
else if(update_state & UPSTATE_BLUESCREEN)
|
||||
icon_state = "apcemag"
|
||||
else if(update_state & UPSTATE_WIREEXP)
|
||||
icon_state = "apcewires"
|
||||
|
||||
|
||||
|
||||
if(!(update_state & UPSTATE_ALLGOOD))
|
||||
if(overlays.len)
|
||||
overlays = 0
|
||||
return
|
||||
|
||||
|
||||
|
||||
if(update & 2)
|
||||
|
||||
if(overlays.len)
|
||||
overlays = 0
|
||||
|
||||
if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
|
||||
overlays += status_overlays_lock[locked+1]
|
||||
overlays += status_overlays_charging[charging+1]
|
||||
if(operating)
|
||||
overlays.Add("apco0-[equipment]","apco1-[lighting]","apco2-[environ]") // 0=red, 1=green, 2=blue
|
||||
overlays += status_overlays_equipment[equipment+1]
|
||||
overlays += status_overlays_lighting[lighting+1]
|
||||
overlays += status_overlays_environ[environ+1]
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/check_updates()
|
||||
|
||||
var/last_update_state = update_state
|
||||
var/last_update_overlay = update_overlay
|
||||
update_state = 0
|
||||
update_overlay = 0
|
||||
|
||||
if(cell)
|
||||
update_state |= UPSTATE_CELL_IN
|
||||
if(stat & BROKEN)
|
||||
update_state |= UPSTATE_BROKE
|
||||
if(stat & MAINT)
|
||||
update_state |= UPSTATE_MAINT
|
||||
if(opened)
|
||||
if(opened==1)
|
||||
update_state |= UPSTATE_OPENED1
|
||||
if(opened==2)
|
||||
update_state |= UPSTATE_OPENED2
|
||||
else if(emagged || malfai)
|
||||
update_state |= UPSTATE_BLUESCREEN
|
||||
else if(wiresexposed)
|
||||
update_state |= UPSTATE_WIREEXP
|
||||
if(update_state <= 1)
|
||||
update_state |= UPSTATE_ALLGOOD
|
||||
|
||||
if(update_state & UPSTATE_ALLGOOD)
|
||||
if(locked)
|
||||
update_overlay |= APC_UPOVERLAY_LOCKED
|
||||
|
||||
if(!charging)
|
||||
update_overlay |= APC_UPOVERLAY_CHARGEING0
|
||||
else if(charging == 1)
|
||||
update_overlay |= APC_UPOVERLAY_CHARGEING1
|
||||
else if(charging == 2)
|
||||
update_overlay |= APC_UPOVERLAY_CHARGEING2
|
||||
|
||||
if (!equipment)
|
||||
update_overlay |= APC_UPOVERLAY_EQUIPMENT0
|
||||
else if(equipment == 1)
|
||||
update_overlay |= APC_UPOVERLAY_EQUIPMENT1
|
||||
else if(equipment == 2)
|
||||
update_overlay |= APC_UPOVERLAY_EQUIPMENT2
|
||||
|
||||
if(!lighting)
|
||||
update_overlay |= APC_UPOVERLAY_LIGHTING0
|
||||
else if(lighting == 1)
|
||||
update_overlay |= APC_UPOVERLAY_LIGHTING1
|
||||
else if(lighting == 2)
|
||||
update_overlay |= APC_UPOVERLAY_LIGHTING2
|
||||
|
||||
if(!environ)
|
||||
update_overlay |= APC_UPOVERLAY_ENVIRON0
|
||||
else if(environ==1)
|
||||
update_overlay |= APC_UPOVERLAY_ENVIRON1
|
||||
else if(environ==2)
|
||||
update_overlay |= APC_UPOVERLAY_ENVIRON2
|
||||
|
||||
var/results = 0
|
||||
if(last_update_state == update_state && last_update_overlay == update_overlay)
|
||||
return 0
|
||||
if(last_update_state != update_state)
|
||||
results += 1
|
||||
if(last_update_overlay != update_overlay && update_overlay != 0)
|
||||
results += 2
|
||||
return results
|
||||
|
||||
// Used in process so it doesn't update the icon too much
|
||||
/obj/machinery/power/apc/proc/queue_icon_update()
|
||||
|
||||
if(!updating_icon)
|
||||
@@ -214,6 +373,7 @@
|
||||
update_icon()
|
||||
updating_icon = 0
|
||||
|
||||
|
||||
//attack with an item - open/close cover, insert cell, or (un)lock interface
|
||||
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/user)
|
||||
@@ -1143,8 +1303,6 @@
|
||||
update()
|
||||
else if (last_ch != charging)
|
||||
queue_icon_update()
|
||||
|
||||
//src.updateDialog()
|
||||
src.updateDialog()
|
||||
|
||||
// val 0=off, 1=off(auto) 2=on 3=on(auto)
|
||||
@@ -1267,4 +1425,4 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
|
||||
@@ -35,8 +35,8 @@ Header Section
|
||||
<table align='center' class="top">
|
||||
<tr>
|
||||
<td valign='top'>
|
||||
<font size='2'><b>Code:</b> Abi79, Aryn, Cael_Aislinn,Ccomp5950 ,Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty<br></font>
|
||||
<font size='2'><b>Sprites:</b> Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, Miniature, Searif, Xenone, faux<br></font>
|
||||
<font size='2'><b>Code:</b> Abi79, Aryn, Cael_Aislinn, Ccomp5950 ,Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty<br></font>
|
||||
<font size='2'><b>Sprites:</b> Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, JoeyJo0, Miniature, Searif, Xenone, faux<br></font>
|
||||
<font size='2'><b>Sounds:</b> Aryn<br></font>
|
||||
<font size='2'><b>Thanks To:</b> /tg/ station, Goonstation, Animus Station, Daedalus, and original Spacestation 13 devs. Skibiliano for the IRC bot.</font>
|
||||
</td>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 400 B |
7052
maps/tgstation2.dmm
7052
maps/tgstation2.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user