icons should exist

This commit is contained in:
Letter N
2021-02-14 11:39:56 +08:00
parent 45d6a5f87f
commit de67720a0a
43 changed files with 738 additions and 475 deletions
+5 -10
View File
@@ -1547,22 +1547,17 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
msg += "</UL></BODY></HTML>"
src << browse(msg.Join(), "window=Player_playtime_check")
/datum/admins/proc/cmd_show_exp_panel(client/C)
/datum/admins/proc/cmd_show_exp_panel(client/client_to_check)
if(!check_rights(R_ADMIN))
return
if(!C)
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
if(!client_to_check)
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>", confidential = TRUE)
return
if(!CONFIG_GET(flag/use_exp_tracking))
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>")
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>", confidential = TRUE)
return
var/list/body = list()
body += "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Playtime for [C.key]</title></head><BODY><BR>Playtime:"
body += C.get_exp_report()
body += "<A href='?_src_=holder;[HrefToken()];toggleexempt=[REF(C)]'>Toggle Exempt status</a>"
body += "</BODY></HTML>"
usr << browse(body.Join(), "window=playerplaytime[C.ckey];size=550x615")
new /datum/job_report_menu(client_to_check, usr)
/datum/admins/proc/toggle_exempt_status(client/C)
if(!check_rights(R_ADMIN))
@@ -359,3 +359,27 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
to_chat(src, "Total time (new gas mixture): [total_time]ms")
to_chat(src, "Operations per second: [100000 / (total_time/1000)]")
*/
/// Releases gas from src to output air. This means that it can not transfer air to gas mixture with higher pressure.
/datum/gas_mixture/proc/release_gas_to(datum/gas_mixture/output_air, target_pressure)
var/output_starting_pressure = output_air.return_pressure()
var/input_starting_pressure = return_pressure()
if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
//No need to pump gas if target is already reached or input pressure is too low
//Need at least 10 KPa difference to overcome friction in the mechanism
return FALSE
//Calculate necessary moles to transfer using PV = nRT
if((total_moles() > 0) && (return_temperature()>0))
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
//Can not have a pressure delta that would cause output_pressure > input_pressure
var/transfer_moles = pressure_delta*output_air.return_volume()/(return_temperature() * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = remove(transfer_moles)
output_air.merge(removed)
return TRUE
return FALSE
@@ -55,26 +55,7 @@ Passive gate is similar to the regular pump except:
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
var/output_starting_pressure = air2.return_pressure()
var/input_starting_pressure = air1.return_pressure()
if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
//No need to pump gas if target is already reached or input pressure is too low
//Need at least 10 KPa difference to overcome friction in the mechanism
return
//Calculate necessary moles to transfer using PV = nRT
if((air1.total_moles() > 0) && (air1.return_temperature()>0))
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
//Can not have a pressure delta that would cause output_pressure > input_pressure
var/transfer_moles = pressure_delta*air2.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
air2.merge(removed)
if(air1.release_gas_to(air2, target_pressure))
update_parents()
@@ -2,15 +2,18 @@
/obj/machinery/atmospherics/components/unary/tank
icon = 'icons/obj/atmospherics/pipes/pressure_tank.dmi'
icon_state = "generic"
name = "pressure tank"
desc = "A large vessel containing pressurized gas."
max_integrity = 800
density = TRUE
layer = ABOVE_WINDOW_LAYER
plane = GAME_PLANE
pipe_flags = PIPING_ONE_PER_TURF
var/volume = 10000 //in liters
var/gas_type = 0
/// The typepath of the gas this tank should be filled with.
var/gas_type = null
/obj/machinery/atmospherics/components/unary/tank/New()
..()
@@ -20,6 +23,7 @@
if(gas_type)
air_contents.set_moles(AIR_CONTENTS)
name = "[name] ([GLOB.meta_gas_names[gas_type]])"
setPipingLayer(piping_layer)
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
@@ -38,15 +42,71 @@
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
gas_type = /datum/gas/nitrogen
/obj/machinery/atmospherics/components/unary/tank/nitrous_oxide
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
/obj/machinery/atmospherics/components/unary/tank/nitrous
icon_state = "red_white"
gas_type = /datum/gas/nitrous_oxide
/obj/machinery/atmospherics/components/unary/tank/bz
gas_type = /datum/gas/bz
// /obj/machinery/atmospherics/components/unary/tank/freon
// icon_state = "blue"
// gas_type = /datum/gas/freon
// /obj/machinery/atmospherics/components/unary/tank/halon
// icon_state = "blue"
// gas_type = /datum/gas/halon
// /obj/machinery/atmospherics/components/unary/tank/healium
// icon_state = "red"
// gas_type = /datum/gas/healium
// /obj/machinery/atmospherics/components/unary/tank/hydrogen
// icon_state = "grey"
// gas_type = /datum/gas/hydrogen
/obj/machinery/atmospherics/components/unary/tank/hypernoblium
icon_state = "blue"
gas_type = /datum/gas/hypernoblium
/obj/machinery/atmospherics/components/unary/tank/miasma
gas_type = /datum/gas/miasma
/obj/machinery/atmospherics/components/unary/tank/nitryl
gas_type = /datum/gas/nitryl
/obj/machinery/atmospherics/components/unary/tank/pluoxium
icon_state = "blue"
gas_type = /datum/gas/pluoxium
// /obj/machinery/atmospherics/components/unary/tank/proto_nitrate
// icon_state = "red"
// gas_type = /datum/gas/proto_nitrate
/obj/machinery/atmospherics/components/unary/tank/stimulum
icon_state = "red"
gas_type = /datum/gas/stimulum
/obj/machinery/atmospherics/components/unary/tank/tritium
gas_type = /datum/gas/tritium
/obj/machinery/atmospherics/components/unary/tank/water_vapor
icon_state = "grey"
gas_type = /datum/gas/water_vapor
// /obj/machinery/atmospherics/components/unary/tank/zauker
// gas_type = /datum/gas/zauker
// /obj/machinery/atmospherics/components/unary/tank/helium
// gas_type = /datum/gas/helium
// /obj/machinery/atmospherics/components/unary/tank/antinoblium
// gas_type = /datum/gas/antinoblium
@@ -5,22 +5,28 @@
desc = "A canister for the storage of gas."
icon_state = "yellow"
density = TRUE
var/valve_open = FALSE
var/obj/machinery/atmospherics/components/binary/passive_gate/pump
var/release_log = ""
volume = 1000
var/filled = 0.5
var/gas_type
var/release_pressure = ONE_ATMOSPHERE
var/can_max_release_pressure = (ONE_ATMOSPHERE * 10)
var/can_min_release_pressure = (ONE_ATMOSPHERE / 10)
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 50)
max_integrity = 250
integrity_failure = 0.4
pressure_resistance = 7 * ONE_ATMOSPHERE
var/valve_open = FALSE
var/release_log = ""
var/filled = 0.5
var/gas_type
var/release_pressure = ONE_ATMOSPHERE
var/can_max_release_pressure = (ONE_ATMOSPHERE * 10)
var/can_min_release_pressure = (ONE_ATMOSPHERE / 10)
// this removes atmos fusion cans**
///Max amount of heat allowed inside of the canister before it starts to melt (different tiers have different limits)
// var/heat_limit = 5000
///Max amount of pressure allowed inside of the canister before it starts to break (different tiers have different limits)
// var/pressure_limit = 50000
var/temperature_resistance = 1000 + T0C
var/starter_temp
// Prototype vars
@@ -32,6 +38,8 @@
var/maximum_timer_set = 300
var/timing = FALSE
var/restricted = FALSE
///Set the tier of the canister and overlay used
// var/mode = CANISTER_TIER_1
req_access = list()
var/update = 0
@@ -195,27 +203,19 @@
filled = 1
release_pressure = ONE_ATMOSPHERE*2
/obj/machinery/portable_atmospherics/canister/New(loc, datum/gas_mixture/existing_mixture)
..()
/obj/machinery/portable_atmospherics/canister/Initialize(mapload, datum/gas_mixture/existing_mixture)
. = ..()
if(existing_mixture)
air_contents.copy_from(existing_mixture)
else
create_gas()
pump = new(src, FALSE)
pump.on = TRUE
pump.stat = 0
SSair.add_to_rebuild_queue(pump)
update_icon()
/obj/machinery/portable_atmospherics/canister/Destroy()
qdel(pump)
pump = null
return ..()
/obj/machinery/portable_atmospherics/canister/proc/create_gas()
if(gas_type)
// air_contents.add_gas(gas_type)
if(starter_temp)
air_contents.set_temperature(starter_temp)
air_contents.set_moles(gas_type,(maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
@@ -266,14 +266,17 @@
if(user.a_intent == INTENT_HARM)
return FALSE
if(stat & BROKEN)
if(!I.tool_start_check(user, amount=0))
return TRUE
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
if(I.use_tool(src, user, 30, volume=50))
deconstruct(TRUE)
else
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
if(!I.tool_start_check(user, amount=0))
return TRUE
var/pressure = air_contents.return_pressure()
if(pressure > 300)
to_chat(user, "<span class='alert'>The pressure gauge on \the [src] indicates a high pressure inside... maybe you want to reconsider?</span>")
message_admins("[src] deconstructed by [ADMIN_LOOKUPFLW(user)]")
log_game("[src] deconstructed by [key_name(user)]")
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
if(I.use_tool(src, user, 3 SECONDS, volume=50))
to_chat(user, "<span class='notice'>You cut \the [src] apart.</span>")
deconstruct(TRUE)
return TRUE
@@ -317,18 +320,19 @@
valve_open = !valve_open
timing = FALSE
if(!valve_open)
pump.airs[1] = null
pump.airs[2] = null
return
var/turf/T = get_turf(src)
var/datum/gas_mixture/target_air = holding ? holding.air_contents : T.return_air()
var/turf/T = get_turf(src)
pump.airs[1] = air_contents
pump.airs[2] = holding ? holding.air_contents : T.return_air()
pump.target_pressure = release_pressure
if(air_contents.release_gas_to(target_air, release_pressure) && !holding)
air_update_turf()
pump.process_atmos() // Pump gas.
if(!holding)
air_update_turf() // Update the environment if needed.
// var/our_pressure = air_contents.return_pressure()
// var/our_temperature = air_contents.return_temperature()
///function used to check the limit of the canisters and also set the amount of damage that the canister can receive, if the heat and pressure are way higher than the limit the more damage will be done
// currently unused
// if(our_temperature > heat_limit || our_pressure > pressure_limit)
// take_damage(clamp((our_temperature/heat_limit) * (our_pressure/pressure_limit) * delta_time * 2, 5, 50), BURN, 0)
update_icon()
/obj/machinery/portable_atmospherics/canister/ui_state(mob/user)
@@ -340,35 +344,48 @@
ui = new(user, src, "Canister", name)
ui.open()
/obj/machinery/portable_atmospherics/canister/ui_static_data(mob/user)
return list(
"defaultReleasePressure" = round(CAN_DEFAULT_RELEASE_PRESSURE),
"minReleasePressure" = round(can_min_release_pressure),
"maxReleasePressure" = round(can_max_release_pressure),
"pressureLimit" = round(1e14),
"holdingTankLeakPressure" = round(TANK_LEAK_PRESSURE),
"holdingTankFragPressure" = round(TANK_FRAGMENT_PRESSURE)
)
/obj/machinery/portable_atmospherics/canister/ui_data()
var/data = list()
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
data["defaultReleasePressure"] = round(CAN_DEFAULT_RELEASE_PRESSURE)
data["minReleasePressure"] = round(can_min_release_pressure)
data["maxReleasePressure"] = round(can_max_release_pressure)
data["valveOpen"] = valve_open ? 1 : 0
. = list(
"portConnected" = !!connected_port,
"tankPressure" = round(air_contents.return_pressure()),
"releasePressure" = round(release_pressure),
"valveOpen" = !!valve_open,
"isPrototype" = !!prototype,
"hasHoldingTank" = !!holding
)
data["isPrototype"] = prototype ? 1 : 0
if (prototype)
data["restricted"] = restricted
data["timing"] = timing
data["time_left"] = get_time_left()
data["timer_set"] = timer_set
data["timer_is_not_default"] = timer_set != default_timer_set
data["timer_is_not_min"] = timer_set != minimum_timer_set
data["timer_is_not_max"] = timer_set != maximum_timer_set
. += list(
"restricted" = restricted,
"timing" = timing,
"time_left" = get_time_left(),
"timer_set" = timer_set,
"timer_is_not_default" = timer_set != default_timer_set,
"timer_is_not_min" = timer_set != minimum_timer_set,
"timer_is_not_max" = timer_set != maximum_timer_set
)
data["hasHoldingTank"] = holding ? 1 : 0
if (holding)
data["holdingTank"] = list()
data["holdingTank"]["name"] = holding.name
data["holdingTank"]["tankPressure"] = round(holding.air_contents.return_pressure())
return data
. += list(
"holdingTank" = list(
"name" = holding.name,
"tankPressure" = round(holding.air_contents.return_pressure())
)
)
/obj/machinery/portable_atmospherics/canister/ui_act(action, params)
if(..())
. = ..()
if(.)
return
switch(action)
if("relabel")
@@ -377,6 +394,7 @@
var/newtype = label2types[label]
if(newtype)
var/obj/machinery/portable_atmospherics/canister/replacement = newtype
investigate_log("was relabelled to [initial(replacement.name)] by [key_name(usr)].", INVESTIGATE_ATMOS)
name = initial(replacement.name)
desc = initial(replacement.desc)
icon_state = initial(replacement.icon_state)
@@ -458,9 +476,8 @@
if("eject")
if(holding)
if(valve_open)
message_admins("[ADMIN_LOOKUPFLW(usr)] removed [holding] from [src] with valve still open at [ADMIN_VERBOSEJMP(src)] releasing contents into the <span class='boldannounce'>air</span><br>.")
investigate_log("[key_name(usr)] removed the [holding], leaving the valve open and transferring into the <span class='boldannounce'>air</span><br>", INVESTIGATE_ATMOS)
holding.forceMove(get_turf(src))
holding = null
message_admins("[ADMIN_LOOKUPFLW(usr)] removed [holding] from [src] with valve still open at [ADMIN_VERBOSEJMP(src)] releasing contents into the <span class='boldannounce'>air</span>.")
investigate_log("[key_name(usr)] removed the [holding], leaving the valve open and transferring into the <span class='boldannounce'>air</span>.", INVESTIGATE_ATMOS)
replace_tank(usr, FALSE)
. = TRUE
update_icon()
+1 -5
View File
@@ -190,11 +190,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
to_chat(usr, "<span class='notice'>Sorry, tracking is currently disabled.</span>")
return
var/list/body = list()
body += "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Playtime for [key]</title></head><BODY><BR>Playtime:"
body += get_exp_report()
body += "</BODY></HTML>"
usr << browse(body.Join(), "window=playerplaytime[ckey];size=550x615")
new /datum/job_report_menu(src, usr)
/client/proc/ignore_key(client)
var/client/C = client
@@ -156,11 +156,7 @@
/obj/machinery/processor/slime
name = "slime processor"
desc = "An industrial grinder with a sticker saying appropriated for science department. Keep hands clear of intake area while operating."
/obj/machinery/processor/slime/Initialize()
. = ..()
var/obj/item/circuitboard/machine/B = new /obj/item/circuitboard/machine/processor/slime(null)
B.apply_default_parts(src)
circuit = /obj/item/circuitboard/machine/processor/slime
/obj/machinery/processor/slime/adjust_item_drop_location(atom/movable/AM)
var/static/list/slimecores = subtypesof(/obj/item/slime_extract)
+49
View File
@@ -0,0 +1,49 @@
#define JOB_REPORT_MENU_FAIL_REASON_TRACKING_DISABLED 1
#define JOB_REPORT_MENU_FAIL_REASON_NO_RECORDS 2
/datum/job_report_menu
var/client/owner
/datum/job_report_menu/New(client/owner, mob/viewer)
src.owner = owner
ui_interact(viewer)
/datum/job_report_menu/ui_state()
return GLOB.always_state
/datum/job_report_menu/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "TrackedPlaytime")
ui.open()
/datum/job_report_menu/ui_static_data()
if (!CONFIG_GET(flag/use_exp_tracking))
return list("failReason" = JOB_REPORT_MENU_FAIL_REASON_TRACKING_DISABLED)
var/list/play_records = owner.prefs.exp
if (!play_records.len)
owner.set_exp_from_db()
play_records = owner.prefs.exp
if (!play_records.len)
return list("failReason" = JOB_REPORT_MENU_FAIL_REASON_NO_RECORDS)
var/list/data = list()
data["jobPlaytimes"] = list()
data["specialPlaytimes"] = list()
for (var/job_name in SSjob.name_occupations)
var/playtime = play_records[job_name] ? text2num(play_records[job_name]) : 0
data["jobPlaytimes"][job_name] = playtime
for (var/special_name in GLOB.exp_specialmap[EXP_TYPE_SPECIAL])
var/playtime = play_records[special_name] ? text2num(play_records[special_name]) : 0
data["specialPlaytimes"][special_name] = playtime
data["livingTime"] = play_records[EXP_TYPE_LIVING]
data["ghostTime"] = play_records[EXP_TYPE_GHOST]
return data
#undef JOB_REPORT_MENU_FAIL_REASON_TRACKING_DISABLED
#undef JOB_REPORT_MENU_FAIL_REASON_NO_RECORDS
+51 -38
View File
@@ -8,12 +8,12 @@ GLOBAL_LIST(labor_sheet_values)
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "console"
density = FALSE
/// Connected stacking machine
var/obj/machinery/mineral/stacking_machine/laborstacker/stacking_machine = null
/// Direction of the stacking machine
var/machinedir = SOUTH
var/obj/machinery/door/airlock/release_door
var/door_tag = "prisonshuttle"
var/obj/item/radio/Radio //needed to send messages to sec radio
/// Needed to send messages to sec radio
var/obj/item/radio/Radio
/obj/machinery/mineral/labor_claim_console/Initialize()
. = ..()
@@ -39,15 +39,23 @@ GLOBAL_LIST(labor_sheet_values)
ui = new(user, src, "LaborClaimConsole", name)
ui.open()
/obj/machinery/mineral/labor_claim_console/ui_static_data(mob/user)
var/list/data = list()
data["ores"] = GLOB.labor_sheet_values
return data
/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
var/list/data = list()
var/can_go_home = FALSE
data["emagged"] = (obj_flags & EMAGGED) ? 1 : 0
data["emagged"] = FALSE
if(obj_flags & EMAGGED)
data["emagged"] = TRUE
can_go_home = TRUE
var/obj/item/card/id/I = user.get_idcard(TRUE)
var/obj/item/card/id/I
if(isliving(usr))
var/mob/living/L = usr
I = L.get_idcard(TRUE)
if(istype(I, /obj/item/card/id/prisoner))
var/obj/item/card/id/prisoner/P = I
data["id_points"] = P.points
@@ -63,43 +71,46 @@ GLOBAL_LIST(labor_sheet_values)
if(stacking_machine)
data["unclaimed_points"] = stacking_machine.points
data["ores"] = GLOB.labor_sheet_values
data["can_go_home"] = can_go_home
return data
/obj/machinery/mineral/labor_claim_console/ui_act(action, params)
if(..())
. = ..()
if(.)
return
var/mob/M = usr
switch(action)
if("claim_points")
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
var/obj/item/card/id/I
if(isliving(M))
var/mob/living/L = M
I = L.get_idcard(TRUE)
if(istype(I, /obj/item/card/id/prisoner))
var/obj/item/card/id/prisoner/P = I
P.points += stacking_machine.points
stacking_machine.points = 0
to_chat(usr, "<span class='notice'>Points transferred.</span>")
. = TRUE
to_chat(M, "<span class='notice'>Points transferred.</span>")
return TRUE
else
to_chat(usr, "<span class='alert'>No valid id for point transfer detected.</span>")
to_chat(M, "<span class='alert'>No valid id for point transfer detected.</span>")
if("move_shuttle")
if(!alone_in_area(get_area(src), usr))
to_chat(usr, "<span class='alert'>Prisoners are only allowed to be released while alone.</span>")
else
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
if(1)
to_chat(usr, "<span class='alert'>Shuttle not found.</span>")
if(2)
to_chat(usr, "<span class='alert'>Shuttle already at station.</span>")
if(3)
to_chat(usr, "<span class='alert'>No permission to dock could be granted.</span>")
else
if(!(obj_flags & EMAGGED))
Radio.set_frequency(FREQ_SECURITY)
Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
. = TRUE
if(!alone_in_area(get_area(src), M))
to_chat(M, "<span class='alert'>Prisoners are only allowed to be released while alone.</span>")
return
switch(SSshuttle.moveShuttle("laborcamp", "laborcamp_home", TRUE))
if(1)
to_chat(M, "<span class='alert'>Shuttle not found.</span>")
if(2)
to_chat(M, "<span class='alert'>Shuttle already at station.</span>")
if(3)
to_chat(M, "<span class='alert'>No permission to dock could be granted.</span>")
else
if(!(obj_flags & EMAGGED))
Radio.set_frequency(FREQ_SECURITY)
Radio.talk_into(src, "A prisoner has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
to_chat(M, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
return TRUE
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
@@ -110,10 +121,9 @@ GLOBAL_LIST(labor_sheet_values)
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
. = ..()
if((obj_flags & EMAGGED))
return
obj_flags |= EMAGGED
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
if(!(obj_flags & EMAGGED))
obj_flags |= EMAGGED
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
return TRUE
/**********************Prisoner Collection Unit**************************/
@@ -121,13 +131,13 @@ GLOBAL_LIST(labor_sheet_values)
/obj/machinery/mineral/stacking_machine/laborstacker
force_connect = TRUE
var/points = 0 //The unclaimed value of ore stacked.
//damage_deflection = 21
// damage_deflection = 21
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
points += inp.point_value * inp.amount
..()
/obj/machinery/mineral/stacking_machine/laborstacker/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I))
if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I) && user.a_intent == INTENT_HELP)
var/obj/item/stack/sheet/inp = I
points += inp.point_value * inp.amount
return ..()
@@ -141,7 +151,10 @@ GLOBAL_LIST(labor_sheet_values)
icon_state = "console"
density = FALSE
/obj/machinery/mineral/labor_points_checker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user)
. = ..()
if(. || user.is_blind())
return
user.examinate(src)
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I, mob/user, params)
+3 -3
View File
@@ -3,6 +3,9 @@
desc = "A computer system running a deep neural network that processes arbitrary information to produce data useable in the development of new technologies. In layman's terms, it makes research points."
icon = 'icons/obj/machines/research.dmi'
icon_state = "server"
req_access = list(ACCESS_RD) //ONLY THE R&D CAN CHANGE SERVER SETTINGS.
circuit = /obj/item/circuitboard/machine/rdserver
var/datum/techweb/stored_research
var/heat_health = 100
//Code for point mining here.
@@ -15,14 +18,11 @@
var/temp_tolerance_low = 0
var/temp_tolerance_high = T20C
var/temp_penalty_coefficient = 0.5 //1 = -1 points per degree above high tolerance. 0.5 = -0.5 points per degree above high tolerance.
req_access = list(ACCESS_RD) //ONLY THE R&D CAN CHANGE SERVER SETTINGS.
/obj/machinery/rnd/server/Initialize()
. = ..()
SSresearch.servers |= src
stored_research = SSresearch.science_tech
var/obj/item/circuitboard/machine/B = new /obj/item/circuitboard/machine/rdserver(null)
B.apply_default_parts(src)
/obj/machinery/rnd/server/Destroy()
SSresearch.servers -= src
+13 -14
View File
@@ -33,14 +33,14 @@
/datum/station_goal/dna_vault/get_report()
return {"Our long term prediction systems indicate a 99% chance of system-wide cataclysm in the near future.
We need you to construct a DNA Vault aboard your station.
We need you to construct a DNA Vault aboard your station.
The DNA Vault needs to contain samples of:
[animal_count] unique animal data
[plant_count] unique non-standard plant data
[human_count] unique sapient humanoid DNA data
The DNA Vault needs to contain samples of:
[animal_count] unique animal data
[plant_count] unique non-standard plant data
[human_count] unique sapient humanoid DNA data
Base vault parts are available for shipping via cargo."}
Base vault parts are available for shipping via cargo."}
/datum/station_goal/dna_vault/on_report()
@@ -87,7 +87,7 @@
if(!H.myseed)
return
if(!H.harvest)// So it's bit harder.
to_chat(user, "<span class='warning'>Plant needs to be ready to harvest to perform full data scan.</span>") //Because space dna is actually magic
to_chat(user, "<span class='alert'>Plant needs to be ready to harvest to perform full data scan.</span>") //Because space dna is actually magic
return
if(plants[H.myseed.type])
to_chat(user, "<span class='notice'>Plant data already present in local storage.</span>")
@@ -101,10 +101,10 @@
if(isanimal(target))
var/mob/living/simple_animal/A = target
if(!A.healable)//simple approximation of being animal not a robot or similar
to_chat(user, "<span class='warning'>No compatible DNA detected</span>")
to_chat(user, "<span class='alert'>No compatible DNA detected.</span>")
return
if(animals[target.type])
to_chat(user, "<span class='notice'>Animal data already present in local storage.</span>")
to_chat(user, "<span class='alert'>Animal data already present in local storage.</span>")
return
animals[target.type] = 1
to_chat(user, "<span class='notice'>Animal data added to local storage.</span>")
@@ -173,7 +173,6 @@
qdel(filler)
. = ..()
/obj/machinery/dna_vault/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
@@ -204,15 +203,17 @@
data["choiceB"] = ""
if(user && completed)
var/list/L = power_lottery[user]
if(L && L.len)
if(L?.len)
data["used"] = FALSE
data["choiceA"] = L[1]
data["choiceB"] = L[2]
return data
/obj/machinery/dna_vault/ui_act(action, params)
if(..())
. = ..()
if(.)
return
switch(action)
if("gene")
upgrade(usr,params["choice"])
@@ -244,8 +245,6 @@
else
return ..()
/obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/H,upgrade_type)
if(!(upgrade_type in power_lottery[H]))
return