mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge remote-tracking branch 'upstream/dev' into supply
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
|
||||
if(target && target.buckled)
|
||||
target.buckled.unbuckle()
|
||||
target.buckled.unbuckle_mob()
|
||||
|
||||
var/list/tempL = L
|
||||
var/attempt = null
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -696,6 +696,10 @@ siphoning
|
||||
if(data["scrubbing"])
|
||||
sensor_data += {"
|
||||
<B>Filtering:</B>
|
||||
Oxygen
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=o2_scrub;val=[!data["filter_o2"]]'>[data["filter_o2"]?"on":"off"]</A>;
|
||||
Nitrogen
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=n2_scrub;val=[!data["filter_n2"]]'>[data["filter_n2"]?"on":"off"]</A>;
|
||||
Carbon Dioxide
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
||||
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",
|
||||
|
||||
@@ -168,6 +168,12 @@
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "\blue You connect the monitor."
|
||||
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)
|
||||
@@ -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 <b>ERROR</b>: \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 <font color=\"#ff0000\">not available</font> for latejoining AIs."
|
||||
else
|
||||
empty_playable_ai_cores += D
|
||||
src << "\The [id] is now <font color=\"#008000\">available</font> for latejoining AIs."
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
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
|
||||
|
||||
@@ -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 <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
|
||||
occupant = M
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -370,7 +376,7 @@ Buildable meters
|
||||
return flip|cw|acw
|
||||
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
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<A href='?src=\ref[src];make=20;dir=1'>Pipe Cap</A><BR>
|
||||
<A href='?src=\ref[src];make=19;dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=18;dir=1'>Manual T-Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=43;dir=1'>Manual T-Valve - Mirrored</A><BR>
|
||||
<A href='?src=\ref[src];make=21;dir=1'>Upward Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=22;dir=1'>Downward Pipe</A><BR>
|
||||
<b>Supply pipes:</b><BR>
|
||||
|
||||
@@ -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()
|
||||
|
||||
86
code/game/objects/buckling.dm
Normal file
86
code/game/objects/buckling.dm
Normal file
@@ -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 << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
|
||||
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 << "<span class='warning'>The [M] is too squishy to buckle in.</span>"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
unbuckle_mob()
|
||||
|
||||
if(buckle_mob(M))
|
||||
if(M == user)
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
|
||||
"<span class='notice'>You buckle yourself to [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
|
||||
/obj/proc/user_unbuckle_mob(mob/user)
|
||||
var/mob/living/M = unbuckle_mob()
|
||||
world << 3
|
||||
if(M)
|
||||
if(M != user)
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] was unbuckled by [user.name]!</span>",\
|
||||
"<span class='notice'>You were unbuckled from [src] by [user.name].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] unbuckled themselves!</span>",\
|
||||
"<span class='notice'>You unbuckle yourself from [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
add_fingerprint(user)
|
||||
return M
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
return
|
||||
|
||||
if(user && user.buckled)
|
||||
user.buckled.unbuckle()
|
||||
user.buckled.unbuckle_mob()
|
||||
|
||||
var/list/tempL = L
|
||||
var/attempt = null
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
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)
|
||||
|
||||
@@ -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(\
|
||||
"<span class='notice'>[M] climbs onto the [callme]!</span>",\
|
||||
"<span class='notice'>You climb onto the [callme]!</span>")
|
||||
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()
|
||||
|
||||
@@ -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 @@
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
/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"
|
||||
..()
|
||||
return
|
||||
|
||||
/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
|
||||
else
|
||||
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)
|
||||
..()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -153,3 +153,10 @@
|
||||
var/icon/earbit2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner2")
|
||||
mob.Blend(earbit, ICON_OVERLAY)
|
||||
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
|
||||
@@ -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."
|
||||
|
||||
256
code/modules/hydroponics/seed_storage.dm
Normal file
256
code/modules/hydroponics/seed_storage.dm
Normal file
@@ -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 = "<center><h1>Seed storage contents</h1></center>"
|
||||
if (piles.len == 0)
|
||||
dat += "<font color='red'>No seeds</font>"
|
||||
else
|
||||
dat += "<table style='text-align:center;'><tr><td>Name</td>"
|
||||
dat += "<td>Variety</td>"
|
||||
if ("stats" in scanner)
|
||||
dat += "<td>E</td><td>Y</td><td>L</td><td>M</td><td>Pr</td><td>Pt</td><td>Harvest</td>"
|
||||
if ("produce" in scanner)
|
||||
dat += "<td>Produce</td>"
|
||||
if ("temperature" in scanner)
|
||||
dat += "<td>Temp</td>"
|
||||
if ("light" in scanner)
|
||||
dat += "<td>Light</td>"
|
||||
if ("soil" in scanner)
|
||||
dat += "<td>Nutri</td><td>Water</td>"
|
||||
dat += "<td>Notes</td><td>Amount</td><td></td></tr>"
|
||||
for (var/datum/seed_pile/S in piles)
|
||||
var/datum/seed/seed = S.seed_type
|
||||
dat += "<tr>"
|
||||
dat += "<td>[S.name]</td>"
|
||||
dat += "<td>#[seed.uid]</td>"
|
||||
if ("stats" in scanner)
|
||||
dat += "<td>[seed.endurance]</td><td>[seed.yield]</td><td>[seed.lifespan]</td><td>[seed.maturation]</td><td>[seed.production]</td><td>[seed.potency]</td>"
|
||||
if(seed.harvest_repeat)
|
||||
dat += "<td>Multiple</td>"
|
||||
else
|
||||
dat += "<td>Single</td>"
|
||||
if ("produce" in scanner)
|
||||
if (seed.products && seed.products.len)
|
||||
dat += "<td>Fruit: [seed.products.len]</td>"
|
||||
else
|
||||
dat += "<td>N/A</td>"
|
||||
if ("temperature" in scanner)
|
||||
dat += "<td>[seed.ideal_heat] K</td>"
|
||||
if ("light" in scanner)
|
||||
dat += "<td>[seed.ideal_light] L</td>"
|
||||
if ("soil" in scanner)
|
||||
if(seed.requires_nutrients)
|
||||
if(seed.nutrient_consumption < 0.05)
|
||||
dat += "<td>Low</td>"
|
||||
else if(seed.nutrient_consumption > 0.2)
|
||||
dat += "<td>High</td>"
|
||||
else
|
||||
dat += "<td>Norm</td>"
|
||||
else
|
||||
dat += "<td>No</td>"
|
||||
if(seed.requires_water)
|
||||
if(seed.water_consumption < 1)
|
||||
dat += "<td>Low</td>"
|
||||
else if(seed.water_consumption > 5)
|
||||
dat += "<td>High</td>"
|
||||
else
|
||||
dat += "<td>Norm</td>"
|
||||
else
|
||||
dat += "<td>No</td>"
|
||||
|
||||
dat += "<td>"
|
||||
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 += "<font color='red'>CARN </font>"
|
||||
switch(seed.spread)
|
||||
if(1)
|
||||
dat += "VINE "
|
||||
if(2)
|
||||
dat += "<font color='red'>VINE </font>"
|
||||
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 += "<br>[seed.flower_colour ? "<font color='[seed.flower_colour]'>FLOW</font>" : "FLOW"]."
|
||||
dat += "</td>"
|
||||
dat += "<td>[S.amount]</td>"
|
||||
dat += "<td><a href='byond://?src=\ref[src];task=vend;id=[S.ID]'>Vend</a> <a href='byond://?src=\ref[src];task=purge;id=[S.ID]'>Purge</a></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
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 << "<span class='notice'>There are no seeds in \the [O.name].</span>"
|
||||
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
|
||||
@@ -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(\
|
||||
"<span class='notice'>[user.name] frees [buckled_mob.name] from [src].</span>",\
|
||||
"<span class='notice'>[user.name] frees you from [src].</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[buckled_mob.name] struggles free of [src].</span>",\
|
||||
"<span class='notice'>You untangle [src] from around yourself.</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
unbuckle()
|
||||
else
|
||||
var/text = pick("rips","tears","pulls")
|
||||
user.visible_message(\
|
||||
"<span class='notice'>[user.name] [text] at [src].</span>",\
|
||||
"<span class='notice'>You [text] at [src].</span>",\
|
||||
"<span class='warning'>You hear shredding and ripping.</span>")
|
||||
return
|
||||
user_unbuckle_mob(user)
|
||||
|
||||
/obj/effect/plantsegment/proc/grow()
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
|
||||
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 << "<span class='notice'>The crate unlocks!</span>"
|
||||
locked = 0
|
||||
overlays.Cut()
|
||||
overlays += greenlight
|
||||
else if (input == null || input > max || input < min)
|
||||
else if (input == null || length(input) != codelen)
|
||||
user << "<span class='notice'>You leave the crate alone.</span>"
|
||||
else
|
||||
user << "<span class='warning'>A red light flashes.</span>"
|
||||
@@ -96,19 +177,26 @@
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
user << "<span class='notice'>The crate unlocks!</span>"
|
||||
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 << "<span class='notice'>DECA-CODE LOCK REPORT:</span>"
|
||||
if (attempts == 1)
|
||||
user << "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>"
|
||||
else
|
||||
user << "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>"
|
||||
if (lastattempt == null)
|
||||
user << "<span class='notice'> has been made to open the crate thus far.</span>"
|
||||
return
|
||||
// hot and cold
|
||||
if (code > lastattempt)
|
||||
user << "<span class='notice'>* Last access attempt lower than expected code.</span>"
|
||||
else
|
||||
user << "<span class='notice'>* Last access attempt higher than expected code.</span>"
|
||||
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 << "<span class='notice'>Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
|
||||
else ..()
|
||||
else ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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("<b>\The [src.name]</b> [deathmessage]")
|
||||
|
||||
|
||||
@@ -124,18 +124,28 @@
|
||||
var/changed_voice
|
||||
|
||||
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
|
||||
part_a = "<span class='say_quote'>\[[worldtime2text()]\]</span>" + part_a
|
||||
var/jobname // the mob's "job"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>You don't have anything in your right hand to give to [target.name]</span>"
|
||||
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 << "<span class='warning'>You don't have anything in your left hand to give to [target.name]</span>"
|
||||
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 << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
|
||||
target << "<span class='warning'>[usr.name] moved too far away.</span>"
|
||||
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 << "<span class='warning'>You need to keep the item in your active hand.</span>"
|
||||
target << "<span class='warning'>[usr.name] seem to have given up on giving \the [I.name] to you.</span>"
|
||||
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 << "<span class='warning'>Your hands are full.</span>"
|
||||
usr << "<span class='warning'>Their hands are full.</span>"
|
||||
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("<span class='notice'>[usr.name] handed \the [I.name] to [target.name].</span>")
|
||||
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("<span class='warning'>[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
|
||||
else
|
||||
usr << "\red [src.name]'s hands are full."
|
||||
usr << "<span class='warning'>[target.name]'s hands are full.</span>"
|
||||
|
||||
@@ -131,6 +131,10 @@
|
||||
else
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] handcuffed!</span>\n"
|
||||
|
||||
//buckled
|
||||
if(buckled)
|
||||
msg += "<span class='warning'>[t_He] [t_is] \icon[buckled] buckled to [buckled]!</span>\n"
|
||||
|
||||
//belt
|
||||
if(belt)
|
||||
if(belt.blood_DNA)
|
||||
@@ -219,7 +223,10 @@
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
|
||||
else
|
||||
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
|
||||
|
||||
if(fire_stacks)
|
||||
msg += "[t_He] [t_is] covered in some liquid.\n"
|
||||
if(on_fire)
|
||||
msg += "<span class='warning'>[t_He] [t_is] on fire!.</span>\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(nutrition < 100)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,6 +601,7 @@
|
||||
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))
|
||||
|
||||
@@ -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 << "<span class='notice'>You're in too much pain to keep going...</span>"
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.", 1)
|
||||
src.visible_message("<B>[src]</B> 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
|
||||
|
||||
@@ -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")])"
|
||||
|
||||
@@ -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 << "<span class='danger'>[pick(cold_discomfort_strings)]</span>"
|
||||
if("heat")
|
||||
if(covered)
|
||||
H << "<span class='danger'>[pick(heat_discomfort_strings)]</span>"
|
||||
|
||||
/datum/species/proc/get_random_name(var/gender)
|
||||
var/datum/language/species_language = all_languages[language]
|
||||
return species_language.get_random_name(gender)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 <B>[usr] manages to unbuckle themself!</B>", 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("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
|
||||
"<span class='notice'>You stop, drop, and roll!</span>")
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0)
|
||||
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
|
||||
"<span class='notice'>You extinguish yourself.</span>")
|
||||
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
|
||||
@@ -842,3 +858,21 @@
|
||||
|
||||
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
|
||||
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
|
||||
|
||||
@@ -191,3 +191,52 @@
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
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)
|
||||
|
||||
@@ -39,3 +39,5 @@
|
||||
var/update_slimes = 1
|
||||
var/silent = null // Can't talk. Value goes down every life proc.
|
||||
var/mob_size // Used by lockers.
|
||||
var/on_fire = 0 //The "Are we on fire?" var
|
||||
var/fire_stacks
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
44
code/modules/mob/living/silicon/ai/latejoin.dm
Normal file
44
code/modules/mob/living/silicon/ai/latejoin.dm
Normal file
@@ -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 << "<span class='danger'>You cannot use this verb in malfunction. If you need to leave, please adminhelp.</span>"
|
||||
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)
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,17 +88,18 @@
|
||||
else
|
||||
O.key = key
|
||||
|
||||
if(move)
|
||||
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)
|
||||
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)
|
||||
if((locate(/mob/living) in tripai.loc) || (locate(/obj/structure/AIcore) in tripai.loc))
|
||||
continue
|
||||
loc_landmark = tripai
|
||||
if (!loc_landmark)
|
||||
@@ -116,9 +117,9 @@
|
||||
O.add_ai_verbs()
|
||||
|
||||
O.rename_self("ai",1)
|
||||
. = O
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
return O
|
||||
|
||||
//human -> robot
|
||||
/mob/living/carbon/human/proc/Robotize()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -353,6 +353,9 @@ datum
|
||||
if(C.result)
|
||||
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 = "<center><b>[station_name()] Science Laboratories</b>"
|
||||
PR.info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
|
||||
PR.info += "<i>report prepared at [worldtime2text()] station time</i></center><br>"
|
||||
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 += "<UL>"
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
dat += "<LI>"
|
||||
dat += "[T.name]"
|
||||
dat += "<UL>"
|
||||
dat += "<LI>Level: [T.level]"
|
||||
dat += "<LI>Summary: [T.desc]"
|
||||
dat += "</UL>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/GetResearchListInfo()
|
||||
var/dat
|
||||
dat += "<UL>"
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_path)
|
||||
dat += "<LI><B>[D.name]</B>: [D.desc]"
|
||||
dat += "</UL>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
@@ -570,6 +607,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(0.4)
|
||||
dat += "Imprinting Circuit. Please Wait..."
|
||||
|
||||
if(0.5)
|
||||
dat += "Printing Research Information. Please Wait..."
|
||||
|
||||
if(1.0) //Main Menu
|
||||
dat += "Main Menu:<BR><BR>"
|
||||
dat += "Loaded disk: "
|
||||
@@ -593,16 +633,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "</UL>"
|
||||
|
||||
if(1.1) //Research viewer
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];print=1'>Print This Page</A><HR>"
|
||||
dat += "Current Research Levels:<BR><BR>"
|
||||
dat += "<UL>"
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
dat += "<LI>"
|
||||
dat += "[T.name]"
|
||||
dat += "<UL>"
|
||||
dat += "<LI>Level: [T.level]"
|
||||
dat += "<LI>Summary: [T.desc]"
|
||||
dat += "</UL>"
|
||||
dat += GetResearchLevelsInfo()
|
||||
dat += "</UL>"
|
||||
|
||||
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 += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];print=2'>Print This Page</A><HR>"
|
||||
dat += "List of Researched Technologies and Designs:"
|
||||
dat += "<UL>"
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_path)
|
||||
dat += "<LI><B>[D.name]</B>: [D.desc]"
|
||||
dat += "</UL>"
|
||||
|
||||
dat += GetResearchListInfo()
|
||||
|
||||
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=850x600")
|
||||
onclose(user, "rdconsole")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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]"
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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 << "<A href='?src=\ref[debugobj];Vars=1'>Debug</A>"
|
||||
else
|
||||
alert("Debugging off")
|
||||
return
|
||||
/*for(var/obj/O in plines)
|
||||
|
||||
world << "<A href='?src=\ref[O];Vars=1'>[O.name]</A>"
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/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()
|
||||
|
||||
|
||||
@@ -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 << "<b>Initiating lockdowns has been disabled due to system stress.</b>"
|
||||
// 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)
|
||||
*/
|
||||
@@ -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 = "<HTML><BODY><TT><B>Air Tunnel Controls</B><BR>"
|
||||
user.machine = src
|
||||
if (SS13_airtunnel.operating == 1)
|
||||
dat += "<B>Status:</B> RETRACTING<BR>"
|
||||
else
|
||||
if (SS13_airtunnel.operating == 2)
|
||||
dat += "<B>Status:</B> EXPANDING<BR>"
|
||||
else
|
||||
var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
|
||||
if (C.current == C)
|
||||
dat += "<B>Status:</B> Fully Retracted<BR>"
|
||||
else
|
||||
if (!( C.current.next ))
|
||||
dat += "<B>Status:</B> Fully Extended<BR>"
|
||||
else
|
||||
dat += "<B>Status:</B> Stopped Midway<BR>"
|
||||
dat += text("<A href='?src=\ref[];retract=1'>Retract</A> <A href='?src=\ref[];stop=1'>Stop</A> <A href='?src=\ref[];extend=1'>Extend</A><BR>", src, src, src)
|
||||
dat += text("<BR><B>Air Level:</B> []<BR>", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS"))
|
||||
dat += "<B>Air System Status:</B> "
|
||||
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("<A href='?src=\ref[];refresh=1'>(Refresh)</A><BR>", src)
|
||||
dat += text("<A href='?src=\ref[];release=1'>RELEASE (Siphons only)</A> <A href='?src=\ref[];siphon=1'>Siphon (Siphons only)</A> <A href='?src=\ref[];stop_siph=1'>Stop</A> <A href='?src=\ref[];auto=1'>Regulate</A><BR>", src, src, src, src)
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", 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("<B>Security Pad:</B><BR>\nKeycard: []<BR>\n<A href='?src=\ref[];door1=1'>Toggle Outer Door</A><BR>\n<A href='?src=\ref[];door2=1'>Toggle Inner Door</A><BR>\n<BR>\n<A href='?src=\ref[];em_cl=1'>Emergency Close</A><BR>\n<A href='?src=\ref[];em_op=1'>Emergency Open</A><BR>", (src.scan ? text("<A href='?src=\ref[];card=1'>[]</A>", src, src.scan.name) : text("<A href='?src=\ref[];card=1'>-----</A>", 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
|
||||
@@ -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
|
||||
@@ -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["x"])
|
||||
hor_dir = WEST
|
||||
|
||||
if(beacon_global_loc["y"]>src_global_loc["y"])
|
||||
ver_dir = NORTH
|
||||
else if(beacon_global_loc["y"]<src_global_loc["y"])
|
||||
ver_dir = SOUTH
|
||||
|
||||
src.set_dir(hor_dir|ver_dir)
|
||||
sleep(5)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/explorers_box
|
||||
name = "SpaceFriend(tm)"
|
||||
icon_state = "box"
|
||||
desc = "Everything a dashing space explorer would want to have near in the grim darkness of... whatever."
|
||||
|
||||
/obj/item/weapon/storage/explorers_box/New()
|
||||
..()
|
||||
new /obj/item/device/radio/beacon(src)
|
||||
new /obj/item/device/gps(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/chips(src)
|
||||
new /obj/item/weapon/storage/fancy/cigarettes(src)
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src)
|
||||
P.reagents.add_reagent("nutriment", 500)
|
||||
P.name = "Cyanide pill"
|
||||
return
|
||||
|
||||
/obj/effect/ship_landing_beacon
|
||||
icon = 'craft.dmi'
|
||||
icon_state = "beacon"
|
||||
name = "Beacon"
|
||||
var/active = 0
|
||||
|
||||
proc
|
||||
deploy()
|
||||
if(active)
|
||||
return
|
||||
src.active = 1
|
||||
src.anchored = 1
|
||||
deactivate()
|
||||
if(!active)
|
||||
return
|
||||
src.active = 0
|
||||
src.anchored = 0
|
||||
@@ -1,168 +0,0 @@
|
||||
/*
|
||||
/client/proc/authorize()
|
||||
set name = "Authorize"
|
||||
|
||||
if (src.authenticating)
|
||||
return
|
||||
|
||||
if (!config.enable_authentication)
|
||||
src.authenticated = 1
|
||||
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/authorize
|
||||
src.authenticated = account
|
||||
src << "Key authorized: Hello [html_encode(account)]!"
|
||||
src << "\blue[auth_motd]"
|
||||
success = 1
|
||||
|
||||
if (!success)
|
||||
src.verbs += /client/proc/authorize
|
||||
src << "Failed to authenticate your key."
|
||||
src << "If you have not already authorize it at http://byond.lljk.net/ - your BYOND key is [src.key]."
|
||||
src << "Try again using the <b>Authorize</b> 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 <B>Key accepted as beta tester</B>"
|
||||
else
|
||||
src << "\red<B>Key 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
|
||||
*/
|
||||
@@ -1 +0,0 @@
|
||||
mob/living/carbon/beast
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user