Merge branch 'master' into upstream-merge-32188
This commit is contained in:
@@ -174,7 +174,6 @@ GLOBAL_PROTECT(Banlist)
|
||||
/datum/admins/proc/unbanpanel()
|
||||
var/count = 0
|
||||
var/dat
|
||||
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
|
||||
GLOB.Banlist.cd = "/base"
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
count++
|
||||
|
||||
@@ -616,24 +616,6 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
|
||||
|
||||
/*
|
||||
/datum/admins/proc/get_sab_desc(var/target)
|
||||
switch(target)
|
||||
if(1)
|
||||
return "Destroy at least 70% of the plasma canisters on the station"
|
||||
if(2)
|
||||
return "Destroy the AI"
|
||||
if(3)
|
||||
var/count = 0
|
||||
for(var/mob/living/carbon/monkey/Monkey in world)
|
||||
if(Monkey.z in GLOB.station_z_levels)
|
||||
count++
|
||||
return "Kill all [count] of the monkeys on the station"
|
||||
if(4)
|
||||
return "Cut power to at least 80% of the station"
|
||||
else
|
||||
return "Error: Invalid sabotage target: [target]"
|
||||
*/
|
||||
/datum/admins/proc/spawn_atom(object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn an atom"
|
||||
|
||||
@@ -507,6 +507,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
|
||||
var/list/areas_all = list()
|
||||
var/list/areas_with_APC = list()
|
||||
var/list/areas_with_multiple_APCs = list()
|
||||
var/list/areas_with_air_alarm = list()
|
||||
var/list/areas_with_RC = list()
|
||||
var/list/areas_with_light = list()
|
||||
@@ -528,6 +529,8 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
var/area/A = APC.area
|
||||
if(!(A.type in areas_with_APC))
|
||||
areas_with_APC.Add(A.type)
|
||||
else if(A.type in areas_all)
|
||||
areas_with_multiple_APCs.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/airalarm/AA in GLOB.machines)
|
||||
var/area/A = get_area(AA)
|
||||
@@ -567,33 +570,48 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
var/list/areas_without_intercom = areas_all - areas_with_intercom
|
||||
var/list/areas_without_camera = areas_all - areas_with_camera
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
|
||||
for(var/areatype in areas_without_APC)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_APC.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
|
||||
for(var/areatype in areas_without_APC)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
|
||||
for(var/areatype in areas_without_air_alarm)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_with_multiple_APCs.len)
|
||||
to_chat(world, "<b>AREAS WITH MULTIPLE APCS:</b>")
|
||||
for(var/areatype in areas_with_multiple_APCs)
|
||||
to_chat(world,"* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
|
||||
for(var/areatype in areas_without_RC)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_air_alarm.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
|
||||
for(var/areatype in areas_without_air_alarm)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
|
||||
for(var/areatype in areas_without_light)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_RC.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
|
||||
for(var/areatype in areas_without_RC)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
|
||||
for(var/areatype in areas_without_LS)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_light.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
|
||||
for(var/areatype in areas_without_light)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
|
||||
for(var/areatype in areas_without_intercom)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_LS.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
|
||||
for(var/areatype in areas_without_LS)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
if(areas_without_intercom.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
|
||||
for(var/areatype in areas_without_intercom)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
if(areas_without_camera.len)
|
||||
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
if(!(areas_with_APC.len || areas_with_multiple_APCs.len || areas_with_air_alarm.len || areas_with_RC.len || areas_with_light.len || areas_with_LS.len || areas_with_intercom.len || areas_with_camera.len))
|
||||
to_chat(world, "<b>No problem areas!</b>")
|
||||
|
||||
/client/proc/cmd_admin_areatest_station()
|
||||
set category = "Mapping"
|
||||
@@ -782,7 +800,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
set category = "Debug"
|
||||
set name = "Display overlay Log"
|
||||
set desc = "Display SSoverlays log of everything that's passed through it."
|
||||
|
||||
|
||||
render_stats(SSoverlays.stats, src)
|
||||
|
||||
/client/proc/cmd_display_init_log()
|
||||
@@ -918,4 +936,3 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
return
|
||||
sort = sortlist[sort]
|
||||
profile_show(src, sort)
|
||||
|
||||
|
||||
@@ -229,15 +229,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
||||
if(B.z == num_level)
|
||||
count++
|
||||
atom_list += A
|
||||
/*
|
||||
var/atom/temp_atom
|
||||
for(var/i = 0; i <= (atom_list.len/10); i++)
|
||||
var/line = ""
|
||||
for(var/j = 1; j <= 10; j++)
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
to_chat(world, line)*/
|
||||
|
||||
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects Zlevel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -258,15 +249,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
||||
for(var/atom/A in world)
|
||||
if(istype(A,type_path))
|
||||
count++
|
||||
/*
|
||||
var/atom/temp_atom
|
||||
for(var/i = 0; i <= (atom_list.len/10); i++)
|
||||
var/line = ""
|
||||
for(var/j = 1; j <= 10; j++)
|
||||
if(i*10+j <= atom_list.len)
|
||||
temp_atom = atom_list[i*10+j]
|
||||
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
|
||||
to_chat(world, line)*/
|
||||
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects All") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -139,8 +139,7 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
setDir(turn(dir, 90))
|
||||
return
|
||||
setDir(turn(dir, -90))
|
||||
|
||||
/obj/item/device/assembly/infra/AltClick(mob/user)
|
||||
..()
|
||||
|
||||
@@ -39,10 +39,6 @@
|
||||
/obj/item/device/assembly/signaler/interact(mob/user, flag1)
|
||||
if(is_secured(user))
|
||||
var/t1 = "-------"
|
||||
// if ((src.b_stat && !( flag1 )))
|
||||
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? "<A href='?src=[REF(src)];wires=4'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=4'>Mend Wire</A>"), (src.wires & 2 ? "<A href='?src=[REF(src)];wires=2'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=2'>Mend Wire</A>"), (src.wires & 1 ? "<A href='?src=[REF(src)];wires=1'>Cut Wire</A>" : "<A href='?src=[REF(src)];wires=1'>Mend Wire</A>"))
|
||||
// else
|
||||
// t1 = "-------" Speaker: [src.listening ? "<A href='byond://?src=[REF(src)];listen=0'>Engaged</A>" : "<A href='byond://?src=[REF(src)];listen=1'>Disengaged</A>"]<BR>
|
||||
var/dat = {"
|
||||
<TT>
|
||||
|
||||
@@ -123,17 +119,6 @@ Code:
|
||||
|
||||
|
||||
return
|
||||
/*
|
||||
for(var/obj/item/device/assembly/signaler/S in world)
|
||||
if(!S)
|
||||
continue
|
||||
if(S == src)
|
||||
continue
|
||||
if((S.frequency == src.frequency) && (S.code == src.code))
|
||||
spawn(0)
|
||||
if(S)
|
||||
S.pulse(0)
|
||||
return 0*/
|
||||
|
||||
/obj/item/device/assembly/signaler/receive_signal(datum/signal/signal)
|
||||
if(!signal)
|
||||
|
||||
@@ -423,22 +423,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
|
||||
continue reaction_loop
|
||||
//at this point, all minimum requirements for the reaction are satisfied.
|
||||
|
||||
/* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost
|
||||
var/list/max_reqs = reaction.max_requirements.Copy()
|
||||
if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \
|
||||
|| (max_reqs["ENER"] && ener > max_reqs["ENER"]))
|
||||
continue
|
||||
max_reqs -= "TEMP"
|
||||
max_reqs -= "ENER"
|
||||
|
||||
for(var/id in max_reqs)
|
||||
if(cached_gases[id] && cached_gases[id][MOLES] > max_reqs[id])
|
||||
continue reaction_loop
|
||||
//at this point, all requirements for the reaction are satisfied. we can now react()
|
||||
*/
|
||||
|
||||
. |= reaction.react(src, dump_location)
|
||||
//to_chat(world,reaction.name)
|
||||
if (. & STOP_REACTIONS)
|
||||
break
|
||||
if(.)
|
||||
|
||||
@@ -17,9 +17,12 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
|
||||
|
||||
/proc/gas_id2path(id)
|
||||
var/list/meta_gas = GLOB.meta_gas_info
|
||||
if(id in meta_gas)
|
||||
return id
|
||||
for(var/path in meta_gas)
|
||||
if(meta_gas[path][META_GAS_ID] == id)
|
||||
return path
|
||||
return ""
|
||||
|
||||
/*||||||||||||||/----------\||||||||||||||*\
|
||||
||||||||||||||||[GAS DATUMS]||||||||||||||||
|
||||
|
||||
@@ -277,11 +277,7 @@
|
||||
"power" = info["power"],
|
||||
"scrubbing" = info["scrubbing"],
|
||||
"widenet" = info["widenet"],
|
||||
"filter_co2" = info["filter_co2"],
|
||||
"filter_toxins" = info["filter_toxins"],
|
||||
"filter_n2o" = info["filter_n2o"],
|
||||
"filter_rare" = info["filter_rare"],
|
||||
"filter_water_vapor" = info["filter_water_vapor"]
|
||||
"filter_types" = info["filter_types"]
|
||||
))
|
||||
data["mode"] = mode
|
||||
data["modes"] = list()
|
||||
@@ -337,8 +333,8 @@
|
||||
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
|
||||
locked = !locked
|
||||
. = TRUE
|
||||
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "rare_scrub","water_vapor_scrub", "widenet", "scrubbing")
|
||||
send_signal(device_id, list("[action]" = text2num(params["val"])))
|
||||
if("power", "toggle_filter", "widenet", "scrubbing")
|
||||
send_signal(device_id, list("[action]" = params["val"]))
|
||||
. = TRUE
|
||||
if("excheck")
|
||||
send_signal(device_id, list("checks" = text2num(params["val"])^1))
|
||||
|
||||
@@ -197,7 +197,6 @@ Acts like a normal vent, but has an input AND output.
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
return //do not update_icon
|
||||
//if(signal.data["tag"])
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_filter", name, 475, 180, master_ui, state)
|
||||
ui = new(user, src, ui_key, "atmos_filter", name, 475, 195, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/ui_data()
|
||||
@@ -133,13 +133,11 @@
|
||||
data["pressure"] = round(target_pressure)
|
||||
data["max_pressure"] = round(MAX_OUTPUT_PRESSURE)
|
||||
|
||||
if(filter_type) //ui code is garbage and this is needed for it to work grr
|
||||
if(ispath(filter_type)) //we need to send the gas ID. if it's a path, get it from the metainfo list...
|
||||
data["filter_type"] = GLOB.meta_gas_info[filter_type][META_GAS_ID]
|
||||
else //...otherwise, it's already in the form we need.
|
||||
data["filter_type"] = filter_type
|
||||
else
|
||||
data["filter_type"] = "none"
|
||||
data["filter_types"] = list()
|
||||
data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type))
|
||||
for(var/path in GLOB.meta_gas_info)
|
||||
var/list/gas = GLOB.meta_gas_info[path]
|
||||
data["filter_types"] += list(list("name" = gas[META_GAS_NAME], "id" = gas[META_GAS_ID], "selected" = (path == gas_id2path(filter_type))))
|
||||
|
||||
return data
|
||||
|
||||
@@ -169,7 +167,7 @@
|
||||
if("filter")
|
||||
filter_type = null
|
||||
var/filter_name = "nothing"
|
||||
var/gas = text2path(params["mode"]) || gas_id2path(params["mode"])
|
||||
var/gas = gas_id2path(params["mode"])
|
||||
if(gas in GLOB.meta_gas_info)
|
||||
filter_type = gas
|
||||
filter_name = GLOB.meta_gas_info[gas][META_GAS_NAME]
|
||||
|
||||
@@ -17,12 +17,7 @@
|
||||
var/on = FALSE
|
||||
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
|
||||
|
||||
var/scrub_CO2 = TRUE
|
||||
var/scrub_Toxins = FALSE
|
||||
var/scrub_N2O = FALSE
|
||||
var/scrub_Rare = FALSE
|
||||
var/scrub_WaterVapor = FALSE
|
||||
|
||||
var/filter_types = list(/datum/gas/carbon_dioxide)
|
||||
|
||||
var/volume_rate = 200
|
||||
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
|
||||
@@ -64,16 +59,7 @@
|
||||
var/amount = idle_power_usage
|
||||
|
||||
if(scrubbing & SCRUBBING)
|
||||
if(scrub_CO2)
|
||||
amount += idle_power_usage
|
||||
if(scrub_Toxins)
|
||||
amount += idle_power_usage
|
||||
if(scrub_N2O)
|
||||
amount += idle_power_usage
|
||||
if(scrub_Rare)
|
||||
amount += idle_power_usage
|
||||
if(scrub_WaterVapor)
|
||||
amount += idle_power_usage
|
||||
amount += idle_power_usage * length(filter_types)
|
||||
else //scrubbing == SIPHONING
|
||||
amount = active_power_usage
|
||||
|
||||
@@ -115,6 +101,12 @@
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.source = src
|
||||
|
||||
var/list/f_types = list()
|
||||
for(var/path in GLOB.meta_gas_info)
|
||||
var/list/gas = GLOB.meta_gas_info[path]
|
||||
f_types += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in filter_types)))
|
||||
|
||||
signal.data = list(
|
||||
"tag" = id_tag,
|
||||
"frequency" = frequency,
|
||||
@@ -123,11 +115,7 @@
|
||||
"power" = on,
|
||||
"scrubbing" = scrubbing,
|
||||
"widenet" = widenet,
|
||||
"filter_co2" = scrub_CO2,
|
||||
"filter_toxins" = scrub_Toxins,
|
||||
"filter_n2o" = scrub_N2O,
|
||||
"filter_rare" =scrub_Rare,
|
||||
"filter_water_vapor" = scrub_WaterVapor,
|
||||
"filter_types" = f_types,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
|
||||
@@ -175,14 +163,7 @@
|
||||
return FALSE
|
||||
|
||||
if(scrubbing & SCRUBBING)
|
||||
var/should_we_scrub = FALSE
|
||||
for(var/id in env_gases)
|
||||
if(id == /datum/gas/nitrogen || id == /datum/gas/oxygen)
|
||||
continue
|
||||
if(env_gases[id][MOLES])
|
||||
should_we_scrub = TRUE
|
||||
break
|
||||
if(should_we_scrub)
|
||||
if(length(env_gases & filter_types))
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
|
||||
|
||||
//Take a gas sample
|
||||
@@ -197,55 +178,10 @@
|
||||
var/list/filtered_gases = filtered_out.gases
|
||||
filtered_out.temperature = removed.temperature
|
||||
|
||||
if(scrub_Toxins && removed_gases[/datum/gas/plasma])
|
||||
ADD_GAS(/datum/gas/plasma, filtered_gases)
|
||||
filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES]
|
||||
removed_gases[/datum/gas/plasma][MOLES] = 0
|
||||
|
||||
if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide])
|
||||
ADD_GAS(/datum/gas/carbon_dioxide, filtered_gases)
|
||||
filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES]
|
||||
removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0
|
||||
|
||||
if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide])
|
||||
ADD_GAS(/datum/gas/nitrous_oxide, filtered_gases)
|
||||
filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES]
|
||||
removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/bz])
|
||||
ADD_GAS(/datum/gas/bz, filtered_gases)
|
||||
filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES]
|
||||
removed_gases[/datum/gas/bz][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/hypernoblium])
|
||||
ADD_GAS(/datum/gas/hypernoblium, filtered_gases)
|
||||
filtered_gases[/datum/gas/hypernoblium][MOLES] = removed_gases[/datum/gas/hypernoblium][MOLES]
|
||||
removed_gases[/datum/gas/hypernoblium][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/stimulum])
|
||||
ADD_GAS(/datum/gas/stimulum, filtered_gases)
|
||||
filtered_gases[/datum/gas/stimulum][MOLES] = removed_gases[/datum/gas/stimulum][MOLES]
|
||||
removed_gases[/datum/gas/stimulum][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/pluoxium])
|
||||
ADD_GAS(/datum/gas/pluoxium, filtered_gases)
|
||||
filtered_gases[/datum/gas/pluoxium][MOLES] = removed_gases[/datum/gas/pluoxium][MOLES]
|
||||
removed_gases[/datum/gas/pluoxium][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/nitryl])
|
||||
ADD_GAS(/datum/gas/nitryl, filtered_gases)
|
||||
filtered_gases[/datum/gas/nitryl][MOLES] = removed_gases[/datum/gas/nitryl][MOLES]
|
||||
removed_gases[/datum/gas/nitryl][MOLES] = 0
|
||||
|
||||
if(scrub_Rare && removed_gases[/datum/gas/tritium])
|
||||
ADD_GAS(/datum/gas/tritium, filtered_gases)
|
||||
filtered_gases[/datum/gas/tritium][MOLES] = removed_gases[/datum/gas/tritium][MOLES]
|
||||
removed_gases[/datum/gas/tritium][MOLES] = 0
|
||||
|
||||
if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor])
|
||||
ADD_GAS(/datum/gas/water_vapor, filtered_gases)
|
||||
filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES]
|
||||
removed_gases[/datum/gas/water_vapor][MOLES] = 0
|
||||
for(var/gas in filter_types & removed_gases)
|
||||
ADD_GAS(gas, filtered_gases)
|
||||
filtered_gases[gas][MOLES] = removed_gases[gas][MOLES]
|
||||
removed_gases[gas][MOLES] = 0
|
||||
|
||||
removed.garbage_collect()
|
||||
|
||||
@@ -303,30 +239,8 @@
|
||||
if("toggle_scrubbing" in signal.data)
|
||||
scrubbing = !scrubbing
|
||||
|
||||
if("co2_scrub" in signal.data)
|
||||
scrub_CO2 = text2num(signal.data["co2_scrub"])
|
||||
if("toggle_co2_scrub" in signal.data)
|
||||
scrub_CO2 = !scrub_CO2
|
||||
|
||||
if("tox_scrub" in signal.data)
|
||||
scrub_Toxins = text2num(signal.data["tox_scrub"])
|
||||
if("toggle_tox_scrub" in signal.data)
|
||||
scrub_Toxins = !scrub_Toxins
|
||||
|
||||
if("n2o_scrub" in signal.data)
|
||||
scrub_N2O = text2num(signal.data["n2o_scrub"])
|
||||
if("toggle_n2o_scrub" in signal.data)
|
||||
scrub_N2O = !scrub_N2O
|
||||
|
||||
if("rare_scrub" in signal.data)
|
||||
scrub_Rare = text2num(signal.data["rare_scrub"])
|
||||
if("toggle_rare_scrub" in signal.data)
|
||||
scrub_Rare = !scrub_Rare
|
||||
|
||||
if("water_vapor_scrub" in signal.data)
|
||||
scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"])
|
||||
if("toggle_water_vapor_scrub" in signal.data)
|
||||
scrub_WaterVapor = !scrub_WaterVapor
|
||||
if("toggle_filter" in signal.data)
|
||||
filter_types ^= gas_id2path(signal.data["toggle_filter"])
|
||||
|
||||
if("init" in signal.data)
|
||||
name = signal.data["init"]
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 335, master_ui, state)
|
||||
ui = new(user, src, ui_key, "portable_scrubber", name, 420, 435, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/ui_data()
|
||||
@@ -75,6 +75,12 @@
|
||||
data["connected"] = connected_port ? 1 : 0
|
||||
data["pressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
|
||||
|
||||
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
|
||||
data["filter_types"] = list()
|
||||
for(var/path in GLOB.meta_gas_info)
|
||||
var/list/gas = GLOB.meta_gas_info[path]
|
||||
data["filter_types"] += list(list("gas_id" = gas[META_GAS_ID], "gas_name" = gas[META_GAS_NAME], "enabled" = (path in scrubbing)))
|
||||
|
||||
if(holding)
|
||||
data["holding"] = list()
|
||||
data["holding"]["name"] = holding.name
|
||||
@@ -93,6 +99,9 @@
|
||||
holding.loc = get_turf(src)
|
||||
holding = null
|
||||
. = TRUE
|
||||
if("toggle_filter")
|
||||
scrubbing ^= gas_id2path(params["val"])
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/item/paper/fluff/awaymissions/academy/grade/aplus
|
||||
name = "Summoning Midterm Exam"
|
||||
info = "Grade: A+ Educator's Notes: Excellent form."
|
||||
|
||||
|
||||
/obj/item/paper/fluff/awaymissions/academy/grade/bminus
|
||||
name = "Summoning Midterm Exam"
|
||||
info = "Grade: B- Educator's Notes: Keep applying yourself, you're showing improvement."
|
||||
@@ -55,7 +55,7 @@
|
||||
/obj/item/paper/fluff/awaymissions/academy/grade/dminus
|
||||
name = "Summoning Midterm Exam"
|
||||
info = "Grade: D- Educator's Notes: SEE ME AFTER CLASS."
|
||||
|
||||
|
||||
/obj/item/paper/fluff/awaymissions/academy/grade/failure
|
||||
name = "Pyromancy Evaluation"
|
||||
info = "Current Grade: F. Educator's Notes: No improvement shown despite multiple private lessons. Suggest additional tutilage."
|
||||
@@ -335,7 +335,7 @@
|
||||
target_mob.Move(T)
|
||||
|
||||
/obj/structure/ladder/unbreakable/rune
|
||||
name = "Teleportation Rune"
|
||||
name = "\improper Teleportation Rune"
|
||||
desc = "Could lead anywhere."
|
||||
icon = 'icons/obj/rune.dmi'
|
||||
icon_state = "1"
|
||||
@@ -347,7 +347,6 @@
|
||||
/obj/structure/ladder/unbreakable/rune/show_fluff_message(up,mob/user)
|
||||
user.visible_message("[user] activates \the [src].","<span class='notice'>You activate \the [src].</span>")
|
||||
|
||||
/obj/structure/ladder/can_use(mob/user)
|
||||
if(user.mind in SSticker.mode.wizards)
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/ladder/unbreakable/rune/use(mob/user, is_ghost=FALSE)
|
||||
if(is_ghost || !(user.mind in SSticker.mode.wizards))
|
||||
..()
|
||||
|
||||
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
//Generates assets based on iconstates of a single icon
|
||||
/datum/asset/simple/icon_states
|
||||
var/icon
|
||||
var/direction = SOUTH
|
||||
var/list/directions = list(SOUTH)
|
||||
var/frame = 1
|
||||
var/movement_states = FALSE
|
||||
|
||||
@@ -189,19 +189,26 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
verify = FALSE
|
||||
|
||||
/datum/asset/simple/icon_states/register()
|
||||
for(var/icon_state_name in icon_states(icon))
|
||||
var/asset = icon(icon, icon_state_name, direction, frame, movement_states)
|
||||
if (!asset)
|
||||
continue
|
||||
asset = fcopy_rsc(asset) //dedupe
|
||||
var/asset_name = sanitize_filename("[prefix].[icon_state_name].png")
|
||||
if (generic_icon_names)
|
||||
asset_name = "[generate_asset_name(asset)].png"
|
||||
/datum/asset/simple/icon_states/register(_icon = icon)
|
||||
for(var/icon_state_name in icon_states(_icon))
|
||||
for(var/direction in directions)
|
||||
var/asset = icon(_icon, icon_state_name, direction, frame, movement_states)
|
||||
if (!asset)
|
||||
continue
|
||||
asset = fcopy_rsc(asset) //dedupe
|
||||
var/prefix2 = (directions.len > 1) ? "[dir2text(direction)]." : ""
|
||||
var/asset_name = sanitize_filename("[prefix].[prefix2][icon_state_name].png")
|
||||
if (generic_icon_names)
|
||||
asset_name = "[generate_asset_name(asset)].png"
|
||||
|
||||
assets[asset_name] = asset
|
||||
register_asset(asset_name, asset)
|
||||
|
||||
..()
|
||||
/datum/asset/simple/icon_states/multiple_icons
|
||||
var/list/icons
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/register()
|
||||
for(var/i in icons)
|
||||
..(i)
|
||||
|
||||
|
||||
//DEFINITIONS FOR ASSET DATUMS START HERE.
|
||||
@@ -351,3 +358,17 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
/datum/asset/simple/icon_states/emojis
|
||||
icon = 'icons/emoji.dmi'
|
||||
generic_icon_names = TRUE
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes
|
||||
icons = list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi')
|
||||
prefix = "pipe"
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes/New()
|
||||
directions = GLOB.alldirs
|
||||
..()
|
||||
|
||||
/datum/asset/simple/icon_states/multiple_icons/pipes/register()
|
||||
..()
|
||||
var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states)
|
||||
if(meter)
|
||||
register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter))
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
// asset_cache
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
|
||||
var/job = text2num(href_list["asset_cache_confirm_arrival"])
|
||||
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
|
||||
// into letting append to a list without limit.
|
||||
@@ -131,13 +130,6 @@
|
||||
if(filelength > UPLOAD_LIMIT)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
|
||||
return 0
|
||||
/* //Don't need this at the moment. But it's here if it's needed later.
|
||||
//Helps prevent multiple files being uploaded at once. Or right after eachother.
|
||||
var/time_to_wait = fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>")
|
||||
return 0
|
||||
fileaccess_timer = world.time + FTPDELAY */
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -239,8 +239,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
S["real_name"] >> name
|
||||
if(!name)
|
||||
name = "Character[i]"
|
||||
/*if(i!=1)
|
||||
dat += " | " */
|
||||
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
|
||||
dat += "</center>"
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
item_state = "welding"
|
||||
materials = list(MAT_METAL=1750, MAT_GLASS=400)
|
||||
// var/up = 0
|
||||
flash_protect = 2
|
||||
tint = 2
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 60)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
name = "purple bartender's uniform"
|
||||
icon_state = "purplebartender"
|
||||
item_state = "purplebartender"
|
||||
item_color = "purplebartender"
|
||||
alt_covers_chest = 1
|
||||
|
||||
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
|
||||
/mob
|
||||
var/bloody_hands = 0
|
||||
|
||||
/obj/item/clothing/gloves
|
||||
var/transfer_blood = 0
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
|
||||
/mob
|
||||
var/bloody_hands = 0
|
||||
|
||||
/obj/item/clothing/gloves
|
||||
var/transfer_blood = 0
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
flags_1 = NOBLUDGEON_1
|
||||
container_type = OPENCONTAINER_1
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = 0
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, reagents.total_volume)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_game("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
log_attack("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
log_game("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
log_attack("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
|
||||
A.clean_blood()
|
||||
A.wash_cream()
|
||||
return
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, reagents.total_volume)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_game("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
log_attack("[key_name(user)] smothered [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
log_game("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
log_attack("[key_name(user)] touched [key_name(A)] with a damp rag containing [reagentlist]")
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
|
||||
A.clean_blood()
|
||||
A.wash_cream()
|
||||
return
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
var/mob/living/carbon/human/agent = makeBody(pick_n_take(candidates))
|
||||
var/mob/living/carbon/human/scientist = makeBody(pick_n_take(candidates))
|
||||
|
||||
GM.post_setup_team(GM.make_abductor_team(agent.mind, scientist.mind))
|
||||
var/team = GM.make_abductor_team(agent.mind, scientist.mind)
|
||||
if(!team)
|
||||
return MAP_ERROR
|
||||
|
||||
GM.post_setup_team(team)
|
||||
|
||||
spawned_mobs += list(agent, scientist)
|
||||
return SUCCESSFUL_SPAWN
|
||||
|
||||
@@ -471,7 +471,6 @@
|
||||
else //If tile is fully grown
|
||||
SV.entangle_mob()
|
||||
|
||||
//if(prob(25))
|
||||
SV.spread()
|
||||
if(i >= length)
|
||||
break
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50)
|
||||
volume = 50
|
||||
resistance_flags = 0
|
||||
var/isGlass = TRUE //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/on_reagent_change()
|
||||
if (gulp_size < 5)
|
||||
@@ -98,7 +99,27 @@
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/throw_impact(atom/target, mob/thrower)
|
||||
. = ..()
|
||||
if(!.) //if the bottle wasn't caught
|
||||
smash(target, thrower, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/proc/smash(atom/target, mob/thrower, ranged = FALSE)
|
||||
if(!isGlass)
|
||||
return
|
||||
if(bartender_check(target) && ranged)
|
||||
return
|
||||
var/obj/item/broken_bottle/B = new (loc)
|
||||
B.icon_state = icon_state
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
|
||||
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
|
||||
B.icon = I
|
||||
if(prob(33))
|
||||
new/obj/item/shard(drop_location())
|
||||
playsound(src, "shatter", 70, 1)
|
||||
transfer_fingerprints_to(B)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -121,8 +142,9 @@
|
||||
volume = 5
|
||||
flags_1 = CONDUCT_1
|
||||
container_type = OPENCONTAINER_1
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
resistance_flags = FIRE_PROOF
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/trophy/gold_cup
|
||||
name = "gold cup"
|
||||
@@ -168,22 +190,24 @@
|
||||
desc = "Careful, the beverage you're about to enjoy is extremely hot."
|
||||
icon_state = "coffee"
|
||||
list_reagents = list("coffee" = 30)
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
resistance_flags = FREEZE_PROOF
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/ice
|
||||
name = "Ice Cup"
|
||||
desc = "Careful, cold ice, do not chew."
|
||||
icon_state = "coffee"
|
||||
list_reagents = list("ice" = 30)
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/mug/ // parent type is literally just so empty mug sprites are a thing
|
||||
name = "mug"
|
||||
desc = "A drink served in a classy mug."
|
||||
icon_state = "tea"
|
||||
item_state = "coffee"
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/mug/on_reagent_change()
|
||||
if(reagents.total_volume)
|
||||
@@ -211,6 +235,7 @@
|
||||
icon_state = "ramen"
|
||||
list_reagents = list("dry_ramen" = 30)
|
||||
foodtype = GRAIN
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/beer
|
||||
name = "Space Beer"
|
||||
@@ -233,7 +258,8 @@
|
||||
icon_state = "water_cup_e"
|
||||
possible_transfer_amounts = list()
|
||||
volume = 10
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/sillycup/on_reagent_change()
|
||||
if(reagents.total_volume)
|
||||
@@ -247,6 +273,22 @@
|
||||
icon_state = "juicebox"
|
||||
volume = 15 //I figure if you have to craft these it should at least be slightly better than something you can get for free from a watercooler
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/sillycup/smallcarton/smash(atom/target, mob/thrower, ranged = FALSE)
|
||||
if(bartender_check(target) && ranged)
|
||||
return
|
||||
var/obj/item/broken_bottle/B = new (loc)
|
||||
B.icon_state = icon_state
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
|
||||
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
|
||||
B.icon = I
|
||||
B.name = "broken carton"
|
||||
B.force = 0
|
||||
B.throwforce = 0
|
||||
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
|
||||
transfer_fingerprints_to(B)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/sillycup/smallcarton/on_reagent_change()
|
||||
if (reagents.reagent_list.len)
|
||||
switch(reagents.get_master_reagent_id())
|
||||
@@ -299,6 +341,7 @@
|
||||
materials = list(MAT_METAL=1500)
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 100
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/flask
|
||||
name = "flask"
|
||||
@@ -306,6 +349,7 @@
|
||||
icon_state = "flask"
|
||||
materials = list(MAT_METAL=250)
|
||||
volume = 60
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/flask/gold
|
||||
name = "captain's flask"
|
||||
@@ -324,7 +368,7 @@
|
||||
desc = "A cup with the british flag emblazoned on it."
|
||||
icon_state = "britcup"
|
||||
volume = 30
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
|
||||
///Lavaland bowls and bottles///
|
||||
|
||||
@@ -335,6 +379,7 @@
|
||||
icon_state = "mushroom_bowl"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = 0
|
||||
isGlass = FALSE
|
||||
|
||||
|
||||
//////////////////////////soda_cans//
|
||||
@@ -346,6 +391,7 @@
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
container_type = NONE
|
||||
spillable = FALSE
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
|
||||
|
||||
@@ -12,21 +12,18 @@
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
var/const/duration = 13 //Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets)
|
||||
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
|
||||
isGlass = TRUE
|
||||
foodtype = ALCOHOL
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/throw_impact(atom/target,mob/thrower)
|
||||
..()
|
||||
smash(target,thrower,1)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target, mob/living/user, ranged = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/smash(mob/living/target, mob/thrower, ranged = FALSE)
|
||||
//Creates a shattering noise and replaces the bottle with a broken_bottle
|
||||
var/new_location = get_turf(src)
|
||||
var/obj/item/broken_bottle/B = new /obj/item/broken_bottle(new_location)
|
||||
if(bartender_check(target) && ranged)
|
||||
return
|
||||
var/obj/item/broken_bottle/B = new (loc)
|
||||
if(!ranged)
|
||||
user.put_in_hands(B)
|
||||
B.icon_state = src.icon_state
|
||||
thrower.put_in_hands(B)
|
||||
B.icon_state = icon_state
|
||||
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
|
||||
@@ -35,14 +32,14 @@
|
||||
|
||||
if(isGlass)
|
||||
if(prob(33))
|
||||
new/obj/item/shard(new_location)
|
||||
new/obj/item/shard(drop_location())
|
||||
playsound(src, "shatter", 70, 1)
|
||||
else
|
||||
B.name = "broken carton"
|
||||
B.force = 0
|
||||
B.throwforce = 0
|
||||
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
|
||||
src.transfer_fingerprints_to(B)
|
||||
transfer_fingerprints_to(B)
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -116,7 +113,7 @@
|
||||
SplashReagents(target)
|
||||
|
||||
//Finally, smash the bottle. This kills (del) the bottle.
|
||||
src.smash(target, user)
|
||||
smash(target, user)
|
||||
|
||||
return
|
||||
|
||||
@@ -311,7 +308,7 @@
|
||||
item_state = "carton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
isGlass = 0
|
||||
isGlass = FALSE
|
||||
list_reagents = list("orangejuice" = 100)
|
||||
foodtype = FRUIT
|
||||
|
||||
@@ -322,7 +319,7 @@
|
||||
item_state = "carton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
isGlass = 0
|
||||
isGlass = FALSE
|
||||
list_reagents = list("cream" = 100)
|
||||
foodtype = DAIRY
|
||||
|
||||
@@ -333,7 +330,7 @@
|
||||
item_state = "carton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
isGlass = 0
|
||||
isGlass = FALSE
|
||||
list_reagents = list("tomatojuice" = 100)
|
||||
foodtype = VEGETABLES
|
||||
|
||||
@@ -344,7 +341,7 @@
|
||||
item_state = "carton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
isGlass = 0
|
||||
isGlass = FALSE
|
||||
list_reagents = list("limejuice" = 100)
|
||||
foodtype = FRUIT
|
||||
|
||||
@@ -367,7 +364,7 @@
|
||||
B.reagents.copy_to(src,100)
|
||||
if(!B.isGlass)
|
||||
desc += " You're not sure if making this out of a carton was the brightest idea."
|
||||
isGlass = 0
|
||||
isGlass = FALSE
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,mob/thrower)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
volume = 50
|
||||
materials = list(MAT_GLASS=500)
|
||||
max_integrity = 20
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
unique_rename = 1
|
||||
|
||||
|
||||
@@ -271,3 +271,18 @@
|
||||
bonus_reagents = list("nutriment" = 1, "vitamin" = 1)
|
||||
filling_color = "#800000"
|
||||
tastes = list("meat" = 1, "butter" = 1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/kebab/rat
|
||||
name = "rat-kebab"
|
||||
desc = "Not so delicious rat meat, on a stick."
|
||||
icon_state = "ratkebab"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
list_reagents = list("nutriment" = 6, "vitamin" = 2)
|
||||
tastes = list("rat meat" = 1, "metal" = 1)
|
||||
foodtype = MEAT | GROSS
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/kebab/rat/double
|
||||
name = "double rat-kebab"
|
||||
icon_state = "doubleratkebab"
|
||||
tastes = list("rat meat" = 2, "metal" = 1)
|
||||
bonus_reagents = list("nutriment" = 6, "vitamin" = 2)
|
||||
@@ -1,5 +1,4 @@
|
||||
/obj/item/bombcore/pizza
|
||||
parent_type = /obj/item/bombcore/miniature
|
||||
/obj/item/bombcore/miniature/pizza
|
||||
name = "pizza bomb"
|
||||
desc = "Special delivery!"
|
||||
icon_state = "pizzabomb_inactive"
|
||||
@@ -23,7 +22,7 @@
|
||||
|
||||
var/obj/item/reagent_containers/food/snacks/pizza/pizza
|
||||
|
||||
var/obj/item/bombcore/pizza/bomb
|
||||
var/obj/item/bombcore/miniature/pizza/bomb
|
||||
var/bomb_active = FALSE // If the bomb is counting down.
|
||||
var/bomb_defused = TRUE // If the bomb is inert.
|
||||
var/bomb_timer = 1 // How long before blowing the bomb.
|
||||
@@ -53,7 +52,7 @@
|
||||
else
|
||||
var/obj/item/pizzabox/box = boxes.len ? boxes[boxes.len] : src
|
||||
if(boxes.len)
|
||||
desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile."
|
||||
desc = "A pile of boxes suited for pizzas. There appear to be [boxes.len + 1] boxes in the pile."
|
||||
if(box.boxtag != "")
|
||||
desc = "[desc] The [boxes.len ? "top box" : "box"]'s tag reads: [box.boxtag]"
|
||||
|
||||
@@ -156,7 +155,7 @@
|
||||
var/list/add = list()
|
||||
add += newbox
|
||||
add += newbox.boxes
|
||||
if(!user.transferItemToLoc(add, src))
|
||||
if(!user.transferItemToLoc(newbox, src))
|
||||
return
|
||||
boxes += add
|
||||
newbox.boxes.Cut()
|
||||
@@ -184,7 +183,7 @@
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(I, /obj/item/bombcore/pizza))
|
||||
else if(istype(I, /obj/item/bombcore/miniature/pizza))
|
||||
if(open && !bomb)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
@@ -170,3 +170,21 @@
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/pigblanket
|
||||
subcategory = CAT_MEAT
|
||||
|
||||
/datum/crafting_recipe/food/ratkebab
|
||||
name = "Rat Kebab"
|
||||
reqs = list(
|
||||
/obj/item/stack/rods = 1,
|
||||
/obj/item/reagent_containers/food/snacks/deadmouse = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/kebab/rat
|
||||
category = CAT_MEAT
|
||||
|
||||
/datum/crafting_recipe/food/doubleratkebab
|
||||
name = "Double Rat Kebab"
|
||||
reqs = list(
|
||||
/obj/item/stack/rods = 1,
|
||||
/obj/item/reagent_containers/food/snacks/deadmouse = 2
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/kebab/rat/double
|
||||
category = CAT_MEAT
|
||||
@@ -78,7 +78,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs",
|
||||
var/copiedobjs = list()
|
||||
|
||||
for (var/turf/T in refined_src)
|
||||
//var/datum/coords/C_src = refined_src[T]
|
||||
var/coordstring = refined_src[T]
|
||||
var/turf/B = refined_trg[coordstring]
|
||||
if(!istype(B))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "honeycomb"
|
||||
possible_transfer_amounts = list()
|
||||
spillable = 0
|
||||
spillable = FALSE
|
||||
disease_amount = 0
|
||||
volume = 10
|
||||
amount_per_transfer_from_this = 0
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
pocell.maxcharge *= CG.rate*1000
|
||||
pocell.charge = pocell.maxcharge
|
||||
pocell.name = "[G.name] battery"
|
||||
pocell.desc = "A rechargeable plant based power cell. This one has a power rating of [pocell.maxcharge], and you should not swallow it."
|
||||
pocell.desc = "A rechargeable plant based power cell. This one has a power rating of [DisplayPower(pocell.maxcharge)], and you should not swallow it."
|
||||
|
||||
if(G.reagents.has_reagent("plasma", 2))
|
||||
pocell.rigged = 1
|
||||
|
||||
@@ -25,12 +25,7 @@
|
||||
if( A.type == I )
|
||||
HTML += initial(I.name) +"=-="+A.name //2-nd block.assembly type and name. Maybe in future there will also be color and accesories.
|
||||
break
|
||||
/*
|
||||
If(I.name == "electronic implant")
|
||||
var/obj/item/weapon/implant/integrated_circuit/PI = PA //now it can't recreate electronic implants.and devices maybe I'll fix it later.
|
||||
var/obj/item/device/electronic_assembly/implant/PIC = PI.IC
|
||||
A = PIC
|
||||
*/
|
||||
|
||||
HTML += "{{*}}components" //3-rd block.components. First element is useless.delimeter for elements is ^%^.In element first circuit's default name.Second is user given name.delimiter is =-=
|
||||
|
||||
for(var/obj/item/integrated_circuit/IC in A.contents)
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
io_type_override = io_list_copy[io_entry]
|
||||
|
||||
if(io_type_override)
|
||||
// world << "io_type_override is now [io_type_override] on [src]."
|
||||
io_list.Add(new io_type_override(src, io_entry, default_data))
|
||||
else
|
||||
io_list.Add(new io_type(src, io_entry, default_data))
|
||||
|
||||
@@ -80,13 +80,7 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
QDEL_LIST(outputs)
|
||||
QDEL_LIST(activators)
|
||||
. = ..()
|
||||
/*
|
||||
/obj/item/integrated_circuit/nano_host()
|
||||
if(istype(src.loc, /obj/item/device/electronic_assembly))
|
||||
var/obj/item/device/electronic_assembly/assembly = loc
|
||||
return assembly.resolve_nano_host()
|
||||
return ..()
|
||||
*/
|
||||
|
||||
/obj/item/integrated_circuit/emp_act(severity)
|
||||
for(var/k in 1 to inputs.len)
|
||||
var/datum/integrated_io/I = inputs[k]
|
||||
@@ -116,14 +110,10 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
/obj/item/integrated_circuit/interact(mob/user)
|
||||
if(!check_interactivity(user))
|
||||
return
|
||||
// if(!assembly)
|
||||
// return
|
||||
|
||||
var/window_height = 350
|
||||
var/window_width = 600
|
||||
|
||||
//var/table_edge_width = "[(window_width - window_width * 0.1) / 4]px"
|
||||
//var/table_middle_width = "[(window_width - window_width * 0.1) - (table_edge_width * 2)]px"
|
||||
var/table_edge_width = "30%"
|
||||
var/table_middle_width = "40%"
|
||||
|
||||
@@ -163,7 +153,6 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
if(io.linked.len)
|
||||
for(var/k in 1 to io.linked.len)
|
||||
var/datum/integrated_io/linked = io.linked[k]
|
||||
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
|
||||
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]>[linked]</a> \
|
||||
@ <a href=?src=[REF(linked.holder)];examine=1;>[linked.holder.displayed_name]</a><br>"
|
||||
|
||||
@@ -182,7 +171,6 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
if(io.linked.len)
|
||||
for(var/k in 1 to io.linked.len)
|
||||
var/datum/integrated_io/linked = io.linked[k]
|
||||
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
|
||||
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]>[linked]</a> \
|
||||
@ <a href=?src=[REF(linked.holder)];examine=1;>[linked.holder.displayed_name]</a><br>"
|
||||
|
||||
@@ -199,7 +187,6 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
if(io.linked.len)
|
||||
for(var/k in 1 to io.linked.len)
|
||||
var/datum/integrated_io/linked = io.linked[k]
|
||||
// words += "<a href=?src=[REF(linked.holder)];pin_name=1;pin=[REF(linked)];link=[REF(io)]>\[[linked]\]</a>
|
||||
words += "<a href=?src=[REF(src)];pin_unwire=1;pin=[REF(io)];link=[REF(linked)]><font color='FF0000'>[linked]</font></a> \
|
||||
@ <a href=?src=[REF(linked.holder)];examine=1;><font color='FF0000'>[linked.holder.displayed_name]</font></a><br>"
|
||||
|
||||
@@ -210,9 +197,6 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
HTML += "</table>"
|
||||
HTML += "</div>"
|
||||
|
||||
// HTML += "<br><font color='33CC33'>Meta Variables;</font>" // If more meta vars get introduced, uncomment this.
|
||||
// HTML += "<br>"
|
||||
|
||||
HTML += "<br><font color='0000AA'>Complexity: [complexity]</font>"
|
||||
if(power_draw_idle)
|
||||
HTML += "<br><font color='0000AA'>Power Draw: [power_draw_idle] W (Idle)</font>"
|
||||
@@ -268,34 +252,6 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
else
|
||||
var/datum/integrated_io/io = pin
|
||||
io.ask_for_pin_data(usr) // The pins themselves will determine how to ask for data, and will validate the data.
|
||||
/*
|
||||
if(io.io_type == DATA_CHANNEL)
|
||||
|
||||
var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number", "null")
|
||||
if(!check_interactivity(usr))
|
||||
return
|
||||
|
||||
var/new_data = null
|
||||
switch(type_to_use)
|
||||
if("string")
|
||||
new_data = stripped_input(usr, "Now type in a string.","[src] string writing")
|
||||
to_chat(usr, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
//to_chat(user, "<span class='notice'>You write '[new_data]' to the '[io]' pin of \the [io.holder].</span>")
|
||||
if("number")
|
||||
new_data = input("Now type in a number.","[src] number writing") as null|num
|
||||
if(isnum(new_data) && check_interactivity(usr) )
|
||||
to_chat(usr, "<span class='notice'>You input [new_data] into the pin.</span>")
|
||||
if("null")
|
||||
if(check_interactivity(usr))
|
||||
to_chat(usr, "<span class='notice'>You clear the pin's memory.</span>")
|
||||
|
||||
io.write_data_to_pin(new_data)
|
||||
|
||||
else if(io.io_type == PULSE_CHANNEL)
|
||||
io.holder.check_then_do_work(ignore_power = TRUE)
|
||||
to_chat(usr, "<span class='notice'>You pulse \the [io.holder]'s [io] pin.</span>")
|
||||
*/
|
||||
|
||||
|
||||
if(href_list["pin_unwire"])
|
||||
if (!istype(held_item, /obj/item/device/multitool) || !allow_multitool)
|
||||
|
||||
@@ -38,10 +38,6 @@ D [1]/ ||
|
||||
data = null
|
||||
holder = null
|
||||
return ..()
|
||||
/*
|
||||
/datum/integrated_io/nano_host()
|
||||
return holder.nano_host()
|
||||
*/
|
||||
|
||||
/datum/integrated_io/proc/data_as_type(var/as_type)
|
||||
if(!isweakref(data))
|
||||
@@ -57,14 +53,6 @@ D [1]/ ||
|
||||
if(istext(input))
|
||||
return "(\"[input]\")" // Wraps the 'string' in escaped quotes, so that people know it's a 'string'.
|
||||
|
||||
/*
|
||||
list[](
|
||||
"A",
|
||||
"B",
|
||||
"C"
|
||||
)
|
||||
*/
|
||||
|
||||
if(islist(input))
|
||||
var/list/my_list = input
|
||||
var/result = "list\[[my_list.len]\]("
|
||||
@@ -84,7 +72,6 @@ list[](
|
||||
var/datum/weakref/w = input
|
||||
var/atom/A = w.resolve()
|
||||
return A ? "([A.name] \[Ref\])" : "(null)" // For refs, we want just the name displayed.
|
||||
//return A ? "([REF(A)] \[Ref\])" : "(null)"
|
||||
|
||||
return "([input])" // Nothing special needed for numbers or other stuff.
|
||||
|
||||
@@ -115,7 +102,7 @@ list[](
|
||||
holder.on_data_written()
|
||||
else if(islist(new_data))
|
||||
var/list/new_list = new_data
|
||||
data = new_list.Copy(1,min( IC_MAX_LIST_LENGTH+1, new_list.len ))
|
||||
data = new_list.Copy(max(1,new_list.len - IC_MAX_LIST_LENGTH+1),0)
|
||||
holder.on_data_written()
|
||||
|
||||
/datum/integrated_io/proc/push_data()
|
||||
|
||||
@@ -276,13 +276,7 @@
|
||||
else
|
||||
return 0
|
||||
to_chat(usr, "<span class='notice'>This is program for [element[2]]</span>")
|
||||
/*
|
||||
else if(istype(PA,/obj/item/weapon/implant/integrated_circuit))
|
||||
var/obj/item/weapon/implant/integrated_circuit/PI = PA
|
||||
var/obj/item/device/electronic_assembly/implant/PIC = PI.IC
|
||||
maxcap = PIC.max_components
|
||||
maxcomp = PIC.max_complexity
|
||||
metalcost = metalcost + round( (initial(PIC.max_complexity) + initial(PIC.max_components) ) / 4)*/
|
||||
|
||||
else
|
||||
return 0 //what's the point if there is no assembly?
|
||||
if(chap[3] != "components") //if there is only one word,there is no components.
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
/datum/integrated_io/lists/write_data_to_pin(var/new_data)
|
||||
if(islist(new_data))
|
||||
var/list/new_list = new_data
|
||||
data = new_list.Copy(1,min( IC_MAX_LIST_LENGTH+1, new_list.len ))
|
||||
data = new_list.Copy(max(1,new_list.len - IC_MAX_LIST_LENGTH+1),0)
|
||||
holder.on_data_written()
|
||||
|
||||
/datum/integrated_io/lists/display_pin_type()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// These pins can only contain numbers (int and floating point) or null.
|
||||
/datum/integrated_io/number
|
||||
name = "number pin"
|
||||
// data = 0
|
||||
|
||||
/datum/integrated_io/number/ask_for_pin_data(mob/user)
|
||||
var/new_data = input("Please type in a number.","[src] number writing") as null|num
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/item/integrated_circuit/passive/power/solar_cell
|
||||
name = "tiny photovoltaic cell"
|
||||
desc = "It's a very tiny solar cell, generally used in calculators."
|
||||
extended_desc = "The cell generates 1W of energy per second in optimal lighting conditions. Less light will result in less power being generated."
|
||||
extended_desc = "The cell generates 1W of power per second in optimal lighting conditions. Less light will result in less power being generated."
|
||||
icon_state = "solar_cell"
|
||||
complexity = 8
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_DATA = 2)
|
||||
@@ -56,7 +56,7 @@
|
||||
name = "tesla power relay"
|
||||
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
extended_desc = "The siphon generates 50 W of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
extended_desc = "The siphon generates 50 W of power, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
from the 'equipment' power channel."
|
||||
icon_state = "power_relay"
|
||||
complexity = 7
|
||||
@@ -108,7 +108,7 @@
|
||||
name = "large tesla power relay"
|
||||
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them, now in industiral size!"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
extended_desc = "The siphon generates 1 kW of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
extended_desc = "The siphon generates 1 kW of power, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
from the 'equipment' power channel."
|
||||
icon_state = "power_relay"
|
||||
complexity = 15
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/obj/item/integrated_circuit/transfer/multiplexer/New()
|
||||
for(var/i = 1 to number_of_inputs)
|
||||
inputs["input [i]"] = IC_PINTYPE_ANY // This is just a string since pins don't get built until ..() is called.
|
||||
// inputs += "input [i]"
|
||||
|
||||
complexity = number_of_inputs
|
||||
..()
|
||||
desc += " It has [number_of_inputs] input pins."
|
||||
|
||||
@@ -104,50 +104,6 @@
|
||||
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
/*
|
||||
/obj/item/integrated_circuit/input/pressure_plate
|
||||
name = "pressure plate"
|
||||
desc = "Electronic plate with a scanner, that could retrieve references to things,that was put onto the machine"
|
||||
icon_state = "pressure_plate"
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("laid" = IC_PINTYPE_REF, "removed" = IC_PINTYPE_REF)
|
||||
activators = list("laid" = IC_PINTYPE_PULSE_OUT, "removed" = IC_PINTYPE_PULSE_OUT)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
power_draw_per_use = 40
|
||||
var/list/cont
|
||||
|
||||
/obj/item/integrated_circuit/input/pressure_plate/New()
|
||||
..()
|
||||
processing_objects |= src
|
||||
|
||||
/obj/item/integrated_circuit/input/pressure_plate/Destroy()
|
||||
processing_objects -= src
|
||||
|
||||
/obj/item/integrated_circuit/input/pressure_plate/process()
|
||||
var/list/newcont
|
||||
var/turf/T = get_turf(src)
|
||||
newcont = T.contents
|
||||
var/list/U = cont & newcont
|
||||
for(var/laid in U)
|
||||
if(!(laid in cont))
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = WEAKREF(laid)
|
||||
O.push_data()
|
||||
activate_pin(1)
|
||||
break
|
||||
for(var/removed in U)
|
||||
if(!(removed in newcont))
|
||||
var/datum/integrated_io/O = outputs[2]
|
||||
O.data = WEAKREF(removed)
|
||||
O.push_data()
|
||||
activate_pin(2)
|
||||
break
|
||||
cont = newcont
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/input/adv_med_scanner
|
||||
name = "integrated advanced medical analyser"
|
||||
@@ -794,13 +750,13 @@
|
||||
set_pin_data(IC_OUTPUT, 2, null)
|
||||
set_pin_data(IC_OUTPUT, 3, null)
|
||||
if(AM)
|
||||
var/obj/item/stock_parts/cell/cell = get_cell(AM)
|
||||
if(cell)
|
||||
var/obj/item/stock_parts/cell/C = AM.get_cell()
|
||||
if(C)
|
||||
var/turf/A = get_turf(src)
|
||||
if(AM in view(A))
|
||||
push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, cell.charge)
|
||||
set_pin_data(IC_OUTPUT, 2, cell.maxcharge)
|
||||
set_pin_data(IC_OUTPUT, 3, cell.percent())
|
||||
push_data()
|
||||
if(get_turf(AM) in view(A))
|
||||
set_pin_data(IC_OUTPUT, 1, C.charge)
|
||||
set_pin_data(IC_OUTPUT, 2, C.maxcharge)
|
||||
set_pin_data(IC_OUTPUT, 3, C.percent())
|
||||
activate_pin(2)
|
||||
push_data()
|
||||
return
|
||||
|
||||
@@ -138,12 +138,14 @@
|
||||
var/list/input_list = get_pin_data(IC_INPUT, 1)
|
||||
var/index = get_pin_data(IC_INPUT, 2)
|
||||
var/item = get_pin_data(IC_INPUT, 3)
|
||||
if(!islist(item)) //crh proof
|
||||
input_list[index] = item
|
||||
set_pin_data(IC_OUTPUT, 1, input_list)
|
||||
if(!islist(item))
|
||||
var/list/red_list = input_list.Copy() //crash proof
|
||||
red_list[index] = item
|
||||
set_pin_data(IC_OUTPUT, 1, red_list)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
obj/item/integrated_circuit/lists/len
|
||||
name = "len circuit"
|
||||
desc = "This circuit will return the length of the list."
|
||||
|
||||
@@ -139,7 +139,6 @@
|
||||
being held, or anchored in some way. It should be noted that the ability to move is dependant on the type of assembly that this circuit inhabits."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
complexity = 20
|
||||
// size = 5
|
||||
inputs = list("direction" = IC_PINTYPE_DIR)
|
||||
outputs = list()
|
||||
activators = list("step towards dir" = IC_PINTYPE_PULSE_IN,"on step"=IC_PINTYPE_PULSE_OUT,"blocked"=IC_PINTYPE_PULSE_OUT)
|
||||
@@ -232,12 +231,7 @@
|
||||
attached_grenade.forceMove(drop_location())
|
||||
attached_grenade = null
|
||||
desc = initial(desc)
|
||||
/*
|
||||
/obj/item/integrated_circuit/manipulation/grenade/frag
|
||||
pre_attached_grenade_type = /obj/item/weapon/grenade/explosive
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 10)
|
||||
spawn_flags = null // Used for world initializing, see the #defines above.
|
||||
*/
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/plant_module
|
||||
name = "plant manipulation module"
|
||||
desc = "Used to uproot weeds or harvest plants in trays."
|
||||
@@ -306,19 +300,7 @@
|
||||
power_draw_per_use = 50
|
||||
var/max_w_class = WEIGHT_CLASS_NORMAL
|
||||
var/max_items = 10
|
||||
/*
|
||||
/obj/item/integrated_circuit/manipulation/thrower/New()
|
||||
processing_objects |= src
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/thrower/Destroy()
|
||||
processing_objects -= src
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/thrower/process()
|
||||
set_pin_data(IC_OUTPUT, 1, WEAKREF(contents[1]))
|
||||
set_pin_data(IC_OUTPUT, 2, WEAKREF(contents[contents.len]))
|
||||
set_pin_data(IC_OUTPUT, 3, contents.len)
|
||||
push_data()
|
||||
*/
|
||||
/obj/item/integrated_circuit/manipulation/grabber/do_work()
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/item)
|
||||
|
||||
@@ -39,38 +39,35 @@
|
||||
/obj/item/integrated_circuit/power/transmitter/do_work()
|
||||
|
||||
var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
|
||||
if(AM)
|
||||
if(!assembly)
|
||||
return FALSE // Pointless to do everything else if there's no battery to draw from.
|
||||
|
||||
var/obj/item/stock_parts/cell/cell = AM.get_cell()
|
||||
if(cell)
|
||||
var/transfer_amount = amount_to_move
|
||||
var/turf/A = get_turf(src)
|
||||
var/turf/B = get_turf(AM)
|
||||
if(A.Adjacent(B))
|
||||
if(AM.loc != assembly)
|
||||
transfer_amount *= 0.8 // Losses due to distance.
|
||||
|
||||
if(cell.charge == cell.maxcharge)
|
||||
return FALSE
|
||||
|
||||
if(transfer_amount && assembly.draw_power(amount_to_move)) // CELLRATE is already handled in draw_power()
|
||||
cell.give(transfer_amount * GLOB.CELLRATE)
|
||||
set_pin_data(IC_OUTPUT, 1, cell.charge)
|
||||
set_pin_data(IC_OUTPUT, 2, cell.maxcharge)
|
||||
set_pin_data(IC_OUTPUT, 3, cell.percent())
|
||||
activate_pin(2)
|
||||
push_data()
|
||||
return TRUE
|
||||
else
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
set_pin_data(IC_OUTPUT, 2, null)
|
||||
set_pin_data(IC_OUTPUT, 3, null)
|
||||
if(!AM)
|
||||
return FALSE
|
||||
if(!assembly)
|
||||
return FALSE // Pointless to do everything else if there's no battery to draw from.
|
||||
var/obj/item/stock_parts/cell/cell = AM.get_cell()
|
||||
if(cell)
|
||||
var/transfer_amount = amount_to_move
|
||||
var/turf/A = get_turf(src)
|
||||
var/turf/B = get_turf(AM)
|
||||
if(A.Adjacent(B))
|
||||
if(AM.loc != assembly)
|
||||
transfer_amount *= 0.8 // Losses due to distance.
|
||||
set_pin_data(IC_OUTPUT, 1, cell.charge)
|
||||
set_pin_data(IC_OUTPUT, 2, cell.maxcharge)
|
||||
set_pin_data(IC_OUTPUT, 3, cell.percent())
|
||||
activate_pin(2)
|
||||
push_data()
|
||||
return FALSE
|
||||
return FALSE
|
||||
if(cell.charge == cell.maxcharge)
|
||||
return FALSE
|
||||
if(transfer_amount && assembly.draw_power(amount_to_move)) // CELLRATE is already handled in draw_power()
|
||||
cell.give(transfer_amount * GLOB.CELLRATE)
|
||||
return TRUE
|
||||
else
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
set_pin_data(IC_OUTPUT, 2, null)
|
||||
set_pin_data(IC_OUTPUT, 3, null)
|
||||
activate_pin(2)
|
||||
push_data()
|
||||
return FALSE
|
||||
|
||||
/obj/item/integrated_circuit/power/transmitter/large/do_work()
|
||||
if(..()) // If the above code succeeds, do this below.
|
||||
@@ -79,3 +76,4 @@
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
visible_message("<span class='warning'>\The [assembly] makes some sparks!</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -230,11 +230,9 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
dat += "<h3>Checked Out Books</h3><BR>"
|
||||
for(var/datum/borrowbook/b in checkouts)
|
||||
var/timetaken = world.time - b.getdate
|
||||
//timetaken *= 10
|
||||
timetaken /= 600
|
||||
timetaken = round(timetaken)
|
||||
var/timedue = b.duedate - world.time
|
||||
//timedue *= 10
|
||||
timedue /= 600
|
||||
if(timedue <= 0)
|
||||
timedue = "<font color=red><b>(OVERDUE)</b> [timedue]</font>"
|
||||
|
||||
@@ -138,42 +138,6 @@
|
||||
|
||||
// This is the define used to calculate falloff.
|
||||
|
||||
/*
|
||||
/datum/light_source/proc/apply_lum()
|
||||
var/static/update_gen = 1
|
||||
applied = 1
|
||||
|
||||
// Keep track of the last applied lum values so that the lighting can be reversed
|
||||
var/thing
|
||||
var/datum/lighting_corner/C
|
||||
var/corners = list()
|
||||
LAZYINITLIST(effect_str)
|
||||
FOR_DVIEW(var/turf/T, light_range+1, source_turf, INVISIBILITY_LIGHTING)
|
||||
var/list/turf_corners = T.get_corners()
|
||||
|
||||
for (thing in turf_corners)
|
||||
C = thing
|
||||
if (C.update_gen == update_gen)
|
||||
continue
|
||||
|
||||
C.update_gen = update_gen
|
||||
LAZYADD(C.affecting,src)
|
||||
|
||||
if (!C.active)
|
||||
effect_str[C] = 0
|
||||
continue
|
||||
|
||||
APPLY_CORNER(C)
|
||||
|
||||
LAZYADD(T.affecting_lights, src)
|
||||
LAZYADD(affecting_turfs, T)
|
||||
FOR_DVIEW_END
|
||||
update_gen++
|
||||
applied_lum_r = lum_r
|
||||
applied_lum_g = lum_g
|
||||
applied_lum_b = lum_b
|
||||
*/
|
||||
|
||||
/datum/light_source/proc/remove_lum()
|
||||
applied = FALSE
|
||||
var/thing
|
||||
|
||||
@@ -579,17 +579,18 @@
|
||||
var/ladder_x = T.x
|
||||
var/ladder_y = T.y
|
||||
to_chat(user, "<span class='notice'>You unfold the ladder. It extends much farther than you were expecting.</span>")
|
||||
var/last_ladder = null
|
||||
for(var/i in 1 to world.maxz)
|
||||
if(i == ZLEVEL_CENTCOM || i == ZLEVEL_TRANSIT)
|
||||
if(i == ZLEVEL_CENTCOM || i == ZLEVEL_TRANSIT || i == ZLEVEL_CITYOFCOGS)
|
||||
continue
|
||||
var/turf/T2 = locate(ladder_x, ladder_y, i)
|
||||
new /obj/structure/ladder/unbreakable/jacob(T2)
|
||||
last_ladder = new /obj/structure/ladder/unbreakable/jacob(T2, null, last_ladder)
|
||||
qdel(src)
|
||||
|
||||
// Inherit from unbreakable but don't set ID, to suppress the default Z linkage
|
||||
/obj/structure/ladder/unbreakable/jacob
|
||||
name = "jacob's ladder"
|
||||
desc = "An indestructible celestial ladder that violates the laws of physics."
|
||||
auto_connect = TRUE
|
||||
|
||||
///Bosses
|
||||
|
||||
|
||||
@@ -24,14 +24,6 @@
|
||||
if(BR)
|
||||
BR.damaged_brain = 1 //beaten to a pulp
|
||||
|
||||
/* //currently unused feature, since brain outside a mmi is always dead.
|
||||
/mob/living/brain/proc/handle_brain_revival_life()
|
||||
if(stat != DEAD)
|
||||
if(config.revival_brain_life != -1)
|
||||
if( !container && (world.time - timeofhostdeath) > config.revival_brain_life)
|
||||
death()
|
||||
*/
|
||||
|
||||
/mob/living/brain/proc/handle_emp_damage()
|
||||
if(emp_damage)
|
||||
if(stat == DEAD)
|
||||
|
||||
@@ -1636,7 +1636,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else
|
||||
burn_damage = HEAT_DAMAGE_LEVEL_2
|
||||
burn_damage *= heatmod
|
||||
if((prob(burn_damage) * 10) / 4) //40% for level 3 damage on humans
|
||||
if (H.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4) //40% for level 3 damage on humans
|
||||
H.emote("scream")
|
||||
H.apply_damage(burn_damage, BURN)
|
||||
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !(GLOB.mutations_list[COLDRES] in H.dna.mutations))
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
var/aiRestorePowerRoutine = 0
|
||||
var/requires_power = POWER_REQ_ALL
|
||||
var/can_be_carded = TRUE
|
||||
//var/list/laws = list()
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
|
||||
var/viewalerts = 0
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
@@ -172,7 +171,6 @@
|
||||
if(incapacitated())
|
||||
return
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Clown", "Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static", "Red October", "House", "Heartline", "Hades", "Helios", "President", "Syndicat Meow", "Alien", "Too Deep", "Triumvirate", "Triumvirate-M", "Text", "Matrix", "Dorf", "Bliss", "Not Malf", "Fuzzy", "Goon", "Database", "Glitchman", "Murica", "Nanotrasen", "Gentoo", "Angel")
|
||||
if(icontype == "Clown")
|
||||
icon_state = "ai-clown2"
|
||||
@@ -238,9 +236,6 @@
|
||||
icon_state = "ai-gentoo"
|
||||
else if(icontype == "Angel")
|
||||
icon_state = "ai-angel"
|
||||
//else
|
||||
//to_chat(usr, "You can only change your display once!")
|
||||
//return
|
||||
|
||||
/mob/living/silicon/ai/Stat()
|
||||
..()
|
||||
|
||||
@@ -1,161 +1,149 @@
|
||||
// CAMERA NET
|
||||
//
|
||||
// The datum containing all the chunks.
|
||||
|
||||
#define CHUNK_SIZE 16 // Only chunk sizes that are to the power of 2. E.g: 2, 4, 8, 16, etc..
|
||||
|
||||
GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
|
||||
/datum/cameranet
|
||||
var/name = "Camera Net" // Name to show for VV and stat()
|
||||
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
|
||||
var/list/cameras = list()
|
||||
// The chunks of the map, mapping the areas that the cameras can see.
|
||||
var/list/chunks = list()
|
||||
var/ready = 0
|
||||
|
||||
// The object used for the clickable stat() button.
|
||||
var/obj/effect/statclick/statclick
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
/datum/cameranet/proc/chunkGenerated(x, y, z)
|
||||
x &= ~(CHUNK_SIZE - 1)
|
||||
y &= ~(CHUNK_SIZE - 1)
|
||||
var/key = "[x],[y],[z]"
|
||||
return (chunks[key])
|
||||
|
||||
// Returns the chunk in the x, y, z.
|
||||
// If there is no chunk, it creates a new chunk and returns that.
|
||||
/datum/cameranet/proc/getCameraChunk(x, y, z)
|
||||
x &= ~(CHUNK_SIZE - 1)
|
||||
y &= ~(CHUNK_SIZE - 1)
|
||||
var/key = "[x],[y],[z]"
|
||||
if(!chunks[key])
|
||||
chunks[key] = new /datum/camerachunk(null, x, y, z)
|
||||
|
||||
return chunks[key]
|
||||
|
||||
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
|
||||
|
||||
/datum/cameranet/proc/visibility(mob/camera/aiEye/ai)
|
||||
// 0xf = 15
|
||||
var/x1 = max(0, ai.x - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, ai.y - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, ai.x + 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, ai.y + 16) & ~(CHUNK_SIZE - 1)
|
||||
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
visibleChunks |= getCameraChunk(x, y, ai.z)
|
||||
|
||||
var/list/remove = ai.visibleCameraChunks - visibleChunks
|
||||
var/list/add = visibleChunks - ai.visibleCameraChunks
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.remove(ai)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.add(ai)
|
||||
|
||||
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
|
||||
|
||||
/datum/cameranet/proc/updateVisibility(atom/A, opacity_check = 1)
|
||||
|
||||
if(!SSticker || (opacity_check && !A.opacity))
|
||||
return
|
||||
majorChunkChange(A, 2)
|
||||
|
||||
/datum/cameranet/proc/updateChunk(x, y, z)
|
||||
// 0xf = 15
|
||||
if(!chunkGenerated(x, y, z))
|
||||
return
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, z)
|
||||
chunk.hasChanged()
|
||||
|
||||
// Removes a camera from a chunk.
|
||||
|
||||
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 0)
|
||||
|
||||
// Add a camera to a chunk.
|
||||
|
||||
/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
|
||||
// Used for Cyborg cameras. Since portable cameras can be in ANY chunk.
|
||||
|
||||
/datum/cameranet/proc/updatePortableCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
//else
|
||||
// majorChunkChange(c, 0)
|
||||
|
||||
// Never access this proc directly!!!!
|
||||
// This will update the chunk and all the surrounding chunks.
|
||||
// It will also add the atom to the cameras list if you set the choice to 1.
|
||||
// Setting the choice to 0 will remove the camera from the chunks.
|
||||
// If you want to update the chunks around an object, without adding/removing a camera, use choice 2.
|
||||
|
||||
/datum/cameranet/proc/majorChunkChange(atom/c, choice)
|
||||
// 0xf = 15
|
||||
if(!c)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(c)
|
||||
if(T)
|
||||
var/x1 = max(0, T.x - (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, T.y - (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, T.x + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, T.y + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z)
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
chunk.hasChanged()
|
||||
|
||||
// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0.
|
||||
|
||||
/datum/cameranet/proc/checkCameraVis(mob/living/target)
|
||||
|
||||
// 0xf = 15
|
||||
var/turf/position = get_turf(target)
|
||||
return checkTurfVis(position)
|
||||
|
||||
|
||||
/datum/cameranet/proc/checkTurfVis(turf/position)
|
||||
var/datum/camerachunk/chunk = getCameraChunk(position.x, position.y, position.z)
|
||||
if(chunk)
|
||||
if(chunk.changed)
|
||||
chunk.hasChanged(1) // Update now, no matter if it's visible or not.
|
||||
if(chunk.visibleTurfs[position])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/cameranet/proc/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat(name, statclick.update("Cameras: [GLOB.cameranet.cameras.len] | Chunks: [GLOB.cameranet.chunks.len]"))
|
||||
|
||||
// Debug verb for VVing the chunk that the turf is in.
|
||||
/*
|
||||
/turf/verb/view_chunk()
|
||||
set src in world
|
||||
|
||||
if(cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z)
|
||||
usr.client.debug_variables(chunk)
|
||||
*/
|
||||
// CAMERA NET
|
||||
//
|
||||
// The datum containing all the chunks.
|
||||
|
||||
#define CHUNK_SIZE 16 // Only chunk sizes that are to the power of 2. E.g: 2, 4, 8, 16, etc..
|
||||
|
||||
GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
|
||||
/datum/cameranet
|
||||
var/name = "Camera Net" // Name to show for VV and stat()
|
||||
|
||||
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
|
||||
var/list/cameras = list()
|
||||
// The chunks of the map, mapping the areas that the cameras can see.
|
||||
var/list/chunks = list()
|
||||
var/ready = 0
|
||||
|
||||
// The object used for the clickable stat() button.
|
||||
var/obj/effect/statclick/statclick
|
||||
|
||||
// Checks if a chunk has been Generated in x, y, z.
|
||||
/datum/cameranet/proc/chunkGenerated(x, y, z)
|
||||
x &= ~(CHUNK_SIZE - 1)
|
||||
y &= ~(CHUNK_SIZE - 1)
|
||||
var/key = "[x],[y],[z]"
|
||||
return (chunks[key])
|
||||
|
||||
// Returns the chunk in the x, y, z.
|
||||
// If there is no chunk, it creates a new chunk and returns that.
|
||||
/datum/cameranet/proc/getCameraChunk(x, y, z)
|
||||
x &= ~(CHUNK_SIZE - 1)
|
||||
y &= ~(CHUNK_SIZE - 1)
|
||||
var/key = "[x],[y],[z]"
|
||||
if(!chunks[key])
|
||||
chunks[key] = new /datum/camerachunk(null, x, y, z)
|
||||
|
||||
return chunks[key]
|
||||
|
||||
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
|
||||
|
||||
/datum/cameranet/proc/visibility(mob/camera/aiEye/ai)
|
||||
// 0xf = 15
|
||||
var/x1 = max(0, ai.x - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, ai.y - 16) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, ai.x + 16) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, ai.y + 16) & ~(CHUNK_SIZE - 1)
|
||||
|
||||
var/list/visibleChunks = list()
|
||||
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
visibleChunks |= getCameraChunk(x, y, ai.z)
|
||||
|
||||
var/list/remove = ai.visibleCameraChunks - visibleChunks
|
||||
var/list/add = visibleChunks - ai.visibleCameraChunks
|
||||
|
||||
for(var/chunk in remove)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.remove(ai)
|
||||
|
||||
for(var/chunk in add)
|
||||
var/datum/camerachunk/c = chunk
|
||||
c.add(ai)
|
||||
|
||||
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
|
||||
|
||||
/datum/cameranet/proc/updateVisibility(atom/A, opacity_check = 1)
|
||||
|
||||
if(!SSticker || (opacity_check && !A.opacity))
|
||||
return
|
||||
majorChunkChange(A, 2)
|
||||
|
||||
/datum/cameranet/proc/updateChunk(x, y, z)
|
||||
// 0xf = 15
|
||||
if(!chunkGenerated(x, y, z))
|
||||
return
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, z)
|
||||
chunk.hasChanged()
|
||||
|
||||
// Removes a camera from a chunk.
|
||||
|
||||
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 0)
|
||||
|
||||
// Add a camera to a chunk.
|
||||
|
||||
/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
|
||||
// Used for Cyborg cameras. Since portable cameras can be in ANY chunk.
|
||||
|
||||
/datum/cameranet/proc/updatePortableCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 1)
|
||||
|
||||
// Never access this proc directly!!!!
|
||||
// This will update the chunk and all the surrounding chunks.
|
||||
// It will also add the atom to the cameras list if you set the choice to 1.
|
||||
// Setting the choice to 0 will remove the camera from the chunks.
|
||||
// If you want to update the chunks around an object, without adding/removing a camera, use choice 2.
|
||||
|
||||
/datum/cameranet/proc/majorChunkChange(atom/c, choice)
|
||||
// 0xf = 15
|
||||
if(!c)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(c)
|
||||
if(T)
|
||||
var/x1 = max(0, T.x - (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/y1 = max(0, T.y - (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, T.x + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, T.y + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z)
|
||||
if(choice == 0)
|
||||
// Remove the camera.
|
||||
chunk.cameras -= c
|
||||
else if(choice == 1)
|
||||
// You can't have the same camera in the list twice.
|
||||
chunk.cameras |= c
|
||||
chunk.hasChanged()
|
||||
|
||||
// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0.
|
||||
|
||||
/datum/cameranet/proc/checkCameraVis(mob/living/target)
|
||||
|
||||
// 0xf = 15
|
||||
var/turf/position = get_turf(target)
|
||||
return checkTurfVis(position)
|
||||
|
||||
|
||||
/datum/cameranet/proc/checkTurfVis(turf/position)
|
||||
var/datum/camerachunk/chunk = getCameraChunk(position.x, position.y, position.z)
|
||||
if(chunk)
|
||||
if(chunk.changed)
|
||||
chunk.hasChanged(1) // Update now, no matter if it's visible or not.
|
||||
if(chunk.visibleTurfs[position])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/cameranet/proc/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat(name, statclick.update("Cameras: [GLOB.cameranet.cameras.len] | Chunks: [GLOB.cameranet.chunks.len]"))
|
||||
|
||||
@@ -138,14 +138,6 @@
|
||||
|
||||
for(var/word in words)
|
||||
play_vox_word(word, src.z, null)
|
||||
/*
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
var/turf/T = get_turf(M)
|
||||
var/turf/our_turf = get_turf(src)
|
||||
if(T.z == our_turf.z)
|
||||
to_chat(M, "<b><font size = 3><font color = red>AI announcement:</font color> [message]</font size></b>")
|
||||
*/
|
||||
|
||||
|
||||
/proc/play_vox_word(word, z_level, mob/only_listener)
|
||||
|
||||
@@ -588,7 +588,6 @@
|
||||
if(!istype(machine, /obj/machinery/door))
|
||||
dat += "Connected device's firmware does not appear to be compatible with Airlock Jack protocols.<br>"
|
||||
return dat
|
||||
// var/obj/machinery/airlock/door = machine
|
||||
|
||||
if(!hackdoor)
|
||||
dat += "<a href='byond://?src=[REF(src)];software=doorjack;jack=1;sub=0'>Begin Airlock Jacking</a> <br>"
|
||||
|
||||
@@ -1,215 +1,214 @@
|
||||
//These procs handle putting stuff in your hand. It's probably best to use these rather than setting stuff manually
|
||||
//as they handle all relevant stuff like adding it to the player's screen and such
|
||||
|
||||
//Returns the thing in our active hand (whatever is in our active module-slot, in this case)
|
||||
/mob/living/silicon/robot/get_active_held_item()
|
||||
return module_active
|
||||
|
||||
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/ //fuck yooooooooooooou
|
||||
/mob/living/silicon/robot/proc/uneq_module(obj/item/O)
|
||||
if(!O)
|
||||
return 0
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
if(istype(O, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
update_sight()
|
||||
else if(istype(O, /obj/item/storage/bag/tray/))
|
||||
var/obj/item/storage/bag/tray/T = O
|
||||
T.do_quick_empty()
|
||||
if(client)
|
||||
client.screen -= O
|
||||
observer_screen_update(O,FALSE)
|
||||
O.forceMove(module) //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
|
||||
if(O.flags_1 & DROPDEL_1)
|
||||
O.flags_1 &= ~DROPDEL_1 //we shouldn't HAVE things with DROPDEL_1 in our modules, but better safe than runtiming horribly
|
||||
|
||||
O.dropped(src)
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
if(held_items[1] == O)
|
||||
inv1.icon_state = "inv1"
|
||||
held_items[1] = null
|
||||
else if(held_items[2] == O)
|
||||
inv2.icon_state = "inv2"
|
||||
held_items[2] = null
|
||||
else if(held_items[3] == O)
|
||||
inv3.icon_state = "inv3"
|
||||
held_items[3] = null
|
||||
hud_used.update_robot_modules_display()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(obj/item/O)
|
||||
. = FALSE
|
||||
if(!(O in module.modules))
|
||||
return
|
||||
if(activated(O))
|
||||
to_chat(src, "<span class='warning'>That module is already activated.</span>")
|
||||
return
|
||||
if(!held_items[1])
|
||||
held_items[1] = O
|
||||
O.screen_loc = inv1.screen_loc
|
||||
. = TRUE
|
||||
else if(!held_items[2])
|
||||
held_items[2] = O
|
||||
O.screen_loc = inv2.screen_loc
|
||||
. = TRUE
|
||||
else if(!held_items[3])
|
||||
held_items[3] = O
|
||||
O.screen_loc = inv3.screen_loc
|
||||
. = TRUE
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You need to disable a module first!</span>")
|
||||
if(.)
|
||||
O.equipped(src, slot_hands)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
observer_screen_update(O,TRUE)
|
||||
O.forceMove(src)
|
||||
if(istype(O, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode |= S.sight_mode
|
||||
update_sight()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/observer_screen_update(obj/item/I,add = TRUE)
|
||||
if(observers && observers.len)
|
||||
for(var/M in observers)
|
||||
var/mob/dead/observe = M
|
||||
if(observe.client && observe.client.eye == src)
|
||||
if(add)
|
||||
observe.client.screen += I
|
||||
else
|
||||
observe.client.screen -= I
|
||||
else
|
||||
observers -= observe
|
||||
if(!observers.len)
|
||||
observers = null
|
||||
break
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
for(var/obj/item/I in held_items)
|
||||
uneq_module(I)
|
||||
|
||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||
if(O in held_items)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Helper procs for cyborg modules on the UI.
|
||||
//These are hackish but they help clean up code elsewhere.
|
||||
|
||||
//module_selected(module) - Checks whether the module slot specified by "module" is currently selected.
|
||||
/mob/living/silicon/robot/proc/module_selected(module) //Module is 1-3
|
||||
return module == get_selected_module()
|
||||
|
||||
//module_active(module) - Checks whether there is a module active in the slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/module_active(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return FALSE
|
||||
|
||||
if(LAZYLEN(held_items) >= module)
|
||||
if(held_items[module])
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected.
|
||||
/mob/living/silicon/robot/proc/get_selected_module()
|
||||
if(module_active)
|
||||
return held_items.Find(module_active)
|
||||
|
||||
return 0
|
||||
|
||||
//select_module(module) - Selects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/select_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(!module_active(module))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1 +a"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3"
|
||||
if(2)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2 +a"
|
||||
inv3.icon_state = "inv3"
|
||||
if(3)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3 +a"
|
||||
module_active = held_items[module]
|
||||
|
||||
//deselect_module(module) - Deselects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/deselect_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(!module_active(module))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active == held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
if(2)
|
||||
if(module_active == held_items[module])
|
||||
inv2.icon_state = "inv2"
|
||||
if(3)
|
||||
if(module_active == held_items[module])
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = null
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/toggle_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(module_selected(module))
|
||||
deselect_module(module)
|
||||
else
|
||||
if(module_active(module))
|
||||
select_module(module)
|
||||
else
|
||||
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
|
||||
return
|
||||
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start)
|
||||
deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 4
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_num != slot_start) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 4) // not >3 otherwise cycling with just one item on module 3 wouldn't work
|
||||
slot_num = 1 //Wrap around.
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/swap_hand()
|
||||
cycle_modules()
|
||||
//These procs handle putting stuff in your hand. It's probably best to use these rather than setting stuff manually
|
||||
//as they handle all relevant stuff like adding it to the player's screen and such
|
||||
|
||||
//Returns the thing in our active hand (whatever is in our active module-slot, in this case)
|
||||
/mob/living/silicon/robot/get_active_held_item()
|
||||
return module_active
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_module(obj/item/O)
|
||||
if(!O)
|
||||
return 0
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
if(istype(O, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
update_sight()
|
||||
else if(istype(O, /obj/item/storage/bag/tray/))
|
||||
var/obj/item/storage/bag/tray/T = O
|
||||
T.do_quick_empty()
|
||||
if(client)
|
||||
client.screen -= O
|
||||
observer_screen_update(O,FALSE)
|
||||
O.forceMove(module) //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
|
||||
if(O.flags_1 & DROPDEL_1)
|
||||
O.flags_1 &= ~DROPDEL_1 //we shouldn't HAVE things with DROPDEL_1 in our modules, but better safe than runtiming horribly
|
||||
|
||||
O.dropped(src)
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
if(held_items[1] == O)
|
||||
inv1.icon_state = "inv1"
|
||||
held_items[1] = null
|
||||
else if(held_items[2] == O)
|
||||
inv2.icon_state = "inv2"
|
||||
held_items[2] = null
|
||||
else if(held_items[3] == O)
|
||||
inv3.icon_state = "inv3"
|
||||
held_items[3] = null
|
||||
hud_used.update_robot_modules_display()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(obj/item/O)
|
||||
. = FALSE
|
||||
if(!(O in module.modules))
|
||||
return
|
||||
if(activated(O))
|
||||
to_chat(src, "<span class='warning'>That module is already activated.</span>")
|
||||
return
|
||||
if(!held_items[1])
|
||||
held_items[1] = O
|
||||
O.screen_loc = inv1.screen_loc
|
||||
. = TRUE
|
||||
else if(!held_items[2])
|
||||
held_items[2] = O
|
||||
O.screen_loc = inv2.screen_loc
|
||||
. = TRUE
|
||||
else if(!held_items[3])
|
||||
held_items[3] = O
|
||||
O.screen_loc = inv3.screen_loc
|
||||
. = TRUE
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You need to disable a module first!</span>")
|
||||
if(.)
|
||||
O.equipped(src, slot_hands)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
observer_screen_update(O,TRUE)
|
||||
O.forceMove(src)
|
||||
if(istype(O, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode |= S.sight_mode
|
||||
update_sight()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/observer_screen_update(obj/item/I,add = TRUE)
|
||||
if(observers && observers.len)
|
||||
for(var/M in observers)
|
||||
var/mob/dead/observe = M
|
||||
if(observe.client && observe.client.eye == src)
|
||||
if(add)
|
||||
observe.client.screen += I
|
||||
else
|
||||
observe.client.screen -= I
|
||||
else
|
||||
observers -= observe
|
||||
if(!observers.len)
|
||||
observers = null
|
||||
break
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
for(var/obj/item/I in held_items)
|
||||
uneq_module(I)
|
||||
|
||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||
if(O in held_items)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Helper procs for cyborg modules on the UI.
|
||||
//These are hackish but they help clean up code elsewhere.
|
||||
|
||||
//module_selected(module) - Checks whether the module slot specified by "module" is currently selected.
|
||||
/mob/living/silicon/robot/proc/module_selected(module) //Module is 1-3
|
||||
return module == get_selected_module()
|
||||
|
||||
//module_active(module) - Checks whether there is a module active in the slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/module_active(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return FALSE
|
||||
|
||||
if(LAZYLEN(held_items) >= module)
|
||||
if(held_items[module])
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected.
|
||||
/mob/living/silicon/robot/proc/get_selected_module()
|
||||
if(module_active)
|
||||
return held_items.Find(module_active)
|
||||
|
||||
return 0
|
||||
|
||||
//select_module(module) - Selects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/select_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(!module_active(module))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1 +a"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3"
|
||||
if(2)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2 +a"
|
||||
inv3.icon_state = "inv3"
|
||||
if(3)
|
||||
if(module_active != held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3 +a"
|
||||
module_active = held_items[module]
|
||||
|
||||
//deselect_module(module) - Deselects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/deselect_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(!module_active(module))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active == held_items[module])
|
||||
inv1.icon_state = "inv1"
|
||||
if(2)
|
||||
if(module_active == held_items[module])
|
||||
inv2.icon_state = "inv2"
|
||||
if(3)
|
||||
if(module_active == held_items[module])
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = null
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/toggle_module(module) //Module is 1-3
|
||||
if(module < 1 || module > 3)
|
||||
return
|
||||
|
||||
if(module_selected(module))
|
||||
deselect_module(module)
|
||||
else
|
||||
if(module_active(module))
|
||||
select_module(module)
|
||||
else
|
||||
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
|
||||
return
|
||||
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start)
|
||||
deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 4
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_num != slot_start) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 4) // not >3 otherwise cycling with just one item on module 3 wouldn't work
|
||||
slot_num = 1 //Wrap around.
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/swap_hand()
|
||||
cycle_modules()
|
||||
|
||||
@@ -70,8 +70,6 @@
|
||||
var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack
|
||||
|
||||
var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower.
|
||||
//var/parrot_been_shot = 0 this wasn't working right, and parrots don't survive bullets.((Parrots get a speed bonus after being shot. This will deincrement every Life() and at 0 the parrot will return to regular speed.))
|
||||
|
||||
var/parrot_lastmove = null //Updates/Stores position of the parrot while it's moving
|
||||
var/parrot_stuck = 0 //If parrot_lastmove hasnt changed, this will increment until it reaches parrot_stuck_threshold
|
||||
var/parrot_stuck_threshold = 10 //if this == parrot_stuck, it'll force the parrot back to wandering
|
||||
@@ -547,8 +545,6 @@
|
||||
parrot_state = PARROT_WANDER
|
||||
|
||||
walk_away(src, parrot_interest, 1, parrot_speed)
|
||||
/*if(parrot_been_shot > 0)
|
||||
parrot_been_shot-- didn't work anyways, and besides, any bullet poly survives isn't worth the speed boost.*/
|
||||
if(isStuck())
|
||||
return
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
if(!environment)
|
||||
return
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
var/loc_temp = get_temperature(environment)
|
||||
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
@@ -420,18 +420,6 @@
|
||||
I.attack_self(src)
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/*
|
||||
/mob/verb/dump_source()
|
||||
|
||||
var/master = "<PRE>"
|
||||
for(var/t in typesof(/area))
|
||||
master += text("[]\n", t)
|
||||
//Foreach goto(26)
|
||||
src << browse(master)
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/verb/memory()
|
||||
set name = "Notes"
|
||||
set category = "IC"
|
||||
|
||||
@@ -110,9 +110,6 @@
|
||||
|
||||
var/list/mob_spell_list = list() //construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap.
|
||||
|
||||
//Changlings, but can be used in other modes
|
||||
// var/obj/effect/proc_holder/changpower/list/power_list = list()
|
||||
|
||||
//List of active diseases
|
||||
|
||||
var/list/viruses = list() // list of all diseases in a mob
|
||||
|
||||
@@ -139,6 +139,8 @@
|
||||
if(loc.vars[A] == src)
|
||||
loc.vars[A] = O
|
||||
|
||||
transfer_observers_to(O)
|
||||
|
||||
. = O
|
||||
|
||||
qdel(src)
|
||||
@@ -293,6 +295,8 @@
|
||||
if (tr_flags & TR_DEFAULTMSG)
|
||||
to_chat(O, "<B>You are now a human.</B>")
|
||||
|
||||
transfer_observers_to(O)
|
||||
|
||||
. = O
|
||||
|
||||
for(var/A in loc.vars)
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
var/turf/T = get_turf(ui_host())
|
||||
if(!T)
|
||||
return
|
||||
//var/valid_z_levels = (GetConnectedZlevels(T.z) & using_map.station_levels)
|
||||
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if(!((S.z in GLOB.station_z_levels) || S.z == ZLEVEL_MINING || S.z == T.z || !isturf(S.loc)))
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
/*
|
||||
|
||||
Removing Snowflake:
|
||||
- Search for NINJACODE (one word, all caps) to find Space Ninja Code outside of the /modules/ninja folder.
|
||||
|
||||
Ninja Folder:
|
||||
- This folder contains 90% of Ninja code and will eventually contain it all, once snowflake is cleaned out
|
||||
|
||||
*/
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
if(isnum(.)) //Numerical values of drained handle their feedback here, Alpha values handle it themselves (Research hacking)
|
||||
if(.)
|
||||
to_chat(H, "<span class='notice'>Gained <B>[DisplayPower(.)]</B> of energy from [A].</span>")
|
||||
to_chat(H, "<span class='notice'>Gained <B>[DisplayPower(.)]</B> of power from [A].</span>")
|
||||
else
|
||||
to_chat(H, "<span class='danger'>\The [A] has run dry of power, you must find another source!</span>")
|
||||
else
|
||||
|
||||
@@ -112,3 +112,11 @@
|
||||
. = ..()
|
||||
if (orbiting)
|
||||
stop_orbit()
|
||||
|
||||
/atom/movable/proc/transfer_observers_to(atom/movable/target)
|
||||
if(orbiters)
|
||||
for(var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
if(O.orbiter && isobserver(O.orbiter))
|
||||
var/mob/dead/observer/D = O.orbiter
|
||||
D.ManualFollow(target)
|
||||
@@ -101,7 +101,6 @@
|
||||
if(href_list["retrieve"])
|
||||
usr << browse("", "window=filingcabinet") // Close the menu
|
||||
|
||||
//var/retrieveindex = text2num(href_list["retrieve"])
|
||||
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
|
||||
if(istype(P) && P.loc == src && in_range(src, usr))
|
||||
usr.put_in_hands(P)
|
||||
|
||||
@@ -180,7 +180,6 @@
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/found_am_device=0
|
||||
for(var/obj/machinery/machine in get_step(loc, direction))
|
||||
//var/machine = locate(/obj/machinery, get_step(loc, direction))
|
||||
if(!machine)
|
||||
continue//Need all for a core
|
||||
if(istype(machine, /obj/machinery/am_shielding) || istype(machine, /obj/machinery/power/am_control_unit))
|
||||
|
||||
@@ -1052,15 +1052,6 @@
|
||||
force_update = 1
|
||||
return
|
||||
|
||||
/*
|
||||
if (equipment > 1) // off=0, off auto=1, on=2, on auto=3
|
||||
use_power(src.equip_consumption, EQUIP)
|
||||
if (lighting > 1) // off=0, off auto=1, on=2, on auto=3
|
||||
use_power(src.light_consumption, LIGHT)
|
||||
if (environ > 1) // off=0, off auto=1, on=2, on auto=3
|
||||
use_power(src.environ_consumption, ENVIRON)
|
||||
|
||||
area.calc_lighting() */
|
||||
lastused_light = area.usage(STATIC_LIGHT)
|
||||
lastused_light += area.usage(LIGHT)
|
||||
lastused_equip = area.usage(EQUIP)
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
/obj/item/stock_parts/cell/get_cell()
|
||||
return src
|
||||
|
||||
/obj/item/stock_parts/cell/Initialize()
|
||||
/obj/item/stock_parts/cell/New()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
charge = maxcharge
|
||||
if(ratingdesc)
|
||||
desc += " This one has a power rating of [maxcharge], and you should not swallow it."
|
||||
desc += " This one has a power rating of [DisplayPower(maxcharge)], and you should not swallow it."
|
||||
update_icon()
|
||||
|
||||
/obj/item/stock_parts/cell/Destroy()
|
||||
@@ -74,7 +74,7 @@
|
||||
return 0
|
||||
charge = (charge - amount)
|
||||
if(!istype(loc, /obj/machinery/power/apc))
|
||||
SSblackbox.record_feedback("tally", "cell_used", 1, type)
|
||||
SSblackbox.record_feedback("tally", "cell_used", 1, "[src.type]")
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
@@ -111,12 +111,6 @@
|
||||
|
||||
/obj/item/stock_parts/cell/proc/explode()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
/*
|
||||
* 1000-cell explosion(T, -1, 0, 1, 1)
|
||||
* 2500-cell explosion(T, -1, 0, 1, 1)
|
||||
* 10000-cell explosion(T, -1, 1, 3, 3)
|
||||
* 15000-cell explosion(T, -1, 2, 4, 4)
|
||||
* */
|
||||
if (charge==0)
|
||||
return
|
||||
var/devastation_range = -1 //round(charge/11000)
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
// dummy generator object for testing
|
||||
|
||||
/*/obj/machinery/power/generator/verb/set_amount(var/g as num)
|
||||
set src in view(1)
|
||||
|
||||
gen_amount = g
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/power/generator
|
||||
name = "thermoelectric generator"
|
||||
desc = "It's a high efficiency thermoelectric generator."
|
||||
|
||||
@@ -188,7 +188,6 @@
|
||||
// if unmarked==1, only return those with no powernet
|
||||
/proc/power_list(turf/T, source, d, unmarked=0, cable_only = 0)
|
||||
. = list()
|
||||
//var/fdir = (!d)? 0 : turn(d, 180) // the opposite direction to d (or 0 if d==0)
|
||||
|
||||
for(var/AM in T)
|
||||
if(AM == source)
|
||||
|
||||
@@ -152,11 +152,6 @@
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/emp_act(severity)//Emitters are hardened but still might have issues
|
||||
// add_load(1000)
|
||||
/* if((severity == 1)&&prob(1)&&prob(1))
|
||||
if(src.active)
|
||||
src.active = 0
|
||||
src.use_power = IDLE_POWER_USE */
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if (anchored)
|
||||
to_chat(usr, "It is fastened to the floor!")
|
||||
return 0
|
||||
setDir(turn(dir, 90))
|
||||
setDir(turn(dir, -90))
|
||||
return 1
|
||||
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -139,7 +139,6 @@
|
||||
// It's a simplified version taking only 1/10 of the moles from the turf nearby. It should be later changed into a better version
|
||||
|
||||
var/transfer_moles = environment.total_moles()/10
|
||||
//var/transfer_moles = rpm/10000*capacity
|
||||
var/datum/gas_mixture/removed = inturf.remove_air(transfer_moles)
|
||||
gas_contained.merge(removed)
|
||||
|
||||
|
||||
@@ -336,7 +336,6 @@
|
||||
step_towards(src, locate(new_x, new_y, z))
|
||||
pixel_x = old_pixel_x
|
||||
pixel_y = old_pixel_y
|
||||
//var/animation_time = ((SSprojectiles.flags & SS_TICKER? (SSprojectiles.wait * world.tick_lag) : SSprojectiles.wait) / moves)
|
||||
animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = 1, flags = ANIMATION_END_NOW)
|
||||
old_pixel_x = pixel_x_offset
|
||||
old_pixel_y = pixel_y_offset
|
||||
|
||||
@@ -284,6 +284,8 @@
|
||||
if(poly_msg)
|
||||
to_chat(new_mob, poly_msg)
|
||||
|
||||
M.transfer_observers_to(new_mob)
|
||||
|
||||
qdel(M)
|
||||
return new_mob
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = 0
|
||||
var/spillable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
@@ -88,6 +88,9 @@
|
||||
. = ..()
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
return (target.CanPass(src, get_turf(src)) && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
|
||||
/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
return
|
||||
@@ -107,7 +110,7 @@
|
||||
add_logs(thrownby, M, "splashed", R)
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
else if((target.CanPass(src, get_turf(src))) && thrown && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
else if(bartender_check(target) && thrown)
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
container_type = OPENCONTAINER_1
|
||||
spillable = 1
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
|
||||
|
||||
@@ -179,12 +179,6 @@
|
||||
if(C)
|
||||
C.set_operable(stepdir, id, op)
|
||||
|
||||
/*
|
||||
/obj/machinery/conveyor/verb/destroy()
|
||||
set src in view()
|
||||
src.broken()
|
||||
*/
|
||||
|
||||
/obj/machinery/conveyor/power_change()
|
||||
..()
|
||||
update()
|
||||
|
||||
@@ -213,6 +213,8 @@
|
||||
|
||||
// called when holder is expelled from a disposal
|
||||
/obj/machinery/disposal/proc/expel(obj/structure/disposalholder/H)
|
||||
H.active = FALSE
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/target
|
||||
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
|
||||
|
||||
@@ -26,11 +26,6 @@
|
||||
setDir(make_from.dir)
|
||||
anchored = TRUE
|
||||
|
||||
if(istype(make_from, /obj/structure/disposalpipe))
|
||||
var/obj/structure/disposalpipe/D = make_from
|
||||
if(D.construct_type)
|
||||
pipe_type = D.construct_type
|
||||
|
||||
else
|
||||
if(_pipe_type)
|
||||
pipe_type = _pipe_type
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/obj/structure/disposalpipe/trunk/trunk // the attached pipe trunk
|
||||
var/obj/structure/disposalconstruct/stored
|
||||
var/start_eject = 0
|
||||
var/eject_range = 3
|
||||
var/eject_range = 2
|
||||
|
||||
/obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from)
|
||||
. = ..()
|
||||
@@ -42,6 +42,7 @@
|
||||
// expel the contents of the holder object, then delete it
|
||||
// called when the holder exits the outlet
|
||||
/obj/structure/disposaloutlet/proc/expel(obj/structure/disposalholder/H)
|
||||
H.active = FALSE
|
||||
flick("outlet-open", src)
|
||||
if((start_eject + 30) < world.time)
|
||||
start_eject = world.time
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
|
||||
var/dpdir = NONE // bitmask of pipe directions
|
||||
var/initialize_dirs = NONE // bitflags of pipe directions added on init, see \code\_DEFINES\pipe_construction.dm
|
||||
var/construct_type // If set, used as type for pipe constructs. If not set, src.type is used.
|
||||
var/flip_type // If set, the pipe is flippable and becomes this type when flipped
|
||||
var/obj/structure/disposalconstruct/stored
|
||||
|
||||
@@ -29,14 +28,6 @@
|
||||
else
|
||||
stored = new /obj/structure/disposalconstruct(src, make_from=src)
|
||||
|
||||
// Hack for old map pipes to work, remove after all maps are updated
|
||||
if(flip_type)
|
||||
var/obj/structure/disposalpipe/flip = flip_type
|
||||
if(icon_state == initial(flip.icon_state))
|
||||
initialize_dirs = initial(flip.initialize_dirs)
|
||||
construct_type = flip_type
|
||||
|
||||
|
||||
if(dir in GLOB.diagonals) // Bent pipes already have all the dirs set
|
||||
initialize_dirs = NONE
|
||||
|
||||
@@ -199,28 +190,10 @@
|
||||
deconstruct()
|
||||
|
||||
|
||||
// Straight pipe segment
|
||||
/obj/structure/disposalpipe/segment
|
||||
icon_state = "pipe"
|
||||
initialize_dirs = DISP_DIR_FLIP
|
||||
|
||||
/obj/structure/disposalpipe/segment/Initialize()
|
||||
// Hacks for old map pipes to work, remove after all maps are updated
|
||||
if(icon_state == "pipe-c")
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
dir = NORTHEAST
|
||||
if(SOUTH)
|
||||
dir = SOUTHWEST
|
||||
if(EAST)
|
||||
dir = SOUTHEAST
|
||||
if(WEST)
|
||||
dir = NORTHWEST
|
||||
|
||||
if(icon_state != "pipe")
|
||||
icon_state = "pipe"
|
||||
. = ..()
|
||||
|
||||
|
||||
// A three-way junction with dir being the dominant direction
|
||||
/obj/structure/disposalpipe/junction
|
||||
@@ -228,14 +201,6 @@
|
||||
initialize_dirs = DISP_DIR_RIGHT | DISP_DIR_FLIP
|
||||
flip_type = /obj/structure/disposalpipe/junction/flip
|
||||
|
||||
/obj/structure/disposalpipe/junction/Initialize()
|
||||
if(icon_state == "pipe-y") // Hack for old map pipes to work, remove after all maps are updated
|
||||
initialize_dirs = DISP_DIR_LEFT | DISP_DIR_RIGHT
|
||||
flip_type = null
|
||||
construct_type = /obj/structure/disposalpipe/junction/yjunction
|
||||
. = ..()
|
||||
|
||||
|
||||
// next direction to move
|
||||
// if coming in from secondary dirs, then next is primary dir
|
||||
// if coming in from primary dir, then next is equal chance of other dirs
|
||||
@@ -323,8 +288,8 @@
|
||||
else
|
||||
var/obj/machinery/disposal/D = linked
|
||||
D.expel(H) // expel at disposal
|
||||
else
|
||||
expel(H, get_turf(src), 0) // expel at turf
|
||||
|
||||
// Returning null without expelling holder makes the holder expell itself
|
||||
return null
|
||||
|
||||
/obj/structure/disposalpipe/trunk/nextdir(obj/structure/disposalholder/H)
|
||||
|
||||
@@ -92,11 +92,3 @@
|
||||
icon_state = "pipe-j2s"
|
||||
flip_type = /obj/structure/disposalpipe/sorting/wrap
|
||||
initialize_dirs = DISP_DIR_LEFT | DISP_DIR_FLIP
|
||||
|
||||
|
||||
// Hacks for old map pipes to work, remove after all maps are updated
|
||||
/obj/structure/disposalpipe/wrapsortjunction
|
||||
parent_type = /obj/structure/disposalpipe/sorting/wrap
|
||||
|
||||
/obj/structure/disposalpipe/sortjunction
|
||||
parent_type = /obj/structure/disposalpipe/sorting/mail
|
||||
|
||||
@@ -191,16 +191,6 @@
|
||||
construction_time = 130
|
||||
category = list("Odysseus")
|
||||
|
||||
/*/datum/design/odysseus_armor
|
||||
name = "Exosuit Armor (\"Odysseus\")"
|
||||
id = "odysseus_armor"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_armor
|
||||
materials = list(MAT_METAL=15000)
|
||||
construction_time = 200
|
||||
category = list("Odysseus")
|
||||
*/
|
||||
|
||||
//Gygax
|
||||
/datum/design/gygax_chassis
|
||||
name = "Exosuit Chassis (\"Gygax\")"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/design/basic_cell
|
||||
name = "Basic Power Cell"
|
||||
desc = "A basic power cell that holds 1000 units of energy."
|
||||
desc = "A basic power cell that holds 1 kW of power."
|
||||
id = "basic_cell"
|
||||
req_tech = list("powerstorage" = 1)
|
||||
build_type = PROTOLATHE | AUTOLATHE |MECHFAB
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/datum/design/high_cell
|
||||
name = "High-Capacity Power Cell"
|
||||
desc = "A power cell that holds 10000 units of energy."
|
||||
desc = "A power cell that holds 10 kW of power."
|
||||
id = "high_cell"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
build_type = PROTOLATHE | AUTOLATHE | MECHFAB
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/datum/design/super_cell
|
||||
name = "Super-Capacity Power Cell"
|
||||
desc = "A power cell that holds 20000 units of energy."
|
||||
desc = "A power cell that holds 20 kW of power."
|
||||
id = "super_cell"
|
||||
req_tech = list("powerstorage" = 3, "materials" = 3)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/datum/design/hyper_cell
|
||||
name = "Hyper-Capacity Power Cell"
|
||||
desc = "A power cell that holds 30000 units of energy."
|
||||
desc = "A power cell that holds 30 kW of power."
|
||||
id = "hyper_cell"
|
||||
req_tech = list("powerstorage" = 5, "materials" = 5, "engineering" = 5)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/datum/design/bluespace_cell
|
||||
name = "Bluespace Power Cell"
|
||||
desc = "A power cell that holds 40000 units of energy."
|
||||
desc = "A power cell that holds 40 kW of power."
|
||||
id = "bluespace_cell"
|
||||
req_tech = list("powerstorage" = 6, "materials" = 5, "engineering" = 5, "bluespace" = 5)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
|
||||
@@ -43,20 +43,6 @@
|
||||
temp_list[O] = text2num(temp_list[O])
|
||||
return temp_list
|
||||
|
||||
/* //uncomment to enable forced reactions.
|
||||
/obj/machinery/r_n_d/experimentor/verb/forceReaction()
|
||||
set name = "Force Experimentor Reaction"
|
||||
set category = "Debug"
|
||||
set src in oview(1)
|
||||
var/reaction = input(usr,"What reaction?") in list(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE)
|
||||
var/oldReaction = item_reactions["[loaded_item.type]"]
|
||||
item_reactions["[loaded_item.type]"] = reaction
|
||||
experiment(item_reactions["[loaded_item.type]"],loaded_item)
|
||||
spawn(10)
|
||||
if(loaded_item)
|
||||
item_reactions["[loaded_item.type]"] = oldReaction
|
||||
*/
|
||||
|
||||
/obj/machinery/r_n_d/experimentor/proc/SetTypeReactions()
|
||||
var/probWeight = 0
|
||||
for(var/I in typesof(/obj/item))
|
||||
|
||||
@@ -98,8 +98,6 @@ GLOBAL_LIST_INIT(message_servers, list())
|
||||
return newKey
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
//if(decryptkey == "password")
|
||||
// decryptkey = generateKey()
|
||||
if(active && (stat & (BROKEN|NOPOWER)))
|
||||
active = 0
|
||||
return
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/////////// ruined whiteship
|
||||
|
||||
/obj/item/circuitboard/computer/white_ship/ruin
|
||||
build_path = /obj/machinery/computer/shuttle/white_ship/ruin
|
||||
|
||||
/obj/machinery/computer/shuttle/white_ship/ruin
|
||||
shuttleId = "whiteship_ruin"
|
||||
circuit = /obj/item/circuitboard/computer/white_ship/ruin
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship/ruin
|
||||
shuttleId = "whiteship_ruin"
|
||||
|
||||
@@ -56,11 +56,6 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
else
|
||||
minor_announce(CONFIG_GET(string/alert_red_downto), "Attention! Code red!")
|
||||
GLOB.security_level = SEC_LEVEL_RED
|
||||
|
||||
/* - At the time of commit, setting status displays didn't work properly
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")*/
|
||||
sound_to_playing_players('sound/misc/voyalert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
@@ -117,15 +112,3 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
return SEC_LEVEL_RED
|
||||
if("delta")
|
||||
return SEC_LEVEL_DELTA
|
||||
|
||||
|
||||
/*DEBUG
|
||||
/mob/verb/set_thing0()
|
||||
set_security_level(0)
|
||||
/mob/verb/set_thing1()
|
||||
set_security_level(1)
|
||||
/mob/verb/set_thing2()
|
||||
set_security_level(2)
|
||||
/mob/verb/set_thing3()
|
||||
set_security_level(3)
|
||||
*/
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
/obj/docking_port/stationary/transit/Destroy(force=FALSE)
|
||||
if(force)
|
||||
if(get_docked())
|
||||
to_chat("A transit dock was destroyed while something was docked to it.")
|
||||
log_world("A transit dock was destroyed while something was docked to it.")
|
||||
SSshuttle.transit -= src
|
||||
if(owner)
|
||||
owner = null
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
name = "Bardrone"
|
||||
desc = "A barkeeping drone, an indestructible robot built to tend bars."
|
||||
seeStatic = FALSE
|
||||
hacked = TRUE
|
||||
laws = "1. Serve drinks.\n\
|
||||
2. Talk to patrons.\n\
|
||||
3. Don't get messed up in their affairs."
|
||||
@@ -227,10 +228,10 @@
|
||||
/obj/effect/forcefield/luxury_shuttle/CollidedWith(atom/movable/AM)
|
||||
if(!isliving(AM))
|
||||
return ..()
|
||||
|
||||
|
||||
if(check_times[AM] && check_times[AM] > world.time) //Let's not spam the message
|
||||
return ..()
|
||||
|
||||
|
||||
check_times[AM] = world.time + LUXURY_MESSAGE_COOLDOWN
|
||||
|
||||
var/total_cash = 0
|
||||
|
||||
@@ -89,10 +89,7 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/get_leg_ignore()
|
||||
if(movement_type & FLYING)
|
||||
return TRUE
|
||||
var/obj/item/tank/jetpack/J = get_jetpack()
|
||||
if(J && J.on && !has_gravity())
|
||||
if((movement_type & FLYING) || floating)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
H.throw_at(throw_target, 4, 3)
|
||||
H.Knockdown(100)
|
||||
H.adjustStaminaLoss(40)
|
||||
if(!istype(H.head,/obj/item/clothing/head/helmet/) && !istype(H.head,/obj/item/clothing/head/hardhat))
|
||||
H.adjustBrainLoss(3)
|
||||
H.updatehealth()
|
||||
visible_message("<span class='danger'>[src] crashes into [A], sending [H] flying!</span>")
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1)
|
||||
|
||||
@@ -131,4 +134,4 @@
|
||||
var/mob/living/carbon/H = buckled_mobs[1]
|
||||
unbuckle_mob(H)
|
||||
S.buckle_mob(H)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user