diff --git a/baystation12.dme b/baystation12.dme index 4746152b2a4..35bb8437e56 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -489,6 +489,7 @@ #include "code\game\mecha\working\hoverpod.dm" #include "code\game\mecha\working\ripley.dm" #include "code\game\mecha\working\working.dm" +#include "code\game\objects\buckling.dm" #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" #include "code\game\objects\explosion_recursive.dm" @@ -965,6 +966,7 @@ #include "code\modules\hydroponics\seed_datums.dm" #include "code\modules\hydroponics\seed_machines.dm" #include "code\modules\hydroponics\seed_mobs.dm" +#include "code\modules\hydroponics\seed_storage.dm" #include "code\modules\hydroponics\seeds.dm" #include "code\modules\hydroponics\vines.dm" #include "code\modules\library\lib_items.dm" @@ -1121,6 +1123,7 @@ #include "code\modules\mob\living\silicon\ai\ai.dm" #include "code\modules\mob\living\silicon\ai\death.dm" #include "code\modules\mob\living\silicon\ai\examine.dm" +#include "code\modules\mob\living\silicon\ai\latejoin.dm" #include "code\modules\mob\living\silicon\ai\laws.dm" #include "code\modules\mob\living\silicon\ai\life.dm" #include "code\modules\mob\living\silicon\ai\login.dm" diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 7b74ed8b736..068f7efdb3e 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -99,6 +99,8 @@ "power" = use_power, "scrubbing" = scrubbing, "panic" = panic, + "filter_o2" = ("oxygen" in scrubbing_gas), + "filter_n2" = ("nitrogen" in scrubbing_gas), "filter_co2" = ("carbon_dioxide" in scrubbing_gas), "filter_phoron" = ("phoron" in scrubbing_gas), "filter_n2o" = ("sleeping_agent" in scrubbing_gas), @@ -192,6 +194,16 @@ var/list/toggle = list() + if(!isnull(signal.data["o2_scrub"]) && text2num(signal.data["o2_scrub"]) != ("oxygen" in scrubbing_gas)) + toggle += "oxygen" + else if(signal.data["toggle_o2_scrub"]) + toggle += "oxygen" + + if(!isnull(signal.data["n2_scrub"]) && text2num(signal.data["n2_scrub"]) != ("nitrogen" in scrubbing_gas)) + toggle += "nitrogen" + else if(signal.data["toggle_n2_scrub"]) + toggle += "nitrogen" + if(!isnull(signal.data["co2_scrub"]) && text2num(signal.data["co2_scrub"]) != ("carbon_dioxide" in scrubbing_gas)) toggle += "carbon_dioxide" else if(signal.data["toggle_co2_scrub"]) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index fd933bf94dc..662376e9b4d 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -203,15 +203,15 @@ datum/pipeline //surface must be the surface area in m^2 proc/radiate_heat_to_space(surface, thermal_conductivity) var/gas_density = air.total_moles/air.volume - thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1) + thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio // We only get heat from the star on the exposed surface area. // If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase. - var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity + var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity // Previously, the temperature would enter equilibrium at 26C or 294K. // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. - // It currently should stabilise at 85K or -183C. + // It currently should stabilise at 129.6K or -143.6C heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 air.add_thermal_energy(heat_gain) diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm index c22c483e8c4..f9dbef84cf0 100644 --- a/code/ATMOSPHERICS/he_pipes.dm +++ b/code/ATMOSPHERICS/he_pipes.dm @@ -3,18 +3,23 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging icon = 'icons/atmos/heat.dmi' icon_state = "intact" pipe_icon = "hepipe" + color = "#404040" level = 2 var/initialize_directions_he var/surface = 2 //surface area in m^2 + var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh minimum_temperature_difference = 20 thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT + buckle_lying = 1 + // BubbleWrap New() ..() initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe // BubbleWrap END + color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default. initialize() normalize_dir() @@ -48,19 +53,53 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging if(!parent) ..() else - var/environment_temperature = 0 + var/datum/gas_mixture/pipe_air = return_air() if(istype(loc, /turf/simulated/)) + var/environment_temperature = 0 if(loc:blocks_air) environment_temperature = loc:temperature else var/datum/gas_mixture/environment = loc.return_air() environment_temperature = environment.temperature - var/datum/gas_mixture/pipe_air = return_air() if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference) parent.temperature_interact(loc, volume, thermal_conductivity) else if(istype(loc, /turf/space/)) parent.radiate_heat_to_space(surface, 1) + if(buckled_mob) + var/hc = pipe_air.heat_capacity() + var/avg_temp = (pipe_air.temperature * hc + buckled_mob.bodytemperature * 3500) / (hc + 3500) + pipe_air.temperature = avg_temp + buckled_mob.bodytemperature = avg_temp + + var/heat_limit = 1000 + + var/mob/living/carbon/human/H = buckled_mob + if(istype(H) && H.species) + heat_limit = H.species.heat_level_3 + + if(pipe_air.temperature > heat_limit + 1) + buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest", used_weapon = "Excessive Heat") + + //fancy radiation glowing + if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K + if(abs(pipe_air.temperature - icon_temperature) > 10) + icon_temperature = pipe_air.temperature + + var/h_r = heat2color_r(icon_temperature) + var/h_g = heat2color_g(icon_temperature) + var/h_b = heat2color_b(icon_temperature) + + if(icon_temperature < 2000) //scale up overlay until 2000K + var/scale = (icon_temperature - 500) / 1500 + h_r = 64 + (h_r - 64)*scale + h_g = 64 + (h_g - 64)*scale + h_b = 64 + (h_b - 64)*scale + + animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING) + + + obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction icon = 'icons/atmos/junction.dmi' diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 16a0a6bcd59..be63292d831 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -12,6 +12,10 @@ var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called + can_buckle = 1 + buckle_require_restraints = 1 + buckle_lying = -1 + /obj/machinery/atmospherics/pipe/drain_power() return -1 diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index cfac858e252..87b63f71203 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -194,7 +194,7 @@ proc/tg_list2text(list/list, glue=",") . += copytext(text, last_found, found) last_found = found + delim_len while(found) - + /proc/text2numlist(text, delimiter="\n") var/list/num_list = list() for(var/x in text2list(text, delimiter)) @@ -339,3 +339,31 @@ proc/tg_list2text(list/list, glue=",") if("Orange") return 'icons/mob/screen1_Orange.dmi' if("Midnight") return 'icons/mob/screen1_Midnight.dmi' else return 'icons/mob/screen1_White.dmi' + +//adapted from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ +/proc/heat2color(temp) + return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp)) + +/proc/heat2color_r(temp) + temp /= 100 + if(temp <= 66) + . = 255 + else + . = max(0, min(255, 329.698727446 * (temp - 60) ** -0.1332047592)) + +/proc/heat2color_g(temp) + temp /= 100 + if(temp <= 66) + . = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661)) + else + . = max(0, min(255, 288.1221695283 * ((temp - 60) ** -0.0755148492))) + +/proc/heat2color_b(temp) + temp /= 100 + if(temp >= 66) + . = 255 + else + if(temp <= 16) + . = 0 + else + . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307)) diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index b2ced9fa0d5..f30d55455b7 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -47,7 +47,7 @@ return if(target && target.buckled) - target.buckled.unbuckle() + target.buckled.unbuckle_mob() var/list/tempL = L var/attempt = null diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index 1b1646ffa43..b5744dffc4b 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -20,7 +20,7 @@ if(target.buckled) var/obj/structure/stool/bed/buckled_to = target.buckled. - buckled_to.unbuckle() + buckled_to.unbuckle_mob() var/mobloc = get_turf(target.loc) var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc ) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 8dabec89d4b..e029b524a75 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -955,8 +955,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee name = "Sterile equipment crate" contains = list(/obj/item/clothing/under/rank/medical/green, /obj/item/clothing/under/rank/medical/green, + /obj/item/clothing/head/surgery/green, + /obj/item/clothing/head/surgery/green, /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves) + /obj/item/weapon/storage/box/gloves, + /obj/item/weapon/storage/belt/medical, + /obj/item/weapon/storage/belt/medical, + /obj/item/weapon/storage/belt/medical) cost = 15 containertype = "/obj/structure/closet/crate" containername = "Sterile equipment crate" diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index 270a4e38678..32118034127 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -9,7 +9,7 @@ selection_color = "#dddddd" access = list() //See /datum/job/assistant/get_access() minimal_access = list() //See /datum/job/assistant/get_access() - alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet") + alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet","Visitor") /datum/job/assistant/equip(var/mob/living/carbon/human/H) if(!H) return 0 diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 0c44f6f2608..c0d9bd44b37 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -110,3 +110,6 @@ if(H.r_store) H.r_store.add_fingerprint(H,1) return 1 + +/datum/job/proc/is_position_available() + return (current_positions < total_positions) || (total_positions == -1) diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index 07ceefb8b32..11d8f70a12b 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -3,7 +3,7 @@ flag = AI department_flag = ENGSEC faction = "Station" - total_positions = 0 + total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm spawn_positions = 1 selection_color = "#ccffcc" supervisors = "your laws" @@ -14,6 +14,8 @@ if(!H) return 0 return 1 +/datum/job/ai/is_position_available() + return (empty_playable_ai_cores.len != 0) /datum/job/cyborg diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index b3918713e79..87f8989b10c 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -463,7 +463,9 @@ var/global/datum/controller/occupations/job_master switch(rank) if("Cyborg") return H.Robotize() - if("AI","Clown") //don't need bag preference stuff! + if("AI") + return H + if("Clown") //don't need bag preference stuff! else switch(H.backbag) //BS12 EDIT if(1) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 13dd8c75e69..1dd46154617 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -696,6 +696,10 @@ siphoning if(data["scrubbing"]) sensor_data += {" Filtering: +Oxygen +[data["filter_o2"]?"on":"off"]; +Nitrogen +[data["filter_n2"]?"on":"off"]; Carbon Dioxide [data["filter_co2"]?"on":"off"]; Toxins @@ -817,6 +821,8 @@ table tr:first-child th:first-child { border: none;} "adjust_external_pressure", "set_external_pressure", "checks", + "o2_scrub", + "n2_scrub", "co2_scrub", "tox_scrub", "n2o_scrub", diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 69c884ec708..7bd8e4b8e89 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -168,9 +168,15 @@ if(istype(P, /obj/item/weapon/screwdriver)) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "\blue You connect the monitor." - var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain ) - if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created - A.rename_self("ai", 1) + if(!brain) + var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" + var/obj/structure/AIcore/deactivated/D = new(loc) + if(open_for_latejoin) + empty_playable_ai_cores += D + else + var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain ) + if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created + A.rename_self("ai", 1) feedback_inc("cyborg_ais_created",1) del(src) @@ -207,14 +213,53 @@ if (ai.mind == malfai) return 1 -/obj/structure/AIcore/deactivated/attackby(var/obj/item/device/aicard/card, var/mob/user) +/obj/structure/AIcore/deactivated/attackby(var/obj/item/weapon/W, var/mob/user) - if(istype(card)) + if(istype(W, /obj/item/device/aicard)) + var/obj/item/device/aicard/card = W var/mob/living/silicon/ai/transfer = locate() in card if(transfer) load_ai(transfer,card,user) else user << "\red ERROR: \black Unable to locate artificial intelligence." return + else if(istype(W, /obj/item/weapon/wrench)) + if(anchored) + user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...") + if(!do_after(user,40)) + user.visible_message("\blue \The [user] decides not to unbolt \the [src].") + return + user.visible_message("\blue \The [user] finishes unfastening \the [src]!") + anchored = 0 + return + else + user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...") + if(!do_after(user,40)) + user.visible_message("\blue \The [user] decides not to bolt \the [src].") + return + user.visible_message("\blue \The [user] finishes fastening down \the [src]!") + anchored = 1 + return + else + return ..() - ..() +/client/proc/empty_ai_core_toggle_latejoin() + set name = "Toggle AI Core Latejoin" + set category = "Admin" + + var/list/cores = list() + for(var/obj/structure/AIcore/deactivated/D in world) + cores["[D] ([D.loc.loc])"] = D + + var/id = input("Which core?", "Toggle AI Core Latejoin", null) as null|anything in cores + if(!id) return + + var/obj/structure/AIcore/deactivated/D = cores[id] + if(!D) return + + if(D in empty_playable_ai_cores) + empty_playable_ai_cores -= D + src << "\The [id] is now not available for latejoining AIs." + else + empty_playable_ai_cores += D + src << "\The [id] is now available for latejoining AIs." diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index ff88f89c5a2..b639334c01e 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -101,6 +101,20 @@ return text +/obj/machinery/computer/attack_ghost(user as mob) + return src.attack_hand(user) + +/obj/machinery/computer/attack_hand(user as mob) + /* Observers can view computers, but not actually use them via Topic*/ + if(istype(user, /mob/dead/observer)) return 0 + return ..() + +/obj/machinery/computer/Topic(href, href_list) + /* Can't use topic as observer by default */ + if(istype(usr, /mob/dead/observer)) return 0 + return ..() + + /obj/machinery/computer/attackby(I as obj, user as mob) if(istype(I, /obj/item/weapon/screwdriver) && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 5c970f9d678..2d73e17da86 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -50,7 +50,9 @@ else usr << "[src.current.name] selected for law changes." return - + + attack_ghost(user as mob) + return 1 /obj/machinery/computer/borgupload @@ -83,3 +85,6 @@ else usr << "[src.current.name] selected for law changes." return + + attack_ghost(user as mob) + return 1 diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 32543822b99..7d10bd9a6fa 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -288,6 +288,7 @@ M.client.eye = src M.stop_pulling() M.loc = src + M.ExtinguishMob() if(M.health > -100 && (M.health < 0 || M.sleeping)) M << "\blue You feel a cold liquid surround you. Your skin starts to freeze up." occupant = M diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 4d192c5dd9b..2b577a469a3 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -282,7 +282,7 @@ Class Procs: src.add_fingerprint(user) - return 0 + return ..() /obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames. return diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 024048b6deb..82418870729 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -48,6 +48,8 @@ Buildable meters #define PIPE_SCRUBBERS_DOWN 40 #define PIPE_SUPPLY_CAP 41 #define PIPE_SCRUBBERS_CAP 42 +///// Mirrored T-valve ~ because I couldn't be bothered re-sorting all of the defines +#define PIPE_MTVALVEM 43 /obj/item/pipe name = "pipe" @@ -129,6 +131,8 @@ Buildable meters src.pipe_type = PIPE_PASSIVE_GATE else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger)) src.pipe_type = PIPE_HEAT_EXCHANGE + else if(istype(make_from, /obj/machinery/atmospherics/tvalve/mirrored)) + src.pipe_type = PIPE_MTVALVEM else if(istype(make_from, /obj/machinery/atmospherics/tvalve)) src.pipe_type = PIPE_MTVALVE else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/supply)) @@ -243,6 +247,7 @@ Buildable meters "scrubbers pipe down", \ "supply pipe cap", \ "scrubbers pipe cap", \ + "t-valve m", \ ) name = nlist[pipe_type+1] + " fitting" var/list/islist = list( \ @@ -292,6 +297,7 @@ Buildable meters "cap", \ "cap", \ "cap", \ + "mtvalvem", \ ) icon_state = islist[pipe_type + 1] @@ -368,9 +374,9 @@ Buildable meters return dir|flip|cw|acw if(PIPE_MANIFOLD, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD) return flip|cw|acw - if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE) + if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_MTVALVE) return dir|flip|cw - if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M) + if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M, PIPE_MTVALVEM) return dir|flip|acw if(PIPE_GAS_MIXER_T) return dir|cw|acw @@ -924,6 +930,26 @@ Buildable meters V.node3.initialize() V.node3.build_network() + if(PIPE_MTVALVEM) //manual t-valve + var/obj/machinery/atmospherics/tvalve/mirrored/V = new(src.loc) + V.set_dir(dir) + V.initialize_directions = pipe_dir + if (pipename) + V.name = pipename + var/turf/T = V.loc + V.level = T.intact ? 2 : 1 + V.initialize() + V.build_network() + if (V.node1) + V.node1.initialize() + V.node1.build_network() + if (V.node2) + V.node2.initialize() + V.node2.build_network() + if (V.node3) + V.node3.initialize() + V.node3.build_network() + if(PIPE_CAP) var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc) C.set_dir(dir) @@ -1166,6 +1192,7 @@ Buildable meters #undef PIPE_VOLUME_PUMP #undef PIPE_OUTLET_INJECT #undef PIPE_MTVALVE +#undef PIPE_MTVALVEM #undef PIPE_GAS_FILTER_M #undef PIPE_GAS_MIXER_T #undef PIPE_GAS_MIXER_M diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 49f566af577..fb296d24091 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -20,6 +20,7 @@ Pipe Cap
4-Way Manifold
Manual T-Valve
+Manual T-Valve - Mirrored
Upward Pipe
Downward Pipe
Supply pipes:
@@ -48,10 +49,10 @@ Scrubber
Meter
Gas Filter
-Gas Filter-Mirrored
+Gas Filter - Mirrored
Gas Mixer
-Gas Mixer-Mirrored
-Gas Mixer-T
+Gas Mixer - Mirrored
+Gas Mixer - T
Omni Gas Mixer
Omni Gas Filter
Heat exchange:
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 259638458c4..f5db4a1ac01 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -9,6 +9,10 @@ var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.) //Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location. +/* Ghosts can't use this */ +/obj/machinery/computer/teleporter/attack_ghost(user as mob) + return 1 + /obj/machinery/computer/teleporter/New() src.id = "[rand(1000, 9999)]" ..() @@ -80,9 +84,11 @@ /obj/machinery/teleport/station/attack_ai() src.attack_hand() -/obj/machinery/computer/teleporter/attack_hand() - if(stat & (NOPOWER|BROKEN)) - return +/obj/machinery/computer/teleporter/attack_hand(user as mob) + if(..()) return + + /* Ghosts can't use this one because it's a direct selection */ + if(istype(user, /mob/dead/observer)) return var/list/L = list() var/list/areaindex = list() diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm new file mode 100644 index 00000000000..f0f5a53aeaf --- /dev/null +++ b/code/game/objects/buckling.dm @@ -0,0 +1,86 @@ +/obj + var/can_buckle = 0 + var/buckle_movable = 0 + var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1 + var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes + var/mob/living/buckled_mob = null + +/obj/attack_hand(mob/living/user) + . = ..() + if(can_buckle && buckled_mob) + user_unbuckle_mob(user) + +/obj/MouseDrop_T(mob/living/M, mob/living/user) + . = ..() + if(can_buckle && istype(M)) + user_buckle_mob(M, user) + +/obj/Del() + unbuckle_mob() + return ..() + +/obj/proc/buckle_mob(mob/living/M) + if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained())) + return 0 + + M.buckled = src + M.set_dir(dir) + M.update_canmove() + buckled_mob = M + post_buckle_mob(M) + return 1 + +/obj/proc/unbuckle_mob() + if(buckled_mob && buckled_mob.buckled == src) + . = buckled_mob + buckled_mob.buckled = null + buckled_mob.anchored = initial(buckled_mob.anchored) + buckled_mob.update_canmove() + buckled_mob = null + + post_buckle_mob(.) + +/obj/proc/post_buckle_mob(mob/living/M) + return + +/obj/proc/user_buckle_mob(mob/living/M, mob/user) + if(!ticker) + user << "You can't buckle anyone in before the game starts." + if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai)) + return + + if(istype(M, /mob/living/carbon/slime)) + user << "The [M] is too squishy to buckle in." + return + + add_fingerprint(user) + unbuckle_mob() + + if(buckle_mob(M)) + if(M == user) + M.visible_message(\ + "[M.name] buckles themselves to [src].",\ + "You buckle yourself to [src].",\ + "You hear metal clanking.") + else + M.visible_message(\ + "[M.name] is buckled to [src] by [user.name]!",\ + "You are buckled to [src] by [user.name]!",\ + "You hear metal clanking.") + +/obj/proc/user_unbuckle_mob(mob/user) + var/mob/living/M = unbuckle_mob() + world << 3 + if(M) + if(M != user) + M.visible_message(\ + "[M.name] was unbuckled by [user.name]!",\ + "You were unbuckled from [src] by [user.name].",\ + "You hear metal clanking.") + else + M.visible_message(\ + "[M.name] unbuckled themselves!",\ + "You unbuckle yourself from [src].",\ + "You hear metal clanking.") + add_fingerprint(user) + return M diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index b68e1e61cda..8e1a382a869 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -91,7 +91,8 @@ /obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob) if(M == user) user << "You take a bite of the crayon and swallow it." -// user.nutrition += 5 + user.nutrition += 1 + user.reagents.add_reagent("crayon_dust",min(5,uses)/3) if(uses) uses -= 5 if(uses <= 0) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index bd192ec26cf..6c440dcb3d4 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -29,7 +29,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ null, \ new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ new/datum/stack_recipe("rack parts", /obj/item/weapon/table_parts/rack), \ - new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \ + new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \ new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ null, \ new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ @@ -137,7 +137,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \ new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("baseball bat", /obj/item/weapon/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \ + new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \ // new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0) ) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index fb51d83c14d..337c1117997 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -31,6 +31,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM attack_verb = list("burnt", "singed") /obj/item/weapon/flame/match/process() + if(isliving(loc)) + var/mob/living/M = loc + M.IgniteMob() var/turf/location = get_turf(src) smoketime-- if(smoketime < 1) @@ -162,6 +165,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/process() + if(isliving(loc)) + var/mob/living/M = loc + M.IgniteMob() var/turf/location = get_turf(src) smoketime-- if(smoketime < 1) @@ -444,6 +450,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/weapon/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!istype(M, /mob)) return + M.IgniteMob() if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit) var/obj/item/clothing/mask/cigarette/cig = M.wear_mask diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 7264b11fe1c..800f47773c0 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -13,7 +13,7 @@ force = 10.0 matter = list("metal" = 90) attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") - + var/spray_particles = 6 var/spray_amount = 2 //units of liquid per particle var/max_water = 120 @@ -123,7 +123,7 @@ R.my_atom = W if(!W || !src) return src.reagents.trans_to(W, spray_amount) - + for(var/b=0, b<5, b++) step_towards(W,my_target) if(!W || !W.reagents) return @@ -134,6 +134,9 @@ if(!W.reagents) break W.reagents.reaction(atm) + if(isliving(atm)) //For extinguishing mobs on fire + var/mob/living/M = atm + M.ExtinguishMob() if(W.loc == my_target) break sleep(2) W.delete() diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm index d7be3686657..d32ae9d8baa 100644 --- a/code/game/objects/items/weapons/implants/implantfreedom.dm +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -23,6 +23,8 @@ if (source.handcuffed) var/obj/item/weapon/W = source.handcuffed source.handcuffed = null + if(source.buckled && source.buckled.buckle_require_restraints) + source.buckled.unbuckle_mob() source.update_inv_handcuffed() if (source.client) source.client.screen -= W diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index fc122c185c7..0606569c4fa 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -12,7 +12,7 @@ var/global/list/cached_icons = list() w_class = 3.0 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,30,50,70) - volume = 70 + volume = 60 flags = OPENCONTAINER var/paint_type = "" @@ -33,7 +33,13 @@ var/global/list/cached_icons = list() else if(paint_type && lentext(paint_type) > 0) name = paint_type + " " + name ..() - reagents.add_reagent("paint_[paint_type]", volume) + reagents.add_reagent("water", volume*3/5) + reagents.add_reagent("plasticide", volume/5) + if(paint_type == "white") //why don't white crayons exist + reagents.add_reagent("aluminum", volume/5) + else + reagents.add_reagent("crayon_dust_[paint_type]", volume/5) + reagents.handle_reactions() on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can var/mixedcolor = mix_color_from_reagents(reagents.reagent_list) @@ -44,6 +50,10 @@ var/global/list/cached_icons = list() icon_state = "paint_red" paint_type = "red" + yellow + icon_state = "paint_yellow" + paint_type = "yellow" + green icon_state = "paint_green" paint_type = "green" @@ -52,17 +62,13 @@ var/global/list/cached_icons = list() icon_state = "paint_blue" paint_type = "blue" - yellow - icon_state = "paint_yellow" - paint_type = "yellow" - violet icon_state = "paint_violet" - paint_type = "violet" + paint_type = "purple" black icon_state = "paint_black" - paint_type = "black" + paint_type = "gray" white icon_state = "paint_white" @@ -81,71 +87,6 @@ var/global/list/cached_icons = list() item_state = "paintcan" w_class = 3.0 -/obj/item/weapon/paint/red - name = "red paint" - color = "FF0000" - icon_state = "paint_red" - -/obj/item/weapon/paint/green - name = "green paint" - color = "00FF00" - icon_state = "paint_green" - -/obj/item/weapon/paint/blue - name = "blue paint" - color = "0000FF" - icon_state = "paint_blue" - -/obj/item/weapon/paint/yellow - name = "yellow paint" - color = "FFFF00" - icon_state = "paint_yellow" - -/obj/item/weapon/paint/violet - name = "violet paint" - color = "FF00FF" - icon_state = "paint_violet" - -/obj/item/weapon/paint/black - name = "black paint" - color = "333333" - icon_state = "paint_black" - -/obj/item/weapon/paint/white - name = "white paint" - color = "FFFFFF" - icon_state = "paint_white" - - -/obj/item/weapon/paint/anycolor - gender= PLURAL - name = "any color" - icon_state = "paint_neutral" - - attack_self(mob/user as mob) - var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white") - if ((user.get_active_hand() != src || user.stat || user.restrained())) - return - switch(t1) - if("red") - color = "FF0000" - if("blue") - color = "0000FF" - if("green") - color = "00FF00" - if("yellow") - color = "FFFF00" - if("violet") - color = "FF00FF" - if("white") - color = "FFFFFF" - if("black") - color = "333333" - icon_state = "paint_[t1]" - add_fingerprint(user) - return - - /obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity) if(!proximity) return if(!istype(target) || istype(target, /turf/space)) @@ -171,7 +112,7 @@ var/global/list/cached_icons = list() target.icon = initial(target.icon) return */ - +/* datum/reagent/paint name = "Paint" id = "paint_" @@ -179,15 +120,7 @@ datum/reagent/paint color = "#808080" description = "This paint will only adhere to floor tiles." - reaction_turf(var/turf/T, var/volume) - if(!istype(T) || istype(T, /turf/space)) - return - T.color = color - reaction_obj(var/obj/O, var/volume) - ..() - if(istype(O,/obj/item/weapon/light)) - O.color = color red name = "Red Paint" @@ -235,3 +168,4 @@ datum/reagent/paint_remover if(istype(T) && T.icon != initial(T.icon)) T.icon = initial(T.icon) return +*/ diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 1ece5817f94..92ba323a6a3 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -69,7 +69,7 @@ return if(user && user.buckled) - user.buckled.unbuckle() + user.buckled.unbuckle_mob() var/list/tempL = L var/attempt = null diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 14f9ad482a5..ee56415be77 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -119,6 +119,8 @@ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") C.handcuffed = null + if(C.buckled && C.buckled.buckle_require_restraints) + C.buckled.unbuckle_mob() C.update_inv_handcuffed() return else @@ -259,6 +261,9 @@ if (src.welding) remove_fuel(1) var/turf/location = get_turf(user) + if(isliving(O)) + var/mob/living/L = O + L.IgniteMob() if (istype(location, /turf)) location.hotspot_expose(700, 50, 1) return @@ -531,4 +536,4 @@ if(!resolved && tool && target) tool.afterattack(target,user,1) if(tool) - tool.loc = src*/ + tool.loc = src*/ diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 24423205240..2ccd78d3616 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -21,6 +21,7 @@ var/force_wielded = 0 var/wieldsound = null var/unwieldsound = null + var/base_icon /obj/item/weapon/twohanded/proc/unwield() wielded = 0 @@ -34,6 +35,10 @@ name = "[initial(name)] (Wielded)" update_icon() +/obj/item/weapon/twohanded/New() + ..() + update_icon() + /obj/item/weapon/twohanded/mob_can_equip(M as mob, slot) //Cannot equip wielded items. if(wielded) @@ -51,7 +56,8 @@ return unwield() /obj/item/weapon/twohanded/update_icon() - return + icon_state = "[base_icon][wielded]" + item_state = icon_state /obj/item/weapon/twohanded/pickup(mob/user) unwield() @@ -106,11 +112,15 @@ wield() del(src) +/obj/item/weapon/twohanded/offhand/update_icon() + return + /* * Fireaxe */ /obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri icon_state = "fireaxe0" + base_icon = "fireaxe" name = "fire axe" desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" force = 10 @@ -121,10 +131,6 @@ force_wielded = 40 attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") -/obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. - icon_state = "fireaxe[wielded]" - return - /obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) if(!proximity) return ..() @@ -146,6 +152,7 @@ */ /obj/item/weapon/twohanded/dualsaber icon_state = "dualsaber0" + base_icon = "dualsaber" name = "double-bladed energy sword" desc = "Handle with care." force = 3 @@ -162,10 +169,6 @@ sharp = 1 edge = 1 -/obj/item/weapon/twohanded/dualsaber/update_icon() - icon_state = "dualsaber[wielded]" - return - /obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob) ..() if((CLUMSY in user.mutations) && (wielded) &&prob(40)) @@ -187,6 +190,7 @@ //spears, bay edition /obj/item/weapon/twohanded/spear icon_state = "spearglass0" + base_icon = "spearglass" name = "spear" desc = "A haphazardly-constructed yet still deadly weapon of ancient design." force = 14 @@ -201,6 +205,29 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") -/obj/item/weapon/twohanded/spear/update_icon() - icon_state = "spearglass[wielded]" - return +/obj/item/weapon/twohanded/baseballbat + name = "wooden bat" + desc = "HOME RUN!" + icon_state = "woodbat0" + base_icon = "woodbat" + item_state = "woodbat" + sharp = 0 + edge = 0 + w_class = 3 + force = 15 + throw_speed = 3 + throw_range = 7 + throwforce = 7 + attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked") + hitsound = 'sound/weapons/genhit3.ogg' + force_wielded = 23 + +/obj/item/weapon/twohanded/baseballbat/metal + name = "metal bat" + desc = "A shiny metal bat." + icon_state = "metalbat0" + base_icon = "metalbat" + item_state = "metalbat" + force = 18 + w_class = 3.0 + force_wielded = 27 \ No newline at end of file diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index b18198cbc04..02f6642037a 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -153,30 +153,6 @@ w_class = 3 attack_verb = list("jabbed","stabbed","ripped") -/obj/item/weapon/baseballbat - name = "wooden bat" - desc = "HOME RUN!" - icon_state = "woodbat" - item_state = "woodbat" - sharp = 0 - edge = 0 - w_class = 3 - force = 15 - throw_speed = 3 - throw_range = 7 - throwforce = 7 - attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked") - hitsound = 'sound/weapons/genhit3.ogg' - - -/obj/item/weapon/baseballbat/metal - name = "metal bat" - desc = "A shiny metal bat." - icon_state = "metalbat" - item_state = "metalbat" - force = 18 - w_class = 3.0 - /obj/item/weapon/butterfly name = "butterfly knife" desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket." diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index d105caae00a..a23bb65cf87 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -20,7 +20,7 @@ var/mob/living/carbon/human/H = user if(H.species.can_shred(user)) attack_generic(user,1,"slices") - return + return ..() /obj/structure/blob_act() if(prob(50)) @@ -67,10 +67,10 @@ /obj/structure/MouseDrop_T(mob/target, mob/user) var/mob/living/H = user - if(!istype(H) || target != user) // No making other people climb onto tables. - return - - do_climb(target) + if(istype(H) && can_climb(H) && target == user) + do_climb(target) + else + return ..() /obj/structure/proc/can_climb(var/mob/living/user) if (!can_touch(user) || !climbable) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 0b542dd2bb2..836b35ca028 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -211,7 +211,7 @@ /obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction) if(user.stat || user.stunned || user.weakened || user.paralysis) - unbuckle() + unbuckle_mob() if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key)) step(src, direction) update_mob() @@ -226,22 +226,9 @@ buckled_mob.loc = loc -/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user) - if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon)) - return - - unbuckle() - - M.visible_message(\ - "[M] climbs onto the [callme]!",\ - "You climb onto the [callme]!") - M.buckled = src - M.loc = loc - M.set_dir(dir) - M.update_canmove() - buckled_mob = M +/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M) update_mob() - add_fingerprint(user) + return ..() /obj/structure/stool/bed/chair/janicart/update_layer() @@ -251,11 +238,12 @@ layer = OBJ_LAYER -/obj/structure/stool/bed/chair/janicart/unbuckle() - if(buckled_mob) - buckled_mob.pixel_x = 0 - buckled_mob.pixel_y = 0 - ..() +/obj/structure/stool/bed/chair/janicart/unbuckle_mob() + var/mob/living/M = ..() + if(M) + M.pixel_x = 0 + M.pixel_y = 0 + return M /obj/structure/stool/bed/chair/janicart/set_dir() diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index e67fea38494..451bfd8b3e8 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -8,7 +8,7 @@ icon_state = "nest" var/health = 100 -/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob) +/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob) if(buckled_mob) if(buckled_mob.buckled == src) if(buckled_mob != user) @@ -18,7 +18,7 @@ "You hear squelching...") buckled_mob.pixel_y = 0 buckled_mob.old_y = 0 - unbuckle() + unbuckle_mob() else if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME) return @@ -32,16 +32,15 @@ buckled_mob.last_special = world.time buckled_mob.pixel_y = 0 buckled_mob.old_y = 0 - unbuckle() + unbuckle_mob() src.add_fingerprint(user) return -/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob) - +/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob) if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) return - unbuckle() + unbuckle_mob() var/mob/living/carbon/xenos = user var/mob/living/carbon/victim = M diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 8902dbc8ecf..cd8d78c4c64 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -11,8 +11,10 @@ name = "bed" desc = "This is used to lie in, sleep in or strap on." icon_state = "bed" - var/mob/living/buckled_mob - var/movable = 0 // For mobility checks + can_buckle = 1 + buckle_lying = 1 + //var/mob/living/buckled_mob + //var/movable = 0 // For mobility checks /obj/structure/stool/bed/psych name = "psychiatrists couch" @@ -24,7 +26,7 @@ desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?" icon_state = "abed" -/obj/structure/stool/bed/Del() +/*/obj/structure/stool/bed/Del() unbuckle() ..() return @@ -80,7 +82,7 @@ /obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob) if (!ticker) user << "You can't buckle anyone in before the game starts." - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) ) + if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) ) return if (istype(M, /mob/living/carbon/slime)) @@ -106,7 +108,7 @@ src.buckled_mob = M src.add_fingerprint(user) afterbuckle(M) - return + return*/ /* * Roller beds @@ -120,7 +122,7 @@ /obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/roller_holder)) if(buckled_mob) - manual_unbuckle() + user_unbuckle_mob(user) else visible_message("[user] collapses \the [src.name].") new/obj/item/roller(get_turf(src)) @@ -185,29 +187,19 @@ else buckled_mob = null -/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob) - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) ) - return - M.pixel_y = 6 - M.old_y = 6 - density = 1 - icon_state = "up" - ..() - return +/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob) + if(M == buckled_mob) + M.pixel_y = 6 + M.old_y = 6 + density = 1 + icon_state = "up" + else + buckled_mob.pixel_y = 0 + buckled_mob.old_y = 0 + density = 0 + icon_state = "down" -/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob) - if(buckled_mob) - if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt - buckled_mob.pixel_y = 0 - buckled_mob.old_y = 0 - buckled_mob.anchored = initial(buckled_mob.anchored) - buckled_mob.buckled = null - buckled_mob.update_canmove() - buckled_mob = null - density = 0 - icon_state = "down" - ..() - return + return ..() /obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location) ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 16d84f6aad7..55f3e36398c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -2,12 +2,10 @@ name = "chair" desc = "You sit in this. Either by will or force." icon_state = "chair" + buckle_lying = 0 //force people to sit up in chairs when buckled var/propelled = 0 // Check for fire-extinguisher-driven chairs -/obj/structure/stool/MouseDrop(atom/over_object) - return - /obj/structure/stool/bed/chair/New() ..() spawn(3) //sorry. i don't think there's a better way to do this. @@ -68,11 +66,6 @@ src.set_dir(turn(src.dir, 90)) return -/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob) - if(!istype(M)) return - buckle_mob(M, user) - return - // Chair types /obj/structure/stool/bed/chair/wood/normal icon_state = "wooden_chair" @@ -105,7 +98,7 @@ return ..() -/obj/structure/stool/bed/chair/comfy/afterbuckle() +/obj/structure/stool/bed/chair/comfy/post_buckle_mob() if(buckled_mob) overlays += armrest else @@ -122,7 +115,7 @@ /obj/structure/stool/bed/chair/office anchored = 0 - movable = 1 + buckle_movable = 1 /obj/structure/stool/bed/chair/comfy/black color = rgb(167,164,153) @@ -143,15 +136,14 @@ if (O != occupant) Bump(O) else - unbuckle() + unbuckle_mob() /obj/structure/stool/bed/chair/office/Bump(atom/A) ..() if(!buckled_mob) return if(propelled) - var/mob/living/occupant = buckled_mob - unbuckle() + var/mob/living/occupant = unbuckle_mob() var/def_zone = ran_zone() var/blocked = occupant.run_armor_check(def_zone, "melee") diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 027d382795d..dce74304ec1 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -34,7 +34,7 @@ return /obj/structure/stool/MouseDrop(atom/over_object) - if (istype(over_object, /mob/living/carbon/human)) + if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it var/mob/living/carbon/human/H = over_object if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object)) var/obj/item/weapon/stool/S = new/obj/item/weapon/stool() @@ -42,6 +42,8 @@ src.loc = S H.put_in_hands(S) H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!") + return + return ..() /obj/item/weapon/stool name = "stool" diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 59a819b8b92..d07f1a33cb7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -3,7 +3,7 @@ desc = "You sit in this. Either by will or force." icon_state = "wheelchair" anchored = 0 - movable = 1 + buckle_movable = 1 var/driving = 0 var/mob/living/pulling = null @@ -93,7 +93,7 @@ if (O != occupant) Bump(O) else - unbuckle() + unbuckle_mob() if (pulling && (get_dist(src, pulling) > 1)) pulling.pulledby = null pulling << "\red You lost your grip!" @@ -102,11 +102,11 @@ if (occupant && (src.loc != occupant.loc)) src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving -/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob) +/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob) if (pulling) MouseDrop(usr) else - manual_unbuckle(user) + user_unbuckle_mob(user) return /obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location) @@ -138,8 +138,7 @@ if(!buckled_mob) return if(propelled || (pulling && (pulling.a_intent == "hurt"))) - var/mob/living/occupant = buckled_mob - unbuckle() + var/mob/living/occupant = unbuckle_mob() if (pulling && (pulling.a_intent == "hurt")) occupant.throw_at(A, 3, 3, pulling) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 33235ae124b..e77f1e602ca 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -211,6 +211,11 @@ /obj/machinery/shower/proc/wash(atom/movable/O as obj|mob) if(!on) return + if(isliving(O)) + var/mob/living/L = O + L.ExtinguishMob() + L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily + if(iscarbon(O)) var/mob/living/carbon/M = O if(M.r_hand) diff --git a/code/global.dm b/code/global.dm index 19ddbbe289d..13f10c07648 100644 --- a/code/global.dm +++ b/code/global.dm @@ -231,3 +231,6 @@ var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons // Bomb cap! var/max_explosion_range = 14 + +// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. +var/global/obj/item/device/radio/intercom/global_announcer = new(null) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index d20105a67e6..823fb69f803 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -78,7 +78,8 @@ var/list/admin_verbs_admin = list( /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ - /client/proc/event_manager_panel + /client/proc/event_manager_panel, + /client/proc/empty_ai_core_toggle_latejoin ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 4b421d02bb2..ac83f318d24 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -288,6 +288,12 @@ var/global/list/gear_datums = list() slot = slot_w_uniform cost = 3 +/datum/gear/blackjumpskirt + display_name = "jumpskirt, black" + path = /obj/item/clothing/under/blackjumpskirt + slot = slot_w_uniform + cost = 2 + /datum/gear/skirt_blue display_name = "plaid skirt, blue" path = /obj/item/clothing/under/dress/plaid_blue @@ -492,6 +498,12 @@ var/global/list/gear_datums = list() cost = 3 slot = slot_wear_suit +/datum/gear/blue_lawyer_jacket + display_name = "suit jacket, blue" + path = /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket + cost = 3 + slot = slot_wear_suit + /datum/gear/hoodie display_name = "hoodie, grey" path = /obj/item/clothing/suit/hoodie diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index c824563ea83..5eb7e0c65bc 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -152,4 +152,11 @@ var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner") var/icon/earbit2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner2") mob.Blend(earbit, ICON_OVERLAY) - mob2.Blend(earbit2, ICON_OVERLAY) \ No newline at end of file + mob2.Blend(earbit2, ICON_OVERLAY) + +/obj/item/clothing/head/richard + name = "chicken mask" + desc = "You can hear the distant sounds of rhythmic electronica." + icon_state = "richard" + body_parts_covered = HEAD|FACE + flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR \ No newline at end of file diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index f8eabc4026b..390ec7f5417 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -406,6 +406,13 @@ item_color = "sundress_white" body_parts_covered = UPPER_TORSO|LOWER_TORSO +/obj/item/clothing/under/blackjumpskirt + name = "black jumpskirt" + desc = "A black jumpskirt, Sol size 0." + icon_state = "blackjumpskirt" + item_state = "blackjumpskirt" + item_color = "blackjumpskirt" + /obj/item/clothing/under/captainformal name = "captain's formal uniform" desc = "A captain's formal-wear, for special occasions." diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm new file mode 100644 index 00000000000..17cab40d8a1 --- /dev/null +++ b/code/modules/hydroponics/seed_storage.dm @@ -0,0 +1,256 @@ +/datum/seed_pile + var/name + var/amount + var/datum/seed/seed_type // Keeps track of what our seed is + var/list/obj/item/seeds/seeds = list() // Tracks actual objects contained in the pile + var/ID + +/datum/seed_pile/New(var/obj/item/seeds/O, var/ID) + name = O.name + amount = 1 + seed_type = O.seed + seeds += O + src.ID = ID + +/datum/seed_pile/proc/matches(var/obj/item/seeds/O) + if (O.seed == seed_type) + return 1 + return 0 + +/obj/machinery/seed_storage + name = "Seed storage" + desc = "It stores, sorts, and dispenses seeds." + icon = 'icons/obj/vending.dmi' + icon_state = "seeds" + density = 1 + anchored = 1 + use_power = 1 + idle_power_usage = 100 + + var/initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction + var/list/datum/seed_pile/piles = list() + var/list/starting_seeds = list() + var/list/scanner = list() // What properties we can view + +/obj/machinery/seed_storage/random // This is mostly for testing, but I guess admins could spawn it + name = "Random seed storage" + scanner = list("stats", "produce", "soil", "temperature", "light", "mutants") + starting_seeds = list(/obj/item/seeds/random = 50) + +/obj/machinery/seed_storage/garden + name = "Garden seed storage" + scanner = list("stats") + starting_seeds = list(/obj/item/seeds/appleseed = 3, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3) + +/obj/machinery/seed_storage/xenobotany + name = "Xenobotany seed storage" + scanner = list("stats", "produce", "soil", "temperature", "light", "mutants") + starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3) + +/obj/machinery/seed_storage/attack_hand(mob/user as mob) + user.set_machine(src) + interact(user) + +/obj/machinery/seed_storage/interact(mob/user as mob) + if (..()) + return + + if (!initialized) + for(var/typepath in starting_seeds) + var/amount = starting_seeds[typepath] + if(isnull(amount)) amount = 1 + + for (var/i = 1 to amount) + var/O = new typepath + add(O) + initialized = 1 + + var/dat = "

Seed storage contents

" + if (piles.len == 0) + dat += "No seeds" + else + dat += "" + dat += "" + if ("stats" in scanner) + dat += "" + if ("produce" in scanner) + dat += "" + if ("temperature" in scanner) + dat += "" + if ("light" in scanner) + dat += "" + if ("soil" in scanner) + dat += "" + dat += "" + for (var/datum/seed_pile/S in piles) + var/datum/seed/seed = S.seed_type + dat += "" + dat += "" + dat += "" + if ("stats" in scanner) + dat += "" + if(seed.harvest_repeat) + dat += "" + else + dat += "" + if ("produce" in scanner) + if (seed.products && seed.products.len) + dat += "" + else + dat += "" + if ("temperature" in scanner) + dat += "" + if ("light" in scanner) + dat += "" + if ("soil" in scanner) + if(seed.requires_nutrients) + if(seed.nutrient_consumption < 0.05) + dat += "" + else if(seed.nutrient_consumption > 0.2) + dat += "" + else + dat += "" + else + dat += "" + if(seed.requires_water) + if(seed.water_consumption < 1) + dat += "" + else if(seed.water_consumption > 5) + dat += "" + else + dat += "" + else + dat += "" + + dat += "" + dat += "" + dat += "" + dat += "" + dat += "
NameVarietyEYLMPrPtHarvestProduceTempLightNutriWaterNotesAmount
[S.name]#[seed.uid][seed.endurance][seed.yield][seed.lifespan][seed.maturation][seed.production][seed.potency]MultipleSingleFruit: [seed.products.len]N/A[seed.ideal_heat] K[seed.ideal_light] LLowHighNormNoLowHighNormNo" + if ("mutants" in scanner) + if(seed.mutants && seed.mutants.len) + dat += "SUBSP " + if(seed.immutable == -1) + dat += "MUT " + else if(seed.immutable > 0) + dat += "NOMUT " + switch(seed.carnivorous) + if(1) + dat += "CARN " + if(2) + dat += "CARN " + switch(seed.spread) + if(1) + dat += "VINE " + if(2) + dat += "VINE " + if ("pressure" in scanner) + if(seed.lowkpa_tolerance < 20) + dat += "LP " + if(seed.highkpa_tolerance > 220) + dat += "HP " + if ("temperature" in scanner) + if(seed.heat_tolerance > 30) + dat += "TEMRES " + else if(seed.heat_tolerance < 10) + dat += "TEMSEN " + if ("light" in scanner) + if(seed.light_tolerance > 10) + dat += "LIGRES " + else if(seed.light_tolerance < 3) + dat += "LIGSEN " + if(seed.toxins_tolerance < 3) + dat += "TOXSEN " + else if(seed.toxins_tolerance > 6) + dat += "TOXRES " + if(seed.pest_tolerance < 3) + dat += "PESTSEN " + else if(seed.pest_tolerance > 6) + dat += "PESTRES " + if(seed.weed_tolerance < 3) + dat += "WEEDSEN " + else if(seed.weed_tolerance > 6) + dat += "WEEDRES " + if(seed.parasite) + dat += "PAR " + if ("temperature" in scanner) + if(seed.alter_temp > 0) + dat += "TEMP+ " + if(seed.alter_temp < 0) + dat += "TEMP- " + if(seed.biolum) + dat += "LUM " + if(seed.flowers) + dat += "
[seed.flower_colour ? "FLOW" : "FLOW"]." + dat += "
[S.amount]Vend Purge
" + + user << browse(dat, "window=seedstorage") + onclose(user, "seedstorage") + +/obj/machinery/seed_storage/Topic(var/href, var/list/href_list) + if (..()) + return + var/task = href_list["task"] + var/ID = text2num(href_list["id"]) + + for (var/datum/seed_pile/N in piles) + if (N.ID == ID) + if (task == "vend") + var/obj/O = pick(N.seeds) + if (O) + --N.amount + N.seeds -= O + if (N.amount <= 0 || N.seeds.len <= 0) + piles -= N + del(N) + O.loc = src.loc + else + piles -= N + del(N) + else if (task == "purge") + for (var/obj/O in N.seeds) + del(O) + piles -= N + del(N) + break + updateUsrDialog() + +/obj/machinery/seed_storage/attackby(var/obj/item/O as obj, var/mob/user as mob) + if (istype(O, /obj/item/seeds)) + add(O) + user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].") + return + else if (istype(O, /obj/item/weapon/storage/bag/plants)) + var/obj/item/weapon/storage/P = O + var/loaded = 0 + for(var/obj/item/seeds/G in P.contents) + ++loaded + add(G) + if (loaded) + user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].") + else + user << "There are no seeds in \the [O.name]." + return + else if(istype(O, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + anchored = !anchored + user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + +/obj/machinery/seed_storage/proc/add(var/obj/item/seeds/O as obj) + if (istype(O.loc, /mob)) + var/mob/user = O.loc + user.drop_item(O) + else if(istype(O.loc,/obj/item/weapon/storage)) + var/obj/item/weapon/storage/S = O.loc + S.remove_from_storage(O, src) + + O.loc = src + + for (var/datum/seed_pile/N in piles) + if (N.matches(O)) + ++N.amount + N.seeds += (O) + return + + piles += new /datum/seed_pile(O, piles.len) + return diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm index 699063fec46..24e7502669b 100644 --- a/code/modules/hydroponics/vines.dm +++ b/code/modules/hydroponics/vines.dm @@ -20,7 +20,6 @@ // Life vars/ var/energy = 0 var/obj/effect/plant_controller/master = null - var/mob/living/buckled_mob var/datum/seed/seed /obj/effect/plantsegment/New() @@ -56,7 +55,7 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) del src else - manual_unbuckle(user) + user_unbuckle_mob(user) return // Plant-b-gone damage is handled in its entry in chemistry-reagents.dm ..() @@ -71,39 +70,7 @@ update() return - manual_unbuckle(user) - -/obj/effect/plantsegment/proc/unbuckle() - if(buckled_mob) - if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt - buckled_mob.buckled = null - buckled_mob.anchored = initial(buckled_mob.anchored) - buckled_mob.update_canmove() - buckled_mob = null - return - -/obj/effect/plantsegment/proc/manual_unbuckle(mob/user as mob) - if(buckled_mob) - if(prob(seed ? min(max(0,100 - seed.potency),100) : 50)) - if(buckled_mob.buckled == src) - if(buckled_mob != user) - buckled_mob.visible_message(\ - "[user.name] frees [buckled_mob.name] from [src].",\ - "[user.name] frees you from [src].",\ - "You hear shredding and ripping.") - else - buckled_mob.visible_message(\ - "[buckled_mob.name] struggles free of [src].",\ - "You untangle [src] from around yourself.",\ - "You hear shredding and ripping.") - unbuckle() - else - var/text = pick("rips","tears","pulls") - user.visible_message(\ - "[user.name] [text] at [src].",\ - "You [text] at [src].",\ - "You hear shredding and ripping.") - return + user_unbuckle_mob(user) /obj/effect/plantsegment/proc/grow() diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index f71b7f9d350..c5f4c2d2dd4 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -6,74 +6,155 @@ icon_closed = "securecrate" var/code = null var/lastattempt = null - var/attempts = 3 + var/attempts = 10 + var/codelen = 4 locked = 1 - var/min = 1 - var/max = 10 /obj/structure/closet/crate/secure/loot/New() ..() - code = rand(min,max) - var/loot = rand(1,30) + var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") + + code = "" + for(var/i = 0, i < codelen, i++) + var/dig = pick(digits) + code += dig + digits -= dig // Player can enter codes with matching digits, but there are never matching digits in the answer + + var/loot = rand(1, 100) switch(loot) - if(1) + if(1 to 5) // Common things go, 5% new/obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src) - new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src) new/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src) + new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src) new/obj/item/weapon/flame/lighter/zippo(src) - if(2) + if(6 to 10) new/obj/item/weapon/pickaxe/drill(src) new/obj/item/device/taperecorder(src) new/obj/item/clothing/suit/space(src) new/obj/item/clothing/head/helmet/space(src) - if(3) - return - if(4) + if(11 to 15) new/obj/item/weapon/reagent_containers/glass/beaker/bluespace(src) - if(5 to 6) + if(16 to 20) for(var/i = 0, i < 10, i++) new/obj/item/weapon/ore/diamond(src) - if(7) - return - if(8) - return - if(9) + if(21 to 25) for(var/i = 0, i < 3, i++) new/obj/machinery/portable_atmospherics/hydroponics(src) - if(10) + if(26 to 30) for(var/i = 0, i < 3, i++) new/obj/item/weapon/reagent_containers/glass/beaker/noreact(src) - if(11 to 13) - new/obj/item/weapon/melee/classic_baton(src) - if(14) - return - if(15) + if(31 to 35) + spawn_money(rand(300,800), src) + if(36 to 40) + new/obj/item/weapon/melee/baton(src) + if(41 to 45) + new/obj/item/clothing/under/shorts/red(src) + new/obj/item/clothing/under/shorts/blue(src) + if(46 to 50) new/obj/item/clothing/under/chameleon(src) for(var/i = 0, i < 7, i++) new/obj/item/clothing/tie/horrible(src) - if(16) - new/obj/item/clothing/under/shorts(src) - new/obj/item/clothing/under/shorts/red(src) - new/obj/item/clothing/under/shorts/blue(src) - //Dummy crates start here. - if(17 to 29) - return - //Dummy crates end here. - if(30) - new/obj/item/weapon/melee/baton(src) + if(51 to 52) // Uncommon, 2% each + new/obj/item/weapon/melee/classic_baton(src) + if(53 to 54) + new/obj/item/latexballon(src) + if(55 to 56) + var/newitem = pick(typesof(/obj/item/toy/prize) - /obj/item/toy/prize) + new newitem(src) + if(57 to 58) + new/obj/item/toy/syndicateballoon(src) + if(59 to 60) + new/obj/item/weapon/rig(src) + if(61 to 62) + for(var/i = 0, i < 12, ++i) + new/obj/item/clothing/head/kitty(src) + if(63 to 64) + var/t = rand(4,7) + for(var/i = 0, i < t, ++i) + var/newcoin = pick(/obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/diamond, /obj/item/weapon/coin/phoron, /obj/item/weapon/coin/uranium, /obj/item/weapon/coin/platinum) + new newcoin(src) + if(65 to 66) + new/obj/item/clothing/suit/ianshirt(src) + if(67 to 68) + var/t = rand(4,7) + for(var/i = 0, i < t, ++i) + var/newitem = pick(typesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts - /obj/item/weapon/stock_parts/subspace) + new newitem(src) + if(69 to 70) + new/obj/item/weapon/pickaxe/silver(src) + if(71 to 72) + new/obj/item/weapon/pickaxe/drill(src) + if(73 to 74) + new/obj/item/weapon/pickaxe/jackhammer(src) + if(75 to 76) + new/obj/item/weapon/pickaxe/diamond(src) + if(77 to 78) + new/obj/item/weapon/pickaxe/diamonddrill(src) + if(79 to 80) + new/obj/item/weapon/pickaxe/gold(src) + if(81 to 82) + new/obj/item/weapon/pickaxe/plasmacutter(src) + if(83 to 84) + new/obj/item/toy/katana(src) + if(85 to 86) + new/obj/item/seeds/random(src) + if(87) // Rarest things, some are unobtainble otherwise, some are just robust, 1% each + new/obj/item/weed_extract(src) + if(88) + new/obj/item/xenos_claw(src) + if(89) + new/obj/item/organ/xenos/plasmavessel(src) + if(90) + new/obj/item/organ/heart(src) + if(91) + new/obj/item/device/soulstone(src) + if(92) + new/obj/item/weapon/katana(src) + if(93) + new/obj/item/weapon/dnainjector/xraymut(src) // Probably the least OP + if(94) // Why the hell not + new/obj/item/weapon/storage/backpack/clown(src) + new/obj/item/clothing/under/rank/clown(src) + new/obj/item/clothing/shoes/clown_shoes(src) + new/obj/item/device/pda/clown(src) + new/obj/item/clothing/mask/gas/clown_hat(src) + new/obj/item/weapon/bikehorn(src) + //new/obj/item/weapon/stamp/clown(src) I'd add it, but only clowns can use it + new/obj/item/toy/crayon/rainbow(src) + new/obj/item/toy/waterflower(src) + if(95) + new/obj/item/clothing/under/mime(src) + new/obj/item/clothing/shoes/black(src) + new/obj/item/device/pda/mime(src) + new/obj/item/clothing/gloves/white(src) + new/obj/item/clothing/mask/gas/mime(src) + new/obj/item/clothing/head/beret(src) + new/obj/item/clothing/suit/suspenders(src) + new/obj/item/toy/crayon/mime(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(src) + if(96) + new/obj/item/weapon/vampiric(src) + if(97) + new/obj/item/weapon/archaeological_find(src) + if(98) + new/obj/item/weapon/melee/energy/sword(src) + if(99) + new/obj/item/weapon/storage/belt/champion(src) + new/obj/item/clothing/mask/luchador(src) + if(100) + new/obj/item/clothing/head/bearpelt(src) /obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob) if(locked) user << "The crate is locked with a Deca-code lock." - var/input = input(usr, "Enter digit from [min] to [max].", "Deca-Code Lock", "") as num + var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text if(in_range(src, user)) - input = Clamp(input, 0, 10) if (input == code) user << "The crate unlocks!" locked = 0 overlays.Cut() overlays += greenlight - else if (input == null || input > max || input < min) + else if (input == null || length(input) != codelen) user << "You leave the crate alone." else user << "A red light flashes." @@ -96,19 +177,26 @@ if (istype(W, /obj/item/weapon/card/emag)) user << "The crate unlocks!" locked = 0 - if (istype(W, /obj/item/device/multitool)) + if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls? user << "DECA-CODE LOCK REPORT:" if (attempts == 1) user << "* Anti-Tamper Bomb will activate on next failed access attempt." else user << "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts." - if (lastattempt == null) - user << " has been made to open the crate thus far." - return - // hot and cold - if (code > lastattempt) - user << "* Last access attempt lower than expected code." - else - user << "* Last access attempt higher than expected code." + if (lastattempt != null) + var/list/guess = list() + var/bulls = 0 + var/cows = 0 + for(var/i = 1, i < codelen + 1, i++) + var/a = copytext(lastattempt, i, i+1) // Stuff the code into the list + guess += a + guess[a] = i + for(var/i in guess) // Go through list and count matches + var/a = findtext(code, i) + if(a == guess[i]) + ++bulls + else if(a) + ++cows + user << "Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions." else ..() else ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c1d577834d3..f34e328d17d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -26,7 +26,7 @@ /mob/dead/observer/New(mob/body) sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF - see_invisible = SEE_INVISIBLE_OBSERVER + see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE see_in_dark = 100 verbs += /mob/dead/observer/proc/dead_tele @@ -409,7 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING) - see_invisible = SEE_INVISIBLE_OBSERVER + see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE else see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 3d96e3d9c0c..a97d616dee7 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -52,6 +52,8 @@ if(stat == DEAD) return 0 + facing_dir = null + if(!gibbed && deathmessage != "no message") // This is gross, but reliable. Only brains use it. src.visible_message("\The [src.name] [deathmessage]") diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index c238aef0264..dd9e2dd3c60 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -124,18 +124,28 @@ var/changed_voice if(istype(src, /mob/living/silicon/ai) && !hard_to_hear) + part_a = "\[[worldtime2text()]\]" + part_a var/jobname // the mob's "job" - var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any. + var/mob/living/carbon/human/impersonating //The crew member being impersonated, if any. if (ishuman(speaker)) var/mob/living/carbon/human/H = speaker - if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice))) - + if(H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)) changed_voice = 1 - var/mob/living/carbon/human/I = locate(speaker_name) + var/list/impersonated = new() + var/mob/living/carbon/human/I = impersonated[speaker_name] - if(I) + if(!I) + for(var/mob/living/carbon/human/M in mob_list) + if(M.real_name == speaker_name) + I = M + impersonated[speaker_name] = I + break + + // If I's display name is currently different from the voice name and using an agent ID then don't impersonate + // as this would allow the AI to track I and realize the mismatch. + if(I && !(I.name != speaker_name && I.wear_id && istype(I.wear_id,/obj/item/weapon/card/id/syndicate))) impersonating = I jobname = impersonating.get_assignment() else diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index b1170468d87..4431ccdf80f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -354,6 +354,8 @@ else if (W == handcuffed) handcuffed = null update_inv_handcuffed() + if(buckled && buckled.buckle_require_restraints) + buckled.unbuckle_mob() else if (W == legcuffed) legcuffed = null diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 47e42824245..107e660d39c 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -1,18 +1,14 @@ -/mob/living/carbon/verb/give() +mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr) set category = "IC" set name = "Give" - set src in view(1) - if(src.stat == 2 || usr.stat == 2 || src.client == null) - return - if(src == usr) - usr << "\red I feel stupider, suddenly." + if(target.stat == 2 || usr.stat == 2|| target.client == null) return var/obj/item/I if(!usr.hand && usr.r_hand == null) - usr << "\red You don't have anything in your right hand to give to [src.name]" + usr << "You don't have anything in your right hand to give to [target.name]" return if(usr.hand && usr.l_hand == null) - usr << "\red You don't have anything in your left hand to give to [src.name]" + usr << "You don't have anything in your left hand to give to [target.name]" return if(usr.hand) I = usr.l_hand @@ -20,38 +16,38 @@ I = usr.r_hand if(!I) return - if(src.r_hand == null || src.l_hand == null) - switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No")) + if(target.r_hand == null || target.l_hand == null) + switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No")) if("Yes") if(!I) return if(!Adjacent(usr)) - usr << "\red You need to stay in reaching distance while giving an object." - src << "\red [usr.name] moved too far away." + usr << "You need to stay in reaching distance while giving an object." + target << "[usr.name] moved too far away." return if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I)) - usr << "\red You need to keep the item in your active hand." - src << "\red [usr.name] seem to have given up on giving \the [I.name] to you." + usr << "You need to keep the item in your active hand." + target << "[usr.name] seem to have given up on giving \the [I.name] to you." return - if(src.r_hand != null && src.l_hand != null) - src << "\red Your hands are full." - usr << "\red Their hands are full." + if(target.r_hand != null && target.l_hand != null) + target << "Your hands are full." + usr << "Their hands are full." return else usr.drop_item() - if(src.r_hand == null) - src.r_hand = I + if(target.r_hand == null) + target.r_hand = I else - src.l_hand = I - I.loc = src + target.l_hand = I + I.loc = target I.layer = 20 - I.add_fingerprint(src) - src.update_inv_l_hand() - src.update_inv_r_hand() + I.add_fingerprint(target) + target.update_inv_l_hand() + target.update_inv_r_hand() usr.update_inv_l_hand() usr.update_inv_r_hand() - src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].") + target.visible_message("[usr.name] handed \the [I.name] to [target.name].") if("No") - src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.") + target.visible_message("[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.") else - usr << "\red [src.name]'s hands are full." + usr << "[target.name]'s hands are full." diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 777c17fdbcb..0f06e979add 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -131,6 +131,10 @@ else msg += "[t_He] [t_is] \icon[handcuffed] handcuffed!\n" + //buckled + if(buckled) + msg += "[t_He] [t_is] \icon[buckled] buckled to [buckled]!\n" + //belt if(belt) if(belt.blood_DNA) @@ -219,7 +223,10 @@ usr << "[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]..." else usr << "[t_He] has a pulse!" - + if(fire_stacks) + msg += "[t_He] [t_is] covered in some liquid.\n" + if(on_fire) + msg += "[t_He] [t_is] on fire!.\n" msg += "" if(nutrition < 100) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 546ec3ba839..d8b0a66c8c9 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -47,7 +47,7 @@ tally += 0.5 else if(E.status & ORGAN_BROKEN) tally += 1.5 - + if(shock_stage >= 10) tally += 3 if(FAT in src.mutations) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 0a504ca1486..8516b11a7fc 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -167,6 +167,8 @@ update_inv_back() else if (W == handcuffed) handcuffed = null + if(buckled && buckled.buckle_require_restraints) + buckled.unbuckle_mob() success = 1 update_inv_handcuffed() else if (W == legcuffed) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 72c281a1f2d..ce3a5401aea 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -112,6 +112,9 @@ //Handle temperature/pressure differences between body and environment handle_environment(environment) //Optimized a good bit. + //Check if we're on fire + handle_fire() + //Status updates, death etc. handle_regular_status_updates() //Optimized a bit update_canmove() @@ -598,8 +601,9 @@ failed_last_breath = 0 adjustOxyLoss(-5) + // Hot air hurts :( - if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations)) + if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations)) if(breath.temperature < species.cold_level_1) if(prob(20)) @@ -643,6 +647,10 @@ //world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]" bodytemperature += temp_adj + else if(breath.temperature >= species.heat_discomfort_level) + species.get_environment_discomfort(src,"heat") + else if(breath.temperature <= species.cold_discomfort_level) + species.get_environment_discomfort(src,"cold") breath.update_values() return 1 @@ -783,6 +791,8 @@ if (abs(body_temperature_difference) < 0.5) return //fuck this precision + if (on_fire) + return //too busy for pesky convection if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects. if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up. @@ -1039,8 +1049,7 @@ if(halloss > 100) src << "You're in too much pain to keep going..." - for(var/mob/O in oviewers(src, null)) - O.show_message("[src] slumps to the ground, too weak to continue fighting.", 1) + src.visible_message("[src] slumps to the ground, too weak to continue fighting.") Paralyse(10) setHalLoss(99) @@ -1771,5 +1780,15 @@ speech_problem_flag = 1 return stuttering +/mob/living/carbon/human/handle_fire() + if(..()) + return + + var/burn_temperature = fire_burn_temperature() + var/thermal_protection = get_heat_protection(burn_temperature) + + if (thermal_protection < 1 && bodytemperature < burn_temperature) + bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1) + #undef HUMAN_MAX_OXYLOSS #undef HUMAN_CRIT_MAX_OXYLOSS diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 3f89f5b230e..cf49b823649 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -23,8 +23,9 @@ var/message_mode = parse_message_mode(message, "headset") - if(copytext(message,1,2) == "*") - return emote(copytext(message,2)) + switch(copytext(message,1,2)) + if("*") return emote(copytext(message,2)) + if("^") return custom_emote(1, copytext(message,2)) if(name != GetVoice()) alt_name = "(as [get_id_name("Unknown")])" diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 8bdfa8a59d2..943f90bcca2 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -56,7 +56,7 @@ var/cold_level_3 = 120 // Cold damage level 3 below this point. var/heat_level_1 = 360 // Heat damage level 1 above this point. var/heat_level_2 = 400 // Heat damage level 2 above this point. - var/heat_level_3 = 1000 // Heat damage level 2 above this point. + var/heat_level_3 = 1000 // Heat damage level 3 above this point. var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning. @@ -65,6 +65,20 @@ var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative. var/body_temperature = 310.15 // Non-IS_SYNTHETIC species will try to stabilize at this temperature. // (also affects temperature processing) + + var/heat_discomfort_level = 315 // Aesthetic messages about feeling warm. + var/cold_discomfort_level = 285 // Aesthetic messages about feeling chilly. + var/list/heat_discomfort_strings = list( + "You feel sweat drip down your neck.", + "You feel uncomfortably warm.", + "Your skin prickles in the heat." + ) + var/list/cold_discomfort_strings = list( + "You feel chilly.", + "You shiver suddely.", + "Your chilly flesh stands out in goosebumps." + ) + // HUD data vars. var/datum/hud_data/hud var/hud_type @@ -100,6 +114,27 @@ for(var/u_type in unarmed_types) unarmed_attacks += new u_type() +/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type) + + if(!prob(5)) + return + + var/covered = 0 // Basic coverage can help. + for(var/obj/item/clothing/clothes in H) + if(H.l_hand == clothes|| H.r_hand == clothes) + continue + if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO)) + covered = 1 + break + + switch(msg_type) + if("cold") + if(!covered) + H << "[pick(cold_discomfort_strings)]" + if("heat") + if(covered) + H << "[pick(heat_discomfort_strings)]" + /datum/species/proc/get_random_name(var/gender) var/datum/language/species_language = all_languages[language] return species_language.get_random_name(gender) diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index b7b66d2fd48..bc46cf9c45c 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -45,6 +45,20 @@ reagent_tag = IS_UNATHI base_color = "#066000" + heat_discomfort_level = 295 + heat_discomfort_strings = list( + "You feel soothingly warm.", + "You feel the heat sink into your bones.", + "You feel warm enough to take a nap." + ) + + cold_discomfort_level = 292 + cold_discomfort_strings = list( + "You feel chilly.", + "You feel sluggish and cold.", + "Your scales bristle against the cold." + ) + /datum/species/tajaran name = "Tajara" name_plural = "Tajaran" @@ -54,6 +68,9 @@ tail = "tajtail" unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) darksight = 8 + slowdown = -1 + brute_mod = 1.2 + blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \ S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \ influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \ @@ -75,6 +92,14 @@ flesh_color = "#AFA59E" base_color = "#333333" + heat_discomfort_level = 292 + heat_discomfort_strings = list( + "Your fur prickles in the heat.", + "You feel uncomfortably warm.", + "Your overheated skin itches." + ) + cold_discomfort_level = 275 + /datum/species/skrell name = "Skrell" name_plural = "Skrell" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index cc053f219d5..19736bad3f4 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -126,8 +126,9 @@ Please contact me on #coderbus IRC. ~Carn x #define LEGCUFF_LAYER 19 #define L_HAND_LAYER 20 #define R_HAND_LAYER 21 -#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system -#define TOTAL_LAYERS 22 +#define FIRE_LAYER 22 //If you're on fire +#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system +#define TOTAL_LAYERS 23 ////////////////////////////////// /mob/living/carbon/human @@ -508,6 +509,7 @@ proc/get_damage_icon_part(damage_state, body_part) update_inv_handcuffed(0) update_inv_legcuffed(0) update_inv_pockets(0) + update_fire(0) UpdateDamageIcon() update_icons() //Hud Stuff @@ -911,6 +913,13 @@ proc/get_damage_icon_part(damage_state, body_part) if(update_icons) update_icons() +/mob/living/carbon/human/update_fire(var/update_icons=1) + overlays_standing[FIRE_LAYER] = null + if(on_fire) + overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER) + + if(update_icons) update_icons() + // Used mostly for creating head items /mob/living/carbon/human/proc/generate_head_icon() //gender no longer matters for the mouth, although there should probably be seperate base head icons. @@ -969,4 +978,5 @@ proc/get_damage_icon_part(damage_state, body_part) #undef L_HAND_LAYER #undef R_HAND_LAYER #undef TARGETED_LAYER +#undef FIRE_LAYER #undef TOTAL_LAYERS diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 20b80c9c890..016f57f18f1 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -57,6 +57,9 @@ if(environment) // More error checking -- TLE handle_environment(environment) + //Check if we're on fire + handle_fire() + //Status updates, death etc. handle_regular_status_updates() update_canmove() @@ -629,3 +632,9 @@ proc/handle_changeling() if(mind && mind.changeling) mind.changeling.regenerate() + +/mob/living/carbon/monkey/handle_fire() + if(..()) + return + adjustFireLoss(6) + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm index 284f9e288fc..ec69d454f6b 100644 --- a/code/modules/mob/living/carbon/monkey/update_icons.dm +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -5,7 +5,8 @@ #define M_L_HAND_LAYER 4 #define M_R_HAND_LAYER 5 #define TARGETED_LAYER 6 -#define M_TOTAL_LAYERS 6 +#define M_FIRE_LAYER 6 +#define M_TOTAL_LAYERS 7 ///////////////////////////////// /mob/living/carbon/monkey @@ -19,6 +20,7 @@ update_inv_r_hand(0) update_inv_l_hand(0) update_inv_handcuffed(0) + update_fire(0) update_icons() //Hud Stuff update_hud() @@ -109,6 +111,12 @@ overlays_standing[TARGETED_LAYER] = null if(update_icons) update_icons() +/mob/living/carbon/monkey/update_fire(var/update_icons=1) + if(on_fire) + overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER) + else + overlays_standing[M_FIRE_LAYER] = null + if(update_icons) update_icons() //Monkey Overlays Indexes//////// #undef M_MASK_LAYER #undef M_BACK_LAYER @@ -116,5 +124,6 @@ #undef M_L_HAND_LAYER #undef M_R_HAND_LAYER #undef TARGETED_LAYER +#undef M_FIRE_LAYER #undef M_TOTAL_LAYERS diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index b9f898ab5dc..6eb23964aa2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -281,6 +281,8 @@ C.legcuffed = initial(C.legcuffed) hud_updateflag |= 1 << HEALTH_HUD hud_updateflag |= 1 << STATUS_HUD + ExtinguishMob() + fire_stacks = 0 /mob/living/proc/rejuvenate() @@ -555,9 +557,9 @@ for(var/mob/O in viewers(C)) O.show_message("\red [usr] manages to unbuckle themself!", 1) C << "\blue You successfully unbuckle yourself." - C.buckled.manual_unbuckle(C) + C.buckled.user_unbuckle_mob(C) else - L.buckled.manual_unbuckle(L) + L.buckled.user_unbuckle_mob(L) //Breaking out of a locker? else if( src.loc && (istype(src.loc, /obj/structure/closet)) ) @@ -628,9 +630,21 @@ BD.attack_hand(usr) C.open() - //breaking out of handcuffs + //drop && roll or breaking out of handcuffs else if(iscarbon(L)) var/mob/living/carbon/CM = L + if(CM.on_fire && CM.canmove) + CM.fire_stacks -= 5 + CM.Weaken(3) + CM.spin(32,2) + CM.visible_message("[CM] rolls on the floor, trying to put themselves out!", \ + "You stop, drop, and roll!") + sleep(30) + if(fire_stacks <= 0) + CM.visible_message("[CM] has successfully extinguished themselves!", \ + "You extinguish yourself.") + ExtinguishMob() + return if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time)) CM.next_move = world.time + 100 CM.last_special = world.time + 100 @@ -657,6 +671,8 @@ CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) del(CM.handcuffed) CM.handcuffed = null + if(buckled && buckled.buckle_require_restraints) + buckled.unbuckle_mob() CM.update_inv_handcuffed() else var/obj/item/weapon/handcuffs/HC = CM.handcuffed @@ -841,4 +857,22 @@ return 1 /mob/living/proc/slip(var/slipped_on,stun_duration=8) - return 0 \ No newline at end of file + return 0 + +/mob/living/carbon/proc/spin(spintime, speed) + spawn() + var/D = dir + while(spintime >= speed) + sleep(speed) + switch(D) + if(NORTH) + D = EAST + if(SOUTH) + D = WEST + if(EAST) + D = SOUTH + if(WEST) + D = NORTH + set_dir(D) + spintime -= speed + return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 1afd5b53256..1be8ea4ac9f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -191,3 +191,52 @@ src.visible_message("[user] has [attack_message] [src]!") spawn(1) updatehealth() return 1 + +/mob/living/proc/IgniteMob() + if(fire_stacks > 0 && !on_fire) + on_fire = 1 + src.AddLuminosity(3) + update_fire() + +/mob/living/proc/ExtinguishMob() + if(on_fire) + on_fire = 0 + fire_stacks = 0 + src.AddLuminosity(-3) + update_fire() + +/mob/living/proc/update_fire() + return + +/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person + fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = FIRE_MIN_STACKS, max = FIRE_MAX_STACKS) + +/mob/living/proc/handle_fire() + if(fire_stacks < 0) + fire_stacks = max(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly + + if(!on_fire) + return 1 + else if(fire_stacks <= 0) + ExtinguishMob() //Fire's been put out. + return 1 + + var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment + if(G.gas["oxygen"] < 1) + ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire + return 1 + + var/turf/location = get_turf(src) + location.hotspot_expose(fire_burn_temperature(), 50, 1) + +/mob/living/fire_act() + adjust_fire_stacks(0.5) + IgniteMob() + +//Finds the effective temperature that the mob is burning at. +/mob/living/proc/fire_burn_temperature() + if (fire_stacks <= 0) + return 0 + + //Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot. + return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index ecbc51db379..a9cbcbe0dde 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -38,4 +38,6 @@ var/tod = null // Time of death var/update_slimes = 1 var/silent = null // Can't talk. Value goes down every life proc. - var/mob_size // Used by lockers. \ No newline at end of file + var/mob_size // Used by lockers. + var/on_fire = 0 //The "Are we on fire?" var + var/fire_stacks diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ff948d23870..c25e833c08c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -141,7 +141,7 @@ var/list/ai_verbs_default = list( if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. - new/obj/structure/AIcore/deactivated(loc)//New empty terminal. + empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal. del(src)//Delete AI. return else diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 590ff71ea5b..d86d71607fb 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -1,18 +1,19 @@ // AI EYE // -// An invisible (no icon) mob that the AI controls to look around the station with. +// A mob that the AI controls to look around the station with. // It streams chunks as it moves around, which will show it what the AI can and cannot see. /mob/aiEye name = "Inactive AI Eye" - icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o + icon = 'icons/mob/AI.dmi' + icon_state = "eye" + alpha = 127 var/list/visibleCameraChunks = list() var/mob/living/silicon/ai/ai = null density = 0 status_flags = GODMODE // You can't damage it. - mouse_opacity = 0 see_in_dark = 7 - invisibility = INVISIBILITY_MAXIMUM + invisibility = INVISIBILITY_AI_EYE // Movement code. Returns 0 to stop air movement from moving it. /mob/aiEye/Move() diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm new file mode 100644 index 00000000000..8aca00a711b --- /dev/null +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -0,0 +1,44 @@ +var/global/list/empty_playable_ai_cores = list() + +/hook/roundstart/proc/spawn_empty_ai() + for(var/obj/effect/landmark/start/S in landmarks_list) + if(S.name != "AI") + continue + if(locate(/mob/living) in S.loc) + continue + empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S)) + + return 1 + +/mob/living/silicon/ai/verb/wipe_core() + set name = "Wipe Core" + set category = "OOC" + set desc = "Wipe your core. This is functionally equivalent to cryo or robotic storage, freeing up your job slot." + + if(ticker && ticker.mode && ticker.mode.name == "AI malfunction") + usr << "You cannot use this verb in malfunction. If you need to leave, please adminhelp." + return + + // Guard against misclicks, this isn't the sort of thing we want happening accidentally + if(alert("WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", + "Wipe Core", "No", "No", "Yes") != "Yes") + return + + // We warned you. + empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc) + global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight") + + //Handle job slot/tater cleanup. + var/job = mind.assigned_role + + job_master.FreeRole(job) + + if(mind.objectives.len) + del(mind.objectives) + mind.special_role = null + else + if(ticker.mode.name == "AutoTraitor") + var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode + current_mode.possible_traitors.Remove(src) + + del(src) \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 82a53840019..15347c25805 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -839,9 +839,7 @@ note dizziness decrements automatically in the mob's Life() proc. // facing verbs /mob/proc/canface() if(!canmove) return 0 - if(client.moving) return 0 - if(world.time < client.move_delay) return 0 - if(stat==2) return 0 + if(stat) return 0 if(anchored) return 0 if(monkeyizing) return 0 return 1 @@ -855,21 +853,17 @@ note dizziness decrements automatically in the mob's Life() proc. canmove = 0 pixel_y = V.mob_offset_y - 5 else - lying = 0 + if(buckled.buckle_lying != -1) lying = buckled.buckle_lying canmove = 1 pixel_y = V.mob_offset_y else if(buckled) - if (!buckled.movable) + if(buckled.buckle_lying != -1) lying = buckled.buckle_lying + if (!buckled.buckle_movable) anchored = 1 canmove = 0 - if(istype(buckled,/obj/structure/stool/bed/chair) ) - lying = 0 - else - lying = 1 else anchored = 0 canmove = 1 - lying = 0 else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH)) lying = 1 canmove = 0 @@ -903,9 +897,10 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/facedir(var/ndir) - if(!canface()) return 0 + if(!canface() || client.moving || world.time < client.move_delay) + return 0 set_dir(ndir) - if(buckled && buckled.movable) + if(buckled && buckled.buckle_movable) buckled.set_dir(ndir) client.move_delay += movement_delay() return 1 @@ -937,6 +932,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Stun(amount) if(status_flags & CANSTUN) + facing_dir = null stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun return @@ -952,6 +948,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Weaken(amount) if(status_flags & CANWEAKEN) + facing_dir = null weakened = max(max(weakened,amount),0) update_canmove() //updates lying, canmove and icons return @@ -970,6 +967,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/Paralyse(amount) if(status_flags & CANPARALYSE) + facing_dir = null paralysis = max(max(paralysis,amount),0) return @@ -984,6 +982,7 @@ note dizziness decrements automatically in the mob's Life() proc. return /mob/proc/Sleeping(amount) + facing_dir = null sleeping = max(max(sleeping,amount),0) return @@ -996,6 +995,7 @@ note dizziness decrements automatically in the mob's Life() proc. return /mob/proc/Resting(amount) + facing_dir = null resting = max(max(resting,amount),0) return @@ -1159,3 +1159,55 @@ mob/proc/yank_out_object() /mob/proc/updateicon() return + +/mob/verb/face_direction() + + set name = "Face Direction" + set category = "IC" + set src = usr + + set_face_dir() + + if(!facing_dir) + usr << "You are now not facing anything." + else + usr << "You are now facing [dir2text(facing_dir)]." + +/mob/proc/set_face_dir(var/newdir) + if(newdir) + set_dir(newdir) + facing_dir = newdir + else if(facing_dir) + facing_dir = null + else + set_dir(dir) + facing_dir = dir + +/mob/set_dir() + if(facing_dir) + if(!canface() || lying || buckled || restrained()) + facing_dir = null + else if(dir != facing_dir) + return ..(facing_dir) + else + return ..() + +/mob/verb/northfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(NORTH) + +/mob/verb/southfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(SOUTH) + +/mob/verb/eastfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(EAST) + +/mob/verb/westfaceperm() + set hidden = 1 + facing_dir = null + set_face_dir(WEST) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 296d58d0786..1b9f1c1b764 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -90,6 +90,7 @@ var/list/languages = list() // For speaking/listening. var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null. var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes + var/facing_dir = null // Used for the ancient art of moonwalking. var/name_archive //For admin things like possession @@ -214,7 +215,7 @@ var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak var/stance_damage = 0 //Whether this mob's ability to stand has been affected - + //SSD var, changed it up some so people can have special things happen for different mobs when SSD. var/player_logged = 0 diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index d6e6496f9da..ed11358838f 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -193,16 +193,16 @@ return if(M == assailant && state >= GRAB_AGGRESSIVE) - var/can_eat + var/can_eat if((FAT in user.mutations) && ismonkey(affecting)) can_eat = 1 else var/mob/living/carbon/human/H = user - if(istype(H) && iscarbon(affecting) && H.species.gluttonous) + if(istype(H) && H.species.gluttonous) if(H.species.gluttonous == 2) can_eat = 2 - else if(!ishuman(affecting)) + else if(!ishuman(affecting) && !ismonkey(affecting) && (affecting.small || iscarbon(affecting))) can_eat = 1 if(can_eat) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a07e538e1e3..78817c9ccf6 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -284,7 +284,7 @@ proc/IsJobAvailable(rank) var/datum/job/job = job_master.GetJob(rank) if(!job) return 0 - if((job.current_positions >= job.total_positions) && job.total_positions != -1) return 0 + if(!job.is_position_available()) return 0 if(jobban_isbanned(src,rank)) return 0 if(!job.player_old_enough(src.client)) return 0 return 1 @@ -313,6 +313,24 @@ UpdateFactionList(character) EquipCustomItems(character) + // AIs don't need a spawnpoint, they must spawn at an empty core + if(character.mind.assigned_role == "AI") + + character = character.AIize(move=0) // AIize the character, but don't move them yet + + // IsJobAvailable for AI checks that there is an empty core available in this list + var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1] + empty_playable_ai_cores -= C + + character.loc = C.loc + + AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [character.loc.loc]") + ticker.mode.latespawn(character) + + del(C) + del(src) + return + //Find our spawning point. var/join_message var/datum/spawnpoint/S @@ -356,20 +374,16 @@ proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message) if (ticker.current_state == GAME_STATE_PLAYING) - var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI. if(character.mind.role_alt_title) rank = character.mind.role_alt_title - a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") - del(a) + global_announcer.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message) if (ticker.current_state == GAME_STATE_PLAYING) - var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI. if(character.mind.role_alt_title) rank = character.mind.role_alt_title // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc. - a.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") - del(a) + global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer") proc/LateChoices() var/mills = world.time // 1/10 of a second, not real milliseconds but whatever diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index b4530b07674..d6181f5ec7f 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -56,13 +56,13 @@ spawning = 1 return ..() -/mob/living/carbon/human/AIize() +/mob/living/carbon/human/AIize(move=1) // 'move' argument needs defining here too because BYOND is dumb if (monkeyizing) return for(var/t in organs) del(t) - return ..() + return ..(move) /mob/living/carbon/AIize() if (monkeyizing) @@ -75,7 +75,7 @@ invisibility = 101 return ..() -/mob/proc/AIize() +/mob/proc/AIize(move=1) if(client) src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jams for AIs var/mob/living/silicon/ai/O = new (loc, base_law_type,,1)//No MMI but safety is in effect. @@ -88,37 +88,38 @@ else O.key = key - var/obj/loc_landmark - for(var/obj/effect/landmark/start/sloc in landmarks_list) - if (sloc.name != "AI") - continue - if (locate(/mob/living) in sloc.loc) - continue - loc_landmark = sloc - if (!loc_landmark) - for(var/obj/effect/landmark/tripai in landmarks_list) - if (tripai.name == "tripai") - if(locate(/mob/living) in tripai.loc) - continue - loc_landmark = tripai - if (!loc_landmark) - O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone." + if(move) + var/obj/loc_landmark for(var/obj/effect/landmark/start/sloc in landmarks_list) - if (sloc.name == "AI") - loc_landmark = sloc + if (sloc.name != "AI") + continue + if ((locate(/mob/living) in sloc.loc) || (locate(/obj/structure/AIcore) in sloc.loc)) + continue + loc_landmark = sloc + if (!loc_landmark) + for(var/obj/effect/landmark/tripai in landmarks_list) + if (tripai.name == "tripai") + if((locate(/mob/living) in tripai.loc) || (locate(/obj/structure/AIcore) in tripai.loc)) + continue + loc_landmark = tripai + if (!loc_landmark) + O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone." + for(var/obj/effect/landmark/start/sloc in landmarks_list) + if (sloc.name == "AI") + loc_landmark = sloc - O.loc = loc_landmark.loc - for (var/obj/item/device/radio/intercom/comm in O.loc) - comm.ai += O + O.loc = loc_landmark.loc + for (var/obj/item/device/radio/intercom/comm in O.loc) + comm.ai += O O.on_mob_init() O.add_ai_verbs() O.rename_self("ai",1) - . = O - del(src) - + spawn(0) + del(src) + return O //human -> robot /mob/living/carbon/human/proc/Robotize() diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index bdfeffe58e4..8861d1fabcc 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -140,7 +140,10 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/update_status(var/push_update = 0) - if (istype(user, /mob/living/silicon/ai) || (get_dist(get_turf(user),get_turf(src_object)) <= 1)) + if (istype(user, /mob/dead/observer)) + /* Ghosts see updates but can't interact */ + set_status(STATUS_UPDATE, push_update) + else if (istype(user, /mob/living/silicon/ai) || (get_dist(get_turf(user),get_turf(src_object)) <= 1)) set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else if (istype(user, /mob/living/silicon/robot)) if (src_object in view(7, user)) // robots can see and interact with things they can see within 7 tiles diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index dc019ccaec6..7519becdaf8 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -724,6 +724,11 @@ // do APC interaction src.interact(user) +/obj/machinery/power/apc/attack_ghost(user as mob) + if(stat & (BROKEN|MAINT)) + return + return ui_interact(user) + /obj/machinery/power/apc/interact(mob/user) if(!user) return diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 18aa6b4885f..e1cdb233684 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -218,6 +218,8 @@ add_fingerprint(user) ui_interact(user) +/obj/machinery/power/smes/attack_ghost(mob/user) + ui_interact(user) /obj/machinery/power/smes/attack_hand(mob/user) add_fingerprint(user) diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/Chemistry-Colours.dm index a59147e85f6..aaae973d95e 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/Chemistry-Colours.dm @@ -8,7 +8,6 @@ var/list/greencolor = new /list(contents) var/list/bluecolor = new /list(contents) var/i - //fill the list of weights for(i=1; i<=contents; i++) var/datum/reagent/re = reagent_list[i] @@ -17,7 +16,6 @@ reagentweight *= 20 //Paint colours a mixture twenty times as much weight[i] = reagentweight - //fill the lists of colours for(i=1; i<=contents; i++) var/datum/reagent/re = reagent_list[i] diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 78a48cf8e0e..6c6c194af58 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -79,9 +79,9 @@ datum if(A.volume > the_volume) the_volume = A.volume the_reagent = A - + return the_reagent - + get_master_reagent_name() var/the_name = null var/the_volume = 0 @@ -353,8 +353,11 @@ datum if(C.result) feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") multiplier = max(multiplier, 1) //this shouldnt happen ... - add_reagent(C.result, C.result_amount*multiplier) - set_data(C.result, preserved_data) + if(!isnull(C.resultcolor)) //paints + add_reagent(C.result, C.result_amount*multiplier, C.resultcolor) + else + add_reagent(C.result, C.result_amount*multiplier) + set_data(C.result, preserved_data) //add secondary products for(var/S in C.secondary_results) @@ -458,7 +461,7 @@ datum else R.reaction_obj(A, R.volume+volume_modifier) return - add_reagent(var/reagent, var/amount, var/list/data=null, var/safety = 0) + add_reagent(var/reagent, var/amount, var/data=null, var/safety = 0) if(!isnum(amount)) return 1 update_total() if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. @@ -469,7 +472,6 @@ datum if (R.id == reagent) R.volume += amount update_total() - my_atom.on_reagent_change() // mix dem viruses if(R.id == "blood" && reagent == "blood") @@ -495,9 +497,23 @@ datum if(!istype(D, /datum/disease/advance)) preserve += D R.data["viruses"] = preserve - + if(R.id == "paint" && reagent == "paint") + if(R.color && data) + var/list/mix = new /list(2) + //fill the list + var/datum/reagent/paint/P = chemical_reagents_list["paint"] + var/datum/reagent/paint/P1 = new P.type() + P1.color = R.color + P1.volume = R.volume - amount //since we just increased that + var/datum/reagent/paint/P2 = new P.type() + P2.color = data + P2.volume = amount + mix[1] = P1 + mix[2] = P2 + R.color = mix_color_from_reagents(mix) if(!safety) handle_reactions() + my_atom.on_reagent_change() return 0 var/datum/reagent/D = chemical_reagents_list[reagent] @@ -507,7 +523,10 @@ datum reagent_list += R R.holder = src R.volume = amount - SetViruses(R, data) // Includes setting data + if(reagent == "paint") + R.color = data + else + SetViruses(R, data) // Includes setting data for blood //debug //world << "Adding data" @@ -611,6 +630,7 @@ datum my_atom.reagents = null copy_data(var/datum/reagent/current_reagent) + if (current_reagent.id == "paint") return current_reagent.color if (!current_reagent || !current_reagent.data) return null if (!istype(current_reagent.data, /list)) return current_reagent.data diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 7f754e56b37..b2ac133cc56 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -851,7 +851,10 @@ //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! /obj/item/weapon/reagent_containers/pill = list(), - /obj/item/weapon/reagent_containers/food = list() + /obj/item/weapon/reagent_containers/food = list(), + + //Crayons + /obj/item/toy/crayon = list() ) var/list/juice_items = list ( @@ -1186,6 +1189,21 @@ break remove_object(O) + //crayons + for (var/obj/item/toy/crayon/O in holdingitems) + if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/amount = round(O.uses/3) //full crayon gives 10 juice + var/dustcolour = "red" + if (O.colourName == "mime") + dustcolour = "grey" //black+white + else if (O.colourName == "rainbow") + dustcolour = "brown" //mix of all colours + else if (!isnull(O.colourName)) //all other defined colours + dustcolour = O.colourName + beaker.reagents.add_reagent("crayon_dust_[dustcolour]",amount) + remove_object(O) + //Everything else - Transfers reagents from it into beaker for (var/obj/item/weapon/reagent_containers/O in holdingitems) if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 1e7d7bdd56f..e523fab26c4 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -88,7 +88,7 @@ datum on_new(var/data) return - // Called when two reagents of the same are mixing. + // Called when two reagents of the same are mixing. <-- Blatant lies on_merge(var/data) return @@ -258,10 +258,15 @@ datum if(!cube.wrapped) cube.Expand() - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if (istype(M, /mob/living/carbon/slime)) var/mob/living/carbon/slime/S = M S.apply_water() + if(method == TOUCH && isliving(M)) + M.adjust_fire_stacks(-(volume / 10)) + if(M.fire_stacks <= 0) + M.ExtinguishMob() + return water/holywater name = "Holy Water" @@ -911,6 +916,12 @@ datum M.adjustToxLoss(1) ..() return + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with welding fuel to make them easy to ignite! + if(!istype(M, /mob/living)) + return + if(method == TOUCH) + M.adjust_fire_stacks(volume / 10) + return space_cleaner name = "Space cleaner" @@ -1515,6 +1526,78 @@ datum ..() return +//////////////////////////Ground crayons///////////////////// + + + crayon_dust + name = "Crayon dust" + id = "crayon_dust" + description = "Intensely coloured powder obtained by grinding crayons." + reagent_state = LIQUID + color = "#888888" + overdose = 5 + + red + name = "Red crayon dust" + id = "crayon_dust_red" + color = "#FE191A" + + orange + name = "Orange crayon dust" + id = "crayon_dust_orange" + color = "#FFBE4F" + + yellow + name = "Yellow crayon dust" + id = "crayon_dust_yellow" + color = "#FDFE7D" + + green + name = "Green crayon dust" + id = "crayon_dust_green" + color = "#18A31A" + + blue + name = "Blue crayon dust" + id = "crayon_dust_blue" + color = "#247CFF" + + purple + name = "Purple crayon dust" + id = "crayon_dust_purple" + color = "#CC0099" + + grey //Mime + name = "Grey crayon dust" + id = "crayon_dust_grey" + color = "#808080" + + brown //Rainbow + name = "Brown crayon dust" + id = "crayon_dust_brown" + color = "#846F35" + +//////////////////////////Paint////////////////////////////// + + paint + name = "Paint" + id = "paint" + description = "This paint will stick to almost any object" + reagent_state = LIQUID + color = "#808080" + overdose = 15 + + reaction_turf(var/turf/T, var/volume) + if(!istype(T) || istype(T, /turf/space)) + return + T.color = color + + reaction_obj(var/obj/O, var/volume) + ..() + if(istype(O,/obj/item/weapon/light)) + O.color = color + + //////////////////////////Poison stuff/////////////////////// toxin @@ -1593,6 +1676,12 @@ datum src = null T.assume_gas("volatile_fuel", volume, T20C) return + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel! + if(!istype(M, /mob/living)) + return + if(method == TOUCH) + M.adjust_fire_stacks(volume / 5) + return toxin/lexorin name = "Lexorin" @@ -2018,22 +2107,20 @@ datum if(!M) M = holder.my_atom if(prob(50)) M.heal_organ_damage(1,0) M.nutrition += nutriment_factor // For hunger and fatness -/* - // If overeaten - vomit and fall down - // Makes you feel bad but removes reagents and some effect - // from your body - if (M.nutrition > 650) - M.nutrition = rand (250, 400) - M.weakened += rand(2, 10) - M.jitteriness += rand(0, 5) - M.dizziness = max (0, (M.dizziness - rand(0, 15))) - M.druggy = max (0, (M.druggy - rand(0, 15))) - M.adjustToxLoss(rand(-15, -5))) - M.updatehealth() -*/ ..() return + nutriment/protein // Bad for Skrell! + name = "animal protein" + id = "protein" + color = "#440000" + + on_mob_life(var/mob/living/M, var/alien) + if(alien && alien == IS_SKRELL) + M.adjustToxLoss(0.5) + M.nutrition -= nutriment_factor + ..() + lipozine name = "Lipozine" // The anti-nutriment. id = "lipozine" @@ -3265,6 +3352,12 @@ datum usr << "It wasn't enough..." return + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with ethanol isn't quite as good as fuel. + if(!istype(M, /mob/living)) + return + if(method == TOUCH) + M.adjust_fire_stacks(volume / 15) + return ethanol/beer name = "Beer" id = "beer" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index b9c657f97ec..4d6b44fb84d 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -4,6 +4,7 @@ datum var/name = null var/id = null var/result = null + var/resultcolor = null //for paint var/list/required_reagents = new/list() var/list/required_catalysts = new/list() @@ -131,7 +132,7 @@ datum name = "Water" id = "water" result = "water" - required_reagents = list("oxygen" = 2, "hydrogen" = 1) + required_reagents = list("oxygen" = 1, "hydrogen" = 2) result_amount = 1 thermite @@ -1344,6 +1345,109 @@ datum var/obj/effect/golemrune/Z = new /obj/effect/golemrune Z.loc = get_turf(holder.my_atom) Z.announce_to_ghosts() + +//////////////////////////////////////////PAINT/////////////////////////////////////////// +//Crayon dust -> paint + red_paint + name = "Red paint" + id = "red_paint" + result = "paint" + resultcolor = "#FE191A" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_red" = 1) + result_amount = 5 + + orange_paint + name = "Orange paint" + id = "orange_paint" + result = "paint" + resultcolor = "#FFBE4F" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_orange" = 1) + result_amount = 5 + + yellow_paint + name = "Yellow paint" + id = "yellow_paint" + result = "paint" + resultcolor = "#FDFE7D" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_yellow" = 1) + result_amount = 5 + + green_paint + name = "Green paint" + id = "green_paint" + result = "paint" + resultcolor = "#18A31A" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_green" = 1) + result_amount = 5 + + blue_paint + name = "Blue paint" + id = "blue_paint" + result = "paint" + resultcolor = "#247CFF" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_blue" = 1) + result_amount = 5 + + purple_paint + name = "Purple paint" + id = "purple_paint" + result = "paint" + resultcolor = "#CC0099" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_purple" = 1) + result_amount = 5 + + grey_paint //mime + name = "Grey paint" + id = "grey_paint" + result = "paint" + resultcolor = "#808080" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_grey" = 1) + result_amount = 5 + + brown_paint + name = "Brown paint" + id = "brown_paint" + result = "paint" + resultcolor = "#846F35" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_brown" = 1) + result_amount = 5 + +//Ghetto reactions + + blood_paint + name = "Blood paint" + id = "blood_paint" + result = "paint" + resultcolor = "#FE191A" + required_reagents = list("plasticide" = 1, "water" = 3, "blood" = 2) + result_amount = 5 + + milk_paint + name = "Milk paint" + id = "milk_paint" + result = "paint" + resultcolor = "#F0F8FF" + required_reagents = list("plasticide" = 1, "water" = 3, "milk" = 5) + result_amount = 5 + + carbon_paint + name = "Carbon paint" + id = "carbon_paint" + result = "paint" + resultcolor = "#333333" + required_reagents = list("plasticide" = 1, "water" = 3, "carbon" = 1) + result_amount = 5 + +//Aluminum "non-ghetto" white paint + + aluminum_paint + name = "Aluminum paint" + id = "aluminum_paint" + result = "paint" + resultcolor = "#F0F8FF" + required_reagents = list("plasticide" = 1, "water" = 3, "aluminum" = 1) + result_amount = 5 + //////////////////////////////////////////FOOD MIXTURES//////////////////////////////////// tofu diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 7aaad7a6785..292f998318d 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -469,7 +469,7 @@ New() ..() - reagents.add_reagent("nutriment", 1) + reagents.add_reagent("protein", 2) throw_impact(atom/hit_atom) ..() @@ -533,7 +533,7 @@ New() ..() - reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 3) reagents.add_reagent("sodiumchloride", 1) reagents.add_reagent("blackpepper", 1) bitesize = 1 @@ -546,7 +546,7 @@ New() ..() - reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/flour name = "flour" @@ -566,7 +566,7 @@ New() ..() - reagents.add_reagent("nutriment", rand(3,5)) + reagents.add_reagent("protein", rand(3,5)) reagents.add_reagent("toxin", rand(1,3)) src.bitesize = 3 @@ -612,7 +612,7 @@ New() ..() - reagents.add_reagent("nutriment", 3) + reagents.add_reagent("protein", 3) reagents.add_reagent("carpotoxin", 3) src.bitesize = 6 @@ -624,7 +624,7 @@ New() ..() - reagents.add_reagent("nutriment", 4) + reagents.add_reagent("protein", 4) reagents.add_reagent("carpotoxin", 3) bitesize = 3 @@ -659,7 +659,7 @@ New() ..() - reagents.add_reagent("nutriment", 12) + reagents.add_reagent("protein", 12) reagents.add_reagent("hyperzine", 5) src.bitesize = 3 @@ -671,7 +671,7 @@ New() ..() - reagents.add_reagent("nutriment", 3) + reagents.add_reagent("protein", 3) src.bitesize = 6 /obj/item/weapon/reagent_containers/food/snacks/meatball @@ -682,7 +682,7 @@ New() ..() - reagents.add_reagent("nutriment", 3) + reagents.add_reagent("protein", 3) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/sausage @@ -693,7 +693,7 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/donkpocket @@ -704,7 +704,8 @@ New() ..() - reagents.add_reagent("nutriment", 4) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) var/warm = 0 proc/cooltime() //Not working, derp? @@ -723,7 +724,7 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) reagents.add_reagent("alkysine", 6) bitesize = 2 @@ -750,7 +751,7 @@ icon_state = "hburger" New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheeseburger @@ -759,6 +760,7 @@ icon_state = "cheeseburger" New() ..() + reagents.add_reagent("protein", 2) reagents.add_reagent("nutriment", 2) /obj/item/weapon/reagent_containers/food/snacks/monkeyburger @@ -769,7 +771,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fishburger @@ -780,7 +783,7 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) reagents.add_reagent("carpotoxin", 3) bitesize = 3 @@ -828,7 +831,7 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 8) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/clownburger @@ -839,11 +842,6 @@ New() ..() -/* - var/datum/disease/F = new /datum/disease/pierrot_throat(0) - var/list/data = list("viruses"= list(F)) - reagents.add_reagent("blood", 4, data) -*/ reagents.add_reagent("nutriment", 6) bitesize = 2 @@ -868,7 +866,7 @@ //var/herp = 0 New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 8) bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/muffin @@ -945,7 +943,7 @@ New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("protein", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/soylenviridians @@ -970,7 +968,7 @@ New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("protein", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tofupie @@ -1025,7 +1023,7 @@ New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("protein", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/wingfangchu @@ -1037,7 +1035,7 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) bitesize = 2 @@ -1050,7 +1048,7 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 8) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/monkeykabob @@ -1062,7 +1060,7 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 8) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tofukabob @@ -1079,14 +1077,15 @@ /obj/item/weapon/reagent_containers/food/snacks/cubancarp name = "Cuban Carp" - desc = "A grifftastic sandwich that burns your tongue and then leaves it numb!" + desc = "A sandwich that burns your tongue and then leaves it numb!" icon_state = "cubancarp" trash = /obj/item/trash/plate filling_color = "#E9ADFF" New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) reagents.add_reagent("carpotoxin", 3) reagents.add_reagent("capsaicin", 3) bitesize = 3 @@ -1120,7 +1119,7 @@ New() ..() - reagents.add_reagent("nutriment", 4) + reagents.add_reagent("protein", 4) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/no_raisin @@ -1178,7 +1177,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("protein", 3) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fries @@ -1225,7 +1225,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 2) + reagents.add_reagent("nutriment", 4) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/fortunecookie @@ -1260,7 +1261,7 @@ New() ..() - reagents.add_reagent("nutriment", 4) + reagents.add_reagent("protein", 4) reagents.add_reagent("sodiumchloride", 1) reagents.add_reagent("blackpepper", 1) bitesize = 3 @@ -1314,7 +1315,7 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 8) reagents.add_reagent("water", 5) bitesize = 5 @@ -1332,13 +1333,13 @@ /obj/item/weapon/reagent_containers/food/snacks/bloodsoup name = "Tomato soup" - desc = "Smells like copper" + desc = "Smells like copper." icon_state = "tomatosoup" filling_color = "#FF0000" New() ..() - reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) reagents.add_reagent("blood", 10) reagents.add_reagent("water", 5) bitesize = 5 @@ -1454,7 +1455,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) reagents.add_reagent("capsaicin", 3) reagents.add_reagent("tomatojuice", 2) bitesize = 5 @@ -1469,7 +1471,8 @@ trash = /obj/item/trash/snack_bowl New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) reagents.add_reagent("frostoil", 3) reagents.add_reagent("tomatojuice", 2) bitesize = 5 @@ -1503,7 +1506,7 @@ New() ..() - reagents.add_reagent("nutriment",10) + reagents.add_reagent("protein", 10) afterattack(obj/O as obj, mob/user as mob, proximity) if(!proximity) return @@ -1568,24 +1571,18 @@ desc = "Still wrapped in some paper." icon_state = "monkeycubewrap" wrapped = 1 - - /obj/item/weapon/reagent_containers/food/snacks/monkeycube/farwacube name = "farwa cube" monkey_type = /mob/living/carbon/monkey/tajara /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube name = "farwa cube" monkey_type =/mob/living/carbon/monkey/tajara - - /obj/item/weapon/reagent_containers/food/snacks/monkeycube/stokcube name = "stok cube" monkey_type = /mob/living/carbon/monkey/unathi /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube name = "stok cube" monkey_type =/mob/living/carbon/monkey/unathi - - /obj/item/weapon/reagent_containers/food/snacks/monkeycube/neaeracube name = "neaera cube" monkey_type = /mob/living/carbon/monkey/skrell @@ -1613,7 +1610,8 @@ New() ..() - reagents.add_reagent("nutriment", 14) + reagents.add_reagent("protein", 10) + reagents.add_reagent("nutriment", 4) bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/enchiladas @@ -1625,7 +1623,8 @@ New() ..() - reagents.add_reagent("nutriment",8) + reagents.add_reagent("protein", 6) + reagents.add_reagent("nutriment",2) reagents.add_reagent("capsaicin", 6) bitesize = 4 @@ -1638,7 +1637,7 @@ New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("protein", 10) reagents.add_reagent("banana", 5) reagents.add_reagent("blackpepper", 1) reagents.add_reagent("sodiumchloride", 1) @@ -1665,7 +1664,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) reagents.add_reagent("carpotoxin", 3) bitesize = 3 @@ -1678,7 +1678,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich @@ -1690,7 +1691,8 @@ New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 3) reagents.add_reagent("carbon", 2) bitesize = 2 @@ -1703,7 +1705,8 @@ New() ..() - reagents.add_reagent("nutriment", 7) + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 3) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/tomatosoup @@ -1740,7 +1743,8 @@ New() ..() - reagents.add_reagent("nutriment", 10) + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 6) reagents.add_reagent("tomatojuice", 5) reagents.add_reagent("imidazoline", 5) reagents.add_reagent("water", 5) @@ -1836,7 +1840,7 @@ /obj/item/weapon/reagent_containers/food/snacks/ricepudding name = "Rice Pudding" - desc = "Where's the Jam!" + desc = "Where's the jam?" icon_state = "rpudding" trash = /obj/item/trash/snack_bowl filling_color = "#FFFBDB" @@ -1868,7 +1872,8 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 4) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/spesslaw @@ -1879,7 +1884,8 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 4) + reagents.add_reagent("nutriment", 4) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/poppypretzel @@ -1914,7 +1920,8 @@ New() ..() - reagents.add_reagent("nutriment", 50) + reagents.add_reagent("protein", 25) + reagents.add_reagent("nutriment", 25) bitesize = 10 /obj/item/weapon/reagent_containers/food/snacks/candiedapple @@ -2043,7 +2050,7 @@ New() ..() - reagents.add_reagent("nutriment", 5) + reagents.add_reagent("protein", 5) bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/beetsoup @@ -2055,19 +2062,7 @@ New() ..() - switch(rand(1,6)) - if(1) - name = "borsch" - if(2) - name = "bortsch" - if(3) - name = "borstch" - if(4) - name = "borsh" - if(5) - name = "borshch" - if(6) - name = "borscht" + name = pick(list("borsch","bortsch","borstch","borsh","borshch","borscht")) reagents.add_reagent("nutriment", 8) bitesize = 2 @@ -2092,7 +2087,8 @@ New() ..() - reagents.add_reagent("nutriment", 8) + reagents.add_reagent("protein", 2) + reagents.add_reagent("nutriment", 6) bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/appletart @@ -2125,7 +2121,8 @@ filling_color = "#FF7575" New() ..() - reagents.add_reagent("nutriment", 30) + reagents.add_reagent("protein", 20) + reagents.add_reagent("nutriment", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice @@ -2145,7 +2142,8 @@ filling_color = "#8AFF75" New() ..() - reagents.add_reagent("nutriment", 30) + reagents.add_reagent("protein", 20) + reagents.add_reagent("nutriment", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice @@ -2228,7 +2226,8 @@ filling_color = "#E6AEDB" New() ..() - reagents.add_reagent("nutriment", 25) + reagents.add_reagent("protein", 25) + reagents.add_reagent("nutriment", 5) reagents.add_reagent("alkysine", 10) bitesize = 2 @@ -2249,7 +2248,8 @@ filling_color = "#FAF7AF" New() ..() - reagents.add_reagent("nutriment", 25) + reagents.add_reagent("protein", 15) + reagents.add_reagent("nutriment", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice @@ -2364,7 +2364,7 @@ filling_color = "#FFF700" New() ..() - reagents.add_reagent("nutriment", 20) + reagents.add_reagent("protein", 20) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/cheesewedge @@ -2389,7 +2389,7 @@ /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice name = "Birthday Cake slice" - desc = "A slice of your birthday" + desc = "A slice of your birthday." icon_state = "birthdaycakeslice" trash = /obj/item/trash/plate filling_color = "#FFD6D6" @@ -2426,7 +2426,8 @@ filling_color = "#FFF896" New() ..() - reagents.add_reagent("nutriment", 20) + reagents.add_reagent("protein", 15) + reagents.add_reagent("nutriment", 5) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice @@ -2511,7 +2512,8 @@ slices_num = 6 New() ..() - reagents.add_reagent("nutriment", 40) + reagents.add_reagent("nutriment", 35) + reagents.add_reagent("protein", 5) reagents.add_reagent("tomatojuice", 6) bitesize = 2 @@ -2530,7 +2532,7 @@ slices_num = 6 New() ..() - reagents.add_reagent("nutriment", 50) + reagents.add_reagent("protein", 50) reagents.add_reagent("tomatojuice", 6) bitesize = 2 @@ -2550,6 +2552,7 @@ New() ..() reagents.add_reagent("nutriment", 35) + reagents.add_reagent("protein", 5) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice @@ -2568,6 +2571,7 @@ New() ..() reagents.add_reagent("nutriment", 30) + reagents.add_reagent("protein", 5) reagents.add_reagent("tomatojuice", 6) reagents.add_reagent("imidazoline", 12) bitesize = 2 @@ -2799,6 +2803,7 @@ bitesize = 2 New() ..() + reagents.add_reagent("protein", 1) reagents.add_reagent("nutriment", 3) // Dough + rolling pin = flat dough @@ -2818,6 +2823,7 @@ slices_num = 3 New() ..() + reagents.add_reagent("protein", 1) reagents.add_reagent("nutriment", 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice @@ -2891,7 +2897,8 @@ bitesize = 3 New() ..() - reagents.add_reagent("nutriment", 7) + reagents.add_reagent("protein", 3) + reagents.add_reagent("nutriment", 4) /obj/item/weapon/reagent_containers/food/snacks/rawcutlet name = "raw cutlet" @@ -2901,7 +2908,7 @@ bitesize = 1 New() ..() - reagents.add_reagent("nutriment", 1) + reagents.add_reagent("protein", 1) /obj/item/weapon/reagent_containers/food/snacks/cutlet name = "cutlet" @@ -2911,7 +2918,7 @@ bitesize = 2 New() ..() - reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/rawmeatball name = "raw meatball" @@ -2921,7 +2928,7 @@ bitesize = 2 New() ..() - reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" @@ -2930,7 +2937,7 @@ bitesize = 2 New() ..() - reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 6) /obj/item/weapon/reagent_containers/food/snacks/flatbread name = "flatbread" diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 3f40be01df4..8d390fa7856 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -1,5 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - /* Research and Development (R&D) Console @@ -27,8 +25,6 @@ cause a ton of data to be lost, an admin can go send it back. - The second method is with Technology Disks and Design Disks. Each of these disks can hold a single technology or design datum in it's entirety. You can then take the disk to any R&D console and upload it's data to it. This method is a lot more secure (since it won't update every console in existence) but it's more of a hassle to do. Also, the disks can be stolen. - - */ /obj/machinery/computer/rdconsole @@ -523,9 +519,50 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(20) screen = 1.6 updateUsrDialog() + + else if (href_list["print"]) //Print research information + screen = 0.5 + spawn(20) + var/obj/item/weapon/paper/PR = new/obj/item/weapon/paper + PR.name = "list of researched technologies" + PR.info = "
[station_name()] Science Laboratories" + PR.info += "

[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report

" + PR.info += "report prepared at [worldtime2text()] station time

" + if(text2num(href_list["print"]) == 2) + PR.info += GetResearchListInfo() + else + PR.info += GetResearchLevelsInfo() + PR.info_links = PR.info + PR.icon_state = "paper_words" + PR.loc = src.loc + spawn(10) + screen = ((text2num(href_list["print"]) == 2) ? 5.0 : 1.1) + updateUsrDialog() + updateUsrDialog() return +/obj/machinery/computer/rdconsole/proc/GetResearchLevelsInfo() + var/dat + dat += "" if(1.1) //Research viewer - dat += "Main Menu
" + dat += "Main Menu || " + dat += "Print This Page
" dat += "Current Research Levels:

" - dat += "" if(1.2) //Technology Disk Menu @@ -897,14 +931,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, ///////////////////Research Information Browser//////////////////// if(5.0) - dat += "Main Menu
" + dat += "Main Menu || " + dat += "Print This Page
" dat += "List of Researched Technologies and Designs:" - dat += "" - + dat += GetResearchListInfo() user << browse("Research and Development Console
[dat]", "window=rdconsole;size=850x600") onclose(user, "rdconsole") @@ -917,4 +947,4 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/core name = "Core R&D Console" - id = 1 \ No newline at end of file + id = 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm index 8eca5f355d2..b8d1c9a87cd 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm @@ -8,7 +8,7 @@ if(prob(100 * weakness)) user << "\red You are suddenly zapped away elsewhere!" if (user.buckled) - user.buckled.unbuckle() + user.buckled.unbuckle_mob() var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() sparks.set_up(3, 0, get_turf(user)) @@ -28,7 +28,7 @@ if(prob(100 * weakness)) M << "\red You are displaced by a strange force!" if(M.buckled) - M.buckled.unbuckle() + M.buckled.unbuckle_mob() var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() sparks.set_up(3, 0, get_turf(M)) @@ -47,7 +47,7 @@ if(prob(100 * weakness)) M << "\red You are displaced by a strange force!" if(M.buckled) - M.buckled.unbuckle() + M.buckled.unbuckle_mob() var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() sparks.set_up(3, 0, get_turf(M)) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 072423d496e..24f15422190 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -13,6 +13,10 @@ animate_movement=1 luminosity = 3 + can_buckle = 1 + buckle_movable = 1 + buckle_lying = 0 + var/attack_log = null var/on = 0 var/health = 0 //do not forget to set health for your vehicle! @@ -25,7 +29,6 @@ var/emagged = 0 var/powered = 0 //set if vehicle is powered and should use fuel when moving var/move_delay = 1 //set this to limit the speed of the vehicle - var/movable = 1 var/obj/item/weapon/cell/cell var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move @@ -298,9 +301,7 @@ C.layer = layer + 0.1 //so it sits above the vehicle if(ismob(C)) - var/mob/M = C - M.buckled = src - M.update_canmove() + buckle_mob(C) return 1 @@ -343,10 +344,7 @@ load.layer = initial(load.layer) if(ismob(load)) - var/mob/M = load - M.buckled = null - M.anchored = initial(M.anchored) - M.update_canmove() + unbuckle_mob(load) load = null diff --git a/code/setup.dm b/code/setup.dm index 2b3407ad60d..4b91223b21c 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -12,8 +12,16 @@ #define STEFAN_BOLTZMANN_CONSTANT 5.6704e-8 //W/(m^2*K^4) #define COSMIC_RADIATION_TEMPERATURE 3.15 //K #define AVERAGE_SOLAR_RADIATION 200 //W/m^2. Kind of arbitrary. Really this should depend on the sun position much like solars. From the numbers on Erebus, this'd be an orbit of 23.3 lightseconds. -#define RADIATOR_OPTIMUM_PRESSURE 110 //kPa at 20 C -#define RADIATOR_EXPOSED_SURFACE_AREA 0.03 //The pipe looks to be thin vertically and wide horizontally, so we'll assume that it's three centimeters thick and only explosed to the sun edge-on. +#define RADIATOR_OPTIMUM_PRESSURE 3771 //kPa - this should be higher as gasses aren't great conductors until they are dense. Used the critical pressure for air. +#define GAS_CRITICAL_TEMPERATURE 132.65 //K - the critical point temperature for air + +/* + The pipe looks to be thin vertically and wide horizontally, so we'll assume that it's + three centimeters thick, one meter wide, and only explosed to the sun 3 degrees off of edge-on. + Since the radiatior is uniform along it's length, the ratio of surface area touched by sunlight + to the total surface area is the same as the ratio of the perimeter of the cross-section. +*/ +#define RADIATOR_EXPOSED_SURFACE_AREA_RATIO 0.04 // (3 cm + 100 cm * sin(3deg))/(2*(3+100 cm)) //unitless ratio #define CELL_VOLUME 2500 //liters in a cell #define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC @@ -69,6 +77,12 @@ #define SHOE_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For gloves #define SHOE_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For gloves +//Fire +#define FIRE_MIN_STACKS -20 +#define FIRE_MAX_STACKS 25 +//If the number of stacks goes above this firesuits won't protect you anymore. If not you can walk around while on fire like a badass. +#define FIRE_MAX_FIRESUIT_STACKS 20 + #define THROWFORCE_SPEED_DIVISOR 5 //The throwing speed value at which the throwforce multiplier is exactly 1. #define THROWNOBJ_KNOCKBACK_SPEED 15 //The minumum speed of a thrown object that will cause living mobs it hits to be knocked back. #define THROWNOBJ_KNOCKBACK_DIVISOR 2 //Affects how much speed the mob is knocked back with @@ -480,6 +494,8 @@ #define INVISIBILITY_OBSERVER 60 #define SEE_INVISIBLE_OBSERVER 60 +#define INVISIBILITY_AI_EYE 61 +#define SEE_INVISIBLE_OBSERVER_AI_EYE 61 #define INVISIBILITY_MAXIMUM 100 diff --git a/code/unused/AI_Visibility.dm b/code/unused/AI_Visibility.dm deleted file mode 100644 index d218f4409b8..00000000000 --- a/code/unused/AI_Visibility.dm +++ /dev/null @@ -1,310 +0,0 @@ -//All credit for this goes to Uristqwerty. - -/turf - var/image/obscured - var/image/dim - -/turf/proc/visibilityChanged() - cameranet.updateVisibility(src) - -/datum/camerachunk - var/list/obscuredTurfs = list() - var/list/visibleTurfs = list() - var/list/dimTurfs = list() - var/list/obscured = list() - var/list/dim = list() - var/list/cameras = list() - var/list/turfs = list() - var/list/seenby = list() - var/visible = 0 - var/changed = 0 - var/updating = 0 - -/mob/aiEye - var/list/visibleCameraChunks = list() - var/mob/ai = null - density = 0 - -/datum/camerachunk/proc/add(mob/aiEye/ai) - ai.visibleCameraChunks += src - if(ai.ai.client) - ai.ai.client.images += obscured - ai.ai.client.images += dim - visible++ - seenby += ai - if(changed && !updating) - update() - -/datum/camerachunk/proc/remove(mob/aiEye/ai) - ai.visibleCameraChunks -= src - if(ai.ai.client) - ai.ai.client.images -= obscured - ai.ai.client.images -= dim - seenby -= ai - if(visible > 0) - visible-- - -/datum/camerachunk/proc/visibilityChanged(turf/loc) - if(!(loc in visibleTurfs)) - return - - hasChanged() - -/datum/camerachunk/proc/hasChanged() - if(visible) - if(!updating) - updating = 1 - spawn(10)//Batch large changes, such as many doors opening or closing at once - update() - updating = 0 - else - changed = 1 - -/datum/camerachunk/proc/update() - var/list/newDimTurfs = list() - var/list/newVisibleTurfs = list() - - for(var/obj/machinery/camera/c in cameras) - var/lum = c.luminosity - c.luminosity = 6 - for(var/turf/t in view(7, c)) - if(t in turfs) - newDimTurfs += t - - for(var/turf/t in view(6, c)) - if(t in turfs) - newVisibleTurfs += t - - c.luminosity = lum - - var/list/dimAdded = newDimTurfs - dimTurfs - var/list/dimRemoved = dimTurfs - newDimTurfs - var/list/visAdded = newVisibleTurfs - visibleTurfs - var/list/visRemoved = visibleTurfs - newVisibleTurfs - - visibleTurfs = newVisibleTurfs - dimTurfs = newDimTurfs - obscuredTurfs = turfs - dimTurfs - dimTurfs -= visibleTurfs - - for(var/turf/t in dimRemoved) - if(t.dim) - dim -= t.dim - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.dim - - if(!(t in visibleTurfs)) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.obscured - - for(var/turf/t in dimAdded) - if(!(t in visibleTurfs)) - if(!t.dim) - t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15) - t.mouse_opacity = 0 - - dim += t.dim - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.dim - - if(t.obscured) - obscured -= t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.obscured - - for(var/turf/t in visAdded) - if(t.obscured) - obscured -= t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.obscured - - for(var/turf/t in visRemoved) - if(t in obscuredTurfs) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.obscured - - - -/datum/camerachunk/New(loc, x, y, z) - x &= ~0xf - y &= ~0xf - - for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z))) - if(c.status) - cameras += c - - for(var/turf/t in range(10, locate(x + 8, y + 8, z))) - if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) - turfs += t - - for(var/obj/machinery/camera/c in cameras) - var/lum = c.luminosity - c.luminosity = 6 - for(var/turf/t in view(7, c)) - if(t in turfs) - dimTurfs += t - - for(var/turf/t in view(6, c)) - if(t in turfs) - visibleTurfs += t - - c.luminosity = lum - - obscuredTurfs = turfs - dimTurfs - dimTurfs -= visibleTurfs - - for(var/turf/t in obscuredTurfs) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - - for(var/turf/t in dimTurfs) - if(!(t in visibleTurfs)) - if(!t.dim) - t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER) - - dim += t.dim - -var/datum/cameranet/cameranet = new() - -/datum/cameranet - var/list/cameras = list() - var/list/chunks = list() - var/network = "net1" - var/ready = 0 - -/datum/cameranet/New() - ..() - -/datum/cameranet/proc/chunkGenerated(x, y, z) - var/key = "[x],[y],[z]" - return key in chunks - -/datum/cameranet/proc/getCameraChunk(x, y, z) - var/key = "[x],[y],[z]" - - if(!(key in chunks)) - chunks[key] = new /datum/camerachunk(null, x, y, z) - - return chunks[key] - -/datum/cameranet/proc/visibility(mob/aiEye/ai) - var/x1 = max(0, ai.x - 16) & ~0xf - var/y1 = max(0, ai.y - 16) & ~0xf - var/x2 = min(world.maxx, ai.x + 16) & ~0xf - var/y2 = min(world.maxy, ai.y + 16) & ~0xf - - var/list/visibleChunks = list() - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - visibleChunks += getCameraChunk(x, y, ai.z) - - var/list/remove = ai.visibleCameraChunks - visibleChunks - var/list/add = visibleChunks - ai.visibleCameraChunks - - for(var/datum/camerachunk/c in remove) - c.remove(ai) - - for(var/datum/camerachunk/c in add) - c.add(ai) - -/datum/cameranet/proc/updateVisibility(turf/loc) - if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z)) - return - - var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z) - chunk.visibilityChanged(loc) - -/datum/cameranet/proc/addCamera(obj/machinery/camera/c) - var/x1 = max(0, c.x - 16) & ~0xf - var/y1 = max(0, c.y - 16) & ~0xf - var/x2 = min(world.maxx, c.x + 16) & ~0xf - var/y2 = min(world.maxy, c.y + 16) & ~0xf - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - if(chunkGenerated(x, y, c.z)) - var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z) - if(!(c in chunk.cameras)) - chunk.cameras += c - chunk.hasChanged() - - -/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new() - -/mob/living/silicon/ai/New() - ..() - eyeobj.ai = src - -/mob/living/silicon/ai/verb/freelook() - set category = "AI Commands" - set name = "freelook" - current = null //cancel camera view first, it causes problems - cameraFollow = null - machine = null - if(client.eye == eyeobj) - client.eye = src - for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks) - c.remove(eyeobj) - else - client.eye = eyeobj - eyeobj.loc = loc - cameranet.visibility(eyeobj) - cameraFollow = null -/mob/aiEye/Move() - . = ..() - if(.) - cameranet.visibility(src) - -/client/AIMove(n, direct, var/mob/living/silicon/ai/user) - if(eye == user.eyeobj) - user.eyeobj.loc = get_step(user.eyeobj, direct) - cameranet.visibility(user.eyeobj) - - else - return ..() - -/* -/client/AIMoveZ(direct, var/mob/living/silicon/ai/user) - if(eye == user.eyeobj) - var/dif = 0 - if(direct == UP && user.eyeobj.z > 1) - dif = -1 - else if(direct == DOWN && user.eyeobj.z < 4) - dif = 1 - user.eyeobj.loc = locate(user.eyeobj.x, user.eyeobj.y, user.eyeobj.z + dif) - cameranet.visibility(user.eyeobj) - else - return ..() -*/ - -/turf/move_camera_by_click() - if(istype(usr, /mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = usr - if(AI.client.eye == AI.eyeobj) - return - return ..() - -/obj/machinery/door/update_nearby_tiles(need_rebuild) - . = ..(need_rebuild) - cameranet.updateVisibility(loc) - -/obj/machinery/camera/New() - ..() - cameranet.addCamera(src) \ No newline at end of file diff --git a/code/unused/Agouri_stuff.dm b/code/unused/Agouri_stuff.dm deleted file mode 100644 index e204fbd7d39..00000000000 --- a/code/unused/Agouri_stuff.dm +++ /dev/null @@ -1,1947 +0,0 @@ -/* -/obj/vehicle/airtight - //inner atmos - var/use_internal_tank = 0 - var/internal_tank_valve = ONE_ATMOSPHERE - var/obj/machinery/portable_atmospherics/canister/internal_tank - var/datum/gas_mixture/cabin_air - var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature - var/datum/global_iterator/pr_give_air //moves air from tank to cabin - - -/obj/vehicle/airtight/New() - ..() - src.add_airtank() - src.add_cabin() - src.add_airtight_iterators() - - - - -//######################################### Helpers for airtight vehicles ######################################### - -/obj/vehicle/airtight/proc/add_cabin() - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air - -/obj/vehicle/airtight/proc/add_airtank() - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank - -/obj/vehicle/airtight/proc/add_airtight_iterators() - pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) - pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src)) - - -//######################################### Specific datums for airtight vehicles ################################# - - -/datum/global_iterator/vehicle_preserve_temp //normalizing cabin air temperature to 20 degrees celsium - delay = 20 - - process(var/obj/vehicle/airtight/V) - if(V.cabin_air && V.cabin_air.return_volume() > 0) - var/delta = V.cabin_air.temperature - T20C - V.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1))) - return - - -/datum/global_iterator/vehicle_tank_give_air - delay = 15 - - process(var/obj/vehicle/airtight/V) - if(V.internal_tank) - var/datum/gas_mixture/tank_air = V.internal_tank.return_air() - var/datum/gas_mixture/cabin_air = V.cabin_air - - var/release_pressure = V.internal_tank_valve - var/cabin_pressure = cabin_air.return_pressure() - var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2) - var/transfer_moles = 0 - if(pressure_delta > 0) //cabin pressure lower than release pressure - if(tank_air.return_temperature() > 0) - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = tank_air.remove(transfer_moles) - cabin_air.merge(removed) - else if(pressure_delta < 0) //cabin pressure higher than release pressure - var/datum/gas_mixture/t_air = V.get_turf_air() - pressure_delta = cabin_pressure - release_pressure - if(t_air) - pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta) - if(pressure_delta > 0) //if location pressure is lower than cabin pressure - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles) - if(t_air) - t_air.merge(removed) - else //just delete the cabin gas, we're in space or some shit - del(removed) - else - return stop() - return - - -//######################################### Atmospherics for vehicles ############################################# - - -/obj/vehicle/proc/get_turf_air() - var/turf/T = get_turf(src) - if(T) - . = T.return_air() - return - -/obj/vehicle/airtight/remove_air(amount) - if(use_internal_tank) - return cabin_air.remove(amount) - else - var/turf/T = get_turf(src) - if(T) - return T.remove_air(amount) - return - -/obj/vehicle/airtight/return_air() - if(use_internal_tank) - return cabin_air - return get_turf_air() - -/obj/vehicle/airtight/proc/return_pressure() - . = 0 - if(use_internal_tank) - . = cabin_air.return_pressure() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_pressure() - return - - -/obj/vehicle/airtight/proc/return_temperature() - . = 0 - if(use_internal_tank) - . = cabin_air.return_temperature() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_temperature() - return - -/obj/vehicle/airtight/proc/connect(obj/machinery/atmospherics/portables_connector/new_port) - //Make sure not already connected to something else - if(connected_port || !new_port || new_port.connected_device) - return 0 - - //Make sure are close enough for a valid connection - if(new_port.loc != src.loc) - return 0 - - //Perform the connection - connected_port = new_port - connected_port.connected_device = src - - //Actually enforce the air sharing - var/datum/pipe_network/network = connected_port.return_network(src) - if(network && !(internal_tank.return_air() in network.gases)) - network.gases += internal_tank.return_air() - network.update = 1 - log_message("Vehicle airtank connected to external port.") - return 1 - -/obj/vehicle/airtight/proc/disconnect() - if(!connected_port) - return 0 - - var/datum/pipe_network/network = connected_port.return_network(src) - if(network) - network.gases -= internal_tank.return_air() - - connected_port.connected_device = null - connected_port = null - src.log_message("Vehicle airtank disconnected from external port.") - return 1 - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - -/obj/vehicle - name = "Vehicle" - icon = 'icons/vehicles/vehicles.dmi' - density = 1 - anchored = 1 - unacidable = 1 //To avoid the pilot-deleting shit that came with mechas - layer = MOB_LAYER - //var/can_move = 1 - var/mob/living/carbon/occupant = null - //var/step_in = 10 //make a step in step_in/10 sec. - //var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. - //var/step_energy_drain = 10 - var/health = 300 //health is health - //var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. - //the values in this list show how much damage will pass through, not how much will be absorbed. - var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1) - var/obj/item/weapon/cell/cell //Our power source - var/state = 0 - var/list/log = new - var/last_message = 0 - var/add_req_access = 1 - var/maint_access = 1 - //var/dna //dna-locking the mech - var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/effect/system/spark_spread/spark_system = new - var/lights = 0 - var/lights_power = 6 - - //inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri - //var/use_internal_tank = 0 - //var/internal_tank_valve = ONE_ATMOSPHERE - //var/obj/machinery/portable_atmospherics/canister/internal_tank - //var/datum/gas_mixture/cabin_air - //var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/obj/item/device/radio/radio = null - - var/max_temperature = 2500 - //var/internal_damage_threshold = 50 //health percentage below which internal damage is possible - var/internal_damage = 0 //contains bitflags - - var/list/operation_req_access = list()//required access level for mecha operation - var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment - - //var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri - var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss - - //var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri - - var/datum/global_iterator/pr_internal_damage //processes internal damage - - - var/wreckage - - var/list/equipment = new - var/obj/selected - //var/max_equip = 3 - - var/datum/events/events - - - -/obj/vehicle/New() - ..() - events = new - icon_state += "-unmanned" - add_radio() - //add_cabin() //No cabin for non-airtights - - spark_system.set_up(2, 0, src) - spark_system.attach(src) - add_cell() - add_iterators() - removeVerb(/obj/mecha/verb/disconnect_from_port) - removeVerb(/atom/movable/verb/pull) - log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.") - loc.Entered(src) - return - - -//################ Helpers ########################################################### - - -/obj/vehicle/proc/removeVerb(verb_path) - verbs -= verb_path - -/obj/vehicle/proc/addVerb(verb_path) - verbs += verb_path - -/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank*/ - -/obj/vehicle/proc/add_cell(var/obj/item/weapon/cell/C=null) - if(C) - C.forceMove(src) - cell = C - return - cell = new(src) - cell.charge = 15000 - cell.maxcharge = 15000 - -/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air*/ - -/obj/vehicle/proc/add_radio() - radio = new(src) - radio.name = "[src] radio" - radio.icon = icon - radio.icon_state = icon_state - radio.subspace_transmission = 1 - -/obj/vehicle/proc/add_iterators() - pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0) - //pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0) - //pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri - //pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri - -/obj/vehicle/proc/check_for_support() - if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src))) - return 1 - else - return 0 - -//################ Logs and messages ############################################ - - -/obj/vehicle/proc/log_message(message as text,red=null) - log.len++ - log[log.len] = list("time"=world.timeofday,"message"="[red?"":null][message][red?"":null]") - return log.len - - - -//################ Global Iterator Datums ###################################### - - -/datum/global_iterator/vehicle_intertial_movement //inertial movement in space - delay = 7 - - process(var/obj/vehicle/V as obj, direction) - if(direction) - if(!step(V, direction)||V.check_for_support()) - src.stop() - else - src.stop() - return - - -/datum/global_iterator/mecha_internal_damage // processing internal damage - - process(var/obj/mecha/mecha) - if(!mecha.hasInternalDamage()) - return stop() - if(mecha.hasInternalDamage(MECHA_INT_FIRE)) - if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5)) - mecha.clearInternalDamage(MECHA_INT_FIRE) - if(mecha.internal_tank) - if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH))) - mecha.setInternalDamage(MECHA_INT_TANK_BREACH) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents - int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15)) - if(mecha.cabin_air && mecha.cabin_air.return_volume()>0) - mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15)) - if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2) - mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire") - if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum - mecha.pr_int_temp_processor.stop() - if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank - if(mecha.internal_tank) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10) - if(mecha.loc && hascall(mecha.loc,"assume_air")) - mecha.loc.assume_air(leaked_gas) - else - del(leaked_gas) - if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) - if(mecha.get_charge()) - mecha.spark_system.start() - mecha.cell.charge -= min(20,mecha.cell.charge) - mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) - return - - -*/ - - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - - -/*/turf/DblClick() - if(istype(usr, /mob/living/silicon/ai)) - return move_camera_by_click() - if(usr.stat || usr.restrained() || usr.lying) - return ..() - - if(usr.hand && istype(usr.l_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.l_hand - F.flame_turf(turflist) - else if(!usr.hand && istype(usr.r_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.r_hand - F.flame_turf(turflist) - - return ..() - -/turf/New() - ..() - for(var/atom/movable/AM as mob|obj in src) - spawn( 0 ) - src.Entered(AM) - return - return - -/turf/ex_act(severity) - return 0 - - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/beam/pulse)) - src.ex_act(2) - ..() - return 0 - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/bullet/gyro)) - explosion(src, -1, 0, 2) - ..() - return 0 - -/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! - - -/turf/Entered(atom/movable/M as mob|obj) - var/loopsanity = 100 - if(ismob(M)) - if(!M:lastarea) - M:lastarea = get_area(M.loc) - if(M:lastarea.has_gravity == 0) - inertial_drift(M) - - /* - if(M.flags & NOGRAV) - inertial_drift(M) - */ - - - - else if(!istype(src, /turf/space)) - M:inertia_dir = 0 - ..() - var/objects = 0 - for(var/atom/A as mob|obj|turf|area in src) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasEntered(M, 1) - return - objects = 0 - for(var/atom/A as mob|obj|turf|area in range(1)) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasProximity(M, 1) - return - return - -/turf/proc/inertial_drift(atom/movable/A as mob|obj) - if(!(A.last_move)) return - if((istype(A, /mob/) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1))) - var/mob/M = A - if(M.Process_Spacemove(1)) - M.inertia_dir = 0 - return - spawn(5) - if((M && !(M.anchored) && (M.loc == src))) - if(M.inertia_dir) - step(M, M.inertia_dir) - return - M.inertia_dir = M.last_move - step(M, M.inertia_dir) - return - -/turf/proc/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(src.intact) - -// override for space turfs, since they should never hide anything -/turf/space/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(0) - -// Removes all signs of lattice on the pos of the turf -Donkieyo -/turf/proc/RemoveLattice() - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - del L - -/turf/proc/ReplaceWithFloor(explode=0) - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/W = new /turf/simulated/floor( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.set_dir(old_dir) - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "floor" - - if (!explode) - W.opacity = 1 - W.sd_SetOpacity(0) - //This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO - W.levelupdate() - return W - -/turf/proc/ReplaceWithPlating() - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/plating/W = new /turf/simulated/floor/plating( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.set_dir(old_dir) - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "plating" - W.opacity = 1 - W.sd_SetOpacity(0) - W.levelupdate() - return W - -/turf/proc/ReplaceWithEngineFloor() - var/old_dir = dir - - var/turf/simulated/floor/engine/E = new /turf/simulated/floor/engine( locate(src.x, src.y, src.z) ) - - E.set_dir(old_dir) - E.icon_state = "engine" - -/turf/simulated/Entered(atom/A, atom/OL) - if (istype(A,/mob/living/carbon)) - var/mob/living/carbon/M = A - if(M.lying) return - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes)) - if(H.m_intent == "run") - if(H.footstep >= 2) - H.footstep = 0 - else - H.footstep++ - if(H.footstep == 0) - playsound(src, "clownstep", 50, 1) // this will get annoying very fast. - else - playsound(src, "clownstep", 20, 1) - - switch (src.wet) - if(1) - if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes - if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - else if(!istype(M, /mob/living/carbon/slime)) - if (M.m_intent == "run") - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - - if(2) //lube - if(!istype(M, /mob/living/carbon/slime)) - M.stop_pulling() - step(M, M.dir) - spawn(1) step(M, M.dir) - spawn(2) step(M, M.dir) - spawn(3) step(M, M.dir) - spawn(4) step(M, M.dir) - M.take_organ_damage(2) // Was 5 -- TLE - M << "\blue You slipped on the floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Weaken(10) - - ..() - -/turf/proc/ReplaceWithSpace() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.set_dir(old_dir) - return S - -/turf/proc/ReplaceWithLattice() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.set_dir(old_dir) - new /obj/structure/lattice( locate(src.x, src.y, src.z) ) - return S - -/turf/proc/ReplaceWithWall() - var/old_icon = icon_state - var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/proc/ReplaceWithRWall() - var/old_icon = icon_state - var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/simulated/wall/New() - ..() - -/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) - if(istype(src,/turf/simulated/wall/r_wall)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder/reinforced(src) - new /obj/item/stack/sheet/plasteel( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/plasteel( src ) - else if(istype(src,/turf/simulated/wall/cult)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/effect/decal/remains/human(src) - else - new /obj/effect/decal/remains/human(src) - - else - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder(src) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - - ReplaceWithPlating(explode) - -/turf/simulated/wall/examine(mob/user) - user << "It looks like a regular wall." - return - -/turf/simulated/wall/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - src.ReplaceWithSpace() - del(src) - return - if(2.0) - if (prob(50)) - dismantle_wall(0,1) - else - dismantle_wall(1,1) - if(3.0) - var/proba - if (istype(src, /turf/simulated/wall/r_wall)) - proba = 15 - else - proba = 40 - if (prob(proba)) - dismantle_wall(0,1) - else - return - -/turf/simulated/wall/blob_act() - if(prob(50)) - dismantle_wall() - -/turf/simulated/wall/attack_paw(mob/user as mob) - if ((user.mutations & HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - return src.attack_hand(user) - - -/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob) - if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall)) - M << text("\blue This wall is far too strong for you to destroy.") - return - else - if (prob(40)) - M << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - M << text("\blue You smash against the wall.") - return - - M << "\blue You push the wall but nothing happens!" - return - -/turf/simulated/wall/attack_hand(mob/user as mob) - if ((user.mutations & HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - user << "\blue You push the wall but nothing happens!" - playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - return - -/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - var/turf/T = get_turf(user) - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (W:remove_fuel(0,user)) - W:welding = 2 - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - W:welding = 1 - else - user << "\blue You need more welding fuel to complete this task." - return - - else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - else - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced apart."), 2) - return - - else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue Now drilling through wall." - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2) - return - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/turf/T = user.loc - user << "\blue Now slicing through wall." - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - sleep(70) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2) - return - - else if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - else - return attack_hand(user) - return - - -/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if(!istype(src, /turf/simulated/wall/r_wall)) - return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl - - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - W:eyecheck(user) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - W:welding = 2 - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - W:welding = 1 - - else if (src.d_state == 5) - W:welding = 2 - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - W:welding = 1 - - else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - - else if (src.d_state == 5) - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(70) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - user << "\blue This wall is too thick to slice through. You will need to find a different path." - return - - else if (istype(W, /obj/item/weapon/wrench)) - if (src.d_state == 4) - var/turf/T = user.loc - user << "\blue Detaching support rods." - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 5 - user << "\blue You detach the support rods." - - else if (istype(W, /obj/item/weapon/wirecutters)) - if (src.d_state == 0) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - src.d_state = 1 - new /obj/item/stack/rods( src ) - - else if (istype(W, /obj/item/weapon/screwdriver)) - if (src.d_state == 1) - var/turf/T = user.loc - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) - user << "\blue Removing support lines." - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 2 - user << "\blue You removed the support lines." - - else if (istype(W, /obj/item/weapon/crowbar)) - - if (src.d_state == 3) - var/turf/T = user.loc - user << "\blue Prying cover off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 4 - user << "\blue You removed the cover." - - else if (src.d_state == 6) - var/turf/T = user.loc - user << "\blue Prying outer sheath off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue You removed the outer sheath." - dismantle_wall() - return - - else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue You begin to drill though, this will take some time." - sleep(200) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue Your drill tears though the reinforced plating." - dismantle_wall() - return - - else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state)) - var/turf/T = user.loc - user << "\blue Repairing wall." - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 0 - src.icon_state = initial(src.icon_state) - user << "\blue You repaired the wall." - if (W:amount > 1) - W:amount-- - else - del(W) - - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - return - - if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - return - - if(src.d_state > 0) - src.icon_state = "r_wall-[d_state]" - - else - return attack_hand(user) - return - -/turf/simulated/wall/meteorhit(obj/M as obj) - if (prob(15)) - dismantle_wall() - else if(prob(70)) - ReplaceWithPlating() - else - ReplaceWithLattice() - return 0 - - -//This is so damaged or burnt tiles or platings don't get remembered as the default tile -var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4", - "damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", - "platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2", - "light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken", - "light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4", - "asteroid","asteroid_dug", - "asteroid0","asteroid1","asteroid2","asteroid3","asteroid4", - "asteroid5","asteroid6","asteroid7","asteroid8", - "burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b") - -var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug") - -/turf/simulated/floor - - //Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not. - //Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage - name = "floor" - icon = 'icons/turf/floors.dmi' - icon_state = "floor" - var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default - var/icon_plating = "plating" - thermal_conductivity = 0.040 - heat_capacity = 10000 - var/broken = 0 - var/burnt = 0 - var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel - - airless - icon_state = "floor" - name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "floor" - - light - name = "Light floor" - luminosity = 5 - icon_state = "light_on" - floor_tile = new/obj/item/stack/tile/light - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - var/n = name //just in case commands rename it in the ..() call - ..() - spawn(4) - update_icon() - name = n - - grass - name = "Grass patch" - icon_state = "grass1" - floor_tile = new/obj/item/stack/tile/grass - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - icon_state = "grass[pick("1","2","3","4")]" - ..() - spawn(4) - update_icon() - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - -/turf/simulated/floor/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/wall/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/floor/engine - name = "reinforced floor" - icon_state = "engine" - thermal_conductivity = 0.025 - heat_capacity = 325000 - -/turf/simulated/floor/engine/cult - name = "engraved floor" - icon_state = "cult" - - -/turf/simulated/floor/engine/n20 - New() - ..() - var/datum/gas_mixture/adding = new - var/datum/gas/sleeping_agent/trace_gas = new - - trace_gas.moles = 2000 - adding.trace_gases += trace_gas - adding.temperature = T20C - - assume_air(adding) - -/turf/simulated/floor/engine/vacuum - name = "vacuum floor" - icon_state = "engine" - oxygen = 0 - nitrogen = 0.001 - temperature = TCMB - -/turf/simulated/floor/plating - name = "plating" - icon_state = "plating" - floor_tile = null - intact = 0 - -/turf/simulated/floor/plating/airless - icon_state = "plating" - name = "airless plating" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "plating" - -/turf/simulated/floor/grid - icon = 'icons/turf/floors.dmi' - icon_state = "circuit" - -/turf/simulated/floor/New() - ..() - if(icon_state in icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default - icon_regular_floor = "floor" - else - icon_regular_floor = icon_state - -//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) -// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt))) -// if (!( locate(/obj/machinery/mass_driver, src) )) -// return 0 -// return ..() - -/turf/simulated/floor/ex_act(severity) - //set src in oview(1) - switch(severity) - if(1.0) - src.ReplaceWithSpace() - if(2.0) - switch(pick(1,2;75,3)) - if (1) - src.ReplaceWithLattice() - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(2) - src.ReplaceWithSpace() - if(3) - if(prob(80)) - src.break_tile_to_plating() - else - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(3.0) - if (prob(50)) - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - return - -/turf/simulated/floor/blob_act() - return - -turf/simulated/floor/proc/update_icon() - if(is_plasteel_floor()) - if(!broken && !burnt) - icon_state = icon_regular_floor - if(is_plating()) - if(!broken && !burnt) - icon_state = icon_plating //Because asteroids are 'platings' too. - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.on) - switch(T.state) - if(0) - icon_state = "light_on" - sd_SetLuminosity(5) - if(1) - var/num = pick("1","2","3","4") - icon_state = "light_on_flicker[num]" - sd_SetLuminosity(5) - if(2) - icon_state = "light_on_broken" - sd_SetLuminosity(5) - if(3) - icon_state = "light_off" - sd_SetLuminosity(0) - else - sd_SetLuminosity(0) - icon_state = "light_off" - if(is_grass_floor()) - if(!broken && !burnt) - if(!(icon_state in list("grass1","grass2","grass3","grass4"))) - icon_state = "grass[pick("1","2","3","4")]" - spawn(1) - if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through. - if(air) - update_visuals(air) - -turf/simulated/floor/return_siding_icon_state() - ..() - if(is_grass_floor()) - var/dir_sum = 0 - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) - if(!(T.is_grass_floor())) - dir_sum += direction - if(dir_sum) - return "wood_siding[dir_sum]" - else - return 0 - - -/turf/simulated/floor/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/simulated/floor/attack_hand(mob/user as mob) - if (is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - T.on = !T.on - update_icon() - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob) - if(!C) - return - if(!user) - return - if(istype(C, /obj/item/weapon/wrench)) - user << "\blue Removing rods..." - playsound(src.loc, 'sound/items/Ratchet.ogg', 80, 1) - if(do_after(user, 30)) - new /obj/item/stack/rods(src, 2) - ReplaceWithFloor() - var/turf/simulated/floor/F = src - F.make_plating() - return - -/turf/simulated/floor/proc/gets_drilled() - return - -/turf/simulated/floor/proc/break_tile_to_plating() - if(!is_plating()) - make_plating() - break_tile() - -/turf/simulated/floor/is_plasteel_floor() - if(istype(floor_tile,/obj/item/stack/tile/plasteel)) - return 1 - else - return 0 - -/turf/simulated/floor/is_light_floor() - if(istype(floor_tile,/obj/item/stack/tile/light)) - return 1 - else - return 0 - -/turf/simulated/floor/is_grass_floor() - if(istype(floor_tile,/obj/item/stack/tile/grass)) - return 1 - else - return 0 - -/turf/simulated/floor/is_plating() - if(!floor_tile) - return 1 - return 0 - -/turf/simulated/floor/proc/break_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor)) - src.ReplaceWithPlating() - if(broken) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - broken = 1 - else if(is_plasteel_floor()) - src.icon_state = "light_broken" - broken = 1 - else if(is_plating()) - src.icon_state = "platingdmg[pick(1,2,3)]" - broken = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - broken = 1 - -/turf/simulated/floor/proc/burn_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(broken || burnt) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - burnt = 1 - else if(is_plasteel_floor()) - src.icon_state = "floorscorched[pick(1,2)]" - burnt = 1 - else if(is_plating()) - src.icon_state = "panelscorched" - burnt = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - burnt = 1 - -//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf -//This proc auto corrects the grass tiles' siding. -/turf/simulated/floor/proc/make_plating() - if(istype(src,/turf/simulated/floor/engine)) return - - if(is_grass_floor()) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - - if(!floor_tile) return - del(floor_tile) - icon_plating = "plating" - sd_SetLuminosity(0) - floor_tile = null - intact = 0 - broken = 0 - burnt = 0 - - update_icon() - levelupdate() - -//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null) - broken = 0 - burnt = 0 - intact = 1 - sd_SetLuminosity(0) - if(T) - if(istype(T,/obj/item/stack/tile/plasteel)) - floor_tile = T - if (icon_regular_floor) - icon_state = icon_regular_floor - else - icon_state = "floor" - icon_regular_floor = icon_state - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/plasteel - icon_state = "floor" - icon_regular_floor = icon_state - - update_icon() - levelupdate() - -//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_light_floor(var/obj/item/stack/tile/light/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/light)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/light - - update_icon() - levelupdate() - -//This proc will make a turf into a grass patch. Fun eh? Insert the grass tile to be used as the argument -//If no argument is given a new one will be made. -/turf/simulated/floor/proc/make_grass_floor(var/obj/item/stack/tile/grass/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/grass)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/grass - - update_icon() - levelupdate() - -/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob) - - if(!C || !user) - return 0 - - if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.state) - user.u_equip(C) - del(C) - T.state = C //fixing it by bashing it with a light bulb, fun eh? - update_icon() - user << "\blue You replace the light bulb." - else - user << "\blue The lightbulb seems fine, no need to replace it." - - if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating()))) - if(broken || burnt) - user << "\red You remove the broken plating." - else - user << "\red You remove the [floor_tile.name]." - new floor_tile.type(src) - - make_plating() - playsound(src.loc, 'sound/items/Crowbar.ogg', 80, 1) - - return - - if(istype(C, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = C - if (is_plating()) - if (R.amount >= 2) - user << "\blue Reinforcing the floor..." - if(do_after(user, 30) && R && R.amount >= 2 && is_plating()) - ReplaceWithEngineFloor() - playsound(src.loc, 'sound/items/Deconstruct.ogg', 80, 1) - R.use(2) - return - else - user << "\red You need more rods." - else - user << "\red You must remove the plating first." - return - - if(istype(C, /obj/item/stack/tile)) - if(is_plating()) - if(!broken && !burnt) - var/obj/item/stack/tile/T = C - floor_tile = new T.type - intact = 1 - if(istype(T,/obj/item/stack/tile/light)) - var/obj/item/stack/tile/light/L = T - var/obj/item/stack/tile/light/F = floor_tile - F.state = L.state - F.on = L.on - if(istype(T,/obj/item/stack/tile/grass)) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding gets updated properly - T.use(1) - update_icon() - levelupdate() - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - else - user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage." - - - if(istype(C, /obj/item/stack/cable_coil)) - if(is_plating()) - var/obj/item/stack/cable_coil/coil = C - coil.turf_place(src, user) - else - user << "\red You must remove the plating first." - - if(istype(C, /obj/item/weapon/shovel)) - if(is_grass_floor()) - new /obj/item/weapon/ore/glass(src) - new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass - user << "\blue You shovel the grass." - make_plating() - else - user << "\red You cannot shovel this." - - if(istype(C, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/welder = C - if(welder.welding && (is_plating())) - if(broken || burnt) - if(welder.remove_fuel(0,user)) - user << "\red You fix some dents on the broken plating." - playsound(src.loc, 'sound/items/Welder.ogg', 80, 1) - icon_state = "plating" - burnt = 0 - broken = 0 - else - user << "\blue You need more welding fuel to complete this task." - -/turf/unsimulated/floor/attack_paw(user as mob) - return src.attack_hand(user) - -/turf/unsimulated/floor/attack_hand(var/mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -// imported from space.dm - -/turf/space/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/space/attack_hand(mob/user as mob) - if ((user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/space/attackby(obj/item/C as obj, mob/user as mob) - - if (istype(C, /obj/item/stack/rods)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - return - var/obj/item/stack/rods/R = C - user << "\blue Constructing support lattice ..." - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - ReplaceWithLattice() - R.use(1) - return - - if (istype(C, /obj/item/stack/tile/plasteel)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - var/obj/item/stack/tile/plasteel/S = C - del(L) - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - S.build(src) - S.use(1) - return - else - user << "\red The plating is going to need some support." - return - - -// Ported from unstable r355 - -/turf/space/Entered(atom/movable/A as mob|obj) - ..() - if ((!(A) || src != A.loc || istype(null, /obj/effect/beam))) return - - inertial_drift(A) - - if(ticker && ticker.mode) - - // Okay, so let's make it so that people can travel z levels but not nuke disks! - // if(ticker.mode.name == "nuclear emergency") return - - if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") - Sandbox_Spacemove(A) - - else - if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1)) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level. - return - - if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear))) - if(istype(A, /mob/living)) - var/mob/living/MM = A - if(MM.client) - MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is." - return - - - - var/move_to_z_str = pickweight(accessable_z_levels) - - var/move_to_z = text2num(move_to_z_str) - - if(!move_to_z) - return - - - - A.z = move_to_z - - - if(src.x <= 2) - A.x = world.maxx - 2 - - else if (A.x >= (world.maxx - 1)) - A.x = 3 - - else if (src.y <= 2) - A.y = world.maxy - 2 - - else if (A.y >= (world.maxy - 1)) - A.y = 3 - - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - -// if(istype(A, /obj/structure/closet/coffin)) -// coffinhandler.Add(A) - -/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj) - var/cur_x - var/cur_y - var/next_x - var/next_y - var/target_z - var/list/y_arr - - if(src.x <= 1) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (--cur_x||global_map.len) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = world.maxx - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.x >= world.maxx) - if(istype(A, /obj/effect/meteor)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (++cur_x > global_map.len ? 1 : cur_x) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.y <= 1) - if(istype(A, /obj/effect/meteor)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (--cur_y||y_arr.len) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = world.maxy - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - - else if (src.y >= world.maxy) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (++cur_y > y_arr.len ? 1 : cur_y) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - return - -/obj/effect/vaultspawner - var/maxX = 6 - var/maxY = 6 - var/minX = 2 - var/minY = 2 - -/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null) - if(!type) - type = pick("sandstone","rock","alien") - - var/lowBoundX = location.x - var/lowBoundY = location.y - - var/hiBoundX = location.x + rand(lX,uX) - var/hiBoundY = location.y + rand(lY,uY) - - var/z = location.z - - for(var/i = lowBoundX,i<=hiBoundX,i++) - for(var/j = lowBoundY,j<=hiBoundY,j++) - if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY) - new /turf/simulated/wall/vault(locate(i,j,z),type) - else - new /turf/simulated/floor/vault(locate(i,j,z),type) - - del(src) - -/turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N -//Useful to batch-add creatures to the list. - for(var/mob/living/M in src) - if(M==U) continue//Will not harm U. Since null != M, can be excluded to kill everyone. - spawn(0) - M.gib() - for(var/obj/mecha/M in src)//Mecha are not gibbed but are damaged. - spawn(0) - M.take_damage(100, "brute") - for(var/obj/effect/critter/M in src) - spawn(0) - M.Die() - -/turf/proc/Bless() - if(flags & NOJAUNT) - return - flags |= NOJAUNT - overlays += image('icons/effects/water.dmi',src,"holywater")*/ \ No newline at end of file diff --git a/code/unused/BrokenInhands.dm b/code/unused/BrokenInhands.dm deleted file mode 100644 index 6339d3c0113..00000000000 --- a/code/unused/BrokenInhands.dm +++ /dev/null @@ -1,36 +0,0 @@ -/proc/getbrokeninhands() - var/icon/IL = new('icons/mob/items_lefthand.dmi') - var/list/Lstates = IL.IconStates() - var/icon/IR = new('icons/mob/items_righthand.dmi') - var/list/Rstates = IR.IconStates() - - - var/text - for(var/A in typesof(/obj/item)) - var/obj/item/O = new A( locate(1,1,1) ) - if(!O) continue - var/icon/J = new(O.icon) - var/list/istates = J.IconStates() - if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n" - if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n" - - - if(O.icon_state) - if(!istates.Find(O.icon_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n" - if(O.item_state) - if(!istates.Find(O.item_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n" - text+="\n" - del(O) - if(text) - var/F = file("broken_icons.txt") - fdel(F) - F << text - world << "Completely successfully and written to [F]" - - diff --git a/code/unused/Ultralight.dm b/code/unused/Ultralight.dm deleted file mode 100644 index 783726de915..00000000000 --- a/code/unused/Ultralight.dm +++ /dev/null @@ -1,341 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -//UltraLight system, by Sukasa - - const/ar/UL_LUMINOSITY = 0 - const/ar/UL_SQUARELIGHT = 0 - - const/ar/UL_RGB = 1 - const/ar/UL_ROUNDLIGHT = 2 - - const/ar/UL_I_FALLOFF_SQUARE = 0 - const/ar/UL_I_FALLOFF_ROUND = 1 - - const/ar/UL_I_LUMINOSITY = 0 - const/ar/UL_I_RGB = 1 - - const/ar/UL_I_LIT = 0 - const/ar/UL_I_EXTINGUISHED = 1 - const/ar/UL_I_ONZERO = 2 - - ul_LightingEnabled = 1 - ul_LightingResolution = 1 - ul_Steps = 7 - ul_LightingModel = UL_I_RGB - ul_FalloffStyle = UL_I_FALLOFF_ROUND - ul_TopLuminosity = 0 - ul_Layer = 10 - ul_SuppressLightLevelChanges = 0 - - list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7) - - -proc - ul_Clamp(var/Value) - return min(max(Value, 0), ul_Steps) - -atom - var/LuminosityRed = 0 - var/LuminosityGreen = 0 - var/LuminosityBlue = 0 - - var/ul_Extinguished = UL_I_ONZERO - - proc - sd_SetLuminosity(var/Red, var/Green = Red, var/Blue = Red) - - if(LuminosityRed == Red && LuminosityGreen == Green && LuminosityBlue == Blue) - return //No point doing all that work if it won't have any effect anyways... - - if (ul_Extinguished == UL_I_EXTINGUISHED) - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - return - - if (ul_IsLuminous()) - ul_Extinguish() - - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - ul_Extinguished = UL_I_ONZERO - - if (ul_IsLuminous()) - ul_Illuminate() - - return - - ul_Illuminate() - if (ul_Extinguished == UL_I_LIT) - return - - ul_Extinguished = UL_I_LIT - - ul_UpdateTopLuminosity() - luminosity = ul_Luminosity() - - for(var/turf/Affected in view(ul_Luminosity(), src)) - var/Falloff = src.ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed += max(DeltaRed, 0) - Affected.LightLevelGreen += max(DeltaGreen, 0) - Affected.LightLevelBlue += max(DeltaBlue, 0) - - Affected.MaxRed += LuminosityRed - Affected.MaxGreen += LuminosityGreen - Affected.MaxBlue += LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - return - - ul_Extinguish() - - if (ul_Extinguished != UL_I_LIT) - return - - ul_Extinguished = UL_I_EXTINGUISHED - - for(var/turf/Affected in view(ul_Luminosity(), src)) - - var/Falloff = ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed -= max(DeltaRed, 0) - Affected.LightLevelGreen -= max(DeltaGreen, 0) - Affected.LightLevelBlue -= max(DeltaBlue, 0) - - Affected.MaxRed -= LuminosityRed - Affected.MaxGreen -= LuminosityGreen - Affected.MaxBlue -= LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - - luminosity = 0 - - return - - ul_FalloffAmount(var/atom/ref) - if (ul_FalloffStyle == UL_I_FALLOFF_ROUND) - var/x = (ref.x - src.x) - var/y = (ref.y - src.y) - if ((x*x + y*y) > ul_FastRoot.len) - for(var/i = ul_FastRoot.len, i <= x*x+y*y, i++) - ul_FastRoot += round(sqrt(x*x+y*y)) - return round(ul_LightingResolution * ul_FastRoot[x*x + y*y + 1], 1) - - else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE) - return get_dist(src, ref) - - return 0 - - ul_SetOpacity(var/NewOpacity) - if(opacity != NewOpacity) - - var/list/Blanked = ul_BlankLocal() - var/atom/T = src - while(T && !isturf(T)) - T = T.loc - - opacity = NewOpacity - - if(T) - T:LightLevelRed = 0 - T:LightLevelGreen = 0 - T:LightLevelBlue = 0 - - ul_UnblankLocal(Blanked) - - return - - ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src)) - for(var/atom/Light in ReApply) - if(Light.ul_IsLuminous()) - Light.ul_Illuminate() - - return - - ul_BlankLocal() - var/list/Blanked = list( ) - var/TurfAdjust = isturf(src) ? 1 : 0 - - for(var/atom/Affected in view(ul_TopLuminosity, src)) - if(Affected.ul_IsLuminous() && Affected.ul_Extinguished == UL_I_LIT && (ul_FalloffAmount(Affected) <= Affected.luminosity + TurfAdjust)) - Affected.ul_Extinguish() - Blanked += Affected - - return Blanked - - ul_UpdateTopLuminosity() - - if (ul_TopLuminosity < LuminosityRed) - ul_TopLuminosity = LuminosityRed - - if (ul_TopLuminosity < LuminosityGreen) - ul_TopLuminosity = LuminosityGreen - - if (ul_TopLuminosity < LuminosityBlue) - ul_TopLuminosity = LuminosityBlue - - return - - ul_Luminosity() - return max(LuminosityRed, LuminosityGreen, LuminosityBlue) - - ul_IsLuminous(var/Red = LuminosityRed, var/Green = LuminosityGreen, var/Blue = LuminosityBlue) - return (Red > 0 || Green > 0 || Blue > 0) - - ul_LightLevelChanged() - //Designed for client projects to use. Called on items when the turf they are in has its light level changed - return - - New() - ..() - if(ul_IsLuminous()) - spawn(1) - ul_Illuminate() - return - - Del() - if(ul_IsLuminous()) - ul_Extinguish() - - ..() - - return - - movable - Move() - ul_Extinguish() - ..() - ul_Illuminate() - return - -turf - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - var/list/MaxRed = list( ) - var/list/MaxGreen = list( ) - var/list/MaxBlue = list( ) - - proc - - ul_GetRed() - return ul_Clamp(min(LightLevelRed, max(MaxRed))) - ul_GetGreen() - return ul_Clamp(min(LightLevelGreen, max(MaxGreen))) - ul_GetBlue() - return ul_Clamp(min(LightLevelBlue, max(MaxBlue))) - - ul_UpdateLight() - - var/area/CurrentArea = loc - - if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting) - return - - var/LightingTag = copytext(CurrentArea.tag, 1, findtext(CurrentArea.tag, ":UL")) + ":UL[ul_GetRed()]_[ul_GetGreen()]_[ul_GetBlue()]" - - if(CurrentArea.tag != LightingTag) - var/area/NewArea = locate(LightingTag) - - if(!NewArea) - NewArea = new CurrentArea.type() - NewArea.tag = LightingTag - - for(var/V in CurrentArea.vars - "contents") - if(issaved(CurrentArea.vars[V])) - NewArea.vars[V] = CurrentArea.vars[V] - - NewArea.tag = LightingTag - - NewArea.ul_Light(ul_GetRed(), ul_GetGreen(), ul_GetBlue()) - - - NewArea.contents += src - - return - - ul_Recalculate() - - ul_SuppressLightLevelChanges++ - - var/list/Lights = ul_BlankLocal() - - LightLevelRed = 0 - LightLevelGreen = 0 - LightLevelBlue = 0 - - ul_UnblankLocal(Lights) - - ul_SuppressLightLevelChanges-- - - return - -area - var/ul_Overlay = null - var/ul_Lighting = 1 - - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - proc - ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue) - - if(!src || !src.ul_Lighting) - return - - overlays -= ul_Overlay - - LightLevelRed = Red - LightLevelGreen = Green - LightLevelBlue = Blue - - luminosity = ul_IsLuminous(LightLevelRed, LightLevelGreen, LightLevelBlue) - - ul_Overlay = image('icons/effects/ULIcons.dmi', , num2text(LightLevelRed) + "-" + num2text(LightLevelGreen) + "-" + num2text(LightLevelBlue), ul_Layer) - - overlays += ul_Overlay - - return - - ul_Prep() - - if(!tag) - tag = "[type]" - if(ul_Lighting) - if(!findtext(tag,":UL")) - ul_Light() - //world.log << tag - - return diff --git a/code/unused/Virus2Prob.dm b/code/unused/Virus2Prob.dm deleted file mode 100644 index bf9868041dd..00000000000 --- a/code/unused/Virus2Prob.dm +++ /dev/null @@ -1,12 +0,0 @@ -var/list/prob_G_list = list() - -/proc/probG(var/define,var/everyother) - if(prob_G_list["[define]"]) - prob_G_list["[define]"] += 1 - if(prob_G_list["[define]"] == everyother) - prob_G_list["[define]"] = 0 - return 1 - else - (prob_G_list["[define]"]) = 0 - (prob_G_list["[define]"]) = rand(1,everyother-1) - return 0 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm deleted file mode 100644 index fb4a994f28a..00000000000 --- a/code/unused/_debug.dm +++ /dev/null @@ -1,619 +0,0 @@ -// NOTE WELL! -// Only include this file when debugging locally -// Do not include in release versions - - -#define VARSICON 1 -#define SDEBUG 1 - -/client/verb/Debug() - set category = "Debug" - set name = "Debug-Debug" - if(src.holder.rank == "Game Admin") - Debug = !Debug - - world << "Debugging [Debug ? "On" : "Off"]" - else - alert("Coders only baby") - return - -/turf/verb/Flow() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/obj/move/OM = locate(/obj/move/, T) - - if(OM) - - if(! OM.updatecell) - O.icon_state = "x2" - else - O.icon_state = "blank" -/* -Doing this because FindTurfs() isn't even used - for(var/atom/U in OM.FindTurfs() ) - var/dirn = get_dir(OM, U) - if(dirn == 1) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==1?"up":"fup") - else if(dirn == 2) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==2?"dn":"fdn") - else if(dirn == 4) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==4?"rt":"frt") - else if(dirn == 8) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==8?"lf":"flf") -*/ - else - - if(!(T.updatecell)) - O.icon_state = "x2" - else - O.icon_state = "blank" - - if(T.airN) - O.overlays += image('icons/misc/mark.dmi', T.airdir==1?"up":"fup") - - if(T.airS) - O.overlays += image('icons/misc/mark.dmi', T.airdir==2?"dn":"fdn") - - if(T.airW) - O.overlays += image('icons/misc/mark.dmi', T.airdir==8?"lf":"flf") - - if(T.airE) - O.overlays += image('icons/misc/mark.dmi', T.airdir==4?"rt":"frt") - - - if(T.condN) - O.overlays += image('icons/misc/mark.dmi', T.condN == 1?"yup":"rup") - - if(T.condS) - O.overlays += image('icons/misc/mark.dmi', T.condS == 1?"ydn":"rdn") - - if(T.condE) - O.overlays += image('icons/misc/mark.dmi', T.condE == 1?"yrt":"rrt") - - if(T.condW) - O.overlays += image('icons/misc/mark.dmi', T.condW == 1?"ylf":"rlf") - else - alert("Debugging off") - return - -/turf/verb/Clear() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/obj/effect/mark/O in world) - del(O) - else - alert("Debugging off") - return - -/proc/numbericon(var/tn as text,var/s = 0) - if(Debug) - var/image/I = image('icons/misc/mark.dmi', "blank") - - if(lentext(tn)>8) - tn = "*" - - var/len = lentext(tn) - - for(var/d = 1 to lentext(tn)) - - - var/char = copytext(tn, len-d+1, len-d+2) - - if(char == " ") - continue - - var/image/ID = image('icons/misc/mark.dmi', char) - - ID.pixel_x = -(d-1)*4 - ID.pixel_y = s - //if(d>1) I.Shift(WEST, (d-1)*8) - - I.overlays += ID - - - - return I - else - alert("Debugging off") - return - -/*/turf/verb/Stats() - set category = "Debug" - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/temp = round(T.temp-T0C, 0.1) - - O.overlays += numbericon("[temp]C") - - var/pres = round(T.tot_gas() / CELLSTANDARD * 100, 0.1) - - O.overlays += numbericon("[pres]", -8) - O.mark = "[temp]/[pres]" -*/ -/* -/turf/verb/Pipes() - set category = "Debug" - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - for(var/obj/machinery/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - if(M && M.p_dir) - - //world << "Accepted" - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - if(istype(M, /obj/machinery/pipes)) - var/obj/machinery/pipes/P = M - O.overlays += numbericon("[P.plnum] ", -20) - M = P.pl - - - var/obj/substance/gas/G = M.get_gas() - - if(G) - - var/cap = round( 100*(G.tot_gas()/ M.capmult / 6e6), 0.1) - var/temp = round(G.temperature - T0C, 0.1) - O.overlays += numbericon("[temp]C", 0) - O.overlays += numbericon("[cap]", -8) - - break -*/ -/turf/verb/Cables() - set category = "Debug" - if(Debug) - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/marked = 0 - for(var/obj/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - - if(M && istype(M, /obj/structure/cable/)) - - - var/obj/structure/cable/C = M - //world << "Accepted" - - O.overlays += numbericon("[C.netnum] " , marked) - - marked -= 8 - - else if(M && istype(M, /obj/machinery/power/)) - - var/obj/machinery/power/P = M - O.overlays += numbericon("*[P.netnum] " , marked) - marked -= 8 - - if(!marked) - del(O) - else - alert("Debugging off") - return - - -/turf/verb/Solar() - set category = "Debug" - if(Debug) - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/obj/machinery/power/solar/S - - S = locate(/obj/machinery/power/solar, T) - - if(S) - - O.overlays += numbericon("[S.obscured] " , 0) - O.overlays += numbericon("[round(S.sunfrac*100,0.1)] " , -12) - - else - del(O) - else - alert("Debugging off") - return - - -/mob/verb/Showports() - set category = "Debug" - if(Debug) - var/turf/T - var/obj/machinery/pipes/P - var/list/ndirs - - for(var/obj/machinery/pipeline/PL in plines) - - var/num = plines.Find(PL) - - P = PL.nodes[1] // 1st node in list - ndirs = P.get_node_dirs() - - T = get_step(P, ndirs[1]) - - var/obj/effect/mark/O = new(T) - - O.overlays += numbericon("[num] * 1 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]",-16) - - - P = PL.nodes[PL.nodes.len] // last node in list - - ndirs = P.get_node_dirs() - T = get_step(P, ndirs[2]) - - O = new(T) - - O.overlays += numbericon("[num] * 2 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]", -16) - else - alert("Debugging off") - return - -/atom/verb/delete() - set category = "Debug" - set src in view() - if(Debug) - del(src) - else - alert("Debugging off") - return - - -/area/verb/dark() - set category = "Debug" - if(Debug) - if(src.icon_state == "dark") - icon_state = null - else - icon_state = "dark" - else - alert("Debugging off") - return - -/area/verb/power() - set category = "Debug" - if(Debug) - power_equip = !power_equip - power_environ = !power_environ - - world << "Power ([src]) = [power_equip]" - - power_change() - else - alert("Debugging off") - return - -// *****RM - -// ***** - - -/mob/verb/ShowPlasma() - set category = "Debug" - if(Debug) - Plasma() - else - alert("Debugging off") - return - -/mob/verb/Blobcount() - set category = "Debug" - if(Debug) - world << "Blob count: [blobs.len]" - else - alert("Debugging off") - return - - -/mob/verb/Blobkill() - set category = "Debug" - if(Debug) - blobs = list() - world << "Blob killed." - else - alert("Debugging off") - return - -/mob/verb/Blobmode() - set category = "Debug" - if(Debug) - world << "Event=[ticker.event]" - world << "Time =[(ticker.event_time - world.realtime)/10]s" - else - alert("Debugging off") - return - -/mob/verb/Blobnext() - set category = "Debug" - if(Debug) - ticker.event_time = world.realtime - else - alert("Debugging off") - return - - -/mob/verb/callshuttle() - set category = "Debug" - if(Debug) - ticker.timeleft = 300 - ticker.timing = 1 - else - alert("Debugging off") - return - -/mob/verb/apcs() - set category = "Debug" - if(Debug) - for(var/obj/machinery/power/apc/APC in world) - world << APC.report() - else - alert("Debugging off") - return - -/mob/verb/Globals() - set category = "Debug" - if(Debug) - debugobj = new() - - debugobj.debuglist = list( powernets, plines, vote, config, admins, ticker, SS13_airtunnel, sun ) - - - world << "Debug" - else - alert("Debugging off") - return - /*for(var/obj/O in plines) - - world << "[O.name]" - */ - - - - -/mob/verb/Mach() - set category = "Debug" - if(Debug) - var/n = 0 - for(var/obj/machinery/M in world) - n++ - if(! (M in machines) ) - world << "[M] [M.type]: not in list" - - world << "in world: [n]; in list:[machines.len]" - else - alert("Debugging off") - return - - -/*/mob/verb/air() - set category = "Debug" - - Air() - -/proc/Air() - - - var/area/A = locate(/area/airintake) - - var/atot = 0 - for(var/turf/T in A) - atot += T.tot_gas() - - var/ptot = 0 - for(var/obj/machinery/pipeline/PL in plines) - if(PL.suffix == "d") - ptot += PL.ngas.tot_gas() - - var/vtot = 0 - for(var/obj/machinery/atmoalter/V in machines) - if(V.suffix == "d") - vtot += V.gas.tot_gas() - - var/ctot = 0 - for(var/obj/machinery/connector/C in machines) - if(C.suffix == "d") - ctot += C.ngas.tot_gas() - - - var/tot = atot + ptot + vtot + ctot - - diary << "A=[num2text(atot,10)] P=[num2text(ptot,10)] V=[num2text(vtot,10)] C=[num2text(ctot,10)] : Total=[num2text(tot,10)]" -*/ -/mob/verb/Revive() - set category = "Debug" - if(Debug) - adjustFireLoss(0 - getBruteLoss()) - setToxLoss(0) - adjustBruteLoss(0 - getBruteLoss()) - setOxyLoss(0) - paralysis = 0 - stunned = 0 - weakened = 0 - health = 100 - if(stat > 1) stat=0 - disabilities = initial(disabilities) - sdisabilities = initial(sdisabilities) - for(var/datum/organ/external/e in src) - e.brute_dam = 0.0 - e.burn_dam = 0.0 - e.bandaged = 0.0 - e.wound_size = 0.0 - e.max_damage = initial(e.max_damage) - e.broken = 0 - e.destroyed = 0 - e.perma_injury = 0 - e.update_icon() - if(src.type == /mob/living/carbon/human) - var/mob/living/carbon/human/H = src - H.update_body() - H.UpdateDamageIcon() - else - alert("Debugging off") - return - -/mob/verb/Smoke() - set category = "Debug" - if(Debug) - var/obj/effect/smoke/O = new /obj/effect/smoke( src.loc ) - O.set_dir(pick(NORTH, SOUTH, EAST, WEST)) - spawn( 0 ) - O.Life() - else - alert("Debugging off") - return - -/mob/verb/revent(number as num) - set category = "Debug" - set name = "Change event %" - if(!src.holder) - src << "Only administrators may use this command." - return - if(src.holder) - eventchance = number - log_admin("[src.key] set the random event chance to [eventchance]%") - message_admins("[src.key] set the random event chance to [eventchance]%") - -/* Does nothing but blow up the station. -/mob/verb/funbutton() - set category = "Admin" - set name = "Random Expl.(REMOVE ME)" - if(!src.holder) - src << "Only administrators may use this command." - return - for(var/turf/T in world) - if(prob(4) && T.z in station_levels && istype(T,/turf/station/floor)) - spawn(50+rand(0,3000)) - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - pt.gas.temperature = 400+T0C - pt.ignite() - for(var/turf/P in view(3, T)) - if (P.poison) - P.poison = 0 - P.oldpoison = 0 - P.tmppoison = 0 - P.oxygen = 755985 - P.oldoxy = 755985 - P.tmpoxy = 755985 - usr << "\blue Blowing up station ..." - world << "[usr.key] has used boom boom boom shake the room" -*/ - -/mob/verb/removeplasma() - set category = "Debug" - set name = "Stabilize Atmos." - if(!src.holder) - src << "Only administrators may use this command." - return - spawn(0) - for(var/turf/T in view()) - T.poison = 0 - T.oldpoison = 0 - T.tmppoison = 0 - T.oxygen = 755985 - T.oldoxy = 755985 - T.tmpoxy = 755985 - T.co2 = 14.8176 - T.oldco2 = 14.8176 - T.tmpco2 = 14.8176 - T.n2 = 2.844e+006 - T.on2 = 2.844e+006 - T.tn2 = 2.844e+006 - T.tsl_gas = 0 - T.osl_gas = 0 - T.sl_gas = 0 - T.temp = 293.15 - T.otemp = 293.15 - T.ttemp = 293.15 - -/mob/verb/fire(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create Fire" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created fire" - spawn(0) - T.poison += 30000000 - T.firelevel = T.poison - -/mob/verb/co2(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create CO2" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created CO2" - spawn(0) - T.co2 += 300000000 - -/mob/verb/n2o(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create N2O" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created N2O" - spawn(0) - T.sl_gas += 30000000 - -/mob/verb/explosion(T as obj|mob|turf in world) - set category = "Special Verbs" - set name = "Create Explosion" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created an explosion" - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - playsound(pt.loc, "explosion", 100, 1,3) - playsound(pt.loc, 'sound/effects/explosionfar.ogg', 100, 1,10) - pt.gas.temperature = 500+T0C - pt.ignite() - - diff --git a/code/unused/ai_lockdown.dm b/code/unused/ai_lockdown.dm deleted file mode 100644 index 552ae977f35..00000000000 --- a/code/unused/ai_lockdown.dm +++ /dev/null @@ -1,60 +0,0 @@ -/mob/living/silicon/ai/proc/lockdown() - set category = "AI Commands" - set name = "Lockdown" - - if(usr.stat == 2) - usr <<"You cannot initiate lockdown because you are dead!" - return - - src << "Initiating lockdowns has been disabled due to system stress." -// Commented this out to disable Lockdowns -- TLE -/* world << "\red Lockdown initiated by [usr.name]!" - - for(var/obj/machinery/firealarm/FA in world) //activate firealarms - spawn( 0 ) - if(FA.lockdownbyai == 0) - FA.lockdownbyai = 1 - FA.alarm() - for(var/obj/machinery/door/airlock/AL in world) //close airlocks - spawn( 0 ) - if(AL.canAIControl() && AL.icon_state == "door0" && AL.lockdownbyai == 0) - AL.close() - AL.lockdownbyai = 1 - - var/obj/machinery/computer/communications/C = locate() in world - if(C) - C.post_status("alert", "lockdown") -*/ - -/* src.verbs -= /mob/living/silicon/ai/proc/lockdown - src.verbs += /mob/living/silicon/ai/proc/disablelockdown - usr << "\red Disable lockdown command enabled!" - winshow(usr,"rpane",1) -*/ - -/mob/living/silicon/ai/proc/disablelockdown() - set category = "AI Commands" - set name = "Disable Lockdown" - - if(usr.stat == 2) - usr <<"You cannot disable lockdown because you are dead!" - return - - world << "\red Lockdown cancelled by [usr.name]!" - - for(var/obj/machinery/firealarm/FA in world) //deactivate firealarms - spawn( 0 ) - if(FA.lockdownbyai == 1) - FA.lockdownbyai = 0 - FA.reset() - for(var/obj/machinery/door/airlock/AL in world) //open airlocks - spawn ( 0 ) - if(AL.canAIControl() && AL.lockdownbyai == 1) - AL.open() - AL.lockdownbyai = 0 - -/* src.verbs -= /mob/living/silicon/ai/proc/disablelockdown - src.verbs += /mob/living/silicon/ai/proc/lockdown - usr << "\red Disable lockdown command removed until lockdown initiated again!" - winshow(usr,"rpane",1) -*/ \ No newline at end of file diff --git a/code/unused/airtunnel.dm b/code/unused/airtunnel.dm deleted file mode 100644 index 9b61340bdfc..00000000000 --- a/code/unused/airtunnel.dm +++ /dev/null @@ -1,463 +0,0 @@ -/obj/machinery/sec_lock//P'sure this was part of the tunnel - name = "Security Pad" - desc = "A lock, for doors. Used by security." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "sec_lock" - var/obj/item/weapon/card/id/scan = null - var/a_type = 0.0 - var/obj/machinery/door/d1 = null - var/obj/machinery/door/d2 = null - anchored = 1.0 - req_access = list(access_brig) - use_power = 1 - idle_power_usage = 2 - active_power_usage = 4 - -/obj/move/airtunnel/process() - if (!( src.deployed )) - return null - else - ..() - return - -/obj/move/airtunnel/connector/create() - src.current = src - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/create() - src.current = src - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/process() - return - -/obj/move/airtunnel/wall/create(num, y_coord) - if (((num < 7 || (num > 16 && num < 23)) && y_coord == airtunnel_bottom)) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/move/airtunnel/wall/move_right() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/move_left() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/process() - return - -/obj/move/airtunnel/proc/move_left() - src.relocate(get_step(src, WEST)) - if ((src.next && src.next.deployed)) - return src.next.move_left() - else - return src.next - return - -/obj/move/airtunnel/proc/move_right() - src.relocate(get_step(src, EAST)) - if ((src.previous && src.previous.deployed)) - src.previous.move_right() - return src.previous - -/obj/move/airtunnel/proc/create(num, y_coord) - if (y_coord == airtunnel_bottom) - if ((num < 7 || (num > 16 && num < 23))) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - else - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/machinery/at_indicator/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - if(3.0) - if (prob(25)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - else - return - -/obj/machinery/at_indicator/blob_act() - if (prob(75)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - -/obj/machinery/at_indicator/proc/update_icon() - if(stat & (BROKEN|NOPOWER)) - icon_state = "reader_broken" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - if(!SS13_airtunnel.connectors) - return - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("reader[][]", (SS13_airtunnel.siphon_status == 2 ? "1" : "0"), status) - return - -/obj/machinery/at_indicator/process() - if(stat & (NOPOWER|BROKEN)) - src.update_icon() - return - use_power(5, ENVIRON) - src.update_icon() - return - -/obj/machinery/computer/airtunnel/attack_paw(user as mob) - return src.attack_hand(user) - -obj/machinery/computer/airtunnel/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/airtunnel/attack_hand(var/mob/user as mob) - if(..()) - return - - var/dat = "Air Tunnel Controls
" - user.machine = src - if (SS13_airtunnel.operating == 1) - dat += "Status: RETRACTING
" - else - if (SS13_airtunnel.operating == 2) - dat += "Status: EXPANDING
" - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - dat += "Status: Fully Retracted
" - else - if (!( C.current.next )) - dat += "Status: Fully Extended
" - else - dat += "Status: Stopped Midway
" - dat += text("Retract Stop Extend
", src, src, src) - dat += text("
Air Level: []
", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS")) - dat += "Air System Status: " - switch(SS13_airtunnel.siphon_status) - if(0.0) - dat += "Stopped " - if(1.0) - dat += "Siphoning (Siphons only) " - if(2.0) - dat += "Regulating (BOTH) " - if(3.0) - dat += "RELEASING MAX (Siphons only) " - else - dat += text("(Refresh)
", src) - dat += text("RELEASE (Siphons only) Siphon (Siphons only) Stop Regulate
", src, src, src, src) - dat += text("

Close
", user) - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/airtunnel/proc/update_icon() - if(stat & BROKEN) - icon_state = "broken" - return - - if(stat & NOPOWER) - icon_state = "c_unpowered" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("console[][]", (SS13_airtunnel.siphon_status >= 2 ? "1" : "0"), status) - return - -/obj/machinery/computer/airtunnel/process() - src.update_icon() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - src.updateUsrDialog() - return - -/obj/machinery/computer/airtunnel/Topic(href, href_list) - if(..()) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["retract"]) - SS13_airtunnel.retract() - else if (href_list["stop"]) - SS13_airtunnel.operating = 0 - else if (href_list["extend"]) - SS13_airtunnel.extend() - else if (href_list["release"]) - SS13_airtunnel.siphon_status = 3 - SS13_airtunnel.siphons() - else if (href_list["siphon"]) - SS13_airtunnel.siphon_status = 1 - SS13_airtunnel.siphons() - else if (href_list["stop_siph"]) - SS13_airtunnel.siphon_status = 0 - SS13_airtunnel.siphons() - else if (href_list["auto"]) - SS13_airtunnel.siphon_status = 2 - SS13_airtunnel.siphons() - else if (href_list["refresh"]) - SS13_airtunnel.siphons() - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/sec_lock/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_hand(var/mob/user as mob) - if(..()) - return - use_power(10) - - if (src.loc == user.loc) - var/dat = text("Security Pad:
\nKeycard: []
\nToggle Outer Door
\nToggle Inner Door
\n
\nEmergency Close
\nEmergency Open
", (src.scan ? text("[]", src, src.scan.name) : text("-----", src)), src, src, src, src) - user << browse(dat, "window=sec_lock") - onclose(user, "sec_lock") - return - -/obj/machinery/sec_lock/attackby(nothing, user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/New() - ..() - spawn( 2 ) - if (src.a_type == 1) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y - 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTHWEST)) - else - if (src.a_type == 2) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y + 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, NORTHWEST)) - else - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTH)) - src.d2 = locate(/obj/machinery/door, get_step(src, SOUTHEAST)) - return - return - -/obj/machinery/sec_lock/Topic(href, href_list) - if(..()) - return - if ((!( src.d1 ) || !( src.d2 ))) - usr << "\red Error: Cannot interface with door security!" - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["card"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/weapon/card/id/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["door1"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d1.density) - spawn( 0 ) - src.d1.open() - return - else - spawn( 0 ) - src.d1.close() - return - if (href_list["door2"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d2.density) - spawn( 0 ) - src.d2.open() - return - else - spawn( 0 ) - src.d2.close() - return - if (href_list["em_cl"]) - if (src.scan) - if (src.check_access(src.scan)) - if (!( src.d1.density )) - src.d1.close() - return - sleep(1) - spawn( 0 ) - if (!( src.d2.density )) - src.d2.close() - return - if (href_list["em_op"]) - if (src.scan) - if (src.check_access(src.scan)) - spawn( 0 ) - if (src.d1.density) - src.d1.open() - return - sleep(1) - spawn( 0 ) - if (src.d2.density) - src.d2.open() - return - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/datum/air_tunnel/air_tunnel1/New() - ..() - for(var/obj/move/airtunnel/A in locate(/area/airtunnel1)) - A.master = src - A.create() - src.connectors += A - //Foreach goto(21) - return - -/datum/air_tunnel/proc/siphons() - switch(src.siphon_status) - if(0.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(1.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 2 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(2.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 4 - if(3.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 1 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - else - return - -/datum/air_tunnel/proc/stop() - src.operating = 0 - return - -/datum/air_tunnel/proc/extend() - if (src.operating) - return - - spawn(0) - src.operating = 2 - while(src.operating == 2) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.next )) - src.operating = 0 - return - if (!( A.move_left() )) - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current) - A.current.next.loc = get_step(A.current.loc, EAST) - A.current = A.current.next - A.current.deployed = 1 - else - src.operating = 0 - sleep(20) - return - -/datum/air_tunnel/proc/retract() - if (src.operating) - return - spawn(0) - src.operating = 1 - while(src.operating == 1) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current == A) - src.operating = 0 - return - if (A.current) - A.current.loc = null - A.current.deployed = 0 - A.current = A.current.previous - else - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.move_right() )) - src.operating = 0 - sleep(20) - return \ No newline at end of file diff --git a/code/unused/assemblies.dm b/code/unused/assemblies.dm deleted file mode 100644 index 84c4b4506a8..00000000000 --- a/code/unused/assemblies.dm +++ /dev/null @@ -1,951 +0,0 @@ -/*/obj/item/assembly - name = "assembly" - icon = 'icons/obj/assemblies.dmi' - item_state = "assembly" - var/status = 0.0 - throwforce = 10 - w_class = 3.0 - throw_speed = 4 - throw_range = 10 - -/obj/item/assembly/a_i_a - name = "Health-Analyzer/Igniter/Armor Assembly" - desc = "A health-analyzer, igniter and armor assembly." - icon_state = "armor-igniter-analyzer" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/clothing/suit/armor/vest/part3 = null - status = null - flags = CONDUCT - -/obj/item/assembly/m_i_ptank - desc = "A very intricate igniter and proximity sensor electrical assembly mounted onto top of a plasma tank." - name = "Proximity/Igniter/Plasma Tank Assembly" - icon_state = "prox-igniter-tank0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = CONDUCT - -/obj/item/assembly/prox_ignite - name = "Proximity/Igniter Assembly" - desc = "A proximity-activated igniter assembly." - icon_state = "prox-igniter0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = CONDUCT - -/obj/item/assembly/r_i_ptank - desc = "A very intricate igniter and signaller electrical assembly mounted onto top of a plasma tank." - name = "Radio/Igniter/Plasma Tank Assembly" - icon_state = "radio-igniter-tank" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = CONDUCT - -/obj/item/assembly/anal_ignite - name = "Health-Analyzer/Igniter Assembly" - desc = "A health-analyzer igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = CONDUCT - item_state = "electronic" - -/obj/item/assembly/time_ignite - name = "Timer/Igniter Assembly" - desc = "A timer-activated igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = CONDUCT - -/obj/item/assembly/t_i_ptank - desc = "A very intricate igniter and timer assembly mounted onto top of a plasma tank." - name = "Timer/Igniter/Plasma Tank Assembly" - icon_state = "timer-igniter-tank0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = CONDUCT - -/obj/item/assembly/rad_ignite - name = "Radio/Igniter Assembly" - desc = "A radio-activated igniter assembly." - icon_state = "radio-igniter" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = CONDUCT - -/obj/item/assembly/rad_infra - name = "Signaller/Infrared Assembly" - desc = "An infrared-activated radio signaller" - icon_state = "infrared-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/infra/part2 = null - status = null - flags = CONDUCT - -/obj/item/assembly/rad_prox - name = "Signaller/Prox Sensor Assembly" - desc = "A proximity-activated radio signaller." - icon_state = "prox-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/prox_sensor/part2 = null - status = null - flags = CONDUCT - -/obj/item/assembly/rad_time - name = "Signaller/Timer Assembly" - desc = "A radio signaller activated by a count-down timer." - icon_state = "timer-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/timer/part2 = null - status = null - flags = CONDUCT -*/ - -/obj/item/assembly/time_ignite/premade/New() - ..() - part1 = new(src) - part2 = new(src) - part1.master = src - part2.master = src - //part2.status = 0 - -/obj/item/assembly/time_ignite/Del() - del(part1) - del(part2) - ..() - -/obj/item/assembly/time_ignite/attack_self(mob/user as mob) - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/receive_signal() - if (!status) - return - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/effect/decal/ash/attack_hand(mob/user as mob) - usr << "\blue The ashes slip through your fingers." - del(src) - return - -/obj/item/assembly/time_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The timer is now secured!", 1) - else - user.show_message("\blue The timer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/c_state(n) - src.icon_state = text("timer-igniter[]", n) - return - -//*********** - -/obj/item/assembly/anal_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The analyzer is now secured!", 1) - else - user.show_message("\blue The analyzer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - if(( istype(W, /obj/item/clothing/suit/armor/vest) ) && src.status) - var/obj/item/assembly/a_i_a/R = new - R.part1 = part1 - R.part1.master = R - part1 = null - - R.part2 = part2 - R.part2.master = R - part2 = null - - user.put_in_hand(R) - user.before_take_item(W) - R.part3 = W - R.part3.master = R - del(src) - -/* WTF THIS SHIT? It is working? Shouldn't. --rastaf0 - W.loc = R - R.part1 = W - R.part2 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.u_equip(W) - user.r_hand = R - else - user.u_equip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.u_equip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part3 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - return -/* else if ((istype(W, /obj/item/device/timer) && !( src.status ))) - - var/obj/item/assembly/time_ignite/R = new /obj/item/assembly/time_ignite( user ) - W.loc = R - R.part1 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.u_equip(W) - user.r_hand = R - else - user.u_equip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.u_equip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part2 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - -/obj/item/assembly/proc/c_state(n, O as obj) - return - -/obj/item/assembly/a_i_a/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - src.part3.loc = T - src.part3.master = null - src.part3 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - if (!src.status && (!part1||!part2||!part3)) - user << "\red You cannot finish the assembly, not all components are in place!" - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The armor is now secured!", 1) - else - user.show_message("\blue The armor is now unsecured!", 1) - src.add_fingerprint(user) - -/obj/item/assembly/a_i_a/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - del(src.part3) - ..() - return -//***** - -/obj/item/assembly/rad_time/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_time/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The signaler is now secured!", 1) - else - user.show_message("\blue The signaler is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return -//******************* -/obj/item/assembly/rad_prox/c_state(n) - src.icon_state = "prox-radio[n]" - return - -/obj/item/assembly/rad_prox/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_prox/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12) - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_prox/Move() - ..() - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_prox/dropped() - spawn( 0 ) - src.part2.sense() - return - return -//************************ -/obj/item/assembly/rad_infra/c_state(n) - src.icon_state = text("infrared-radio[]", n) - return - -/obj/item/assembly/rad_infra/Del() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/rad_infra/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The infrared laser is now secured!", 1) - else - user.show_message("\blue The infrared laser is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/receive_signal(datum/signal/signal) - - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_infra/verb/rotate() - set name = "Rotate Assembly" - set category = "Object" - set src in usr - - src.set_dir(turn(src.dir, 90)) - src.part2.set_dir(src.dir) - src.add_fingerprint(usr) - return - -/obj/item/assembly/rad_infra/Move() - - var/t = src.dir - ..() - src.set_dir(t) - //src.part2.first = null - del(src.part2.first) - return - -/obj/item/assembly/rad_infra/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_infra/attack_hand(M) - del(src.part2.first) - ..() - return - -/obj/item/assembly/prox_ignite/HasProximity(atom/movable/AM as mob|obj) - - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - -/obj/item/assembly/prox_ignite/dropped() - spawn( 0 ) - src.part1.sense() - return - return - -/obj/item/assembly/prox_ignite/Del() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/prox_ignite/c_state(n) - src.icon_state = text("prox-igniter[]", n) - return - -/obj/item/assembly/prox_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured! The igniter now works!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/rad_ignite/Del() - del(src.part1) - del(src.part2) - ..() - return - - - -/obj/item/assembly/rad_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The radio is now secured! The igniter now works!", 1) - else - user.show_message("\blue The radio is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/m_i_ptank/c_state(n) - - src.icon_state = text("prox-igniter-tank[]", n) - return - -/obj/item/assembly/m_i_ptank/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - - -//*****RM -/obj/item/assembly/m_i_ptank/Bump(atom/O) - spawn(0) - //world << "miptank bumped into [O]" - if(src.part1.secured) - //world << "sending signal" - receive_signal() - else - //world << "not active" - ..() - -/obj/item/assembly/m_i_ptank/proc/prox_check() - if(!part1 || !part1.secured) - return - for(var/atom/A in view(1, src.loc)) - if(A!=src && !istype(A, /turf/space) && !isarea(A)) - //world << "[A]:[A.type] was sensed" - src.part1.sense() - break - - spawn(10) - prox_check() - - -//***** - - -/obj/item/assembly/m_i_ptank/dropped() - - spawn( 0 ) - part1.sense() - return - return - -/obj/item/assembly/m_i_ptank/examine(mob/user) - ..(user) - part3.examine(user) - -/obj/item/assembly/m_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/m_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/prox_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool)&&W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the phoron tank valve. The phoron tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/attack_self(mob/user as mob) - - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/receive_signal() - //world << "miptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - src.part1.secured = 0.0 - - return - -/obj/item/assembly/m_i_ptank/emp_act(severity) - - if(istype(part3,/obj/item/weapon/tank/phoron) && prob(100/severity)) - part3.ignite() - ..() - -//*****RM - -/obj/item/assembly/t_i_ptank/c_state(n) - - src.icon_state = text("timer-igniter-tank[]", n) - return - -/obj/item/assembly/t_i_ptank/examine(mob/user) - ..(user) - src.part3.examine(user) - -/obj/item/assembly/t_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/t_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/time_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the phoron tank valve. The phoron tank can now be ignited.", 1) - else - if(src) - src.status = 0 - bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/attack_self(mob/user as mob) - - src.part1.attack_self(user, 1) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/receive_signal() - //world << "tiptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - -/obj/item/assembly/t_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/phoron) && prob(100/severity)) - part3.ignite() - ..() - -/obj/item/assembly/r_i_ptank/examine(mob/user) - ..(user) - src.part3.examine(user) - -/obj/item/assembly/r_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/r_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/rad_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the phoron tank valve. The phoron tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/phoron) && prob(100/severity)) - part3.ignite() - ..() - - -/obj/item/clothing/suit/armor/a_i_a_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part4.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/a_i_a/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - R.part3 = src.part3 - R.part3.master = R - R.part3.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part4) - else - part4.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - src.part4 = null - del(src) - return - if (( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the phoron tank valve. The phoron tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." -// src.part3.status = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/attack_self(mob/user as mob) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/receive_signal() - //world << "riptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - - -//*****RM \ No newline at end of file diff --git a/code/unused/asteroiddevice.dm b/code/unused/asteroiddevice.dm deleted file mode 100644 index f642884d950..00000000000 --- a/code/unused/asteroiddevice.dm +++ /dev/null @@ -1,105 +0,0 @@ -/obj/item/device/gps - name = "GPS" - icon = 'icons/obj/device.dmi' - icon_state = "pinoff" - flags = CONDUCT - slot_flags = SLOT_BELT - w_class = 2.0 - item_state = "electronic" - throw_speed = 4 - throw_range = 20 - m_amt = 500 - var/obj/effect/ship_landing_beacon/beacon = null - var/active = 0 - - attack_self() - if(!active) - active = 1 - work() - usr << "\blue You activate the GPS" - else - active = 0 - icon_state = "pinoff" - usr << "\blue You deactivate the GPS" - - proc/work() - while(active) - if(!beacon) - for(var/obj/effect/ship_landing_beacon/B in world) - if(B.name == "Beacon - SS13") - beacon = B - break - - if(!beacon) - usr << "\red Unable to detect beacon signal." - active = 0 - icon_state = "pinonnull" - return - - if(!istype(src.loc, /turf) && !istype(src.loc, /mob)) - usr << "\red Too much interference. Please hold the device in hand or place it on belt." - active = 0 - icon_state = "pinonnull" - return - - src.icon_state = "pinonfar" - - var/atom/cur_loc = src.loc - - if(cur_loc.z == beacon.z) - src.set_dir(get_dir(cur_loc,beacon)) - else - var/list/beacon_global_loc = beacon.get_global_map_pos() - var/list/src_global_loc = cur_loc.get_global_map_pos() - if(beacon_global_loc && src_global_loc) - var/hor_dir = 0 - var/ver_dir = 0 - if(beacon_global_loc["x"]>src_global_loc["x"]) - hor_dir = EAST - else if(beacon_global_loc["x"]src_global_loc["y"]) - ver_dir = NORTH - else if(beacon_global_loc["y"]Authorize command, sometimes the server will hiccup and not correctly authorize." - src << "\blue[no_auth_motd]" - src.authenticating = 0 -*/ - -/* The old goon auth/beta code is here -/client/proc/beta_tester_auth() - set name = "Tester?" - /*if(istester(src)) - src << "\blue Key accepted as beta tester" - else - src << "\redKey not accepted as beta tester. You may only observe the rounds. */ - -/client/proc/goonauth() - set name = "Goon?" - - if (src.authenticating) - return - - if(isgoon(src)) - src.goon = goon_keylist[src.ckey] - src.verbs -= /client/proc/goonauth - src << "Key authorized: Hello [goon_keylist[src.ckey]]!" - src << "\blue[auth_motd]" - return - - if (config.enable_authentication) //so that this verb isn't used when its goon only - if(src.authenticated && src.authenticated != 1) - src.goon = src.authenticated - src.verbs -= /client/proc/goonauth - src << "Key authorized: Hello [src.goon]!" - src << "\blue[auth_motd]" - else - src << "Please authorize first" - return - - src.authenticating = 1 - - spawn (rand(4, 18)) - var/result = world.Export("http://byond.lljk.net/status/?key=[src.ckey]") - var/success = 0 - - if(lowertext(result["STATUS"]) == "200 ok") - var/content = file2text(result["CONTENT"]) - - var/pos = findtext(content, " ") - var/code - var/account = "" - - if (!pos) - code = lowertext(content) - else - code = lowertext(copytext(content, 1, pos)) - account = copytext(content, pos + 1) - - if (code == "ok" && account) - src.verbs -= /client/proc/goonauth - src.goon = account - src << "Key authorized: Hello [html_encode(account)]!" - src << "\blue[auth_motd]" - success = 1 - goon_key(src.ckey, account) - - if (!success) - src.verbs += /client/proc/goonauth - //src << "Failed" - src << "\blue[no_auth_motd]" - - src.authenticating = 0 - -var/goon_keylist[0] -var/list/beta_tester_keylist - -/proc/beta_tester_loadfile() - beta_tester_keylist = new/list() - var/text = file2text("config/testers.txt") - if (!text) - diary << "Failed to load config/testers.txt\n" - else - var/list/lines = dd_text2list(text, "\n") - for(var/line in lines) - if (!line) - continue - - var/tester_key = copytext(line, 1, 0) - beta_tester_keylist.Add(tester_key) - - -/proc/goon_loadfile() - var/savefile/S=new("data/goon.goon") - S["key[0]"] >> goon_keylist - log_admin("Loading goon_keylist") - if (!length(goon_keylist)) - goon_keylist=list() - log_admin("goon_keylist was empty") - -/proc/goon_savefile() - var/savefile/S=new("data/goon.goon") - S["key[0]"] << goon_keylist - -/proc/goon_key(key as text,account as text) - var/ckey=ckey(key) - if (!goon_keylist.Find(ckey)) - goon_keylist.Add(ckey) - goon_keylist[ckey] = account - goon_savefile() - -/proc/isgoon(X) - if (istype(X,/mob)) X=X:ckey - if (istype(X,/client)) X=X:ckey - if ((ckey(X) in goon_keylist)) return 1 - else return 0 - -/proc/istester(X) - if (istype(X,/mob)) X=X:ckey - if (istype(X,/client)) X=X:ckey - if ((ckey(X) in beta_tester_keylist)) return 1 - else return 0 - -/proc/remove_goon(key as text) - var/ckey=ckey(key) - if (key && goon_keylist.Find(ckey)) - goon_keylist.Remove(ckey) - goon_savefile() - return 1 - return 0 -*/ \ No newline at end of file diff --git a/code/unused/beast/beast.dm b/code/unused/beast/beast.dm deleted file mode 100644 index aa016271530..00000000000 --- a/code/unused/beast/beast.dm +++ /dev/null @@ -1 +0,0 @@ -mob/living/carbon/beast \ No newline at end of file diff --git a/code/unused/beast/bodypart.dm b/code/unused/beast/bodypart.dm deleted file mode 100644 index 5f970317060..00000000000 --- a/code/unused/beast/bodypart.dm +++ /dev/null @@ -1,16 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -datum/bodypart - var/name = "unidentified bodypart" - var/health = 50 - -datum/bodypart/body - health = 100 - -datum/bodypart/head - health = 30 - -datum/bodypart/limb - -datum/bodypart/tail - health = 15 diff --git a/code/unused/beast/death.dm b/code/unused/beast/death.dm deleted file mode 100644 index 271f72beb27..00000000000 --- a/code/unused/beast/death.dm +++ /dev/null @@ -1,13 +0,0 @@ -/* -var/mob/dead/phantasm/P = new (src.loc) -for(var/obj/O in src.contents) // Where src is a mob - if(istype(O, /obj/item)) // Only remember carried items (sanity checking, mostly) - src.u_equip(O) // Unequip the item if we're wearing it - if (src.client) - src.client.screen -= O // Clear out any overlays the item added, notably in the equip windows - O.loc = src.loc // Honestly not sure if these two steps are necessary - O.dropped(src) // but they seem to occur everywhere else in the code, so we're not taking any chances. - O.layer = initial(O.layer) - O.loc = P // Add the item to the phantasm's inventory -src.Death(0) -*/ \ No newline at end of file diff --git a/code/unused/blender.dm b/code/unused/blender.dm deleted file mode 100644 index b76b74cf595..00000000000 --- a/code/unused/blender.dm +++ /dev/null @@ -1,156 +0,0 @@ -/* -This is a kitchen appliance to go along with the processor and the microwave. The Blender is for food items that are mixes or purees. -Currently, the end products of the blender are not compatable with the microwave but I hope to fix that eventually. - -Summary of Blender Code: It's basically a large reagent container and, like any other container, reactions can occur in it. However, -unlike a normal container, if you stick certain kinds of "blendable" items (ie. many food products), it'll convert the food item from -an object (which you can pick up and eat) into a reagent (which you can pour and drink). Containers with reagents in it can be poured -directly into the blender. Other food items will be converted into reagents by the blender. When deciding whether should be made with -the blender or the processor: Processor items are solid objects and Blender results are reagents. -*/ - -/obj/machinery/blender - name = "Blender" - desc = "A kitchen appliance used to blend stuff." - icon = 'icons/obj/kitchen.dmi' - icon_state = "blender_e" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 5 - active_power_usage = 50 - flags = OPENCONTAINER //So that you can pour stuff into it. - var/processing = 0 //This turns on (1) while it is processing so you don't accidentally get multiples from the same item. - var/container = 1 //Is there a jug attached? Could have been done with a for loop but it's less code this way. - - New() - var/datum/reagents/R = new/datum/reagents(100) //Its large since you only get one. - reagents = R - R.my_atom = src - src.contents += new /obj/item/weapon/reagent_containers/glass/blender_jug(src) - src.container = "/obj/item/weapon/reagent_containers/glass/blender_jug" //Loads a jug into the blender. - - on_reagent_change() //When the reagents change, change the icon as well. - update_icon() - - - update_icon() //Changes the icon depending on how full it is and whether it has the jug attached. - if(src.container) - switch(src.reagents.total_volume) - if(0) - src.icon_state = "blender_e" //Empty - if(1 to 75) - src.icon_state = "blender_h" //Some but not full - if(76 to 100) - src.icon_state = "blender_f" //Mostly full. - else - src.icon_state = "blender_d" //No jug. Should be redundant but just in case. - return - -/obj/machinery/blender/attackby(var/obj/item/O as obj, var/mob/user as mob) //Attack it with an object. - if(src.contents.len >= 10 || src.reagents.total_volume >= 80) //Too full. Max 10 items or 80 units of reagent - user << "Too many items are already in the blending chamber." - else if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug) && src.container == 0) //Load jug. - O.reagents.trans_to(src, O.reagents.total_volume) - del(O) - src.contents += new /obj/item/weapon/reagent_containers/glass/blender_jug(src) - //user.drop_item() - //O.loc = src - src.container = 1 - src.flags = OPENCONTAINER - src.update_icon() - else if(src.container == 0) //No jug to load in to. - user << "There is no container to put [O] in to!" - else - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //Will only blend food items. Add others in this else clause. - user.drop_item() - O.loc = src - user << "You drop the [O] into the blender." - else if (istype(O, /obj/item/weapon/plantbag)) //Allows plant bags to empty into the blender. - for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) - O.contents -= G - G.loc = src - if(src.contents.len >= 10 || src.reagents.total_volume >= 80) //Sanity checking so the blender doesn't overfill - user << "You fill the blender to the brim." - break - if(src.contents.len < 10 && src.reagents.total_volume < 80) - user << "You empty the plant bag into the blender." - else - user << "That probably won't blend." - return 0 - - -/obj/machinery/blender/verb/blend() //Blend shit. Note: In the actual blending loop, make sure it can't include the jug. - set category = "Object" - set name = "Turn Blender On" - set src in oview(1) // Otherwise, it'll try to blend it too. - if (usr.stat != 0) - return - if (src.stat != 0) //NOPOWER etc - return - if(src.processing) - usr << "\red The blender is in the process of blending." - return - if(!src.container) - usr << "\red The blender doesn't have an attached container!" - return - playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) - src.processing = 1 - usr << "\blue You turn on the blender." - use_power(250) - for(var/obj/O in src.contents) - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans)) // Mass balance law - src.reagents.add_reagent("soymilk", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/tomato)) // Mass balance law - src.reagents.add_reagent("ketchup", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/corn)) // Mass balance law - src.reagents.add_reagent("cornoil", O.reagents.get_reagent_amount("nutriment")) - O.reagents.del_reagent("nutriment") - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) //This is intentionally not an "else if" - O.reagents.trans_to(src, O.reagents.total_volume) //Think of it as the "pulp" leftover. - del(O) - src.processing = 0 - usr << "The contents of the blender have been blended." - return - -/obj/machinery/blender/verb/detach() //Transfers the contents of the Blender to the Blender Jug and then ejects the jug. - set category = "Object" - set name = "Detach Blender Jug" - set src in oview(1) - if (usr.stat != 0) - return - if(src.processing) - usr << "The blender is in the process of blending." - else if(!src.container) - usr << "There is nothing to detach!" - else - for(var/obj/O in src.contents) //Searches through the contents for the jug. - if(istype(O, /obj/item/weapon/reagent_containers/glass/blender_jug)) - O.loc = get_turf(src) - src.reagents.trans_to(O, src.reagents.total_volume) - O = null - src.flags = null - src.icon_state = "blender_d" - usr << "You detatch the blending jug." - src.container = 0 - return - -/obj/machinery/blender/verb/eject() //Ejects the non-reagent contents of the blender besides the jug. - set category = "Object" - set name = "Empty Blender Jug" - set src in oview(1) - if (usr.stat != 0) - return - if(src.processing) - usr << "The blender is in the process of blending." - else if(!src.container) - usr << "There is nothing to eject!" - else - for(var/obj/O in src.contents) - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) - O.loc = get_turf(src) - O = null - return - diff --git a/code/unused/carpetsplosion.dm b/code/unused/carpetsplosion.dm deleted file mode 100644 index 01e0e757573..00000000000 --- a/code/unused/carpetsplosion.dm +++ /dev/null @@ -1,83 +0,0 @@ -/proc/carpetsplosion(turf/location as turf,range = 10) - var/obj/effect/spreader/spreadEpicentre = new /obj/effect/spreader(location,range) - var/list/turf/spreadTurfs = list() - - sleep(5) - - for(var/obj/effect/spreader/spread in spreadEpicentre.spreadList) - spreadTurfs += get_turf(spread) - - del(spreadEpicentre) - return - -//DEBUG START -/obj/carpetnade - New() - ..() - carpetsplosion(loc) - -//DEBUG END - -/obj/effect/spreader - var/list/obj/effect/spreader/spreadList = list() - -/obj/effect/spreader/Del() - for(var/obj/effect/spreader/spread in spreadList) - if(spread != src) - del(spread) - ..() - -/obj/effect/spreader/New(location,var/amount = 1,obj/effects/spreader/source = src) //just a copypaste job from foam - if(amount <= 0) - del(src) - return - else - ..() - - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) - if(!T) - continue - - if(!T.Enter(src)) - continue - - var/obj/effect/spreader/S = locate() in T - if(S) - continue - - new /obj/effect/spreader(T,amount-1,source) - - source.spreadList += src - -/* -/obj/effect/foam/proc/process() - if(--amount < 0) - return - - - while(expand) // keep trying to expand while true - - for(var/direction in cardinal) - - - var/turf/T = get_step(src,direction) - if(!T) - continue - - if(!T.Enter(src)) - continue - - var/obj/effect/foam/F = locate() in T - if(F) - continue - - F = new(T, metal) - F.amount = amount - if(!metal) - F.create_reagents(10) - if (reagents) - for(var/datum/reagent/R in reagents.reagent_list) - F.reagents.add_reagent(R.id,1) - sleep(15) -*/ \ No newline at end of file diff --git a/code/unused/closets/ert.dm b/code/unused/closets/ert.dm deleted file mode 100644 index fa49001c45d..00000000000 --- a/code/unused/closets/ert.dm +++ /dev/null @@ -1,85 +0,0 @@ -/obj/structure/closet/secure_closet/ert/commander - name = "\improper ERT commander locker" - req_access = list(ACCESS_SECURITY) - icon_state = "capsecure1" - icon_closed = "capsecure" - icon_locked = "capsecure1" - icon_opened = "capsecureopen" - icon_broken = "capsecurebroken" - icon_off = "capsecureoff" - - New() - ..() - new /obj/item/clothing/head/helmet/space/ert/commander(src) - new /obj/item/clothing/suit/space/ert/commander(src) - new /obj/item/weapon/plastique(src) - new /obj/item/weapon/storage/belt/security/full(src) - new /obj/item/weapon/gun/energy/ionrifle(src) - new /obj/item/weapon/gun/energy/gun/nuclear(src) - new /obj/item/clothing/glasses/thermal(src) - new /obj/item/weapon/flame/lighter/zippo(src) - new /obj/item/weapon/pinpointer(src) - return - -/obj/structure/closet/secure_closet/ert/security - name = "\improper ERT security locker" - req_access = list(ACCESS_SECURITY) - icon_state = "sec1" - icon_closed = "sec" - icon_locked = "sec1" - icon_opened = "secopen" - icon_broken = "secbroken" - icon_off = "secoff" - - New() - ..() - new /obj/item/clothing/head/helmet/space/ert/security(src) - new /obj/item/clothing/suit/space/ert/security(src) - new /obj/item/weapon/plastique(src) - new /obj/item/weapon/storage/belt/security/full(src) - new /obj/item/weapon/gun/energy/ionrifle(src) - new /obj/item/weapon/gun/energy/gun/nuclear(src) - new /obj/item/clothing/glasses/thermal(src) - return - - -/obj/structure/closet/secure_closet/ert/engineer - name = "\improper ERT engineer locker" - req_access = list(ACCESS_ENGINE) - icon_state = "secureeng1" - icon_closed = "secureeng" - icon_locked = "secureeng1" - icon_opened = "secureengopen" - icon_broken = "secureengbroken" - icon_off = "secureengoff" - - New() - ..() - new /obj/item/clothing/head/helmet/space/ert/engineer(src) - new /obj/item/clothing/suit/space/ert/engineer(src) - new /obj/item/weapon/gun/energy/taser(src) - new /obj/item/weapon/storage/belt/utility/full(src) - new /obj/item/weapon/storage/backpack/industrial/full(src) - new /obj/item/device/t_scanner(src) - new /obj/item/clothing/glasses/meson(src) - return - -/obj/structure/closet/secure_closet/ert/medical - name = "\improper ERT medical locker" - req_access = list(ACCESS_MEDICAL) - icon_state = "securemed1" - icon_closed = "securemed" - icon_locked = "securemed1" - icon_opened = "securemedopen" - icon_broken = "securemedbroken" - icon_off = "securemedoff" - - New() - ..() - new /obj/item/clothing/head/helmet/space/ert/medical(src) - new /obj/item/clothing/suit/space/ert/medical(src) - new /obj/item/weapon/gun/energy/taser(src) - new /obj/item/weapon/storage/backpack/medic/full(src) - new /obj/item/weapon/storage/belt/medical(src) - new /obj/item/clothing/glasses/hud/health(src) - return \ No newline at end of file diff --git a/code/unused/closets/secure/civilian.dm b/code/unused/closets/secure/civilian.dm deleted file mode 100644 index 5dbcd966a58..00000000000 --- a/code/unused/closets/secure/civilian.dm +++ /dev/null @@ -1,122 +0,0 @@ - -/obj/structure/closet/secure_closet/chef_personal - name = "Chef's Locker" - req_access = list(ACCESS_KITCHEN) - - New() - ..() - new /obj/item/wardrobe/chef(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/radio/headset(src) - -/obj/structure/closet/secure_closet/bar - name = "Booze" - req_access = list(ACCESS_BAR) - - - New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/beer( src ) - return - -/obj/structure/closet/secure_closet/barman_personal - name = "Barman's Locker" - req_access = list(ACCESS_BAR) - - New() - ..() - new /obj/item/wardrobe/bartender(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/radio/headset(src) - new /obj/item/ammo_casing/shotgun/beanbag(BPK) - new /obj/item/ammo_casing/shotgun/beanbag(BPK) - new /obj/item/ammo_casing/shotgun/beanbag(BPK) - new /obj/item/ammo_casing/shotgun/beanbag(BPK) - -/obj/structure/closet/secure_closet/hydro_personal - name = "Botanist's Locker" - req_access = list(ACCESS_HYDROPONICS) - - New() - ..() - new /obj/item/wardrobe/hydro - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/analyzer/plant_analyzer(src) - new /obj/item/device/radio/headset(src) - -/obj/structure/closet/secure_closet/janitor_personal - name = "Janitor's Locker" - req_access = list(ACCESS_JANITOR) - - New() - ..() - new /obj/item/wardrobe/janitor(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/pda/janitor(src) - -/obj/structure/closet/secure_closet/lawyer_personal - name = "Lawyer's Locker" - req_access = list(ACCESS_LAWYER) - - New() - ..() - new /obj/item/wardrobe/lawyer(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/pda/lawyer(src) - new /obj/item/device/detective_scanner(src) - new /obj/item/weapon/storage/briefcase(src) - -/obj/structure/closet/secure_closet/librarian_personal - name = "Librarian's Locker" - req_access = list(ACCESS_LIBRARY) - - New() - ..() - new /obj/item/wardrobe/librarian(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/weapon/barcodescanner(src) - -/obj/structure/closet/secure_closet/counselor_personal - name = "Counselor's Locker" - req_access = list(ACCESS_CHAPEL_OFFICE) - - New() - ..() - new /obj/item/wardrobe/chaplain(src) - // - new /obj/item/weapon/storage/backpack/cultpack (src) - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/weapon/storage/bible(src) - new /obj/item/device/pda/chaplain(src) - new /obj/item/device/radio/headset(src) - new /obj/item/weapon/candlepack(src) - new /obj/item/weapon/candlepack(src) diff --git a/code/unused/closets/secure/research.dm b/code/unused/closets/secure/research.dm deleted file mode 100644 index 3bbd5899f46..00000000000 --- a/code/unused/closets/secure/research.dm +++ /dev/null @@ -1,47 +0,0 @@ -/obj/structure/closet/secure_closet/scientist - name = "Scientist's Locker" - req_access = list(ACCESS_RESEARCH) - icon_state = "secureres1" - icon_closed = "secureres" - icon_locked = "secureres1" - icon_opened = "secureresopen" - icon_broken = "secureresbroken" - icon_off = "secureresoff" - - New() - ..() - new /obj/item/wardrobe/scientist(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/device/pda/science(src) - new /obj/item/weapon/tank/oxygen(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/device/radio/headset/headset_sci(src) - - - -/obj/structure/closet/secure_closet/rd - name = "Research Director's Locker" - req_access = list(ACCESS_RD) - icon_state = "rdsecure1" - icon_closed = "rdsecure" - icon_locked = "rdsecure1" - icon_opened = "rdsecureopen" - icon_broken = "rdsecurebroken" - icon_off = "rdsecureoff" - - New() - ..() - new /obj/item/wardrobe/rd(src) - // - var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src) - var/obj/item/weapon/storage/box/B = new(BPK) - new /obj/item/weapon/pen(B) - new /obj/item/weapon/clipboard(src) - new /obj/item/weapon/tank/air(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/device/flash(src) - new /obj/item/device/radio/headset/heads/rd(src) - // \ No newline at end of file diff --git a/code/unused/computer2/airlock_control.dm b/code/unused/computer2/airlock_control.dm deleted file mode 100644 index 01a5a8bc87d..00000000000 --- a/code/unused/computer2/airlock_control.dm +++ /dev/null @@ -1,60 +0,0 @@ -/datum/computer/file/computer_program/airlock_control - name = "Airlock Master" - size = 16.0 - id_tag = "TAG" - - - return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit" - - /* - dat += "
Frequency: " - dat += "-- " - dat += "- " - dat += "[format_frequency(src.master.frequency)] " - dat += "+ " - dat += "++" - dat += "
" - */ - - - dat += "
ID:[src.id_tag]
" - - dat += "Cycle" - - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["set_tag"]) - var/t = input(usr, "Please enter new tag", src.id_tag, null) as text - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.id_tag = t - -// if(href_list["adj_freq"]) -// var/new_frequency = (src.master.frequency + text2num(href_list["adj_freq"])) -// src.master.set_frequency(new_frequency) - - if(href_list["send_command"]) - var/datum/signal/signal = new - signal.data["tag"] = id_tag - signal.data["command"] = href_list["send_command"] - peripheral_command("send signal", signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/arcade.dm b/code/unused/computer2/arcade.dm deleted file mode 100644 index 679e2bd4a43..00000000000 --- a/code/unused/computer2/arcade.dm +++ /dev/null @@ -1,136 +0,0 @@ -/datum/computer/file/computer_program/arcade - name = "Arcade 500" - size = 8.0 - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = 0 - var/blocked = 0 //Player cannot attack/heal while set - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/machinery/computer2)) - src.master = src.holder.loc - -// var/name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ") - - var/name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Evil ", "the Dread King ", "the Space ", "Lord ") - var/name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon") - - src.enemy_name = replacetext((name_part1 + name_part2), "the ", "") -// src.name = (name_action + name_part1 + name_part2) - - - -/datum/computer/file/computer_program/arcade/return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit" - - dat += "

[src.enemy_name]

" - - dat += "

[src.temp]

" - dat += "
Health: [src.player_hp] | Magic: [src.player_mp] | Enemy Health: [src.enemy_hp]
" - - if (src.gameover) - dat += "
New Game" - else - dat += "
Attack | " - dat += "Heal | " - dat += "Recharge Power" - - dat += "
" - - return dat - -/datum/computer/file/computer_program/arcade/Topic(href, href_list) - if(..()) - return - - if (!src.blocked) - if (href_list["attack"]) - src.blocked = 1 - var/attackamt = rand(2,6) - src.temp = "You attack for [attackamt] damage!" - src.master.updateUsrDialog() - - sleep(10) - src.enemy_hp -= attackamt - src.arcade_action() - - else if (href_list["heal"]) - src.blocked = 1 - var/pointamt = rand(1,3) - var/healamt = rand(6,8) - src.temp = "You use [pointamt] magic to heal for [healamt] damage!" - src.master.updateUsrDialog() - - sleep(10) - src.player_mp -= pointamt - src.player_hp += healamt - src.blocked = 1 - src.master.updateUsrDialog() - src.arcade_action() - - else if (href_list["charge"]) - src.blocked = 1 - var/chargeamt = rand(4,7) - src.temp = "You regain [chargeamt] points" - src.player_mp += chargeamt - - src.master.updateUsrDialog() - sleep(10) - src.arcade_action() - - if (href_list["newgame"]) //Reset everything - temp = "New Round" - player_hp = 30 - player_mp = 10 - enemy_hp = 45 - enemy_mp = 20 - gameover = 0 - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return - -/datum/computer/file/computer_program/arcade/proc/arcade_action() - if ((src.enemy_mp <= 0) || (src.enemy_hp <= 0)) - src.gameover = 1 - src.temp = "[src.enemy_name] has fallen! Rejoice!" - src.peripheral_command("vend prize") - - else if ((src.enemy_mp <= 5) && (prob(70))) - var/stealamt = rand(2,3) - src.temp = "[src.enemy_name] steals [stealamt] of your power!" - src.player_mp -= stealamt - src.master.updateUsrDialog() - - if (src.player_mp <= 0) - src.gameover = 1 - sleep(10) - src.temp = "You have been drained! GAME OVER" - - else if ((src.enemy_hp <= 10) && (src.enemy_mp > 4)) - src.temp = "[src.enemy_name] heals for 4 health!" - src.enemy_hp += 4 - src.enemy_mp -= 4 - - else - var/attackamt = rand(3,6) - src.temp = "[src.enemy_name] attacks for [attackamt] damage!" - src.player_hp -= attackamt - - if ((src.player_mp <= 0) || (src.player_hp <= 0)) - src.gameover = 1 - src.temp = "You have been crushed! GAME OVER" - - src.blocked = 0 - return \ No newline at end of file diff --git a/code/unused/computer2/base_program.dm b/code/unused/computer2/base_program.dm deleted file mode 100644 index b85923be77f..00000000000 --- a/code/unused/computer2/base_program.dm +++ /dev/null @@ -1,263 +0,0 @@ -/datum/computer - var/size = 4.0 - var/obj/item/weapon/disk/data/holder = null - var/datum/computer/folder/holding_folder = null - folder - name = "Folder" - size = 0.0 - var/gen = 0 - Del() - for(var/datum/computer/F in src.contents) - del(F) - ..() - proc - add_file(datum/computer/R) - if(!holder || holder.read_only || !R) - return 0 - if(istype(R,/datum/computer/folder) && (src.gen>=10)) - return 0 - if((holder.file_used + R.size) <= holder.file_amount) - src.contents.Add(R) - R.holder = holder - R.holding_folder = src - src.holder.file_used -= src.size - src.size += R.size - src.holder.file_used += src.size - if(istype(R,/datum/computer/folder)) - R:gen = (src.gen+1) - return 1 - return 0 - - remove_file(datum/computer/R) - if(holder && !holder.read_only || !R) -// world << "Removing file [R]. File_used: [src.holder.file_used]" - src.contents.Remove(R) - src.holder.file_used -= src.size - src.size -= R.size - src.holder.file_used += src.size - src.holder.file_used = max(src.holder.file_used, 0) -// world << "Removed file [R]. File_used: [src.holder.file_used]" - return 1 - return 0 - file - name = "File" - var/extension = "FILE" //Differentiate between types of files, why not - proc - copy_file_to_folder(datum/computer/folder/newfolder) - if(!newfolder || (!istype(newfolder)) || (!newfolder.holder) || (newfolder.holder.read_only)) - return 0 - - if((newfolder.holder.file_used + src.size) <= newfolder.holder.file_amount) - var/datum/computer/file/newfile = new src.type - - for(var/V in src.vars) - if (issaved(src.vars[V]) && V != "holder") - newfile.vars[V] = src.vars[V] - - if(!newfolder.add_file(newfile)) - del(newfile) - - return 1 - - return 0 - - - Del() - if(holder && holding_folder) - holding_folder.remove_file(src) - ..() - - -/datum/computer/file/computer_program - name = "blank program" - extension = "PROG" - //var/size = 4.0 - //var/obj/item/weapon/disk/data/holder = null - var/obj/machinery/computer2/master = null - var/active_icon = null - var/id_tag = null - var/list/req_access = list() - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/machinery/computer2)) - src.master = src.holder.loc - - Del() - if(master) - master.processing_programs.Remove(src) - ..() - - proc - return_text() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(!(holder in src.master.contents)) - //world << "Holder [holder] not in [master] of prg:[src]" - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - process() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - master.processing_programs.Remove(src) - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - receive_command(obj/source, command, datum/signal/signal) - if((!src.holder) || (!src.master) || (!source) || (source != src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - - peripheral_command(command, datum/signal/signal) - if(master) - master.send_command(command, signal) - else - del(signal) - - transfer_holder(obj/item/weapon/disk/data/newholder,datum/computer/folder/newfolder) - - if((newholder.file_used + src.size) > newholder.file_amount) - return 0 - - if(!newholder.root) - newholder.root = new /datum/computer/folder - newholder.root.holder = newholder - newholder.root.name = "root" - - if(!newfolder) - newfolder = newholder.root - - if((src.holder && src.holder.read_only) || newholder.read_only) - return 0 - - if((src.holder) && (src.holder.root)) - src.holder.root.remove_file(src) - - newfolder.add_file(src) - - if(istype(newholder.loc,/obj/machinery/computer2)) - src.master = newholder.loc - - //world << "Setting [src.holder] to [newholder]" - src.holder = newholder - return 1 - - //Check access per program. - allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - if(istype(M, /mob/living/silicon)) - //AI can do whatever he wants - return 1 - else if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(src.check_access(H.equipped()) || src.check_access(H.wear_id)) - return 1 - else if(istype(M, /mob/living/carbon/monkey)) - var/mob/living/carbon/monkey/george = M - //they can only hold things :( - if(george.equipped() && istype(george.equipped(), /obj/item/weapon/card/id) && src.check_access(george.equipped())) - return 1 - return 0 - - check_access(obj/item/weapon/card/id/I) - if(!src.req_access) //no requirements - return 1 - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - - Topic(href, href_list) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(master.stat & (NOPOWER|BROKEN)) - return 1 - - if(src.master.active_program != src) - return 1 - - if ((!usr.contents.Find(src.master) && (!in_range(src.master, usr) || !istype(src.master.loc, /turf))) && (!istype(usr, /mob/living/silicon))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - usr.machine = src.master - - if (href_list["close"]) - usr.machine = null - usr << browse(null, "window=comp2") - return 0 - - if (href_list["quit"]) -// src.master.processing_programs.Remove(src) - if(src.master.host_program && src.master.host_program.holder && (src.master.host_program.holder in src.master.contents)) - src.master.run_program(src.master.host_program) - src.master.updateUsrDialog() - return 1 - else - src.master.active_program = null - src.master.updateUsrDialog() - return 1 - - return 0 \ No newline at end of file diff --git a/code/unused/computer2/buildandrepair.dm b/code/unused/computer2/buildandrepair.dm deleted file mode 100644 index 69e7b5fb822..00000000000 --- a/code/unused/computer2/buildandrepair.dm +++ /dev/null @@ -1,150 +0,0 @@ -//Motherboard is just used in assembly/disassembly, doesn't exist in the actual computer object. -/obj/item/weapon/motherboard - name = "Computer mainboard" - desc = "A computer motherboard." - icon = 'icons/obj/module.dmi' - icon_state = "mainboard" - item_state = "electronic" - w_class = 3 - var/created_name = null //If defined, result computer will have this name. - -/obj/computer2frame - density = 1 - anchored = 0 - name = "Computer-frame" - icon = 'icons/obj/stock_parts.dmi' - icon_state = "0" - var/state = 0 - var/obj/item/weapon/motherboard/mainboard = null - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/list/peripherals = list() - var/created_icon_state = "aiupload" - -/obj/computer2frame/attackby(obj/item/P as obj, mob/user as mob) - switch(state) - if(0) - if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You wrench the frame into place." - src.anchored = 1 - src.state = 1 - if(istype(P, /obj/item/weapon/weldingtool)) - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You deconstruct the frame." - new /obj/item/stack/sheet/metal( src.loc, 5 ) - del(src) - if(1) - if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20)) - user << "\blue You unfasten the frame." - src.anchored = 0 - src.state = 0 - if(istype(P, /obj/item/weapon/motherboard) && !mainboard) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "\blue You place the mainboard inside the frame." - src.icon_state = "1" - src.mainboard = P - user.drop_item() - P.loc = src - if(istype(P, /obj/item/weapon/screwdriver) && mainboard) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You screw the mainboard into place." - src.state = 2 - src.icon_state = "2" - if(istype(P, /obj/item/weapon/crowbar) && mainboard) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the mainboard." - src.state = 1 - src.icon_state = "0" - mainboard.loc = src.loc - src.mainboard = null - if(2) - if(istype(P, /obj/item/weapon/screwdriver) && mainboard && (!peripherals.len)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You unfasten the mainboard." - src.state = 1 - src.icon_state = "1" - - if(istype(P, /obj/item/weapon/peripheral)) - if(src.peripherals.len < 3) - user.drop_item() - src.peripherals.Add(P) - P.loc = src - user << "\blue You add [P] to the frame." - else - user << "\red There is no more room for peripheral cards." - - if(istype(P, /obj/item/weapon/crowbar) && src.peripherals.len) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the peripheral boards." - for(var/obj/item/weapon/peripheral/W in src.peripherals) - W.loc = src.loc - src.peripherals.Remove(W) - - if(istype(P, /obj/item/stack/cable_coil)) - if(P:amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20)) - P:amount -= 5 - if(!P:amount) del(P) - user << "\blue You add cables to the frame." - src.state = 3 - src.icon_state = "3" - if(3) - if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - user << "\blue You remove the cables." - src.state = 2 - src.icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) - A.amount = 5 - if(src.hd) - src.hd.loc = src.loc - src.hd = null - - if(istype(P, /obj/item/weapon/disk/data/fixed_disk) && !src.hd) - user.drop_item() - src.hd = P - P.loc = src - user << "\blue You connect the drive to the cabling." - - if(istype(P, /obj/item/weapon/crowbar) && src.hd) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the hard drive." - src.hd.loc = src.loc - src.hd = null - - if(istype(P, /obj/item/stack/sheet/glass)) - if(P:amount >= 2) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20)) - P:use(2) - user << "\blue You put in the glass panel." - src.state = 4 - src.icon_state = "4" - if(4) - if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "\blue You remove the glass panel." - src.state = 3 - src.icon_state = "3" - new /obj/item/stack/sheet/glass( src.loc, 2 ) - if(istype(P, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You connect the monitor." - var/obj/machinery/computer2/C= new /obj/machinery/computer2( src.loc ) - C.setup_drive_size = 0 - C.icon_state = src.created_icon_state - if(mainboard.created_name) C.name = mainboard.created_name - del(mainboard) - if(hd) - C.hd = hd - hd.loc = C - for(var/obj/item/weapon/peripheral/W in src.peripherals) - W.loc = C - W.host = C - C.peripherals.Add(W) - del(src) \ No newline at end of file diff --git a/code/unused/computer2/computerII.dm b/code/unused/computer2/computerII.dm deleted file mode 100644 index 433853d682c..00000000000 --- a/code/unused/computer2/computerII.dm +++ /dev/null @@ -1,414 +0,0 @@ - -/obj/machinery/computer2 - name = "computer" - desc = "A computer workstation." - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - density = 1 - anchored = 1.0 - req_access = list() //This doesn't determine PROGRAM req access, just the access needed to install/delete programs. - var/base_icon_state = "aiupload" //Assembly creates a new computer2 and not a child typepath, so initial doesn't work!! - var/datum/radio_frequency/radio_connection - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/datum/computer/file/computer_program/active_program - var/datum/computer/file/computer_program/host_program //active is set to this when the normal active quits, if available - var/list/processing_programs = list() - var/obj/item/weapon/card/id/authid = null //For records computers etc - var/obj/item/weapon/card/id/auxid = null //For computers that need two ids for some reason. - var/obj/item/weapon/disk/data/diskette = null - var/list/peripherals = list() - //Setup for Starting program & peripherals - var/setup_starting_program = null //If set to a program path it will start with this one active. - var/setup_starting_peripheral = null //Spawn with radio card and whatever path is here. - var/setup_drive_size = 64.0 //How big is the drive (set to 0 for no drive) - var/setup_id_tag - var/setup_has_radio = 0 //Does it spawn with a radio peripheral? - var/setup_radio_tag - var/setup_frequency = 1411 - -/obj/item/weapon/disk/data - var/datum/computer/folder/root = null - var/file_amount = 32.0 - var/file_used = 0.0 - var/portable = 1 - var/title = "Data Disk" - New() - src.root = new /datum/computer/folder - src.root.holder = src - src.root.name = "root" - -/obj/item/weapon/disk/data/fixed_disk - name = "Storage Drive" - icon_state = "harddisk" - title = "Storage Drive" - file_amount = 80.0 - portable = 0 - - attack_self(mob/user as mob) - return - -/obj/item/weapon/disk/data/computer2test - name = "Programme Diskette" - file_amount = 128.0 - New() - ..() - src.root.add_file( new /datum/computer/file/computer_program/arcade(src)) - src.root.add_file( new /datum/computer/file/computer_program/med_data(src)) - src.root.add_file( new /datum/computer/file/computer_program/airlock_control(src)) - src.root.add_file( new /datum/computer/file/computer_program/messenger(src)) - src.root.add_file( new /datum/computer/file/computer_program/progman(src)) - -/obj/machinery/computer2/medical - name = "Medical computer" - icon_state = "dna" - setup_has_radio = 1 - setup_starting_program = /datum/computer/file/computer_program/med_data - setup_starting_peripheral = /obj/item/weapon/peripheral/printer - -/obj/machinery/computer2/arcade - name = "arcade machine" - icon_state = "arcade" - desc = "An arcade machine." - setup_drive_size = 16.0 - setup_starting_program = /datum/computer/file/computer_program/arcade - setup_starting_peripheral = /obj/item/weapon/peripheral/prize_vendor - - -/obj/machinery/computer2/New() - ..() - - spawn(4) - if(setup_has_radio) - var/obj/item/weapon/peripheral/radio/radio = new /obj/item/weapon/peripheral/radio(src) - radio.frequency = setup_frequency - radio.code = setup_radio_tag - - if(!hd && (setup_drive_size > 0)) - src.hd = new /obj/item/weapon/disk/data/fixed_disk(src) - src.hd.file_amount = src.setup_drive_size - - if(ispath(src.setup_starting_program)) - src.active_program = new src.setup_starting_program - src.active_program.id_tag = setup_id_tag - - src.hd.file_amount = max(src.hd.file_amount, src.active_program.size) - - src.active_program.transfer_holder(src.hd) - - if(ispath(src.setup_starting_peripheral)) - new src.setup_starting_peripheral(src) - - src.base_icon_state = src.icon_state - - return - -/obj/machinery/computer2/attack_hand(mob/user as mob) - if(..()) - return - - user.machine = src - - var/dat - if((src.active_program) && (src.active_program.master == src) && (src.active_program.holder in src)) - dat = src.active_program.return_text() - else - dat = "Thinktronic BIOS V1.4

" - - dat += "Current ID: [src.authid ? "[src.authid.name]" : "----------"]
" - dat += "Auxiliary ID: [src.auxid ? "[src.auxid.name]" : "----------"]

" - - var/progdat - if((src.hd) && (src.hd.root)) - for(var/datum/computer/file/computer_program/P in src.hd.root.contents) - progdat += "[P.name]Size: [P.size]" - - progdat += "Run" - - if(P in src.processing_programs) - progdat += "Halt" - else - progdat += "Load" - - progdat += "Del" - - continue - - dat += "Disk Space: \[[src.hd.file_used]/[src.hd.file_amount]\]
" - dat += "Programs on Fixed Disk:
" - - if(!progdat) - progdat = "No programs found.
" - dat += "
[progdat]
" - - else - - dat += "Programs on Fixed Disk:
" - dat += "
No fixed disk detected.

" - - dat += "
" - - progdat = null - if((src.diskette) && (src.diskette.root)) - - dat += "Eject
" - - for(var/datum/computer/file/computer_program/P in src.diskette.root.contents) - progdat += "[P.name]Size: [P.size]" - progdat += "Run" - - if(P in src.processing_programs) - progdat += "Halt" - else - progdat += "Load" - - progdat += "Install" - - continue - - dat += "Disk Space: \[[src.diskette.file_used]/[src.diskette.file_amount]\]
" - dat += "Programs on Disk:
" - - if(!progdat) - progdat = "No data found.
" - dat += "
[progdat]
" - - else - - dat += "Programs on Disk:
" - dat += "
No diskette loaded.

" - - dat += "
" - - user << browse(dat,"window=comp2") - onclose(user,"comp2") - return - -/obj/machinery/computer2/Topic(href, href_list) - if(..()) - return - - if(!src.active_program) - if((href_list["prog"]) && (href_list["function"])) - var/datum/computer/file/computer_program/newprog = locate(href_list["prog"]) - if(newprog && istype(newprog)) - switch(href_list["function"]) - if("run") - src.run_program(newprog) - if("load") - src.load_program(newprog) - if("unload") - src.unload_program(newprog) - if((href_list["file"]) && (href_list["function"])) - var/datum/computer/file/newfile = locate(href_list["file"]) - if(!newfile) - return - switch(href_list["function"]) - if("install") - if((src.hd) && (src.hd.root) && (src.allowed(usr))) - newfile.copy_file_to_folder(src.hd.root) - - if("delete") - if(src.allowed(usr)) - src.delete_file(newfile) - - //If there is already one loaded eject, or if not and they have one insert it. - if (href_list["id"]) - switch(href_list["id"]) - if("auth") - if(!isnull(src.authid)) - src.authid.loc = get_turf(src) - src.authid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.authid = I - if("aux") - if(!isnull(src.auxid)) - src.auxid.loc = get_turf(src) - src.auxid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.auxid = I - - //Same but for a data disk - else if (href_list["disk"]) - if(!isnull(src.diskette)) - src.diskette.loc = get_turf(src) - src.diskette = null -/* else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/disk/data)) - usr.drop_item() - I.loc = src - src.diskette = I -*/ - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer2/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.process() - - return - -/obj/machinery/computer2/power_change() - if(stat & BROKEN) - icon_state = src.base_icon_state - src.icon_state += "b" - - else if(powered()) - icon_state = src.base_icon_state - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - icon_state = src.base_icon_state - src.icon_state += "0" - stat |= NOPOWER - - -/obj/machinery/computer2/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES - if ((!src.diskette) && W:portable) - user.machine = src - user.drop_item() - W.loc = src - src.diskette = W - user << "You insert [W]." - src.updateUsrDialog() - return - - else if (istype(W, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/computer2frame/A = new /obj/computer2frame( src.loc ) - A.created_icon_state = src.base_icon_state - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - new /obj/item/weapon/shard( src.loc ) - A.state = 3 - A.icon_state = "3" - else - user << "\blue You disconnect the monitor." - A.state = 4 - A.icon_state = "4" - - for (var/obj/item/weapon/peripheral/C in src.peripherals) - C.loc = A - A.peripherals.Add(C) - - if(src.diskette) - src.diskette.loc = src.loc - - //TO-DO: move card reading to peripheral cards instead - if(src.authid) - src.authid.loc = src.loc - - if(src.auxid) - src.auxid.loc = src.loc - - if(src.hd) - src.hd.loc = A - A.hd = src.hd - - A.mainboard = new /obj/item/weapon/motherboard(A) - A.mainboard.created_name = src.name - - - A.anchored = 1 - del(src) - - else - src.attack_hand(user) - return - -/obj/machinery/computer2/proc/send_command(command, datum/signal/signal) - for(var/obj/item/weapon/peripheral/P in src.peripherals) - P.receive_command(src, command, signal) - - del(signal) - -/obj/machinery/computer2/proc/receive_command(obj/source, command, datum/signal/signal) - if(source in src.contents) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.receive_command(src, command, signal) - - del(signal) - - return - - -/obj/machinery/computer2/proc/run_program(datum/computer/file/computer_program/program,datum/computer/file/computer_program/host) - if(!program) - return 0 - -// src.unload_program(src.active_program) - - if(src.load_program(program)) - if(host && istype(host)) - src.host_program = host - else - src.host_program = null - - src.active_program = program - return 1 - - return 0 - -/obj/machinery/computer2/proc/load_program(datum/computer/file/computer_program/program) - if((!program) || (!program.holder)) - return 0 - - if(!(program.holder in src)) -// world << "Not in src" - program = new program.type - program.transfer_holder(src.hd) - - if(program.master != src) - program.master = src - - if(program in src.processing_programs) - return 1 - else - src.processing_programs.Add(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/unload_program(datum/computer/file/computer_program/program) - if((!program) || (!src.hd)) - return 0 - - if(program in src.processing_programs) - src.processing_programs.Remove(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/delete_file(datum/computer/file/file) - //world << "Deleting [file]..." - if((!file) || (!file.holder) || (file.holder.read_only)) - //world << "Cannot delete :(" - return 0 - - if(file in src.processing_programs) - src.processing_programs.Remove(file) - - if(src.active_program == file) - src.active_program = null - -// file.holder.root.remove_file(file) - - //world << "Now calling del on [file]..." - del(file) - return 1 \ No newline at end of file diff --git a/code/unused/computer2/filebrowse.dm b/code/unused/computer2/filebrowse.dm deleted file mode 100644 index 9ddbb9403c2..00000000000 --- a/code/unused/computer2/filebrowse.dm +++ /dev/null @@ -1,164 +0,0 @@ -/datum/computer/file/computer_program/progman - name = "ProgManager" - size = 16.0 - var/datum/computer/folder/current_folder - var/mode = 0 - var/datum/computer/file/clipboard - - - return_text() - if(..()) - return - - if((!src.current_folder) || !(src.current_folder.holder in src.master)) - src.current_folder = src.holder.root - - var/dat = "Close | " - dat += "Quit" - - switch(mode) - if(0) - dat += " |Create Folder" - //dat += " | Create File" - dat += " | Paste" - dat += " | Root" - dat += " | Drive
" - - dat += "Contents of [current_folder] | Drive:\[[src.current_folder.holder.title]]
" - dat += "Used: \[[src.current_folder.holder.file_used]/[src.current_folder.holder.file_amount]\]
" - - dat += "" - for(var/datum/computer/P in current_folder.contents) - if(P == src) - dat += "" - continue - dat += "" - dat += "" - - dat += "" - - dat += "" - dat += "" - - - if(istype(P,/datum/computer/file)) - dat += "" - - dat += "" - - dat += "
SystemSize: [src.size]SYSTEM
[P.name]Size: [P.size][(istype(P,/datum/computer/folder)) ? "FOLDER" : "[P:extension]"]DelRenameCopy
" - - if(1) - dat += " | Main" - dat += " | Eject
" - - for(var/obj/item/weapon/disk/data/D in src.master) - if(D == current_folder.holder) - dat += "[D.name]
" - else - dat += "[D.title]
" - - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["create"]) - if(current_folder) - var/datum/computer/F = null - switch(href_list["create"]) - if("folder") - F = new /datum/computer/folder - if(!current_folder.add_file(F)) - //world << "Couldn't add folder :(" - del(F) - if("file") - F = new /datum/computer/file - if(!current_folder.add_file(F)) - //world << "Couldn't add file :(" - del(F) - - if(href_list["file"] && href_list["function"]) - var/datum/computer/F = locate(href_list["file"]) - if(!F || !istype(F)) - return - switch(href_list["function"]) - if("open") - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F,src) - src.master.updateUsrDialog() - return - - if("delete") - src.master.delete_file(F) - - if("copy") - if(istype(F,/datum/computer/file) && (!F.holder || (F.holder in src.master.contents))) - src.clipboard = F - - if("paste") - if(istype(F,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(F) - - if("rename") - spawn(0) - var/t = input(usr, "Please enter new name", F.name, null) as text - t = sanitize(copytext(t, 1, 16)) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - src.master.updateUsrDialog() - return - - -/* - if(href_list["open"]) - var/datum/computer/F = locate(href_list["open"]) - if(!F || !istype(F)) - return - - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F) - src.master.updateUsrDialog() - return - - if(href_list["delete"]) - var/datum/computer/F = locate(href_list["delete"]) - if(!F || !istype(F)) - return - - src.master.delete_file(F) -*/ - if(href_list["top_folder"]) - src.current_folder = src.current_folder.holder.root - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - newmode = max(newmode,0) - src.mode = newmode - - if(href_list["drive"]) - var/obj/item/weapon/disk/data/D = locate(href_list["drive"]) - if(D && istype(D) && D.root) - current_folder = D.root - src.mode = 0 - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/med_rec.dm b/code/unused/computer2/med_rec.dm deleted file mode 100644 index 92e42e19e1b..00000000000 --- a/code/unused/computer2/med_rec.dm +++ /dev/null @@ -1,463 +0,0 @@ -/datum/computer/file/computer_program/med_data - name = "Medical Records" - size = 32.0 - active_icon = "dna" - req_access = list(ACCESS_MEDICAL) - var/authenticated = null - var/rank = null - var/screen = null - var/datum/data/record/active1 = null - var/datum/data/record/active2 = null - var/a_id = null - var/temp = null - -/datum/computer/file/computer_program/med_data/return_text() - if(..()) - return - var/dat - if (src.temp) - dat = text("[src.temp]

Clear Screen") - else - dat = text("Confirm Identity: []
", master, (src.master.authid ? text("[]", src.master.authid.name) : "----------")) - if (src.authenticated) - switch(src.screen) - if(1.0) - dat += {" -Search Records -
List Records -
-
Virus Database -
Medbot Tracking -
-
Record Maintenance -
{Log Out}
-"} - if(2.0) - dat += "Record List:
" - for(var/datum/data/record/R in data_core.general) - dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"]) - //Foreach goto(132) - dat += text("
Back", src) - if(3.0) - dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src) - if(4.0) - dat += "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"]) - else - dat += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - dat += text("
\n
Medical Data

\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src, src.active2.fields["b_type"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - dat += text("[]
Delete Entry

", src.active2.fields[text("com_[]", counter)], src, counter) - counter++ - dat += text("Add Entry

", src) - dat += text("Delete Record (Medical Only)

", src) - else - dat += "Medical Record Lost!
" - dat += text("New Record

") - dat += text("\nPrint Record
\nBack
", src, src) - if(5.0) - dat += {"
Virus Database
-
GBS -
Common Cold -
Flu -
Jungle Fever -
Clowning Around -
Plasmatoid -
Space Rhinovirus -
Robot Transformation -
Back"} - if(6.0) - dat += "
Medical Robot Monitor
" - dat += "Back" - dat += "
Medical Robots:" - var/bdat = null - for(var/obj/machinery/bot/medbot/M in world) - var/turf/bl = get_turf(M) - bdat += "[M.name] - \[[bl.x],[bl.y]\] - [M.on ? "Online" : "Offline"]
" - if(!isnull(M.reagent_glass)) - bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]" - else - bdat += "Using Internal Synthesizer." - - if(!bdat) - dat += "
None detected
" - else - dat += "[bdat]" - - else - else - dat += text("{Log In}", src) - dat += "
{Quit}" - - return dat - -/datum/computer/file/computer_program/med_data/Topic(href, href_list) - if(..()) - return - if (!( data_core.general.Find(src.active1) )) - src.active1 = null - if (!( data_core.medical.Find(src.active2) )) - src.active2 = null - if (href_list["temp"]) - src.temp = null - else if (href_list["logout"]) - src.authenticated = null - src.screen = null - src.active1 = null - src.active2 = null - else if (href_list["login"]) - if (istype(usr, /mob/living/silicon)) - src.active1 = null - src.active2 = null - src.authenticated = 1 - src.rank = "AI" - src.screen = 1 - else if (istype(src.master.authid, /obj/item/weapon/card/id)) - src.active1 = null - src.active2 = null - if (src.check_access(src.master.authid)) - src.authenticated = src.master.authid.registered_name - src.rank = src.master.authid.assignment - src.screen = 1 - if (src.authenticated) - - if(href_list["screen"]) - src.screen = text2num(href_list["screen"]) - if(src.screen < 1) - src.screen = 1 - - src.active1 = null - src.active2 = null - - if(href_list["vir"]) - switch(href_list["vir"]) - if("gbs") - src.temp = {"Name: GBS -
Number of stages: 5 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: If left untreated death will occur. -
-
Severity: Major"} - if("cc") - src.temp = {"Name: Common Cold -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Rest -
Affected Species: Human -
-
Notes: If left untreated the subject will contract the flu. -
-
Severity: Minor"} - if("f") - src.temp = {"Name: The Flu -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Rest -
Affected Species: Human -
-
Notes: If left untreated the subject will feel quite unwell. -
-
Severity: Medium"} - if("jf") - src.temp = {"Name: Jungle Fever -
Number of stages: 1 -
Spread: Airborne Transmission -
Possible Cure: None -
Affected Species: Monkey -
-
Notes: monkeys with this disease will bite humans, causing humans to spontaneously to mutate into a monkey. -
-
Severity: Medium"} - if("ca") - src.temp = {"Name: Clowning Around -
Number of stages: 4 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: Subjects are affected by rampant honking and a fondness for shenanigans. They may also spontaneously phase through closed airlocks. -
-
Severity: Laughable"} - if("p") - src.temp = {"Name: Plasmatoid -
Number of stages: 3 -
Spread: Airborne Transmission -
Possible Cure: Inaprovaline -
Affected Species: Human and Monkey -
-
Notes: With this disease the victim will need phoron to breathe. -
-
Severity: Major"} - if("dna") - src.temp = {"Name: Space Rhinovirus -
Number of stages: 4 -
Spread: Airborne Transmission -
Possible Cure: Spaceacillin -
Affected Species: Human -
-
Notes: This disease transplants the genetic code of the intial vector into new hosts. -
-
Severity: Medium"} - if("bot") - src.temp = {"Name: Robot Transformation -
Number of stages: 5 -
Spread: Infected food -
Possible Cure: None -
Affected Species: Human -
-
Notes: This disease, actually acute nanomachine infection, converts the victim into a cyborg. -
-
Severity: Major"} - - if (href_list["del_all"]) - src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src) - - if (href_list["del_all2"]) - for(var/datum/data/record/R in data_core.medical) - del(R) - src.temp = "All records deleted." - - if (href_list["field"]) - var/a1 = src.active1 - var/a2 = src.active2 - switch(href_list["field"]) - if("fingerprint") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["id"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["fingerprint"] = t1 - if("sex") - if (istype(src.active1, /datum/data/record)) - if (src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" - else - src.active1.fields["sex"] = "Male" - if("age") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["age"] = t1 - if("mi_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis"] = t1 - if("mi_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis_d"] = t1 - if("ma_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis"] = t1 - if("ma_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis_d"] = t1 - if("alg") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg"] = t1 - if("alg_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg_d"] = t1 - if("cdi") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi"] = t1 - if("cdi_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi_d"] = t1 - if("notes") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["notes"] = t1 - if("p_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
", src, src, src, src) - if("m_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) - if("b_type") - if (istype(src.active2, /datum/data/record)) - src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) - else - - if (href_list["p_stat"]) - if (src.active1) - switch(href_list["p_stat"]) - if("deceased") - src.active1.fields["p_stat"] = "*Deceased*" - if("unconscious") - src.active1.fields["p_stat"] = "*Unconscious*" - if("active") - src.active1.fields["p_stat"] = "Active" - if("unfit") - src.active1.fields["p_stat"] = "Physically Unfit" - - if (href_list["m_stat"]) - if (src.active1) - switch(href_list["m_stat"]) - if("insane") - src.active1.fields["m_stat"] = "*Insane*" - if("unstable") - src.active1.fields["m_stat"] = "*Unstable*" - if("watch") - src.active1.fields["m_stat"] = "*Watch*" - if("stable") - src.active2.fields["m_stat"] = "Stable" - - - if (href_list["b_type"]) - if (src.active2) - switch(href_list["b_type"]) - if("an") - src.active2.fields["b_type"] = "A-" - if("bn") - src.active2.fields["b_type"] = "B-" - if("abn") - src.active2.fields["b_type"] = "AB-" - if("on") - src.active2.fields["b_type"] = "O-" - if("ap") - src.active2.fields["b_type"] = "A+" - if("bp") - src.active2.fields["b_type"] = "B+" - if("abp") - src.active2.fields["b_type"] = "AB+" - if("op") - src.active2.fields["b_type"] = "O+" - - - if (href_list["del_r"]) - if (src.active2) - src.temp = "Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
" - - if (href_list["del_r2"]) - if (src.active2) - del(src.active2) - - if (href_list["d_rec"]) - var/datum/data/record/R = locate(href_list["d_rec"]) - var/datum/data/record/M = locate(href_list["d_rec"]) - if (!( data_core.general.Find(R) )) - src.temp = "Record Not Found!" - return - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - else - //Foreach continue //goto(2540) - src.active1 = R - src.active2 = M - src.screen = 4 - - if (href_list["new"]) - if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) ))) - var/datum/data/record/R = new /datum/data/record( ) - R.fields["name"] = src.active1.fields["name"] - R.fields["id"] = src.active1.fields["id"] - R.name = text("Medical Record #[]", R.fields["id"]) - R.fields["b_type"] = "Unknown" - R.fields["mi_dis"] = "None" - R.fields["mi_dis_d"] = "No minor disabilities have been declared." - R.fields["ma_dis"] = "None" - R.fields["ma_dis_d"] = "No major disabilities have been diagnosed." - R.fields["alg"] = "None" - R.fields["alg_d"] = "No allergies have been detected in this patient." - R.fields["cdi"] = "None" - R.fields["cdi_d"] = "No diseases have been diagnosed at the moment." - R.fields["notes"] = "No notes." - data_core.medical += R - src.active2 = R - src.screen = 4 - - if (href_list["add_c"]) - if (!( istype(src.active2, /datum/data/record) )) - return - var/a2 = src.active2 - var/t1 = input("Add Comment:", "Med. records", null, null) as message - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - counter++ - src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2556
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1) - - if (href_list["del_c"]) - if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) - src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" - - if (href_list["search"]) - var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text - if ((!( t1 ) || usr.stat || (!src.master) || !( src.authenticated ) || usr.restrained() || ((!in_range(src.master, usr)) && (!istype(usr, /mob/living/silicon))))) - return - src.active1 = null - src.active2 = null - t1 = lowertext(t1) - for(var/datum/data/record/R in data_core.general) - if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]))) - src.active1 = R - else - - if (!( src.active1 )) - src.temp = text("Could not locate record [].", t1) - else - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"])) - src.active2 = E - else - - src.screen = 4 - - if (href_list["print_p"]) - var/info = "
Medical Record

" - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"]) - else - info += "General Record Lost!
" - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - info += text("
\n
Medical Data

\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\n
Comments/Log

", src.active2.fields["b_type"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - info += text("[]
", src.active2.fields[text("com_[]", counter)]) - counter++ - else - info += "Medical Record Lost!
" - info += "" - - var/datum/signal/signal = new - signal.data["data"] = info - signal.data["title"] = "Medical Record" - src.peripheral_command("print",signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/messenger.dm b/code/unused/computer2/messenger.dm deleted file mode 100644 index 5b57783d953..00000000000 --- a/code/unused/computer2/messenger.dm +++ /dev/null @@ -1,97 +0,0 @@ -/datum/computer/file/computer_program/messenger - name = "Messenger" - size = 8.0 - var/messages = null - var/screen_name = "User" - -//To-do: take screen_name from inserted id card?? -//Saving log to file datum - - return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit
" - - dat += "SpaceMessenger V4.1.2
" - - dat += "Send Message" - - dat += " | Clear" - dat += " | Print" - - dat += " | Name:[src.screen_name]
" - - dat += messages - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["send_msg"]) - var/t = input(usr, "Please enter messenger", src.id_tag, null) as text - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - if (!t) - return - if (!in_range(src.master, usr)) - return - - var/datum/signal/signal = new - signal.data["type"] = "message" - signal.data["data"] = t - signal.data["sender"] = src.screen_name - src.messages += "→ You:
[t]
" - - peripheral_command("send signal", signal) - - if(href_list["func_msg"]) - switch(href_list["func_msg"]) - if("clear") - src.messages = null - - if("print") - var/datum/signal/signal = new - signal.data["data"] = src.messages - signal.data["title"] = "Chatlog" - peripheral_command("print", signal) - - //if("save") - //TO-DO - - - if(href_list["set_name"]) - var/t = input(usr, "Please enter screen name", src.id_tag, null) as text - t = sanitize(copytext(t, 1, 20)) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.screen_name = t - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return - - receive_command(obj/source, command, datum/signal/signal) - if(..() || !signal) - return - - if(command == "radio signal") - switch(signal.data["type"]) - if("message") - var/sender = signal.data["sender"] - if(!sender) - sender = "Unknown" - - src.messages += "← From [sender]:
[signal.data["data"]]
" - if(src.master.active_program == src) - playsound(src.master.loc, 'sound/machines/twobeep.ogg', 50, 1) - src.master.updateUsrDialog() - - return \ No newline at end of file diff --git a/code/unused/computer2/peripherals.dm b/code/unused/computer2/peripherals.dm deleted file mode 100644 index 2316e3b10e3..00000000000 --- a/code/unused/computer2/peripherals.dm +++ /dev/null @@ -1,209 +0,0 @@ -/obj/item/weapon/peripheral - name = "Peripheral card" - desc = "A computer circuit board." - icon = 'icons/obj/module.dmi' - icon_state = "id_mod" - item_state = "electronic" - w_class = 2 - var/obj/machinery/computer2/host - var/id = null - - New() - ..() - spawn(2) - if(istype(src.loc,/obj/machinery/computer2)) - host = src.loc - host.peripherals.Add(src) -// var/setup_id = "\ref[src]" -// src.id = copytext(setup_id,4,(length(setup_id)-1) ) - - Del() - if(host) - host.peripherals.Remove(src) - ..() - - - proc - receive_command(obj/source, command, datum/signal/signal) - if((source != host) || !(src in host)) - return 1 - - if(!command) - return 1 - - return 0 - - send_command(command, datum/signal/signal) - if(!command || !host) - return - - src.host.receive_command(src, command, signal) - - return - -/obj/item/weapon/peripheral/radio - name = "Wireless card" - var/frequency = 1419 - var/code = null - var/datum/radio_frequency/radio_connection - New() - ..() - if(radio_controller) - initialize() - - initialize() - set_frequency(frequency) - - proc - set_frequency(new_frequency) - radio_controller.remove_object(src, frequency) - frequency = new_frequency - radio_connection = radio_controller.add_object(src, frequency) - - receive_command(obj/source, command, datum/signal/signal) - if(..()) - return - - if(!signal || !radio_connection) - return - - switch(command) - if("send signal") - src.radio_connection.post_signal(src, signal) - - return - - receive_signal(datum/signal/signal) - if(!signal || (signal.encryption && signal.encryption != code)) - return - - var/datum/signal/newsignal = new - newsignal.data = signal.data - if(src.code) - newsignal.encryption = src.code - - send_command("radio signal",newsignal) - return - -/obj/item/weapon/peripheral/printer - name = "Printer module" - desc = "A small printer designed to fit into a computer casing." - icon_state = "card_mod" - var/printing = 0 - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal) - return - - if((command == "print") && !src.printing) - src.printing = 1 - - var/print_data = signal.data["data"] - var/print_title = signal.data["title"] - if(!print_data) - src.printing = 0 - return - spawn(50) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.host.loc ) - P.info = print_data - if(print_title) - P.name = "[print_title]" - - src.printing = 0 - return - - return - -/obj/item/weapon/peripheral/prize_vendor - name = "Prize vending module" - desc = "An arcade prize dispenser designed to fit inside a computer casing." - icon_state = "power_mod" - var/last_vend = 0 //Delay between vends if manually activated(ie a dude is holding it and shaking stuff out) - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(command == "vend prize") - src.vend_prize() - - return - - attack_self(mob/user as mob) - if( (last_vend + 400) < world.time) - user << "You shake something out of [src]!" - src.vend_prize() - src.last_vend = world.time - else - user << "\red [src] isn't ready to dispense a prize yet." - - return - - proc/vend_prize() - var/obj/item/prize - var/prizeselect = rand(1,4) - var/turf/prize_location = null - - if(src.host) - prize_location = src.host.loc - else - prize_location = get_turf(src) - - switch(prizeselect) - if(1) - prize = new /obj/item/weapon/money( prize_location ) - prize.name = "space ticket" - prize.desc = "It's almost like actual currency!" - if(2) - prize = new /obj/item/device/radio/beacon( prize_location ) - prize.name = "electronic blink toy game" - prize.desc = "Blink. Blink. Blink." - if(3) - prize = new /obj/item/weapon/flame/lighter/zippo( prize_location ) - prize.name = "Burno Lighter" - prize.desc = "Almost like a decent lighter!" - if(4) - prize = new /obj/item/weapon/c_tube( prize_location ) - prize.name = "toy sword" - prize.icon = 'icons/obj/weapons.dmi' - prize.icon_state = "sword1" - prize.desc = "A sword made of cheap plastic." - -/* -/obj/item/weapon/peripheral/card_scanner - name = "ID scanner module" - icon_state = "card_mod" - var/obj/item/weapon/card/id/authid = null - - attack_self(mob/user as mob) - if(authid) - user << "The card falls out." - src.authid.loc = get_turf(user) - src.authid = null - - return - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal || (signal.data["ref_id"] != "\ref[src]") ) - return - - switch(command) - if("eject card") - if(src.authid) - src.authid.loc = src.host.loc - src.authid = null - if("add card access") - var/new_access = signal.data["access"] - if(!new_access) - return - - - - return -*/ \ No newline at end of file diff --git a/code/unused/conveyor.dm b/code/unused/conveyor.dm deleted file mode 100644 index 5001660d7fe..00000000000 --- a/code/unused/conveyor.dm +++ /dev/null @@ -1,398 +0,0 @@ -// converyor belt - -// moves items/mobs/movables in set direction every ptick - - -/obj/machinery/conveyor - icon = 'icons/obj/recycling.dmi' - icon_state = "conveyor0" - name = "conveyor belt" - desc = "A conveyor belt." - anchored = 1 - var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off - var/operable = 1 // true if can operate (no broken segments in this belt run) - var/basedir // this is the default (forward) direction, set by the map dir - // note dir var can vary when the direction changes - - var/list/affecting // the list of all items that will be moved this ptick - var/id = "" // the control ID - must match controller ID - // following two only used if a diverter is present - var/divert = 0 // if non-zero, direction to divert items - var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense) - - - - // create a conveyor - -/obj/machinery/conveyor/New() - ..() - basedir = dir - setdir() - - // set the dir and target turf depending on the operating direction - -/obj/machinery/conveyor/proc/setdir() - if(operating == -1) - set_dir(turn(basedir,180)) - else - set_dir(basedir) - update() - - - // update the icon depending on the operating condition - -/obj/machinery/conveyor/proc/update() - if(stat & BROKEN) - icon_state = "conveyor-b" - operating = 0 - return - if(!operable) - operating = 0 - icon_state = "conveyor[(operating != 0) && !(stat & NOPOWER)]" - - - // machine process - // move items to the target location -/obj/machinery/conveyor/process() - if(stat & (BROKEN | NOPOWER)) - return - if(!operating) - return - use_power(100) - - var/movedir = dir // base movement dir - if(divert && dir==divdir) // update if diverter present - movedir = divert - - - affecting = loc.contents - src // moved items will be all in loc - spawn(1) // slight delay to prevent infinite propagation due to map order - var/items_moved = 0 - for(var/atom/movable/A in affecting) - if(!A.anchored) - if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt - if(ismob(A)) - var/mob/M = A - if(M.buckled == src) - var/obj/machinery/conveyor/C = locate() in get_step(src, dir) - M.buckled = null - step(M,dir) - if(C) - M.buckled = C - else - new/obj/item/stack/cable_coil/cut(M.loc) - else - step(M,movedir) - else - step(A,movedir) - items_moved++ - if(items_moved >= 10) - break - -// attack with item, place item on conveyor - -/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/grab)) // special handling if grabbing a mob - var/obj/item/weapon/grab/G = I - G.affecting.Move(src.loc) - del(G) - return - else if(istype(I, /obj/item/stack/cable_coil)) // if cable, see if a mob is present - var/mob/M = locate() in src.loc - if(M) - if (M == user) - src.visible_message("\blue [M] ties \himself to the conveyor.") - // note don't check for lying if self-tying - else - if(M.lying) - user.visible_message("\blue [M] has been tied to the conveyor by [user].", "\blue You tie [M] to the converyor!") - else - user << "\blue [M] must be lying down to be tied to the converyor!" - return - M.buckled = src - src.add_fingerprint(user) - I:use(1) - M.lying = 1 - return - - // else if no mob in loc, then allow coil to be placed - - else if(istype(I, /obj/item/weapon/wirecutters)) - var/mob/M = locate() in src.loc - if(M && M.buckled == src) - M.buckled = null - src.add_fingerprint(user) - if (M == user) - src.visible_message("\blue [M] cuts \himself free from the conveyor.") - else - src.visible_message("\blue [M] had been cut free from the conveyor by [user].") - return - - if(isrobot(user)) - return - - // otherwise drop and place on conveyor - user.drop_item() - if(I && I.loc) I.loc = src.loc - return - -// attack with hand, move pulled object onto conveyor - -/obj/machinery/conveyor/attack_hand(mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - user.stop_pulling() - else - step(user.pulling, get_dir(user.pulling.loc, src)) - user.stop_pulling() - return - - -// make the conveyor broken -// also propagate inoperability to any connected conveyor with the same ID -/obj/machinery/conveyor/proc/broken() - stat |= BROKEN - update() - - var/obj/machinery/conveyor/C = locate() in get_step(src, basedir) - if(C) - C.set_operable(basedir, id, 0) - - C = locate() in get_step(src, turn(basedir,180)) - if(C) - C.set_operable(turn(basedir,180), id, 0) - - -//set the operable var if ID matches, propagating in the given direction - -/obj/machinery/conveyor/proc/set_operable(stepdir, match_id, op) - - if(id != match_id) - return - operable = op - - update() - var/obj/machinery/conveyor/C = locate() in get_step(src, stepdir) - 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() - - -// converyor diverter -// extendable arm that can be switched so items on the conveyer are diverted sideways -// situate in same turf as conveyor -// only works if belts is running proper direction -// -// -/obj/machinery/diverter - icon = 'icons/obj/recycling.dmi' - icon_state = "diverter0" - name = "diverter" - desc = "A diverter arm for a conveyor belt." - anchored = 1 - layer = FLY_LAYER - var/obj/machinery/conveyor/conv // the conveyor this diverter works on - var/deployed = 0 // true if diverter arm is extended - var/operating = 0 // true if arm is extending/contracting - var/divert_to // the dir that diverted items will be moved - var/divert_from // the dir items must be moving to divert - - -// create a diverter -// set up divert_to and divert_from directions depending on dir state -/obj/machinery/diverter/New() - - ..() - - switch(dir) - if(NORTH) - divert_to = WEST // stuff will be moved to the west - divert_from = NORTH // if entering from the north - if(SOUTH) - divert_to = EAST - divert_from = NORTH - if(EAST) - divert_to = EAST - divert_from = SOUTH - if(WEST) - divert_to = WEST - divert_from = SOUTH - if(NORTHEAST) - divert_to = NORTH - divert_from = EAST - if(NORTHWEST) - divert_to = NORTH - divert_from = WEST - if(SOUTHEAST) - divert_to = SOUTH - divert_from = EAST - if(SOUTHWEST) - divert_to = SOUTH - divert_from = WEST - spawn(2) - // wait for map load then find the conveyor in this turf - conv = locate() in src.loc - if(conv) // divert_from dir must match possible conveyor movement - if(conv.basedir != divert_from && conv.basedir != turn(divert_from,180) ) - del(src) // if no dir match, then delete self - set_divert() - update() - -// update the icon state depending on whether the diverter is extended -/obj/machinery/diverter/proc/update() - icon_state = "diverter[deployed]" - -// call to set the diversion vars of underlying conveyor -/obj/machinery/diverter/proc/set_divert() - if(conv) - if(deployed) - conv.divert = divert_to - conv.divdir = divert_from - else - conv.divert= 0 - - -// *** TESTING click to toggle -/obj/machinery/diverter/Click() - toggle() - - -// toggle between arm deployed and not deployed, showing animation -// -/obj/machinery/diverter/proc/toggle() - if( stat & (NOPOWER|BROKEN)) - return - - if(operating) - return - - use_power(50) - operating = 1 - if(deployed) - flick("diverter10",src) - icon_state = "diverter0" - sleep(10) - deployed = 0 - else - flick("diverter01",src) - icon_state = "diverter1" - sleep(10) - deployed = 1 - operating = 0 - update() - set_divert() - -// don't allow movement into the 'backwards' direction if deployed -/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == divert_to) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != turn(divert_from,180)) - -// don't allow movement through the arm if deployed -/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == turn(divert_to,180)) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != divert_from) - - - - - -// the conveyor control switch -// -// - -/obj/machinery/conveyor_switch - - name = "conveyor switch" - desc = "A conveyor control switch." - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/position = 0 // 0 off, -1 reverse, 1 forward - var/last_pos = -1 // last direction setting - var/operated = 1 // true if just operated - - var/id = "" // must match conveyor IDs to control them - - var/list/conveyors // the list of converyors that are controlled by this switch - anchored = 1 - - - -/obj/machinery/conveyor_switch/New() - ..() - update() - - spawn(5) // allow map load - conveyors = list() - for(var/obj/machinery/conveyor/C in world) - if(C.id == id) - conveyors += C - -// update the icon depending on the position - -/obj/machinery/conveyor_switch/proc/update() - if(position<0) - icon_state = "switch-rev" - else if(position>0) - icon_state = "switch-fwd" - else - icon_state = "switch-off" - - -// timed process -// if the switch changed, update the linked conveyors - -/obj/machinery/conveyor_switch/process() - if(!operated) - return - operated = 0 - - for(var/obj/machinery/conveyor/C in conveyors) - C.operating = position - C.setdir() - -// attack with hand, switch position -/obj/machinery/conveyor_switch/attack_hand(mob/user) - if(position == 0) - if(last_pos < 0) - position = 1 - last_pos = 0 - else - position = -1 - last_pos = 0 - else - last_pos = position - position = 0 - - operated = 1 - update() - - // find any switches with same id as this one, and set their positions to match us - for(var/obj/machinery/conveyor_switch/S in world) - if(S.id == src.id) - S.position = position - S.update() diff --git a/code/unused/disease2/cureimplanter.dm b/code/unused/disease2/cureimplanter.dm deleted file mode 100644 index 45064954561..00000000000 --- a/code/unused/disease2/cureimplanter.dm +++ /dev/null @@ -1,42 +0,0 @@ -/obj/item/weapon/cureimplanter - name = "Hypospray injector" - icon = 'icons/obj/items.dmi' - icon_state = "implanter1" - var/datum/disease2/resistance/resistance = null - var/works = 0 - var/datum/disease2/disease/virus2 = null - item_state = "syringe_0" - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - - -/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob) - if(ismob(target)) - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] is trying to inject [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] is trying to inject themselves with [src.name]!", 1) - if(!do_mob(user, target,60)) return - - - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] injects themself with [src.name]!", 1) - - - var/mob/living/carbon/M = target - - if(works == 0 && prob(25)) - M.resistances2 += resistance - if(M.virus2) - M.virus2.cure_added(resistance) - else if(works == 1) - M.adjustToxLoss(rand(20,50)) - else if(works == 2) - M.adjustToxLoss(rand(50,100)) - else if(works == 3) - infect_virus2(M,virus2,1) diff --git a/code/unused/disease2/curer.dm b/code/unused/disease2/curer.dm deleted file mode 100644 index dab15f4967e..00000000000 --- a/code/unused/disease2/curer.dm +++ /dev/null @@ -1,154 +0,0 @@ -/obj/machinery/computer/curer - name = "Cure Research Machine" - icon = 'icons/obj/computer.dmi' - icon_state = "dna" -// brightnessred = 0 -// brightnessgreen = 2 //Used for multicoloured lighting on BS12 -// brightnessblue = 2 - var/curing - var/virusing - circuit = "/obj/item/weapon/circuitboard/mining" - - var/obj/item/weapon/virusdish/dish = null - -/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob) - /*if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src)*/ - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/curer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(curing) - dat = "Antibody production in progress" - else if(virusing) - dat = "Virus production in progress" - else if(dish) - dat = "Virus dish inserted" - if(dish.virus2) - if(dish.growth >= 100) - dat += "
Begin antibody production" - dat += "
Begin virus production" - else - dat += "
Insufficent cells to attempt to create cure" - else - dat += "
Please check dish contents" - - dat += "
Eject disk" - else - dat = "Please insert dish" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/curer/process() - ..() - - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(curing) - curing -= 1 - if(curing == 0) - icon_state = "dna" - if(dish.virus2) - createcure(dish.virus2) - if(virusing) - virusing -= 1 - if(virusing == 0) - icon_state = "dna" - if(dish.virus2) - createvirus(dish.virus2) - - return - -/obj/machinery/computer/curer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["antibody"]) - curing = 30 - dish.growth -= 50 - src.icon_state = "dna" - if (href_list["virus"]) - virusing = 30 - dish.growth -= 100 - src.icon_state = "dna" - else if(href_list["eject"]) - dish.loc = src.loc - dish = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/curer/proc/createcure(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.resistance = new /datum/disease2/resistance(dish.virus2) - if(probG("Virus curing",3)) - implanter.works = 0 - else - implanter.works = rand(1,2) - state("The [src.name] Buzzes") - -/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.name = "Viral implanter (MAJOR BIOHAZARD)" - implanter.virus2 = dish.virus2.getcopy() - implanter.works = 3 - state("The [src.name] Buzzes") - - -/obj/machinery/computer/curer/proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) diff --git a/code/unused/disease2/monkeydispensor.dm b/code/unused/disease2/monkeydispensor.dm deleted file mode 100644 index 13d1b9806f6..00000000000 --- a/code/unused/disease2/monkeydispensor.dm +++ /dev/null @@ -1,30 +0,0 @@ -/obj/machinery/disease2/monkeycloner - name = "Monkey dispensor" - icon = 'icons/obj/cloning.dmi' - icon_state = "pod_0" - density = 1 - anchored = 1 - - var/cloning = 0 - -/obj/machinery/disease2/monkeycloner/attack_hand() - if(!cloning) - cloning = 150 - - icon_state = "pod_g" - -/obj/machinery/disease2/monkeycloner/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(cloning) - cloning -= 1 - if(!cloning) - new /mob/living/carbon/monkey(src.loc) - icon_state = "pod_0" - - - - return diff --git a/code/unused/dna.dm b/code/unused/dna.dm deleted file mode 100644 index 604acbefc6b..00000000000 --- a/code/unused/dna.dm +++ /dev/null @@ -1,962 +0,0 @@ -/proc/scram(n) - var/t = "" - var/p = null - p = 1 - while(p <= n) - t = text("[][]", t, rand(1, 9)) - p++ - return t - -/obj/machinery/computer/dna - name = "DNA operations computer" - desc = "A Computer used to advanced DNA stuff." - icon_state = "dna" - var/obj/item/weapon/card/data/scan = null - var/obj/item/weapon/card/data/modify = null - var/obj/item/weapon/card/data/modify2 = null - var/mode = null - var/temp = null - -/obj/machinery/computer/dna/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_hand(mob/user as mob) - if(..()) - return - user.machine = src - if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) - var/dat = text("Please Insert the cards into the slots
\n\t\t\t\tFunction Disk: []
\n\t\t\t\tTarget Disk: []
\n\t\t\t\tAux. Data Disk: []
\n\t\t\t\t\t(Not always used!)
\n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("Execute Function", src) : "No function disk inserted!")) - if (src.temp) - dat = text("[]

Clear Message", src.temp, src) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - else - var/dat = text("[]
\n\t\t\t\t[] []
\n\t\t\t\t[] []
\n\t\t\t\t[] []
\n\t\t\t\t\t(Not always used!)
\n\t\t\t\t[]", stars("Please Insert the cards into the slots"), stars("Function Disk:"), src, (src.scan ? text("[]", src.scan.name) : "----------"), stars("Target Disk:"), src, (src.modify ? text("[]", src.modify.name) : "----------"), stars("Aux. Data Disk:"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("[]", src, stars("Execute Function")) : stars("No function disk inserted!"))) - if (src.temp) - dat = text("[]

[]", stars(src.temp), src, stars("Clear Message")) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - return - -/obj/machinery/computer/dna/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["modify"]) - if (src.modify) - src.modify.loc = src.loc - src.modify = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify = I - src.mode = null - if (href_list["modify2"]) - if (src.modify2) - src.modify2.loc = src.loc - src.modify2 = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify2 = I - src.mode = null - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - src.mode = null - if (href_list["clear"]) - src.temp = null - if (href_list["execute"]) - if ((src.scan && src.scan.function)) - switch(src.scan.function) - if("data_mutate") - if (src.modify) - if (!( findtext(src.scan.data, "-", 1, null) )) - if ((src.modify.data && src.scan.data && length(src.modify.data) >= length(src.scan.data))) - src.modify.data = text("[][]", src.scan.data, (length(src.modify.data) > length(src.scan.data) ? copytext(src.modify.data, length(src.scan.data) + 1, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - var/d = findtext(src.modify.data, "-", 1, null) - var/t = copytext(src.modify.data, d + 1, length(src.modify.data) + 1) - d = text2num(copytext(1, d, null)) - if ((d && t && src.modify.data && src.scan.data && length(src.modify.data) >= (length(t) + d - 1) )) - src.modify.data = text("[][][]", copytext(src.modify.data, 1, d), t, (length(src.modify.data) > length(t) + d ? copytext(src.modify.data, length(t) + d, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("dna_seq") - src.temp = "DNA Systems Help:\nHuman DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (28 chromosomes)\n\t\t5BDFE293BA5500F9FFFD500AAFFE\n\tStructural Enzymes:\n\t\tCDE375C9A6C25A7DBDA50EC05AC6CEB63\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\t493DB249EB6D13236100A37000800AB71\n\tSpecies/Genus Classification: Homo Sapien\n\nMonkey DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (16 chromosomes)\n\t\t2B6696D2B127E5A4\n\tStructural Enzymes:\n\t\tCDEAF5B90AADBC6BA8033DB0A7FD613FA\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\tC8FFFE7EC09D80AEDEDB9A5A0B4085B61\n\tSpecies/Genus Classification: Generic Monkey\n>" - if("dna_help") - src.temp = "DNA Systems Help:\nThe DNA systems consists 3 systems.\nI. DNA Scanner/Implanter - This system is slightly advanced to use. It accepts\n\t1 disk. Before you wish to run a function/program you must implant the\n\tdisk data into the temporary memory. Note that once this is done the disk can\n\tbe removed to place a data disk in.\nII. DNA computer - This is a simple yet fast computer that basically operates on data.\nIII. Restructurer - This device reorganizes the anatomical structure of the subject\n\taccording to the DNA sequences. Please note that it is illegal to perform a\n\ttransfer from one species to or from the Homo sapiens species but\n\thuman to human is acceptable under UNSD guidlines.\n\tNote: This machine is programmed to operate on specific preprogrammed species with\n\tspecialized anatomical blueprints hard coded into its databanks. It cannot operate\n\ton other species. (Current: Human, Monkey)\n\nData Disks:\n\tThese run on 2 (or 3) types: DNA scanner program disks and data modification\nfunctions (and disk modification functions)\n\nDisk-Copy\n\tThis erases the target disk and completely copies the data from the aux. disk.\nDisk-Erase\n\tThis erases everything on the target disk.\nData-Clear\n\tThis erases (clears) only the data.\n\nData-Trunicate\n\tThis removes data from the target disk (parameters gathered from data slot on target\n\tdisk). This fuction has 4 modes (a,b,c,default) defined by this way. (mode id)(#)\n\ta - This cuts # data from the end. (ex a1 on ABCD = ABC)\n\tb - This cuts # data from the beginning. (ex b1 on ABCD = BCD)\n\tc - This limits the data from the end. (ex c1 on ABCD = A)\n\tdefault - This limits the data from the end. (ex 1 on ABCD = D)\nData-Add\n\tThis adds thedata on the aux. disk to the data on the target disk.\nData-Sramble\n\tThis scrambles the data on the target disk. The length is equal to\n\tthe length of the original data.\nData-Input\n\tThis lets you input data into the data slot of any data disk.\n\tNote: This doesn't work only on storage.\nData-Mutate\n\tThis basically inserts text. You follow this format:\n\tpos-text (or just text for automatic pos 1)\n\tie 2-IVE on FOUR yields FIVE\n" - if("data_add") - if (src.modify) - if (src.modify2) - if ((src.modify.data && src.modify2.data)) - src.modify.data += src.modify2.data - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - src.temp = "Cannot read data! (may be null)" - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_scramble") - if (src.modify) - if (length(text("[]", src.modify.data)) >= 1) - src.modify.data = scram(length(text("[]", src.modify.data))) - src.temp = text("Data scrambled: []", src.modify.data) - else - src.temp = "No data to scramble" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_input") - if (src.modify) - var/dat = input(usr, ">", text("[]", src.name), null) as text - var/s = src.scan - var/m = src.modify - if ((usr.stat || usr.restrained() || src.modify != m || src.scan != s)) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) - src.modify.data = dat - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_copy") - if (src.modify) - if (src.modify2) - src.modify.function = src.modify2.function - src.modify.data = src.modify2.data - src.modify.special = src.modify2.special - src.temp = "All disk data/programs copied." - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_dis") - if (src.modify) - src.temp = text("Function: [][]
Data: []", src.modify.function, (src.modify.special ? text("-[]", src.modify.special) : null), src.modify.data) - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_erase") - if (src.modify) - src.modify.data = null - src.modify.function = "storage" - src.modify.special = null - src.temp = "All Disk contents deleted." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_clear") - if (src.modify) - src.modify.data = null - src.temp = "Disk data cleared." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_trun") - if (src.modify) - if ((src.modify.data && src.scan.data)) - var/l1 = length(src.modify.data) - var/l2 = max(round(text2num(src.scan.data)), 1) - switch(copytext(src.modify.data, 1, 2)) - if("a") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, 1, (l1 - l2) + 1) - else - src.modify.data = "" - src.temp = text("Done!
New Data:
[]", src.modify.data) - if("b") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, l2, l1 + 1) - else - src.modify.data = "" - src.temp = text("Done!
New Data:
[]", src.modify.data) - if("c") - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, l1 - l2, l1 + 1) - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, 1, l2 + 1) - src.temp = text("Done!
New Data:
[]", src.modify.data) - else - src.temp = "Cannot read data! (may be null and note that function data slot is used instead of aux disk!!)" - else - src.temp = "Disk Failure: Cannot read target disk!" - else - else - src.temp = "System Failure: Cannot read disk function!" - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer/dna/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/dna_scanner/allow_drop() - return 0 - -/obj/machinery/dna_scanner/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/dna_scanner/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "scanner_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, user as mob) - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The scanner is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "scanner_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/dna_scanner/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "scanner_0" - return - -/obj/machinery/dna_scanner/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(35) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(108) - //SN src = null - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(181) - //SN src = null - del(src) - return - else - return - - -/obj/machinery/dna_scanner/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - -/obj/machinery/scan_console/ex_act(severity) - - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/scan_console/blob_act() - - if(prob(75)) - del(src) - -/obj/machinery/scan_console/power_change() - if(stat & BROKEN) - icon_state = "broken" - else if(powered()) - icon_state = initial(icon_state) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - src.icon_state = "c_unpowered" - stat |= NOPOWER - -/obj/machinery/scan_console/New() - ..() - spawn( 5 ) - src.connected = locate(/obj/machinery/dna_scanner, get_step(src, WEST)) - return - return - -/obj/machinery/scan_console/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - var/mob/M - if (!( src.status )) - return - if (!( src.func )) - src.temp = "No function loaded into memory core!" - src.status = null - if ((src.connected && src.connected.occupant)) - M = src.connected.occupant - if (src.status == "load") - src.prog_p1 = null - src.prog_p2 = null - src.prog_p3 = null - src.prog_p4 = null - switch(src.func) - if("dna_trun") - if (src.data) - src.prog_p1 = copytext(src.data, 1, 2) - src.prog_p2 = text2num(src.data) - src.prog_p3 = src.special - src.status = "dna_trun" - src.temp = "Executing trunication function on occupant." - else - src.temp = "No data implanted in core memory." - src.status = null - if("dna_scan") - if (src.special) - if (src.scan) - if (istype(M, /mob)) - switch(src.special) - if("UI") - src.temp = text("Scan Complete:
Data downloaded to disk!
Unique Identifier: []", M.primary.uni_identity) - src.scan.data = M.primary.uni_identity - if("SE") - src.temp = text("Scan Complete:
Data downloaded to disk!
Structural Enzymes: []", M.primary.struc_enzyme) - src.scan.data = M.primary.struc_enzyme - if("UE") - src.temp = text("Scan Complete:
Data downloaded to disk!
Used Enzynmes: []", M.primary.use_enzyme) - src.scan.data = M.primary.use_enzyme - if("SI") - src.temp = text("Scan Complete:
Data downloaded to disk!
Species Identifier: []", M.primary.spec_identity) - src.scan.data = M.primary.spec_identity - else - else - src.temp = "No occupant to scan!" - else - src.temp = "Error: No disk to upload data to." - else - src.temp = "Error: Function program errors." - src.status = null - if("dna_replace") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_replace" - src.temp = "Executing repalcement function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - if("dna_add") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_add" - src.temp = "Executing addition function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - else - src.temp = "Cannot execute program!" - src.status = null - else - if (src.status == "dna_trun") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p3) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - switch(src.prog_p1) - if("a") - src.prog_p4 = length(t) - if("b") - src.prog_p4 = 1 - else - else - if (src.prog_p1 == "a") - src.prog_p4-- - else - if (src.prog_p1 == "b") - src.prog_p4-- - switch(src.prog_p1) - if("a") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Trunicating []'s DNA sequence...
[]
Status: [] units left.

Emergency Abort", M.name, t, src.prog_p4, src) - if("b") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Trunicating []'s DNA sequence...
[]
Status: [] units left.

Emergency Abort", M.name, t, src.prog_p4, src) - if("c") - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Limiting []'s DNA sequence...
[]
Status: [] units converting to [] units.

Emergency Abort", M.name, t, length(t), src.prog_p2, src) - else - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Limiting []'s DNA sequence...
[]
Status: [] units converting to [] units.

Emergency Abort", M.name, t, length(t), src.prog_p2, src) - switch(src.prog_p3) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_replace") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if ((src.prog_p4 > length(t) || src.prog_p4 > length(src.prog_p2))) - src.temp = "Replacement complete" - src.status = null - else - t = text("[][][]", copytext(t, 1, src.prog_p4), copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1), (src.prog_p4 < length(t) ? copytext(t, src.prog_p4 + 1, length(t) + 1) : null)) - src.temp = text("Replacing []'s DNA sequence...
[]
Target: []
Status: At position []

Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_add") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if (src.prog_p4 > length(src.prog_p2)) - src.temp = "Addition complete" - src.status = null - else - t = text("[][]", t, copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1)) - src.temp = text("Adding to []'s DNA sequence...
[]
Adding: []
Position: []

Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - src.status = null - src.temp = "Unknown system error." - src.updateDialog() - return - -/obj/machinery/scan_console/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_hand(user as mob) - if(..()) - return - var/dat - if (src.temp) - dat = text("[]

Clear Message", src.temp, src) - else - if (src.connected) - var/mob/occupant = src.connected.occupant - dat = "Occupant Statistics:
" - if (occupant) - var/t1 - switch(occupant.stat) - if(0) - t1 = "Conscious" - if(1) - t1 = "Unconscious" - else - t1 = "*dead*" - dat += text("[]\tHealth %: [] ([])

", (occupant.health > 50 ? "" : ""), occupant.health, t1) - else - dat += "The scanner is empty.
" - if (!( src.connected.locked )) - dat += text("Lock (Unlocked)
", src) - else - dat += text("Unlock (Locked)
", src) - dat += text("Disk: []
\n[]
\n[]
", src, - (src.scan ? text("[]", src.scan.name) : "----------"), - (src.scan ? text("Upload Data", src) : "No disk to upload"), - ((src.data || src.func || src.special) ? text("Clear Data
Execute Data
Function Type: [][]
Data: []", src, src, src.func, (src.special ? text("-[]", src.special) : null), src.data) : "No data uploaded")) - dat += text("

Close", user) - user << browse(dat, "window=scanner;size=400x500") - onclose(user, "scanner") - return - -/obj/machinery/scan_console/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["locked"]) - if ((src.connected && src.connected.occupant)) - src.connected.locked = !( src.connected.locked ) - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["u_dat"]) - if ((src.scan && !( src.status ))) - if ((src.scan.function && src.scan.function != "storage")) - src.func = src.scan.function - src.special = src.scan.special - if (src.scan.data) - src.data = src.scan.data - else - src.temp = "No disk found or core data access lock out!" - if (href_list["c_dat"]) - if (!src.status) - src.func = null - src.data = null - src.special = null - else - src.temp = "No disk found or core data access lock out!" - if (href_list["clear"]) - src.temp = null - if (href_list["abort"]) - src.status = null - if (href_list["e_dat"]) - if (!( src.status )) - src.status = "load" - src.temp = "Loading..." - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/restruct/allow_drop() - return 0 - -/obj/machinery/restruct/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/restruct/verb/operate() - set src in oview(1) - - src.add_fingerprint(usr) - if ((src.occupant && src.occupant.primary)) - switch(src.occupant.primary.spec_identity) - if("5BDFE293BA5500F9FFFD500AAFFE") - if (!istype(src.occupant, /mob/living/carbon/human)) - for(var/obj/O in src.occupant) - del(O) - - var/mob/living/carbon/human/O = new /mob/living/carbon/human( src ) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - var/t1 = hex2num(copytext(O.primary.uni_identity, 25, 28)) - if (t1 < 125) - O.gender = MALE - else - O.gender = FEMALE - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - src.occupant = O - //M = null - del(M) - src.occupant = O - src.occupant << "Done!" - if("2B6696D2B127E5A4") - if (!istype(src.occupant, /mob/living/carbon/monkey)) - for(var/obj/O in src.occupant) - del(O) - var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - O << "Genetic Transversal Complete!" - src.occupant = O - del(M) - O.name = text("monkey ([])", copytext(md5(src.occupant.primary.uni_identity), 2, 6)) - src.occupant << "Done!" - else - if (istype(src.occupant, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src.occupant - - var/speak = (length(H.primary.struc_enzyme) >= 25 ? hex2num(copytext(H.primary.struc_enzyme, 22, 25)) : 9999) - var/ears = (length(H.primary.struc_enzyme) >= 10 ? hex2num(copytext(H.primary.struc_enzyme, 7, 10)) : 9999) - var/vision = (length(H.primary.struc_enzyme) >= 16 ? hex2num(copytext(H.primary.struc_enzyme, 13, 16)) : 1) - var/mental1 = (length(H.primary.struc_enzyme) >= 31 ? hex2num(copytext(H.primary.struc_enzyme, 28, 31)) : 1) - var/mental2 = (length(H.primary.struc_enzyme) >= 28 ? hex2num(copytext(H.primary.struc_enzyme, 25, 28)) : 1) - var/speak2 = (length(H.primary.struc_enzyme) >= 22 ? hex2num(copytext(H.primary.struc_enzyme, 19, 22)) : 1) - H.sdisabilities = 0 - H.disabilities = 0 - if (speak < 3776) - H.disabilities = H.disabilities | 4 - else - if (speak > 3776) - H.sdisabilities = H.sdisabilities | 2 - if (speak2 < 2640) - H.disabilities = H.disabilities | 16 - if (ears > 3226) - H.sdisabilities = H.sdisabilities | 4 - if (vision < 1447) - H.sdisabilities = H.sdisabilities | 1 - else - if (vision > 1447) - H.disabilities = H.disabilities | 1 - if (mental1 < 1742) - H.disabilities = H.disabilities | 2 - if (mental2 < 1452) - H.disabilities = H.disabilities | 8 - var/t1 = null - if (length(H.primary.uni_identity) >= 20) - t1 = copytext(H.primary.uni_identity, 19, 21) - if (hex2num(t1) > 127) - H.gender = FEMALE - else - H.gender = MALE - else - H.gender = NEUTER - if (length(H.primary.uni_identity) >= 18) - t1 = copytext(H.primary.uni_identity, 17, 19) - H.ns_tone = hex2num(t1) - H.ns_tone = -H.ns_tone + 35 - else - H.ns_tone = 1 - H.ns_tone = -H.ns_tone + 35 - if (length(H.primary.uni_identity) >= 16) - t1 = copytext(H.primary.uni_identity, 15, 17) - H.b_eyes = hex2num(t1) - else - H.b_eyes = 255 - if (length(H.primary.uni_identity) >= 14) - t1 = copytext(H.primary.uni_identity, 13, 15) - H.g_eyes = hex2num(t1) - else - H.g_eyes = 255 - if (length(H.primary.uni_identity) >= 12) - t1 = copytext(H.primary.uni_identity, 11, 13) - H.r_eyes = hex2num(t1) - else - H.r_eyes = 255 - if (length(H.primary.uni_identity) >= 10) - t1 = copytext(H.primary.uni_identity, 9, 11) - H.nb_hair = hex2num(t1) - else - H.nb_hair = 255 - if (length(H.primary.uni_identity) >= 8) - t1 = copytext(H.primary.uni_identity, 7, 9) - H.ng_hair = hex2num(t1) - else - H.ng_hair = 255 - if (length(H.primary.uni_identity) >= 6) - t1 = copytext(H.primary.uni_identity, 5, 7) - H.nr_hair = hex2num(t1) - else - H.nr_hair = 255 - H.r_hair = H.nr_hair - H.g_hair = H.ng_hair - H.b_hair = H.nb_hair - H.s_tone = H.ns_tone - H.update_face() - H.update_body() - - if (reg_dna[H.primary.uni_identity]) - H.real_name = reg_dna[H.primary.uni_identity] - else - var/i - while (!i) - var/randomname - if (src.gender == MALE) - randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names))) - else - randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) - if (findname(randomname)) - continue - else - H.real_name = randomname - i++ - reg_dna[H.primary.uni_identity] = H.real_name - H << text("\red Your name is now [].", H.real_name) - return - -/obj/machinery/restruct/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "restruct_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/restruct/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, user as mob) - if(..()) - return - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The machine is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "restruct_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/restruct/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "restruct_0" - return - -/obj/machinery/restruct/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - else - return - -/obj/machinery/restruct/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) \ No newline at end of file diff --git a/code/unused/dna_mutations.dm b/code/unused/dna_mutations.dm deleted file mode 100644 index 006a57eff41..00000000000 --- a/code/unused/dna_mutations.dm +++ /dev/null @@ -1,101 +0,0 @@ - - -/* NOTES: - -This system could be expanded to migrate all of our current mutations to. Maybe. - - -*/ - - -/* /datum/mutations : - * - * A /datum representation of "hidden" mutations. - * - */ -/datum/mutations - - var/list/requirements = list() // list of randomly-genned requirements - var/required = 1 // the number of requirements to generate - - var/list/races = list("Human") // list of races the mutation effect - - proc/get_mutation(var/mob/living/carbon/M) // Called when check_mutation() is successful - ..() - - proc/check_mutation(var/mob/living/carbon/M) // Called in dna.dm, when a target's SE is modified - - if(! ("all" in races)) // "all" means it affects everyone! - if(istype(M, /mob/living/carbon/human)) - if(! ("Human" in races)) - return - if(istype(M, /mob/living/carbon/monkey)) - if(! ("monkey" in races)) - return - // TODO: add more races maybe?? - - - var/passes = 0 - for(var/datum/mutationreq/require in requirements) - - var/se_block[] = getblockbuffer(M.dna.struc_enzymes, require.block, 3) // focus onto the block - if(se_block.len == 3) // we want to make sure there are exactly 3 entries - - if(se_block[require.subblock] == require.reqID) - - passes++ - - if(passes == required) // all requirements met - get_mutation(M) - - - Lasereyes - /* - Lets you shoot laser beams through your eyes. Fancy! - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a searing heat inside your eyes!" - M.mutations.Add(LASER) - - Healing - /* - Lets you heal other people, and yourself. But it doesn't let you heal dead people. - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a pleasant warmth pulse throughout your body..." - M.mutations.Add(HEAL) - -/* /datum/mutationreq : - * - * A /datum representation of a requirement in order for a mutation to happen. - * - */ - -/datum/mutationreq - var/block // The block to read - var/subblock // The sub-block to read - var/reqID // The required hexadecimal identifier to be equal to the sub-block being read. - - - - -/* -HEY: If you want to be able to get superpowers easily just uncomment this shit. -mob/verb/checkmuts() - for(var/datum/mutations/mut in global_mutations) - - for(var/datum/mutationreq/R in mut.requirements) - src << "Block: [R.block]" - src << "Sub-Block: [R.subblock]" - src << "Required ID: [R.reqID]" - src << "" - -mob/verb/editSE(t as text) - src:dna:struc_enzymes = t - domutcheck(src) - -*/ diff --git a/code/unused/filter_control.dm b/code/unused/filter_control.dm deleted file mode 100644 index 2e7188bd104..00000000000 --- a/code/unused/filter_control.dm +++ /dev/null @@ -1,162 +0,0 @@ -// Currently only used to control /obj/machinery/inlet/filter -// todo: expand to vent control as well? - -/obj/machinery/filter_control/New() - ..() - spawn(5) //wait for world - for(var/obj/machinery/inlet/filter/F in machines) - if(F.control == src.control) - F.f_mask = src.f_mask - desc = "A remote control for a filter: [control]" - -/obj/machinery/filter_control/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/detective_scanner)) - return ..() - if(istype(W, /obj/item/weapon/screwdriver)) - src.add_fingerprint(user) - user.show_message(text("\red Now [] the panel...", (src.locked) ? "unscrewing" : "reattaching"), 1) - sleep(30) - src.locked =! src.locked - src.updateicon() - return - if(istype(W, /obj/item/weapon/wirecutters) && !src.locked) - stat ^= BROKEN - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1) - src.updateicon() - return - if(istype(W, /obj/item/weapon/card/emag) && !emagged) - emagged++ - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has shorted out the []'s access system with an electromagnetic card!", user, src), 1) - src.updateicon() - return src.attack_hand(user) - return src.attack_hand(user) - -/obj/machinery/filter_control/process() - if(!(stat & NOPOWER)) - use_power(5,ENVIRON) - AutoUpdateAI(src) - src.updateUsrDialog() - src.updateicon() - -/obj/machinery/filter_control/attack_hand(mob/user as mob) - if(stat & NOPOWER) - user << browse(null, "window=filter_control") - user.machine = null - return - if(user.stat || user.lying) - return - if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon/ai)) - return 0 - - var/list/gases = list("O2", "N2", "Plasma", "CO2", "N2O") - var/dat - user.machine = src - - var/IGoodConnection = 0 - var/IBadConnection = 0 - - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - IGoodConnection++ - else if(F.control == src.control) - IBadConnection++ - var/ITotalConnections = IGoodConnection+IBadConnection - - if(ITotalConnections && !(stat & BROKEN)) //ugly - dat += "Connection status: Inlets:[ITotalConnections]/[IGoodConnection]
\n Control ID: [control]

\n" - else - dat += "No Connections Detected!
\n Control ID: [control]
\n" - if(!stat & BROKEN) - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Siphoning" : "Passing"]
\n" - else - dat += "Warning! Severe Internal Memory Corruption!
\n
\nConsult a qualified station technician immediately!

\n" - dat += "
\nError codes: 0x0000001E 0x0000007B
\n" - - dat += "
\nClose
\n" - user << browse(dat, "window=filter_control;size=300x225") - onclose(user, "filter_control") -/obj/machinery/filter_control/Topic(href, href_list) - if (href_list["close"]) - usr << browse(null, "window=filter_control;") - usr.machine = null - return //Who cares if we're dead or whatever let us close the fucking window - if(..()) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (src.allowed(usr) || src.emagged && !(stat & BROKEN)) - if (href_list["tg"]) //someone modified the html so I added a check here - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - for(var/obj/machinery/inlet/filter/FI in machines) - if(FI.control == src.control) - FI.f_mask ^= text2num(href_list["tg"]) - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=filter_control") - usr.machine = null - return - -/obj/machinery/filter_control/proc/updateicon() - overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter_control-nopower" - return - icon_state = "filter_control" - if(src.locked && (stat & BROKEN)) - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - else if(!src.locked) - icon_state = "filter_control-unlocked" - if(stat & BROKEN) - overlays += image('icons/obj/stationobjs.dmi', "filter_control-wirecut") - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - - var/GoodConnection = 0 - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - GoodConnection++ - break - - if(GoodConnection && src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control1") - else if(GoodConnection) - overlays += image('icons/obj/stationobjs.dmi', "filter_control10") - else if(src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control0") - else - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-co2") - return - -/obj/machinery/filter_control/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - src.updateicon() - return \ No newline at end of file diff --git a/code/unused/game_kit.dm b/code/unused/game_kit.dm deleted file mode 100644 index 3a96d168788..00000000000 --- a/code/unused/game_kit.dm +++ /dev/null @@ -1,138 +0,0 @@ -/* -CONTAINS: -THAT STUPID GAME KIT -Which I am commenting out /N -*/ -/* -/obj/item/weapon/game_kit/New() - src.board_stat = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" - src.selected = "CR" - -/obj/item/weapon/game_kit/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/game_kit/MouseDrop(mob/user as mob) - if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr))) - if (usr.hand) - if (!usr.l_hand) - spawn (0) - src.attack_hand(usr, 1, 1) - else - if (!usr.r_hand) - spawn (0) - src.attack_hand(usr, 0, 1) - -/obj/item/weapon/game_kit/proc/update() - var/dat = text("
Game Board

[] remove
", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src) - for (var/y = 1 to 8) - dat += "" - - for (var/x = 1 to 8) - var/color = (y + x) % 2 ? "#ffffff" : "#999999" - var/piece = copytext(src.board_stat, ((y - 1) * 8 + x) * 2 - 1, ((y - 1) * 8 + x) * 2 + 1) - - dat += "" - - dat += "" - - dat += "
" - dat += "" - if (piece != "BB") - dat += "" - else - dat += "" - dat += "

Chips:
" - for (var/piece in list("CB", "CR")) - dat += "" - - dat += "
Chess pieces:
" - for (var/piece in list("WP", "WK", "WQ", "WI", "WN", "WR")) - dat += "" - dat += "
" - for (var/piece in list("BP", "BK", "BQ", "BI", "BN", "BR")) - dat += "" - src.data = dat - -/obj/item/weapon/game_kit/attack_hand(mob/user as mob, unused, flag) - - if (flag) - return ..() - else - user.machine = src - if (!( src.data )) - update() - user << browse(src.data, "window=game_kit") - onclose(user, "game_kit") - return - return - -/obj/item/weapon/game_kit/Topic(href, href_list) - ..() - if ((usr.stat || usr.restrained())) - return - - if (usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) - if (href_list["s_piece"]) - src.selected = href_list["s_piece"] - else if (href_list["mode"]) - if (href_list["mode"] == "remove") - src.selected = "remove" - else - src.selected = null - else if (href_list["s_board"]) - if (!( src.selected )) - src.selected = href_list["s_board"] - else - var/tx = text2num(copytext(href_list["s_board"], 1, 2)) - var/ty = text2num(copytext(href_list["s_board"], 3, 4)) - if ((copytext(src.selected, 2, 3) == " " && length(src.selected) == 3)) - var/sx = text2num(copytext(src.selected, 1, 2)) - var/sy = text2num(copytext(src.selected, 3, 4)) - var/place = ((sy - 1) * 8 + sx) * 2 - 1 - src.selected = copytext(src.board_stat, place, place + 2) - if (place == 1) - src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127)) - else - if (place) - src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129)) - place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected) - else - if (place) - src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129)) - src.selected = null - else - if (src.selected == "remove") - var/place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127)) - else - if (place) - src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129)) - else - if (length(src.selected) == 2) - var/place = ((ty - 1) * 8 + tx) * 2 - 1 - if (place == 1) - src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129)) - else - if (place == 127) - src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected) - else - if (place) - src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129)) - src.add_fingerprint(usr) - update() - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.attack_hand(M) -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ctf.dm b/code/unused/gamemodes/ctf.dm deleted file mode 100644 index 5a464c0ce26..00000000000 --- a/code/unused/gamemodes/ctf.dm +++ /dev/null @@ -1,141 +0,0 @@ -/* -/datum/game_mode/ctf - name = "ctf" - config_tag = "ctf" - -/datum/game_mode/ctf/announce() - world << "The current game mode is - Capture the Flag!" - world << "Capture the other teams flag and bring it back to your base!" - world << "Respawn is on" - -/datum/game_mode/ctf/pre_setup() - - config.allow_ai = 0 - var/list/mobs = list() - var/total_mobs - for(var/mob/living/carbon/human/M in world) - if (M.client) - mobs += M - total_mobs++ - - var/obj/R = locate("landmark*Red-Spawn") - var/obj/G = locate("landmark*Green-Spawn") - - var/mob_check - for(var/mob/living/carbon/human/M in mobs) - if(!M) - continue - mob_check++ - if(mob_check <= total_mobs/2) //add to red team else to green - spawn() - if(M.client) - M << "You are in the Red Team!" - del(M.wear_suit) - M.w_uniform = new /obj/item/clothing/under/color/red(M) - M.w_uniform.layer = 20 - del(M.shoes) - M.wear_suit = new /obj/item/clothing/suit/armor/tdome/red(M) - M.wear_suit.layer = 20 - M.shoes = new /obj/item/clothing/shoes/black(M) - M.shoes.layer = 20 - M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M) - M.wear_mask.layer = 20 - M.gloves = new /obj/item/clothing/gloves/swat(M) - M.gloves.layer = 20 - M.glasses = new /obj/item/clothing/glasses/thermal(M) - M.glasses.layer = 20 - var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M) - H.set_frequency(1465) - M.w_radio = H - M.w_radio.layer = 20 - var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M) - M.back = O - M.back.layer = 20 - M.internal = O - - del(M.wear_id) - var/obj/item/weapon/card/id/W = new(M) - W.name = "[M.real_name]'s ID card (Red Team)" - W.access = access_red - W.assignment = "Red Team" - W.registered_name = M.real_name - M.wear_id = W - M.wear_id.layer = 20 - if(R) - M.loc = R.loc - else - world << "No red team spawn point detected" - M.client.team = "Red" - else - spawn() - if(M.client) - M << "You are in the Green Team!" - del(M.wear_suit) - M.w_uniform = new /obj/item/clothing/under/color/green(M) - M.w_uniform.layer = 20 - del(M.shoes) - M.wear_suit = new /obj/item/clothing/suit/armor/tdome/green(M) - M.wear_suit.layer = 20 - M.shoes = new /obj/item/clothing/shoes/black(M) - M.shoes.layer = 20 - M.wear_mask = new /obj/item/clothing/mask/gas/emergency(M) - M.wear_mask.layer = 20 - M.gloves = new /obj/item/clothing/gloves/swat(M) - M.gloves.layer = 20 - M.glasses = new /obj/item/clothing/glasses/thermal(M) - M.glasses.layer = 20 - var/obj/item/device/radio/headset/H = new /obj/item/device/radio/headset(M) - H.set_frequency(1449) - M.w_radio = H - M.w_radio.layer = 20 - var/obj/item/weapon/tank/air/O = new /obj/item/weapon/tank/air(M) - M.back = O - M.back.layer = 20 - M.internal = O - - del(M.wear_id) - var/obj/item/weapon/card/id/W = new(M) - W.name = "[M.real_name]'s ID card (Green Team)" - W.access = access_green - W.assignment = "Green Team" - W.registered_name = M.real_name - M.wear_id = W - M.wear_id.layer = 20 - if(G) - M.loc = G.loc - else - world << "No green team spawn point detected" - M.client.team = "Green" - - -/datum/game_mode/ctf/post_setup() - abandon_allowed = 1 - setup_game() - - spawn (50) - var/obj/L = locate("landmark*Red-Flag") - if (L) - new /obj/item/weapon/ctf_flag/red(L.loc) - else - world << "No red flag spawn point detected" - - L = locate("landmark*Green-Flag") - if (L) - new /obj/item/weapon/ctf_flag/green(L.loc) - else - world << "No green flag spawn point detected" - - L = locate("landmark*The-Red-Team") - if (L) - new /obj/machinery/red_injector(L.loc) - else - world << "No red team spawn injector point detected" - - L = locate("landmark*The-Green-Team") - if (L) - new /obj/machinery/green_injector(L.loc) - else - world << "No green team injector spawn point detected" - ..() - -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ctf_items.dm b/code/unused/gamemodes/ctf_items.dm deleted file mode 100644 index 74c907826b6..00000000000 --- a/code/unused/gamemodes/ctf_items.dm +++ /dev/null @@ -1,139 +0,0 @@ -/obj/item/weapon/ctf_flag - name = "Flag" - desc = "Its a flag" - w_class = 5 - icon = 'flags.dmi' - icon_state = "flag_neutral" - item_state = "paper" - -/obj/item/weapon/ctf_flag/red - name = "The Red Flag" - desc = "Catch dat fukken flag" - icon_state = "flag_red" - -/obj/item/weapon/ctf_flag/green - name = "The Green Flag" - desc = "Catch dat fukken flag" - icon_state = "flag_green" - -/obj/item/weapon/ctf_flag/New() - ..() - spawn(200) - process() - return - -/obj/item/weapon/ctf_flag/process() - if(istype(src, /obj/item/weapon/ctf_flag/green)) - var/obj/L = locate("landmark*Green-Flag") - if(locate("landmark*Green-Flag", src)) - spawn(200) - process() - return - else if(!src.check_if_equipped() && L) - new /obj/item/weapon/ctf_flag/green(L.loc) - del(src) - if(istype(src, /obj/item/weapon/ctf_flag/red)) - var/obj/L = locate("landmark*Red-Flag") - if(locate("landmark*Red-Flag", src)) - spawn(200) - process() - return - else if(!src.check_if_equipped() && L) - new /obj/item/weapon/ctf_flag/red(L.loc) - del(src) - return - -/obj/item/weapon/ctf_flag/proc/check_if_equipped() - var/equipped = 0 - for(var/mob/M in living_mob_list) - if(M &&!M.stat) - var/list/L = M.get_contents() - if(src in L) - equipped = 1 - break - return equipped - -/obj/machinery/red_injector - name = "Red Team Flag Injector" - desc = "Insert flag here" - anchored = 1 - density = 1 - var/score = 0 - var/operating = 0 - icon = 'flags.dmi' - icon_state = "red_injector" -/* -/obj/machinery/red_injector/ex_act(severity) - return - -/obj/machinery/red_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user) - if(src.operating) - user << "Cannot put a flag in right now" - return - src.operating = 1 - if(istype(C, /obj/item/weapon/ctf_flag/green)) - if(locate("landmark*Red-Flag", /obj/item/weapon/ctf_flag/red)) - src.score++ - world << "[user.real_name] has scored for the red team!" - if(ticker.mode.name == "ctf") - ticker.red_score++ - var/obj/L = locate("landmark*Green-Flag") - if (L) - del(C) - new /obj/item/weapon/ctf_flag/green(L.loc) - else - world << "No green flag spawn point detected" - if(src.score >= 15) - world << "The Red Team has won!" - world << "They have scored [score] times with the flag!" - sleep(300) - world.Reboot() - else - user << "\red You need to have your flag in the beginning position!" - else if(istype(C, /obj/item/weapon/ctf_flag/red)) - world << "[user.real_name] has tried to score with their own flag! Idiot!" - src.operating = 0 - return -*/ -/obj/machinery/green_injector - name = "Green Team Flag Injector" - desc = "Insert flag here" - anchored = 1 - density = 1 - var/operating = 0 - var/score = 0 - icon = 'flags.dmi' - icon_state = "green_injector" - -/obj/machinery/green_injector/ex_act(severity) - return -/* -/obj/machinery/green_injector/attackby(var/obj/item/weapon/ctf_flag/C, mob/user) - if(src.operating) - user << "Cannot put a flag in right now" - return - src.operating = 1 - if(istype(C, /obj/item/weapon/ctf_flag/red)) - if(locate("landmark*Green-Flag", /obj/item/weapon/ctf_flag/green)) - src.score++ - world << "[user.real_name] has scored for the green team!" - if(ticker.mode.name == "ctf") - ticker.green_score++ - var/obj/L = locate("landmark*Red-Flag") - if (L) - del(C) - new /obj/item/weapon/ctf_flag/red(L.loc) - else - world << "No red flag spawn point detected" - if(src.score >= 15) - world << "The Green Team has won!" - world << "They have scored [score] times with the flag!" - sleep(300) - world.Reboot() - else - user << "\red You need to have your flag in the beginning position!" - else if(istype(C, /obj/item/weapon/ctf_flag/green)) - world << "[user.real_name] has tried to score with their own flag! Idiot!" - src.operating = 0 - return -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/deathmatch.dm b/code/unused/gamemodes/deathmatch.dm deleted file mode 100644 index e748eb4f20d..00000000000 --- a/code/unused/gamemodes/deathmatch.dm +++ /dev/null @@ -1,67 +0,0 @@ -/* -/datum/game_mode/deathmatch - name = "deathmatch" - config_tag = "deathmatch" - var/startedat - var/const/gamelength = 15 * 600 // 1/10 second - - announce() - world << "The current game mode is - Death Commando Deathmatch!" - world << "Just kill everyone else. They're gonna try to kill you, after all. Respawning is enabled." - - post_setup() - startedat = world.realtime - abandon_allowed = 1 - setup_game() - - // TODO: DEFERRED Make this massively cleaner. It should hook before spawning, not after. - var/list/mobs = list() - for(var/mob/living/carbon/human/M in world) - if (M.client) - mobs += M - for(var/mob/living/carbon/human/M in mobs) - spawn() - if(M.client) - for(var/obj/item/weapon/W in list(M.wear_suit, M.w_uniform, M.r_store, M.l_store, M.wear_id, M.belt, - M.gloves, M.glasses, M.head, M.ears, M.shoes, M.wear_mask, M.back, - M.handcuffed, M.r_hand, M.l_hand)) - M.u_equip(W) - del(W) - - var/randomname = "Killiam Shakespeare" - if(commando_names.len) - randomname = pick(commando_names) - commando_names -= randomname - var/newname = input(M,"You are a death commando. Would you like to change your name?", "Character Creation", randomname) - if(!length(newname)) - newname = randomname - newname = strip_html(newname,40) - - M.real_name = newname - M.name = newname // there are WAY more things than this to change, I'm almost certain - - M.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(M), slot_w_uniform) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/swat_suit/death_commando(M), slot_wear_suit) - M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/death_commando(M), slot_wear_mask) - M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves) - M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(M), slot_glasses) - M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(M), slot_l_hand) - M.equip_to_slot_or_del(new /obj/item/weapon/m_pill/cyanide(M), slot_l_store) - M.equip_to_slot_or_del(new /obj/item/weapon/flashbang(M), slot_r_store) - - var/obj/item/weapon/tank/air/O = new(M) - M.equip_to_slot_or_del(O, slot_back) - M.internal = O - - var/obj/item/weapon/card/id/W = new(M) - W.access = get_all_accesses() - W.name = "[newname]'s ID card (Death Commando)" - W.assignment = "Death Commando" - W.registered_name = newname - M.equip_to_slot_or_del(W, slot_wear_id) - ..() - - check_win() - return 1 -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/restructuring.dm b/code/unused/gamemodes/restructuring.dm deleted file mode 100644 index eff8acb7248..00000000000 --- a/code/unused/gamemodes/restructuring.dm +++ /dev/null @@ -1,77 +0,0 @@ -/datum/game_mode/restructuring - name = "Corporate Restructuring" - config_tag = "restructuring" -/* -/datum/game_mode/restructuring/announce() - world << "\red GLOBAL TRANSMISSION FROM HEAD OFFICE: A CORPORATE RESTRUCTURING IS TO TAKE PLACE" - world << "\red Stay tuned for further news; note that we do care for our employees and any layoffs will be dealt with discretion and compassion" - - -/datum/game_mode/restructuring/post_setup() - setup_game() - var/list/mobs = get_mob_list() - while (mobs.len == 0) - sleep 30 - mobs = get_mob_list() - spawn (120) - pick_target() - ..() - -/datum/game_mode/restructuring/proc/pick_target(who) - var/mob/target - var/mob/target_desc - - if (!who) - target = pick(get_mob_list()) - target_desc = get_target_desc(target) - world << "\red HEAD OFFICE: [target_desc] is accused of attempting to start a Union and is now considered a threat to the station. Terminate the employee immediately." - else - target = who - target_desc = get_target_desc(target) - world << "\red HEAD OFFICE: [target_desc] is accused of fornicating with staff of the same sex. Terminate the employee immediately." - ticker.target = target - - target.store_memory("Head office has ordered your downsizing. Ruh roh", 0) - - for(var/mob/living/silicon/ai/M in world) - M << "These are your laws now:" - M.set_zeroth_law("[target_desc] is not human.") - M.show_laws() - -/datum/game_mode/restructuring/check_win() - var/list/left_alive = get_mob_list() - if (left_alive.len == 1) - var/thewinner = the_winner() - world << "\red HEAD OFFICE: Thanks to his superior brown-nosing abilities, [thewinner] has been promoted to senior management! Congratulations!" - return 1 - else if (left_alive.len == 0) - world << "\red HEAD OFFICE: Cost cutting measures have achieved 100% efficiency. Thank you for understanding our position during this volatile economic downturn." - return 1 - else - if(ticker.target.stat != 2) - return 0 - world << "\red HEAD OFFICE: It seems we have made a mistake in our paperwork. The previous target for termination was chosen based on race, sex, and/or religious beliefs, which is against company policy. Please cancel previous termination request." - pick_target() - return 0 - -/datum/game_mode/restructuring/proc/get_mob_list() - var/list/mobs = list() - for(var/mob/M in world) - if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human)) - mobs += M - return mobs - -/datum/game_mode/restructuring/proc/the_winner() - for(var/mob/M in world) - if (M.stat<2 && M.client && istype(M, /mob/living/carbon/human)) - return M.name - -/datum/game_mode/restructuring/proc/get_target_desc(mob/target) //return a useful string describing the target - var/targetrank = null - for(var/datum/data/record/R in data_core.general) - if (R.fields["name"] == target.real_name) - targetrank = R.fields["rank"] - if(!targetrank) - return "[target.name]" - return "[target.name] the [targetrank]" -*/ \ No newline at end of file diff --git a/code/unused/gamemodes/ruby.dm b/code/unused/gamemodes/ruby.dm deleted file mode 100644 index 5636bcb575b..00000000000 --- a/code/unused/gamemodes/ruby.dm +++ /dev/null @@ -1,289 +0,0 @@ -// RUBY MODE -// There is a weapon of some sort that spawns on the station -// It calls out to crew members in an effort to find a wielder -// The wielder is made an abomination - they're given a grotesque mask and special powers -// The Abomination wins by murdering the entire crew, then himself -// The crew wins by destroying the weapon - - -/datum/game_mode/ruby - name = "ruby" - config_tag = "ruby" - - var/datum/mind/abomination - var/finished = 0 - var/abominationwins = 0 - var/winnerkey - var/obj/macguffin - var/list/killed = list() - var/respawns = 0 - - - -/datum/game_mode/ruby/post_setup() - var/list/possible_abominations = get_possible_abominations() - - if(possible_abominations.len>0) - abomination = pick(possible_abominations) - /* - if(istype(ruby)) - abomination.special_role = "abomination" - if(wizardstart.len == 0) - wizard.current << "\red A starting location for you could not be found, please report this bug!" - else - var/starting_loc = pick(wizardstart) - wizard.current.loc = starting_loc - - for (var/obj/effect/landmark/A in world) - if (A.name == "Teleport-Scroll") - new /obj/item/weapon/teleportation_scroll(A.loc) - del(A) - continue - */ - ..() - -/datum/game_mode/ruby/check_finished() - if(!macguffin || abominationwins) - return 1 - else - return 0 - -/datum/game_mode/ruby/declare_completion() - if(abominationwins) - feedback_set_details("round_end_result","win - abomination win") - world << "The Abomination has murdered the station and sacrificed himself to Cjopaze! (played by [winnerkey])" - else - feedback_set_details("round_end_result","loss - abomination killed") - world << "The Abomination has been stopped and Cjopaze's influence resisted! The station lives another day," - if(killed.len > 0) - world << "Those who were sacrificed shall be remembered: " - for(var/mob/M in killed) - if(M) - world << "[M.real_name]" - /* - for(var/datum/mind/traitor in traitors) - var/traitorwin = 1 - var/traitor_name - - if(traitor.current) - traitor_name = "[traitor.current.real_name] (played by [traitor.key])" - else - traitor_name = "[traitor.key] (character destroyed)" - - world << "The syndicate traitor was [traitor_name]" - var/count = 1 - for(var/datum/objective/objective in traitor.objectives) - if(objective.check_completion()) - world << "Objective #[count]: [objective.explanation_text] \green Success" - else - world << "Objective #[count]: [objective.explanation_text] \red Failed" - traitorwin = 0 - count++ - - if(traitorwin) - world << "The traitor was successful!" - else - world << "The traitor has failed!" - */ - ..() - return 1 - - -/datum/game_mode/ruby/proc/spawn_macguffin() - -/datum/game_mode/ruby/proc/get_possible_abominations() - - -/mob/proc/make_abomination() - src.see_in_dark = 20 - src.verbs += /client/proc/planar_shift - src.verbs += /client/proc/vile_ressurection - src.verbs += /client/proc/defile_corpse - src.verbs += /client/proc/summon_weapon - src.verbs += /client/proc/sacrifice_self - src.verbs += /client/proc/hunt - src.verbs += /client/proc/howl - var/datum/game_mode/ruby/rmode = ticker.mode - rmode.abomination = src.mind - return - - -/client/proc/planar_shift() - set name = "Planar Shift" - set category = "Abomination" - // This is a pretty shitty way to do this. Should use the spell_holder method from Wizard mode - /* - if(!usr.incorporeal_move) - usr.sight |= SEE_MOBS - usr.sight |= SEE_OBJS - usr.sight |= SEE_TURFS - //usr.density = 0 - usr.incorporeal_move = 1 - else - usr.sight &= ~SEE_MOBS - usr.sight &= ~SEE_TURFS - usr.sight &= ~SEE_OBJS - usr.density = 1 - usr.incorporeal_move = 0 - src.verbs -= /client/proc/planar_shift - spawn(300) src.verbs += /client/proc/planar_shift - */ - -/client/proc/vile_ressurection() - set name = "Vile Ressurection" - set category = "Abomination" - if(src.mob.stat != 2 || !src.mob) - return - if(ticker.mode:respawns > 0) - // spawn a new body - ticker.mode:respawns -= 1 - else - // nope - -/client/proc/defile_corpse(var/mob/living/carbon/human/H in view()) - set name = "Defile Corpse" - set category = "Abomination" - if(istype(H, /mob/living/carbon/human)) - var/datum/game_mode/ruby/rmode = ticker.mode - rmode.killed.Add(H) - ticker.mode:respawns += 1 - var/fluffmessage = pick("\red [usr] rips the flesh from [H]'s corpse and plucks their eyes from their sockets!", "\red [usr] does unspeakable things to [H]'s corpse!", "\red [usr] binds [H]'s corpse with their own entrails!") - usr.visible_message(fluffmessage) - // play sound - -/client/proc/summon_weapon() - set name = "Summon Weapon" - set category = "Abomination" - - for(var/obj/item/weapon/rubyweapon/w in world) - if(istype(w, /obj/item/weapon/rubyweapon)) - if(istype(w.loc, /mob)) - var/mob/M = w.loc - M.drop_item() - w.loc = usr.loc - else - w.loc = usr.loc - src.verbs -= /client/proc/summon_weapon - spawn(300) src.verbs += /client/proc/summon_weapon - return - -/client/proc/sacrifice_self() - set name = "Sacrifice Self" - set category = "Abomination" - set desc = "Everything must come to an end. After you have freed them, you must free yourself." - - for(var/mob/living/carbon/human/H in player_list) - if(!H.client || H.client == src) - continue - src << "Your work is not done. You will not find release until they are all free." - return - usr.gib(1) - ticker.mode:abominationwins = 1 - -/client/proc/hunt() - set name = "Hunt" - set category = "Abomination" - set desc = "" - - var/list/candidates = list() - - for(var/mob/living/carbon/human/H in player_list) - if(!H.client || H.client == src) continue - //if(!H.client) continue - candidates.Add(H) - - usr.visible_message(text("\red [usr]'s flesh ripples and parts, revealing dozens of eyes poking from its surface. They all glance wildly around for a few moments before receding again.")) - - var/mob/living/carbon/human/H = pick(candidates) - - if(!H) return - - var/filename="crmap[ckey].tmp" - var/html="" - var/denytypes[0] - var/tilesizex=32 - var/tilesizey=32 - //If the temp. file exists, delete it - src << browse("

Sensing prey...

", "window=hunt") - if (fexists(filename)) fdel(filename) - - //Display everything in the world - for (var/y=H.y-3,y<=H.y+3,y++) - html+="" - text2file(html,filename) - html="" - sleep(-1) - //for (var/x=H.x-5,x<=H.x+5,x++) - for(var/x=H.x-3, x<=H.x+3, x++) - //Turfs - var/turf/T=locate(x,y,H.z) - if (!T) continue - var/icon/I=icon(T.icon,T.icon_state) - var/imgstring=replacetext("[T.type]-[T.icon_state]","/","_") - - //Movable atoms - for (var/atom/movable/A in T) - //Make sure it's allowed to be displayed - var/allowed=1 - for (var/X in denytypes) - if (istype(A,X)) - allowed=0 - break - if (!allowed) continue - - if (A.icon) I.Blend(icon(A.icon,A.icon_state,A.dir),ICON_OVERLAY) - imgstring+=replacetext("__[A.type]_[A.icon_state]","/","_") - - //Output it - src << browse_rsc(I,"[imgstring].dmi") - html+="" - - text2file("
",filename) - - //Display it - src << browse(file(filename),"window=hunt") - - - -/client/proc/howl() // This is just a way for the Abomination to make the game more atmospheric periodically. - set name = "Howl" - set category = "Abomination" - set desc = "" - - usr.visible_message(text("\red [usr]'s form warbles and distorts before settling back into its grotesque shape once more.")) - // Play a random spooky sound - maybe cause some visual, non-mechanical effects to appear at random for a few seconds. - - src.verbs -= /client/proc/howl - spawn(rand(300,1800)) src.verbs += /client/proc/howl - -/obj/item/weapon/rubyweapon - desc = "" - name = "wepon" - icon_state = "wepon" - w_class = 3.0 - throwforce = 60.0 - throw_speed = 2 - throw_range = 20 - force = 24.0 - var/mob/owner - - proc/check_owner() - if(!owner) - sleep(300) - if(!owner) - spawn() search_for_new_owner() - else - spawn(1800) check_owner() - - proc/search_for_new_owner() - var/list/possible_owners = list() - for(var/mob/living/carbon/human/H in mob_list) - possible_owners.Add(H) - - var/mob/living/carbon/human/H = pick(possible_owners) - // Send message to H - // Take a snapshot of the item's location, browse it to H - spawn(rand(600,1800)) search_for_new_owner() - - attack_self(mob/user as mob) - // Blow all lights nearby \ No newline at end of file diff --git a/code/unused/heater.dm b/code/unused/heater.dm deleted file mode 100644 index 3af7770a066..00000000000 --- a/code/unused/heater.dm +++ /dev/null @@ -1,201 +0,0 @@ -/obj/machinery/atmoalter/heater/proc/setstate() - - if(stat & NOPOWER) - icon_state = "heater-p" - return - - if (src.holding) - src.icon_state = "heater1-h" - else - src.icon_state = "heater1" - return - -/obj/machinery/atmoalter/heater/process() - /* - if(stat & NOPOWER) return - use_power(5) - - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - else - T = null - if (src.h_status) - var/t1 = src.gas.total_moles() - if ((t1 > 0 && src.gas.temperature < (src.h_tar+T0C))) - var/increase = src.heatrate / t1 - var/n_temp = src.gas.temperature + increase - src.gas.temperature = min(n_temp, (src.h_tar+T0C)) - use_power( src.h_tar*8) - switch(src.t_status) - if(1.0) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - src.t_status = 3 - if(2.0) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - src.t_status = 3 - else - - src.updateDialog() - src.setstate() - return - */ - -/obj/machinery/atmoalter/heater/New() - ..() - src.gas = new /datum/gas_mixture() - return - -/obj/machinery/atmoalter/heater/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/heater/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/heater/attack_hand(var/mob/user as mob) - /* - if(stat & (BROKEN|NOPOWER)) - return - - user.machine = src - var/tt - switch(src.t_status) - if(1.0) - tt = text("Releasing Siphon Stop", src, src) - if(2.0) - tt = text("Release SiphoningStop", src, src) - if(3.0) - tt = text("Release Siphon Stopped", src, src) - else - var/ht = null - if (src.h_status) - ht = text("Heating Stop", src) - else - ht = text("Heat Stopped", src) - var/ct = null - switch(src.c_status) - if(1.0) - ct = text("Releasing Accept Stop", src, src) - if(2.0) - ct = text("Release Accepting Stop", src, src) - if(3.0) - ct = text("Release Accept Stopped", src, src) - else - ct = "Disconnected" - var/dat = text("Canister Valves
\nContains/Capacity [] / []
\nUpper Valve Status: [][]
\n\tM - - - - [] + + + + M
\nHeater Status: [] - []
\n\tTrg Tmp: - - - [] + + +
\n
\nPipe Valve Status: []
\n\tM - - - - [] + + + + M
\n
\nClose
\n
", src.gas.total_moles(), src.maximum, tt, (src.holding ? text("
Tank ([])", src, src.holding.gas.total_moles()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.total_moles() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user) - user << browse(dat, "window=canister;size=600x300") - onclose(user, "canister") - return */ //TODO: FIX - -/obj/machinery/atmoalter/heater/Topic(href, href_list) - ..() - if (stat & (BROKEN|NOPOWER)) - return - if (usr.stat || usr.restrained()) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - else - else - if (href_list["h"]) - var/h = text2num(href_list["h"]) - if (h == 1) - src.h_status = 1 - else - src.h_status = null - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), 1000000.0) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), 1000000.0) - else - if (href_list["ht"]) - var/cp = text2num(href_list["ht"]) - src.h_tar += cp - src.h_tar = min(max(round(src.h_tar), 0), 500) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if ((cp == 1 && src.holding)) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/heater/attackby(var/obj/W as obj, var/mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/wrench)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - - if (src.c_status) - src.anchored = initial(src.anchored) - src.c_status = 0 - user.show_message("\blue You have disconnected the heater.", 1) - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the heater.", 1) - con.connected = src - else - user.show_message("\blue There is no connector here to attach the heater to.", 1) - return - diff --git a/code/unused/hivebot/death.dm b/code/unused/hivebot/death.dm deleted file mode 100644 index 43e7c257a53..00000000000 --- a/code/unused/hivebot/death.dm +++ /dev/null @@ -1,24 +0,0 @@ -/mob/living/silicon/hivebot/death(gibbed) - if(src.mainframe) - src.mainframe.return_to(src) - src.stat = 2 - src.canmove = 0 - - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.updateicon() - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) \ No newline at end of file diff --git a/code/unused/hivebot/emote.dm b/code/unused/hivebot/emote.dm deleted file mode 100644 index 239a8647395..00000000000 --- a/code/unused/hivebot/emote.dm +++ /dev/null @@ -1,139 +0,0 @@ -/mob/living/silicon/hivebot/emote(var/act) - var/param = null - if (findtext(act, "-", 1, null)) - var/t1 = findtext(act, "-", 1, null) - param = copytext(act, t1 + 1, length(act) + 1) - act = copytext(act, 1, t1) - var/m_type = 1 - var/message - - switch(act) - if ("salute") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] salutes to [param]." - else - message = "[src] salutes." - m_type = 1 - if ("bow") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] bows to [param]." - else - message = "[src] bows." - m_type = 1 - - if ("clap") - if (!src.restrained()) - message = "[src] claps." - m_type = 2 - if ("flap") - if (!src.restrained()) - message = "[src] flaps his wings." - m_type = 2 - - if ("aflap") - if (!src.restrained()) - message = "[src] flaps his wings ANGRILY!" - m_type = 2 - - if ("custom") - var/input = sanitize(copytext(input("Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN)) - if (!input) - return - var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") - if (input2 == "Visible") - m_type = 1 - else if (input2 == "Hearable") - m_type = 2 - else - alert("Unable to use this emote, must be either hearable or visible.") - return - message = "[src] [input]" - - if ("twitch") - message = "[src] twitches violently." - m_type = 1 - - if ("twitch_s") - message = "[src] twitches." - m_type = 1 - - if ("nod") - message = "[src] nods." - m_type = 1 - - if ("glare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] glares at [param]." - else - message = "[src] glares." - - if ("stare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] stares at [param]." - else - message = "[src] stares." - - if ("look") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - - if (!M) - param = null - - if (param) - message = "[src] looks at [param]." - else - message = "[src] looks." - m_type = 1 - else - src << text("Invalid Emote: []", act) - if ((message && src.stat == 0)) - if (m_type & 1) - for(var/mob/O in viewers(src, null)) - O.show_message(message, m_type) - else - for(var/mob/O in hearers(src, null)) - O.show_message(message, m_type) - return \ No newline at end of file diff --git a/code/unused/hivebot/examine.dm b/code/unused/hivebot/examine.dm deleted file mode 100644 index 2b9f3b3c4b9..00000000000 --- a/code/unused/hivebot/examine.dm +++ /dev/null @@ -1,18 +0,0 @@ -/mob/living/silicon/hivebot/examine(mob/user) - ..(user) - - if (src.stat == 2) - user << text("\red [src.name] is powered-down.") - if (src.getBruteLoss()) - if (src.getBruteLoss() < 75) - user << text("\red [src.name] looks slightly dented") - else - user << text("\red [src.name] looks severely dented!") - if (src.getFireLoss()) - if (src.getFireLoss() < 75) - user << text("\red [src.name] looks slightly burnt!") - else - user << text("\red [src.name] looks severely burnt!") - if (src.stat == 1) - user << text("\red [src.name] doesn't seem to be responding.") - return \ No newline at end of file diff --git a/code/unused/hivebot/hive_modules.dm b/code/unused/hivebot/hive_modules.dm deleted file mode 100644 index 69ffb9d62fb..00000000000 --- a/code/unused/hivebot/hive_modules.dm +++ /dev/null @@ -1,57 +0,0 @@ -/obj/item/weapon/hive_module - name = "hive robot module" - icon = 'icons/obj/module.dmi' - icon_state = "std_module" - w_class = 2.0 - item_state = "electronic" - flags = CONDUCT - var/list/modules = list() - -/obj/item/weapon/hive_module/standard - name = "give standard robot module" - -/obj/item/weapon/hive_module/engineering - name = "HiveBot engineering robot module" - -/obj/item/weapon/hive_module/New()//Shit all the mods have - src.modules += new /obj/item/device/flash(src) - - -/obj/item/weapon/hive_module/standard/New() - ..() - src.modules += new /obj/item/weapon/melee/baton(src) - src.modules += new /obj/item/weapon/extinguisher(src) - //var/obj/item/weapon/gun/mp5/M = new /obj/item/weapon/gun/mp5(src) - //M.weapon_lock = 0 - //src.modules += M - - -/obj/item/weapon/hive_module/engineering/New() - - src.modules += new /obj/item/weapon/extinguisher(src) - src.modules += new /obj/item/weapon/screwdriver(src) - src.modules += new /obj/item/weapon/weldingtool(src) - src.modules += new /obj/item/weapon/wrench(src) - src.modules += new /obj/item/device/analyzer(src) - src.modules += new /obj/item/device/flashlight(src) - - var/obj/item/weapon/rcd/R = new /obj/item/weapon/rcd(src) - R.matter = 30 - src.modules += R - - src.modules += new /obj/item/device/t_scanner(src) - src.modules += new /obj/item/weapon/crowbar(src) - src.modules += new /obj/item/weapon/wirecutters(src) - src.modules += new /obj/item/device/multitool(src) - - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src) - M.amount = 50 - src.modules += M - - var/obj/item/stack/sheet/glass/reinforced/G = new (src) - G.amount = 50 - src.modules += G - - var/obj/item/stack/cable_coil/W = new /obj/item/stack/cable_coil(src) - W.amount = 50 - src.modules += W diff --git a/code/unused/hivebot/hivebot.dm b/code/unused/hivebot/hivebot.dm deleted file mode 100644 index ade7dab091a..00000000000 --- a/code/unused/hivebot/hivebot.dm +++ /dev/null @@ -1,503 +0,0 @@ -/mob/living/silicon/hivebot/New(loc,mainframe) - src << "\blue Your icons have been generated!" - updateicon() - - if(mainframe) - dependent = 1 - src.real_name = mainframe:name - src.name = src.real_name - else - src.real_name = "Robot [pick(rand(1, 999))]" - src.name = src.real_name - - src.radio = new /obj/item/device/radio(src) - ..() - - -/mob/living/silicon/hivebot/proc/pick_module() - if(src.module) - return - var/mod = input("Please, select a module!", "Robot", null, null) in list("Combat", "Engineering") - if(src.module) - return - switch(mod) - if("Combat") - src.module = new /obj/item/weapon/hive_module/standard(src) - - if("Engineering") - src.module = new /obj/item/weapon/hive_module/engineering(src) - - - src.hands.icon_state = "malf" - updateicon() - - -/mob/living/silicon/hivebot/blob_act() - if (src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() - return 1 - return 0 - -/mob/living/silicon/hivebot/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle) - if(emergency_shuttle.has_eta() && !emergency_shuttle.returned()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - - stat(null, text("Charge Left: [src.energy]/[src.energy_max]")) - -/mob/living/silicon/hivebot/restrained() - return 0 - -/mob/living/silicon/hivebot/ex_act(severity) - if(!blinded) - flick("flash", src.flash) - - if (src.stat == 2 && src.client) - src.gib(1) - return - - else if (src.stat == 2 && !src.client) - del(src) - return - - switch(severity) - if(1.0) - if (src.stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - src.gib(1) - return - if(2.0) - if (src.stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (src.stat != 2) - adjustBruteLoss(30) - - src.updatehealth() - -/mob/living/silicon/hivebot/meteorhit(obj/O as obj) - for(var/mob/M in viewers(src, null)) - M.show_message(text("\red [src] has been hit by [O]"), 1) - //Foreach goto(19) - if (src.health > 0) - src.adjustBruteLoss(30) - if ((O.icon_state == "flaming")) - src.adjustFireLoss(40) - src.updatehealth() - return - -/mob/living/silicon/hivebot/bullet_act(flag) -/* - if (flag == PROJECTILE_BULLET) - if (src.stat != 2) - src.bruteloss += 60 - src.updatehealth() - - else if (flag == PROJECTILE_MEDBULLET) - if (src.stat != 2) - src.bruteloss += 30 - src.updatehealth() - - else if (flag == PROJECTILE_WEAKBULLET) - if (src.stat != 2) - src.bruteloss += 15 - src.updatehealth() - - else if (flag == PROJECTILE_MPBULLET) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - - else if (flag == PROJECTILE_SLUG) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() - - else if (flag == PROJECTILE_BAG) - if (src.stat != 2) - src.bruteloss += 2 - src.updatehealth() - - - else if (flag == PROJECTILE_TASER) - return - - else if (flag == PROJECTILE_WAVE) - if (src.stat != 2) - src.bruteloss += 25 - src.updatehealth() - return - - else if(flag == PROJECTILE_LASER) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - else if(flag == PROJECTILE_PULSE) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() -*/ - return - - - -/mob/living/silicon/hivebot/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if ((!( yes ) || src.now_pushing)) - return - src.now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - /*if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) - if(prob(20)) - for(var/mob/M in viewers(src, null)) - if(M.client) - M << M << "\red [src] fails to push [tmob]'s fat ass out of the way." - src.now_pushing = 0 - //src.unlock_medal("That's No Moon, That's A Gourmand!", 1) - return*/ - src.now_pushing = 0 - ..() - if (!istype(AM, /atom/movable)) - return - if (!src.now_pushing) - src.now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - step(AM, t) - src.now_pushing = null - return - return - - -/mob/living/silicon/hivebot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - if (W:remove_fuel(0)) - src.adjustBruteLoss(-30) - src.updatehealth() - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1) - else - user << "Need more welding fuel!" - return - -/mob/living/silicon/hivebot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - - if (M.a_intent == "grab") - if (M == src) - return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) - G.assailant = M - if (M.hand) - M.l_hand = G - else - M.r_hand = G - G.layer = 20 - G.affecting = src - G.synch() - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - - else if (M.a_intent == "hurt") - var/damage = rand(5, 10) - if (prob(90)) - /* - if (M.class == "combat") - damage += 15 - if(prob(20)) - src.weakened = max(src.weakened,4) - src.stunned = max(src.stunned,4) - */ - playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has slashed at []!", M, src), 1) - if(prob(8)) - flick("noise", src.flash) - src.adjustBruteLoss(damage) - src.updatehealth() - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] took a swipe at []!", M, src), 1) - return - - else if (M.a_intent == "disarm") - if(!(src.lying)) - var/randn = rand(1, 100) - if (randn <= 40) - src.stunned = 5 - step(src,get_dir(M,src)) - spawn(5) step(src,get_dir(M,src)) - playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has pushed back []!", M, src), 1) - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] attempted to push back []!", M, src), 1) - return - -/mob/living/silicon/hivebot/attack_hand(mob/user) - ..() - return - - -/mob/living/silicon/hivebot/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - return 0 - -/mob/living/silicon/hivebot/proc/check_access(obj/item/weapon/card/id/I) - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - -/mob/living/silicon/hivebot/proc/updateicon() - - src.overlays.Cut() - - if(src.stat == 0) - src.overlays += "eyes" - else - src.overlays -= "eyes" - - -/mob/living/silicon/hivebot/proc/installed_modules() - - if(!src.module) - src.pick_module() - return - var/dat = "Modules\n" - dat += {"Close -
-
- Activated Modules -
- Module 1: [module_state_1 ? "[module_state_1]" : "No Module"]
- Module 2: [module_state_2 ? "
[module_state_2]" : "No Module"]
- Module 3: [module_state_3 ? "
[module_state_3]" : "No Module"]
-
- Installed Modules

"} - - for (var/obj in src.module.modules) - if(src.activated(obj)) - dat += text("[obj]: Activated
") - else - dat += text("[obj]:
Activate
") -/* - if(src.activated(obj)) - dat += text("[obj]: \[Activated | Deactivate\]
") - else - dat += text("[obj]: \[Activate | Deactivated\]
") -*/ - src << browse(dat, "window=robotmod&can_close=0") - - -/mob/living/silicon/hivebot/Topic(href, href_list) - ..() - if (href_list["mach_close"]) - var/t1 = text("window=[href_list["mach_close"]]") - src.machine = null - src << browse(null, t1) - return - - if (href_list["mod"]) - var/obj/item/O = locate(href_list["mod"]) - O.attack_self(src) - - if (href_list["act"]) - var/obj/item/O = locate(href_list["act"]) - if(activated(O)) - src << "Already activated" - return - if(!src.module_state_1) - src.module_state_1 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_2) - src.module_state_2 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_3) - src.module_state_3 = O - O.layer = 20 - src.contents += O - else - src << "You need to disable a module first!" - src.installed_modules() - - if (href_list["deact"]) - var/obj/item/O = locate(href_list["deact"]) - if(activated(O)) - if(src.module_state_1 == O) - src.module_state_1 = null - src.contents -= O - else if(src.module_state_2 == O) - src.module_state_2 = null - src.contents -= O - else if(src.module_state_3 == O) - src.module_state_3 = null - src.contents -= O - else - src << "Module isn't activated." - else - src << "Module isn't activated" - src.installed_modules() - return - -/mob/living/silicon/hivebot/proc/uneq_active() - if(isnull(src.module_active)) - return - if(src.module_state_1 == src.module_active) - if (src.client) - src.client.screen -= module_state_1 - src.contents -= module_state_1 - src.module_active = null - src.module_state_1 = null - src.inv1.icon_state = "inv1" - else if(src.module_state_2 == src.module_active) - if (src.client) - src.client.screen -= module_state_2 - src.contents -= module_state_2 - src.module_active = null - src.module_state_2 = null - src.inv2.icon_state = "inv2" - else if(src.module_state_3 == src.module_active) - if (src.client) - src.client.screen -= module_state_3 - src.contents -= module_state_3 - src.module_active = null - src.module_state_3 = null - src.inv3.icon_state = "inv3" - - -/mob/living/silicon/hivebot/proc/activated(obj/item/O) - if(src.module_state_1 == O) - return 1 - else if(src.module_state_2 == O) - return 1 - else if(src.module_state_3 == O) - return 1 - else - return 0 - -/mob/living/silicon/hivebot/proc/radio_menu() - var/dat = {" - -Microphone: [src.radio.broadcasting ? "Engaged" : "Disengaged"]
-Speaker: [src.radio.listening ? "Engaged" : "Disengaged"]
-Frequency: -- -- -[format_frequency(src.radio.frequency)] -+ -+
-------- -
"} - src << browse(dat, "window=radio") - onclose(src, "radio") - return - - -/mob/living/silicon/hivebot/Move(a, b, flag) - - if (src.buckled) - return - - if (src.restrained()) - src.stop_pulling() - - var/t7 = 1 - if (src.restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving))))) - var/turf/T = src.loc - . = ..() - - if (src.pulling && src.pulling.loc) - if(!( isturf(src.pulling.loc) )) - src.stop_pulling() - return - else - if(Debug) - diary <<"src.pulling disappeared? at [__LINE__] in mob.dm - src.pulling = [src.pulling]" - diary <<"REPORT THIS" - - ///// - if(src.pulling && src.pulling.anchored) - src.stop_pulling() - return - - if (!src.restrained()) - var/diag = get_dir(src, src.pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, src.pulling) > 1 || diag)) - if (ismob(src.pulling)) - var/mob/M = src.pulling - var/ok = 1 - if (locate(/obj/item/weapon/grab, M.grabbed_by)) - if (prob(75)) - var/obj/item/weapon/grab/G = pick(M.grabbed_by) - if (istype(G, /obj/item/weapon/grab)) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [G.affecting] has been pulled from [G.assailant]'s grip by [src]"), 1) - del(G) - else - ok = 0 - if (locate(/obj/item/weapon/grab, M.grabbed_by.len)) - ok = 0 - if (ok) - var/atom/movable/t = M.pulling - M.stop_pulling() - step(src.pulling, get_dir(src.pulling.loc, T)) - M.start_pulling(t) - else - if (src.pulling) - step(src.pulling, get_dir(src.pulling.loc, T)) - else - src.stop_pulling() - . = ..() - if ((src.s_active && !( s_active in src.contents ) )) - src.s_active.close(src) - return - - -/mob/living/silicon/hivebot/verb/cmd_return_mainframe() - set category = "Robot Commands" - set name = "Recall to Mainframe." - return_mainframe() - -/mob/living/silicon/hivebot/proc/return_mainframe() - if(mainframe) - mainframe.return_to(src) - else - src << "\red You lack a dedicated mainframe!" - return \ No newline at end of file diff --git a/code/unused/hivebot/hivebotdefine.dm b/code/unused/hivebot/hivebotdefine.dm deleted file mode 100644 index 902c2304710..00000000000 --- a/code/unused/hivebot/hivebotdefine.dm +++ /dev/null @@ -1,46 +0,0 @@ -/mob/living/silicon/hivebot - name = "Robot" - icon = 'icons/mob/hivebot.dmi' - icon_state = "basic" - health = 80 - var/health_max = 80 - robot_talk_understand = 2 - -//HUD - var/obj/screen/cells = null - var/obj/screen/inv1 = null - var/obj/screen/inv2 = null - var/obj/screen/inv3 = null - -//3 Modules can be activated at any one time. - var/obj/item/weapon/robot_module/module = null - var/module_active = null - var/module_state_1 = null - var/module_state_2 = null - var/module_state_3 = null - - var/obj/item/device/radio/radio = null - - var/list/req_access = list(ACCESS_ROBOTICS) - var/energy = 4000 - var/energy_max = 4000 - var/jetpack = 0 - - var/mob/living/silicon/hive_mainframe/mainframe = null - var/dependent = 0 - var/shell = 1 - -/mob/living/silicon/hive_mainframe - name = "Robot Mainframe" - voice_name = "synthesized voice" - - icon_state = "hive_main" - health = 200 - var/health_max = 200 - robot_talk_understand = 2 - - anchored = 1 - var/online = 1 - var/mob/living/silicon/hivebot = null - var/hivebot_name = null - var/force_mind = 0 \ No newline at end of file diff --git a/code/unused/hivebot/hud.dm b/code/unused/hivebot/hud.dm deleted file mode 100644 index 3cc862c65d0..00000000000 --- a/code/unused/hivebot/hud.dm +++ /dev/null @@ -1,251 +0,0 @@ - -/obj/hud/proc/hivebot_hud() - - src.adding = list( ) - src.other = list( ) - src.intents = list( ) - src.mon_blo = list( ) - src.m_ints = list( ) - src.mov_int = list( ) - src.vimpaired = list( ) - src.darkMask = list( ) - - src.g_dither = new src.h_type( src ) - src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.g_dither.name = "Mask" - src.g_dither.icon_state = "dither12g" - src.g_dither.layer = 18 - src.g_dither.mouse_opacity = 0 - - src.alien_view = new src.h_type(src) - src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.alien_view.name = "Alien" - src.alien_view.icon_state = "alien" - src.alien_view.layer = 18 - src.alien_view.mouse_opacity = 0 - - src.blurry = new src.h_type( src ) - src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.blurry.name = "Blurry" - src.blurry.icon_state = "blurry" - src.blurry.layer = 17 - src.blurry.mouse_opacity = 0 - - src.druggy = new src.h_type( src ) - src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.druggy.name = "Druggy" - src.druggy.icon_state = "druggy" - src.druggy.layer = 17 - src.druggy.mouse_opacity = 0 - - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'icons/effects/station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - - var/obj/screen/using - - -//Radio - using = new src.h_type( src ) - using.name = "radio" - using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "radio" - using.screen_loc = ui_movi_old - using.layer = 20 - src.adding += using - -//Generic overlays - - using = new src.h_type(src) //Right hud bar - using.set_dir(SOUTH) - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Lower hud bar - using.set_dir(EAST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Corner Button - using.set_dir(NORTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH-1" - using.layer = 19 - src.adding += using - - -//Module select - - using = new src.h_type( src ) - using.name = "module1" - using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv1" - using.screen_loc = ui_inv1 - using.layer = 20 - src.adding += using - mymob:inv1 = using - - using = new src.h_type( src ) - using.name = "module2" - using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv2" - using.screen_loc = ui_inv2 - using.layer = 20 - src.adding += using - mymob:inv2 = using - - using = new src.h_type( src ) - using.name = "module3" - using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv3" - using.screen_loc = ui_inv3 - using.layer = 20 - src.adding += using - mymob:inv3 = using - -//End of module select - -//Intent - using = new src.h_type( src ) - using.name = "act_intent" - using.set_dir(SOUTHWEST) - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) - using.screen_loc = ui_acti - using.layer = 20 - src.adding += using - action_intent = using - - using = new src.h_type( src ) - using.name = "arrowleft" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.set_dir(WEST) - using.screen_loc = ui_iarrowleft - using.layer = 19 - src.adding += using - - using = new src.h_type( src ) - using.name = "arrowright" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.set_dir(EAST) - using.screen_loc = ui_iarrowright - using.layer = 19 - src.adding += using -//End of Intent - -//Cell - mymob:cells = new /obj/screen( null ) - mymob:cells.icon = 'icons/mob/screen1_robot.dmi' - mymob:cells.icon_state = "charge-empty" - mymob:cells.name = "cell" - mymob:cells.screen_loc = ui_toxin - -//Health - mymob.healths = new /obj/screen( null ) - mymob.healths.icon = 'icons/mob/screen1_robot.dmi' - mymob.healths.icon_state = "health0" - mymob.healths.name = "health" - mymob.healths.screen_loc = ui_health - -//Installed Module - mymob.hands = new /obj/screen( null ) - mymob.hands.icon = 'icons/mob/screen1_robot.dmi' - mymob.hands.icon_state = "nomod" - mymob.hands.name = "module" - mymob.hands.screen_loc = ui_dropbutton - -//Module Panel - using = new src.h_type( src ) - using.name = "panel" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "panel" - using.screen_loc = ui_throw - using.layer = 19 - src.adding += using - -//Store - mymob.throw_icon = new /obj/screen(null) - mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi' - mymob.throw_icon.icon_state = "store" - mymob.throw_icon.name = "store" - mymob.throw_icon.screen_loc = ui_hand - -//Temp - mymob.bodytemp = new /obj/screen( null ) - mymob.bodytemp.icon_state = "temp0" - mymob.bodytemp.name = "body temperature" - mymob.bodytemp.screen_loc = ui_temp - -//does nothing (fire and oxy) - mymob.oxygen = new /obj/screen( null ) - mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi' - mymob.oxygen.icon_state = "oxy0" - mymob.oxygen.name = "oxygen" - mymob.oxygen.screen_loc = ui_oxygen - - mymob.fire = new /obj/screen( null ) - mymob.fire.icon = 'icons/mob/screen1_robot.dmi' - mymob.fire.icon_state = "fire0" - mymob.fire.name = "fire" - mymob.fire.screen_loc = ui_fire - - - - mymob.pullin = new /obj/screen( null ) - mymob.pullin.icon = 'icons/mob/screen1_robot.dmi' - mymob.pullin.icon_state = "pull0" - mymob.pullin.name = "pull" - mymob.pullin.screen_loc = ui_pull - - mymob.blind = new /obj/screen( null ) - mymob.blind.icon = 'icons/mob/screen1_full.dmi'' - mymob.blind.icon_state = "blackimageoverlay" - mymob.blind.name = " " - mymob.blind.screen_loc = "1,1" - mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 0 - - mymob.flash = new /obj/screen( null ) - mymob.flash.icon = 'icons/mob/screen1_robot.dmi' - mymob.flash.icon_state = "blank" - mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" - mymob.flash.layer = 17 - - mymob.sleep = new /obj/screen( null ) - mymob.sleep.icon = 'icons/mob/screen1_robot.dmi' - mymob.sleep.icon_state = "sleep0" - mymob.sleep.name = "sleep" - mymob.sleep.screen_loc = ui_sleep - - mymob.rest = new /obj/screen( null ) - mymob.rest.icon = 'icons/mob/screen1_robot.dmi' - mymob.rest.icon_state = "rest0" - mymob.rest.name = "rest" - mymob.rest.screen_loc = ui_rest - - - mymob.zone_sel = new /obj/screen/zone_sel( null ) - mymob.zone_sel.overlays.Cut() - mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting)) - - mymob.client.screen = null - - mymob.client.screen += list(mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach ) - mymob.client.screen += src.adding + src.other - - return diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm deleted file mode 100644 index 362328cb4dd..00000000000 --- a/code/unused/hivebot/life.dm +++ /dev/null @@ -1,227 +0,0 @@ -/mob/living/silicon/hivebot/Life() - set invisibility = 0 - set background = 1 - - if (src.monkeyizing) - return - - if (src.stat != 2) - use_power() - - src.blinded = null - - clamp_values() - - handle_regular_status_updates() - - if(client) - src.shell = 0 - handle_regular_hud_updates() - update_items() - if(dependent) - mainframe_check() - - update_canmove() - - -/mob/living/silicon/hivebot - proc - clamp_values() - - stunned = max(min(stunned, 10),0) - paralysis = max(min(paralysis, 1), 0) - weakened = max(min(weakened, 15), 0) - sleeping = max(min(sleeping, 1), 0) - setToxLoss(0) - setOxyLoss(0) - - use_power() - - if (src.energy) - if(src.energy <= 0) - death() - - else if (src.energy <= 10) - src.module_active = null - src.module_state_1 = null - src.module_state_2 = null - src.module_state_3 = null - src.energy -=1 - else - if(src.module_state_1) - src.energy -=1 - if(src.module_state_2) - src.energy -=1 - if(src.module_state_3) - src.energy -=1 - src.energy -=1 - src.blinded = 0 - src.stat = 0 - else - src.blinded = 1 - src.stat = 1 - - update_canmove() - if(paralysis || stunned || weakened || buckled) canmove = 0 - else canmove = 1 - - - handle_regular_status_updates() - - health = src.health_max - (getFireLoss() + getBruteLoss()) - - if(health <= 0) - death() - - if (src.stat != 2) //Alive. - - if (src.paralysis || src.stunned || src.weakened) //Stunned etc. - if (src.stunned > 0) - src.stunned-- - src.stat = 0 - if (src.weakened > 0) - src.weakened-- - src.lying = 0 - src.stat = 0 - if (src.paralysis > 0) - src.paralysis-- - src.blinded = 0 - src.lying = 0 - src.stat = 1 - - else //Not stunned. - src.lying = 0 - src.stat = 0 - - else //Dead. - src.blinded = 1 - src.stat = 2 - - src.density = !( src.lying ) - - if ((src.sdisabilities & 1)) - src.blinded = 1 - if ((src.sdisabilities & 4)) - src.ear_deaf = 1 - - if (src.eye_blurry > 0) - src.eye_blurry-- - src.eye_blurry = max(0, src.eye_blurry) - - if (src.druggy > 0) - src.druggy-- - src.druggy = max(0, src.druggy) - - return 1 - - handle_regular_hud_updates() - - if (src.stat == 2 || XRAY in src.mutations) - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if (src.stat != 2) - src.sight &= ~SEE_MOBS - src.sight &= ~SEE_TURFS - src.sight &= ~SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if (src.healths) - if (src.stat != 2) - switch(health) - if(health_max to INFINITY) - src.healths.icon_state = "health0" - if(src.health_max*0.80 to src.health_max) - src.healths.icon_state = "health1" - if(src.health_max*0.60 to src.health_max*0.80) - src.healths.icon_state = "health2" - if(src.health_max*0.40 to src.health_max*0.60) - src.healths.icon_state = "health3" - if(src.health_max*0.20 to src.health_max*0.40) - src.healths.icon_state = "health4" - if(0 to health_max*0.20) - src.healths.icon_state = "health5" - else - src.healths.icon_state = "health6" - else - src.healths.icon_state = "health7" - - if (src.cells) - switch(src.energy) - if(src.energy_max*0.75 to INFINITY) - src.cells.icon_state = "charge4" - if(0.5*src.energy_max to 0.75*src.energy_max) - src.cells.icon_state = "charge3" - if(0.25*src.energy_max to 0.5*src.energy_max) - src.cells.icon_state = "charge2" - if(0 to 0.25*src.energy_max) - src.cells.icon_state = "charge1" - else - src.cells.icon_state = "charge0" - - switch(src.bodytemperature) //310.055 optimal body temp - - if(335 to INFINITY) - src.bodytemp.icon_state = "temp2" - if(320 to 335) - src.bodytemp.icon_state = "temp1" - if(300 to 320) - src.bodytemp.icon_state = "temp0" - if(260 to 300) - src.bodytemp.icon_state = "temp-1" - else - src.bodytemp.icon_state = "temp-2" - - - if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]" - - src.client.screen -= src.hud_used.blurry - src.client.screen -= src.hud_used.druggy - src.client.screen -= src.hud_used.vimpaired - - if ((src.blind && src.stat != 2)) - if ((src.blinded)) - src.blind.layer = 18 - else - src.blind.layer = 0 - - if (src.disabilities & 1) - src.client.screen += src.hud_used.vimpaired - - if (src.eye_blurry) - src.client.screen += src.hud_used.blurry - - if (src.druggy) - src.client.screen += src.hud_used.druggy - - if (src.stat != 2) - if (src.machine) - if (!( src.machine.check_eye(src) )) - src.reset_view(null) - else - if(!client.adminobs) - reset_view(null) - - return 1 - - - update_items() - if (src.client) - src.client.screen -= src.contents - src.client.screen += src.contents - if(src.module_state_1) - src.module_state_1:screen_loc = ui_inv1 - if(src.module_state_2) - src.module_state_2:screen_loc = ui_inv2 - if(src.module_state_3) - src.module_state_3:screen_loc = ui_inv3 - - mainframe_check() - if(mainframe) - if(mainframe.stat == 2) - mainframe.return_to(src) - else - death() \ No newline at end of file diff --git a/code/unused/hivebot/login.dm b/code/unused/hivebot/login.dm deleted file mode 100644 index 3a811b4c8a9..00000000000 --- a/code/unused/hivebot/login.dm +++ /dev/null @@ -1,15 +0,0 @@ -/mob/living/silicon/hivebot/Login() - ..() - - update_clothing() - - if (!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - if(src.real_name == "Hiveborg") - src.real_name += " " - src.real_name += "-[rand(1, 999)]" - src.name = src.real_name - return \ No newline at end of file diff --git a/code/unused/hivebot/mainframe.dm b/code/unused/hivebot/mainframe.dm deleted file mode 100644 index 6e07b5b4576..00000000000 --- a/code/unused/hivebot/mainframe.dm +++ /dev/null @@ -1,181 +0,0 @@ -/mob/living/silicon/hive_mainframe/New() - Namepick() - -/mob/living/silicon/hive_mainframe/Life() - if (src.stat == 2) - return - else - src.updatehealth() - - if (src.health <= 0) - death() - return - - if(src.force_mind) - if(!src.mind) - if(src.client) - src.mind = new - src.mind.key = src.key - src.mind.current = src - src.force_mind = 0 - -/mob/living/silicon/hive_mainframe/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle) - if(emergency_shuttle.has_eta() && !emergency_shuttle.returned()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - -/mob/living/silicon/hive_mainframe/updatehealth() - if (src.nodamage == 0) - src.health = 100 - src.getFireLoss() - src.getBruteLoss() - else - src.health = 100 - src.stat = 0 - -/mob/living/silicon/hive_mainframe/death(gibbed) - src.stat = 2 - src.canmove = 0 - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.lying = 1 - src.icon_state = "hive_main-crash" - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - mind.store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) - - -/mob/living/silicon/hive_mainframe/say_understands(var/other) - //These only pertain to common. Languages are handled by mob/say_understands() - if (!speaking) - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon/robot)) - return 1 - if (istype(other, /mob/living/silicon/hivebot)) - return 1 - if (istype(other, /mob/living/silicon/ai)) - return 1 - return ..() - -/mob/living/silicon/hive_mainframe/say_quote(var/text) - var/ending = copytext(text, length(text)) - - if (ending == "?") - return "queries, \"[text]\""; - else if (ending == "!") - return "declares, \"[copytext(text, 1, length(text))]\""; - - return "states, \"[text]\""; - - -/mob/living/silicon/hive_mainframe/proc/return_to(var/mob/user) - if(user.mind) - user.mind.transfer_to(src) - spawn(20) - user:shell = 1 - user:real_name = "Robot [pick(rand(1, 999))]" - user:name = user:real_name - - - return - -/mob/living/silicon/hive_mainframe/verb/cmd_deploy_to() - set category = "Mainframe Commands" - set name = "Deploy to shell." - deploy_to() - -/mob/living/silicon/hive_mainframe/verb/deploy_to() - - if(usr.stat == 2) - usr << "You can't deploy because you are dead!" - return - - var/list/bodies = new/list() - - for(var/mob/living/silicon/hivebot/H in mob_list) - if(H.z == src.z) - if(H.shell) - if(!H.stat) - bodies += H - - var/target_shell = input(usr, "Which body to control?") as null|anything in bodies - - if (!target_shell) - return - - else if(src.mind) - spawn(30) - target_shell:mainframe = src - target_shell:dependent = 1 - target_shell:real_name = src.name - target_shell:name = target_shell:real_name - src.mind.transfer_to(target_shell) - return - - -/client/proc/MainframeMove(n,direct,var/mob/living/silicon/hive_mainframe/user) - return -/obj/hud/proc/hive_mainframe_hud() - return - - - - - -/mob/living/silicon/hive_mainframe/Login() - ..() - update_clothing() - for(var/S in src.client.screen) - del(S) - src.flash = new /obj/screen( null ) - src.flash.icon_state = "blank" - src.flash.name = "flash" - src.flash.screen_loc = "1,1 to 15,15" - src.flash.layer = 17 - src.blind = new /obj/screen( null ) - src.blind.icon_state = "black" - src.blind.name = " " - src.blind.screen_loc = "1,1 to 15,15" - src.blind.layer = 0 - src.client.screen += list( src.blind, src.flash ) - if(!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - return - - - -/mob/living/silicon/hive_mainframe/proc/Namepick() - var/randomname = pick(ai_names) - var/newname = input(src,"You are the a Mainframe Unit. Would you like to change your name to something else?", "Name change",randomname) - - if (length(newname) == 0) - newname = randomname - - if (newname) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = replacetext(newname, ">", "'") - src.real_name = newname - src.name = newname \ No newline at end of file diff --git a/code/unused/jobs.dm b/code/unused/jobs.dm deleted file mode 100644 index e56a7e54f66..00000000000 --- a/code/unused/jobs.dm +++ /dev/null @@ -1,291 +0,0 @@ -//WORK IN PROGRESS CONTENT - -//Project coder: Errorage - -//Readme: As part of the UI upgrade project, the intention here is for each job to have -//somewhat customizable loadouts. Players will be able to pick between jumpsuits, shoes, -//and other items. This datum will be used for all jobs and code will reference it. -//adding new jobs will be a matter of adding this datum.to a list of jobs. - -#define VITAL_PRIORITY_JOB 5 -#define HIGH_PRIORITY_JOB 4 -#define PRIORITY_JOB 3 -#define LOW_PRIORITY_JOB 2 -#define ASSISTANT_PRIORITY_JOB 1 -#define NO_PRIORITY_JOB 0 - -/datum/job - //Basic information - var/title = "Untitled" //The main (default) job title/name - var/list/alternative_titles = list() //Alternative job titles/names (alias) - var/job_number_at_round_start = 0 //Number of jobs that can be assigned at round start - var/job_number_total = 0 //Number of jobs that can be assigned total - var/list/bosses = list() //List of jobs which have authority over this job by default. - var/admin_only = 0 //If this is set to 1, the job is not available on the spawn screen - var/description = "" //A description of the job to be displayed when requested on the spawn screen - var/guides = "" //A string with links to relevent guides (likely the wiki) - var/department = "" //This is used to group jobs into departments, which means that if you don't get your desired jobs, you get another job from the same department - var/job_type = "SS13" //SS13, NT or ANTAGONIST - var/can_be_traitor = 1 - var/can_be_changeling = 1 - var/can_be_wizard = 1 - var/can_be_cultist = 1 - var/can_be_rev_head = 1 - var/is_head_position = 0 - - //Job conditions - var/change_to_mob = "Human" //The type of mob which this job will change you to (alien,cyborg,human...) - var/change_to_mutantrace = "" //What mutantrace you will be once you get this job - - //Random job assignment priority - var/assignment_priority = NO_PRIORITY_JOB //This variable determins the priority of assignment - //VITAL_PRIORITY_JOB = Absolutely vital (Someone will get assigned every round) - Use VERY, VERY lightly - //HIGH_PRIORITY_JOB = High priority - Assibned before the other jobs, candidates compete on equal terms - //PRIORITY_JOB = Priorized (Standard priority) - Candidates compete by virtue of priority (choice 1 > choice 2 > choice 3...) - //LOW_PRIORITY_JOB = Low priority (Low-priority (librarian)) - //ASSISTANT_PRIORITY_JOB = Assistant-level (Only filled when all the other jobs have been assigned) - //NO_PRIORITY_JOB = Skipped om assignment (Admin-only jobs should have this level) - - - - //Available equipment - The first thing listed is understood as the default setup. - var/list/equipment_ears = list() //list of possible ear-wear items - var/list/equipment_glasses = list() //list of possible glasses - var/list/equipment_gloves = list() //list of possible gloves - var/list/equipment_head = list() //list of possible headgear/helmets/hats - var/list/equipment_mask = list() //list of possible masks - var/list/equipment_shoes = list() //list of possible shoes - var/list/equipment_suit = list() //list of possible suits - var/list/equipment_under = list() //list of possible jumpsuits - var/list/equipment_belt = list() //list of possible belt-slot items - var/list/equipment_back = list() //list of possible back-slot items - var/obj/equipment_pda //default pda type - var/obj/equipment_id //default id type - - New(var/param_title, var/list/param_alternative_titles = list(), var/param_jobs_at_round_start = 0, var/param_global_max = 0, var/list/param_bosses = list(), var/param_admin_only = 0) - title = param_title - alternative_titles = param_alternative_titles - job_number_at_round_start = param_jobs_at_round_start - job_number_total = param_global_max - bosses = param_bosses - admin_only = param_admin_only - - //This proc tests to see if the given alias (job title/alternative job title) corresponds to this job. - //Returns 1 if it is, else returns 0 - proc/is_job_alias(var/alias) - if(alias == title) - return 1 - if(alias in alternative_titles) - return 1 - return 0 - -/datum/jobs - var/list/datum/job/all_jobs = list() - - proc/get_all_jobs() - return all_jobs - - //This proc returns all the jobs which are NOT admin only - proc/get_normal_jobs() - var/list/datum/job/normal_jobs = list() - for(var/datum/job/J in all_jobs) - if(!J.admin_only) - normal_jobs += J - return normal_jobs - - //This proc returns all the jobs which are admin only - proc/get_admin_jobs() - var/list/datum/job/admin_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.admin_only) - admin_jobs += J - return admin_jobs - - //This proc returns the job datum of the job with the alias or job title given as the argument. Returns an empty string otherwise. - proc/get_job(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J - return "" - - //This proc returns a string with the default job title for the job with the given alias. Returns an empty string otherwise. - proc/get_job_title(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J.title - return "" - - //This proc returns all the job datums of the workers whose boss has the alias provided. (IE Engineer under Chief Engineer, etc.) - proc/get_jobs_under(var/boss_alias) - var/boss_title = get_job_title(boss_alias) - var/list/datum/job/employees = list() - for(var/datum/job/J in all_jobs) - if(boss_title in J.bosses) - employees += J - return employees - - //This proc returns the chosen vital and high priority jobs that the person selected. It goes from top to bottom of the list, until it finds a job which does not have such priority. - //Example: Choosing (in this order): CE, Captain, Engineer, RD will only return CE and Captain, as RD is assumed as being an unwanted choice. - //This proc is used in the allocation algorithm when deciding vital and high priority jobs. - proc/get_prefered_high_priority_jobs() - var/list/datum/job/hp_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == HIGH_PRIORITY_JOB || J.assignment_priority == VITAL_PRIORITY_JOB) - hp_jobs += J - else - break - return hp_jobs - - //If only priority is given, it will return the jobs of only that priority, if end_priority is set it will return the jobs with their priority higher or equal to var/priority and lower or equal to end_priority. end_priority must be higher than 0. - proc/get_jobs_by_priority(var/priority, var/end_priority = 0) - var/list/datum/job/priority_jobs = list() - if(end_priority) - if(end_priority < priority) - return - for(var/datum/job/J in all_jobs) - if(J.assignment_priority >= priority && J.assignment_priority <= end_priority) - priority_jobs += J - else - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == priority) - priority_jobs += J - return priority_jobs - -//This datum is used in the plb allocation algorithm to make life easier, not used anywhere else. -/datum/player_jobs - var/mob/new_player/player - var/datum/jobs/selected_jobs - -var/datum/jobs/jobs = new/datum/jobs() - -proc/setup_jobs() - var/datum/job/JOB - - JOB = new/datum/job("Station Engineer") - JOB.alternative_titles = list("Structural Engineer","Engineer","Student of Engineering") - JOB.job_number_at_round_start = 5 - JOB.job_number_total = 5 - JOB.bosses = list("Chief Engineer") - JOB.admin_only = 0 - JOB.description = "Engineers are tasked with the maintenance of the station. Be it maintaining the power grid or rebuilding damaged sections." - JOB.guides = "" - JOB.equipment_ears = list(/obj/item/device/radio/headset/headset_eng) - JOB.equipment_glasses = list() - JOB.equipment_gloves = list() - JOB.equipment_head = list(/obj/item/clothing/head/helmet/hardhat) - JOB.equipment_mask = list() - JOB.equipment_shoes = list(/obj/item/clothing/shoes/orange,/obj/item/clothing/shoes/brown,/obj/item/clothing/shoes/black) - JOB.equipment_suit = list(/obj/item/clothing/suit/storage/hazardvest) - JOB.equipment_under = list(/obj/item/clothing/under/rank/engineer,/obj/item/clothing/under/color/yellow) - JOB.equipment_belt = list(/obj/item/weapon/storage/belt/utility/full) - JOB.equipment_back = list(/obj/item/weapon/storage/backpack/industrial,/obj/item/weapon/storage/backpack) - JOB.equipment_pda = /obj/item/device/pda/engineering - JOB.equipment_id = /obj/item/weapon/card/id - - jobs.all_jobs += JOB - -//This proc will dress the mob (employee) in the default way for the specified job title/job alias -proc/dress_for_job_default(var/mob/living/carbon/human/employee as mob, var/job_alias) - if(!ishuman(employee)) - return - - //TODO ERRORAGE - UNFINISHED - var/datum/job/JOB = jobs.get_job(job_alias) - if(JOB) - var/item = JOB.equipment_ears[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_ears) - item = JOB.equipment_under[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_w_uniform) - - - /* - src.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (src), slot_back) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack) - src.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng (src), slot_ears) // -- TLE - src.equip_to_slot_or_del(new /obj/item/device/pda/engineering(src), slot_belt) - src.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(src), slot_w_uniform) - src.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(src), slot_shoes) - src.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(src), slot_head) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt/full(src), slot_l_hand) //currently spawns in hand due to traitor assignment requiring a PDA to be on the belt. --Errorage - //src.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(src), slot_gloves) removed as part of Dangercon 2011, approved by Urist_McDorf --Errorage - src.equip_to_slot_or_del(new /obj/item/device/t_scanner(src), slot_r_store) - */ - - -//This algorithm works in 5 steps: -//1: Assignment of wizard / nuke members (if appropriate game mode) -//2: Assignment of jobs based on preferenes -// 2.1: Assignment of vital and high priority jobs. Candidates compete on equal terms. If the vital jobs are not filled, a random candidate is chosen to fill them, -// 2.2: Assignment of the rest of the jobs based on player preference, -//3: Assignment of remaining jobs for remaining players based on chosen departments -//4: Random assignment of remaining jobs for remaining players based on assignment priority -//5: Assignment of traitor / changeling to assigned roles (if appropriate game mode) -proc/assignment_algorithm(var/list/mob/new_player/players) - for(var/mob/new_player/PLAYER in players) - if(!PLAYER.client) - players -= PLAYER - continue - if(!PLAYER.ready) - players -= PLAYER - continue - - var/list/datum/job/vital_jobs = list() - var/list/datum/job/high_priority_jobs = list() - var/list/datum/job/priority_jobs = list() - var/list/datum/job/low_priority_jobs = list() - var/list/datum/job/assistant_jobs = list() - var/list/datum/job/not_assigned_jobs = list() - - for(var/datum/job/J in jobs) - switch(J.assignment_priority) - if(5) - vital_jobs += J - if(4) - high_priority_jobs += J - if(3) - priority_jobs += J - if(2) - low_priority_jobs += J - if(1) - assistant_jobs += J - if(0) - not_assigned_jobs += J - - var/list/datum/player_jobs/player_jobs = list() //This datum only holds a mob/new_player and a datum/jobs. The first is the player, the 2nd is the player's selected jobs, from the preferences datum. - - for(var/mob/new_player/NP in players) - var/datum/player_jobs/PJ = new/datum/player_jobs - PJ.player = NP - PJ.selected_jobs = NP.preferences.wanted_jobs - player_jobs += PJ - - //At this point we have the player_jobs list filled. Next up we have to assign all vital and high priority positions. - - var/list/datum/job/hp_jobs = jobs.get_jobs_by_priority( HIGH_PRIORITY_JOB, VITAL_PRIORITY_JOB ) - - for(var/datum/job/J in hp_jobs) - var/list/mob/new_player/candidates = list() - for(var/datum/player_jobs/PJ in player_jobs) - if(J in PJ.selected_jobs) - candidates += PJ.player - var/mob/new_player/chosen_player - if(candidates) - chosen_player = pick(candidates) - else - if(J.assignment_priority == VITAL_PRIORITY_JOB) - if(players) //Just in case there are more vital jobs than there are players. - chosen_player = pick(players) - if(chosen_player) - chosen_player.mind.assigned_job = J - players -= chosen_player - //TODO ERRORAGE - add capability for hp jobs with more than one slots. - - - - - //1: vital and high priority jobs, assigned on equal terms - - //TODO ERRORAGE - UNFINISHED - - -//END OF WORK IN PROGRESS CONTENT diff --git a/code/unused/mining/datum_processing_recipe.dm b/code/unused/mining/datum_processing_recipe.dm deleted file mode 100644 index 656e38f0ad5..00000000000 --- a/code/unused/mining/datum_processing_recipe.dm +++ /dev/null @@ -1,22 +0,0 @@ -/**********************Ore to material recipes datum**************************/ - -var/list/AVAILABLE_ORES = typesof(/obj/item/weapon/ore) - -/datum/material_recipe - var/name - var/list/obj/item/weapon/ore/recipe - var/obj/prod_type //produced material/object type - - New(var/param_name, var/param_recipe, var/param_prod_type) - name = param_name - recipe = param_recipe - prod_type = param_prod_type - -var/list/datum/material_recipe/MATERIAL_RECIPES = list( - new/datum/material_recipe("Metal",list(/obj/item/weapon/ore/iron),/obj/item/stack/sheet/metal), - new/datum/material_recipe("Glass",list(/obj/item/weapon/ore/glass),/obj/item/stack/sheet/glass), - new/datum/material_recipe("Gold",list(/obj/item/weapon/ore/gold),/obj/item/stack/sheet/mineral/gold), - new/datum/material_recipe("Silver",list(/obj/item/weapon/ore/silver),/obj/item/stack/sheet/mineral/silver), - new/datum/material_recipe("Diamond",list(/obj/item/weapon/ore/diamond),/obj/item/stack/sheet/mineral/diamond), - new/datum/material_recipe("Phoron",list(/obj/item/weapon/ore/phoron),/obj/item/stack/sheet/mineral/phoron), - ) \ No newline at end of file diff --git a/code/unused/mining/machine_craftlathe_unused.dm b/code/unused/mining/machine_craftlathe_unused.dm deleted file mode 100644 index 564e3a1f715..00000000000 --- a/code/unused/mining/machine_craftlathe_unused.dm +++ /dev/null @@ -1,233 +0,0 @@ -/*********************NEW AUTOLATHE / CRAFT LATHE***********************/ - -var/list/datum/craftlathe_item/CRAFT_ITEMS = list() -var/CRAFT_ITEMS_SETUP = 1 //this should probably be a pre-game thing, but i'll do it so the first lathe2 that's created will set-up the recipes. - -proc/check_craftlathe_recipe(var/list/param_recipe) - if(param_recipe.len != 9) - return - var/i - var/match = 0 //this one counts if there is at least one non-"" ingredient. - for(var/datum/craftlathe_item/CI in CRAFT_ITEMS) - match = 0 - for(i = 1; i <= 9; i++) - if(CI.recipe[i] != param_recipe[i]) - match = 0 //use this so it passes by the match > 0 check below, otherwise i'd need a new variable to tell the return CI below that the check failed - break - if(CI.recipe[i] != "") - match++ - if(match > 0) - return CI - return 0 - -/datum/craftlathe_item - var/id = "" //must be unique for each item type. used to create recipes - var/name = "unknown" //what the lathe will show as it's contents - var/list/recipe = list("","","","","","","","","") //the 9 items here represent what items need to be placed in the lathe to produce this item. - var/item_type = null //this is used on items like sheets which are added when inserted into the lathe. - var/amount = 1 - var/amount_attackby = 1 - -/datum/craftlathe_item/New(var/param_id,var/param_name,var/param_amount,var/param_ammount_per_attackby,var/list/param_recipe,var/param_type = null) - ..() - id = param_id - name = param_name - recipe = param_recipe - item_type = param_type - amount = param_amount; - amount_attackby = param_ammount_per_attackby - return - -//this proc checks the recipe you give in it's parameter with the entire list of available items. If any match, it returns the item from CRAFT_ITEMS. the returned item should not be changed!! - -/obj/machinery/autolathe2 - name = "Craft lathe" - icon_state = "autolathe" - density = 1 - anchored = 1 - var/datum/craftlathe_item/selected = null - var/datum/craftlathe_item/make = null - var/list/datum/craftlathe_item/craft_contents = list() - var/list/current_recipe = list("","","","","","","","","") - -/obj/machinery/autolathe2/New() - ..() - if(CRAFT_ITEMS_SETUP) - CRAFT_ITEMS_SETUP = 0 - build_recipes() - return - -/obj/machinery/autolathe2/attack_hand(mob/user as mob) - var/dat - dat = text("

Craft Lathe

") - dat += text("
") - - dat += text("Materials

") - var/datum/craftlathe_item/CI - var/i - for(i = 1; i <= craft_contents.len; i++) - CI = craft_contents[i] - if (CI == selected) - dat += text("[CI.name] ([CI.amount])
") - else - dat += text("[CI.name] ([CI.amount])
") - - dat += text("

") - - dat += text("Crafting Table

") - - dat += text(" ") - - var/j = 0 - var/k = 0 - for (i = 0; i < 3; i++) - dat += text(" ") - for (j = 1; j <= 3; j++) - k = i * 3 + j - if (current_recipe[k]) - dat += text(" ") - else - dat += text(" ") - dat += text(" ") - dat += text("
[current_recipe[k]]----
") - - dat += text("

") - dat += text("Will make: ") - if (make) - dat += text("[make.name]") - else - dat += text("nothing useful") - - dat += text("

") - user << browse("[dat]", "window=craft") - -/obj/machinery/autolathe2/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["remove"]) - var/n = text2num(href_list["remove"]) - if(!n || n < 1 || n > 9) - return - current_recipe[n] = "" - if(href_list["select"]) - var/n = text2num(href_list["select"]) - if(!n || n < 1 || n > 9) - return - selected = craft_contents[n] - if(href_list["add"]) - var/n = text2num(href_list["add"]) - if(!n || n < 1 || n > 9) - return - if(selected) - current_recipe[n] = selected.id - if(href_list["make"]) - var/datum/craftlathe_item/MAKE = check_craftlathe_recipe(src.current_recipe) - if(MAKE) - for (var/datum/craftlathe_item/CI2 in craft_contents) - if(CI2.id == MAKE.id) - CI2.amount += CI2.amount_attackby - src.updateUsrDialog() - return - craft_contents += new/datum/craftlathe_item(MAKE.id,MAKE.name,MAKE.amount,MAKE.amount_attackby,MAKE.recipe,MAKE.item_type) - var/datum/craftlathe_item/CI = check_craftlathe_recipe(src.current_recipe) - if(CI) - make = CI - else - make = null - src.updateUsrDialog() - - - -/obj/machinery/autolathe2/attackby(obj/item/weapon/W as obj, mob/user as mob) - usr.machine = src - src.add_fingerprint(usr) - for (var/datum/craftlathe_item/CI in CRAFT_ITEMS) - if(W.type == CI.item_type) - for (var/datum/craftlathe_item/CI2 in craft_contents) - if(CI2.item_type == W.type) - CI2.amount += CI2.amount_attackby - rmv_item(W) - return - craft_contents += new/datum/craftlathe_item(CI.id,CI.name,CI.amount,CI.amount_attackby,CI.recipe,CI.item_type) - rmv_item(W) - return - src.updateUsrDialog() - return - -/obj/machinery/autolathe2/proc/rmv_item(obj/item/W as obj) - if(istype(W,/obj/item/stack)) - var/obj/item/stack/S = W - S.amount-- - if (S.amount <= 0) - del(S) - else - del(W) - -/obj/machinery/autolathe2/proc/build_recipes() - //Parameters: ID, Name, Amount, Amount_added_per_attackby, Recipe, Object type - CRAFT_ITEMS += new/datum/craftlathe_item("METAL","Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/metal) - CRAFT_ITEMS += new/datum/craftlathe_item("R METAL","Reinforced Metal",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/r_metal) - CRAFT_ITEMS += new/datum/craftlathe_item("GLASS","Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass) - CRAFT_ITEMS += new/datum/craftlathe_item("R GLASS","Reinforced Glass",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/glass/reinforced) - CRAFT_ITEMS += new/datum/craftlathe_item("GOLD","Gold",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/gold) - CRAFT_ITEMS += new/datum/craftlathe_item("SILVER","Silver",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/silver) - CRAFT_ITEMS += new/datum/craftlathe_item("DIAMOND","Diamond",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/diamond) - CRAFT_ITEMS += new/datum/craftlathe_item("PLASMA","Plasma",1,1,list("","","","","","","","",""),/obj/item/stack/sheet/mineral/plasma) - CRAFT_ITEMS += new/datum/craftlathe_item("URANIUM","Uranium",1,1,list("","","","","","","","",""),/obj/item/weapon/ore/mineral/uranium) - CRAFT_ITEMS += new/datum/craftlathe_item("SCREWS","Screws",9,9,list("","","","","METAL","","","METAL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("COGS","Cogs",9,9,list("","METAL","","METAL","METAL","METAL","","METAL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SWITCH","Switch",12,12,list("METAL","","METAL","METAL","METAL","","METAL","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("KEYBOARD","Keyboard",1,1,list("","","","SWITCH","SWITCH","SWITCH","SWITCH","SWITCH","SWITCH")) - CRAFT_ITEMS += new/datum/craftlathe_item("M PANEL","Metal Panel",10,10,list("","","","","METAL","METAL","","METAL","METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("CASE","Equipment Case",1,1,list("M PANEL","M PANEL","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","M PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("G PANEL","Glass Panel",10,10,list("","","","","GLASS","GLASS","","GLASS","GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("SCREEN","Screen",1,1,list("","GLASS","","GLASS","PLASMA","GLASS","","GLASS","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EL SILVER","Electronics Silver",30,30,list("","","","","SILVER","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EL GOLD","Electronics Gold",6,6,list("","","","","GOLD","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("TINTED GL","Tinted Glass",2,2,list("","METAL","","","GLASS","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("TANK VALVE","Tank Transfer Valuve",1,1,list("","PIPE","","","PIPE","SWITCH","","PIPE","")) - CRAFT_ITEMS += new/datum/craftlathe_item("PIPE","Pipe",1,1,list("","M PANEL","","","M PANEL","","","M PANEL","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("CB FRAME","Circuitboard Frame",1,1,list("","","","M PANEL","G PANEL","M PANEL","G PANEL","M PANEL","G PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("ROM","ROM Module",1,1,list("EL SILVER","EL SILVER","EL SILVER","EL SILVER","","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("RAM","RAM Module",1,1,list("EL SILVER","EL SILVER","EL SILVER","EL SILVER","EL GOLD","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("PROCESSOR","Processor",1,1,list("EL GOLD","EL SILVER","EL GOLD","EL SILVER","EL SILVER","EL SILVER","EL SILVER","EL GOLD","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("ANTENNA","Antenna",1,1,list("","","EL SILVER","","","EL SILVER","EL SILVER","EL SILVER","EL SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("OP RECEPTOR","Optic Receptor",1,1,list("G PANEL","G PANEL","G PANEL","","EL GOLD","","G PANEL","G PANEL","G PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("THERMAL OP R","Thermal Optic Receptor",1,1,list("","OP RECEPTOR","","ROM","DIAMOND","DIAMOND","","OP RECEPTOR","")) - CRAFT_ITEMS += new/datum/craftlathe_item("MASON OP R","Mason Optic Receptor",1,1,list("","OP RECEPTOR","","ROM","EL SILVER","EL SILVER","","OP RECEPTOR","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EAR FRAME","Earpiece Frame",1,1,list("M PANEL","M PANEL","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","")) - CRAFT_ITEMS += new/datum/craftlathe_item("RADIO M","Radio Module",1,1,list("","ANTENNA","","","ROM","","CB FRAME","CB FRAME","CB FRAME")) - CRAFT_ITEMS += new/datum/craftlathe_item("EARPIECE","Radio Earpiece",1,1,list("","","","","RADIO M","","","EAR FRAME","")) - CRAFT_ITEMS += new/datum/craftlathe_item("EARMUFFS","Earmuffs",1,1,list("","M PANEL","","EAR FRAME","","EAR FRAME","","","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("GLASSES FRAME","Glasses Frame",1,1,list("M PANEL","","M PANEL","M PANEL","","M PANEL","M PANEL","M PANEL","M PANEL")) - CRAFT_ITEMS += new/datum/craftlathe_item("MASONS","Mason Scanners",1,1,list("","","","MASON OP R","GLASSES FRAME","MASON OP R","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("THERMALS","Thermal Scanners",1,1,list("","","","THERMAL OP R","GLASSES FRAME","THERMAL OP R","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SUNGLASSES","Sunglasses",1,1,list("","","","TINTED GL","GLASSES FRAME","TINTED GL","","","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("HELMET FR","Helmet Frame",1,1,list("METAL","METAL","METAL","METAL","","METAL","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HELMET","Security Helmet",1,1,list("R METAL","R METAL","R METAL","R METAL","HELMET FR","R METAL","","GLASS","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HOS HELMET","HoS Helmet",1,1,list("SILVER","GOLD","SILVER","SILVER","HELMET","SILVER","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("HARDHAT","Hardhat",1,1,list("","FLASHLIGHT","","","HELMET FR","","","","")) - CRAFT_ITEMS += new/datum/craftlathe_item("SWAT HELMET","SWAT Helmet",1,1,list("","","","","HELMET","","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("WELDING HELM","Welding Helmet",1,1,list("","","","","HELMET FR","","TINTED GL","TINTED GL","TINTED GL")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE HELMET","Space Helmet",1,1,list("R METAL","SILVER","R METAL","SILVER","HELMET FR","SILVER","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("RIG HELMET","RIG Helmet",1,1,list("R METAL","SILVER","R METAL","SILVER","SPACE HELMET","SILVER","R GLASS","R GLASS","R GLASS")) - CRAFT_ITEMS += new/datum/craftlathe_item("GAS MASK","Gas Mask",1,1,list("","","","","HELMET FR","TANK VALVE","","G PANEL","")) - - CRAFT_ITEMS += new/datum/craftlathe_item("ARMOR FRAME","Armor Frame",1,1,list("R METAL","","R METAL","R METAL","R METAL","R METAL","R METAL","R METAL","R METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("ARMOR","Armored Vest",1,1,list("R METAL","","R METAL","R METAL","ARMOR FRAME","R METAL","R METAL","R METAL","R METAL")) - CRAFT_ITEMS += new/datum/craftlathe_item("HOS ARMOR","HoS Armor",1,1,list("DIAMOND","","DIAMOND","URANIUM","ARMOR","URANIUM","URANIUM","R METAL","URANIUM")) - CRAFT_ITEMS += new/datum/craftlathe_item("CAP ARMOR","Captain Armor",1,1,list("DIAMOND","","DIAMOND","URANIUM","HOS ARMOR","URANIUM","URANIUM","R METAL","URANIUM")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE S FR","Space Suit Frame",1,1,list("SILVER","","SILVER","SILVER","SILVER","SILVER","SILVER","SILVER","SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("SPACE SUIT","Space Suit",1,1,list("SILVER","","SILVER","RAM","SPACE S FR","RADIO M","SILVER","SILVEr","SILVER")) - CRAFT_ITEMS += new/datum/craftlathe_item("RIG SUIT","RIG Suit",1,1,list("SILVER","","SILVER","SILVER","SPACE SUIT","SILVER","SILVER","SILVER","SILVER")) - //TODO: Flashlight, type paths - return - - - - return diff --git a/code/unused/mining/machine_gas_extractor_unused.dm b/code/unused/mining/machine_gas_extractor_unused.dm deleted file mode 100644 index 7a833016cf4..00000000000 --- a/code/unused/mining/machine_gas_extractor_unused.dm +++ /dev/null @@ -1,78 +0,0 @@ -/**********************Gas extractor**************************/ - -/obj/machinery/mineral/gasextractor - name = "Gas extractor" - desc = "A machine which extracts gasses from ores" - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - var/obj/machinery/mineral/input = null - var/obj/machinery/mineral/output = null - var/message = ""; - var/processing = 0 - var/newtoxins = 0 - density = 1 - anchored = 1.0 - -/obj/machinery/mineral/gasextractor/New() - ..() - spawn( 5 ) - for (var/dir in cardinal) - src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) - if(src.input) break - for (var/dir in cardinal) - src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) - if(src.output) break - return - return - -/obj/machinery/mineral/gasextractor/attack_hand(user as mob) - - if(processing == 1) - user << "The machine is processing" - return - - var/dat - dat = text("input connection status: ") - if (input) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - dat += text("
output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text("

Extract gas") - - dat += text("

Message: [message]") - - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/gasextractor/Topic(href, href_list) - if(..()) - return - - usr.machine = src - src.add_fingerprint(usr) - if(href_list["extract"]) - if (src.output) - if (locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - newtoxins = 0 - processing = 1 - var/obj/item/weapon/ore/O - while(locate(/obj/item/weapon/ore/plasma, input.loc) && locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - O = locate(/obj/item/weapon/ore/plasma, input.loc) - if (istype(O,/obj/item/weapon/ore/plasma)) - var/obj/machinery/portable_atmospherics/canister/C - C = locate(/obj/machinery/portable_atmospherics/canister,output.loc) - C.air_contents.toxins += 100 - newtoxins += 100 - del(O) - sleep(5); - processing = 0; - message = "Canister filled with [newtoxins] units of toxins" - else - message = "No canister found" - src.updateUsrDialog() - return diff --git a/code/unused/mining/machine_purifier_unused.dm b/code/unused/mining/machine_purifier_unused.dm deleted file mode 100644 index d467dbcbd26..00000000000 --- a/code/unused/mining/machine_purifier_unused.dm +++ /dev/null @@ -1,85 +0,0 @@ -/**********************Mineral purifier (not used, replaced with mineral processing unit)**************************/ - -/obj/machinery/mineral/purifier - name = "Ore Purifier" - desc = "A machine which makes building material out of ores" - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - var/obj/machinery/mineral/input = null - var/obj/machinery/mineral/output = null - var/processed = 0 - var/processing = 0 - density = 1 - anchored = 1.0 - -/obj/machinery/mineral/purifier/attack_hand(user as mob) - - if(processing == 1) - user << "The machine is processing" - return - - var/dat - dat = text("input connection status: ") - if (input) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - dat += text("
output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text("

Purify") - - dat += text("

found: [processed]") - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/purifier/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["purify"]) - if (src.output) - processing = 1; - var/obj/item/weapon/ore/O - processed = 0; - while(locate(/obj/item/weapon/ore, input.loc)) - O = locate(/obj/item/weapon/ore, input.loc) - if (istype(O,/obj/item/weapon/ore/iron)) - new /obj/item/stack/sheet/metal(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/diamond)) - new /obj/item/stack/sheet/mineral/diamond(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/plasma)) - new /obj/item/stack/sheet/mineral/plasma(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/gold)) - new /obj/item/stack/sheet/mineral/gold(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/silver)) - new /obj/item/stack/sheet/mineral/silver(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/uranium)) - new /obj/item/weapon/ore/mineral/uranium(output.loc) - del(O) - processed++ - sleep(5); - processing = 0; - src.updateUsrDialog() - return - - -/obj/machinery/mineral/purifier/New() - ..() - spawn( 5 ) - for (var/dir in cardinal) - src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) - if(src.input) break - for (var/dir in cardinal) - src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) - if(src.output) break - return - return diff --git a/code/unused/mining/mine_generator_unused.dm b/code/unused/mining/mine_generator_unused.dm deleted file mode 100644 index 9cc7f54ce69..00000000000 --- a/code/unused/mining/mine_generator_unused.dm +++ /dev/null @@ -1,174 +0,0 @@ -/**********************Random mine generator************************/ - -//this item is intended to give the effect of entering the mine, so that light gradually fades -/obj/effect/mine_generator - name = "Random mine generator" - anchored = 1 - unacidable = 1 - var/turf/last_loc - var/turf/target_loc - var/turf/start_loc - var/randXParam //the value of these two parameters are generated by the code itself and used to - var/randYParam //determine the random XY parameters - var/mineDirection = 3 - /* - 0 = none - 1 = N - 2 = NNW - 3 = NW - 4 = WNW - 5 = W - 6 = WSW - 7 = SW - 8 = SSW - 9 = S - 10 = SSE - 11 = SE - 12 = ESE - 13 = E - 14 = ENE - 15 = NE - 16 = NNE - */ - -/obj/effect/mine_generator/New() - last_loc = src.loc - var/i - for(i = 0; i < 50; i++) - gererateTargetLoc() - //target_loc = locate(last_loc.x + rand(5), last_loc.y + rand(5), src.z) - fillWithAsteroids() - del(src) - return - - -/obj/effect/mine_generator/proc/gererateTargetLoc() //this proc determines where the next square-room will end. - switch(mineDirection) - if(1) - randXParam = 0 - randYParam = 4 - if(2) - randXParam = 1 - randYParam = 3 - if(3) - randXParam = 2 - randYParam = 2 - if(4) - randXParam = 3 - randYParam = 1 - if(5) - randXParam = 4 - randYParam = 0 - if(6) - randXParam = 3 - randYParam = -1 - if(7) - randXParam = 2 - randYParam = -2 - if(8) - randXParam = 1 - randYParam = -3 - if(9) - randXParam = 0 - randYParam = -4 - if(10) - randXParam = -1 - randYParam = -3 - if(11) - randXParam = -2 - randYParam = -2 - if(12) - randXParam = -3 - randYParam = -1 - if(13) - randXParam = -4 - randYParam = 0 - if(14) - randXParam = -3 - randYParam = 1 - if(15) - randXParam = -2 - randYParam = 2 - if(16) - randXParam = -1 - randYParam = 3 - target_loc = last_loc - if (randXParam > 0) - target_loc = locate(target_loc.x+rand(randXParam),target_loc.y,src.z) - if (randYParam > 0) - target_loc = locate(target_loc.x,target_loc.y+rand(randYParam),src.z) - if (randXParam < 0) - target_loc = locate(target_loc.x-rand(-randXParam),target_loc.y,src.z) - if (randYParam < 0) - target_loc = locate(target_loc.x,target_loc.y-rand(-randXParam),src.z) - if (mineDirection == 1 || mineDirection == 5 || mineDirection == 9 || mineDirection == 13) //if N,S,E,W, turn quickly - if(prob(50)) - mineDirection += 2 - else - mineDirection -= 2 - if(mineDirection < 1) - mineDirection += 16 - else - if(prob(50)) - if(prob(50)) - mineDirection += 1 - else - mineDirection -= 1 - if(mineDirection < 1) - mineDirection += 16 - return - - -/obj/effect/mine_generator/proc/fillWithAsteroids() - - if(last_loc) - start_loc = last_loc - - if(start_loc && target_loc) - var/x1 - var/y1 - - var/turf/line_start = start_loc - var/turf/column = line_start - - if(start_loc.x <= target_loc.x) - if(start_loc.y <= target_loc.y) //GOING NORTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else //GOING NORTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else - if(start_loc.y <= target_loc.y) //GOING SOUTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - else //GOING SOUTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - - - return \ No newline at end of file diff --git a/code/unused/mining/rail_unused.dm b/code/unused/mining/rail_unused.dm deleted file mode 100644 index 2bd37671bcd..00000000000 --- a/code/unused/mining/rail_unused.dm +++ /dev/null @@ -1,338 +0,0 @@ -/**********************Rail track**************************/ - -/obj/machinery/rail_track - name = "Rail track" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - set_dir(2) - var/id = null //this is needed for switches to work Set to the same on the whole length of the track - anchored = 1 - -/**********************Rail intersection**************************/ - -/obj/machinery/rail_track/intersections - name = "Rail track intersection" - icon_state = "rail_intersection" - -/obj/machinery/rail_track/intersections/attack_hand(user as mob) - switch (dir) - if (1) set_dir(5) - if (5) set_dir(4) - if (4) set_dir(9) - if (9) set_dir(2) - if (2) set_dir(10) - if (10) set_dir(8) - if (8) set_dir(6) - if (6) set_dir(1) - return - -/obj/machinery/rail_track/intersections/NSE - name = "Rail track T intersection" - icon_state = "rail_intersection_NSE" - set_dir(2) - -/obj/machinery/rail_track/intersections/NSE/attack_hand(user as mob) - switch (dir) - if (1) set_dir(5) - if (2) set_dir(5) - if (5) set_dir(9) - if (9) set_dir(2) - return - -/obj/machinery/rail_track/intersections/SEW - name = "Rail track T intersection" - icon_state = "rail_intersection_SEW" - set_dir(8) - -/obj/machinery/rail_track/intersections/SEW/attack_hand(user as mob) - switch (dir) - if (8) set_dir(6) - if (4) set_dir(6) - if (6) set_dir(5) - if (5) set_dir(8) - return - -/obj/machinery/rail_track/intersections/NSW - name = "Rail track T intersection" - icon_state = "rail_intersection_NSW" - set_dir(2) - -/obj/machinery/rail_track/intersections/NSW/attack_hand(user as mob) - switch (dir) - if (1) set_dir(10) - if (2) set_dir(10) - if (10) set_dir(6) - if (6) set_dir(2) - return - -/obj/machinery/rail_track/intersections/NEW - name = "Rail track T intersection" - icon_state = "rail_intersection_NEW" - set_dir(8) - -/obj/machinery/rail_track/intersections/NEW/attack_hand(user as mob) - switch (dir) - if (4) set_dir(9) - if (8) set_dir(9) - if (9) set_dir(10) - if (10) set_dir(8) - return - -/**********************Rail switch**************************/ - -/obj/machinery/rail_switch - name = "Rail switch" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - set_dir(2) - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/obj/machinery/rail_track/track = null - var/id //used for to change the track pieces - -/obj/machinery/rail_switch/New() - spawn(10) - src.track = locate(/obj/machinery/rail_track, get_step(src, NORTH)) - if(track) - id = track.id - return - -/obj/machinery/rail_switch/attack_hand(user as mob) - user << "You switch the rail track's direction" - for (var/obj/machinery/rail_track/T in world) - if (T.id == src.id) - var/obj/machinery/rail_car/C = locate(/obj/machinery/rail_car, T.loc) - if (C) - switch (T.dir) - if(1) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(2) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(4) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(8) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(5) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "E" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(6) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "W" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(9) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "N" - if("W") C.direction = "E" - if(10) - switch(C.direction) - if("N") C.direction = "W" - if("S") C.direction = "W" - if("E") C.direction = "W" - if("W") C.direction = "N" - return - -/**********************Rail car**************************/ - -/obj/machinery/rail_car - name = "Rail car" - icon = 'icons/obj/storage.dmi' - icon_state = "miningcar" - var/direction = "S" //S = south, N = north, E = east, W = west. Determines whichw ay it'll look first - var/moving = 0; - anchored = 1 - density = 1 - var/speed = 0 - var/slowing = 0 - var/atom/movable/load = null //what it's carrying - -/obj/machinery/rail_car/attack_hand(user as mob) - if (moving == 0) - processing_items.Add(src) - moving = 1 - else - processing_items.Remove(src) - moving = 0 - return - -/* -for (var/client/C) - C << "Dela." -*/ - -/obj/machinery/rail_car/MouseDrop_T(var/atom/movable/C, mob/user) - - if(user.stat) - return - - if (!istype(C) || C.anchored || get_dist(user, src) > 1 || get_dist(src,C) > 1 ) - return - - if(ismob(C)) - load(C) - - -/obj/machinery/rail_car/proc/load(var/atom/movable/C) - - if(get_dist(C, src) > 1) - return - //mode = 1 - - C.loc = src.loc - sleep(2) - C.loc = src - load = C - - C.pixel_y += 9 - if(C.layer < layer) - C.layer = layer + 0.1 - overlays += C - - if(ismob(C)) - var/mob/M = C - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - //mode = 0 - //send_status() - -/obj/machinery/rail_car/proc/unload(var/dirn = 0) - if(!load) - return - - overlays.Cut() - - load.loc = src.loc - load.pixel_y -= 9 - load.layer = initial(load.layer) - if(ismob(load)) - var/mob/M = load - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - - - if(dirn) - step(load, dirn) - - load = null - - // in case non-load items end up in contents, dump every else too - // this seems to happen sometimes due to race conditions - // with items dropping as mobs are loaded - - for(var/atom/movable/AM in src) - AM.loc = src.loc - AM.layer = initial(AM.layer) - AM.pixel_y = initial(AM.pixel_y) - if(ismob(AM)) - var/mob/M = AM - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - -/obj/machinery/rail_car/relaymove(var/mob/user) - if(user.stat) - return - if(load == user) - unload(0) - return - -/obj/machinery/rail_car/process() - if (moving == 1) - if (slowing == 1) - if (speed > 0) - speed--; - if (speed == 0) - slowing = 0 - else - if (speed < 10) - speed++; - var/i = 0 - for (i = 0; i < speed; i++) - if (moving == 1) - switch (direction) - if ("S") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y-1,src.z)) - if (R.dir == 10) - direction = "W" - if (R.dir == 9) - direction = "E" - if (R.dir == 2 || R.dir == 1 || R.dir == 10 || R.dir == 9) - for (var/mob/living/M in locate(src.x,src.y-1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("N") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y+1,src.z)) - if (R.dir == 5) - direction = "E" - if (R.dir == 6) - direction = "W" - if (R.dir == 5 || R.dir == 1 || R.dir == 6 || R.dir == 2) - for (var/mob/living/M in locate(src.x,src.y+1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("E") - for (var/obj/machinery/rail_track/R in locate(src.x+1,src.y,src.z)) - if (R.dir == 6) - direction = "S" - if (R.dir == 10) - direction = "N" - if (R.dir == 4 || R.dir == 8 || R.dir == 10 || R.dir == 6) - for (var/mob/living/M in locate(src.x+1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("W") - for (var/obj/machinery/rail_track/R in locate(src.x-1,src.y,src.z)) - if (R.dir == 9) - direction = "N" - if (R.dir == 5) - direction = "S" - if (R.dir == 8 || R.dir == 9 || R.dir == 5 || R.dir == 4) - for (var/mob/living/M in locate(src.x-1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - sleep(1) - else - processing_items.Remove(src) - moving = 0 - return \ No newline at end of file diff --git a/code/unused/mining/spaceship_builder_unused.dm b/code/unused/mining/spaceship_builder_unused.dm deleted file mode 100644 index 42b4f4e3af1..00000000000 --- a/code/unused/mining/spaceship_builder_unused.dm +++ /dev/null @@ -1,173 +0,0 @@ -/**********************Spaceship builder area definitions**************************/ - -/area/shipbuilder - requires_power = 0 - luminosity = 1 - sd_lighting = 0 - -/area/shipbuilder/station - name = "shipbuilder station" - icon_state = "teleporter" - -/area/shipbuilder/ship1 - name = "shipbuilder ship1" - icon_state = "teleporter" - -/area/shipbuilder/ship2 - name = "shipbuilder ship2" - icon_state = "teleporter" - -/area/shipbuilder/ship3 - name = "shipbuilder ship3" - icon_state = "teleporter" - -/area/shipbuilder/ship4 - name = "shipbuilder ship4" - icon_state = "teleporter" - -/area/shipbuilder/ship5 - name = "shipbuilder ship5" - icon_state = "teleporter" - -/area/shipbuilder/ship6 - name = "shipbuilder ship6" - icon_state = "teleporter" - - -/**********************Spaceship builder**************************/ - -/obj/machinery/spaceship_builder - name = "Robotic Fabricator" - icon = 'icons/obj/surgery.dmi' - icon_state = "fab-idle" - density = 1 - anchored = 1 - var/metal_amount = 0 - var/operating = 0 - var/area/currentShuttleArea = null - var/currentShuttleName = null - -/obj/machinery/spaceship_builder/proc/buildShuttle(var/shuttle) - - var/shuttleat = null - var/shuttleto = "/area/shipbuilder/station" - - var/req_metal = 0 - switch(shuttle) - if("hopper") - shuttleat = "/area/shipbuilder/ship1" - currentShuttleName = "Planet hopper" - req_metal = 25000 - if("bus") - shuttleat = "/area/shipbuilder/ship2" - currentShuttleName = "Blnder Bus" - req_metal = 60000 - if("dinghy") - shuttleat = "/area/shipbuilder/ship3" - currentShuttleName = "Space dinghy" - req_metal = 100000 - if("van") - shuttleat = "/area/shipbuilder/ship4" - currentShuttleName = "Boxvan MMDLVI" - req_metal = 120000 - if("secvan") - shuttleat = "/area/shipbuilder/ship5" - currentShuttleName = "Boxvan MMDLVI - Security edition" - req_metal = 125000 - if("station4") - shuttleat = "/area/shipbuilder/ship6" - currentShuttleName = "Space station 4" - req_metal = 250000 - - if (metal_amount - req_metal < 0) - return - - if (!shuttleat) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = shuttleat - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/proc/scrapShuttle() - - var/shuttleat = "/area/shipbuilder/station" - var/shuttleto = currentShuttleArea - - if (!shuttleto) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = null - currentShuttleName = null - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if(operating == 1) - user << "The machine is processing" - return - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/stack/sheet/metal)) - - var/obj/item/stack/sheet/metal/M = W - user << "\blue You insert all the metal into the machine." - metal_amount += M.amount * 100 - del(M) - - else - return attack_hand(user) - return - -/obj/machinery/spaceship_builder/attack_hand(user as mob) - if(operating == 1) - user << "The machine is processing" - return - - var/dat - dat = text("Ship fabricator

") - dat += text("Current ammount of Metal: [metal_amount]

") - - if (currentShuttleArea) - dat += text("Currently building

[currentShuttleName]

") - dat += text("Build the shuttle to your liking.
This shuttle will be sent to the station in the event of an emergency along with a centcom emergency shuttle.") - dat += text("


Scrap current shuttle") - else - dat += text("Available ships to build:

") - dat += text("Planet hopper - Tiny, Slow, 25000 metal
") - dat += text("Blunder Bus - Small, Decent speed, 60000 metal
") - dat += text("Space dinghy - Medium size, Decent speed, 100000 metal
") - dat += text("Boxvan MMDLVIr - Medium size, Decent speed, 120000 metal
") - dat += text("Boxvan MMDLVI - Security eidition - Large, Rather slow, 125000 metal
") - dat += text("Space station 4 - Huge, Slow, 250000 metal
") - - user << browse("[dat]", "window=shipbuilder") - - -/obj/machinery/spaceship_builder/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["ship"]) - buildShuttle(href_list["ship"]) - if(href_list["scrap"]) - scrapShuttle(href_list["ship"]) - src.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/musicplayer.dm b/code/unused/musicplayer.dm deleted file mode 100644 index ced7630e882..00000000000 --- a/code/unused/musicplayer.dm +++ /dev/null @@ -1,15 +0,0 @@ -// this toggle doesn't save across rounds -/mob/verb/musictoggle() - set name = "Music Toggle" - if(src.be_music == 0) - src.be_music = 1 - src << "\blue Music toggled on!" - return - src.be_music = 0 - src << "\blue Music toggled off!" - -// This checks a var on each area and plays that var -/area/Entered(mob/A as mob) - if (A && src.music != "" && A.client && A.be_music != 0 && (A.music_lastplayed != src.music)) - A.music_lastplayed = src.music - A << sound(src.music, repeat = 0, wait = 0, volume = 20, channel = 1) diff --git a/code/unused/new_year.dm b/code/unused/new_year.dm deleted file mode 100644 index 0f2bdca1c35..00000000000 --- a/code/unused/new_year.dm +++ /dev/null @@ -1,138 +0,0 @@ - -/obj/effect/new_year_tree - name = "The fir" - desc = "This is a fir. Real fir on dammit spess station. You smell pine-needles." - icon = 'icons/effects/160x160.dmi' - icon_state = "new-year-tree" - anchored = 1 - opacity = 1 - density = 1 - layer = 5 - pixel_x = -64 - //pixel_y = -64 - -/obj/effect/new_year_tree/attackby(obj/item/W, mob/user) - if (istype(W, /obj/item/weapon/grab)) - return - W.loc = src - if (user.client) - user.client.screen -= W - user.u_equip(W) - var/const/bottom_right_x = 115.0 - var/const/bottom_right_y = 150.0 - var/const/top_left_x = 15.0 - var/const/top_left_y = 15.0 - var/const/bottom_med_x = top_left_x+(bottom_right_x-top_left_x)/2 - var/x = rand(top_left_x,bottom_med_x) //point in half of circumscribing rectangle - var/y = rand(top_left_y,bottom_right_y) - /* - y1=a*x1+b - y2=a*x2+b b = y2-a*x2 - - y1=a*x1+ y2-a*x2 - a*(x1-x2)+y2-y1=0 - a = (y1-y2)/(x1-x2) - */ - var/a = (top_left_y-bottom_right_y)/(top_left_x-bottom_med_x) - var/b = bottom_right_y-a*bottom_med_x - - if (a*x+b < y) //if point is above diagonal top_left -> bottom_median - x = bottom_med_x + x - top_left_x - y = bottom_right_y - y + top_left_y - var/image/I = image(W.icon, W, icon_state = W.icon_state) - I.pixel_x = x - I.pixel_y = y - overlays += I -/* -/obj/item/weapon/firbang - desc = "It is set to detonate in 10 seconds." - name = "firbang" - icon = 'icons/obj/grenade.dmi' - icon_state = "flashbang" - var/state = null - var/det_time = 100.0 - w_class = 2.0 - item_state = "flashbang" - throw_speed = 4 - throw_range = 20 - flags = CONDUCT - slot_flags = SLOT_BELT - -/obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) - if (user.get_active_hand() == src) - if ((CLUMSY in usr.mutations) && prob(50)) - user << "\red Huh? How does this thing work?!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( 5 ) - prime() - return - else if (!( src.state )) - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( src.det_time ) - prime() - return - user.set_dir(get_dir(user, target)) - user.drop_item() - var/t = (isturf(target) ? target : target.loc) - walk_towards(src, t, 3) - src.add_fingerprint(user) - return - -/obj/item/weapon/firbang/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/firbang/attack_hand() - walk(src, null, null) - ..() - return - -/obj/item/weapon/firbang/proc/prime() - playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/turf/T = get_turf(src) - if(T) - var/datum/effect/effect/system/smoke_spread/smoke = new - smoke.set_up(3, 0, src.loc) - smoke.attach(src) - smoke.start() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - new /obj/effect/new_year_tree(T) - del(src) - return - -/obj/item/weapon/firbang/attack_self(mob/user as mob) - if (!src.state) - if (CLUMSY in user.mutations) - user << "\red Huh? How does this thing work?!" - spawn( 5 ) - prime() - return - else - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - add_fingerprint(user) - spawn( src.det_time ) - prime() - return - return - -/* -/datum/supply_packs/new_year - name = "New Year Celebration Equipment" - contains = list("/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper") - cost = 20 - containertype = "/obj/structure/closet/crate" - containername = "New Year Celebration crate" -*/ \ No newline at end of file diff --git a/code/unused/newcombatsystem.dm b/code/unused/newcombatsystem.dm deleted file mode 100644 index 274581a04e1..00000000000 --- a/code/unused/newcombatsystem.dm +++ /dev/null @@ -1,191 +0,0 @@ -//It's not a very big change, but I think melee will benefit from it. -//Currently will only be restricted to special training weapons to test the balancedness of the system. -//1)Knockdown, stun and weaken chances are separate and dependant on the part of the body you're aiming at -//eg a mop will be better applied to legs since it has a higher base knockdown chance than the other disabling states -//while an energy gun would be better applied to the chest because of the stunning chance. -//2)Weapons also have a parry chance which is checked every time the one wielding the weapon is attacked in melee -//in the area is currently aiming at and is able to defend himself. -//More ideas to come. - -//NOTES: doesn't work with armor yet - -/obj/item/weapon/training //subclass of weapons that is currently the only one that uses the alternate combat system - name = "training weapon" - desc = "A weapon for training the advanced fighting technicues" - var/chance_parry = 0 - var/chance_weaken = 0 - var/chance_stun = 0 - var/chance_knockdown = 0 - var/chance_knockout = 0 - var/chance_disarm = 0 - -//chances - 5 is low, 10 is medium, 15 is good - -/obj/item/weapon/training/axe //hard-hitting, but doesn't have much in terms of disabling people (except by killing) - name = "training axe" - icon_state = "training_axe" - /*combat stats*/ - force = 15 - chance_parry = 5 - chance_weaken = 10 - chance_stun = 5 - chance_knockdown = 5 - chance_knockout = 5 - chance_disarm = 0 - -/obj/item/weapon/training/sword //not bad attack, good at parrying and disarming - name = "training sword" - icon_state = "training_sword" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 5 - chance_knockout = 0 - chance_disarm = 15 - -/obj/item/weapon/training/staff //not bad attack either, good at tripping and parrying - name = "training staff" - icon_state = "training_staff" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 15 - chance_knockout = 0 - chance_disarm = 5 - -/obj/item/weapon/training/mace //worst attack, but has a good chance of stun, knockout or weaken - name = "training mace" - icon_state = "training_mace" - /*combat stats*/ - force = 5 - chance_parry = 0 - chance_weaken = 15 - chance_stun = 10 - chance_knockdown = 0 - chance_knockout = 10 - chance_disarm = 0 - -/obj/item/weapon/training/attack(target as mob, mob/user as mob) - var/target_area = attack_location(user.zone_sel.selecting) - for(var/mob/O in viewers(src,7)) - O << "\red \b [user.name] attacks [target.name] in the [target_area] with [src.name]!" - if(!target.stat && target.zone_sel.selecting == target_area) //parrying occurs here - if(istype(target.r_hand,/obj/item/weapon/training) - if(prob(target.r_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.r_hand.name]!" - return - if(istype(target.l_hand,/obj/item/weapon/training) - if(prob(target.l_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.l_hand.name]!" - return - target.adjustBruteLoss(-src.force) - - var/modifier_knockdown = 1.0 - var/modifier_knockout = 1.0 - var/modifier_stun = 1.0 - var/modifier_weaken = 1.0 - var/modifier_disarm = 0.0 - - switch(target_area) - if("eyes") - modifier_weaken = 2.0 - modifier_stun = 0.5 - modifier_knockdown = 0.0 - if("head") - modifier_stun = 0.8 - modifier_knockout = 1.5 - modifier_weaken = 1.2 - modifier_knockdown = 0.0 - if("chest") - if("right arm","r_arm") - if("left arm","l_arm") - if("right hand","r_hand") - if("left hand","l_hand") - if("groin") - if("right leg","r_leg") - if("left leg","l_leg") - if("right foot","r_foot") - if("left foot","l_foot") - - -/proc/attack_location(var/initloc = "chest") //proc to randomise actual hit loc based on where you're aiming at - var/resultloc = "chest" //also forgot hands/feet. bleh - var/percentage = rand(1,100) - switch(initloc) - if("eyes") - switch(percentage) - if(1 to 10) - resultloc = "eyes" - if(11 to 30) - resultloc = "head" - if(31 to 100) - resultloc = "chest" - if("head") - switch(percentage) - if(1 to 5) - resultloc = "eyes" - if(6 to 40) - resultloc = "head" - if(41 to 100) - resultloc = "chest" - if("chest") - switch(percentage) - if(1 to 80) - resultloc = "chest" - if(81 to 84) - resultloc = "right arm" - if(85 to 88) - resultloc = "left arm" - if(89 to 92) - resultloc = "right leg" - if(93 to 96) - resultloc = "left leg" - if(97 to 98) - resultloc = "groin" - if(99 to 100) - resultloc = "head" - if("l_arm") - switch(percentage) - if(1 to 60) - resultloc = "left arm" - if(61 to 100) - resultloc = "chest" - if("r_arm") - switch(percentage) - if(1 to 60) - resultloc = "right arm" - if(61 to 100) - resultloc = "chest" - if("groin") - switch(percentage) - if(1 to 35) - resultloc = "groin" - if(36 to 50) - resultloc = "left leg" - if(51 to 65) - resultloc = "right leg" - if(66 to 100) - resultloc = "chest" - if("l_leg") - switch(percentage) - if(1 to 60) - resultloc = "left leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - if("r_leg") - switch(percentage) - if(1 to 60) - resultloc = "right leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - return resultloc \ No newline at end of file diff --git a/code/unused/optics/beam.dm b/code/unused/optics/beam.dm deleted file mode 100644 index 2e4f87e367d..00000000000 --- a/code/unused/optics/beam.dm +++ /dev/null @@ -1,177 +0,0 @@ -// the laser beam - - -/obj/effect/beam/laser - name = "laser beam" - icon = 'icons/effects/beam.dmi' - icon_state = "full" - density = 0 - mouse_opacity = 0 - pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE - var/wavelength // the (vaccuum) wavelength of the beam - var/width = 1 // 1=thin, 2=medium, 3=wide - - var/obj/effect/beam/laser/next - var/obj/effect/beam/laser/prev - var/obj/master - - New(var/atom/newloc, var/dirn, var/lambda, var/omega=1, var/half=0) - - if(!isturf(loc)) - return - - //world << "creating beam at ([newloc.x],[newloc.y]) with [dirn] [lambda] [omega] [half]" - - icon_state = "[omega]-[half ? "half" : "full"]" - set_dir(dirn) - set_wavelength(lambda) - ..(newloc) - spawn(0) - src.propagate() - src.verbs -= /atom/movable/verb/pull - - - - proc/propagate() - var/turf/T = get_step(src, dir) - if(T) - if(T.Enter(src)) - next = new(T, dir, wavelength, width, 0) - next.prev = src - next.master = src.master - else - spawn(5) - propagate() - - - proc/remove() - if(next) - next.remove() - del(src) - - - - proc/blocked(var/atom/A) - return density || opacity -/* -/turf/Enter(atom/movable/mover as mob|obj) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! -*/ - - - HasEntered(var/atom/movable/AM) - if(istype(AM, /obj/effect/beam)) - return - if(blocked(AM)) - remove(src) - if(prev) - prev.propagate() - else if(master) - master:turn_on() - - proc/set_wavelength(var/lambda) - - var/w = round(lambda,1) // integer wavelength - wavelength = lambda - // first look for cached version of the icon at this wavelength - var/icon/cached = beam_icons["[w]"] - if(cached) - icon = cached - - return - - // no cached version, so generate a new one - - // this maps a wavelength in the range 380-780 nm to an R,G,B,A value - var/red = 0 - var/green = 0 - var/blue = 0 - var/alpha = 0 - - switch(w) - if(380 to 439) - red = (440-w) / 60 - green = 0 - blue = 1 - if(440 to 489) - red = 0 - green = (w-440) / 50 - blue = 1 - if(490 to 509) - red = 0 - green = 1 - blue = (510 - w) / 20 - if(510 to 579) - red = (w-510) / 70 - green = 1 - blue = 0 - if(580 to 644) - red = 1 - green = (645-w) / 65 - blue = 0 - if(645 to 780) - red = 1 - green = 0 - blue = 0 - - // colour is done, now calculate intensity - switch(w) - if(380 to 419) - alpha = 0.75*(w-380)/40 - if(420 to 700) - alpha = 0.75 - if(701 to 780) - alpha = 0.75*(780-w)/80 - - // remap alpha by intensity gamma - if(alpha != 0) - alpha = alpha**0.80 - - var/icon/I = icon('icons/effects/beam.dmi') - I.MapColors(red,0,0,0, 0,green,0,0, 0,0,blue,0, 0,0,0,alpha, 0,0,0,0) - icon = I - - beam_icons["[w]"] = I - - - -// global cache of beam icons -// this is an assoc list mapping (integer) wavelength to icons - -var/list/beam_icons = new() \ No newline at end of file diff --git a/code/unused/optics/laser-pointer.dm b/code/unused/optics/laser-pointer.dm deleted file mode 100644 index f25e5f3bb1c..00000000000 --- a/code/unused/optics/laser-pointer.dm +++ /dev/null @@ -1,73 +0,0 @@ -// A laser pointer. Emits a (tunable) low-power laser beam -// Used for alignment and testing of the optics system - -/obj/item/device/laser_pointer - name = "laser pointer" - desc = "A portable low-power laser used for optical system alignment. The label reads: 'Danger: Class IIIa laser device. Avoid direct eye exposure." - icon = 'optics.dmi' - icon_state = "pointer0" - var/on = 0 // true if operating - var/wavelength = 632 // operation wavelength (nm) - - var/gain_peak = 632 // gain peak (nm) - var/gain_width = 35 // gain bandwidth (nm) - var/peak_output = 0.005 // max output 5 mW - layer = OBJ_LAYER + 0.1 - - w_class = 4 - m_amt = 500 - g_amt = 100 - w_amt = 200 - - var/obj/effect/beam/laser/beam // the created beam - - flags = CONDUCT - - attack_ai() - return - - attack_paw() - return - - attack_self(var/mob/user) - - - on = !on - if(on) - turn_on() - else - turn_off() - - updateicon() - - verb/rotate() - set name = "Rotate" - set src in view(1) - turn_off() - set_dir(turn(dir, -90)) - if(on) turn_on() - - Move(var/atom/newloc,var/newdir) - . = ..(newloc,newdir) - if(on && . && isturf(newloc)) - turn_off() - turn_on() - return . - - proc/turn_on() - if(!isturf(loc)) - return - - beam = new(loc, dir, wavelength, 1, 1) - beam.master = src - - proc/turn_off() - if(beam) - beam.remove() - - dropped() - turn_off() - turn_on() - - proc/updateicon() - icon_state = "pointer[on]" \ No newline at end of file diff --git a/code/unused/optics/mirror.dm b/code/unused/optics/mirror.dm deleted file mode 100644 index 6570874b1f2..00000000000 --- a/code/unused/optics/mirror.dm +++ /dev/null @@ -1,82 +0,0 @@ -// Mirror object -// Part of the optics system -// -// reflects laser beams -// 16 directional states 0/22.5/45/67.5deg to allow for 0/45deg beam angles - - -// ideas: -// frame/stand icon w/ mirror directional overlay -// two sets of overlay icons for 0/45 and 22.5/67.5 deg angles - -// can rotate cw/acw - need screwdriver to loosen/tighten mirror -// use wrench to anchor/unanchor frame -// if touched, gets dirty - fingerprints, which reduce reflectivity -// if dirty and hit with high-power beam, mirror may shatter -// some kind of dust accumulation with HasProximity? Could check for mob w/o labcoat etc. -// can clean with acetone+wipes - -/obj/optical/mirror - icon = 'optical.dmi' - icon_state = "mirrorA" - set_dir(1) - desc = "A large, optical-grade mirror firmly mounted on a stand." - anchored = 0 - var/rotatable = 0 // true if mirror can be rotated - var/angle = 0 // normal of mirror, 0-15. 0=N, 1=NNE, 2=NE, 3=ENE, 4=E etc - - - New() - ..() - set_angle() - - - - //set the angle from icon_state and dir - proc/set_angle() - switch(dir) - if(1) - angle = 0 - if(5) - angle = 2 - if(4) - angle = 4 - if(6) - angle = 6 - if(2) - angle = 8 - if(10) - angle = 10 - if(8) - angle = 12 - if(9) - angle = 14 - - if(icon_state == "mirrorB") // 22.5deg turned states - angle++ - return - - // set the dir and icon_state from the angle - proc/set_dir() - if(angle%2 == 1) - icon_state = "mirrorB" - else - icon_state = "mirrorA" - switch(round(angle/2)*2) - if(0) - set_dir(1) - if(2) - set_dir(5) - if(4) - set_dir(4) - if(6) - set_dir(6) - if(8) - set_dir(2) - if(10) - set_dir(10) - if(12) - set_dir(8) - if(14) - set_dir(9) - return \ No newline at end of file diff --git a/code/unused/pda2/base_os.dm b/code/unused/pda2/base_os.dm deleted file mode 100644 index 59f616c62bb..00000000000 --- a/code/unused/pda2/base_os.dm +++ /dev/null @@ -1,446 +0,0 @@ -/datum/computer/file/pda_program/os - proc - receive_os_command(list/command_list) - if((!src.holder) || (!src.master) || (!command_list) || !(command_list["command"])) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - -//Main os program: Provides old pda interface and four programs including file browser, notes, messenger, and atmos scan - main_os - name = "ThinkOS 7" - size = 8.0 - var/mode = 0 - //Note vars - var/note = "Congratulations, your station has chosen the Thinktronic 5150 Personal Data Assistant!" - var/note_mode = 0 //0 For note editor, 1 for note browser - var/datum/computer/file/text/note_file = null //If set, save to this file. - //Messenger vars - var/list/detected_pdas = list() - var/message_on = 1 - var/message_silent = 0 //To beep or not to beep, that is the question - var/message_mode = 0 //0 for pda list, 1 for messages - var/message_tone = "beep" //Custom ringtone - var/message_note = null //Current messages in memory (Store as separate file only later??) - //File browser vars - var/datum/computer/folder/browse_folder = null - var/datum/computer/file/clipboard = null //Current file to copy - - - - receive_os_command(list/command_list) - if(..()) - return - - //world << "[command_list["command"]]" - return - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - dat += "

PERSONAL DATA ASSISTANT

" - dat += "Owner: [src.master.owner]

" - - dat += "

General Functions

" - dat += "" - - dat += "

Utilities

" - dat += "" - - if(1) - //Note Program. Can save/load note files. - dat += "

Notekeeper V2.5

" - - if(!src.note_mode) - dat += "Edit" - dat += " | New File" - dat += " | Save" - dat += " | Load
" - - dat += src.note - else - dat += " Back" - dat += " | \[[src.holding_folder.holder.file_amount - src.holding_folder.holder.file_used]\] Free
" - dat += "" - - for(var/datum/computer/file/text/T in src.holding_folder.contents) - dat += "" - dat += "" - dat += "" - - dat += "
[T.name][T.extension]Length: [T.data ? (length(T.data)) : "0"]
" - - if(2) - //Messenger. Uses Radio. Is a messenger. - //TO-DO: ~file sharing~ - src.master.overlays.Cut() //Remove existing alerts - dat += "

SpaceMessenger V4.0.5

" - - if (!src.message_mode) - - dat += "Ringer: [src.message_silent == 1 ? "Off" : "On"] | " - dat += "Send / Receive: [src.message_on == 1 ? "On" : "Off"] | " - dat += "Set Ringtone | " - dat += "Messages
" - - dat += "Scan
" - dat += "Detected PDAs
" - - dat += "
    " - - var/count = 0 - - if (src.message_on) - for (var/obj/item/device/pda2/P in src.detected_pdas) - if (!P.owner) - src.detected_pdas -= P - continue - else if (P == src) //I guess this can happen if somebody copies the system file. - src.detected_pdas -= P - continue - - dat += "
  • [P]" - - dat += "
  • " - count++ - - dat += "
" - - if (count == 0) - dat += "None detected.
" - - else - dat += "Clear | " - dat += "Back
" - - dat += "

Messages

" - - dat += src.message_note - dat += "
" - - if(3) - //File Browser. - //To-do(?): Setting "favorite" programs to access straight from main menu - //Not sure how needed it is, not like they have to go through 500 subfolders or whatever - if((!src.browse_folder) || !(src.browse_folder.holder in src.master)) - src.browse_folder = src.holding_folder - - dat += " | Paste" - dat += " | Drive: " - dat += "\[[src.browse_folder.holder == src.master.hd ? "MAIN" : "CART"]\]
" - - dat += "Contents of [browse_folder] | Drive ID:\[[src.browse_folder.holder.title]]
" - dat += "Used: \[[src.browse_folder.holder.file_used]/[src.browse_folder.holder.file_amount]\]
" - - dat += "" - for(var/datum/computer/file/F in browse_folder.contents) - if(F == src) - dat += "" - continue - dat += "" - dat += "" - - dat += "" - - dat += "" - dat += "" - - dat += "" - - dat += "" - - dat += "
SystemSize: [src.size]SYSTEM
[F.name]Size: [F.size][F.extension]DelRenameCopy
" - - if(4) - //Atmos Scanner - dat += "

Atmospheric Readings

" - - var/turf/T = get_turf_or_move(get_turf(src.master)) - if (isnull(T)) - dat += "Unable to obtain a reading.
" - else - var/datum/gas_mixture/environment = T.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - - dat += "Air Pressure: [round(pressure,0.1)] kPa
" - - if (total_moles()) - var/o2_level = environment.oxygen/total_moles() - var/n2_level = environment.nitrogen/total_moles() - var/co2_level = environment.carbon_dioxide/total_moles() - var/plasma_level = environment.toxins/total_moles() - var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level) - - dat += "Nitrogen: [round(n2_level*100)]%
" - - dat += "Oxygen: [round(o2_level*100)]%
" - - dat += "Carbon Dioxide: [round(co2_level*100)]%
" - - dat += "Plasma: [round(plasma_level*100)]%
" - - if(unknown_level > 0.01) - dat += "OTHER: [round(unknown_level)]%
" - - dat += "Temperature: [round(environment.temperature-T0C)]°C
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["flight"]) - src.master.toggle_light() - - else if(href_list["scanner"]) - if(src.master.scan_program) - src.master.scan_program = null - - else if(href_list["input"]) - switch(href_list["input"]) - if("tone") - var/t = input(usr, "Please enter new ringtone", src.name, src.message_tone) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = sanitize(copytext(t, 1, 20)) - src.message_tone = t - - if("note") - var/t = input(usr, "Please enter note", src.name, src.note) as message - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = copytext(adminscrub(t), 1, MAX_MESSAGE_LEN) - src.note = t - - - if("message") - var/obj/item/device/pda2/P = locate(href_list["target"]) - if(!P || !istype(P)) - return - - var/t = input(usr, "Please enter message", P.name, null) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - - var/datum/signal/signal = new - signal.data["command"] = "text message" - signal.data["message"] = t - signal.data["sender"] = src.master.owner - signal.data["tag"] = "\ref[P]" - src.post_signal(signal) - src.message_note += "→ To [P.owner]:
[t]
" - log_pda("[usr] sent [t] to [P.owner]") - - if("rename") - var/datum/computer/file/F = locate(href_list["target"]) - if(!F || !istype(F)) - return - - var/t = input(usr, "Please enter new name", src.name, F.name) as text - t = sanitize(copytext(t, 1, 16)) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - - - else if(href_list["message_func"]) //Messenger specific topic junk - switch(href_list["message_func"]) - if("ringer") - src.message_silent = !src.message_silent - if("on") - src.message_on = !src.message_on - if("clear") - src.message_note = null - if("scan") - if(src.message_on) - src.detected_pdas = list() - var/datum/signal/signal = new - signal.data["command"] = "report pda" - src.post_signal(signal) - - else if(href_list["note_func"]) //Note program specific topic junk - switch(href_list["note_func"]) - if("new") - src.note_file = null - src.note = null - if("save") - if(src.note_file && src.note_file.holder in src.master) - src.note_file.data = src.note - else - var/datum/computer/file/text/F = new /datum/computer/file/text - if(!src.holding_folder.add_file(F)) - del(F) - else - src.note_file = F - F.data = src.note - - if("load") - var/datum/computer/file/text/T = locate(href_list["target"]) - if(!T || !istype(T)) - return - - src.note_file = T - src.note = note_file.data - src.note_mode = 0 - - if("switchmenu") - src.note_mode = !src.note_mode - - else if(href_list["browse_func"]) //File browser specific topic junk - var/datum/computer/target = locate(href_list["target"]) - switch(href_list["browse_func"]) - if("drive") - if(src.browse_folder.holder == src.master.hd && src.master.cartridge && (src.master.cartridge.root)) - src.browse_folder = src.master.cartridge.root - else - src.browse_folder = src.holding_folder - if("open") - if(!target || !istype(target)) - return - if(istype(target, /datum/computer/file/pda_program)) - if(istype(target,/datum/computer/file/pda_program/os) && (src.master.host_program)) - return - else - src.master.run_program(target) - src.master.updateSelfDialog() - return - - if("delete") - if(!target || !istype(target)) - return - src.master.delete_file(target) - - if("copy") - if(istype(target,/datum/computer/file) && (!target.holder || (target.holder in src.master.contents))) - src.clipboard = target - - if("paste") - if(istype(target,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(target) - - - else if(href_list["message_mode"]) - var/newmode = text2num(href_list["message_mode"]) - src.message_mode = max(newmode, 0) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - receive_signal(datum/signal/signal) - if(..()) - return - - switch(signal.data["command"]) - if("text message") - if(!message_on || !signal.data["message"]) - return - var/sender = signal.data["sender"] - if(!sender) - sender = "!Unknown!" - - src.message_note += "← From [sender]:
[signal.data["message"]]
" - var/alert_beep = null //Don't beep if set to silent. - if(!src.message_silent) - alert_beep = src.message_tone - - src.master.display_alert(alert_beep) - src.master.updateSelfDialog() - - if("report pda") - if(!message_on) - return - - var/datum/signal/newsignal = new - newsignal.data["command"] = "reporting pda" - newsignal.data["tag"] = "\ref[signal.source]" - src.post_signal(newsignal) - - if("reporting pda") - if(!detected_pdas) - detected_pdas = new() - - if(!(signal.source in detected_pdas)) - detected_pdas += signal.source - - src.master.updateSelfDialog() - - return - - return_text_header() - if(!src.master) - return - - var/dat - - if(src.mode) - dat += " | Main Menu" - - else if (!isnull(src.master.cartridge)) - dat += " | Eject [src.master.cartridge]" - - dat += " | Refresh" - - return dat \ No newline at end of file diff --git a/code/unused/pda2/base_program.dm b/code/unused/pda2/base_program.dm deleted file mode 100644 index f5c11efc077..00000000000 --- a/code/unused/pda2/base_program.dm +++ /dev/null @@ -1,185 +0,0 @@ -//Eventual plan: Convert all datum/data to datum/computer/file -/datum/computer/file/text - name = "text" - extension = "TEXT" - size = 2.0 - var/data = null - -/datum/computer/file/record - name = "record" - extension = "REC" - - var/list/fields = list( ) - - -//base pda program - -/datum/computer/file/pda_program - name = "blank program" - extension = "PPROG" - var/obj/item/device/pda2/master = null - var/id_tag = null - - os - name = "blank system program" - extension = "PSYS" - - scan - name = "blank scan program" - extension = "PSCAN" - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/item/device/pda2)) - src.master = src.holder.loc - - proc - return_text() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - //world << "Holder [holder] not in [master] of prg:[src]" - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - process() //This isn't actually used at the moment - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - //maybe remove this, I haven't found a good use for it yet - send_os_command(list/command_list) - if(!src.master || !src.holder || src.master.host_program || !command_list) - return 1 - - if(!istype(src.master.host_program) || src.master.host_program == src) - return 1 - - src.master.host_program.receive_os_command() - - return 0 - - return_text_header() - if(!src.master || !src.holder) - return - - var/dat = " | Main Menu" - dat += " | Refresh" - - return dat - - post_signal(datum/signal/signal, newfreq) - if(master) - master.post_signal(signal, newfreq) - else - del(signal) - - transfer_holder(obj/item/weapon/disk/data/newholder,datum/computer/folder/newfolder) - - if((newholder.file_used + src.size) > newholder.file_amount) - return 0 - - if(!newholder.root) - newholder.root = new /datum/computer/folder - newholder.root.holder = newholder - newholder.root.name = "root" - - if(!newfolder) - newfolder = newholder.root - - if((src.holder && src.holder.read_only) || newholder.read_only) - return 0 - - if((src.holder) && (src.holder.root)) - src.holder.root.remove_file(src) - - newfolder.add_file(src) - - if(istype(newholder.loc,/obj/item/device/pda2)) - src.master = newholder.loc - - //world << "Setting [src.holder] to [newholder]" - src.holder = newholder - return 1 - - - receive_signal(datum/signal/signal) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - - - Topic(href, href_list) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(src.master.active_program != src) - return 1 - - if ((!usr.contents.Find(src.master) && (!in_range(src.master, usr) || !istype(src.master.loc, /turf))) && (!istype(usr, /mob/living/silicon))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - usr.machine = src.master - - if (href_list["close"]) - usr.machine = null - usr << browse(null, "window=pda2") - return 0 - - if (href_list["quit"]) -// src.master.processing_programs.Remove(src) - if(src.master.host_program && src.master.host_program.holder && (src.master.host_program.holder in src.master.contents)) - src.master.run_program(src.master.host_program) - src.master.updateSelfDialog() - return 1 - else - src.master.active_program = null - src.master.updateSelfDialog() - return 1 - - return 0 \ No newline at end of file diff --git a/code/unused/pda2/pda2.dm b/code/unused/pda2/pda2.dm deleted file mode 100644 index 7f451c0d39a..00000000000 --- a/code/unused/pda2/pda2.dm +++ /dev/null @@ -1,297 +0,0 @@ -//The advanced pea-green monochrome lcd of tomorrow. - - -//TO-DO: rearrange all this disk/data stuff so that fixed disks are the parent type -//because otherwise you have carts going into floppy drives and it's ALL MAD -/obj/item/weapon/disk/data/cartridge - name = "Cart 2.0" - desc = "A data cartridge for portable microcomputers." - icon = 'icons/obj/pda.dmi' - icon_state = "cart" - item_state = "electronic" - file_amount = 80.0 - title = "ROM Cart" - - pda2test - name = "Test Cart" - New() - ..() - src.root.add_file( new /datum/computer/file/computer_program/arcade(src)) - src.root.add_file( new /datum/computer/file/pda_program/manifest(src)) - src.root.add_file( new /datum/computer/file/pda_program/status_display(src)) - src.root.add_file( new /datum/computer/file/pda_program/signaler(src)) - src.root.add_file( new /datum/computer/file/pda_program/qm_records(src)) - src.root.add_file( new /datum/computer/file/pda_program/scan/health_scan(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/security(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/medical(src)) - src.read_only = 1 - - -/obj/item/device/pda2 - name = "PDA" - desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by an EEPROM cartridge." - icon = 'icons/obj/pda.dmi' - icon_state = "pda" - item_state = "electronic" - w_class = 2.0 - slow_flags = SLOT_BELT - - var/owner = null - var/default_cartridge = null // Access level defined by cartridge - var/obj/item/weapon/disk/data/cartridge/cartridge = null //current cartridge - var/datum/computer/file/pda_program/active_program = null - var/datum/computer/file/pda_program/os/host_program = null - var/datum/computer/file/pda_program/scan/scan_program = null - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/fon = 0 //Is the flashlight function on? - var/f_lum = 3 //Luminosity for the flashlight function -// var/datum/data/record/active1 = null //General -// var/datum/data/record/active2 = null //Medical -// var/datum/data/record/active3 = null //Security -// var/obj/item/weapon/integrated_uplink/uplink = null //Maybe replace uplink with some remote ~syndicate~ server - var/frequency = 1149 - var/datum/radio_frequency/radio_connection - - var/setup_default_cartridge = null //Cartridge contains job-specific programs - var/setup_drive_size = 24.0 //PDAs don't have much work room at all, really. - var/setup_system_os_path = /datum/computer/file/pda_program/os/main_os //Needs an operating system to...operate!! - - -/obj/item/device/pda2/pickup(mob/user) - if (src.fon) - src.sd_SetLuminosity(0) - user.sd_SetLuminosity(user.luminosity + src.f_lum) - -/obj/item/device/pda2/dropped(mob/user) - if (src.fon) - user.sd_SetLuminosity(user.luminosity - src.f_lum) - src.sd_SetLuminosity(src.f_lum) - -/obj/item/device/pda2/New() - ..() - spawn(5) - src.hd = new /obj/item/weapon/disk/data/fixed_disk(src) - src.hd.file_amount = src.setup_drive_size - src.hd.name = "Minidrive" - src.hd.title = "Minidrive" - - if(src.setup_system_os_path) - src.host_program = new src.setup_system_os_path - - src.hd.file_amount = max(src.hd.file_amount, src.host_program.size) - - src.host_program.transfer_holder(src.hd) - - if(radio_controller) - radio_controller.add_object(src, frequency) - - - if (src.default_cartridge) - src.cartridge = new src.setup_default_cartridge(src) -// if(src.owner) -// processing_items.Add(src) - -/obj/item/device/pda2/attack_self(mob/user as mob) - user.machine = src - - var/dat = "Personal Data Assistant" - - dat += "Close" - - if (!src.owner) - if(src.cartridge) - dat += " | Eject [src.cartridge]" - dat += "
Warning: No owner information entered. Please swipe card.

" - dat += "Retry" - else - if(src.active_program) - dat += src.active_program.return_text() - else - if(src.host_program) - src.run_program(src.host_program) - dat += src.active_program.return_text() - else - if(src.cartridge) - dat += " | Eject [src.cartridge]
" - dat += "
Fatal Error 0x17
" - dat += "No System Software Loaded
" - //To-do: System recovery shit (maybe have a dedicated computer for this kind of thing) - - - user << browse(dat,"window=pda2") - onclose(user,"pda2") - return - -/obj/item/device/pda2/Topic(href, href_list) - ..() - - if (usr.contents.Find(src) || usr.contents.Find(src.master) || (istype(src.loc, /turf) && get_dist(src, usr) <= 1)) - if (usr.stat || usr.restrained()) - return - - src.add_fingerprint(usr) - usr.machine = src - - - if(href_list["return_to_host"]) - if(src.host_program) - src.active_program = src.host_program - src.host_program = null - - else if (href_list["eject_cart"]) - src.eject_cartridge() - - else if (href_list["refresh"]) - src.updateSelfDialog() - - else if (href_list["close"]) - usr << browse(null, "window=pda2") - usr.machine = null - - src.updateSelfDialog() - return - -/obj/item/device/pda2/attackby(obj/item/weapon/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/disk/data/cartridge) && isnull(src.cartridge)) - user.drop_item() - C.loc = src - user << "\blue You insert [C] into [src]." - src.cartridge = C - src.updateSelfDialog() - - else if (istype(C, /obj/item/weapon/card/id) && !src.owner && C:registered_name) - src.owner = C:registered_name - src.name = "PDA-[src.owner]" - user << "\blue Card scanned." - src.updateSelfDialog() - -/obj/item/device/pda2/receive_signal(datum/signal/signal) - if(!signal || signal.encryption || !src.owner) return - - if(signal.data["tag"] && signal.data["tag"] != "\ref[src]") return - - if(src.host_program) - src.host_program.receive_signal(signal) - - if(src.active_program && (src.active_program != src.host_program)) - src.host_program.receive_signal(signal) - - return - -/obj/item/device/pda2/attack(mob/M as mob, mob/user as mob) - if(src.scan_program) - return - else - ..() - -/obj/item/device/pda2/afterattack(atom/A as mob|obj|turf|area, mob/user as mob) - var/scan_dat = null - if(src.scan_program && istype(src.scan_program)) - scan_dat = src.scan_program.scan_atom(A) - - if(scan_dat) - A.visible_message("\red [user] has scanned [A]!") - user.show_message(scan_dat, 1) - - return - - -/obj/item/device/pda2/proc - - post_signal(datum/signal/signal,var/newfreq) - if(!signal) - return - var/freq = newfreq - if(!freq) - freq = src.frequency - - signal.source = src - - var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq) - - signal.transmission_method = TRANSMISSION_RADIO - if(frequency) - return frequency.post_signal(src, signal) - else - del(signal) - - eject_cartridge() - if(src.cartridge) - var/turf/T = get_turf(src) - - if(src.active_program && (src.active_program.holder == src.cartridge)) - src.active_program = null - - if(src.host_program && (src.host_program.holder == src.cartridge)) - src.host_program = null - - if(src.scan_program && (src.scan_program.holder == src.cartridge)) - src.scan_program = null - - src.cartridge.loc = T - src.cartridge = null - - return - - //Toggle the built-in flashlight - toggle_light() - src.fon = (!src.fon) - - if (ismob(src.loc)) - if (src.fon) - src.loc.sd_SetLuminosity(src.loc.luminosity + src.f_lum) - else - src.loc.sd_SetLuminosity(src.loc.luminosity - src.f_lum) - else - src.sd_SetLuminosity(src.fon * src.f_lum) - - src.updateSelfDialog() - - display_alert(var/alert_message) //Add alert overlay and beep - if (alert_message) - playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1) - for (var/mob/O in hearers(3, src.loc)) - O.show_message(text("\icon[src] *[alert_message]*")) - - src.overlays.Cut() - src.overlays += image('icons/obj/pda.dmi', "pda-r") - return - - run_program(datum/computer/file/pda_program/program) - if((!program) || (!program.holder)) - return 0 - - if(!(program.holder in src)) - // world << "Not in src" - program = new program.type - program.transfer_holder(src.hd) - - if(program.master != src) - program.master = src - - if(!src.host_program && istype(program, /datum/computer/file/pda_program/os)) - src.host_program = program - - if(istype(program, /datum/computer/file/pda_program/scan)) - if(program == src.scan_program) - src.scan_program = null - else - src.scan_program = program - return 1 - - src.active_program = program - return 1 - - delete_file(datum/computer/file/file) - //world << "Deleting [file]..." - if((!file) || (!file.holder) || (file.holder.read_only)) - //world << "Cannot delete :(" - return 0 - - //Don't delete the running program you jerk - if(src.active_program == file || src.host_program == file) - src.active_program = null - - //world << "Now calling del on [file]..." - del(file) - return 1 \ No newline at end of file diff --git a/code/unused/pda2/record_progs.dm b/code/unused/pda2/record_progs.dm deleted file mode 100644 index 2ea856c93e2..00000000000 --- a/code/unused/pda2/record_progs.dm +++ /dev/null @@ -1,181 +0,0 @@ -//CONTENTS: -//Generic records -//Security records -//Medical records - - -/datum/computer/file/pda_program/records - var/mode = 0 - var/datum/data/record/active1 = null //General - var/datum/data/record/active2 = null //Security/Medical/Whatever - -//To-do: editing arrest status/etc from pda. -/datum/computer/file/pda_program/records/security - name = "Security Records" - size = 12.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - dat += "

Security Record List

" - - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]
" - - dat += "
" - - if(1) - - dat += "

Security Record

" - - dat += "
Back
" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]]
" - dat += "Sex: [src.active1.fields["sex"]]
" - dat += "Age: [src.active1.fields["age"]]
" - dat += "Fingerprint: [src.active1.fields["fingerprint"]]
" - dat += "Physical Status: [src.active1.fields["p_stat"]]
" - dat += "Mental Status: [src.active1.fields["m_stat"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - dat += "

Security Data

" - if (istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)) - dat += "Criminal Status: [src.active2.fields["criminal"]]
" - - dat += "Minor Crimes: [src.active2.fields["mi_crim"]]
" - dat += "Details: [src.active2.fields["mi_crim"]]

" - - dat += "Major Crimes: [src.active2.fields["ma_crim"]]
" - dat += "Details: [src.active2.fields["ma_crim_d"]]

" - - dat += "Important Notes:
" - dat += "[src.active2.fields["notes"]]" - else - dat += "Record Lost!
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/S = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.security) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - S = E - break - - src.active1 = R - src.active2 = S - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -/datum/computer/file/pda_program/records/medical - name = "Medical Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - - dat += "

Medical Record List

" - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]
" - dat += "
" - - if(1) - - dat += "

Medical Record

" - - dat += "
Back
" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]]
" - dat += "Sex: [src.active1.fields["sex"]]
" - dat += "Age: [src.active1.fields["age"]]
" - dat += "Fingerprint: [src.active1.fields["fingerprint"]]
" - dat += "Physical Status: [src.active1.fields["p_stat"]]
" - dat += "Mental Status: [src.active1.fields["m_stat"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - dat += "

Medical Data

" - if (istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)) - dat += "Blood Type: [src.active2.fields["b_type"]]

" - - dat += "Minor Disabilities: [src.active2.fields["mi_dis"]]
" - dat += "Details: [src.active2.fields["mi_dis_d"]]

" - - dat += "Major Disabilities: [src.active2.fields["ma_dis"]]
" - dat += "Details: [src.active2.fields["ma_dis_d"]]

" - - dat += "Allergies: [src.active2.fields["alg"]]
" - dat += "Details: [src.active2.fields["alg_d"]]

" - - dat += "Current Diseases: [src.active2.fields["cdi"]]
" - dat += "Details: [src.active2.fields["cdi_d"]]

" - - dat += "Important Notes: [src.active2.fields["notes"]]
" - else - dat += "Record Lost!
" - - dat += "
" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/M = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - break - - src.active1 = R - src.active2 = M - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return \ No newline at end of file diff --git a/code/unused/pda2/scanners.dm b/code/unused/pda2/scanners.dm deleted file mode 100644 index 499b8679542..00000000000 --- a/code/unused/pda2/scanners.dm +++ /dev/null @@ -1,103 +0,0 @@ -//CONTENTS: -//Base scanner stuff -//Health scanner -//Forensic scanner -//Reagent scanner - -/datum/computer/file/pda_program/scan - return_text() - return src.return_text_header() - - proc/scan_atom(atom/A as mob|obj|turf|area) - - if( !A || (!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.scan_program == src) - master.scan_program = null - return 1 - - return 0 - - //Health analyzer program - health_scan - name = "Health Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - - var/mob/living/carbon/C = A - if(!istype(C)) - return - - var/dat = "\blue Analyzing Results for [C]:\n" - dat += "\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]\n" - dat += "\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]\n" - dat += "\blue \t Key: Suffocation/Toxin/Burns/Brute\n" - dat += "\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)" - if(C.virus) - dat += "\red \nWarning Virus Detected.\nName: [C.virus.name].\nType: [C.virus.spread].\nStage: [C.virus.stage]/[C.virus.max_stages].\nPossible Cure: [C.virus.cure]" - - return dat - - //Forensic scanner - forensic_scan - name = "Forensic Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - - if(istype(A,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = A - if (!istype(H.dna, /datum/dna) || !isnull(H.gloves)) - dat += "\blue Unable to scan [A]'s fingerprints.\n" - else - dat += "\blue [H]'s Fingerprints: [md5(H.dna.uni_identity)]\n" - if ( !(H.blood_DNA.len) ) - dat += "\blue No blood found on [H]\n" - else - for(var/i = 1, i < H.blood_DNA.len, i++) - var/list/templist = H.blood_DNA[i] - user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]" - - if (!A.fingerprints) - dat += "\blue Unable to locate any fingerprints on [A]!\n" - else - var/list/L = params2list(A:fingerprints) - dat += "\blue Isolated [L.len] fingerprints.\n" - for(var/i in L) - dat += "\blue \t [i]\n" - - return dat - - - //Reagent scanning program - reagent_scan - name = "Reagent Scan" - size = 6.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - if(!isnull(A.reagents)) - if(A.reagents.reagent_list.len > 0) - var/reagents_length = A.reagents.reagent_list.len - dat += "\blue [reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.\n" - for (var/datum/reagent/re in A.reagents.reagent_list) - dat += "\blue \t [re] - [re.volume]\n" - else - dat = "\blue No active chemical agents found in [A]." - else - dat = "\blue No significant chemical agents found in [A]." - - return dat diff --git a/code/unused/pda2/smallprogs.dm b/code/unused/pda2/smallprogs.dm deleted file mode 100644 index 1f8a1a74bf9..00000000000 --- a/code/unused/pda2/smallprogs.dm +++ /dev/null @@ -1,207 +0,0 @@ -//Assorted small programs not worthy of their own file -//CONTENTS: -//Crew Manifest viewer -//Status display controller -//Remote signaling program -//Cargo orders monitor - -//Manifest -/datum/computer/file/pda_program/manifest - name = "Manifest" - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Crew Manifest

" - dat += "Entries cannot be modified from this terminal.

" - - for (var/datum/data/record/t in data_core.general) - dat += "[t.fields["name"]] - [t.fields["rank"]]
" - dat += "
" - - return dat - -//Status Display -/datum/computer/file/pda_program/status_display - name = "Status Controller" - size = 8.0 - var/message1 // For custom messages on the displays. - var/message2 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Station Status Display Interlink

" - - dat += "\[ Clear \]
" - dat += "\[ Station Time \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - - dat += "
" - dat += "\[ Alert: None |" - - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]
" - - return dat - - - Topic(href, href_list) - if(..()) - return - - if(href_list["statdisp"]) - switch(href_list["statdisp"]) - if("message") - post_status("message", message1, message2) - if("alert") - post_status("alert", href_list["alert"]) - if("time") - post_status("time") - - if("setmsg1") - message1 = input("Line 1", "Enter Message Text", message1) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - src.master.updateSelfDialog() - - if("setmsg2") - message2 = input("Line 2", "Enter Message Text", message2) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - src.master.updateSelfDialog() - else - post_status(href_list["statdisp"]) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - proc/post_status(var/command, var/data1, var/data2) - if(!src.master) - return - - var/datum/signal/status_signal = new - status_signal.source = src.master - status_signal.transmission_method = 1 - status_signal.data["command"] = command - - switch(command) - if("message") - status_signal.data["msg1"] = data1 - status_signal.data["msg2"] = data2 - if("alert") - status_signal.data["picture_state"] = data1 - - src.post_signal(status_signal,"1435") - -//Signaler -/datum/computer/file/pda_program/signaler - name = "Signalix 5" - size = 8.0 - var/send_freq = 1457 //Frequency signal is sent at, should be kept within normal radio ranges. - var/send_code = 30 - var/last_transmission = 0 //No signal spamming etc - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += "

Remote Signaling System

" - dat += {" -Send Signal
- -Frequency: -- -- -[format_frequency(send_freq)] -+ -+
-
-Code: -- -- -[send_code] -+ -+
"} - - return dat - - Topic(href, href_list) - if(..()) - return - - if (href_list["send"]) - if(last_transmission && world.time < (last_transmission + 5)) - return - last_transmission = world.time - spawn( 0 ) - var/time = time2text(world.realtime,"hh:mm:ss") - lastsignalers.Add("[time] : [usr.key] used [src.master] @ location ([src.master.loc.x],[src.master.loc.y],[src.master.loc.z]) : [format_frequency(send_freq)]/[send_code]") - - var/datum/signal/signal = new - signal.source = src - signal.encryption = send_code - signal.data["message"] = "ACTIVATE" - - src.post_signal(signal,"[send_freq]") - return - - else if (href_list["adj_freq"]) - src.send_freq = sanitize_frequency(src.send_freq + text2num(href_list["adj_freq"])) - - else if (href_list["adj_code"]) - src.send_code += text2num(href_list["adj_code"]) - src.send_code = round(src.send_code) - src.send_code = min(100, src.send_code) - src.send_code = max(1, src.send_code) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -//Supply record monitor -/datum/computer/file/pda_program/qm_records - name = "Supply Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - dat += "

Supply Record Interlink

" - - dat += "
Supply shuttle
" - dat += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]
" - dat += "Current approved orders:
    " - for(var/S in supply_shuttle_shoppinglist) - var/datum/supply_order/SO = S - dat += "
  1. [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]
  2. " - dat += "
" - - dat += "Current requests:
    " - for(var/S in supply_shuttle_requestlist) - var/datum/supply_order/SO = S - dat += "
  1. [SO.object.name] requested by [SO.orderedby]
  2. " - dat += "
Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management." - - return dat diff --git a/code/unused/pipe.dm b/code/unused/pipe.dm deleted file mode 100644 index 2a3e0b90e19..00000000000 --- a/code/unused/pipe.dm +++ /dev/null @@ -1,1828 +0,0 @@ -// pipeline datum for storing inter-machine links -// create a pipeline - -//number of pipelines -var/linenums = 0 - -/obj/machinery/pipeline/New() - ..() - - gas = new /datum/gas_mixture() - ngas = new /datum/gas_mixture() - - gasflowlist += src - -// find the pipeline that contains the /obj/machine (including pipe) -/proc/findline(var/obj/machinery/M) - - for(var/obj/machinery/pipeline/P in plines) - - for(var/obj/machinery/O in P.nodes) - - if(M==O) - return P - - return null - -// sets the vnode1&2 terminators to the joining machines (or null) -/obj/machinery/pipeline/proc/setterm() - - //first make sure pipes are oriented correctly - - var/obj/machinery/M = null - - for(var/obj/machinery/pipes/P in nodes) - if(!M) // special case for 1st pipe - if(P.node1 && P.node1.ispipe()) - P.flip() // flip if node1 is a pipe - else - if(P.node1 != M) //other cases, flip if node1 doesn't point to previous node - P.flip() // (including if it is null) - - - M = P - - - // pipes are now ordered so that n1/n2 is in same order as pipeline list - - var/obj/machinery/pipes/P = nodes[1] // 1st node in list - vnode1 = P.node1 // n1 points to 1st machine - P = nodes[nodes.len] // last node in list - vnode2 = P.node2 // n2 points to last machine - - if(vnode1) - vnode1.buildnodes() - if(vnode2) - vnode2.buildnodes() - - return - -/* -/obj/machinery/pipeline/get_gas_moles(from) - return gas.total_moles()/capmult -*/ -/obj/machinery/pipeline/get_gas(from) - return gas - -/obj/machinery/pipeline/gas_flow() - //if(suffix == "d" && Debug) world.log << "PLF1 [gas.total_moles()] ~ [ngas.total_moles()]" - - gas.copy_from(ngas) - - //if(suffix == "d" && Debug) world.log << "PLF2 [gas.total_moles()] ~ [ngas.total_moles()]" - -/obj/machinery/pipeline/process() - /* - // heat exchange for whole pipeline - - //if(suffix=="dbgp") - // world.log << "PLP" - // Plasma() - -// var/dbg = (suffix == "d") && Debug - - //if(dbg) world.log << "PLP1 [gas.total_moles()] ~ [ngas.total_moles()]" - - if(!numnodes) - return //dividing by zero is bad okay? - - var/gtemp = ngas.temperature // cached temperature for heat exch calc - var/tot_node = ngas.total_moles() / numnodes // fraction of gas in this node - - //if(dbg) world.log << "PLHE: [gtemp] [tot_node]" - - if(tot_node>0.1) // no pipe contents, don't heat - for(var/obj/machinery/pipes/P in src.nodes) // for each segment of pipe - P.heat_exchange(ngas, tot_node, numnodes, gtemp) //, dbg) // exchange heat with its turf - if(!istype(P, /obj/machinery/pipes/heat_exch) && ((100*tot_node/P.capacity > 15000) || (gtemp > 8000)) ) - P.rupture() - //Commenting this out because it spams on endlessly - //for (var/mob/M in viewers(P)) - //M.show_message("\red The pipe has ruptured!", 3) - //so this is changed to pipe rupturing instead of explosions - //i.e. it ruptures if the pressure over 15000% - //and temperature over 8000K - //it also doesn't work on heat_exchange pipes - // now do standard gas flow proc - - - //if(dbg) world.log << "PLP2 [ngas.total_moles()]" - - var/delta_gt - - if(vnode1 && !(vnode1.stat & BROKEN)) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt)//, dbg) - - //if(dbg) world.log << "PLT1 [delta_gt] >> [gas.total_moles()] ~ [ngas.total_moles()]" - - flow = delta_gt - else - leak_to_turf(1) - - if(vnode2 && !(vnode2.stat & BROKEN)) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt)//, dbg) - - //if(dbg) world.log << "PLT2 [delta_gt] >> [gas.total_moles()] ~ [ngas.total_moles()]" - - flow -= delta_gt - else - leak_to_turf(2) - - */ //TODO: FIX - -/obj/machinery/pipeline/proc/leak_to_turf(var/port) - /* - var/turf/T - var/obj/machinery/pipes/P - var/list/ndirs - - switch(port) - if(1) - P = nodes[1] // 1st node in list - if (P==null) - T = src.loc - else - ndirs = P.get_node_dirs() - - T = get_step(P, ndirs[1]) - - - if(2) - P = nodes[nodes.len] // last node in list - if (P==null) - T = src.loc - else - - ndirs = P.get_node_dirs() - T = get_step(P, ndirs[2]) - if (T==null) - return - if(T.density) - return - - flow_to_turf(gas, ngas, T) - */ //TODO: FIX - - -// build the pipelines (THIS HAPPENS ONCE!) -/proc/makepipelines() - - for(var/obj/machinery/pipes/P in machines) // look for a pipe - - if(!P.plnum) // if not already part of a line - P.buildnodes(++linenums) // add it, and spread to all connected pipes - - //world.log<<"Line #[linecount] started at [P] ([P.x],[P.y],[P.z])" - - for(var/L = 1 to linenums) // for count of lines found - var/obj/machinery/pipeline/PL = new() // make a pipeline virtual object - PL.name = "pipeline #[L]" - plines += PL // and add it to the list - PL.linenumber = L - - - - for(var/obj/machinery/pipes/P in machines) // look for pipes - - if(P.termination) // true if pipe is terminated (ends in blank or a machine) - var/obj/machinery/pipeline/PL = plines[P.plnum] // get the pipeline from the pipe's pl-number - - var/list/pipes = pipelist(null, P) // get a list of pipes from P until terminated - - PL.nodes = pipes // pipeline is this list of nodes - PL.numnodes = pipes.len // with this many nodes - PL.capmult = PL.numnodes+1 // with this flow multiplier - - - - for(var/obj/machinery/pipes/P in machines) // all pipes - P.setline() // set the pipeline object for this pipe - - if(P.tag == "dbg") //add debug tag to line containing debug pipe - P.parent.tag = "dbg" - - if(P.suffix == "dbgpp") //add debug tag to line containing debug pipe - P.parent.suffix = "dbgp" - - if(P.suffix == "d") //add debug tag to line containing debug pipe - P.parent.suffix = "d" - - - for(var/obj/machinery/M in machines) // for all machines - if(M.p_dir) // which are pipe-connected - if(!M.ispipe()) // is not a pipe itself - M.buildnodes() // build the nodes, setting the links to the virtual pipelines - // also sets the vnodes for the pipelines - - for(var/obj/machinery/pipeline/PL in plines) // for all lines - PL.setterm() // orient the pipes and set the pipeline vnodes to the terminating machines - -// return a list of pipes (not including terminating machine) - -/proc/pipelist(var/obj/machinery/source, var/obj/machinery/startnode) - - var/list/L = list() - - var/obj/machinery/node = startnode - var/obj/machinery/prev = source - var/obj/machinery/newnode - - while(node) - L += node - newnode = node.next(prev) - prev = node - - if(newnode && newnode.ispipe()) - node = newnode - else - break - - return L - -// new pipes system - -// flip the nodes of a pipe -/obj/machinery/pipes/proc/flip() - var/obj/machinery/tempnode = node1 - node1 = node2 - node2 = tempnode - return - - -// return the next pipe in the node chain -/obj/machinery/pipes/next(var/obj/machinery/from) - - if(from == null) // if from null, then return the next actual pipe - if(node1 && node1.ispipe() ) - return node1 - if(node2 && node2.ispipe() ) - return node2 - return null // else return null if no real pipe connected - - else if(from == node1) // otherwise, return the node opposite the incoming one - return node2 - else - return node1 - - -// set the pipeline obj from the pl-number and global list of pipelines - -/obj/machinery/pipes/setline() - src.parent = plines[plnum] - return - -// returns the pipeline that this line is in - -/obj/machinery/pipes/getline() - return parent - -/obj/machinery/pipes/orient_pipe(P as obj) - if (!( src.node1 )) - src.node1 = P - else - if (!( src.node2 )) - src.node2 = P - else - return 0 - return 1 - -// returns a list of dir1, dir2 & p_dir for a pipe - -/obj/machinery/pipes/proc/get_dirs() - var/b1 - var/b2 - - for(var/d in cardinal) - if(p_dir & d) - if(!b1) - b1 = d - else if(!b2) - b2 = d - - return list(b1, b2, p_dir) - -// returns a list of the directions of a pipe, matched to nodes (if present) - -/obj/machinery/pipes/proc/get_node_dirs() - var/list/dirs = get_dirs() - - - if(!node1 && !node2) // no nodes - just return the standard dirs - return dirs // note extra p_dir on end of list is unimportant - else - if(node1) - var/d1 = get_dir(src, node1) // find the direction of node1 - if(d1==dirs[1]) // if it matches - return dirs // then dirs list is correct - else - return list(dirs[2], dirs[1]) // otherwise return the list swapped - - else // node2 must be valid - var/d2 = get_dir(src, node2) // direction of node2 - if(d2==dirs[2]) // matches - return dirs // dirs list is correct - else - return list(dirs[2], dirs[1]) // otherwise swap order - - -/obj/machinery/pipes/proc/update() - - var/turf/T = src.loc - - var/list/dirs = get_dirs() - - var/is = "[dirs[3]]" - - if(stat & BROKEN) - is += "-b" - - if ((src.level == 1 && isturf(src.loc) && T.intact)) - src.invisibility = 101 - is += "-f" - - else - src.invisibility = 0 - - src.icon_state = is - - if(node1 && node2) - overlays.Cut() - else if(!node1 && !node2) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else if(!node1) - var/d2 = get_dir(src, node2) - if(dirs[1] == d2) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - else if(!node2) - var/d1 = get_dir(src, node1) - if(dirs[1] == d1) - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[2]) - else - overlays += image('icons/obj/pipes.dmi', "discon", FLY_LAYER, dirs[1]) - - - return - -/obj/machinery/pipes/hide(var/i) - update() - - //its lazy right now but wait until after my exams and I'll redo it. - //redid it, oh shit - -/obj/machinery/pipes/proc/rupture() - - stat |= BROKEN - update() - -/obj/machinery/pipes/Del() - stat |= BROKEN - update() - ..() - - -/obj/machinery/pipes/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - if(!(stat & BROKEN)) - return - if (W:weldfuel < 2) - user << "\blue You need more welding fuel to complete this task." - return - W:weldfuel -= 2 - stat &= ~BROKEN - update() - for (var/mob/M in viewers(src)) - M.show_message("\red The pipe has been mended by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2) - return - -/obj/machinery/pipes/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - stat |= BROKEN - update() - if (prob(50)) - del(src) - return - if(3.0) - if(prob(75)) - stat |= BROKEN - update() - if (prob(25)) - del(src) - return - else - return -/* - var/strength = (((plasma + oxygen/2.0) / 1600000.0) * sqrt(temp) ) / 10 - message_admins("CODER: Pipe explosion strength: [strength], Temperature: [temp], Plasma: [plasma], Oxygen: [oxygen]") - //lets say hypothetically it uses up 9/10 of its energy in bursting the pipe - - if (strength < 773.0) - var/turf/T = get_turf(src.loc) - T.poison += plasma - T.firelevel = T.poison - T.res_vars() - - //if ((src.gas.temperature > (450+T0C) && src.gas.plasma == 1600000.0)) - - if (strength > (450+T0C)) - var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z) - var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z) - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - var/zone = 4 - if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) ) - zone = 3 - if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 1) && U.x >= (T.x - 1) )) - zone = 2 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(342) - U.ex_act(zone) - U.buildlinks() - //Foreach goto(170) - defer_powernet_rebuild = 0 - makepowernets() - - else - //if ((src.gas.temperature > (300+T0C) && src.gas.plasma == 1600000.0)) - if (strength > (300+T0C)) - var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z) - var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z) - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - var/zone = 4 - if ((U.y <= (T.y + 2) && U.y >= (T.y - 2) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) ) - zone = 3 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(598) - U.ex_act(zone) - U.buildlinks() - //Foreach goto(498) - defer_powernet_rebuild = 0 - makepowernets() - - //src.master = null - //SN src = null - del(src) - return - - var/turf/T = src.loc - while(!( istype(T, /turf) )) - T = T.loc - - for(var/mob/M in range(T)) - flick("flash", M.flash) - //Foreach goto(732) - //var/m_range = 2 - - var/m_range = round(strength / 387) - for(var/obj/machinery/atmoalter/canister/C in range(2, T)) - if (!( C.destroyed )) - if (C.gas.plasma >= 35000) - C.destroyed = 1 - m_range++ - - //Foreach goto(776) - var/min = m_range - var/med = m_range * 2 - var/max = m_range * 3 - var/u_max = m_range * 4 - - var/turf/sw = locate(max(T.x - u_max, 1), max(T.y - u_max, 1), T.z) - var/turf/ne = locate(min(T.x + u_max, world.maxx), min(T.y + u_max, world.maxy), T.z) - - defer_powernet_rebuild = 1 - - for(var/turf/U in block(sw, ne)) - - var/zone = 4 - if ((U.y <= (T.y + max) && U.y >= (T.y - max) && U.x <= (T.x + max) && U.x >= (T.x - max) )) - zone = 3 - if ((U.y <= (T.y + med) && U.y >= (T.y - med) && U.x <= (T.x + med) && U.x >= (T.x - med) )) - zone = 2 - if ((U.y <= (T.y + min) && U.y >= (T.y - min) && U.x <= (T.x + min) && U.x >= (T.x - min) )) - zone = 1 - for(var/atom/A in U) - A.ex_act(zone) - //Foreach goto(1217) - U.ex_act(zone) - U.buildlinks() - //U.mark(zone) - - //Foreach goto(961) - //src.master = null - defer_powernet_rebuild = 0 - makepowernets() - - //SN src = null - del(src) - return -*/ -/* -/obj/machinery/pipes/process() -*/ - -/obj/machinery/pipes/New() - - ..() - - if(istype(src, /obj/machinery/pipes/heat_exch)) - h_dir = text2num(icon_state) - else - p_dir = text2num(icon_state) - - -/obj/machinery/pipes/ispipe() // return true since this is a pipe - return 1 - -/obj/machinery/pipes/buildnodes(var/linenum) - - var/list/dirs = get_dirs() - - node1 = get_machine(level, src.loc, dirs[1]) - node2 = get_machine(level, src.loc, dirs[2]) - - if(plnum) - return - - update() - - plnum = linenum - - termination = 0 - - if(node1 && node1.ispipe() ) - - node1.buildnodes(linenum) - else - termination++ - - if(node2 && node2.ispipe() ) - node2.buildnodes(linenum) - else - termination++ - - -/obj/machinery/pipes/heat_exch/get_dirs() - var/b1 - var/b2 - - for(var/d in cardinal) - if(h_dir & d) - if(!b1) - b1 = d - else if(!b2) - b2 = d - - return list(b1, b2, h_dir) - -/obj/machinery/pipes/heat_exch/buildnodes(var/linenum) - - src.level = 2 // h/e pipe cannot be put underfloor - - var/list/dirs = get_dirs() - - node1 = get_he_machine(level, src.loc, dirs[1]) - node2 = get_he_machine(level, src.loc, dirs[2]) - - if(plnum) - return - - update() - - plnum = linenum - - termination = 0 - - if(node1 && node1.ispipe() ) - - node1.buildnodes(linenum) - else - termination++ - - if(node2 && node2.ispipe() ) - node2.buildnodes(linenum) - else - termination++ - - -/obj/machinery/pipes/proc/heat_exchange(var/datum/gas_mixture/gas, var/tot_node, var/numnodes, var/temp, var/dbg=0) - -/* var/turf/T = src.loc // turf location of pipe - if(T.density) return - if(istype(src, /obj/machinery/pipes/flexipipe)) return - - if( level != 1) // no heat exchange for under-floor pipes - if(istype(T,/turf/space)) // heat exchange less efficient in space (no conduction) - gas.temperature += ( T.temp - temp) / (3.0 * insulation * numnodes) - else - - // if(dbg) world.log << "PHE: ([x],[y]) [T.temp]-> \..." - var/delta_T = (T.temp - temp) / (insulation) // normal turf - - gas.temperature += delta_T / numnodes // heat the pipe due to turf temperature - - /* - if(abs(delta_T*tot_node/T.total_moles()) > 1) - world.log << "Turf [T] at [T.x],[T.y]: gt=[temp] tt=[T.temp]" - world.log << "dT = [delta_T] tn=[tot_node] ttg=[T.total_moles()] tt-=[delta_T*tot_node/T.total_moles()]" - - */ - var/tot_turf = max(1, T.total_moles()) - T.temp -= delta_T*min(10,tot_node/tot_turf) // also heat the turf due to pipe temp - // clamp max temp change to prevent thermal runaway - // if low amount of gas in turf - // if(dbg) world.log << "[T.temp] [tot_turf] #[delta_T]" - T.res_vars() // ensure turf tmp vars are updated - - else // if level 1 but in space, perform cooling anyway - exposed pipes - if(istype(T,/turf/space)) - gas.temperature += ( T.temp - temp) / (3.0 * insulation * numnodes) -*/ //TODO FIX -// finds the machine with compatible p_dir in 1 step in dir from S -/proc/get_machine(var/level, var/turf/S, mdir) - - var/flip = turn(mdir, 180) - - var/turf/T = get_step(S, mdir) - - for(var/obj/machinery/M in T.contents) - if(M.level == level) - if(M.p_dir & flip) - return M - - return null - -// finds the machine with compatible h_dir in 1 step in dir from S -/proc/get_he_machine(var/level, var/turf/S, mdir) - - var/flip = turn(mdir, 180) - - var/turf/T = get_step(S, mdir) - - for(var/obj/machinery/M in T.contents) - if(M.level == level) - if(M.h_dir & flip) - return M - - return null - -// ***** circulator - -/obj/machinery/circulator/New() - ..() - gas1 = new /datum/gas_mixture() - gas2 = new /datum/gas_mixture() - - ngas1 = new /datum/gas_mixture() - ngas2 = new /datum/gas_mixture() - - gasflowlist += src - - //gas.co2 = capacity - - updateicon() - -/obj/machinery/circulator/buildnodes() - - var/turf/TS = get_step(src, SOUTH) - var/turf/TN = get_step(src, NORTH) - - for(var/obj/machinery/M in TS) - - if(M && (M.p_dir & 1)) - node1 = M - break - - for(var/obj/machinery/M in TN) - - if(M && (M.p_dir & 2)) - node2 = M - break - - - if(node1) vnode1 = node1.getline() - - if(node2) vnode2 = node2.getline() - - -/* -/obj/machinery/circulator/verb/toggle_power() - set src in view(1) - - if(status == 1) - status = 2 - spawn(30) // 3 second delay for slow-off - if(status == 2) - status = 0 - updateicon() - else if(status == 0) - status =1 - - updateicon() - - - -/obj/machinery/circulator/verb/set_rate(r as num) - set src in view(1) - rate = r/100.0*capacity -*/ - -/obj/machinery/circulator/proc/control(var/on, var/prate) - - rate = prate/100*capacity - - if(status == 1) - if(!on) - status = 2 - spawn(30) - if(status == 2) - status = 0 - updateicon() - else if(status == 0) - if(on) - status = 1 - else // status ==2 - if(on) - status = 1 - - updateicon() - - -/obj/machinery/circulator/proc/updateicon() - - if(stat & NOPOWER) - icon_state = "circ[side]-p" - return - - var/is - switch(status) - if(0) - is = "off" - if(1) - is = "run" - if(2) - is = "slow" - - icon_state = "circ[side]-[is]" - - - -/obj/machinery/circulator/power_change() - ..() - updateicon() - -/* -/obj/machinery/circulator/receive_gas(var/obj/substance/gas/t_gas as obj, from as obj, amount) - - - if(from != src.node1) - return - - amount = min(receive_amount(src), amount) - - - //src.gas.transfer_from(t_gas, amount) - - return -*/ -/obj/machinery/circulator/gas_flow() - - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/circulator/process() - /* - // if operating, pump from resv1 to resv2 - - if(! (stat & NOPOWER) ) // only do circulator step if powered; still do rest of gas flow at all times - if(status==1 || status==2) - gas2.transfer_from(gas1, status==1? rate : rate/2) - use_power(rate/capacity * 100) - ngas1.copy_from(gas1) - ngas2.copy_from(gas2) - - - // now do standard process - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - else - leak_to_turf(2)*/ //TODO FIX - -/obj/machinery/circulator/proc/leak_to_turf(var/port) - /* - var/turf/T - - switch(port) - if(1) - T = get_step(src, SOUTH) - if(2) - T = get_step(src, NORTH) - - if(T.density) - T = src.loc - if(T.density) - return - - switch(port) - if(1) - flow_to_turf(gas1, ngas1, T) - if(2) - flow_to_turf(gas2, ngas2, T) - - - // do leak - */ //TODO: FIX - -/* -/obj/machinery/circulator/get_gas_moles(from) - if(from == vnode1) - return gas1.total_moles()/capmult - else - return gas2.total_moles()/capmult -*/ //TODO: FIX -/obj/machinery/circulator/get_gas(from) - if(from == vnode1) - return gas1 - else - return gas2 - -/* -/obj/machinery/connector/New() - ..() - - gas = new /datum/gas_mixture() - ngas = new /datum/gas_mixture() - //agas = new/obj/substance/gas() - - gasflowlist += src - spawn(5) - var/obj/machinery/atmoalter/A = locate(/obj/machinery/atmoalter, src.loc) - - if(A && A.c_status != 0) - connected = A - A.anchored = 1 - - - - -/obj/machinery/connector/buildnodes() - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - - return - - - -/obj/machinery/connector/examine(mob/user) - if(..(user, 1)) - if(connected) - usr << "It is connected to \an [connected.name]." - else - usr << "It is unconnected." - - - -/obj/machinery/connector/get_gas_val(from) - return gas.total_moles()/capmult - -/obj/machinery/connector/get_gas(from) - return gas - - -/obj/machinery/connector/gas_flow() - -// var/dbg = (suffix == "d") && Debug - //if(dbg) world.log << "CF0: ngas=[ngas.total_moles()]" - - //ngas.transfer_from(agas, -1) - - //if(dbg) world.log << "CF1: ngas=[gas.total_moles()]" - gas.copy_from(ngas) - //if(dbg) world.log << "CF2: gas=[gas.total_moles()]" - flag = 0 - -/obj/machinery/connector/process() - //if(suffix=="dbgp") - // world.log << "CP" - // Plasma() - - var/delta_gt -// var/dbg = (suffix == "d") && Debug - - //if(dbg) world.log << "C[tag]P: [gas.total_moles()] ~ [ngas.total_moles()]" - //if(dbg && connected) world.log << "C[tag]PC: [connected.gas.total_moles()]" - - if(vnode) - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - //if(dbg) world.log << "C[tag]P0: [delta_gt]" - - //var/obj/substance/gas/vgas = vnode.get_gas(src) - - //if(dbg) world.log << "C[tag]P1: [gas.total_moles()], [ngas.total_moles()] -> [vgas.total_moles()]" - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - //if(dbg) world.log << "C[tag]P2: [gas.total_moles()], [ngas.total_moles()] -> [vgas.total_moles()]" - - else - leak_to_turf() - - if(connected) - var/amount - if(connected.c_status == 1) // canister set to release - - //if(dbg) world.log << "C[tag]PC1: [gas.total_moles()], [ngas.total_moles()] <- [connected.gas.total_moles()]" - amount = min(connected.c_per, capacity - gas.total_moles() ) // limit to space in connector - amount = max(0, min(amount, connected.gas.total_moles() ) ) // limit to amount in canister, or 0 - //if(dbg) world.log << "C[tag]PC2: a=[amount]" - //var/ng = ngas.total_moles() - ngas.transfer_from( connected.gas, amount) - //if(dbg) world.log <<"[ngas.total_moles()-ng] from siph to connector" - //if(dbg) world.log << "C[tag]PC3: [gas.total_moles()], [ngas.total_moles()] <- [connected.gas.total_moles()]" - else if(connected.c_status == 2) // canister set to accept - - amount = min(connected.c_per, connected.gas.maximum - connected.gas.total_moles()) //limit to space in canister - amount = max(0, min(amount, gas.total_moles() ) ) // limit to amount in connector, or 0 - - connected.gas.transfer_from( ngas, amount) - - //flag = 1 - - //if(suffix=="dbgp") - // world.log << "CP" - // Plasma() -*/ //TODO: FIX - - -/obj/machinery/connector/proc/leak_to_turf() - /* - //var/dbg = (tag == "dbg") && Debug - - var/turf/T = get_step(src, dir) - if(T && !T.density) - - //if(dbg) world.log << "CLT1: [gas.tostring()] ~ [ngas.tostring()]\nTg = [T.tostring()]" - - - flow_to_turf(gas, ngas, T) - - //if(dbg) world.log << "CLT2: [gas.tostring()] ~ [ngas.tostring()]\nTg = [T.tostring()]" - */ - - -/obj/machinery/junction/New() - ..() - gas = new/datum/gas_mixture(src) - ngas = new/datum/gas_mixture() - gasflowlist += src - - h_dir = dir // the h/e pipe is in obj dir - p_dir = turn(dir, 180) // the reg pipe is in opposite dir - - -/obj/machinery/junction/buildnodes() - - var/turf/T = src.loc - - node1 = get_he_machine(level, T, h_dir ) // the h/e pipe - - node2 = get_machine(level, T , p_dir ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/junction/gas_flow() - - //var/dbg - //if(tag == "dbg1") - // dbg = 1 - //else if(tag == "dbg2") - // dbg = 2 - - //if(dbg) world.log << "J[dbg]F1: [gas.tostring()] ~ [ngas.tostring()]" - - - gas.copy_from(ngas) - - //if(dbg) world.log << "J[dbg]F2: [gas.tostring()] ~ [ngas.tostring()]" - -/obj/machinery/junction/process() -/* - //var/dbg - //if(tag == "dbg1") - // dbg = 1 - //else if(tag == "dbg2") - // dbg = 2 - - //if(dbg) world.log << "J[dbg]P: [gas.tostring()] ~ [ngas.tostring()]" - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt) //, dbg) - - // if(dbg) world.log << "J[dbg]T1: [delta_gt] >> [gas.tostring()] ~ [ngas.tostring()]" - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt) //, dbg) - - // if(dbg) world.log << "J[dbg]T2: [delta_gt] >> [gas.tostring()] ~ [ngas.tostring()]" - else - leak_to_turf(2) -*/ //TODO: FIX - -/obj/machinery/junction/get_gas_val(from) - return gas.total_moles()/capmult - -/obj/machinery/junction/get_gas(from) - return gas - -/obj/machinery/junction/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - flow_to_turf(gas, ngas, T) - - -/obj/machinery/vent/New() - - ..() - p_dir = dir - gas = new /datum/gas_mixture(src) - ngas = new /datum/gas_mixture() - gasflowlist += src - - -/obj/machinery/vent/buildnodes() - - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - return - - -/obj/machinery/vent/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/vent/get_gas(from) - return gas - - -/obj/machinery/vent/gas_flow() - -// var/dbg = (suffix=="d") && Debug - //if(dbg) world.log << "V[tag]F1: [gas.total_moles()] ~ [ngas.total_moles()]" - gas.copy_from(ngas) - //if(dbg) world.log << "V[tag]F2: [gas.total_moles()] ~ [ngas.total_moles()]" - -/obj/machinery/vent/process() - /* - -// var/dbg = (suffix=="d") && Debug - //if(dbg) world.log << "V[tag]T1: [gas.total_moles()] ~ [ngas.total_moles()]" - - //if(suffix=="dbgp") - // world.log << "VP" - // Plasma() - - var/delta_gt - - var/turf/T = src.loc - - delta_gt = FLOWFRAC * (gas.total_moles() / capmult) - //var/ng = ngas.total_moles() - ngas.turf_add(T, delta_gt) - - //if(dbg) world.log << "[num2text(ng-ngas.total_moles(),10)] from vent to turf" - //if(dbg) world.log << "V[tag]T2: [gas.total_moles()] ~ [ngas.total_moles()]" - - if(vnode) - - //if(dbg) world.log << "V[tag]N1: [gas.total_moles()] ~ [ngas.total_moles()]" - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - - //if(dbg) world.log << "V[tag]N2: [gas.total_moles()] ~ [ngas.total_moles()]" - - else - leak_to_turf() - */ //TODO: FIX - - -/obj/machinery/vent/proc/leak_to_turf() -// note this is a leak from the node, not the vent itself -// thus acts as a link between the vent turf and the turf in step(dir) - - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - - -// inlet - equilibrates between pipe contents and turf -// very similar to vent, except that a vent always dumps pipe gas into turf -/obj/machinery/inlet/New() - - ..() - - p_dir = dir - gas = new /datum/gas_mixture(src) - ngas = new /datum/gas_mixture() - gasflowlist += src - - -/obj/machinery/inlet/buildnodes() - - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - - return - - -/obj/machinery/inlet/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/inlet/get_gas(from) - return gas - - -/obj/machinery/inlet/gas_flow() - - gas.copy_from(ngas) - -/obj/machinery/inlet/process() - /* - //if(suffix=="dbgp") - // world.log << "VP" - // Plasma() - - var/delta_gt - - var/turf/T = src.loc - - // this is the difference between vent and inlet - - if(T && !T.density) - flow_to_turf(gas, ngas, T, dbg) // act as gas leak - - if(dbg) world.log << "I[tag]T2: [gas.total_moles()] ~ [ngas.total_moles()]" - - if(vnode) - - //if(dbg) world.log << "V[tag]N1: [gas.total_moles()] ~ [ngas.total_moles()]" - - delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.total_moles() / capmult) - - calc_delta( src, gas, ngas, vnode, delta_gt)//, dbg) - - //if(dbg) world.log << "V[tag]N2: [gas.total_moles()] ~ [ngas.total_moles()]" - - else - leak_to_turf() - */ //TODO: FIX - - - -/obj/machinery/inlet/proc/leak_to_turf() -// note this is a leak from the node, not the inlet itself -// thus acts as a link between the inlet turf and the turf in step(dir) - - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - - - -// standard proc for all machines - passed gas/ngas as arguments -// equilibrate a pipe object and a turf's gas content - -/obj/machinery/proc/flow_to_turf(var/datum/gas_mixture/sgas, var/datum/gas_mixture/sngas, var/turf/T, var/dbg = 0) -/* - if(dbg) world.log << "FTT: G=[sgas.tostring()] ~ N=[sngas.tostring()]" - if(dbg) world.log << "T=[T.tostring()]" - - - - var/t_tot = T.total_moles() * 0.2 // partial pressure of turf gas at pipe, for the moment - - var/delta_gt = FLOWFRAC * ( t_tot - sgas.total_moles() / capmult ) - - if(dbg) world.log << "FTT: dgt=[delta_gt]" - - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // flow from pipe to turf - - //world.log << "FTT<0" - ndelta.set_frac(sgas, -delta_gt) // ndelta contains gas to transfer to turf - //world.log << "ND=[ndelta.tostring()]" - sngas.sub_delta(ndelta) // update new gas to remove the amount transfered - //world.log << "SN=[sngas.tostring()]" - ndelta.turf_add(T, -1) // add all of ndelta to turf - //world.log << "T=[T.tostring()]" - - //world.log << "LTT: [num2text(-delta_gt,10)] from [sgas.loc] to turf" - - - else // flow from turf to pipe - if(dbg) world.log << "FTT>0" - - sngas.turf_take(T, delta_gt) // grab gas from turf and direcly add it to the new gas - if(dbg) world.log << "SN=[sngas.tostring()]" - if(dbg) world.log << "T=[T.tostring()]" - - if(dbg) world.log << "LTT: [num2text(delta_gt,10)] from turf to [sgas.loc]" - - T.res_vars() // update turf gas vars for both cases -*/ //TODO: FIX - -// on-off valve - -/obj/machinery/valve/mvalve/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - switch(dir) - if(1, 2) - p_dir = 3 - if(4,8) - p_dir = 12 - - icon_state = "valve[open]" - -/obj/machinery/valve/mvalve/examine(mob/user) - if(..(user, 1)) - user << "[desc] It is [ open? "open" : "closed"]." - - - -/obj/machinery/valve/mvalve/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) // the h/e pipe - - node2 = get_machine(level, T , turn(dir, 180) ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/valve/mvalve/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - - -/obj/machinery/valve/mvalve/process() -/* var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - if(open) // valve operating, so transfer btwen resv1 & 2 - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - - var/datum/gas_mixture//ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - - ndelta.set_frac(gas2, -delta_gt) - - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta) - - else // flowing from R1 to R2 - ndelta.set_frac(gas1, delta_gt) - ngas2.add_delta(ndelta) - ngas1.sub_delta(ndelta)*/ //TODO: FIX - - - - -/obj/machinery/valve/mvalve/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/valve/mvalve/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/valve/mvalve/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/valve/mvalve/attack_paw(mob/user) - attack_hand(user) - -/obj/machinery/valve/mvalve/attack_ai(mob/user) - user << "\red You are unable to use this as it is physically operated." - return - -/obj/machinery/valve/mvalve/attack_hand(mob/user) - ..() - add_fingerprint(user) - if(stat & BROKEN) - return - - if(!open) // now opening - flick("valve01", src) - icon_state = "valve1" - sleep(10) - else // now closing - flick("valve10", src) - icon_state = "valve0" - sleep(10) - open = !open - -// Digital Valve - -/obj/machinery/valve/dvalve/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - switch(dir) - if(1, 2) - p_dir = 3 - if(4,8) - p_dir = 12 - - icon_state = "dvalve[open]" - -/obj/machinery/valve/dvalve/examine(mob/user) - if(..(user, 1)) - if(NOPOWER) - user << "It is unpowered! It is [ open? "open" : "closed"]." - return - user << "It is [ open? "open" : "closed"]." - -/obj/machinery/valve/dvalve/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) // the h/e pipe - - node2 = get_machine(level, T , turn(dir, 180) ) // the regular pipe - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - - -/obj/machinery/valve/dvalve/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/valve/dvalve/power_change() - ..() - if(stat & NOPOWER) - icon_state = "dvalve[open]nopower" - return - icon_state = "dvalve[open]" - - -/obj/machinery/valve/dvalve/process() - /* - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - if(open) // valve operating, so transfer btwen resv1 & 2 - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - - ndelta.set_frac(gas2, -delta_gt) - - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta) - - else // flowing from R1 to R2 - ndelta.set_frac(gas1, delta_gt) - ngas2.add_delta(ndelta) - ngas1.sub_delta(ndelta) - */ //TODO: FIX - - - -/obj/machinery/valve/dvalve/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/valve/dvalve/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/valve/dvalve/proc/leak_to_turf(var/port) - - var/turf/T - - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/valve/dvalve/attack_paw(mob/user) - return src.attack_hand(user) - -/obj/machinery/valve/dvalve/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/valve/dvalve/attack_hand(mob/user) - ..() - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) - return - - if(!open) // now opening - flick("dvalve01", src) - icon_state = "dvalve1" - sleep(10) - else // now closing - flick("dvalve10", src) - icon_state = "dvalve0" - sleep(10) - open = !open - -// one way pipe - -/obj/machinery/oneway/New() - ..() - gas1 = new/datum/gas_mixture/(src) - ngas1 = new/datum/gas_mixture/() - gas2 = new/datum/gas_mixture/(src) - ngas2 = new/datum/gas_mixture/() - - gasflowlist += src - p_dir = dir|turn(dir, 180) - -/obj/machinery/oneway/buildnodes() - var/turf/T = src.loc - - node1 = get_machine(level, T, dir ) - node2 = get_machine(level, T , turn(dir, 180) ) - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - - return - -/obj/machinery/oneway/gas_flow() - gas1.copy_from(ngas1) - gas2.copy_from(ngas2) - -/obj/machinery/oneway/process() -/* - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - - - delta_gt = FLOWFRAC * (gas1.total_moles() / capmult - gas2.total_moles() / capmult) - var/datum/gas_mixture/ndelta = new() - - if(delta_gt < 0) // then flowing from R2 to R1 - ndelta.set_frac(gas2, -delta_gt) - ngas2.sub_delta(ndelta) - ngas1.add_delta(ndelta)*/ //TODO: FIX - -/obj/machinery/oneway/get_gas_val(from) - if(from == vnode2) - return gas2.total_moles()/capmult - else - return gas1.total_moles()/capmult - -/obj/machinery/oneway/get_gas(from) - if(from == vnode2) - return gas2 - return gas1 - -/obj/machinery/oneway/proc/leak_to_turf(var/port) - var/turf/T - - switch(port) - if(1) - T = get_step(src, dir) - if(2) - T = get_step(src, turn(dir, 180) ) - - if(T.density) - T = src.loc - if(T.density) - return - - if(port==1) - flow_to_turf(gas1, ngas1, T) - else - flow_to_turf(gas2, ngas2, T) - -/obj/machinery/oneway/pipepump/process() - /* - if(! (stat & NOPOWER) ) // pump if power - gas1.transfer_from(gas2, rate) - use_power(25, ENVIRON) - ngas1.copy_from(gas1) - ngas2.copy_from(gas2) - - var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas1.total_moles() / capmult) - calc_delta( src, gas1, ngas1, vnode1, delta_gt) - - else - leak_to_turf(1) - - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas2.total_moles() / capmult) - calc_delta( src, gas2, ngas2, vnode2, delta_gt) - - else - leak_to_turf(2) - */ //TODO: FIX - -/obj/machinery/oneway/pipepump/proc/updateicon() - icon_state = "pipepump-[(stat & NOPOWER) ? "stop" : "run"]" - -/obj/machinery/oneway/pipepump/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - - stat |= NOPOWER - spawn(rand(1,15)) // So they don't all turn off at the same time - updateicon() - -// Filter inlet -// works with filter_control - -/obj/machinery/inlet/filter/New() - ..() - src.gas = new /datum/gas_mixture() - src.ngas = new /datum/gas_mixture() - -/obj/machinery/inlet/filter/buildnodes() - var/turf/T = get_step(src.loc, src.dir) - var/fdir = turn(src.p_dir, 180) - - for(var/obj/machinery/M in T) - if(M.p_dir & fdir) - src.node = M - break - - if(node) vnode = node.getline() - return - -/obj/machinery/inlet/filter/get_gas_val(from) - return gas.total_moles()/2 - -/obj/machinery/inlet/filter/get_gas(from) - return gas - -/obj/machinery/inlet/filter/gas_flow() - gas.copy_from(ngas) - -/obj/machinery/inlet/filter/process() - src.updateicon() - if(!(stat & NOPOWER)) - /* var/turf/T = src.loc - if(!T || T.density) return - - if(!vnode) return leak_to_turf() - var/obj/substance/gas/exterior = new() - exterior.oxygen = T.oxygen - exterior.n2 = T.n2 - exterior.plasma = T.poison - exterior.co2 = T.co2 - exterior.sl_gas = T.sl_gas - exterior.temperature = T.temp - var/obj/substance/gas/interior = gas - var/obj/substance/gas/flowing = new() - - var/flow_rate = (exterior.total_moles()-interior.total_moles())*FLOWFRAC - if(flow_rate <= 0) - return - flowing.set_frac(exterior,flow_rate) - if(!(src.f_mask & GAS_O2)) flowing.oxygen = 0 - if(!(src.f_mask & GAS_N2)) flowing.n2 = 0 - if(!(src.f_mask & GAS_PL)) flowing.plasma = 0 - if(!(src.f_mask & GAS_CO2)) flowing.co2 = 0 - if(!(src.f_mask & GAS_N2O)) flowing.sl_gas = 0 - use_power(5,ENVIRON) - exterior.sub_delta(flowing) - interior.add_delta(flowing)*/ //TODO: FIX - else - ..() - return - -/obj/machinery/inlet/filter/leak_to_turf() -// note this is a leak from the node, not the inlet itself -// thus acts as a link between the inlet turf and the turf in step(dir) - var/turf/T = get_step(src, dir) - if(T && !T.density) - flow_to_turf(gas, ngas, T) - -/obj/machinery/inlet/filter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - updateicon() - return - -/obj/machinery/inlet/filter/proc/updateicon() - /* - if(stat & NOPOWER) - icon_state = "inlet_filter-0" - return - if(src.gas.total_moles() > src.gas.maximum/2) - icon_state = "inlet_filter-4" - else if(src.gas.total_moles() > src.gas.maximum/3) - icon_state = "inlet_filter-3" - else if(src.gas.total_moles() > src.gas.maximum/4) - icon_state = "inlet_filter-2" - else if(src.gas.total_moles() >= 1 || src.f_mask >= 1) - icon_state = "inlet_filter-1" - else - icon_state = "inlet_filter-0" - return - */ //TODO FIX - -// Filter vent -// doesn't do anything yet - -/obj/machinery/vent/filter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - updateicon() - return - -/obj/machinery/vent/filter/proc/updateicon() - /* - if(stat & NOPOWER) - icon_state = "vent_filter-0" - return - if(src.gas.total_moles() > src.gas.maximum/2) - icon_state = "vent_filter-4" - else if(src.gas.total_moles() > src.gas.maximum/3) - icon_state = "vent_filter-3" - else if(src.gas.total_moles() > src.gas.maximum/4) - icon_state = "vent_filter-2" - else if(src.gas.total_moles() >= 1 || src.f_mask >= 1) - icon_state = "vent_filter-1" - else - icon_state = "vent_filter-0" - return - */ //TODO FIX \ No newline at end of file diff --git a/code/unused/pipe_filter.dm b/code/unused/pipe_filter.dm deleted file mode 100644 index 10f0673728a..00000000000 --- a/code/unused/pipe_filter.dm +++ /dev/null @@ -1,243 +0,0 @@ -// *** pipefilter - -/obj/machinery/pipefilter/New() - ..() - p_dir = (NORTH|SOUTH|EAST|WEST) ^ turn(dir, 180) - - src.gas = new /datum/gas_mixture/() - src.ngas = new /datum/gas_mixture/() - - src.f_gas = new /datum/gas_mixture/() - src.f_ngas = new /datum/gas_mixture/() - - gasflowlist += src - -/obj/machinery/pipefilter/buildnodes() - var/turf/T = src.loc - - n1dir = turn(dir, 90) - n2dir = turn(dir,-90) - - node1 = get_machine( level, T , n1dir ) // the main flow dir - node2 = get_machine( level, T , n2dir ) - node3 = get_machine( level, T, dir ) // the ejector port - - if(node1) vnode1 = node1.getline() - if(node2) vnode2 = node2.getline() - if(node3) vnode3 = node3.getline() - -/obj/machinery/pipefilter/gas_flow() - gas.copy_from(ngas) - f_gas.copy_from(f_ngas) - -/obj/machinery/pipefilter/process() -/* var/delta_gt - - if(vnode1) - delta_gt = FLOWFRAC * ( vnode1.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode1, delta_gt) - else - leak_to_turf(1) - if(vnode2) - delta_gt = FLOWFRAC * ( vnode2.get_gas_val(src) - gas.total_moles() / capmult) - calc_delta( src, gas, ngas, vnode2, delta_gt) - else - leak_to_turf(2) - if(vnode3) - delta_gt = FLOWFRAC * ( vnode3.get_gas_val(src) - f_gas.total_moles() / capmult) - calc_delta( src, f_gas, f_ngas, vnode3, delta_gt) - else - leak_to_turf(3) - - // transfer gas from ngas->f_ngas according to extraction rate, but only if we have power - if(! (stat & NOPOWER) ) - use_power(min(src.f_per, 100),ENVIRON) - var/datum/gas_mixture/ndelta = src.get_extract() - ngas.sub_delta(ndelta) - f_ngas.add_delta(ndelta) - AutoUpdateAI(src) - src.updateUsrDialog()*/ //TODO: FIX - -/obj/machinery/pipefilter/get_gas_val(from) - return ((from == vnode3) ? f_gas.total_moles() : gas.total_moles())/capmult - -/obj/machinery/pipefilter/get_gas(from) - return (from == vnode3) ? f_gas : gas - -/obj/machinery/pipefilter/proc/leak_to_turf(var/port) - var/turf/T - - switch(port) - if(1) - T = get_step(src, n1dir) - if(2) - T = get_step(src, n2dir) - if(3) - T = get_step(src, dir) - if(T.density) - T = src.loc - if(T.density) - return - flow_to_turf(f_gas, f_ngas, T) - return - - if(T.density) - T = src.loc - if(T.density) - return - - flow_to_turf(gas, ngas, T) - -/obj/machinery/pipefilter/proc/get_extract() - /* - var/datum/gas_mixture/ndelta = new() - if (src.f_mask & GAS_O2) - ndelta.oxygen = min(src.f_per, src.ngas.oxygen) - if (src.f_mask & GAS_N2) - ndelta.n2 = min(src.f_per, src.ngas.n2) - if (src.f_mask & GAS_PL) - ndelta.plasma = min(src.f_per, src.ngas.plasma) - if (src.f_mask & GAS_CO2) - ndelta.co2 = min(src.f_per, src.ngas.co2) - if (src.f_mask & GAS_N2O) - ndelta.sl_gas = min(src.f_per, src.ngas.sl_gas) - return ndelta - */ //TODO: FIX - -/obj/machinery/pipefilter/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/detective_scanner)) - return ..() - if(istype(W, /obj/item/weapon/screwdriver)) - if(bypassed) - user.show_message(text("\red Remove the foreign wires first!"), 1) - return - src.add_fingerprint(user) - user.show_message(text("\red Now []securing the access system panel...", (src.locked) ? "un" : "re"), 1) - sleep(30) - locked =! locked - user.show_message(text("\red Done!"),1) - src.updateicon() - return - if(istype(W, /obj/item/stack/cable_coil) && !bypassed) - if(src.locked) - user.show_message(text("\red You must remove the panel first!"),1) - return - var/obj/item/stack/cable_coil/C = W - if(C.use(4)) - user.show_message(text("\red You unravel some cable.."),1) - else - user.show_message(text("\red Not enough cable! (Requires four pieces)"),1) - src.add_fingerprint(user) - user.show_message(text("\red Now bypassing the access system... (This may take a while)"), 1) - sleep(100) - bypassed = 1 - src.updateicon() - return - if(istype(W, /obj/item/weapon/wirecutters) && bypassed) - src.add_fingerprint(user) - user.show_message(text("\red Now removing the bypass wires... (This may take a while)"), 1) - sleep(50) - bypassed = 0 - src.updateicon() - return - if(istype(W, /obj/item/weapon/card/emag) && (!emagged)) - emagged++ - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has shorted out the [] with an electromagnetic card!", user, src), 1) - src.overlays += image('icons/obj/pipes2.dmi', "filter-spark") - sleep(6) - src.updateicon() - return src.attack_hand(user) - return src.attack_hand(user) - -// pipefilter interact/topic -/obj/machinery/pipefilter/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/pipefilter/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/pipefilter/attack_hand(mob/user as mob) -/* if(stat & NOPOWER) - user << browse(null, "window=pipefilter") - user.machine = null - return - - var/list/gases = list("O2", "N2", "Plasma", "CO2", "N2O") - user.machine = src - var/dat = "Filter Release Rate:
\nM - - - - - [src.f_per] + + + + + M
\n" - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Releasing" : "Passing"]
\n" - if(gas.total_moles()) - var/totalgas = gas.total_moles() - var/pressure = round(totalgas / gas.maximum * 100) - var/nitrogen = gas.n2 / totalgas * 100 - var/oxygen = gas.oxygen / totalgas * 100 - var/plasma = gas.plasma / totalgas * 100 - var/co2 = gas.co2 / totalgas * 100 - var/no2 = gas.sl_gas / totalgas * 100 - - dat += "
Gas Levels:
\nPressure: [pressure]%
\nNitrogen: [nitrogen]%
\nOxygen: [oxygen]%
\nPlasma: [plasma]%
\nCO2: [co2]%
\nN2O: [no2]%
\n" - else - dat += "
Gas Levels:
\nPressure: 0%
\nNitrogen: 0%
\nOxygen: 0%
\nPlasma: 0%
\nCO2: 0%
\nN2O: 0%
\n" - dat += "
\nClose
\n" - - user << browse(dat, "window=pipefilter;size=300x365")*/ //TODO: FIX - //onclose(user, "pipefilter") - -/obj/machinery/pipefilter/Topic(href, href_list) - ..() - if(usr.restrained() || usr.lying) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (href_list["close"]) - usr << browse(null, "window=pipefilter;") - usr.machine = null - return - if (src.allowed(usr) || src.emagged || src.bypassed) - if (href_list["fp"]) - src.f_per = min(max(round(src.f_per + text2num(href_list["fp"])), 0), src.maxrate) - else if (href_list["tg"]) - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - src.updateicon() - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=pipefilter") - usr.machine = null - return - -/obj/machinery/pipefilter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) //so all the filters don't come on at once - updateicon() - -/obj/machinery/pipefilter/proc/updateicon() - src.overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter-off" - else - icon_state = "filter" - if(emagged) //only show if powered because presumeably its the interface that has been fried - src.overlays += image('icons/obj/pipes2.dmi', "filter-emag") - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/pipes2.dmi', "filter-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-co2") - if(!locked) - src.overlays += image('icons/obj/pipes2.dmi', "filter-open") - if(bypassed) //should only be bypassed if unlocked - src.overlays += image('icons/obj/pipes2.dmi', "filter-bypass") \ No newline at end of file diff --git a/code/unused/powerarmor/powerarmor.dm b/code/unused/powerarmor/powerarmor.dm deleted file mode 100644 index 36b066ffe94..00000000000 --- a/code/unused/powerarmor/powerarmor.dm +++ /dev/null @@ -1,278 +0,0 @@ -/obj/item/clothing/suit/powered - name = "Powered armor" - desc = "Not for rookies." - icon_state = "swat" - item_state = "swat" - w_class = 4//bulky item - - protective_temperature = 1000 - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) - slowdown = 9 - var/fuel = 0 - - var/list/togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - var/active = 0 - - var/helmrequired = 1 - var/obj/item/clothing/head/powered/helm - - var/glovesrequired = 0 - var/obj/item/clothing/gloves/powered/gloves - - var/shoesrequired = 0 - var/obj/item/clothing/shoes/powered/shoes - //Adding gloves and shoes as possible armor components. --NEO - - var/obj/item/powerarmor/servos/servos - var/obj/item/powerarmor/reactive/reactive - var/obj/item/powerarmor/atmoseal/atmoseal - var/obj/item/powerarmor/power/power - - New() - verbs += /obj/item/clothing/suit/powered/proc/poweron - - proc/poweron() - set category = "Object" - set name = "Activate armor systems" - - var/mob/living/carbon/human/user = usr - - if(user.stat) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!istype(user)) - user << "\red This suit was engineered for human use only." - return - - if(user.wear_suit!=src) - user << "\red The suit functions best if you are inside of it." - return - - if(helmrequired && !istype(user.head, /obj/item/clothing/head/powered)) - user << "\red Helmet missing, unable to initiate power-on procedure." - return - - if(glovesrequired && !istype(user.gloves, /obj/item/clothing/gloves/powered)) - user << "\red Gloves missing, unable to initiate power-on procedure." - return - - if(shoesrequired && !istype(user.shoes, /obj/item/clothing/shoes/powered)) - user << "\red Shoes missing, unable to initiate power-on procedure." - return - - if(active) - user << "\red The suit is already on, you can't turn it on twice." - return - - if(!power || !power.checkpower()) - user << "\red Powersource missing or depleted." - return - - verbs -= /obj/item/clothing/suit/powered/proc/poweron - - user << "\blue Suit interlocks engaged." - if(helmrequired) - helm = user.head - helm.canremove = 0 - if(glovesrequired) - gloves = user.gloves - gloves.canremove = 0 - if(shoesrequired) - shoes = user.shoes - shoes.canremove = 0 - canremove = 0 - sleep(20) - - if(atmoseal) - atmoseal.toggle() - sleep(20) - - if(reactive) - reactive.toggle() - sleep(20) - - if(servos) - servos.toggle() - sleep(20) - - user << "\blue All systems online." - active = 1 - power.process() - - verbs += /obj/item/clothing/suit/powered/proc/poweroff - - - proc/poweroff() - set category = "Object" - set name = "Deactivate armor systems" - powerdown() //BYOND doesn't seem to like it if you try using a proc with vars in it as a verb, hence this. --NEO - - proc/powerdown(sudden = 0) - - var/delay = sudden?0:20 - - var/mob/living/carbon/human/user = usr - - if(user.stat && !sudden) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!active) - return - - verbs -= /obj/item/clothing/suit/powered/proc/poweroff - - if(sudden) - user << "\red Your armor loses power!" - - if(servos) - servos.toggle(sudden) - sleep(delay) - - if(reactive) - reactive.toggle(sudden) - sleep(delay) - - if(atmoseal) - if(istype(atmoseal, /obj/item/powerarmor/atmoseal/optional) && helm) - atmoseal:helmtoggle(sudden) - atmoseal.toggle(sudden) - - sleep(delay) - - if(!sudden) - usr << "\blue Suit interlocks disengaged." - if(helm) - helm.canremove = 1 - helm = null - if(gloves) - gloves.canremove = 1 - gloves = null - if(shoes) - shoes.canremove = 1 - gloves = null - canremove = 1 - //Not a tabbing error, the thing only unlocks if you intentionally power-down the armor. --NEO - sleep(delay) - - if(!sudden) - usr << "\blue All systems disengaged." - - active = 0 - verbs += /obj/item/clothing/suit/powered/proc/poweron - - - - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(power && istype(power,/obj/item/powerarmor/power/plasma)) - switch(W.type) - if(/obj/item/stack/sheet/mineral/plasma) - if(fuel < 50) - user << "\blue You feed some refined plasma into the armor's generator." - power:fuel += 25 - W:amount-- - if (W:amount <= 0) - del(W) - return - else - user << "\red The generator already has plenty of plasma." - return - - if(/obj/item/weapon/ore/plasma) //raw plasma has impurities, so it doesn't provide as much fuel. --NEO - if(fuel < 50) - user << "\blue You feed some plasma into the armor's generator." - power:fuel += 15 - del(W) - return - else - user << "\red The generator already has plenty of plasma." - return - - ..() - -/obj/item/clothing/head/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - flags = HEADCOVERSEYES | HEADCOVERSMOUTH - see_face = 0.0 - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - var/obj/item/clothing/suit/powered/parent - - proc/atmotoggle() - set category = "Object" - set name = "Toggle helmet seals" - - var/mob/living/carbon/human/user = usr - - if(!istype(user)) - user << "\red This helmet is not rated for nonhuman use." - return - - if(user.head != src) - user << "\red Can't engage the seals without wearing the helmet." - return - - if(!user.wear_suit || !istype(user.wear_suit,/obj/item/clothing/suit/powered)) - user << "\red This helmet can only couple with powered armor." - return - - var/obj/item/clothing/suit/powered/armor = user.wear_suit - - if(!armor.atmoseal || !istype(armor.atmoseal, /obj/item/powerarmor/atmoseal/optional)) - user << "\red This armor's atmospheric seals are missing or incompatible." - return - - armor.atmoseal:helmtoggle(0,1) - - - - -/obj/item/clothing/gloves/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - -/obj/item/clothing/shoes/powered - name = "Powered armor" - icon_state = "swat" - desc = "Not for rookies." - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - - -obj/item/clothing/suit/powered/spawnable/badmin - New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/powered/proc/poweron - - var/obj/item/clothing/head/powered/helm = new /obj/item/clothing/head/powered(src.loc) - helm.verbs += /obj/item/clothing/head/powered/proc/atmotoggle - -obj/item/clothing/suit/powered/spawnable/regular - New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive/centcomm(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/powered/proc/poweron - - var/obj/item/clothing/head/powered/helm = new /obj/item/clothing/head/powered(src.loc) - helm.verbs += /obj/item/clothing/head/powered/proc/atmotoggle diff --git a/code/unused/powerarmor/powerarmorcomponents.dm b/code/unused/powerarmor/powerarmorcomponents.dm deleted file mode 100644 index 8d09536f9c1..00000000000 --- a/code/unused/powerarmor/powerarmorcomponents.dm +++ /dev/null @@ -1,246 +0,0 @@ -/obj/item/powerarmor - name = "Generic power armor component" - desc = "This is the base object, you should never see one." - var/obj/item/clothing/suit/powered/parent //so the component knows which armor it belongs to. - var/slowdown = 0 //how much the component slows down the wearer - - proc/toggle() - return - //The child objects will use this proc - - - -/obj/item/powerarmor/power - name = "Adminbus power armor power source" - desc = "Runs on the rare Badminium molecule." - - process() - return - - proc/checkpower() - return 1 - - plasma - name = "Miniaturized plasma generator" - desc = "Runs on plasma." - slowdown = 1 - var/fuel = 0 - - process() - if (fuel > 0 && parent.active) - fuel-- - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - - checkpower() - return fuel - - powercell - name = "Powercell interface" - desc = "Boring, but reliable." - var/obj/item/weapon/cell/cell - slowdown = 0.5 - - process() - if (cell && cell.charge > 0 && parent.active) - cell.use(50) - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - - checkpower() - return max(cell.charge, 0) - - nuclear - name = "Miniaturized nuclear generator" - desc = "For all your radioactive needs." - slowdown = 1.5 - - process() - if(!crit_fail) - if (prob(src.reliability)) return 1 //No failure - if (prob(src.reliability)) - for (var/mob/M in range(0,src.parent)) //Only a minor failure, enjoy your radiation. - if (src.parent in M.contents) - M << "\red Your armor feels pleasantly warm for a moment." - else - M << "\red You feel a warm sensation." - M.radiation += rand(1,40) - else - for (var/mob/M in range(rand(1,4),src.parent)) //Big failure, TIME FOR RADIATION BITCHES - if (src.parent in M.contents) - M << "\red Your armor's reactor overloads!" - M << "\red You feel a wave of heat wash over you." - M.radiation += 100 - crit_fail = 1 //broken~ - parent.powerdown(1) - spawn(50) - process() - - checkpower() - return !crit_fail - -/obj/item/powerarmor/reactive - name = "Adminbus power armor reactive plating" - desc = "Made with the rare Badminium molecule." - var/list/togglearmor = list(melee = 250, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100) - //Good lord an active energy axe does 150 damage a swing? Anyway, barring var editing, this armor loadout should be impervious to anything. Enjoy, badmins~ --NEO - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Reactive armor systems disengaged." - if(0) - usr << "\blue Reactive armor systems engaged." - var/list/switchover = list() - for (var/armorvar in parent.armor) - switchover[armorvar] = togglearmor[armorvar] - togglearmor[armorvar] = parent.armor[armorvar] - parent.armor[armorvar] = switchover[armorvar] - //Probably not the most elegant way to have the vars switch over, but it works. Also propagates the values to the other objects. - if(parent.helm) - parent.helm.armor[armorvar] = parent.armor[armorvar] - if(parent.gloves) - parent.gloves.armor[armorvar] = parent.armor[armorvar] - if(parent.shoes) - parent.shoes.armor[armorvar] = parent.armor[armorvar] - - centcomm - name = "CentComm power armor reactive plating" - desc = "Pretty effective against everything, not perfect though." - togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - slowdown = 2 - - -/obj/item/powerarmor/servos - name = "Adminbus power armor movement servos" - desc = "Made with the rare Badminium molecule." - var/toggleslowdown = 9 - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Movement assist servos disengaged." - parent.slowdown += toggleslowdown - if(0) - usr << "\blue Movement assist servos engaged." - parent.slowdown -= toggleslowdown - -/obj/item/powerarmor/atmoseal - name = "Power armor atmospheric seals" - desc = "Keeps the bad stuff out." - slowdown = 1 - var/sealed = 0 - - toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "\blue Atmospheric seals disengaged." - parent.gas_transfer_coefficient = 1 - parent.permeability_coefficient = 1 - parent.heat_transfer_coefficient = 1 - parent.flags &= ~SUITSPACE - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.heat_transfer_coefficient = 1 - parent.helm.flags &= ~HEADSPACE - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 1 - parent.gloves.permeability_coefficient = 1 - parent.gloves.heat_transfer_coefficient = 1 - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 1 - parent.shoes.permeability_coefficient = 1 - parent.shoes.heat_transfer_coefficient = 1 - sealed = 0 - - if(0) - usr << "\blue Atmospheric seals engaged." - parent.gas_transfer_coefficient = 0.01 - parent.permeability_coefficient = 0.02 - parent.heat_transfer_coefficient = 0.02 - parent.flags |= SUITSPACE - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.heat_transfer_coefficient = 0.02 - parent.helm.flags |= HEADSPACE - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 0.01 - parent.gloves.permeability_coefficient = 0.02 - parent.gloves.heat_transfer_coefficient = 0.02 - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 0.01 - parent.shoes.permeability_coefficient = 0.02 - parent.shoes.heat_transfer_coefficient = 0.02 - sealed = 1 - - adminbus - name = "Adminbus power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - - optional - name = "Togglable power armor atmospheric seals" - desc = "Keeps the bad stuff out, but lets you remove your helmet without having to turn the whole suit off." - - proc/helmtoggle(sudden = 0, manual = 0) - var/mob/living/carbon/human/user = usr - var/obj/item/clothing/head/powered/helm - if(user.head && istype(user.head,/obj/item/clothing/head/powered)) - helm = user.head - - if(!sealed) - user << "\red Unable to initialize helmet seal, armor seals not active." - return - if(!helm.parent) - user << "\blue Helmet locked." - helm.canremove = 0 - parent.helm = helm - helm.parent = parent - sleep(20) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.heat_transfer_coefficient = 0.02 - parent.helm.flags |= HEADSPACE - user << "\blue Helmet atmospheric seals engaged." - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.armor[armorvar] - return - else - if(manual) - user << "\blue Helmet atmospheric seals disengaged." - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.heat_transfer_coefficient = 1 - parent.helm.flags &= ~HEADSPACE - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.reactive.togglearmor[armorvar] - if(!sudden) - if(manual) - sleep(20) - user << "\blue Helmet unlocked." - helm.canremove = 1 - parent.helm = null - helm.parent = null - - adminbus - name = "Adminbus togglable power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - - - diff --git a/code/unused/scrap.dm b/code/unused/scrap.dm deleted file mode 100644 index 271f8b131d0..00000000000 --- a/code/unused/scrap.dm +++ /dev/null @@ -1,289 +0,0 @@ -// The scrap item -// a single object type represents all combinations of size and composition of scrap -// - - -/obj/item/scrap - name = "scrap" - icon = 'scrap.dmi' - icon_state = "1metal0" - item_state = "scrap-metal" - desc = "A piece of scrap" - var/classtext = "" - throwforce = 14.0 - m_amt = 0 - g_amt = 0 - w_amt = 0 - var/size = 1 // 1=piece, 2= few pieces, 3=small pile, 4=large pile - var/blood = 0 // 0=none, 1=blood-stained, 2=bloody - - throwforce = 8.0 - throw_speed = 1 - throw_range = 4 - w_class = 1 - flags = CONDUCT - -#define MAX_SCRAP 15000 // maximum content amount of a scrap pile - - -/obj/item/scrap/New() - src.verbs -= /atom/movable/verb/pull - ..() - update() - -// return a copy -/obj/item/scrap/proc/copy() - var/obj/item/scrap/ret = new() - ret.set_components(m_amt, g_amt, w_amt) - return ret - - -// set the metal, glass and waste content -/obj/item/scrap/proc/set_components(var/m, var/g, var/w) - m_amt = m - g_amt = g - w_amt = w - update() - -// returns the total amount of scrap in this pile -/obj/item/scrap/proc/total() - return m_amt + g_amt + w_amt - - -// sets the size, appearance, and description of the scrap depending on component amounts -/obj/item/scrap/proc/update() - var/total = total() - - - // determine size of pile - if(total<=400) - size = 1 - else if(total<=1600) - size = 2 - else - size = 3 - - w_class = size - - var/sizetext = "" - - switch(size) - if(1) - sizetext = "A piece of" - if(2) - sizetext = "A few pieces of" - if(3) - sizetext = "A pile of" - - // determine bloodiness - var/bloodtext = "" - switch(blood) - if(0) - bloodtext = "" - if(1) - bloodtext = "blood-stained " - if(2) - bloodtext = "bloody " - - - // find mixture and composition - var/class = 0 // 0 = mixed, 1=mostly. 2=pure - var/major = "waste" // the major component type - - var/max = 0 - - if(m_amt > max) - max = m_amt - else if(g_amt > max) - max = g_amt - else if(w_amt > max) - max = w_amt - - if(max == total) - class = 2 // pure - else if(max/total > 0.6) - class = 1 // mostly - else - class = 0 // mixed - - if(class>0) - var/remain = total - max - if(m_amt > remain) - major = "metal" - else if(g_amt > remain) - major = "glass" - else - major = "waste" - - - if(class == 1) - desc = "[sizetext] mostly [major] [bloodtext]scrap." - classtext = "mostly [major] [bloodtext]" - else - desc = "[sizetext] [bloodtext][major] scrap." - classtext = "[bloodtext][major] " - icon_state = "[size][major][blood]" - else - desc = "[sizetext] [bloodtext]mixed scrap." - classtext = "[bloodtext]mixed" - icon_state = "[size]mixed[blood]" - - if(size==0) - pixel_x = rand(-5,5) - pixel_y = rand(-5,5) - else - pixel_x = 0 - pixel_y = 0 - - // clear or set conduction flag depending on whether scrap is mostly metal - if(major=="metal") - flags |= CONDUCT - else - flags &= ~CONDUCT - - item_state = "scrap-[major]" - -// add a scrap item to this one -// if the resulting pile is too big, transfer only what will fit -// otherwise add them and deleted the added pile - -/obj/item/scrap/proc/add_scrap(var/obj/item/scrap/other, var/limit = MAX_SCRAP) - var/total = total() - var/other_total = other.total() - - if( (total + other_total) <= limit ) - m_amt += other.m_amt - g_amt += other.g_amt - w_amt += other.w_amt - - blood = (total*blood + other_total*other.blood) / (total + other_total) - del(other) - - else - var/space = limit - total - - var/m = round(other.m_amt/other_total*space, 1) - var/g = round(other.g_amt/other_total*space, 1) - var/w = round(other.w_amt/other_total*space, 1) - - m_amt += m - g_amt += g - w_amt += w - - other.m_amt -= m - other.g_amt -= g - other.w_amt -= w - - var/other_trans = m + g + w - other.update() - blood = (total*blood + other_trans*other.blood) / (total + other_trans) - - - blood = round(blood,1) - src.update() - -// limit this pile to maximum size -// return any remainder as a new scrap item (or null if none) -// note return item is not necessarily smaller than max size - -/obj/item/scrap/proc/remainder(var/limit = MAX_SCRAP) - var/total = total() - if(total > limit) - var/m = round( m_amt/total * limit, 1) - var/g = round( g_amt/total * limit, 1) - var/w = round( w_amt/total * limit, 1) - - var/obj/item/scrap/S = new() - S.set_components(m_amt - m,g_amt - g,w_amt - w) - src.set_components(m,g,w) - - return S - return null - -// if other pile of scrap tries to enter the same turf, then add that pile to this one - -/obj/item/scrap/CanPass(var/obj/item/scrap/O) - - if(istype(O)) - - src.add_scrap(O) - if(O) - return 0 // O still exists if not all could be transfered, so block it - return 1 - -/obj/item/scrap/proc/to_text() - return "[m_amt],[g_amt],[w_amt] ([total()])" - - -// attack with hand removes a single piece from a pile -/obj/item/scrap/attack_hand(mob/user) - add_fingerprint(user) - if(src.is_single_piece()) - return ..(user) - var/obj/item/scrap/S = src.get_single_piece() - S.attack_hand(user) - return - - -/obj/item/scrap/attackby(obj/item/I, mob/user) - ..() - if(istype(I, /obj/item/scrap)) - var/obj/item/scrap/S = I - if( (S.total()+src.total() ) > MAX_SCRAP ) - user << "The pile is full." - return - if(ismob(src.loc)) // can't combine scrap in hand - return - - src.add_scrap(S) - -// when dropped, try to make a pile if scrap is already there -/obj/item/scrap/dropped() - - spawn(2) // delay to allow drop postprocessing (since src may be destroyed) - for(var/obj/item/scrap/S in oview(0,src)) // excludes src itself - S.add_scrap(src) - -// return true if this is a single piece of scrap -// must be total<=400 and of single composition -/obj/item/scrap/proc/is_single_piece() - if(total() > 400) - return 0 - - var/empty = (m_amt == 0) + (g_amt == 0) + (w_amt == 0) - - return (empty==2) // must be 2 components with zero amount - - -// get a single piece of scrap from a pile -/obj/item/scrap/proc/get_single_piece() - - var/obj/item/scrap/S = new() - - var/cmp = pick(m_amt;1 , g_amt;2, w_amt;3) - - var/amount = 400 - switch(cmp) - if(1) - if(m_amt < amount) - amount = m_amt - - S.set_components(amount, 0, 0) - src.set_components(m_amt - amount, g_amt, w_amt) - - if(2) - if(g_amt < amount) - amount = g_amt - S.set_components(0, amount, 0) - src.set_components(m_amt, g_amt - amount, w_amt) - - if(3) - if(w_amt < amount) - amount = w_amt - S.set_components(0, 0, amount) - src.set_components(m_amt, g_amt, w_amt - amount) - - - return S - - diff --git a/code/unused/shuttle_engines.dm b/code/unused/shuttle_engines.dm deleted file mode 100644 index 457154db0f2..00000000000 --- a/code/unused/shuttle_engines.dm +++ /dev/null @@ -1,37 +0,0 @@ - -/obj/structure/shuttle - name = "shuttle" - icon = 'icons/turf/shuttle.dmi' - -/obj/structure/shuttle/engine - name = "engine" - density = 1 - anchored = 1.0 - -/obj/structure/shuttle/engine/heater - name = "heater" - icon_state = "heater" - -/obj/structure/shuttle/engine/platform - name = "platform" - icon_state = "platform" - -/obj/structure/shuttle/engine/propulsion - name = "propulsion" - icon_state = "propulsion" - opacity = 1 - -/obj/structure/shuttle/engine/propulsion/burst - name = "burst" - -/obj/structure/shuttle/engine/propulsion/burst/left - name = "left" - icon_state = "burst_l" - -/obj/structure/shuttle/engine/propulsion/burst/right - name = "right" - icon_state = "burst_r" - -/obj/structure/shuttle/engine/router - name = "router" - icon_state = "router" diff --git a/code/unused/siphs.dm b/code/unused/siphs.dm deleted file mode 100644 index 6104b3bc2d6..00000000000 --- a/code/unused/siphs.dm +++ /dev/null @@ -1,515 +0,0 @@ -/obj/machinery/atmoalter/siphs/New() - ..() - src.gas = new /datum/gas_mixture() - - return - -/obj/machinery/atmoalter/siphs/proc/releaseall() - src.t_status = 1 - src.t_per = max_valve - return - -/obj/machinery/atmoalter/siphs/proc/reset(valve, auto) - if(c_status!=0) - return - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/proc/release(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, max_valve) - src.gas.turf_add(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/siphon(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, 900000.0) - src.gas.turf_take(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/setstate() - - if(stat & NOPOWER) - icon_state = "siphon:0" - return - - if (src.holding) - src.icon_state = "siphon:T" - else - if (src.t_status != 3) - src.icon_state = "siphon:1" - else - src.icon_state = "siphon:0" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/New() - /* - ..() - if(!empty) - src.gas.oxygen = 2.73E7 - src.gas.n2 = 1.027E8 - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/fullairsiphon/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/setstate() - - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/reset(valve, auto) - - if (auto) - src.t_status = 4 - return - -/obj/machinery/atmoalter/siphs/scrubbers/process() - /* - if(stat & NOPOWER) return - - if(src.gas.temperature >= 3000) - src.melt() - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (T.firelevel < 900000.0) - src.gas.turf_add_all_oxy(T) - - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - src.gas.turf_take(T, t) - if(4.0) - if( !portable() ) use_power(50, ENVIRON) - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 400 - else - if (world.time > src.f_time) - src.gas.extract_toxs(T) - if( !portable() ) use_power(150, ENVIRON) - var/contain = src.gas.total_moles() - if (contain > 1.3E8) - src.gas.turf_add(T, 1.3E8 - contain) - - src.setstate() - src.updateDialog() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/setstate() - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/reset(valve, auto) - - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/setstate() - - if(stat & NOPOWER) - icon_state = "scrubber:0" - return - - if (src.holding) - src.icon_state = "scrubber:T" - else - if (src.t_status != 3) - src.icon_state = "scrubber:1" - else - src.icon_state = "scrubber:0" - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -//true if the siphon is portable (therfore no power needed) - -/obj/machinery/proc/portable() - return istype(src, /obj/machinery/atmoalter/siphs/fullairsiphon/port) || istype(src, /obj/machinery/atmoalter/siphs/scrubbers/port) - -/obj/machinery/atmoalter/siphs/power_change() - - if( portable() ) - return - - if(!powered(ENVIRON)) - spawn(rand(0,15)) - stat |= NOPOWER - setstate() - else - stat &= ~NOPOWER - setstate() - - -/obj/machinery/atmoalter/siphs/process() - /* -// var/dbg = (suffix=="d") && Debug - - if(stat & NOPOWER) return - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - //var/g = gas.total_moles() - //if(dbg) world.log << "VP0 : [t] from turf: [gas.total_moles()]" - //if(dbg) Air() - - src.gas.turf_take(T, t) - //if(dbg) world.log << "VP1 : now [gas.total_moles()]" - - //if(dbg) world.log << "[gas.total_moles()-g] ([t]) from turf to siph" - - //if(dbg) Air() - if(4.0) - if( !portable() ) - use_power(50, ENVIRON) - - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 300 - else - if (world.time > src.f_time) - var/difference = CELLSTANDARD - (T.oxygen + T.n2) - if (difference > 0) - var/t1 = src.gas.total_moles() - if (difference > t1) - difference = t1 - src.gas.turf_add(T, difference) - - src.updateDialog() - - src.setstate() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/siphs/attack_paw(user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/atmoalter/siphs/attack_hand(var/mob/user as mob) - - if(stat & NOPOWER) return - - if(src.portable() && istype(user, /mob/living/silicon/ai)) //AI can't use portable siphons - return - - user.machine = src - var/tt - switch(src.t_status) - if(1.0) - tt = text("Releasing Siphon Stop", src, src) - if(2.0) - tt = text("Release Siphoning Stop", src, src) - if(3.0) - tt = text("Release Siphon Stopped Automatic", src, src, src) - else - tt = "Automatic equalizers are on!" - var/ct = null - switch(src.c_status) - if(1.0) - ct = text("Releasing Accept Stop", src, src) - if(2.0) - ct = text("Release Accepting Stop", src, src) - if(3.0) - ct = text("Release Accept Stopped", src, src) - else - ct = "Disconnected" - var/at = null - if (src.t_status == 4) - at = text("Automatic On Stop", src) - var/dat = text("Canister Valves []
\n\tContains/Capacity [] / []
\n\tUpper Valve Status: [] []
\n\t\tM - - - - [] + + + + M
\n\tPipe Valve Status: []
\n\t\tM - - - - [] + + + + M
\n
\n\nClose
\n\t
", (!( src.alterable ) ? "Valves are locked. Unlock with wrench!" : "You can lock this interface with a wrench."), num2text(src.gas.return_pressure(), 10), num2text(src.maximum, 10), (src.t_status == 4 ? text("[]", at) : text("[]", tt)), (src.holding ? text("
(Tank ([])", src, src.holding.air_contents.return_pressure()) : null), src, num2text(max_valve, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(max_valve, 7), ct, src, num2text(max_valve, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(max_valve, 7), user) - user << browse(dat, "window=siphon;size=600x300") - onclose(user, "siphon") - return - -/obj/machinery/atmoalter/siphs/Topic(href, href_list) - ..() - - if (usr.stat || usr.restrained()) - return - if ((!( src.alterable )) && (!istype(usr, /mob/living/silicon/ai))) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - if(4.0) - src.t_status = 4 - src.f_time = 1 - else - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), max_valve) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), max_valve) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if (cp == 1) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/siphs/attackby(var/obj/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/screwdriver)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - if (src.c_status) - src.anchored = 0 - src.c_status = 0 - user.show_message("\blue You have disconnected the siphon.") - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the siphon.") - con.connected = src - else - user.show_message("\blue There is nothing here to connect to the siphon.") - - - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - if (src.alterable) - user << "\blue You unlock the interface!" - else - user << "\blue You lock the interface!" - return - - diff --git a/code/unused/spacecraft/manufacturing.dm b/code/unused/spacecraft/manufacturing.dm deleted file mode 100644 index 9036407ac5e..00000000000 --- a/code/unused/spacecraft/manufacturing.dm +++ /dev/null @@ -1,247 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -// Entirely unfinished. Mostly just bouncing ideas off the code. - - -// Smelting -// Grinding -// Spraying -// Crate - -/obj/deploycrate - icon = 'icons/obj/mining.dmi' - icon_state = "deploycrate" - density = 1 - var/payload - -/obj/deploycrate/attack_hand(mob/user as mob) - switch(payload) - if(null) - return - //if("cloner") - // make a cloner - // blah blah - for (var/mob/V in hearers(src)) - V.show_message("[src] lets out a pneumatic hiss, its panels rapdily unfolding and expanding to produce its payload.", 2) - del(src) - - -/obj/machinery/nanosprayer - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - var/payload - var/hacked = 0 - var/temp = 100 - - var/usr_density = 5 - var/usr_lastupdate = 0 - - var/time_started = 0 - - var/points = 0 - var/totalpoints = 0 - - var/state = 0 // 0 - Idle, 1 - Spraying, 2 - Done, 3 - Overheated - -obj/machinery/nanosprayer/proc/update_temp() - // 1 second : 1 degree - if(src.state == 0) - var/diff = (world.time - usr_lastupdate) * 10 - temp -= diff - if(temp < 100) - temp = 100 - usr_lastupdate = world.time - return temp - else if(src.state == 1) - var/diff = (world.time - usr_lastupdate) * 10 - diff = diff * usr_density - temp += diff - usr_lastupdate = world.time - return temp - -obj/machinery/nanosprayer/process() - src.time_started = world.time - totalpoints = lentext(payload) * rand(5,10) - if(!totalpoints) - totalpoints = 1 - while(src.state == 1) - // Each unit of cost is 20 seconds - density - temp += density * rand(1,4) - sleep(200 - (usr_density * 10)) - if(src.temp > 350) - src.state = 3 - src.overheat() - return 0 - points += usr_density - if(points >= totalpoints) - src.state = 2 - src.complete() - return 1 - - -obj/machinery/nanosprayer/proc/cooldown() - while(state != 1) - sleep(200) - temp -= rand(5,20) - if(temp < 100) - temp = 100 - return - -obj/machinery/nanosprayer/proc/overheat() - return - -obj/machinery/nanosprayer/proc/complete() - src.totalpoints = 0 - src.points = 0 - spawn() cooldown() - return - -obj/machinery/nanosprayer/attack_hand(user as mob) - var/dat - if(..()) - return - dat += text("Core Temp: [temp]�C
") - dat += text("Nanocloud Density: [usr_density] million
") - dat += text("\[- / +\]
") - if(payload) - dat += text("
Task: [payload]
") - switch(state) - if(0) - dat += text("Status: Idling
") - if(1) - dat += text("Status: Spraying
") - if(2) - dat += text("Status: Spray Task Complete
") - if(3) - dat += text("Status: OVERHEATED
") - if(state == 1) - if(points <= 0) - points = 1 - var/complete = (points * 100)/totalpoints - if(complete < 0) - complete = 0 - if(complete > 100) - complete = 100 - dat += text("Progress: [complete]%
") - if(state == 2) - dat += text("Progress: 100%
") - dat += text("\[Release Payload\]
") - dat += text("

Set Task
") - dat += text("Start Spray
") - dat += text("Cancel Spray") - dat += text("

Refresh") - user << browse("NANO SPRAY 1.1[dat]", "window=nanosprayer") - onclose(user, "nanosprayer") - -obj/machinery/nanosprayer/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["plus"]) - usr_density += 1 - if(href_list["minus"]) - usr_density -= 1 - if(usr_density < 1) - usr_density = 1 - if(href_list["start"]) - if(state == 0) - state = 1 - spawn() src.process() - if(href_list["stop"]) - if(state == 1) - state = 0 - points = 0 - totalpoints = 0 - spawn() cooldown() - if(href_list["settask"]) - if(state == 0) - var/temppayload = input("Set a Task:", "Job Assignment") as text|null - if(temppayload) - payload = temppayload - //if(href_list["release"]) - // if(state == 2) - // Create the crate somewhere - src.updateUsrDialog() - -/obj/machinery/smelter - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - var/locked = 0 - var/closed = 0 - var/state = 0 // 0 - Idle, 1 - Smelt, 2 - Cool, 3 - Clean - var/slag = 0 - var/hacked = 0 - -obj/machinery/smelter/attack_hand(user as mob) - var/dat - if(..()) - return - dat += text("

Smelt-o-Matic Control Interface

") - dat += text("The red light is [src.closed ? "off" : "on"].
") - dat += text("The green light is [src.locked ? "on" : "off"].
") - switch(slag) - if(0) - dat += text("The meter is resting at zero.
") - if(1 to 2) - dat += text("The meter is wobbling at the mid-point marker.
") - if(3) - dat += text("The meter strains, displaying its maximum value.
") - else - dat += text("The meter has broken.
") - switch(state) - if(0) - dat += text("Status:Idle
") - if(1) - dat += text("Status:Smelting
") - if(2) - dat += text("Status:Cooling
") - if(3) - dat += text("Status:Cleaning
") - dat += text("

Turn key [src.locked ? "to upper-left position" : "to upper-right position"]
") - dat += text("Flip switch [src.closed ? "up" : "down"]
") - dat += text("Push large flashing yellow button
") - user << browse("SMELTOMATIC[dat]", "window=smelter") - onclose(user, "smelter") - - -obj/machinery/smelter/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["key"]) - src.locked = !src.locked - if(href_list["switch"]) - src.closed = !src.closed - if(href_list["button"]) - //Do stuff to actually smelt shit or something I don't know - return - src.updateUsrDialog() - - -/obj/machinery/slaggrinder - icon = 'icons/obj/mining.dmi' - - density = 1 - anchored = 1 - - - -/obj/machinery/adminmachine - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - - var/gameticker - var/gameworld - - New() - ..() - gameticker = ticker - gameworld = world diff --git a/code/unused/spacecraft/shipcore.dm b/code/unused/spacecraft/shipcore.dm deleted file mode 100644 index 6df889c0b1b..00000000000 --- a/code/unused/spacecraft/shipcore.dm +++ /dev/null @@ -1,348 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -/obj/machinery/shipcore - icon = 'craft.dmi' - icon_state = "core" - density = 1 - - var/width = 6 - var/height = 8 - var/list/turfs = list() - var/list/builders - var/list/components = list() - var/build_status = "unbuilt" - - - proc/group_self() - builders = list() - turfs = list() - components = list() - - src.anchored = 1 - - var/obj/ship_builder/L = new(locate(src.x, src.y, src.z)) - L.set_dir(WEST) - L.distance = width/2 - L.core = src - - var/obj/ship_builder/R = new(locate(src.x+1, src.y, src.z)) - R.set_dir(EAST) - R.distance = (width/2)-1 - R.core = src - - builders.Add(L, R) - - spawn() L.scan() - spawn() R.scan() - - var/h - for(h=1, h[src.wires[wire] ? "Mend" : "Cut"] Pulse
") - - dat += text("The red light is [src.disabled ? "off" : "on"].
") - dat += text("The green light is [src.shocked ? "off" : "on"].
") - dat += text("The blue light is [src.hacked ? "off" : "on"].
") -*/ - switch(src.build_status) - if("unbuilt") - dat += "

Core Status: Undeployed


" - dat += "Build Ship
" - if("built") - dat += "

Core Status: Deployed


" - dat += "Move
" - if("rebuilding") - dat += "

Core Status: Recalibrating


" - user << browse("Ship Core[dat]","window=shipcore") - onclose(user, "shipcore") - return - user << browse("Ship Core Control Panel[dat]", "window=shipcore") - onclose(user, "shipcore") - return - -obj/machinery/shipcore/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["groupself"]) - src.group_self() - if (href_list["move"]) - var/list/beacons = list() - for(var/obj/effect/ship_landing_beacon/b in world) - if(istype(b, /obj/effect/ship_landing_beacon)) - if(b.active) - beacons.Add(b) - if(!beacons.len) - return - var/obj/choice = input("Choose a beacon to land at.", "Beacon Selection") in beacons - if(choice) - src.MoveShip(choice.loc) - - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.attack_hand(M) - src.updateUsrDialog() - return - - - -obj/machinery/ship_component - name = "ship component" - icon = 'craft.dmi' - var/obj/machinery/shipcore/core - var/required_draw = 0 - var/active = 1 - - proc - draw_power(var/n as num) - if(!n) - n = required_draw - if(core.draw_power(n)) - return 1 - else - return 0 - -obj/machinery/ship_component/thruster - name = "thruster" - icon_state = "thruster" - density = 1 - opacity = 1 - - var/cooldown = 600 // In 1/10th seconds - var/lastused - var/ready = 0 - required_draw = 100 - - proc - check_ready() - if(ready) - return 1 - if(lastused + cooldown <= world.time) - for(var/turf/T in range(1,src)) - if(istype(T, /turf/space)) - src.ready = 1 - break - else - src.ready = 0 - return src.ready - - fire() - src.check_ready() - if(!ready) - return 0 - if(src.draw_power()) - src.ready = 0 - src.lastused = world.time - return 1 - else - return 0 - -obj/machinery/ship_component/engine - name = "engine" - icon_state = "engine" - density = 1 - opacity = 1 - - var/charge = 1000 - var/capacity = 1000 - - draw_power(var/n as num) - if(charge >= n) - charge -= n - return 1 - else - return 0 - -obj/machinery/ship_component/control_panel - name = "control panel" - icon_state = "controlpanel" - density = 1 - opacity = 0 - - attack_hand(user as mob) - var/dat - if(..()) - return - if(!src.core) - dat += "No linked core found. Deploy ship core first." - else - dat += "Ship Status: [src.core.build_status]

" - dat += "

Installed Components:



" - dat += "" - for(var/obj/machinery/ship_component/C in core.components) - dat += "" - if(istype(C, /obj/machinery/ship_component/engine)) - dat += "" - if(istype(C, /obj/machinery/ship_component/thruster)) - dat += "" - dat += "
[C.name][C.active ? "Active" : "Inactive"]
Fuel: [C:charge]/[C:capacity]
Status: [C:check_ready() ? "Ready" : "On Cooldown"]
" - user << browse("Ship Controls[dat]","window=shipcontrols") - onclose(user, "shipcontrols") - - Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - - - - - - - - -/obj/ship_builder - icon = 'craft.dmi' - icon_state = "builder" - density = 0 - opacity = 0 - - var/obj/machinery/shipcore/core - var/distance = 0 - - proc/scan() - if(distance < 0) - cleanup_self() - var/i - for(i=0, iworld.maxx-4 || T.x<4) continue //putting them at the edge is dumb - if(T.y>world.maxy-4 || T.y<4) continue - turfs += T - if(!turfs.len) turfs += pick(/turf in orange(6)) - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() - smoke.set_up(10, 0, usr.loc) - smoke.start() - var/turf/picked = pick(turfs) - if(!isturf(picked)) return - usr.loc = picked - usr.verbs -= /client/proc/blink - spawn(40) - usr.verbs += /client/proc/blink - -//TELEPORT - -/mob/proc/teleport() - set category = "Spells" - set name = "Teleport" - set desc = "This spell teleports you to a type of area of your selection." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - var/A - usr.verbs -= /mob/proc/teleport -/* - var/list/theareas = new/list() - for(var/area/AR in world) - if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station)) continue - if(theareas.Find(AR.name)) continue - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z == src.z) - theareas += AR.name - theareas[AR.name] = AR -*/ - - A = input("Area to jump to", "BOOYEA", A) in teleportlocs - - spawn(600) - usr.verbs += /mob/proc/teleport - - var/area/thearea = teleportlocs[A] - - usr.say("SCYAR NILA [uppertext(A)]") - - var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() - smoke.set_up(5, 0, usr.loc) - smoke.attach(usr) - smoke.start() - var/list/L = list() - for(var/turf/T in get_area_turfs(thearea.type)) - if(!T.density) - var/clear = 1 - for(var/obj/O in T) - if(O.density) - clear = 0 - break - if(clear) - L+=T - - if(!L.len) - usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry." - return - - var/attempt = 0 - var/success = 0 - while(!success) - success = Move(pick(L)) - if(attempt > 20) break //Failsafe - if(!success) - usr.loc = pick(L) - - smoke.start() - - -//JAUNT - -/client/proc/jaunt() - set category = "Spells" - set name = "Ethereal Jaunt" - set desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /client/proc/jaunt - spawn(300) - usr.verbs += /client/proc/jaunt - spell_jaunt(usr) - -/proc/spell_jaunt(var/mob/H, time = 50) - if(H.stat) return - spawn(0) - var/mobloc = get_turf(H.loc) - var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc ) - var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) - animation.name = "water" - animation.density = 0 - animation.anchored = 1 - animation.icon = 'icons/mob/mob.dmi' - animation.icon_state = "liquify" - animation.layer = 5 - animation.master = holder - flick("liquify",animation) - H.loc = holder - H.client.eye = holder - var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() - steam.set_up(10, 0, mobloc) - steam.start() - sleep(time) - mobloc = get_turf(H.loc) - animation.loc = mobloc - steam.location = mobloc - steam.start() - H.canmove = 0 - sleep(20) - flick("reappear",animation) - sleep(5) - if(!H.Move(mobloc)) - for(var/direction in list(1,2,4,8,5,6,9,10)) - var/turf/T = get_step(mobloc, direction) - if(T) - if(H.Move(T)) - break - H.canmove = 1 - H.client.eye = H - del(animation) - del(holder) -/* -/obj/effect/dummy/spell_jaunt - name = "water" - icon = 'icons/effects/effects.dmi' - icon_state = "nothing" - var/canmove = 1 - density = 0 - anchored = 1 - -/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction) - if (!src.canmove) return - switch(direction) - if(NORTH) - src.y++ - if(SOUTH) - src.y-- - if(EAST) - src.x++ - if(WEST) - src.x-- - if(NORTHEAST) - src.y++ - src.x++ - if(NORTHWEST) - src.y++ - src.x-- - if(SOUTHEAST) - src.y-- - src.x++ - if(SOUTHWEST) - src.y-- - src.x-- - src.canmove = 0 - spawn(2) src.canmove = 1 - -/obj/effect/dummy/spell_jaunt/ex_act(blah) - return -/obj/effect/dummy/spell_jaunt/bullet_act(blah,blah) - return -*/ -//MUTATE - -/client/proc/mutate() - set category = "Spells" - set name = "Mutate" - set desc = "This spell causes you to turn into a hulk and gain laser vision for a short while." - if(usr.stat) - src << "Not when you are incapacitated." - return - if(!usr.casting()) return - usr.verbs -= /client/proc/mutate - spawn(400) - usr.verbs += /client/proc/mutate - - usr.say("BIRUZ BENNAR") - - usr << text("\blue You feel strong! You feel pressure building behind your eyes!") - if (!(HULK in usr.mutations)) - usr.mutations.Add(HULK) - if (!(LASER in usr.mutations)) - usr.mutations.Add(LASER) - spawn (300) - if (LASER in usr.mutations) usr.mutations.Remove(LASER) - if (HULK in usr.mutations) usr.mutations.Remove(HULK) - return - -//BODY SWAP /N - -/mob/proc/swap(mob/living/M as mob in oview()) - set category = "Spells" - set name = "Mind Transfer" - set desc = "This spell allows the user to switch bodies with a target." - if(usr.stat) - src << "Not when you are incapacitated." - return - - if(M.client && M.mind) - if(M.mind.special_role != "Wizard" || "Fake Wizard" || "Changeling" || "Cultist" || "Space Ninja")//Wizards, changelings, ninjas, and cultists are protected. - if( (istype(M, /mob/living/carbon/human)) || (istype(M, /mob/living/carbon/monkey)) && M.stat != 2) - var/mob/living/carbon/human/H = M //so it does not freak out when looking at the variables. - var/mob/living/carbon/human/U = src - - U.whisper("GIN'YU CAPAN") - U.verbs -= /mob/proc/swap - //Remove special verbs from both mobs - if(U.mind.special_verbs.len) - for(var/V in U.mind.special_verbs) - U.verbs -= V - if(H.mind.special_verbs.len) - for(var/V in H.mind.special_verbs) - H.verbs -= V - - //empty out H - var/mob/dead/observer/G = H.ghostize(0) //Transfers H to a temporary mob - - //Start the Transfer - U.mind.transfer_to(H) - G.mind.transfer_to(U) - U.key = G.key //has to be called explicitly since ghostize() set the datum/mind/var/active = 0 - - //Re-add those special verbs and stuff - if(H.mind.special_verbs.len) - var/spell_loss = 1//Can lose only one spell during transfer. - var/probability = 95 //To determine the chance of wizard losing their spell. - for(var/V in H.mind.special_verbs) - if(spell_loss == 0) - H.verbs += V - else - if(prob(probability)) - H.verbs += V - probability -= 7//Chance of of keeping spells goes down each time a spell is added. Less spells means less chance of losing them. - else - spell_loss = 0 - H.mind.special_verbs -= V - spawn(500) - H << "The mind transfer has robbed you of a spell." - - if(U.mind.special_verbs.len)//Basic fix to swap verbs for any mob if needed. - for(var/V in U.mind.special_verbs) - U.verbs += V - - spawn(500) - U << "Something about your body doesn't seem quite right..." - - U.Paralyse(20) - H.Paralyse(20) - - spawn(600) - H.verbs += /mob/proc/swap - - else - src << "Their mind is not compatible." - return - else - src << "Their mind is resisting your spell." - return - - else - src << "They appear to be brain-dead." - return \ No newline at end of file diff --git a/code/unused/tensioner.dm b/code/unused/tensioner.dm deleted file mode 100644 index 1cf5eb2acd8..00000000000 --- a/code/unused/tensioner.dm +++ /dev/null @@ -1,876 +0,0 @@ -#define PLAYER_WEIGHT 5 -#define HUMAN_DEATH -5000 -#define OTHER_DEATH -5000 -#define EXPLO_SCORE -10000 //boum - -#define COOLDOWN_TIME 12000 // Twenty minutes -#define MIN_ROUND_TIME 18000 - - -#define FLAT_PERCENT 0 - -//estimated stats -//80 minute round -//60 player server -//48k player-ticks - -//60 deaths (ideally) -//20 explosions - - -var/global/datum/tension/tension_master - -/datum/tension - var/score - - var/deaths - var/human_deaths - var/explosions - var/adminhelps - var/air_alarms - - var/nuketeam = 0 - var/malfAI = 0 - var/wizard = 0 - - var/forcenexttick = 0 - var/supress = 0 - var/eversupressed = 0 - var/cooldown = 0 - - var/round1 = 0 - var/round2 = 0 - var/round3 = 0 - var/round4 = 0 - - var/list/antagonistmodes = null - - - - var/list/potentialgames = list() - - New() - score = 0 - deaths=0 - human_deaths=0 - explosions=0 - adminhelps=0 - air_alarms=0 - - if(FLAT_PERCENT) // I cannot into balance - antagonistmodes = list ( - "POINTS_FOR_TRATIOR" = 6, - "POINTS_FOR_CHANGLING" = 6, - "POINTS_FOR_REVS" = 3, - "POINTS_FOR_MALF" = 1, - "POINTS_FOR_WIZARD" = 2, - "POINTS_FOR_CULT" = 3, - "POINTS_FOR_NUKETEAM" = 2, - "POINTS_FOR_ALIEN" = 5, - "POINTS_FOR_NINJA" = 3, - "POINTS_FOR_DEATHSQUAD" = 2, - "POINTS_FOR_BORGDEATHSQUAD" = 2 - ) - - else - antagonistmodes = list ( - "POINTS_FOR_TRATIOR" = 100000, - "POINTS_FOR_CHANGLING" = 120000, - "POINTS_FOR_REVS" = 150000, - "POINTS_FOR_MALF" = 250000, - "POINTS_FOR_WIZARD" = 150000, - "POINTS_FOR_CULT" = 150000, - "POINTS_FOR_NUKETEAM" = 250000, - "POINTS_FOR_ALIEN" = 200000, - "POINTS_FOR_NINJA" = 200000, - "POINTS_FOR_DEATHSQUAD" = 500000, - "POINTS_FOR_BORGDEATHSQUAD" = 500000 - ) - - proc/process() - score += get_num_players()*PLAYER_WEIGHT - - if(config.Tensioner_Active) - if(world.time > MIN_ROUND_TIME) - round1++ - if(!supress && !cooldown) - if(prob(1) || forcenexttick) - round2++ - if(prob(10) || forcenexttick) - round3++ - if(forcenexttick) - forcenexttick = 0 - - for (var/client/C in admin_list) - C << " The tensioner wishes to create additional antagonists! Press (this) in 60 seconds to abort!" - - spawn(600) - if(!supress) - cooldown = 1 - spawn(COOLDOWN_TIME) - cooldown = 0 - round4++ - - if(!antagonistmodes.len) - return - - var/thegame = null - - if(FLAT_PERCENT) - thegame = pickweight(antagonistmodes) - antagonistmodes.Remove(thegame) - - else - for(var/V in antagonistmodes) // OH SHIT SOMETHING IS GOING TO HAPPEN NOW - if(antagonistmodes[V] < score) - potentialgames.Add(V) - antagonistmodes.Remove(V) - if(potentialgames.len) - thegame = pick(potentialgames) - - - if(thegame) - - - log_admin("The tensioner fired, and decided on [thegame]") - - switch(thegame) - if("POINTS_FOR_TRATIOR") - if(!makeTratiors()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_CHANGLING") - if(!makeChanglings()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_REVS") - if(!makeRevs()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_MALF") - if(!makeMalfAImode()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - if("POINTS_FOR_WIZARD") - if(!makeWizard()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_CULT") - if(!makeCult()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_NUKETEAM") - if(!makeNukeTeam()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_ALIEN") - if(!makeAliens()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_NINJA") - if(!makeSpaceNinja()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_DEATHSQUAD") - if(!makeDeathsquad()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - if("POINTS_FOR_BORG_DEATHSQUAD") - if(!makeBorgDeathsquad()) - forcenexttick = 1 - else - potentialgames.Remove(thegame) - - - proc/get_num_players() - var/peeps = 0 - for (var/mob/M in player_list) - if (!M.client) - continue - peeps += 1 - - return peeps - - proc/death(var/mob/M) - if (!M) return - deaths++ - - if (istype(M,/mob/living/carbon/human)) - score += HUMAN_DEATH - human_deaths++ - else - score += OTHER_DEATH - - - proc/explosion() - score += EXPLO_SCORE - explosions++ - - proc/new_adminhelp() - adminhelps++ - - proc/new_air_alarm() - air_alarms++ - - - Topic(href, href_list) - - if(!usr || !usr.client) - return //This shouldnt happen - - if(!usr.client.holder) - message_admins("\red [key_name(usr)] tried to use the tensioner without authorization.") - log_admin("[key_name(usr)] tried to use the tensioner without authorization.") - return - - log_admin("[key_name(usr)] used a tensioner override. The override was [href]") - message_admins("[key_name(usr)] used a tensioner override. The override was [href]") - - - if(href_list["addScore"]) - score += 50000 - - if (href_list["makeTratior"]) - makeTratiors() - - else if (href_list["makeChanglings"]) - makeChanglings() - - else if (href_list["makeRevs"]) - makeRevs() - - else if (href_list["makeWizard"]) - makeWizard() - - else if (href_list["makeCult"]) - makeCult() - - else if (href_list["makeMalf"]) - makeMalfAImode() - - else if (href_list["makeNukeTeam"]) - makeNukeTeam() - - else if (href_list["makeAliens"]) - makeAliens() - - else if (href_list["makeSpaceNinja"]) - makeSpaceNinja() - - else if (href_list["makeDeathsquad"]) - makeDeathsquad() - - else if (href_list["makeBorgDeathsquad"]) - makeBorgDeathsquad() - - else if (href_list["Supress"]) - supress = 1 - eversupressed++ - spawn(6000) - supress = 0 - - else if (href_list["ToggleStatus"]) - config.Tensioner_Active = !config.Tensioner_Active - - - proc/makeMalfAImode() - - var/list/mob/living/silicon/AIs = list() - var/mob/living/silicon/malfAI = null - var/datum/mind/themind = null - - for(var/mob/living/silicon/ai/ai in player_list) - if(ai.client) - AIs += ai - - if(AIs.len) - malfAI = pick(AIs) - - else - return 0 - - if(malfAI) - themind = malfAI.mind - themind.make_AI_Malf() - return 1 - -/* - if(BE_CHANGELING) roletext="changeling" - if(BE_TRAITOR) roletext="traitor" - if(BE_OPERATIVE) roletext="operative" - if(BE_WIZARD) roletext="wizard" - if(BE_REV) roletext="revolutionary" - if(BE_CULTIST) roletext="cultist" - - - for(var/mob/new_player/player in world) - if(player.client && player.ready) - if(player.preferences.be_special & role) -*/ - - - proc/makeTratiors() - - var/datum/game_mode/traitor/temp = new - - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - - var/datum/preferences/preferences = new - - if(applicant.stat < 2) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(applicant.client) - if(preferences.savefile_load(applicant, 0)) - if(preferences.be_special & BE_TRAITOR) - candidates += applicant - - if(candidates.len) - var/numTratiors = min(candidates.len, 3) - - for(var/i = 0, i300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client) - candidates.Remove(G) - - spawn(0) - if(candidates.len) - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - if(!theghost) - return 0 - var/mob/living/carbon/human/new_character=makeBody(theghost) - new_character.mind.make_Wizard() - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeCult() - - var/datum/game_mode/cult/temp = new - if(config.protect_roles_from_antagonist) - temp.restricted_jobs += temp.protected_jobs - - var/list/mob/living/carbon/human/candidates = list() - var/mob/living/carbon/human/H = null - - for(var/mob/living/carbon/human/applicant in player_list) - - var/datum/preferences/preferences = new - - if(applicant.stat < 2) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(applicant.client) - if(preferences.savefile_load(applicant, 0)) - if(preferences.be_special & BE_CULTIST) - candidates += applicant - - if(candidates.len) - var/numCultists = min(candidates.len, 4) -// var/list/runeWords = list() - - for(var/i = 0, i300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client) - candidates.Remove(G) - - spawn(0) - if(candidates.len) - var/numagents = 5 - syndicate_begin() - - for(var/i = 0, iAlert: The shuttle is going back!
" - - var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader - - */ - var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. - - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - - - for(var/mob/dead/observer/G in player_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.key) - candidates.Remove(G) - - if(candidates.len) - var/numagents = 6 - //Spawns commandos and equips them. - for (var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) - if(numagents<=0) - break - if (L.name == "Syndicate-Commando") - syndicate_leader_selected = numagents == 1?1:0 - - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - del(new_syndicate_commando) - break - - new_syndicate_commando.key = theghost.key - new_syndicate_commando.internal = new_syndicate_commando.s_store - new_syndicate_commando.internals.icon_state = "internal1" - - //So they don't forget their code or mission. - - - new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"LEADER"] in the service of the Syndicate. \nYour current mission is: \red [input]" - - numagents-- - - //Spawns the rest of the commando gear. - // for (var/obj/effect/landmark/L) - // if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - // var/obj/item/weapon/paper/P = new(L.loc) - // P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" - // P.name = "Spec. Ops. Manual" - - for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) - if (L.name == "Syndicate-Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) - // del(L) - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBorgDeathsquad() - var/list/mob/dead/observer/candidates = list() - var/mob/dead/observer/theghost = null - var/time_passed = world.time - var/list/namelist = list("Tyr","Fenrir","Lachesis","Clotho","Atropos","Nyx") - - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - - for(var/mob/dead/observer/G in player_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client || !G.key) - candidates.Remove(G) - - if(candidates.len) - var/numagents = 3 - - //Spawns commandos and equips them. - for (var/obj/effect/landmark/L in /area/borg_deathsquad) - if(numagents<=0) - break - if (L.name == "Borg-Deathsquad") - - var/name = pick(namelist) - namelist.Remove(name) - - var/mob/living/silicon/robot/new_borg_deathsquad = create_borg_death_commando(L, name) - - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - del(new_borg_deathsquad) - break - - new_borg_deathsquad.key = theghost.key - - //So they don't forget their code or mission. - - - new_borg_deathsquad << "You are a borg deathsquad operative. Follow your laws." - numagents-- - - //Spawns the rest of the commando gear. - // for (var/obj/effect/landmark/L) - // if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - // var/obj/item/weapon/paper/P = new(L.loc) - // P.info = "

Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:
#1 Work as a team.
#2 Accomplish your objective at all costs.
#3 Leave no witnesses.
You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.
If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.

In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.

Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE. Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.
To make the device functional:
#1 Place bomb in designated detonation zone
#2 Extend and anchor bomb (attack with hand).
#3 Insert Nuclear Auth. Disk into slot.
#4 Type numeric code into keypad ([nuke_code]).
Note: If you make a mistake press R to reset the device.
#5 Press the E button to log onto the device.
You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.
Note: Toggle off the SAFETY.
Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.
Note: THE BOMB IS STILL SET AND WILL DETONATE
Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.

The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"]

Good luck, soldier!

" - // P.name = "Spec. Ops. Manual" - - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character - if(!G_found || !G_found.key) return - - //First we spawn a dude. - var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned. - - new_character.gender = pick(MALE,FEMALE) - - var/datum/preferences/A = new() - A.randomize_appearance_for(new_character) - if(new_character.gender == MALE) - new_character.real_name = "[pick(first_names_male)] [pick(last_names)]" - else - new_character.real_name = "[pick(first_names_female)] [pick(last_names)]" - new_character.name = new_character.real_name - new_character.age = rand(17,45) - - new_character.dna.ready_dna(new_character) - new_character.key = G_found.key - - return new_character - - /proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) - var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) - var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") - var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") - var/syndicate_commando_name = pick(last_names) - - new_syndicate_commando.gender = pick(MALE, FEMALE) - - var/datum/preferences/A = new()//Randomize appearance for the commando. - A.randomize_appearance_for(new_syndicate_commando) - - new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]" - new_syndicate_commando.name = new_syndicate_commando.real_name - new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45) - - new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA. - - //Creates mind stuff. - new_syndicate_commando.mind_initialize() - new_syndicate_commando.mind.assigned_role = "MODE" - new_syndicate_commando.mind.special_role = "Syndicate Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_syndicate_commando.mind - new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) - - return new_syndicate_commando - - - - - - /proc/create_borg_death_commando(obj/spawn_location, name) - - var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1) - - new_borg_deathsquad.real_name = name - new_borg_deathsquad.name = name - - //Creates mind stuff. - new_borg_deathsquad.mind_initialize() - new_borg_deathsquad.mind.assigned_role = "MODE" - new_borg_deathsquad.mind.special_role = "Borg Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_borg_deathsquad.mind - //del(spawn_location) // Commenting this out for multiple commando teams. - return new_borg_deathsquad - - - - - -/obj/machinery/computer/Borg_station - name = "Cyborg Station Terminal" - icon = 'icons/obj/computer.dmi' - icon_state = "syndishuttle" - req_access = list() - var/temp = null - var/hacked = 0 - var/jumpcomplete = 0 - -/obj/machinery/computer/Borg_station/attack_hand() - if(jumpcomplete) - return - if(alert(usr, "Are you sure you want to send a cyborg deathsquad?", "Confirmation", "Yes", "No") == "Yes") - var/area/start_location = locate(/area/borg_deathsquad/start) - var/area/end_location = locate(/area/borg_deathsquad/station) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - - start_location.move_contents_to(end_location) - - for(var/obj/machinery/door/poddoor/P in end_location) - P.open() - jumpcomplete = 1 - command_alert("DRADIS contact! Set condition one throughout the station!") diff --git a/code/unused/toilets.dm b/code/unused/toilets.dm deleted file mode 100644 index f943a1cc548..00000000000 --- a/code/unused/toilets.dm +++ /dev/null @@ -1,96 +0,0 @@ -/* -CONTAINS: -TOILET - -/obj/item/weapon/storage/toilet - name = "toilet" - w_class = 4.0 - anchored = 1.0 - density = 0.0 - var/status = 0.0 - var/clogged = 0.0 - anchored = 1.0 - icon = 'icons/obj/stationobjs.dmi' - icon_state = "toilet" - item_state = "syringe_kit" - -/obj/item/weapon/storage/toilet/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (src.contents.len >= 7) - user << "The toilet is clogged!" - return - if (istype(W, /obj/item/weapon/disk/nuclear)) - user << "This is far too important to flush!" - return - if (istype(W, /obj/item/weapon/storage/)) - return - if (istype(W, /obj/item/weapon/grab)) - playsound(src.loc, 'sound/effects/slosh.ogg', 50, 1) - for(var/mob/O in viewers(user, null)) - O << text("\blue [] gives [] a swirlie!", user, W) - return - var/t - for(var/obj/item/weapon/O in src) - t += O.w_class - t += W.w_class - if (t > 30) - user << "You cannot fit the item inside." - return - user.u_equip(W) - W.loc = src - if ((user.client && user.s_active != src)) - user.client.screen -= W - src.orient2hud(user) - W.dropped(user) - add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\blue [] has put [] in []!", user, W, src), 1) - return - -/obj/item/weapon/storage/toilet/MouseDrop_T(mob/M as mob, mob/user as mob) - if (!ticker) - user << "You can't help relieve anyone before the game starts." - return - if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat)) - return - if (M == usr) - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] sits on the toilet.", user) - else - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] is seated on the toilet by []!", M, user) - M.anchored = 1 - M.buckled = src - M.loc = src.loc - src.add_fingerprint(user) - return - -/obj/item/weapon/storage/toilet/attack_hand(mob/user as mob) - for(var/mob/M in src.loc) - if (M.buckled) - if (M != user) - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] is zipped up by [].", M, user) - else - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] zips up.", M) -// world << "[M] is no longer buckled to [src]" - M.anchored = 0 - M.buckled = null - src.add_fingerprint(user) - if((src.clogged < 1) || (src.contents.len < 7) || (user.loc != src.loc)) - for(var/mob/O in viewers(user, null)) - O << text("\blue [] flushes the toilet.", user) - src.clogged = 0 - src.contents.len = 0 - else if((src.clogged >= 1) || (src.contents.len >= 7) || (user.buckled != src.loc)) - for(var/mob/O in viewers(user, null)) - O << text("\blue The toilet is clogged!") - return - - -*/ \ No newline at end of file diff --git a/code/unused/traps.dm b/code/unused/traps.dm deleted file mode 100644 index 94681d1929d..00000000000 --- a/code/unused/traps.dm +++ /dev/null @@ -1,225 +0,0 @@ -/obj/effect/pressure_plate - name = "pressure plate" - desc = "A pressure plate that triggers a trap or a few of them." - density = 0 - var/list/connected_traps_names = list() //mappers, edit this when you place pressure plates on the map. don't forget to make the connected traps have an UNIQUE name - var/list/connected_traps = list() //actual references to the connected traps. leave empty, it is generated at runtime from connected_traps_names - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types - -/obj/effect/pressure_plate/New() - ..() - src:visibility = 0 - refresh() - -/obj/effect/pressure_plate/verb/refresh() - set name = "Refresh Pressure Plate Links" - set category = "Object" - set src in view() - connected_traps = list() //emptying the list first - for(var/trap_name in connected_traps_names) - for(var/obj/effect/trap/the_trap in world) - if(the_trap.name == trap_name) - connected_traps += the_trap //adding the trap with the matching name - -/obj/effect/pressure_plate/HasEntered(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/pressure_plate/Bumped(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/trap //has three subtypes - /aoe, /area (ie affects an entire area), /single (only the victim is affected) - name = "trap" - desc = "It's a trap!" - density = 0 - var/uses = 1 //how many times it can be triggered - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types. can also be "none" to not be triggered by entering its square (needs to have a pressure plate attached in that case) - var/target_type = "mob" //if it targets mobs, turfs or objs - var/include_dense = 1 //if it includes dense targets in the aoe (may be important for some reason). you'll probably want to change it to 1 if you target mobs or objs - -/obj/effect/trap/New() - ..() - src:visibility = 0 //seriously, it keeps saying "undefined var" when I try to do it in the define - -/obj/effect/trap/HasEntered(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/Bumped(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/proc/trigger(victim) - if(!uses) - return - uses-- - activate(victim) - -/obj/effect/trap/proc/activate() - -/obj/effect/trap/aoe - name = "aoe trap" - desc = "This trap affects a number of mobs, turfs or objs in an aoe" - var/aoe_radius = 3 //radius of aoe - var/aoe_range_or_view = "view" //if it includes all tiles in [radius] range or view - -/obj/effect/trap/aoe/proc/picktargets() - - var/list/targets = list() - - switch(target_type) - if("turf") - switch(aoe_range_or_view) - if("view") - for(var/turf/T in view(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("range") - for(var/turf/T in range(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("mob") - switch(aoe_range_or_view) - if("view") - for(var/mob/living/M in view(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("range") - for(var/mob/living/M in range(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("obj") - switch(aoe_range_or_view) - if("view") - for(var/obj/O in view(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - if("range") - for(var/obj/O in range(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - - return targets - -/obj/effect/trap/aoe/rocksfall - name = "rocks fall trap" - desc = "Your DM must really hate you." - target_type = "turf" - include_dense = 0 - var/rocks_amt = 10 //amount of rocks falling - var/rocks_min_dmg = 50 //min damage per rock - var/rocks_max_dmg = 100 //max damage per rock - var/rocks_hit_chance = 100 //the chance for a rock to hit you - var/list/rocks_type = list() //what rocks might it drop on the target. with var editing, not even limited to rocks. - -/obj/effect/trap/aoe/rocksfall/New() - - ..() - - rocks_type = pick_rock_types() - -/obj/effect/trap/aoe/rocksfall/proc/pick_rock_types() //since we may want subtypes of the trap with completely different rock types, which is best done this way - - var/list/varieties = list() - - varieties = typesof(/obj/item/weapon/ore) - varieties -= /obj/item/weapon/ore/diamond //don't want easily available rare ores, hmm? - varieties -= /obj/item/weapon/ore/uranium - varieties -= /obj/item/weapon/ore/slag //that'd be just stupid - - return varieties - -/obj/effect/trap/aoe/rocksfall/activate() - - var/list/targets = list() - targets = picktargets() - - if(target_type == "turf") - for(var/i=0,i 0) - step(src, src.dir) - sleep(1) - t1-- - else - var/t1 = round(src.speed / 5) - while(t1 > 0) - step(src, src.dir) - t1-- - return - -/obj/machinery/vehicle/meteorhit(var/obj/O as obj) - for (var/obj/item/I in src) - I.loc = src.loc - - for (var/mob/M in src) - M.loc = src.loc - if (M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - del(src) - -/obj/machinery/vehicle/ex_act(severity) - switch (severity) - if (1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //SN src = null - del(src) - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //SN src = null - del(src) - -/obj/machinery/vehicle/blob_act() - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - -/obj/machinery/vehicle/Bump(var/atom/A) - //world << "[src] bumped into [A]" - spawn (0) - ..() - src.speed = 0 - return - return - -/obj/machinery/vehicle/relaymove(mob/user as mob, direction) - if (user.stat) - return - - if ((user in src)) - if (direction & 1) - src.speed = max(src.speed - 1, 1) - else if (direction & 2) - src.speed = min(src.maximum_speed, src.speed + 1) - else if (src.can_rotate && direction & 4) - src.set_dir(turn(src.dir, -90.0)) - else if (src.can_rotate && direction & 8) - src.set_dir(turn(src.dir, 90)) - else if (direction & 16 && src.can_maximize_speed) - src.speed = src.maximum_speed - -/obj/machinery/vehicle/verb/eject() - set src = usr.loc - - if (usr.stat) - return - - var/mob/M = usr - M.loc = src.loc - if (M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - step(M, turn(src.dir, 180)) - return - -/obj/machinery/vehicle/verb/board() - set src in oview(1) - - if (usr.stat) - return - - if (src.one_person_only && locate(/mob, src)) - usr << "There is no room! You can only fit one person." - return - - var/mob/M = usr - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - M.loc = src - -/obj/machinery/vehicle/verb/unload(var/atom/movable/A in src) - set src in oview(1) - - if (usr.stat) - return - - if (istype(A, /atom/movable)) - A.loc = src.loc - for(var/mob/O in view(src, null)) - if ((O.client && !(O.blinded))) - O << text("\blue [] unloads [] from []!", usr, A, src) - - if (ismob(A)) - var/mob/M = A - if (M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = M - -/obj/machinery/vehicle/verb/load() - set src in oview(1) - - if (usr.stat) - return - - if (((istype(usr, /mob/living/carbon/human)) && (!(ticker) || (ticker && ticker.mode != "monkey")))) - var/mob/living/carbon/human/H = usr - - if ((H.pulling && !(H.pulling.anchored))) - if (src.one_person_only && !(istype(H.pulling, /obj/item/weapon))) - usr << "You may only place items in." - else - H.pulling.loc = src - if (ismob(H.pulling)) - var/mob/M = H.pulling - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] loads [] into []!", H, H.pulling, src) - - H.stop_pulling() - - -/obj/machinery/vehicle/space_ship - icon = 'escapepod.dmi' - icon_state = "pod" - var/datum/global_iterator/space_ship_inertial_movement/pr_inertial_movement - var/datum/global_iterator/space_ship_speed_increment/pr_speed_increment - var/last_relay = 0 - var/obj/machinery/portable_atmospherics/canister/internal_tank - var/health = 100 - var/datum/effects/system/spark_spread/spark_system = new - - New() - ..() - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - pr_inertial_movement = new /datum/global_iterator/space_ship_inertial_movement(list(src),0) - pr_speed_increment = new /datum/global_iterator/space_ship_speed_increment(list(src),0) - src.spark_system.set_up(2, 0, src) - src.spark_system.attach(src) - return - - proc/inspace() - if(istype(src.loc, /turf/space)) - return 1 - return 0 - - remove_air(amount) - if(src.internal_tank) - return src.internal_tank.air_contents.remove(amount) - else - var/turf/T = get_turf(src) - return T.remove_air(amount) - - return_air() - if(src.internal_tank) - return src.internal_tank.return_air() - return - - proc/return_pressure() - if(src.internal_tank) - return src.internal_tank.return_pressure() - return 0 - - proc/return_temperature() - if(src.internal_tank) - return src.internal_tank.return_temperature() - return 0 - - Bump(var/atom/movable/A) - if(istype(A)) - step(A, src.dir) - else - if(pr_inertial_movement.cur_delay<2) - take_damage(25) - pr_speed_increment.stop() - pr_inertial_movement.stop() - return - - proc/take_damage(value) - if(isnum(value)) - src.health -= value - if(src.health>0) - src.spark_system.start() -// world << "[src] health is [health]" - else - src.ex_act(1) - return - - process() - return - - proc/get_desired_speed() - return (pr_inertial_movement.max_delay-pr_inertial_movement.desired_delay)/(pr_inertial_movement.max_delay-pr_inertial_movement.min_delay)*100 - - proc/get_current_speed() - return (pr_inertial_movement.max_delay-pr_inertial_movement.cur_delay)/(pr_inertial_movement.max_delay-pr_inertial_movement.min_delay)*100 - -/obj/machinery/vehicle/space_ship/relaymove(mob/user as mob, direction) - spawn() - if (user.stat || world.time-last_relay<2) - return - last_relay = world.time - var/speed_change = 0 - if(direction & NORTH) - pr_inertial_movement.desired_delay = between(pr_inertial_movement.min_delay, pr_inertial_movement.desired_delay-1, pr_inertial_movement.max_delay) - speed_change = 1 - else if (direction & SOUTH) - pr_inertial_movement.desired_delay = between(pr_inertial_movement.min_delay, pr_inertial_movement.desired_delay+1, pr_inertial_movement.max_delay) - speed_change = 1 - else if (src.can_rotate && direction & 4) - src.set_dir(turn(src.dir, -90.0)) - else if (src.can_rotate && direction & 8) - src.set_dir(turn(src.dir, 90)) - if(speed_change) -// user << "Desired speed: [get_desired_speed()]%" - src.pr_speed_increment.start() - src.pr_inertial_movement.start() - return - -//should try two directional iterator datums, one for vertical, one for horizontal movement. -/datum/global_iterator/space_ship_inertial_movement - delay = 1 - var/min_delay = 0 - var/max_delay = 15 - var/desired_delay - var/cur_delay - var/last_move - - New() - ..() - desired_delay = max_delay - cur_delay = max_delay - - stop() - src.cur_delay = max_delay - src.desired_delay = max_delay - return ..() - - process(var/obj/machinery/vehicle/space_ship/SS as obj) - if(cur_delay >= max_delay) - return src.stop() - if(world.time - last_move < cur_delay) - return - last_move = world.time -/* - if(src.delay>=SS.max_delay) - return src.stop() -*/ - if(!step(SS, SS.dir) || !SS.inspace()) - src.stop() - return - - proc/set_desired_delay(var/num as num) - src.desired_delay = num - return - -/datum/global_iterator/space_ship_speed_increment - delay = 5 - - process(var/obj/machinery/vehicle/space_ship/SS as obj) - if(SS.pr_inertial_movement.desired_delay!=SS.pr_inertial_movement.cur_delay) - var/delta = SS.pr_inertial_movement.desired_delay - SS.pr_inertial_movement.cur_delay - SS.pr_inertial_movement.cur_delay += delta>0?1:-1 -/* - for(var/mob/M in SS) - M << "Current speed: [SS.get_current_speed()]" -*/ - else - src.stop() - return diff --git a/html/changelog.html b/html/changelog.html index b534169136d..ceb98702291 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -61,6 +61,9 @@ should be listed in the changelog upon commit though. Thanks. -->

updated:

  • Voice changers no longer use ID cards. They have Toggle and Set Voice verbs on the actual mask object now.
  • +

    Zuhayr updated:

    +
      +
    • Readded moonwalking. Alt-dir to face new dir, or Face-Direction verb to face current dir.
    diff --git a/icons/atmos/heat.dmi b/icons/atmos/heat.dmi index 6d1ed47e7ef..1014c2015b0 100644 Binary files a/icons/atmos/heat.dmi and b/icons/atmos/heat.dmi differ diff --git a/icons/atmos/junction.dmi b/icons/atmos/junction.dmi index 70286bde155..892f5823f2e 100644 Binary files a/icons/atmos/junction.dmi and b/icons/atmos/junction.dmi differ diff --git a/icons/mob/AI.dmi b/icons/mob/AI.dmi index 4525fea606a..0653f3b482e 100644 Binary files a/icons/mob/AI.dmi and b/icons/mob/AI.dmi differ diff --git a/icons/mob/OnFire.dmi b/icons/mob/OnFire.dmi new file mode 100644 index 00000000000..8bf6e2c7749 Binary files /dev/null and b/icons/mob/OnFire.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index b3a24f07c71..c66d9cceba1 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 9d7c3845d9c..b70af9c656e 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index 6155e0994c8..c6183f6ff58 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index ffc7169614d..2ac56359324 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index a899995b256..2aba03d2664 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index 43f9eb909bf..c57f93464da 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/icons/obj/pipe-item.dmi b/icons/obj/pipe-item.dmi index 2fa39fec047..1ad833316d1 100644 Binary files a/icons/obj/pipe-item.dmi and b/icons/obj/pipe-item.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 92b3aed2b9f..ffad059da43 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/icons/obj/xenoarchaeology.dmi b/icons/obj/xenoarchaeology.dmi index b40ae3db6e3..5aacb992344 100644 Binary files a/icons/obj/xenoarchaeology.dmi and b/icons/obj/xenoarchaeology.dmi differ diff --git a/interface/skin.dmf b/interface/skin.dmf index 330d547944d..8eee4e18175 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -23,6 +23,10 @@ macro "macro" name = "NORTHWEST" command = ".northwest" is-disabled = false + elem + name = "ALT+WEST" + command = "westfaceperm" + is-disabled = false elem name = "CTRL+WEST" command = "westface" @@ -31,6 +35,10 @@ macro "macro" name = "WEST+REP" command = ".west" is-disabled = false + elem + name = "ALT+NORTH" + command = "northfaceperm" + is-disabled = false elem name = "CTRL+NORTH" command = "northface" @@ -39,6 +47,10 @@ macro "macro" name = "NORTH+REP" command = ".north" is-disabled = false + elem + name = "ALT+EAST" + command = "eastfaceperm" + is-disabled = false elem name = "CTRL+EAST" command = "eastface" @@ -47,6 +59,10 @@ macro "macro" name = "EAST+REP" command = ".east" is-disabled = false + elem + name = "ALT+SOUTH" + command = "southfaceperm" + is-disabled = false elem name = "CTRL+SOUTH" command = "southface" diff --git a/maps/exodus-1.dmm b/maps/exodus-1.dmm index e5e24965a18..a8252f6e3b3 100644 --- a/maps/exodus-1.dmm +++ b/maps/exodus-1.dmm @@ -1147,7 +1147,7 @@ "awc" = (/obj/structure/table,/obj/item/weapon/storage/box/donkpockets,/obj/item/weapon/storage/box/donkpockets{pixel_x = -3; pixel_y = -3},/turf/simulated/floor,/area/security/prison) "awd" = (/obj/structure/table,/obj/item/weapon/minihoe,/obj/item/device/analyzer/plant_analyzer,/obj/item/clothing/head/greenbandana,/turf/simulated/floor,/area/security/prison) "awe" = (/obj/machinery/vending/hydronutrients,/turf/simulated/floor,/area/security/prison) -"awf" = (/obj/machinery/vending/hydroseeds,/turf/simulated/floor,/area/security/prison) +"awf" = (/obj/machinery/seed_storage/garden,/turf/simulated/floor,/area/hydroponics) "awg" = (/obj/structure/table,/obj/structure/bedsheetbin,/turf/simulated/floor,/area/security/prison) "awh" = (/obj/structure/closet{name = "Prisoner's Locker"},/obj/item/clothing/head/soft/orange,/obj/item/clothing/shoes/sandal,/turf/simulated/floor,/area/security/prison) "awi" = (/obj/machinery/light,/obj/structure/stool/bed,/obj/item/weapon/bedsheet/orange,/turf/simulated/floor,/area/security/prison) @@ -2198,7 +2198,7 @@ "aQn" = (/turf/simulated/floor,/area/hydroponics) "aQo" = (/obj/structure/disposalpipe/segment,/obj/machinery/hologram/holopad,/turf/simulated/floor{icon_state = "green"; dir = 4},/area/hydroponics) "aQp" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/hydroponics) -"aQq" = (/obj/machinery/vending/hydroseeds,/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics) +"aQq" = (/obj/machinery/seed_storage/garden,/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics) "aQr" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor,/area/hydroponics) "aQs" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor,/area/hydroponics) "aQt" = (/obj/machinery/light_switch{pixel_x = 27},/turf/simulated/floor{icon_state = "green"; dir = 4},/area/hydroponics) @@ -2262,7 +2262,7 @@ "aRz" = (/obj/machinery/biogenerator,/turf/simulated/floor,/area/hydroponics) "aRA" = (/obj/machinery/seed_extractor,/turf/simulated/floor,/area/hydroponics) "aRB" = (/obj/machinery/vending/hydronutrients,/turf/simulated/floor,/area/hydroponics) -"aRC" = (/obj/machinery/vending/hydroseeds,/turf/simulated/floor,/area/hydroponics) +"aRC" = (/obj/machinery/seed_storage/garden,/turf/simulated/floor,/area/security/prison) "aRD" = (/obj/structure/disposalpipe/trunk{dir = 1},/obj/machinery/disposal,/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -29},/turf/simulated/floor{icon_state = "green"; dir = 4},/area/hydroponics) "aRE" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/hydroponics) "aRF" = (/obj/machinery/vending/hydronutrients,/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics) @@ -5675,7 +5675,7 @@ "cfg" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24},/obj/structure/disposalpipe/trunk,/obj/machinery/disposal,/obj/structure/sign/deathsposal{pixel_x = 0; pixel_y = 32},/obj/structure/cable/green{d2 = 2; icon_state = "0-2"},/turf/simulated/floor{dir = 8; icon_state = "whitegreen"},/area/rnd/xenobiology/xenoflora) "cfh" = (/obj/machinery/atmospherics/portables_connector,/obj/machinery/portable_atmospherics/hydroponics{closed_system = 1; name = "isolation tray"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology/xenoflora) "cfi" = (/obj/machinery/light{tag = "icon-tube1 (NORTH)"; icon_state = "tube1"; dir = 1},/obj/machinery/light_switch{pixel_x = -6; pixel_y = 26},/obj/machinery/atmospherics/portables_connector,/turf/simulated/floor{dir = 4; icon_state = "whitegreen"},/area/rnd/xenobiology/xenoflora) -"cfj" = (/obj/machinery/vending/hydroseeds,/turf/simulated/floor{icon_state = "hydrofloor"},/area/rnd/xenobiology/xenoflora) +"cfj" = (/obj/machinery/seed_storage/xenobotany,/turf/simulated/floor{icon_state = "hydrofloor"},/area/rnd/xenobiology/xenoflora) "cfk" = (/obj/machinery/vending/hydronutrients,/turf/simulated/floor{icon_state = "hydrofloor"},/area/rnd/xenobiology/xenoflora) "cfl" = (/obj/machinery/light{tag = "icon-tube1 (NORTH)"; icon_state = "tube1"; dir = 1},/obj/machinery/firealarm{dir = 2; pixel_y = 24},/obj/structure/table,/obj/item/weapon/storage/box/botanydisk,/turf/simulated/floor{dir = 8; icon_state = "whitegreen"},/area/rnd/xenobiology/xenoflora) "cfm" = (/obj/machinery/botany/editor,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology/xenoflora) @@ -7330,7 +7330,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatkatlatmaaaatnatoatpaaaaafatqatratqaaaaaaaaaaaaaaaaaaaaaaamaaaaaaaaaaafaaaaaaaaaalkaaaaaaaaaaafaaaaaaaaaaamaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaanXatsattagDagDagDagWagWagWagWalWalWalWalWalWatuaonaoratvaqEatwalWalWalWatxatxatxarAatyatzatAarEatBasZasZasZasZatCatDatEatFatGatHatIatJatKatLatMatNatOatPatPatPatPatPatPatPatPatQatRatRatRatRatRatQatPaaaaaaaaaaaIaafanTanTanTanTanTaafalJaafanTanTanTanTanTaafaaIaaaaaaaaaaaaaaaaaaaaaaaaaaaahzahzahzahzahzaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatSatTatUatTatSatVatWatVatSaafatqatXatYaaaaaaaaaaaaaaaaaaaaaaaIaafanVanVanVanVanVaafalkaafanVanVanVanVanVaafaaIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafatZauaanYaubaucanXaafaafalWaudaueaufaugauhauiaonapnaonasJaqEaujaukaulaumaunauoauparAauqaurausarEatBasZaAfaySauvatCauxauyatFatGauzauAauBauCauDatMatNauEauFauGauHauIauJauwauLatPauMatRatRatRatRatRatQatPaafaaaaaaaamaafanianjanjanjanjanualJansanqanqanqanqanwaafaaIaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauNatTauOatTauNatVauPatVauNauQauRauSauTauUauUauVauQauQaafaaaaaIaafalzalyalyalyalyalAalkallaivaivaivaivagEaafaaIaaaaaaaaaaaaaaaaaaaaaaaaanXanXanXauWanXanXapbaucanXaaaaaaalWauXalWauYauZavaalWavbavcaonavdaveaveavfavgaveavhaviavjarAavkauravlarEatBasZawoavoawpatCawravqatFatGauzauAavravsavtatMatNavuavvauGauHauHauJavwavxavyavzatRatRatRatRatRavAatPatPatPaaaaamaaaapIapIapIapIapIaafalJaafapIapIapIapIapIaaaaaqaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauNavBavCavDauNavEavFavGauNavHavIavJavKavLavMavNavOauQaaaaaaaaqaaaapJapJapJapJapJaafbeSaafapJapJapJapJapJaaaaaIaaaaaaaaaaaaaaaaaaaaaaaaavQavRavSavTavUavVavWavXanXaaaaaaalWalWalWavYavZawaalWawbawcawdaweawfawgaukawhawiautawkawlarAawmaurawnarEatBasZawXawUawYaxaaxbawZatFatFatFawsawtawuatFatFatNawvawwauGauHauHauJawxawyawzawAatRatRatRatRatRawBawCawDawEaaaaamaaaaafaaaaafaafaaaaaabepaaaaaaaafaaaaaaaafaaaaaIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauNavBavCavDauNavEavFavGauNavHavIavJavKavLavMavNavOauQaaaaaaaaqaaaapJapJapJapJapJaafbeSaafapJapJapJapJapJaaaaaIaaaaaaaaaaaaaaaaaaaaaaaaavQavRavSavTavUavVavWavXanXaaaaaaalWalWalWavYavZawaalWawbawcawdaweaRCawgaukawhawiautawkawlarAawmaurawnarEatBasZawXawUawYaxaaxbawZatFatFatFawsawtawuatFatFatNawvawwauGauHauHauJawxawyawzawAatRatRatRatRatRawBawCawDawEaaaaamaaaaafaaaaafaafaaaaaabepaaaaaaaafaaaaaaaafaaaaaIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauNawGawHawIauNawGawHawIauNawJavHavHavHavHavHavHavHasAaaaaaaaaIaaaaafaaaaafaafaaaaaabfxaaaaaaaafaaaaaaaafaaaaaIaafaaaaaaaafaafaaaaaaaafawPavRawQawRavUawSaucawTanXaafaaLcqTatxatxatxatxatxatxatxatxatxatxatxatxatxatxatxatxatxatxarAawVaurawWarEatBasZauKaxjavmatCaxVavnaxdaxcaxfaxeaxhaxgaxhaxiaxkaxlaxmaxnaxoaxoaxnaxpaxqaxraxsatRatRatRatRatRaxsaxtaxuaxvaaaaamaamaaIaaaaaaaafaaaaaaabpaaaaafaafaafaafaaIaaIaaIaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaatSauNaxwaxxatSauNaxyaxxatSauNawMauNauNauNauNauNavHatqaaaaaaaaIaaIaaIaaaaaaaafaaaaxBaxCaxBaafaafaafaafaaIaaIaaIaafanXanXanXanXaxDaxEaxEaxFanXanXanXanXaxGaucaucanXaxHaxIanXanXaxJaxKaxLaxMaxMaxMaxMaxMaxMaxMaxMaxNaxMaxMaxMaxMaxMaxOaxPaxQaxRaxOavpasZaxSawjcfSatCaxVaxXaxXaxXaxZaxYayaaybaxXavqaydayeayfaygayhayhayhayiavxayjaykatRatRatRatRatRaykaylaxuaxvaaaaaaaaaaafaafaaaaafaaaaaabfyaaaaaaaafaaaaaaaafaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaynayoaypayoayqayoayrayoaysaytayvayvayvayvaywauNawNatqaaaaafaafaaaaaaaaaaaaaafaaaayyayzayAaafaaaaafaaaaaaaaaaaaaaaanXayBayCayDayCayCayCayCayEayCayCayFayGayDayHayIaxMaxMaxMaxMaxMaxMayJayKayLayLayLayLayMayLayLayNayLayMayLayLayLarAayOayPayQarEaAiasZcfSaycaxUatCayUayTayWayVayYayXayYayZayTazaazbazcazdazeazdazdazfazgazhaziazjatRatRatRatRatRazkazlazmaznaaaaaaaaaaaaaafaaaaafaaaazoazpazoaaaaafaaaaaaaafaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -7346,7 +7346,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaaaaaaaaaaaaaaaaLyaLzaDJaFkaFlaFlaFlaLAaFlaFlaLBaFlaFlaFraLCaLDaDPaLEaLFaLGaLHaLGaLGaLGaLGaLGaLIaLJaFCaFCaFCaFCaFCaFCaLLaLMaLNaLOaLOaLOaLOaLPaLQaLRaKuaLSaLTaLTaLUaLVaLWaLTaLTaLXaKuaLYaKuaKuaLZaMaaLZaJeaJeaMbaMcaJeaJeaJeaJeaMdaMeaMfaMgaMhaMiaJeaJeaJeaJeaMjaKNaMkaMkaMlaMmaMnaMoaJlaMpaMqaMraJlaJlaJlaJlaJlaJlaJlaJlaBjaBjaMsaMtaMuaMvaMwaMxaMyaMzaKZaMAaMBaMCaMCaMDaLfaMEaMFaMGaMHaMIaMJaMKaMLaMMaMNaMHaMJaMIaMHaMOaLfaGraIgaMPaMQaMRaMSaMTaMUaIgaMVaMWaMXaMYaMZaNaaNbaGFaGGaNcaJVaIoaNdaNeaNfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaaaaaaaaaaaaaaaaaaaaaaaaaaaaLyaDJaDKaDJaDJaDLaDMaDJaDJaDKaLzaNgaBIaNhaLEaNiaNjaNjaNkaNjaNlaIAaNmaNnaLJaNoaNpaNqaNraNsaNtaNraNuaNraNraNraNvaNraNraNwaNxaNyaNzaNAaNBaNzaNCaNzaNzaNzaNzaNDaNEaNFaNGaNraNHaNIaNJaNKaNLaNMaNLaNNaNOaNPaNQaNQaNRaNSaNTaNSaNUaNVaNWaEGaNYaNZaOaaObaOcaMkaMkaMkaOdaOeaOfaOgaOhaOiaOjaOkaOlaOmaOnaJlaOoaOpaOqaOraOsaOtaOuaOvaOwaOxaKZaOyaOzaOAaOAaOBaLfaOCaODaOEaOEaOEaOEaOFaOGaOHaOIaOJaOKaOKaOLaOMaLfaGraIgaONaOOaOPaOQaONaONaIgaORaOSaGFaOTaOUaOVaOWaGFaIoaIoaJVaIoaGGaGGaGGaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaOXaOYaOZaPaaPaaPaaPaaPbaOYaOXaaaaBIaPcaPdaPeaPfaPgaPhaPhaPiaIAaPjaNnaPkaPlaPmaPnaPoaPpaPqaPqaPraPsaPsaPsaPtaPuaPuaPvaPwaNIaPqaPqaPxaPyaPzaPAaPBaPBaPCaPBaPDaPyaPyaPyaPEaPFaPGaPHaMkaPIaPJaPJaPJaPJaPJaPJaPJaPJaPKaPJaPLaPMaPNaPOaPPaPQaPRaPSaPTaPJaPUaPJaPVaPWaPXaPWaPWaPWaPWaPWaPWaPYaPZaRsaQbaQbaQbaQcaQbaQbaQdaQeaQfaQgaKZaQhaMCaQiaQjaQkaLfaQlaQmaQnaQnaQnaQnaQnaQoaQpaQqaQraQnaQnaQsaQtaLfaGraIgaQuaONaONaQvaONaQwaIgaGFaGFaGFaGFaGFaGFaQxaGFaIoaIoaJVaIoaQyaQzaGGaaaaafaaaaaaaaaaaaaaaaaaaaaaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaaaaaaaaaaaaaaaaafaBIawqaBIaQBaQCaGOaQDaQEaQFaQGaGOaQCaQHaQIaBIaQJaLEaPeaQKaQLaPhaPhaPiaIAaQMaNnaLJaQNaNpaQOaQPaNraNraQQaQRaQSaQTaNraQUaQVaQWaQVaQXaQYaQVaQVaQZaQVaQVaRaaRbaQVaRcaQVaRdaNraNraNraReaPFaPGaPHaMkaRfaMkaRgaRgaRgaRgaRgaRgaRgaRgaRhaRiaRgaRjaRgaRgaRkaRgaRgaRgaRgaRlaRmaRnaRoaRoaRoaRoaRoaRoaRoaRpaRqaRpaJlaImawOawOawOawOawOaItaRuaRvaRwaKZaKZaKZaKZaKZaRxaLfaRyaQmaQnaRzaRAaRBaRCaRDaREaRFaQraRGaRHaRIaRJaLfaGraIgaRKaRKaRLaRMaRNaRNaROaIgaRPaRQaRRaGGaRSaRTaRUaRVaRVaRWaRXaGGaRYaGGaRZaRZaRZaSaaSbaScaaaaaaaaaaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaaaaaaaaaaaaaaaaafaBIawqaBIaQBaQCaGOaQDaQEaQFaQGaGOaQCaQHaQIaBIaQJaLEaPeaQKaQLaPhaPhaPiaIAaQMaNnaLJaQNaNpaQOaQPaNraNraQQaQRaQSaQTaNraQUaQVaQWaQVaQXaQYaQVaQVaQZaQVaQVaRaaRbaQVaRcaQVaRdaNraNraNraReaPFaPGaPHaMkaRfaMkaRgaRgaRgaRgaRgaRgaRgaRgaRhaRiaRgaRjaRgaRgaRkaRgaRgaRgaRgaRlaRmaRnaRoaRoaRoaRoaRoaRoaRoaRpaRqaRpaJlaImawOawOawOawOawOaItaRuaRvaRwaKZaKZaKZaKZaKZaRxaLfaRyaQmaQnaRzaRAaRBawfaRDaREaRFaQraRGaRHaRIaRJaLfaGraIgaRKaRKaRLaRMaRNaRNaROaIgaRPaRQaRRaGGaRSaRTaRUaRVaRVaRWaRXaGGaRYaGGaRZaRZaRZaSaaSbaScaaaaaaaaaaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaGeaGgaGgaGiaGfaGhaSdaOYaLDaDPaHxaHxaSfaLDaOYaLDaHyaHAaHzaLEaSkaSlaSlaNkaSlaNlaIAaSmaNnaSnaIAaLKaLKaSoaLKaLKaLKaLKaLKaLKaSpaSqaLKaLKaLKaLKaLKaLKaSraSsaSraLKaStaLKaNraQPaSuaSvaSwaSxaNraSyaLKaMbaMbaMkaSzaKOaSAaMnaMnaSBaSBaSBaSBaSCaJeasfasNarVarXarXavParXarXarVasNawFaJeaSJaSKaSKaSKaSKaSLaSLaSMaSNaRqaRpaJlaSOaSPaSPaSPaSPaSPaSPaSQaSRaSSaSTaSUaSVaSWaSXaSYaKZaKZaSZaTaaTbaTcaTdaTeaTeaTeaTfaTgaTfaTeaTeaTeaTeaGraIgaThaONaRLaRMaONaONaTiaIgaTjaTkaTlaGGaIoaTmaTnaToaTpaTqaIoaTraTsaGGaTtaTuaRZaTvaTwaTxaafaaaaaaaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaIvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaKQaNXaLmaKMaQAaSgaSeaSiaShaSjaSiaTzaTyaTBaTAaTEaTCaTAaTFcozaTIaTJaTKaTLaTLaTLaTMaTLaTNaTOaIAaTPaTQaTRaTSaTTaTUaTVaTWaTXaTUaTYaTZaUaaUbaUcaUdaUeaUfaUgaUhaUeaUiaLKaLKaUjaLKaLKaLKaLKaUkaUlaLKaUmaMbaUnaSzaKOaUoaaaaaaaaaaaaaaaaaaaaaaUpaUqaUraUsaUtaUvaUuaUxaUwaUzaUyaVUaUpaaaaaaaaaaaaaaaaaaaaaaUAaSNaRqaUBaUCaUDaUEaUFaUFaUFaUFaUGaUHaUIaUFaUFaUFaUJaUKaULaUMaUNaUOaUPaUQaURaUSaUTaTfaUUaUVaUWaUXaUYaUZaVaaVbaTeaGraIgaVcaVcaRLaRMaVdaVdaVeaIgaIgaVfaIgaGGaVgaVhaViaViaViaVjaVkaGGaGGaGGaVlaVmaVnaVoaVpaVqaafaafaaaaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaTDaKQcmVaVrclfaDPaVsaVsaVtaVsaVsaVsaVDaVsaVsaVtaVsaVsaYEaWYaVuaVvaKdaKdaKdaKdaKdaVwaVxaVyaVzaIAaTQaTQaVAaTSaVBaTUaTUaTUaTUaTUaTYaVCaTUaTUaTUaUdaUeclraVEaVFaUeaUiaVGaVHaKeaKcaVKaUmaVLaVMaVNaVOaVPaVQaMkaSzaKOaUoaaaaaaaaaaaaaUpaUpaUpaUpaVRaVSaVTaXEaVVaVWaVXaXFaVZaWaaWbaUpaUpaUpaUpaaaaaaaaaaaaaUAaSNaRqaRpaWcaSSaWdaWeaWfaSSaWgaWhaWiaWjaWkaWlaWmaWnaQbaWoaWpaWqaWraWsaWtaWtaWuaWvaWwaWxaWyaWzaWAaWBaWCaWDaWEaTeaGraIgaThaONaRLaRMaONaONaONaWFaWGaONaWHaGGaWIaWJaToaToaToaTqaIoaYsaGGaQaaVoaLuaWQaVoaWRaWSaWTaWTaWUaIuaIuaIuaIuaIuaIuaIuaIuaIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa