mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 15:32:25 +00:00
no relative pathing (#16234)
* the voices win in the end * cleanup * changelog * secure.dm hates me * make_exact_fit() in initialize instead of whatever was happening before
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
[debugger]
|
||||
engine = "auxtools"
|
||||
|
||||
[code_standards]
|
||||
disallow_relative_type_definitions = true
|
||||
disallow_relative_proc_definitions = true
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
// AIR_BLOCKED - Blocked
|
||||
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
|
||||
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
|
||||
atom/proc/c_airblock(turf/other)
|
||||
/atom/proc/c_airblock(turf/other)
|
||||
#ifdef ZASDBG
|
||||
ASSERT(isturf(other))
|
||||
#endif
|
||||
return (AIR_BLOCKED*!CanPass(null, other, 0, 0))|(ZONE_BLOCKED*!CanPass(null, other, 1.5, 1))
|
||||
|
||||
|
||||
turf/c_airblock(turf/other)
|
||||
/turf/c_airblock(turf/other)
|
||||
#ifdef ZASDBG
|
||||
ASSERT(isturf(other))
|
||||
#endif
|
||||
|
||||
@@ -257,7 +257,7 @@ Class Procs:
|
||||
if(!A.air.compare(air, vacuum_exception = 1))
|
||||
SSair.mark_edge_active(src)
|
||||
|
||||
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
/proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
//This implements a simplistic version of the Stefan-Boltzmann law.
|
||||
var/energy_delta = ((A.temperature - B.temperature) ** 4) * STEFAN_BOLTZMANN_CONSTANT * connecting_tiles * 2.5
|
||||
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
|
||||
|
||||
@@ -16,5 +16,5 @@ var/image/mark = image('icons/zone.dmi', icon_state = "mark")
|
||||
add_overlay(img)
|
||||
dbg_img = img
|
||||
|
||||
proc/soft_assert(thing,fail)
|
||||
if(!thing) message_admins(fail)
|
||||
/proc/soft_assert(thing,fail)
|
||||
if(!thing) message_admins(fail)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
client/proc/Zone_Info(turf/T as null|turf)
|
||||
/client/proc/Zone_Info(turf/T as null|turf)
|
||||
set category = "Debug"
|
||||
if(T)
|
||||
if(istype(T,/turf/simulated) && T:zone)
|
||||
@@ -15,9 +15,9 @@ client/proc/Zone_Info(turf/T as null|turf)
|
||||
images -= zone_debug_images[zone]
|
||||
zone_debug_images = null
|
||||
|
||||
client/var/list/zone_debug_images
|
||||
/client/var/list/zone_debug_images
|
||||
|
||||
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
/client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
set category = "Debug"
|
||||
if(!istype(T))
|
||||
return
|
||||
@@ -79,7 +79,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
else
|
||||
to_chat(mob, "both turfs can merge.")
|
||||
|
||||
client/proc/ZASSettings()
|
||||
/client/proc/ZASSettings()
|
||||
set category = "Debug"
|
||||
|
||||
vsc.SetDefault(mob)
|
||||
|
||||
@@ -15,11 +15,11 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
|
||||
var/tmp/obj/fire/fire = null
|
||||
|
||||
//Some legacy definitions so fires can be started.
|
||||
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return null
|
||||
|
||||
|
||||
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
|
||||
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
@@ -152,7 +152,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
set_light(7, FIRE_LIGHT_2, no_update = TRUE)
|
||||
else
|
||||
set_light(5, FIRE_LIGHT_1, no_update = TRUE)
|
||||
|
||||
|
||||
air_contents.adjust_gas(GAS_CO2, firelevel * 0.07)
|
||||
|
||||
for(var/mob/living/L in loc)
|
||||
@@ -339,7 +339,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
return firelevel
|
||||
|
||||
datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
/datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
. = 0
|
||||
for(var/g in gas)
|
||||
if(gas_data.flags[g] & XGM_GAS_OXIDIZER && gas[g] >= 0.1)
|
||||
|
||||
@@ -169,7 +169,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||
if(gloves) gloves.contaminate()
|
||||
|
||||
|
||||
turf/Entered(atom/movable/thing, turf/oldLoc)
|
||||
/turf/Entered(atom/movable/thing, turf/oldLoc)
|
||||
. = ..(thing, oldLoc)
|
||||
//Items that are in phoron, but not on a mob, can still be contaminated.
|
||||
var/obj/item/I = thing
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
|
||||
datum/projectile_data
|
||||
/datum/projectile_data
|
||||
var/src_x
|
||||
var/src_y
|
||||
var/time
|
||||
|
||||
@@ -215,85 +215,86 @@ world
|
||||
|
||||
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
|
||||
|
||||
icon
|
||||
proc/MakeLying()
|
||||
var/icon/I = new(src,dir=SOUTH)
|
||||
I.BecomeLying()
|
||||
return I
|
||||
/icon/proc/MakeLying()
|
||||
var/icon/I = new(src,dir=SOUTH)
|
||||
I.BecomeLying()
|
||||
return I
|
||||
|
||||
proc/BecomeLying()
|
||||
Turn(90)
|
||||
Shift(SOUTH,6)
|
||||
Shift(EAST,1)
|
||||
/icon/proc/BecomeLying()
|
||||
Turn(90)
|
||||
Shift(SOUTH,6)
|
||||
Shift(EAST,1)
|
||||
|
||||
// Multiply all alpha values by this float
|
||||
proc/ChangeOpacity(opacity = 1.0)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
|
||||
/// Multiply all alpha values by this float
|
||||
/icon/proc/ChangeOpacity(opacity = 1.0)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
|
||||
|
||||
// Convert to grayscale
|
||||
proc/GrayScale()
|
||||
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
|
||||
/// Convert to grayscale
|
||||
/icon/proc/GrayScale()
|
||||
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
|
||||
|
||||
proc/ColorTone(tone)
|
||||
GrayScale()
|
||||
/icon/proc/ColorTone(tone)
|
||||
GrayScale()
|
||||
|
||||
var/list/TONE = ReadRGB(tone)
|
||||
var/gray = round(TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11, 1)
|
||||
var/list/TONE = ReadRGB(tone)
|
||||
var/gray = round(TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11, 1)
|
||||
|
||||
var/icon/upper = (255-gray) ? new(src) : null
|
||||
var/icon/upper = (255-gray) ? new(src) : null
|
||||
|
||||
if(gray)
|
||||
MapColors(255/gray,0,0, 0,255/gray,0, 0,0,255/gray, 0,0,0)
|
||||
Blend(tone, ICON_MULTIPLY)
|
||||
else SetIntensity(0)
|
||||
if(255-gray)
|
||||
upper.Blend(rgb(gray,gray,gray), ICON_SUBTRACT)
|
||||
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
|
||||
Blend(upper, ICON_ADD)
|
||||
if(gray)
|
||||
MapColors(255/gray,0,0, 0,255/gray,0, 0,0,255/gray, 0,0,0)
|
||||
Blend(tone, ICON_MULTIPLY)
|
||||
else SetIntensity(0)
|
||||
if(255-gray)
|
||||
upper.Blend(rgb(gray,gray,gray), ICON_SUBTRACT)
|
||||
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
|
||||
Blend(upper, ICON_ADD)
|
||||
|
||||
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
|
||||
proc/MinColors(icon)
|
||||
var/icon/I = new(src)
|
||||
I.Opaque()
|
||||
I.Blend(icon, ICON_SUBTRACT)
|
||||
Blend(I, ICON_SUBTRACT)
|
||||
/// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
|
||||
/icon/proc/MinColors(icon)
|
||||
var/icon/I = new(src)
|
||||
I.Opaque()
|
||||
I.Blend(icon, ICON_SUBTRACT)
|
||||
Blend(I, ICON_SUBTRACT)
|
||||
|
||||
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
|
||||
proc/MaxColors(icon)
|
||||
var/icon/I
|
||||
if(isicon(icon))
|
||||
I = new(icon)
|
||||
else
|
||||
// solid color
|
||||
I = new(src)
|
||||
I.Blend("#000000", ICON_OVERLAY)
|
||||
I.SwapColor("#000000", null)
|
||||
I.Blend(icon, ICON_OVERLAY)
|
||||
var/icon/J = new(src)
|
||||
J.Opaque()
|
||||
I.Blend(J, ICON_SUBTRACT)
|
||||
Blend(I, ICON_OR)
|
||||
/// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
|
||||
/icon/proc/MaxColors(icon)
|
||||
var/icon/I
|
||||
if(isicon(icon))
|
||||
I = new(icon)
|
||||
else
|
||||
// solid color
|
||||
I = new(src)
|
||||
I.Blend("#000000", ICON_OVERLAY)
|
||||
I.SwapColor("#000000", null)
|
||||
I.Blend(icon, ICON_OVERLAY)
|
||||
var/icon/J = new(src)
|
||||
J.Opaque()
|
||||
I.Blend(J, ICON_SUBTRACT)
|
||||
Blend(I, ICON_OR)
|
||||
|
||||
// make this icon fully opaque--transparent pixels become black
|
||||
proc/Opaque(background = "#000000")
|
||||
SwapColor(null, background)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
|
||||
/// make this icon fully opaque--transparent pixels become black
|
||||
/icon/proc/Opaque(background = "#000000")
|
||||
SwapColor(null, background)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
|
||||
|
||||
// Change a grayscale icon into a white icon where the original color becomes the alpha
|
||||
// I.e., black -> transparent, gray -> translucent white, white -> solid white
|
||||
proc/BecomeAlphaMask()
|
||||
SwapColor(null, "#000000ff") // don't let transparent become gray
|
||||
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
|
||||
/**
|
||||
* Change a grayscale icon into a white icon where the original color becomes the alpha
|
||||
* I.e., black -> transparent, gray -> translucent white, white -> solid white
|
||||
*/
|
||||
/icon/proc/BecomeAlphaMask()
|
||||
SwapColor(null, "#000000ff") // don't let transparent become gray
|
||||
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
|
||||
|
||||
proc/UseAlphaMask(mask)
|
||||
Opaque()
|
||||
AddAlphaMask(mask)
|
||||
/icon/proc/UseAlphaMask(mask)
|
||||
Opaque()
|
||||
AddAlphaMask(mask)
|
||||
|
||||
proc/AddAlphaMask(mask)
|
||||
var/icon/M = new(mask)
|
||||
M.Blend("#ffffff", ICON_SUBTRACT)
|
||||
// apply mask
|
||||
Blend(M, ICON_ADD)
|
||||
/icon/proc/AddAlphaMask(mask)
|
||||
var/icon/M = new(mask)
|
||||
M.Blend("#ffffff", ICON_SUBTRACT)
|
||||
// apply mask
|
||||
Blend(M, ICON_ADD)
|
||||
|
||||
/*
|
||||
HSV format is represented as "#hhhssvv" or "#hhhssvvaa"
|
||||
@@ -316,8 +317,7 @@ icon
|
||||
|
||||
Higher value means brighter color
|
||||
*/
|
||||
|
||||
proc/ReadRGB(rgb)
|
||||
/proc/ReadRGB(rgb)
|
||||
if(!rgb) return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
@@ -367,7 +367,7 @@ proc/ReadRGB(rgb)
|
||||
. = list(r, g, b)
|
||||
if(usealpha) . += alpha
|
||||
|
||||
proc/ReadHSV(hsv)
|
||||
/proc/ReadHSV(hsv)
|
||||
if(!hsv) return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
@@ -406,7 +406,7 @@ proc/ReadHSV(hsv)
|
||||
. = list(hue, sat, val)
|
||||
if(usealpha) . += alpha
|
||||
|
||||
proc/HSVtoRGB(hsv)
|
||||
/proc/HSVtoRGB(hsv)
|
||||
if(!hsv) return "#000000"
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
if(!HSV) return "#000000"
|
||||
@@ -434,7 +434,7 @@ proc/HSVtoRGB(hsv)
|
||||
|
||||
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
|
||||
|
||||
proc/RGBtoHSV(rgb)
|
||||
/proc/RGBtoHSV(rgb)
|
||||
if(!rgb) return "#0000000"
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
if(!RGB) return "#0000000"
|
||||
@@ -465,7 +465,7 @@ proc/RGBtoHSV(rgb)
|
||||
|
||||
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
|
||||
|
||||
proc/hsv(hue, sat, val, alpha)
|
||||
/proc/hsv(hue, sat, val, alpha)
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
if((hue & 0xFF) == 0xFF)
|
||||
@@ -498,7 +498,7 @@ proc/hsv(hue, sat, val, alpha)
|
||||
|
||||
amount<0 or amount>1 are allowed
|
||||
*/
|
||||
proc/BlendHSV(hsv1, hsv2, amount)
|
||||
/proc/BlendHSV(hsv1, hsv2, amount)
|
||||
var/list/HSV1 = ReadHSV(hsv1)
|
||||
var/list/HSV2 = ReadHSV(hsv2)
|
||||
|
||||
@@ -552,7 +552,7 @@ proc/BlendHSV(hsv1, hsv2, amount)
|
||||
|
||||
amount<0 or amount>1 are allowed
|
||||
*/
|
||||
proc/BlendRGB(rgb1, rgb2, amount)
|
||||
/proc/BlendRGB(rgb1, rgb2, amount)
|
||||
var/cachekey = "[rgb1]_[rgb2]_[amount]"
|
||||
. = SSicon_cache.rgb_blend_cache[cachekey]
|
||||
if (.)
|
||||
@@ -574,10 +574,10 @@ proc/BlendRGB(rgb1, rgb2, amount)
|
||||
. = isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha)
|
||||
SSicon_cache.rgb_blend_cache[cachekey] = .
|
||||
|
||||
proc/BlendRGBasHSV(rgb1, rgb2, amount)
|
||||
/proc/BlendRGBasHSV(rgb1, rgb2, amount)
|
||||
return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount)
|
||||
|
||||
proc/HueToAngle(hue)
|
||||
/proc/HueToAngle(hue)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
@@ -585,7 +585,7 @@ proc/HueToAngle(hue)
|
||||
hue -= hue >> 8
|
||||
return hue / (1530/360)
|
||||
|
||||
proc/AngleToHue(angle)
|
||||
/proc/AngleToHue(angle)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
||||
var/hue = angle * (1530/360)
|
||||
@@ -595,7 +595,7 @@ proc/AngleToHue(angle)
|
||||
|
||||
|
||||
// positive angle rotates forward through red->green->blue
|
||||
proc/RotateHue(hsv, angle)
|
||||
/proc/RotateHue(hsv, angle)
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
|
||||
// normalize hsv in case anything is screwy
|
||||
@@ -617,13 +617,13 @@ proc/RotateHue(hsv, angle)
|
||||
return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null))
|
||||
|
||||
// Convert an rgb color to grayscale
|
||||
proc/GrayScale(rgb)
|
||||
/proc/GrayScale(rgb)
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
|
||||
return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray)
|
||||
|
||||
// Change grayscale color to black->tone->white range
|
||||
proc/ColorTone(rgb, tone)
|
||||
/proc/ColorTone(rgb, tone)
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
var/list/TONE = ReadRGB(tone)
|
||||
|
||||
@@ -890,7 +890,7 @@ proc/ColorTone(rgb, tone)
|
||||
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
|
||||
return composite
|
||||
|
||||
proc/adjust_brightness(var/color, var/value)
|
||||
/proc/adjust_brightness(var/color, var/value)
|
||||
if (!color) return "#FFFFFF"
|
||||
if (!value) return color
|
||||
|
||||
@@ -900,7 +900,7 @@ proc/adjust_brightness(var/color, var/value)
|
||||
RGB[3] = Clamp(RGB[3]+value,0,255)
|
||||
return rgb(RGB[1],RGB[2],RGB[3])
|
||||
|
||||
proc/sort_atoms_by_layer(var/list/atoms)
|
||||
/proc/sort_atoms_by_layer(var/list/atoms)
|
||||
// Comb sort icons based on levels
|
||||
var/list/result = atoms.Copy()
|
||||
var/gap = result.len
|
||||
@@ -925,7 +925,7 @@ arguments tx, ty, tz are target coordinates (requred), range defines render dist
|
||||
cap_mode is capturing mode (optional), user is capturing mob (requred only wehen cap_mode = CAPTURE_MODE_REGULAR),
|
||||
lighting determines lighting capturing (optional), suppress_errors suppreses errors and continues to capture (optional).
|
||||
*/
|
||||
proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as num, var/cap_mode = CAPTURE_MODE_PARTIAL, var/mob/living/user, var/lighting = 1, var/suppress_errors = 1)
|
||||
/proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as num, var/cap_mode = CAPTURE_MODE_PARTIAL, var/mob/living/user, var/lighting = 1, var/suppress_errors = 1)
|
||||
var/list/turfstocapture = list()
|
||||
//Lines below determine what tiles will be rendered
|
||||
for(var/xoff = 0 to range)
|
||||
@@ -986,7 +986,7 @@ proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as nu
|
||||
|
||||
return cap
|
||||
|
||||
proc/percentage_to_colour(var/P)
|
||||
/proc/percentage_to_colour(var/P)
|
||||
//Takes a value between 0-1
|
||||
//Returns a colour - pure green if 1, pure red if 0
|
||||
//Inbetween values will gradiant through green, yellow, orange, red
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
||||
return splittext(file2text(filename), seperator)
|
||||
|
||||
// Slower then list2text (replaced with jointext), but correctly processes associative lists.
|
||||
proc/tg_list2text(list/list, glue=",")
|
||||
/proc/tg_list2text(list/list, glue=",")
|
||||
if (!istype(list) || !list.len)
|
||||
return
|
||||
var/output
|
||||
|
||||
@@ -156,7 +156,7 @@ var/list/global_huds
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
instantiate()
|
||||
..()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
datum
|
||||
computer
|
||||
var/name
|
||||
folder
|
||||
var/list/datum/computer/contents = list()
|
||||
/datum/computer
|
||||
var/name
|
||||
|
||||
file
|
||||
/datum/computer/folder
|
||||
var/list/datum/computer/contents = list()
|
||||
|
||||
/datum/computer/folder/file
|
||||
|
||||
@@ -40,7 +40,7 @@ var/global/datum/getrev/revdata = new()
|
||||
world.log << date
|
||||
world.log << revision
|
||||
|
||||
client/verb/showrevinfo()
|
||||
/client/verb/showrevinfo()
|
||||
set category = "OOC"
|
||||
set name = "Show Server Revision"
|
||||
set desc = "Check the current server code revision"
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
drop_sound = 'sound/items/drop/rubber.ogg'
|
||||
pickup_sound = 'sound/items/pickup/rubber.ogg'
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
user.drop_item()
|
||||
src.throw_at(target, throw_range, throw_speed, user)
|
||||
/obj/item/beach_ball/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
user.drop_item()
|
||||
src.throw_at(target, throw_range, throw_speed, user)
|
||||
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
@@ -37,69 +37,69 @@ length to avoid portals or something i guess?? Not that they're counted right no
|
||||
// Also added 'exclude' turf to avoid travelling over; defaults to null
|
||||
|
||||
|
||||
PriorityQueue
|
||||
/PriorityQueue
|
||||
var/list/queue
|
||||
var/comparison_function
|
||||
|
||||
New(compare)
|
||||
queue = list()
|
||||
comparison_function = compare
|
||||
/PriorityQueue/New(compare)
|
||||
queue = list()
|
||||
comparison_function = compare
|
||||
|
||||
proc/IsEmpty()
|
||||
return !queue.len
|
||||
/PriorityQueue/proc/IsEmpty()
|
||||
return !queue.len
|
||||
|
||||
proc/Enqueue(var/data)
|
||||
queue.Add(data)
|
||||
var/index = queue.len
|
||||
/PriorityQueue/proc/Enqueue(var/data)
|
||||
queue.Add(data)
|
||||
var/index = queue.len
|
||||
|
||||
//From what I can tell, this automagically sorts the added data into the correct location.
|
||||
while(index > 2 && call(comparison_function)(queue[index / 2], queue[index]) > 0)
|
||||
queue.Swap(index, index / 2)
|
||||
index /= 2
|
||||
//From what I can tell, this automagically sorts the added data into the correct location.
|
||||
while(index > 2 && call(comparison_function)(queue[index / 2], queue[index]) > 0)
|
||||
queue.Swap(index, index / 2)
|
||||
index /= 2
|
||||
|
||||
proc/Dequeue()
|
||||
if(!queue.len)
|
||||
return 0
|
||||
return Remove(1)
|
||||
/PriorityQueue/proc/Dequeue()
|
||||
if(!queue.len)
|
||||
return 0
|
||||
return Remove(1)
|
||||
|
||||
proc/Remove(var/index)
|
||||
if(index > queue.len)
|
||||
return 0
|
||||
/PriorityQueue/proc/Remove(var/index)
|
||||
if(index > queue.len)
|
||||
return 0
|
||||
|
||||
var/thing = queue[index]
|
||||
queue.Swap(index, queue.len)
|
||||
queue.Cut(queue.len)
|
||||
if(index < queue.len)
|
||||
FixQueue(index)
|
||||
return thing
|
||||
var/thing = queue[index]
|
||||
queue.Swap(index, queue.len)
|
||||
queue.Cut(queue.len)
|
||||
if(index < queue.len)
|
||||
FixQueue(index)
|
||||
return thing
|
||||
|
||||
proc/FixQueue(var/index)
|
||||
var/child = 2 * index
|
||||
var/item = queue[index]
|
||||
/PriorityQueue/proc/FixQueue(var/index)
|
||||
var/child = 2 * index
|
||||
var/item = queue[index]
|
||||
|
||||
while(child <= queue.len)
|
||||
if(child < queue.len && call(comparison_function)(queue[child], queue[child + 1]) > 0)
|
||||
child++
|
||||
if(call(comparison_function)(item, queue[child]) > 0)
|
||||
queue[index] = queue[child]
|
||||
index = child
|
||||
else
|
||||
break
|
||||
child = 2 * index
|
||||
queue[index] = item
|
||||
while(child <= queue.len)
|
||||
if(child < queue.len && call(comparison_function)(queue[child], queue[child + 1]) > 0)
|
||||
child++
|
||||
if(call(comparison_function)(item, queue[child]) > 0)
|
||||
queue[index] = queue[child]
|
||||
index = child
|
||||
else
|
||||
break
|
||||
child = 2 * index
|
||||
queue[index] = item
|
||||
|
||||
proc/List()
|
||||
return queue.Copy()
|
||||
/PriorityQueue/proc/List()
|
||||
return queue.Copy()
|
||||
|
||||
proc/Length()
|
||||
return queue.len
|
||||
/PriorityQueue/proc/Length()
|
||||
return queue.len
|
||||
|
||||
proc/RemoveItem(data)
|
||||
var/index = queue.Find(data)
|
||||
if(index)
|
||||
return Remove(index)
|
||||
/PriorityQueue/proc/RemoveItem(data)
|
||||
var/index = queue.Find(data)
|
||||
if(index)
|
||||
return Remove(index)
|
||||
|
||||
PathNode
|
||||
/PathNode
|
||||
var/datum/position
|
||||
var/PathNode/previous_node
|
||||
|
||||
@@ -109,21 +109,21 @@ PathNode
|
||||
var/cost
|
||||
var/nodes_traversed
|
||||
|
||||
New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
position = _position
|
||||
previous_node = _previous_node
|
||||
/PathNode/New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
position = _position
|
||||
previous_node = _previous_node
|
||||
|
||||
known_cost = _known_cost
|
||||
cost = _cost
|
||||
estimated_cost = cost + known_cost
|
||||
known_cost = _known_cost
|
||||
cost = _cost
|
||||
estimated_cost = cost + known_cost
|
||||
|
||||
best_estimated_cost = estimated_cost
|
||||
nodes_traversed = _nodes_traversed
|
||||
best_estimated_cost = estimated_cost
|
||||
nodes_traversed = _nodes_traversed
|
||||
|
||||
proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
/proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
return a.estimated_cost - b.estimated_cost
|
||||
|
||||
proc/AStar(var/start, var/end, adjacent, dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
|
||||
/proc/AStar(var/start, var/end, adjacent, dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
|
||||
var/PriorityQueue/open = new /PriorityQueue(/proc/PathWeightCompare)
|
||||
var/list/closed = list()
|
||||
var/list/path
|
||||
|
||||
@@ -13,7 +13,7 @@ the HUD updates properly! */
|
||||
appearance_flags = APPEARANCE_UI
|
||||
|
||||
//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
|
||||
proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
||||
/proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
||||
if(!can_process_hud(M))
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@ proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
||||
P.Client.images += patient.hud_list[TRIAGE_HUD]
|
||||
|
||||
//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features.
|
||||
proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
|
||||
/proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
|
||||
if(!can_process_hud(M))
|
||||
return
|
||||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users)
|
||||
@@ -50,12 +50,12 @@ proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
|
||||
P.Client.images += perp.hud_list[IMPLOYAL_HUD]
|
||||
P.Client.images += perp.hud_list[IMPCHEM_HUD]
|
||||
|
||||
datum/arranged_hud_process
|
||||
/datum/arranged_hud_process
|
||||
var/client/Client
|
||||
var/mob/Mob
|
||||
var/turf/Turf
|
||||
|
||||
proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
|
||||
/proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
|
||||
hud_list |= M
|
||||
var/datum/arranged_hud_process/P = new
|
||||
P.Client = M.client
|
||||
@@ -63,7 +63,7 @@ proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
|
||||
P.Turf = get_turf(P.Mob)
|
||||
return P
|
||||
|
||||
proc/can_process_hud(var/mob/M)
|
||||
/proc/can_process_hud(var/mob/M)
|
||||
if(!M)
|
||||
return 0
|
||||
if(!M.client)
|
||||
@@ -73,14 +73,14 @@ proc/can_process_hud(var/mob/M)
|
||||
return 1
|
||||
|
||||
//Deletes the current HUD images so they can be refreshed with new ones.
|
||||
mob/proc/handle_hud_glasses() //Used in the life.dm of mobs that can use HUDs.
|
||||
/mob/proc/handle_hud_glasses() //Used in the life.dm of mobs that can use HUDs.
|
||||
if(client)
|
||||
for(var/image/hud_overlay/hud in client.images)
|
||||
client.images -= hud
|
||||
med_hud_users -= src
|
||||
sec_hud_users -= src
|
||||
|
||||
mob/proc/in_view(var/turf/T)
|
||||
/mob/proc/in_view(var/turf/T)
|
||||
return view(T)
|
||||
|
||||
/mob/abstract/eye/in_view(var/turf/T)
|
||||
@@ -90,7 +90,7 @@ mob/proc/in_view(var/turf/T)
|
||||
viewed += H
|
||||
return viewed
|
||||
|
||||
proc/get_sec_hud_icon(var/mob/living/carbon/human/H)//This function is called from human/life,dm, ~line 1663
|
||||
/proc/get_sec_hud_icon(var/mob/living/carbon/human/H)//This function is called from human/life,dm, ~line 1663
|
||||
var/state
|
||||
var/obj/item/card/id/I = H.GetIdCard()
|
||||
if(I)
|
||||
|
||||
@@ -66,7 +66,7 @@ Version 1 changes (from version 0):
|
||||
#define SD_ALERT_LINKS 4
|
||||
#define SD_ALERT_NOVALIDATE 8
|
||||
|
||||
proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
/proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
default, duration = 0, unfocus = 1, size = "300x200", \
|
||||
table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
|
||||
|
||||
@@ -87,82 +87,81 @@ proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
|
||||
sd_alert
|
||||
var
|
||||
client/target
|
||||
response
|
||||
list/validation
|
||||
/sd_alert
|
||||
var/client/target
|
||||
var/response
|
||||
var/list/validation
|
||||
|
||||
Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
return ..()
|
||||
/sd_alert/Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
return ..()
|
||||
|
||||
New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
/sd_alert/New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
|
||||
Topic(href,params[])
|
||||
if(usr.client != target) return
|
||||
response = params["clk"]
|
||||
/sd_alert/Topic(href,params[])
|
||||
if(usr.client != target) return
|
||||
response = params["clk"]
|
||||
|
||||
proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
|
||||
if(unfocus) spawn() target << browse(null,null)
|
||||
if(istext(buttons)) buttons = list(buttons)
|
||||
if(!default) default = buttons[1]
|
||||
if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
|
||||
/sd_alert/proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
|
||||
if(unfocus) spawn() target << browse(null,null)
|
||||
if(istext(buttons)) buttons = list(buttons)
|
||||
if(!default) default = buttons[1]
|
||||
if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
|
||||
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
|
||||
if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
|
||||
html += "</th></tr></table></body>"
|
||||
html += "</th></tr></table></body>"
|
||||
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
|
||||
proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
/sd_alert/proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len) response = null
|
||||
else validated = 1
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len) response = null
|
||||
else validated = 1
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
proc/get_base_turf(var/z)
|
||||
/proc/get_base_turf(var/z)
|
||||
if(!current_map.base_turf_by_z["[z]"])
|
||||
current_map.base_turf_by_z["[z]"] = /turf/space
|
||||
return current_map.base_turf_by_z["[z]"]
|
||||
|
||||
//An area can override the z-level base turf, so our solar array areas etc. can be space-based.
|
||||
proc/get_base_turf_by_area(var/turf/T)
|
||||
/proc/get_base_turf_by_area(var/turf/T)
|
||||
if (!istype(T))
|
||||
T = get_turf(T)
|
||||
if (!T)
|
||||
|
||||
@@ -7,60 +7,60 @@
|
||||
activation_messages=list("You feel no need to breathe.")
|
||||
mutation=mNobreath
|
||||
|
||||
New()
|
||||
block=NOBREATHBLOCK
|
||||
/datum/dna/gene/basic/nobreath/New()
|
||||
block = NOBREATHBLOCK
|
||||
|
||||
/datum/dna/gene/basic/remoteview
|
||||
name="Remote Viewing"
|
||||
activation_messages=list("Your mind expands.")
|
||||
mutation=mRemote
|
||||
|
||||
New()
|
||||
block=REMOTEVIEWBLOCK
|
||||
/datum/dna/gene/basic/nobreath/New()
|
||||
block = REMOTEVIEWBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
/datum/dna/gene/basic/nobreath/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
|
||||
/datum/dna/gene/basic/regenerate
|
||||
name="Regenerate"
|
||||
activation_messages=list("You feel better.")
|
||||
mutation=mRegen
|
||||
|
||||
New()
|
||||
block=REGENERATEBLOCK
|
||||
/datum/dna/gene/basic/regenerate/New()
|
||||
block = REGENERATEBLOCK
|
||||
|
||||
/datum/dna/gene/basic/increaserun
|
||||
name="Super Speed"
|
||||
activation_messages=list("Your leg muscles pulsate.")
|
||||
mutation=mRun
|
||||
|
||||
New()
|
||||
block=INCREASERUNBLOCK
|
||||
/datum/dna/gene/basic/increaserun/New()
|
||||
block = INCREASERUNBLOCK
|
||||
|
||||
/datum/dna/gene/basic/remotetalk
|
||||
name="Telepathy"
|
||||
activation_messages=list("You expand your mind outwards.")
|
||||
mutation=mRemotetalk
|
||||
|
||||
New()
|
||||
block=REMOTETALKBLOCK
|
||||
/datum/dna/gene/basic/remotetalk/New()
|
||||
block = REMOTETALKBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
/datum/dna/gene/basic/remotetalk/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
|
||||
/datum/dna/gene/basic/morph
|
||||
name="Morph"
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mMorph
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/morph/New()
|
||||
block=MORPHBLOCK
|
||||
|
||||
activate(var/mob/M)
|
||||
..(M)
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
/datum/dna/gene/basic/morph/activate(var/mob/M)
|
||||
..(M)
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
|
||||
/* Not used on bay
|
||||
/datum/dna/gene/basic/heat_resist
|
||||
@@ -68,21 +68,21 @@
|
||||
activation_messages=list("Your skin is icy to the touch.")
|
||||
mutation=mHeatres
|
||||
|
||||
New()
|
||||
block=COLDBLOCK
|
||||
/datum/dna/gene/basic/heat_resist/New()
|
||||
block=COLDBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return !(/datum/dna/gene/basic/cold_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob = 15
|
||||
if(COLD_RESISTANCE in M.mutations)
|
||||
_prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
/datum/dna/gene/basic/heat_resist/can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return !(/datum/dna/gene/basic/cold_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob = 15
|
||||
if(COLD_RESISTANCE in M.mutations)
|
||||
_prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "cold[fat]_s"
|
||||
/datum/dna/gene/basic/heat_resist/OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "cold[fat]_s"
|
||||
*/
|
||||
|
||||
/datum/dna/gene/basic/cold_resist
|
||||
@@ -90,88 +90,88 @@
|
||||
activation_messages=list("Your body is filled with warmth.")
|
||||
mutation=COLD_RESISTANCE
|
||||
|
||||
New()
|
||||
block=FIREBLOCK
|
||||
/datum/dna/gene/basic/cold_resist/New()
|
||||
block = FIREBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// return !(/datum/dna/gene/basic/heat_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob=30
|
||||
//if(mHeatres in M.mutations)
|
||||
// _prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
/datum/dna/gene/basic/cold_resist/can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// return !(/datum/dna/gene/basic/heat_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob=30
|
||||
//if(mHeatres in M.mutations)
|
||||
// _prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "fire[fat]_s"
|
||||
/datum/dna/gene/basic/cold_resist/OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "fire[fat]_s"
|
||||
|
||||
/datum/dna/gene/basic/noprints
|
||||
name="No Prints"
|
||||
activation_messages=list("Your fingers feel numb.")
|
||||
mutation=mFingerprints
|
||||
|
||||
New()
|
||||
block=NOPRINTSBLOCK
|
||||
/datum/dna/gene/basic/noprints/New()
|
||||
block = NOPRINTSBLOCK
|
||||
|
||||
/datum/dna/gene/basic/noshock
|
||||
name="Shock Immunity"
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mShock
|
||||
|
||||
New()
|
||||
block=SHOCKIMMUNITYBLOCK
|
||||
/datum/dna/gene/basic/noshock/New()
|
||||
block = SHOCKIMMUNITYBLOCK
|
||||
|
||||
/datum/dna/gene/basic/midget
|
||||
name="Midget"
|
||||
activation_messages=list("Your skin feels rubbery.")
|
||||
mutation=mSmallsize
|
||||
|
||||
New()
|
||||
block=SMALLSIZEBLOCK
|
||||
/datum/dna/gene/basic/midget/New()
|
||||
block=SMALLSIZEBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HAS_FLAG(M.mutations, HULK))
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
/datum/dna/gene/basic/midget/can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HAS_FLAG(M.mutations, HULK))
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
/datum/dna/gene/basic/midget/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
|
||||
deactivate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get passtable short of varediting so it should be fine. ~Z
|
||||
/datum/dna/gene/basic/midget/deactivate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get passtable short of varediting so it should be fine. ~Z
|
||||
|
||||
/datum/dna/gene/basic/hulk
|
||||
name="Hulk"
|
||||
activation_messages=list("Your muscles hurt.")
|
||||
mutation=HULK
|
||||
|
||||
New()
|
||||
block=HULKBLOCK
|
||||
/datum/dna/gene/basic/hulk/New()
|
||||
block=HULKBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HAS_FLAG(M.mutations, mSmallsize))
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
/datum/dna/gene/basic/hulk/can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HAS_FLAG(M.mutations, mSmallsize))
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M.health <= 25)
|
||||
M.mutations &= ~HULK
|
||||
M.update_mutations() //update our mutation overlays
|
||||
to_chat(M, "<span class='warning'>You suddenly feel very weak.</span>")
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
/datum/dna/gene/basic/hulk/OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M.health <= 25)
|
||||
M.mutations &= ~HULK
|
||||
M.update_mutations() //update our mutation overlays
|
||||
to_chat(M, "<span class='warning'>You suddenly feel very weak.</span>")
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
|
||||
/datum/dna/gene/basic/xray
|
||||
name="X-Ray Vision"
|
||||
activation_messages=list("The walls suddenly disappear.")
|
||||
mutation=XRAY
|
||||
|
||||
New()
|
||||
block=XRAYBLOCK
|
||||
/datum/dna/gene/basic/xray/New()
|
||||
block = XRAYBLOCK
|
||||
|
||||
@@ -16,28 +16,28 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
Collide(atom/clong)
|
||||
. = ..()
|
||||
if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
/obj/effect/immovablerod/Collide(atom/clong)
|
||||
. = ..()
|
||||
if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /obj))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
else if (istype(clong, /obj))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(2)
|
||||
else
|
||||
qdel(src)
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(2)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
if(clong && prob(25))
|
||||
src.forceMove(clong.loc)
|
||||
if(clong && prob(25))
|
||||
src.forceMove(clong.loc)
|
||||
|
||||
/proc/immovablerod()
|
||||
var/startx = 0
|
||||
|
||||
@@ -490,7 +490,7 @@ var/global/list/additional_antag_types = list()
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
proc/get_logout_report()
|
||||
/proc/get_logout_report()
|
||||
var/msg = "<span class='notice'><b>Logout report</b>\n\n"
|
||||
for(var/mob/living/L in mob_list)
|
||||
|
||||
@@ -532,7 +532,7 @@ proc/get_logout_report()
|
||||
msg += "</span>" // close the span from right at the top
|
||||
return msg
|
||||
|
||||
proc/display_logout_report()
|
||||
/proc/display_logout_report()
|
||||
var/logout_report = get_logout_report()
|
||||
for(var/s in staff)
|
||||
var/client/C = s
|
||||
@@ -547,7 +547,7 @@ proc/display_logout_report()
|
||||
return
|
||||
to_chat(src,get_logout_report())
|
||||
|
||||
proc/get_poor()
|
||||
/proc/get_poor()
|
||||
var/list/characters = list()
|
||||
|
||||
for(var/mob/living/carbon/human/character in player_list)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -258,13 +258,13 @@ var/obj/item/card/id/all_access/ghost_all_access
|
||||
/mob/living/silicon/GetIdCard()
|
||||
return id_card
|
||||
|
||||
proc/FindNameFromID(var/mob/M, var/missing_id_name = "Unknown")
|
||||
/proc/FindNameFromID(var/mob/M, var/missing_id_name = "Unknown")
|
||||
var/obj/item/card/id/C = M.GetIdCard()
|
||||
if(C)
|
||||
return C.registered_name
|
||||
return missing_id_name
|
||||
|
||||
proc/get_all_job_icons() //For all existing HUD icons
|
||||
/proc/get_all_job_icons() //For all existing HUD icons
|
||||
return joblist + list("Prisoner")
|
||||
|
||||
/obj/proc/GetJobName() //Used in secHUD icon generation
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/air_sensor/Destroy()
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src,frequency)
|
||||
return ..()
|
||||
@@ -97,7 +97,7 @@ obj/machinery/air_sensor/Destroy()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
circuit = /obj/item/circuitboard/air_management
|
||||
|
||||
obj/machinery/computer/general_air_control/Destroy()
|
||||
/obj/machinery/computer/general_air_control/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
@@ -14,168 +14,168 @@
|
||||
//Simple variable to prevent me from doing attack_hand in both this and the child computer
|
||||
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
|
||||
|
||||
Initialize()
|
||||
. = ..()
|
||||
/obj/machinery/computer/area_atmos/Initialize()
|
||||
. = ..()
|
||||
|
||||
scanscrubbers()
|
||||
scanscrubbers()
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat = {"
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
a.green:link
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:visited
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:hover
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:active
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.red:link
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:visited
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:hover
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:active
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1>Area Air Control</h1></center>
|
||||
<font color="red">[status]</font><br>
|
||||
<a href="?src=\ref[src];scan=1">Scan</a>
|
||||
<table border="1" width="90%">"}
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in connectedscrubbers)
|
||||
dat += {"
|
||||
<tr>
|
||||
<td>
|
||||
[scrubber.name]<br>
|
||||
Pressure: [round(scrubber.air_contents.return_pressure(), 0.01)] kPa<br>
|
||||
Flow Rate: [round(scrubber.last_flow_rate,0.1)] L/s<br>
|
||||
</td>
|
||||
<td width="150">
|
||||
<a class="green" href="?src=\ref[src];scrub=\ref[scrubber];toggle=1">Turn On</a>
|
||||
<a class="red" href="?src=\ref[src];scrub=\ref[scrubber];toggle=0">Turn Off</a><br>
|
||||
Load: [round(scrubber.last_power_draw)] W
|
||||
</td>
|
||||
</tr>"}
|
||||
/obj/machinery/computer/area_atmos/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/area_atmos/attack_hand(var/mob/user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat = {"
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
a.green:link
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:visited
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:hover
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:active
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.red:link
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:visited
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:hover
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:active
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1>Area Air Control</h1></center>
|
||||
<font color="red">[status]</font><br>
|
||||
<a href="?src=\ref[src];scan=1">Scan</a>
|
||||
<table border="1" width="90%">"}
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in connectedscrubbers)
|
||||
dat += {"
|
||||
</table><br>
|
||||
<i>[zone]</i>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse("[dat]", "window=miningshuttle;size=400x400")
|
||||
status = ""
|
||||
<tr>
|
||||
<td>
|
||||
[scrubber.name]<br>
|
||||
Pressure: [round(scrubber.air_contents.return_pressure(), 0.01)] kPa<br>
|
||||
Flow Rate: [round(scrubber.last_flow_rate,0.1)] L/s<br>
|
||||
</td>
|
||||
<td width="150">
|
||||
<a class="green" href="?src=\ref[src];scrub=\ref[scrubber];toggle=1">Turn On</a>
|
||||
<a class="red" href="?src=\ref[src];scrub=\ref[scrubber];toggle=0">Turn Off</a><br>
|
||||
Load: [round(scrubber.last_power_draw)] W
|
||||
</td>
|
||||
</tr>"}
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
dat += {"
|
||||
</table><br>
|
||||
<i>[zone]</i>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse("[dat]", "window=miningshuttle;size=400x400")
|
||||
status = ""
|
||||
|
||||
/obj/machinery/computer/area_atmos/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
if(href_list["scan"])
|
||||
scanscrubbers()
|
||||
else if(href_list["toggle"])
|
||||
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])
|
||||
|
||||
if(!validscrubber(scrubber))
|
||||
spawn(20)
|
||||
status = "ERROR: Couldn't connect to scrubber! (timeout)"
|
||||
connectedscrubbers -= scrubber
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
scrubber.on = text2num(href_list["toggle"])
|
||||
scrubber.update_icon()
|
||||
|
||||
if(href_list["scan"])
|
||||
scanscrubbers()
|
||||
else if(href_list["toggle"])
|
||||
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber = locate(href_list["scrub"])
|
||||
/obj/machinery/computer/area_atmos/proc/validscrubber( var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
||||
return 0
|
||||
|
||||
if(!validscrubber(scrubber))
|
||||
spawn(20)
|
||||
status = "ERROR: Couldn't connect to scrubber! (timeout)"
|
||||
connectedscrubbers -= scrubber
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
return 1
|
||||
|
||||
scrubber.on = text2num(href_list["toggle"])
|
||||
scrubber.update_icon()
|
||||
/obj/machinery/computer/area_atmos/proc/scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
|
||||
proc/validscrubber( var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
||||
return 0
|
||||
var/found = 0
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in range(range, src.loc))
|
||||
if(istype(scrubber))
|
||||
found = 1
|
||||
connectedscrubbers += scrubber
|
||||
|
||||
return 1
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
proc/scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
|
||||
var/found = 0
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in range(range, src.loc))
|
||||
if(istype(scrubber))
|
||||
found = 1
|
||||
connectedscrubbers += scrubber
|
||||
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/computer/area_atmos/area
|
||||
zone = "This computer is working in a wired network limited to this area."
|
||||
|
||||
validscrubber( var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber))
|
||||
return 0
|
||||
/obj/machinery/computer/area_atmos/area/validscrubber( var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber))
|
||||
return 0
|
||||
|
||||
/*
|
||||
wow this is stupid, someone help me
|
||||
*/
|
||||
var/turf/T_src = get_turf(src)
|
||||
if(!T_src.loc) return 0
|
||||
var/area/A_src = T_src.loc
|
||||
/*
|
||||
wow this is stupid, someone help me
|
||||
*/
|
||||
var/turf/T_src = get_turf(src)
|
||||
if(!T_src.loc) return 0
|
||||
var/area/A_src = T_src.loc
|
||||
|
||||
var/turf/T_scrub = get_turf(scrubber)
|
||||
if(!T_scrub.loc) return 0
|
||||
var/area/A_scrub = T_scrub.loc
|
||||
var/turf/T_scrub = get_turf(scrubber)
|
||||
if(!T_scrub.loc) return 0
|
||||
var/area/A_scrub = T_scrub.loc
|
||||
|
||||
if(A_scrub != A_src)
|
||||
return 0
|
||||
if(A_scrub != A_src)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
/obj/machinery/computer/area_atmos/area/scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
|
||||
var/found = 0
|
||||
var/found = 0
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world )
|
||||
var/turf/T2 = get_turf(scrubber)
|
||||
if(T2 && T2.loc)
|
||||
var/area/A2 = T2.loc
|
||||
if(istype(A2) && A2 == A)
|
||||
connectedscrubbers += scrubber
|
||||
found = 1
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world )
|
||||
var/turf/T2 = get_turf(scrubber)
|
||||
if(T2 && T2.loc)
|
||||
var/area/A2 = T2.loc
|
||||
if(istype(A2) && A2 == A)
|
||||
connectedscrubbers += scrubber
|
||||
found = 1
|
||||
|
||||
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
// sortTim sorts in-place, but returns a ref to the list anyways.
|
||||
return sortTim(target, GLOBAL_PROC_REF(cmp_camera), FALSE)
|
||||
|
||||
mob/living/proc/near_camera()
|
||||
/mob/living/proc/near_camera()
|
||||
if (!isturf(loc))
|
||||
return 0
|
||||
else if(!cameranet.is_visible(src))
|
||||
@@ -251,16 +251,16 @@ mob/living/proc/near_camera()
|
||||
if(T && isStationLevel(T.z) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
|
||||
return TRACKING_POSSIBLE
|
||||
|
||||
mob/living/proc/tracking_initiated()
|
||||
/mob/living/proc/tracking_initiated()
|
||||
|
||||
mob/living/silicon/robot/tracking_initiated()
|
||||
/mob/living/silicon/robot/tracking_initiated()
|
||||
tracking_entities++
|
||||
if(tracking_entities == 1 && has_zeroth_law())
|
||||
to_chat(src, "<span class='warning'>Internal camera is currently being accessed.</span>")
|
||||
|
||||
mob/living/proc/tracking_cancelled()
|
||||
/mob/living/proc/tracking_cancelled()
|
||||
|
||||
mob/living/silicon/robot/tracking_initiated()
|
||||
/mob/living/silicon/robot/tracking_initiated()
|
||||
tracking_entities--
|
||||
if(!tracking_entities && has_zeroth_law())
|
||||
to_chat(src, "<span class='notice'>Internal camera is no longer being accessed.</span>")
|
||||
|
||||
@@ -9,72 +9,72 @@
|
||||
var/list/authorized = list( )
|
||||
|
||||
|
||||
attackby(var/obj/item/card/W as obj, var/mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
/obj/machinery/computer/shuttle/attackby(var/obj/item/card/W as obj, var/mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
var/datum/evacuation_controller/shuttle/evac_control = evacuation_controller
|
||||
if(!istype(evac_control))
|
||||
to_chat(user, SPAN_DANGER("This console should not in use on this map. Please report this to a developer."))
|
||||
return
|
||||
|
||||
if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || evacuation_controller.has_evacuated() || !( user )))
|
||||
return
|
||||
|
||||
if (W.GetID())
|
||||
var/obj/item/card/id/id = W
|
||||
|
||||
if (!id.access) //no access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return
|
||||
|
||||
var/datum/evacuation_controller/shuttle/evac_control = evacuation_controller
|
||||
if(!istype(evac_control))
|
||||
to_chat(user, SPAN_DANGER("This console should not in use on this map. Please report this to a developer."))
|
||||
var/list/cardaccess = id.access
|
||||
if(!istype(cardaccess, /list) || !cardaccess.len) //no access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return
|
||||
|
||||
if ((!( istype(W, /obj/item/card) ) || !( SSticker ) || evacuation_controller.has_evacuated() || !( user )))
|
||||
return
|
||||
if(!(access_heads in id.access)) //doesn't have this access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return 0
|
||||
|
||||
if (W.GetID())
|
||||
var/obj/item/card/id/id = W
|
||||
|
||||
if (!id.access) //no access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return
|
||||
|
||||
var/list/cardaccess = id.access
|
||||
if(!istype(cardaccess, /list) || !cardaccess.len) //no access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return
|
||||
|
||||
if(!(access_heads in id.access)) //doesn't have this access
|
||||
to_chat(user, "The access level of [id.registered_name]\'s card is not high enough. ")
|
||||
return 0
|
||||
|
||||
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
|
||||
if(evacuation_controller.is_prepared() && user.get_active_hand() != id)
|
||||
return 0
|
||||
switch(choice)
|
||||
if("Authorize")
|
||||
src.authorized -= id.registered_name
|
||||
src.authorized += id.registered_name
|
||||
if (src.auth_need - src.authorized.len > 0)
|
||||
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
|
||||
log_game("[key_name(user)] has authorized early shuttle launch",ckey=key_name(user))
|
||||
to_world(text("<span class='notice'><b>Alert: [] authorizations needed until shuttle is launched early</b></span>", src.auth_need - src.authorized.len))
|
||||
else
|
||||
message_admins("[key_name_admin(user)] has launched the shuttle")
|
||||
log_game("[key_name(user)] has launched the shuttle early",ckey=key_name(user))
|
||||
to_world("<span class='notice'><b>Alert: Shuttle launch time shortened to 10 seconds!</b></span>")
|
||||
evacuation_controller.set_launch_time(world.time+100)
|
||||
//src.authorized = null
|
||||
qdel(src.authorized)
|
||||
src.authorized = list( )
|
||||
|
||||
if("Repeal")
|
||||
src.authorized -= id.registered_name
|
||||
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
|
||||
if(evacuation_controller.is_prepared() && user.get_active_hand() != id)
|
||||
return 0
|
||||
switch(choice)
|
||||
if("Authorize")
|
||||
src.authorized -= id.registered_name
|
||||
src.authorized += id.registered_name
|
||||
if (src.auth_need - src.authorized.len > 0)
|
||||
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
|
||||
log_game("[key_name(user)] has authorized early shuttle launch",ckey=key_name(user))
|
||||
to_world(text("<span class='notice'><b>Alert: [] authorizations needed until shuttle is launched early</b></span>", src.auth_need - src.authorized.len))
|
||||
|
||||
if("Abort")
|
||||
to_world("<span class='notice'><b>All authorizations to shortening time for shuttle launch have been revoked!</b></span>")
|
||||
src.authorized.len = 0
|
||||
else
|
||||
message_admins("[key_name_admin(user)] has launched the shuttle")
|
||||
log_game("[key_name(user)] has launched the shuttle early",ckey=key_name(user))
|
||||
to_world("<span class='notice'><b>Alert: Shuttle launch time shortened to 10 seconds!</b></span>")
|
||||
evacuation_controller.set_launch_time(world.time+100)
|
||||
//src.authorized = null
|
||||
qdel(src.authorized)
|
||||
src.authorized = list( )
|
||||
|
||||
else if (istype(W, /obj/item/card/emag) && !emagged)
|
||||
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
|
||||
if("Repeal")
|
||||
src.authorized -= id.registered_name
|
||||
to_world(text("<span class='notice'><b>Alert: [] authorizations needed until shuttle is launched early</b></span>", src.auth_need - src.authorized.len))
|
||||
|
||||
if(!emagged && !evacuation_controller.is_prepared() && user.get_active_hand() == W)
|
||||
switch(choice)
|
||||
if("Launch")
|
||||
to_world("<span class='notice'><b>Alert: Shuttle launch time shortened to 10 seconds!</b></span>")
|
||||
evacuation_controller.set_launch_time(world.time+100)
|
||||
emagged = 1
|
||||
if("Cancel")
|
||||
return
|
||||
return
|
||||
if("Abort")
|
||||
to_world("<span class='notice'><b>All authorizations to shortening time for shuttle launch have been revoked!</b></span>")
|
||||
src.authorized.len = 0
|
||||
src.authorized = list( )
|
||||
|
||||
else if (istype(W, /obj/item/card/emag) && !emagged)
|
||||
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
|
||||
|
||||
if(!emagged && !evacuation_controller.is_prepared() && user.get_active_hand() == W)
|
||||
switch(choice)
|
||||
if("Launch")
|
||||
to_world("<span class='notice'><b>Alert: Shuttle launch time shortened to 10 seconds!</b></span>")
|
||||
evacuation_controller.set_launch_time(world.time+100)
|
||||
emagged = 1
|
||||
if("Cancel")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -192,92 +192,93 @@ for reference:
|
||||
var/locked = 0.0
|
||||
// req_access = list(access_maint_tunnels)
|
||||
|
||||
New()
|
||||
/obj/machinery/deployable/barrier/New()
|
||||
..()
|
||||
|
||||
src.icon_state = "[initial(icon_state)][src.locked]"
|
||||
|
||||
/obj/machinery/deployable/barrier/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/card/id/))
|
||||
if (src.allowed(user))
|
||||
if (src.emagged < 2.0)
|
||||
src.locked = !src.locked
|
||||
src.anchored = !src.anchored
|
||||
src.icon_state = "[initial(icon_state)][src.locked]"
|
||||
if ((src.locked == 1.0) && (src.emagged < 2.0))
|
||||
to_chat(user, "Barrier lock toggled on.")
|
||||
return
|
||||
else if ((src.locked == 0.0) && (src.emagged < 2.0))
|
||||
to_chat(user, "Barrier lock toggled off.")
|
||||
return
|
||||
else
|
||||
spark(src, 2, src)
|
||||
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
return
|
||||
return
|
||||
else if (W.iswrench())
|
||||
if (src.health < src.maxhealth)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health = src.maxhealth
|
||||
src.emagged = 0
|
||||
src.req_access = list(access_security)
|
||||
visible_message("<span class='warning'>[user] repairs \the [src]!</span>")
|
||||
return
|
||||
else if (src.emagged > 0)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.emagged = 0
|
||||
src.req_access = list(access_security)
|
||||
visible_message("<span class='warning'>[user] repairs \the [src]!</span>")
|
||||
return
|
||||
return
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
src.health -= W.force * 0.75
|
||||
if("brute")
|
||||
src.health -= W.force * 0.5
|
||||
else
|
||||
if (src.health <= 0)
|
||||
src.explode()
|
||||
..()
|
||||
|
||||
src.icon_state = "[initial(icon_state)][src.locked]"
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/card/id/))
|
||||
if (src.allowed(user))
|
||||
if (src.emagged < 2.0)
|
||||
src.locked = !src.locked
|
||||
src.anchored = !src.anchored
|
||||
src.icon_state = "[initial(icon_state)][src.locked]"
|
||||
if ((src.locked == 1.0) && (src.emagged < 2.0))
|
||||
to_chat(user, "Barrier lock toggled on.")
|
||||
return
|
||||
else if ((src.locked == 0.0) && (src.emagged < 2.0))
|
||||
to_chat(user, "Barrier lock toggled off.")
|
||||
return
|
||||
else
|
||||
spark(src, 2, src)
|
||||
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
return
|
||||
/obj/machinery/deployable/barrier/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.explode()
|
||||
return
|
||||
else if (W.iswrench())
|
||||
if (src.health < src.maxhealth)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health = src.maxhealth
|
||||
src.emagged = 0
|
||||
src.req_access = list(access_security)
|
||||
visible_message("<span class='warning'>[user] repairs \the [src]!</span>")
|
||||
return
|
||||
else if (src.emagged > 0)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.emagged = 0
|
||||
src.req_access = list(access_security)
|
||||
visible_message("<span class='warning'>[user] repairs \the [src]!</span>")
|
||||
return
|
||||
return
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
src.health -= W.force * 0.75
|
||||
if("brute")
|
||||
src.health -= W.force * 0.5
|
||||
else
|
||||
if(2.0)
|
||||
src.health -= 25
|
||||
if (src.health <= 0)
|
||||
src.explode()
|
||||
..()
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.explode()
|
||||
return
|
||||
if(2.0)
|
||||
src.health -= 25
|
||||
if (src.health <= 0)
|
||||
src.explode()
|
||||
return
|
||||
emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
anchored = !anchored
|
||||
icon_state = "[initial(icon_state)][src.locked]"
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
||||
if(air_group || (height==0))
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/obj/machinery/deployable/barrier/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
anchored = !anchored
|
||||
icon_state = "[initial(icon_state)][src.locked]"
|
||||
|
||||
proc/explode()
|
||||
visible_message("<span class='danger'>[src] blows apart!</span>")
|
||||
/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
||||
if(air_group || (height==0))
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/* var/obj/item/stack/rods/ =*/
|
||||
new /obj/item/stack/rods(get_turf(src))
|
||||
/obj/machinery/deployable/barrier/proc/explode()
|
||||
visible_message("<span class='danger'>[src] blows apart!</span>")
|
||||
|
||||
spark(src, 3, alldirs)
|
||||
/* var/obj/item/stack/rods/ =*/
|
||||
new /obj/item/stack/rods(get_turf(src))
|
||||
|
||||
explosion(src.loc,-1,-1,0)
|
||||
qdel(src)
|
||||
spark(src, 3, alldirs)
|
||||
|
||||
explosion(src.loc,-1,-1,0)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/deployable/barrier/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (src.emagged == 0)
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
open_sound_powered = 'sound/machines/airlock/vault1o.ogg'
|
||||
close_sound_powered = 'sound/machines/airlock/vault1c.ogg'
|
||||
|
||||
obj/machinery/door/airlock/glass_centcom/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/door/airlock/glass_centcom/attackby(obj/item/I, mob/user)
|
||||
if (operating)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
obj/structure/firedoor_assembly
|
||||
/obj/structure/firedoor_assembly
|
||||
name = "emergency shutter assembly"
|
||||
desc = "An emergency shutter assembly."
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
@@ -9,13 +9,13 @@ obj/structure/firedoor_assembly
|
||||
build_amt = 4
|
||||
var/wired = 0
|
||||
|
||||
obj/structure/firedoor_assembly/update_icon()
|
||||
/obj/structure/firedoor_assembly/update_icon()
|
||||
if(anchored)
|
||||
icon_state = "door_anchored"
|
||||
else
|
||||
icon_state = "door_construction"
|
||||
|
||||
obj/structure/firedoor_assembly/attackby(var/obj/item/C as obj, mob/user as mob)
|
||||
/obj/structure/firedoor_assembly/attackby(var/obj/item/C as obj, mob/user as mob)
|
||||
if(C.iscoil() && !wired && anchored)
|
||||
var/obj/item/stack/cable_coil/cable = C
|
||||
if (cable.get_amount() < 1)
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_INOPEN
|
||||
memory["purge"] = cycle_to_external_air
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_dock_cycle()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_INOPEN
|
||||
@@ -339,7 +339,7 @@
|
||||
signalDoor(tag_exterior_door, command)
|
||||
signalDoor(tag_interior_door, command)
|
||||
|
||||
datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
|
||||
/datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = sensor
|
||||
signal.data["command"] = command
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
var/on = 1
|
||||
|
||||
obj/machinery/embedded_controller/radio/Destroy()
|
||||
/obj/machinery/embedded_controller/radio/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
datum/track
|
||||
/datum/track
|
||||
var/title
|
||||
var/sound
|
||||
|
||||
datum/track/New(var/title_name, var/audio)
|
||||
/datum/track/New(var/title_name, var/audio)
|
||||
title = title_name
|
||||
sound = audio
|
||||
|
||||
|
||||
@@ -325,13 +325,13 @@
|
||||
|
||||
return
|
||||
|
||||
proc/getr(col)
|
||||
/proc/getr(col)
|
||||
return hex2num( copytext(col, 2,4))
|
||||
|
||||
proc/getg(col)
|
||||
/proc/getg(col)
|
||||
return hex2num( copytext(col, 4,6))
|
||||
|
||||
proc/getb(col)
|
||||
/proc/getb(col)
|
||||
return hex2num( copytext(col, 6))
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
// Fruits and vegetables.
|
||||
if(istype(O, /obj/item/reagent_containers/food/snacks/grown) || istype(O, /obj/item/grown))
|
||||
|
||||
@@ -25,18 +25,18 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
var/atom/holder
|
||||
var/setup = 0
|
||||
|
||||
proc/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
setup = 1
|
||||
/datum/effect/effect/system/proc/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
setup = 1
|
||||
|
||||
proc/attach(atom/atom)
|
||||
holder = atom
|
||||
/datum/effect/effect/system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
proc/start()
|
||||
/datum/effect/effect/system/proc/start()
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -62,29 +62,29 @@ steam.start() -- spawns the effect
|
||||
|
||||
/datum/effect/effect/system/steam_spread
|
||||
|
||||
set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
/datum/effect/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
location = loc
|
||||
|
||||
start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
QDEL_IN(steam, 20)
|
||||
/datum/effect/effect/system/steam_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
|
||||
var/direction
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(steam,direction)
|
||||
QDEL_IN(steam, 20)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//// SMOKE SYSTEMS
|
||||
@@ -300,96 +300,96 @@ steam.start() -- spawns the effect
|
||||
var/processing = 1
|
||||
var/on = 1
|
||||
|
||||
set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
/datum/effect/effect/system/steam_trail_follow/set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
|
||||
start()
|
||||
if(!src.on)
|
||||
src.on = 1
|
||||
src.processing = 1
|
||||
if(src.processing)
|
||||
src.processing = 0
|
||||
spawn(0)
|
||||
if(src.number < 3)
|
||||
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
|
||||
src.number++
|
||||
src.oldposition = get_turf(holder)
|
||||
I.set_dir(src.holder.dir)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
src.number--
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
else
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
|
||||
proc/stop()
|
||||
/datum/effect/effect/system/steam_trail_follow/start()
|
||||
if(!src.on)
|
||||
src.on = 1
|
||||
src.processing = 1
|
||||
if(src.processing)
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
spawn(0)
|
||||
if(src.number < 3)
|
||||
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
|
||||
src.number++
|
||||
src.oldposition = get_turf(holder)
|
||||
I.set_dir(src.holder.dir)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
src.number--
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
else
|
||||
spawn(2)
|
||||
if(src.on)
|
||||
src.processing = 1
|
||||
src.start()
|
||||
|
||||
/datum/effect/effect/system/steam_trail_follow/proc/stop()
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
|
||||
|
||||
set_up (amt, loc, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(istype(loc, /turf/))
|
||||
location = loc
|
||||
else
|
||||
location = get_turf(loc)
|
||||
/datum/effect/effect/system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(istype(loc, /turf/))
|
||||
location = loc
|
||||
else
|
||||
location = get_turf(loc)
|
||||
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
|
||||
return
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion/start()
|
||||
if (amount <= 2)
|
||||
spark(location, 2)
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devst = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
start()
|
||||
if (amount <= 2)
|
||||
spark(location, 2)
|
||||
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
|
||||
if (round(amount/12) > 0)
|
||||
devst = devst + amount/12
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devst = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
if (round(amount/6) > 0)
|
||||
heavy = heavy + amount/6
|
||||
|
||||
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
|
||||
if (round(amount/12) > 0)
|
||||
devst = devst + amount/12
|
||||
if (round(amount/3) > 0)
|
||||
light = light + amount/3
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = heavy + amount/6
|
||||
if (flashing && flashing_factor)
|
||||
flash = (amount/4) * flashing_factor
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = light + amount/3
|
||||
for(var/mob/M in viewers(8, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
|
||||
if (flashing && flashing_factor)
|
||||
flash = (amount/4) * flashing_factor
|
||||
|
||||
for(var/mob/M in viewers(8, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
|
||||
explosion(
|
||||
location,
|
||||
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
|
||||
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
|
||||
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
||||
round(min(flash, BOMBCAP_FLASH_RADIUS))
|
||||
)
|
||||
explosion(
|
||||
location,
|
||||
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
|
||||
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
|
||||
round(min(light, BOMBCAP_LIGHT_RADIUS)),
|
||||
round(min(flash, BOMBCAP_FLASH_RADIUS))
|
||||
)
|
||||
|
||||
/obj/effect/temporary_effect
|
||||
name = "self deleting effect"
|
||||
|
||||
@@ -10,45 +10,45 @@
|
||||
var/fleshcolor //Used for gibbed humans.
|
||||
var/bloodcolor //Used for gibbed humans.
|
||||
|
||||
Initialize(mapload, list/viruses, datum/dna/MobDNA, fleshcolor, bloodcolor)
|
||||
. = ..()
|
||||
/obj/effect/gibspawner/Initialize(mapload, list/viruses, datum/dna/MobDNA, fleshcolor, bloodcolor)
|
||||
. = ..()
|
||||
|
||||
if(fleshcolor) src.fleshcolor = fleshcolor
|
||||
if(bloodcolor) src.bloodcolor = bloodcolor
|
||||
Gib(loc,viruses,MobDNA)
|
||||
if(fleshcolor) src.fleshcolor = fleshcolor
|
||||
if(bloodcolor) src.bloodcolor = bloodcolor
|
||||
Gib(loc,viruses,MobDNA)
|
||||
|
||||
proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
to_world("<span class='warning'>Gib list length mismatch!</span>")
|
||||
return
|
||||
/obj/effect/gibspawner/proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
to_world("<span class='warning'>Gib list length mismatch!</span>")
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sparks)
|
||||
spark(location, 2, alldirs)
|
||||
if(sparks)
|
||||
spark(location, 2, alldirs)
|
||||
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
|
||||
// Apply human species colouration to masks.
|
||||
if(fleshcolor)
|
||||
gib.fleshcolor = fleshcolor
|
||||
if(bloodcolor)
|
||||
gib.basecolor = bloodcolor
|
||||
// Apply human species colouration to masks.
|
||||
if(fleshcolor)
|
||||
gib.fleshcolor = fleshcolor
|
||||
if(bloodcolor)
|
||||
gib.basecolor = bloodcolor
|
||||
|
||||
gib.update_icon()
|
||||
gib.update_icon()
|
||||
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
if(istype(location,/turf/))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
if(istype(location,/turf/))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -31,54 +31,54 @@
|
||||
var/nostop = 0 // if 1: will only be stopped by teleporters
|
||||
var/list/affecting = list()
|
||||
|
||||
Trigger(var/atom/A)
|
||||
if(!A || !istype(A, /atom/movable))
|
||||
/obj/effect/step_trigger/thrower/Trigger(var/atom/A)
|
||||
if(!A || !istype(A, /atom/movable))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
break
|
||||
|
||||
curtiles++
|
||||
curtiles++
|
||||
|
||||
sleep(speed)
|
||||
sleep(speed)
|
||||
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, dir))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, dir))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, dir))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, dir))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, dir)
|
||||
if(!facedir)
|
||||
AM.set_dir(predir)
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, dir)
|
||||
if(!facedir)
|
||||
AM.set_dir(predir)
|
||||
|
||||
affecting.Remove(AM)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
affecting.Remove(AM)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
|
||||
/obj/effect/step_trigger/thrower/shuttle
|
||||
icon_state = "dir_arrow"
|
||||
@@ -129,12 +129,12 @@
|
||||
var/teleport_y = 0
|
||||
var/teleport_z = 0
|
||||
|
||||
Trigger(var/atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
/obj/effect/step_trigger/teleporter/Trigger(var/atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
|
||||
A.x = teleport_x
|
||||
A.y = teleport_y
|
||||
A.z = teleport_z
|
||||
A.x = teleport_x
|
||||
A.y = teleport_y
|
||||
A.z = teleport_z
|
||||
|
||||
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
|
||||
|
||||
@@ -154,4 +154,4 @@
|
||||
A.z = rand(teleport_z, teleport_z_offset)
|
||||
if(isliving(A))
|
||||
var/mob/M = A
|
||||
M.visible_message(FONT_LARGE(SPAN_WARNING("\The [A] blinks into reality!")), FONT_LARGE(SPAN_WARNING("You feel your stomach turn as you get thrown out of bluespace!")))
|
||||
M.visible_message(FONT_LARGE(SPAN_WARNING("\The [A] blinks into reality!")), FONT_LARGE(SPAN_WARNING("You feel your stomach turn as you get thrown out of bluespace!")))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// #define EMPDEBUG 10
|
||||
|
||||
proc/empulse(turf/epicenter, heavy_range, light_range, log = FALSE, list/exclude = null)
|
||||
/proc/empulse(turf/epicenter, heavy_range, light_range, log = FALSE, list/exclude = null)
|
||||
if(!epicenter) return
|
||||
|
||||
if(!istype(epicenter, /turf))
|
||||
|
||||
@@ -53,9 +53,9 @@ var/global/list/teleportbeacons = list()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
|
||||
proc/digest_delay()
|
||||
QDEL_IN(src, 600)
|
||||
// Probably a better way of doing this, I'm lazy.
|
||||
/obj/item/device/radio/beacon/bacon/proc/digest_delay()
|
||||
QDEL_IN(src, 600)
|
||||
|
||||
/obj/item/device/radio/beacon/fixed
|
||||
alpha = 0
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
var/hits = 0
|
||||
var/time_inflicted = 0
|
||||
|
||||
proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
/datum/autopsy_data/proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
|
||||
/obj/item/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
|
||||
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
obj/item/clothing/mask/chewable/Initialize()
|
||||
/obj/item/clothing/mask/chewable/Initialize()
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
. = ..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
@@ -50,7 +50,7 @@ obj/item/clothing/mask/chewable/Initialize()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
..()
|
||||
|
||||
obj/item/clothing/mask/chewable/Destroy()
|
||||
/obj/item/clothing/mask/chewable/Destroy()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
obj/item/circuitboard/rdserver
|
||||
/obj/item/circuitboard/rdserver
|
||||
name = T_BOARD("R&D server")
|
||||
build_path = /obj/machinery/r_n_d/server
|
||||
board_type = "machine"
|
||||
@@ -11,7 +11,7 @@ obj/item/circuitboard/rdserver
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/stock_parts/scanning_module" = 1)
|
||||
|
||||
obj/item/circuitboard/rdtechprocessor
|
||||
/obj/item/circuitboard/rdtechprocessor
|
||||
name = T_BOARD("R&D tech processor")
|
||||
build_path = /obj/machinery/r_n_d/tech_processor
|
||||
board_type = "machine"
|
||||
@@ -84,7 +84,7 @@ obj/item/circuitboard/rdtechprocessor
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/stock_parts/console_screen" = 1)
|
||||
|
||||
obj/item/circuitboard/ntnet_relay
|
||||
/obj/item/circuitboard/ntnet_relay
|
||||
name = "Circuit board (NTNet Quantum Relay)"
|
||||
build_path = /obj/machinery/ntnet_relay
|
||||
board_type = "machine"
|
||||
|
||||
@@ -150,9 +150,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = HULKBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/hulkmut/New()
|
||||
block = HULKBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
@@ -160,9 +161,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = HULKBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antihulk/New()
|
||||
block = HULKBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
@@ -170,9 +172,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 8
|
||||
New()
|
||||
block = XRAYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/xraymut/New()
|
||||
block = XRAYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
@@ -180,9 +183,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 8
|
||||
New()
|
||||
block = XRAYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antixray/New()
|
||||
block = XRAYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
@@ -190,9 +194,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 10
|
||||
New()
|
||||
block = FIREBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/firemut/New()
|
||||
block = FIREBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
@@ -200,9 +205,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 10
|
||||
New()
|
||||
block = FIREBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antifire/New()
|
||||
block = FIREBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
@@ -210,9 +216,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 12
|
||||
New()
|
||||
block = TELEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/telemut/New()
|
||||
block = TELEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
@@ -220,9 +227,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 12
|
||||
New()
|
||||
block = TELEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antitele/New()
|
||||
block = TELEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/nobreath
|
||||
name = "\improper DNA injector (No Breath)"
|
||||
@@ -230,9 +238,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = NOBREATHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/nobreath/New()
|
||||
block = NOBREATHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antinobreath
|
||||
name = "\improper DNA injector (Anti-No Breath)"
|
||||
@@ -240,9 +249,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = NOBREATHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antinobreath/New()
|
||||
block = NOBREATHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/remoteview
|
||||
name = "\improper DNA injector (Remote View)"
|
||||
@@ -250,9 +260,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = REMOTEVIEWBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/remoteview/New()
|
||||
block = REMOTEVIEWBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiremoteview
|
||||
name = "\improper DNA injector (Anti-Remote View)"
|
||||
@@ -260,9 +271,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = REMOTEVIEWBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiremoteview/New()
|
||||
block = REMOTEVIEWBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/regenerate
|
||||
name = "\improper DNA injector (Regeneration)"
|
||||
@@ -270,9 +282,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = REGENERATEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/regenerate/New()
|
||||
block = REGENERATEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiregenerate
|
||||
name = "\improper DNA injector (Anti-Regeneration)"
|
||||
@@ -280,9 +293,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = REGENERATEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiregenerate/New()
|
||||
block = REGENERATEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/runfast
|
||||
name = "\improper DNA injector (Increase Run)"
|
||||
@@ -290,9 +304,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = INCREASERUNBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/runfast/New()
|
||||
block = INCREASERUNBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antirunfast
|
||||
name = "\improper DNA injector (Anti-Increase Run)"
|
||||
@@ -300,9 +315,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = INCREASERUNBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antirunfast/New()
|
||||
block = INCREASERUNBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/morph
|
||||
name = "\improper DNA injector (Morph)"
|
||||
@@ -310,9 +326,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = MORPHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/morph/New()
|
||||
block = MORPHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antimorph
|
||||
name = "\improper DNA injector (Anti-Morph)"
|
||||
@@ -320,9 +337,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = MORPHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antimorph/New()
|
||||
block = MORPHBLOCK
|
||||
..()
|
||||
|
||||
/* No COLDBLOCK on bay
|
||||
/obj/item/dnainjector/cold
|
||||
@@ -331,9 +349,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = COLDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/cold/New()
|
||||
block = COLDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticold
|
||||
name = "\improper DNA injector (Anti-Cold)"
|
||||
@@ -341,9 +360,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = COLDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticold/New()
|
||||
block = COLDBLOCK
|
||||
..()
|
||||
*/
|
||||
|
||||
/obj/item/dnainjector/noprints
|
||||
@@ -352,9 +372,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = NOPRINTSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/noprints/New()
|
||||
block = NOPRINTSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antinoprints
|
||||
name = "\improper DNA injector (Anti-No Prints)"
|
||||
@@ -362,9 +383,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = NOPRINTSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antinoprints/New()
|
||||
block = NOPRINTSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/insulation
|
||||
name = "\improper DNA injector (Shock Immunity)"
|
||||
@@ -372,9 +394,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = SHOCKIMMUNITYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/insulation/New()
|
||||
block = SHOCKIMMUNITYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiinsulation
|
||||
name = "\improper DNA injector (Anti-Shock Immunity)"
|
||||
@@ -382,9 +405,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = SHOCKIMMUNITYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiinsulation/New()
|
||||
block = SHOCKIMMUNITYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/midgit
|
||||
name = "\improper DNA injector (Small Size)"
|
||||
@@ -392,9 +416,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = SMALLSIZEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/midgit/New()
|
||||
block = SMALLSIZEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antimidgit
|
||||
name = "\improper DNA injector (Anti-Small Size)"
|
||||
@@ -402,9 +427,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = SMALLSIZEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antimidgit/New()
|
||||
block = SMALLSIZEBLOCK
|
||||
..()
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
@@ -413,9 +439,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 1
|
||||
New()
|
||||
block = GLASSESBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiglasses/New()
|
||||
block = GLASSESBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
@@ -423,9 +450,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 1
|
||||
New()
|
||||
block = GLASSESBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/glassesmut/New()
|
||||
block = GLASSESBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
@@ -433,9 +461,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 3
|
||||
New()
|
||||
block = HEADACHEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/epimut/New()
|
||||
block = HEADACHEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
@@ -443,9 +472,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 3
|
||||
New()
|
||||
block = HEADACHEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiepi/New()
|
||||
block = HEADACHEBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
@@ -453,9 +483,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 5
|
||||
New()
|
||||
block = COUGHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticough/New()
|
||||
block = COUGHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
@@ -463,9 +494,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 5
|
||||
New()
|
||||
block = COUGHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/coughmut/New()
|
||||
block = COUGHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
@@ -473,9 +505,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 6
|
||||
New()
|
||||
block = CLUMSYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/clumsymut/New()
|
||||
block = CLUMSYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumy)"
|
||||
@@ -483,9 +516,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 6
|
||||
New()
|
||||
block = CLUMSYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/anticlumsy/New()
|
||||
block = CLUMSYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
@@ -493,9 +527,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 7
|
||||
New()
|
||||
block = TWITCHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antitour/New()
|
||||
block = TWITCHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
@@ -503,9 +538,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 7
|
||||
New()
|
||||
block = TWITCHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/tourmut/New()
|
||||
block = TWITCHBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
@@ -513,9 +549,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 9
|
||||
New()
|
||||
block = STUTTERBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/stuttmut/New()
|
||||
block = STUTTERBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
@@ -523,9 +560,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 9
|
||||
New()
|
||||
block = STUTTERBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antistutt/New()
|
||||
block = STUTTERBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
@@ -533,9 +571,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 11
|
||||
New()
|
||||
block = BLINDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/blindmut/New()
|
||||
block = BLINDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
@@ -543,9 +582,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 11
|
||||
New()
|
||||
block = BLINDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antiblind/New()
|
||||
block = BLINDBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
@@ -553,9 +593,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 13
|
||||
New()
|
||||
block = DEAFBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/deafmut/New()
|
||||
block = DEAFBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
@@ -563,9 +604,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 13
|
||||
New()
|
||||
block = DEAFBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antideaf/New()
|
||||
block = DEAFBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/hallucination
|
||||
name = "\improper DNA injector (Halluctination)"
|
||||
@@ -573,9 +615,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = HALLUCINATIONBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/hallucination/New()
|
||||
block = HALLUCINATIONBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antihallucination
|
||||
name = "\improper DNA injector (Anti-Hallucination)"
|
||||
@@ -583,9 +626,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = HALLUCINATIONBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/antihallucination/New()
|
||||
block = HALLUCINATIONBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
@@ -593,9 +637,10 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 14
|
||||
New()
|
||||
block = MONKEYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/h2m/New()
|
||||
block = MONKEYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
@@ -603,6 +648,7 @@
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 14
|
||||
New()
|
||||
block = MONKEYBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/dnainjector/m2h/New()
|
||||
block = MONKEYBLOCK
|
||||
..()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
. = ..()
|
||||
color = pick(ecig_colors)
|
||||
|
||||
obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
|
||||
/obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
|
||||
. = ..()
|
||||
if(ec_cartridge)
|
||||
to_chat(user, SPAN_NOTICE("There are [round(ec_cartridge.reagents.total_volume, 1)] unit\s of liquid remaining."))
|
||||
@@ -225,7 +225,7 @@ obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
|
||||
if(blocked)
|
||||
to_chat(C, SPAN_WARNING("\The [blocked] is in the way!"))
|
||||
return TRUE
|
||||
if(last_drag <= world.time - 30)
|
||||
if(last_drag <= world.time - 30)
|
||||
if(!cig_cell.checked_use(power_usage * CELLRATE)) //if this passes, there's not enough power in the battery
|
||||
deactivate()
|
||||
to_chat(C,SPAN_WARNING("\The [src]'s power meter flashes a low battery warning and shuts down."))
|
||||
@@ -234,7 +234,7 @@ obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
|
||||
idle = 0
|
||||
C.visible_message(SPAN_NOTICE("[C.name] takes a drag of their [name]."))
|
||||
playsound(C, 'sound/items/cigs_lighters/inhale.ogg', 50, 0, -1)
|
||||
ec_cartridge.reagents.trans_to_mob(C, REM, CHEM_BREATHE, 0.4)
|
||||
ec_cartridge.reagents.trans_to_mob(C, REM, CHEM_BREATHE, 0.4)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -295,4 +295,4 @@ obj/item/clothing/mask/smokable/ecig/util/examine(mob/user)
|
||||
/obj/item/reagent_containers/ecig_cartridge/coffee
|
||||
name = "coffee flavour cartridge"
|
||||
desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its coffee flavored."
|
||||
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/coffee = 5)
|
||||
reagents_to_add = list(/singleton/reagent/toxin/tobacco/liquid = 10, /singleton/reagent/water = 10, /singleton/reagent/drink/coffee = 5)
|
||||
|
||||
@@ -378,18 +378,18 @@
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
Initialize()
|
||||
. = ..()
|
||||
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
|
||||
/obj/item/grenade/chem_grenade/monoammoniumphosphate/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent(/singleton/reagent/surfactant, 40)
|
||||
B1.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
|
||||
B2.reagents.add_reagent(/singleton/reagent/water, 40)
|
||||
B2.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
|
||||
B1.reagents.add_reagent(/singleton/reagent/surfactant, 40)
|
||||
B1.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
|
||||
B2.reagents.add_reagent(/singleton/reagent/water, 40)
|
||||
B2.reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, 20)
|
||||
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
proc/fragem(var/source,var/fragx,var/fragy,var/light_dam,var/flash_dam,var/p_dam,var/p_range,var/can_cover=TRUE,var/shard_range = 50)
|
||||
/proc/fragem(var/source,var/fragx,var/fragy,var/light_dam,var/flash_dam,var/p_dam,var/p_range,var/can_cover=TRUE,var/shard_range = 50)
|
||||
var/turf/O = get_turf(source)
|
||||
var/fragger = rand(fragx,fragy)
|
||||
explosion(O, -1, -1, light_dam, flash_dam)
|
||||
|
||||
@@ -125,9 +125,10 @@
|
||||
maxcharge = 30000 //determines how badly mobs get shocked
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 80)
|
||||
|
||||
check_charge()
|
||||
/obj/item/cell/infinite/check_charge()
|
||||
return 1
|
||||
use()
|
||||
|
||||
/obj/item/cell/infinite/use()
|
||||
return 1
|
||||
|
||||
/obj/item/cell/potato
|
||||
|
||||
@@ -94,18 +94,18 @@
|
||||
storage_cost = 29
|
||||
empty_delay = 0.8 SECOND
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
to_chat(user, "<span class='warning'>The Bluespace interfaces of the two devices conflict and malfunction.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
..()
|
||||
/obj/item/storage/backpack/holding/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
to_chat(user, "<span class='warning'>The Bluespace interfaces of the two devices conflict and malfunction.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
..()
|
||||
|
||||
//Please don't clutter the parent storage item with stupid hacks.
|
||||
can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
return 1
|
||||
return ..()
|
||||
/obj/item/storage/backpack/holding/can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/santabag
|
||||
name = "\improper Santa's gift bag"
|
||||
|
||||
@@ -70,6 +70,10 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
starts_with = list(/obj/item/paper/cig = 10)
|
||||
|
||||
/obj/item/storage/box/fancy/cigpaper/Initialize()
|
||||
. = ..()
|
||||
|
||||
make_exact_fit()
|
||||
|
||||
/obj/item/storage/box/fancy/cigpaper/update_icon()
|
||||
@@ -91,11 +95,15 @@
|
||||
)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
starts_with = list(/obj/item/cigarette_filter = 10)
|
||||
make_exact_fit()
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/gloves.ogg'
|
||||
use_sound = 'sound/items/storage/wrapper.ogg'
|
||||
|
||||
/obj/item/storage/cigfilter/Initialize(mapload, defer_shrinkwrap)
|
||||
. = ..()
|
||||
|
||||
make_exact_fit()
|
||||
|
||||
/obj/item/storage/box/fancy/cigpaper/fine
|
||||
name = "\improper Trident cigarette paper"
|
||||
desc = "A fancy brand of Trident cigarette paper, for rolling your own cigarettes. Like a person who appreciates the finer things in life."
|
||||
@@ -122,6 +130,10 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
starts_with = list(/obj/item/clothing/mask/chewable/tobacco = 6)
|
||||
|
||||
/obj/item/storage/chewables/Initialize(mapload, defer_shrinkwrap)
|
||||
. = ..()
|
||||
|
||||
make_exact_fit()
|
||||
|
||||
/obj/item/storage/chewables/tobacco/bad
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
desc = "Contains pills used to treat minor burns."
|
||||
starts_with = list(/obj/item/reagent_containers/pill/kelotane = 7)
|
||||
|
||||
obj/item/storage/pill_bottle/butazoline
|
||||
/obj/item/storage/pill_bottle/butazoline
|
||||
name = "bottle of 10u Butazoline pills"
|
||||
desc = "Contains pills used to severe injuries and bleeding."
|
||||
starts_with = list(/obj/item/reagent_containers/pill/butazoline = 7)
|
||||
|
||||
@@ -28,105 +28,105 @@
|
||||
max_storage_space = 16
|
||||
use_sound = 'sound/items/storage/briefcase.ogg'
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/melee/energy/blade) && emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
|
||||
var/obj/item/melee/energy/blade/blade = W
|
||||
blade.spark_system.queue()
|
||||
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
|
||||
playsound(src.loc, /singleton/sound_category/spark_sound, 50, 1)
|
||||
return
|
||||
|
||||
if (W.isscrewdriver())
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
src.open =! src.open
|
||||
to_chat(user, SPAN_NOTICE("You [src.open ? "open" : "close"] the service panel."))
|
||||
return
|
||||
if ((W.ismultitool()) && (src.open == 1)&& (!src.l_hacking))
|
||||
to_chat(user, SPAN_NOTICE("Now attempting to reset internal memory, please hold."))
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100))
|
||||
if (prob(40))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
to_chat(user, SPAN_NOTICE("Internal memory reset. Please give it a few seconds to reinitialize."))
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("Unable to reset internal memory."))
|
||||
src.l_hacking = 0
|
||||
else src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/melee/energy/blade) && emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
|
||||
var/obj/item/melee/energy/blade/blade = W
|
||||
blade.spark_system.queue()
|
||||
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
|
||||
playsound(src.loc, /singleton/sound_category/spark_sound, 50, 1)
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
..()
|
||||
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
if (W.isscrewdriver())
|
||||
if(W.use_tool(src, user, 20, volume = 50))
|
||||
src.open =! src.open
|
||||
to_chat(user, SPAN_NOTICE("You [src.open ? "open" : "close"] the service panel."))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.emagged)
|
||||
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
send_theme_resources(user)
|
||||
user << browse(enable_ui_theme(user, dat), "window=caselock;size=300x280")
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
if ((W.ismultitool()) && (src.open == 1)&& (!src.l_hacking))
|
||||
to_chat(user, SPAN_NOTICE("Now attempting to reset internal memory, please hold."))
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100))
|
||||
if (prob(40))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
to_chat(user, SPAN_NOTICE("Internal memory reset. Please give it a few seconds to reinitialize."))
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", href_list["type"])
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
to_chat(user, SPAN_WARNING("Unable to reset internal memory."))
|
||||
src.l_hacking = 0
|
||||
else src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/storage/secure/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.emagged)
|
||||
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
send_theme_resources(user)
|
||||
user << browse(enable_ui_theme(user, dat), "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", href_list["type"])
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/storage/secure/emag_act(var/remaining_charges, var/mob/user, var/feedback)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
@@ -190,7 +190,7 @@
|
||||
starts_with = list(/obj/item/paper = 1, /obj/item/pen = 1)
|
||||
|
||||
/obj/item/storage/secure/safe/attack_hand(mob/user as mob)
|
||||
return attack_self(user)
|
||||
return attack_self(user)
|
||||
|
||||
/*obj/item/storage/secure/safe/HoS/New()
|
||||
..()
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
desc = "This item type is used to randomly spawn a given object at round-start"
|
||||
icon_state = "x3"
|
||||
var/spawn_object = null
|
||||
item_to_spawn()
|
||||
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
|
||||
|
||||
/obj/random/single/item_to_spawn()
|
||||
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
|
||||
|
||||
/obj/random/tool
|
||||
name = "random tool"
|
||||
@@ -1487,46 +1488,47 @@
|
||||
/obj/item/toy/mech/honk
|
||||
)
|
||||
has_postspawn = TRUE
|
||||
post_spawn(obj/thing)
|
||||
var/list/frames = list(
|
||||
/obj/item/gun/custom_ka/frame01 = 1,
|
||||
/obj/item/gun/custom_ka/frame02 = 2,
|
||||
/obj/item/gun/custom_ka/frame03 = 3,
|
||||
/obj/item/gun/custom_ka/frame04 = 2,
|
||||
/obj/item/gun/custom_ka/frame05 = 1
|
||||
)
|
||||
|
||||
var/list/cells = list(
|
||||
/obj/item/custom_ka_upgrade/cells/cell01 = 2,
|
||||
/obj/item/custom_ka_upgrade/cells/cell02 = 3,
|
||||
/obj/item/custom_ka_upgrade/cells/cell03 = 2,
|
||||
/obj/item/custom_ka_upgrade/cells/cell04 = 1,
|
||||
/obj/item/custom_ka_upgrade/cells/cell05 = 1
|
||||
)
|
||||
/obj/random/custom_ka/post_spawn(obj/thing)
|
||||
var/list/frames = list(
|
||||
/obj/item/gun/custom_ka/frame01 = 1,
|
||||
/obj/item/gun/custom_ka/frame02 = 2,
|
||||
/obj/item/gun/custom_ka/frame03 = 3,
|
||||
/obj/item/gun/custom_ka/frame04 = 2,
|
||||
/obj/item/gun/custom_ka/frame05 = 1
|
||||
)
|
||||
|
||||
var/list/barrels = list(
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel01 = 2,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel02 = 3,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel03 = 2,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel04 = 1,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel05 = 1
|
||||
)
|
||||
var/list/cells = list(
|
||||
/obj/item/custom_ka_upgrade/cells/cell01 = 2,
|
||||
/obj/item/custom_ka_upgrade/cells/cell02 = 3,
|
||||
/obj/item/custom_ka_upgrade/cells/cell03 = 2,
|
||||
/obj/item/custom_ka_upgrade/cells/cell04 = 1,
|
||||
/obj/item/custom_ka_upgrade/cells/cell05 = 1
|
||||
)
|
||||
|
||||
var/frame_type = pickweight(frames)
|
||||
var/obj/item/gun/custom_ka/spawned_frame = new frame_type(thing.loc)
|
||||
var/list/barrels = list(
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel01 = 2,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel02 = 3,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel03 = 2,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel04 = 1,
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel05 = 1
|
||||
)
|
||||
|
||||
var/cell_type = pickweight(cells)
|
||||
spawned_frame.installed_cell = new cell_type(spawned_frame)
|
||||
var/frame_type = pickweight(frames)
|
||||
var/obj/item/gun/custom_ka/spawned_frame = new frame_type(thing.loc)
|
||||
|
||||
var/barrel_type = pickweight(barrels)
|
||||
spawned_frame.installed_barrel = new barrel_type(spawned_frame)
|
||||
var/cell_type = pickweight(cells)
|
||||
spawned_frame.installed_cell = new cell_type(spawned_frame)
|
||||
|
||||
spawned_frame.installed_upgrade_chip = new /obj/item/custom_ka_upgrade/upgrade_chips/capacity(spawned_frame)
|
||||
var/barrel_type = pickweight(barrels)
|
||||
spawned_frame.installed_barrel = new barrel_type(spawned_frame)
|
||||
|
||||
spawned_frame.update_icon()
|
||||
spawned_frame.update_stats()
|
||||
spawned_frame.installed_upgrade_chip = new /obj/item/custom_ka_upgrade/upgrade_chips/capacity(spawned_frame)
|
||||
|
||||
qdel(thing)
|
||||
spawned_frame.update_icon()
|
||||
spawned_frame.update_stats()
|
||||
|
||||
qdel(thing)
|
||||
|
||||
/obj/random/prebuilt_ka
|
||||
name = "random prebuilt kinetic accelerator"
|
||||
|
||||
@@ -57,79 +57,79 @@
|
||||
U.hidden_uplink.uses = 40
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources/
|
||||
/obj/structure/closet/syndicate/resources
|
||||
desc = "An old, dusty locker."
|
||||
|
||||
fill()
|
||||
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
|
||||
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
|
||||
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
|
||||
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
|
||||
/obj/structure/closet/syndicate/resources/fill()
|
||||
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
|
||||
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
|
||||
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
|
||||
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
|
||||
|
||||
var/pickednum = rand(1, 50)
|
||||
var/pickednum = rand(1, 50)
|
||||
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/paper/P = new /obj/item/paper(src)
|
||||
P.name = "IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/paper/P = new /obj/item/paper(src)
|
||||
P.name = "IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/material/steel(src, rand(common_min, common_max))
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/material/steel(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/material/glass(src, rand(common_min, common_max))
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/material/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then phoron
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/material/plasteel(src, rand(common_min, common_max))
|
||||
//Plasteel (common ore) Because it has a million more uses then phoron
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/material/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Phoron (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/material/phoron(src, rand(rare_min, rare_max))
|
||||
//Phoron (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/material/phoron(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/material/silver(src, rand(rare_min, rare_max))
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/material/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/material/gold(src, rand(rare_min, rare_max))
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/material/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/material/uranium(src, rand(rare_min, rare_max))
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/material/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/material/diamond(src, rand(rare_min, rare_max))
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/material/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
new /obj/item/tank/jetpack/carbondioxide(src)
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
new /obj/item/tank/jetpack/carbondioxide(src)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
|
||||
fill()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/material/steel,
|
||||
/obj/item/stack/material/glass,
|
||||
/obj/item/stack/material/gold,
|
||||
/obj/item/stack/material/silver,
|
||||
/obj/item/stack/material/phoron,
|
||||
/obj/item/stack/material/uranium,
|
||||
/obj/item/stack/material/diamond,
|
||||
/obj/item/stack/material/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
/obj/structure/closet/syndicate/resources/everything/fill()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/material/steel,
|
||||
/obj/item/stack/material/glass,
|
||||
/obj/item/stack/material/gold,
|
||||
/obj/item/stack/material/silver,
|
||||
/obj/item/stack/material/phoron,
|
||||
/obj/item/stack/material/uranium,
|
||||
/obj/item/stack/material/diamond,
|
||||
/obj/item/stack/material/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
|
||||
for(var/i = 0, i<2, i++)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
for(var/i = 0, i<2, i++)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
|
||||
@@ -311,18 +311,18 @@
|
||||
var/target_temp = T0C - 40
|
||||
var/cooling_power = 40
|
||||
|
||||
return_air()
|
||||
var/datum/gas_mixture/gas = (..())
|
||||
if(!gas) return null
|
||||
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
|
||||
newgas.copy_from(gas)
|
||||
if(newgas.temperature <= target_temp) return
|
||||
/obj/structure/closet/crate/freezer/return_air()
|
||||
var/datum/gas_mixture/gas = (..())
|
||||
if(!gas) return null
|
||||
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
|
||||
newgas.copy_from(gas)
|
||||
if(newgas.temperature <= target_temp) return
|
||||
|
||||
if((newgas.temperature - cooling_power) > target_temp)
|
||||
newgas.temperature -= cooling_power
|
||||
else
|
||||
newgas.temperature = target_temp
|
||||
return newgas
|
||||
if((newgas.temperature - cooling_power) > target_temp)
|
||||
newgas.temperature -= cooling_power
|
||||
else
|
||||
newgas.temperature = target_temp
|
||||
return newgas
|
||||
|
||||
/obj/structure/closet/crate/freezer/rations //For use in the escape shuttle
|
||||
name = "emergency rations"
|
||||
@@ -507,17 +507,17 @@
|
||||
icon_state = "hydro_crate"
|
||||
|
||||
/obj/structure/closet/crate/hydroponics/prespawned
|
||||
//This exists so the prespawned hydro crates spawn with their contents.
|
||||
|
||||
fill()
|
||||
new /obj/item/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/material/minihoe(src)
|
||||
// new /obj/item/weedspray(src)
|
||||
// new /obj/item/weedspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
//This exists so the prespawned hydro crates spawn with their contents.
|
||||
/obj/structure/closet/crate/hydroponics/prespawned/fill()
|
||||
new /obj/item/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/material/minihoe(src)
|
||||
// new /obj/item/weedspray(src)
|
||||
// new /obj/item/weedspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
// new /obj/item/pestspray(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -244,10 +244,11 @@
|
||||
destroyed = 1
|
||||
icon_state = "grille-b"
|
||||
density = 0
|
||||
New()
|
||||
..()
|
||||
health = rand(-5, -1) //In the destroyed but not utterly threshold.
|
||||
healthcheck() //Send this to healthcheck just in case we want to do something else with it.
|
||||
|
||||
/obj/structure/grille/broken/New()
|
||||
..()
|
||||
health = rand(-5, -1) //In the destroyed but not utterly threshold.
|
||||
healthcheck() //Send this to healthcheck just in case we want to do something else with it.
|
||||
|
||||
/obj/structure/grille/diagonal
|
||||
icon_state = "grille_diagonal"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
obj/structure/windoor_assembly
|
||||
/obj/structure/windoor_assembly
|
||||
name = "windoor assembly"
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
icon_state = "l_windoor_assembly01"
|
||||
@@ -40,7 +40,7 @@ obj/structure/windoor_assembly
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
obj/structure/windoor_assembly/Destroy()
|
||||
/obj/structure/windoor_assembly/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
return ..()
|
||||
|
||||
@@ -2,133 +2,122 @@
|
||||
// Uses BYOND's type system to put everything into a nice format
|
||||
|
||||
/datum/news_announcement
|
||||
var
|
||||
round_time // time of the round at which this should be announced, in seconds
|
||||
message // body of the message
|
||||
author = "NanoTrasen Editor"
|
||||
channel_name = "Tau Ceti Daily"
|
||||
can_be_redacted = 0
|
||||
message_type = "Story"
|
||||
/// time of the round at which this should be announced, in seconds
|
||||
var/round_time
|
||||
/// body of the message
|
||||
var/message
|
||||
var/author = "NanoTrasen Editor"
|
||||
var/channel_name = "Tau Ceti Daily"
|
||||
var/can_be_redacted = 0
|
||||
var/message_type = "Story"
|
||||
|
||||
revolution_inciting_event
|
||||
/datum/news_announcement/revolution_inciting_event/paycuts_suspicion
|
||||
round_time = 60*10
|
||||
message = {"Reports have leaked that NanoTrasen is planning to put paycuts into
|
||||
effect on many of its Research Stations in Tau Ceti. Apparently these research
|
||||
stations haven't been able to yield the expected revenue, and thus adjustments
|
||||
have to be made."}
|
||||
author = "Unauthorized"
|
||||
|
||||
paycuts_suspicion
|
||||
round_time = 60*10
|
||||
message = {"Reports have leaked that NanoTrasen is planning to put paycuts into
|
||||
effect on many of its Research Stations in Tau Ceti. Apparently these research
|
||||
stations haven't been able to yield the expected revenue, and thus adjustments
|
||||
have to be made."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/revolution_inciting_event/paycuts_confirmation
|
||||
round_time = 60*40
|
||||
message = {"Earlier rumours about paycuts on Research Stations in the Tau Ceti system have
|
||||
been confirmed. Shockingly, however, the cuts will only affect lower tier
|
||||
personnel. Heads of Staff will, according to our sources, not be affected."}
|
||||
author = "Unauthorized"
|
||||
|
||||
paycuts_confirmation
|
||||
round_time = 60*40
|
||||
message = {"Earlier rumours about paycuts on Research Stations in the Tau Ceti system have
|
||||
been confirmed. Shockingly, however, the cuts will only affect lower tier
|
||||
personnel. Heads of Staff will, according to our sources, not be affected."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/revolution_inciting_event/human_experiments
|
||||
round_time = 60*90
|
||||
message = {"Unbelievable reports about human experimentation have reached our ears. According
|
||||
to a refugee from one of the Tau Ceti Research Stations, their station, in order
|
||||
to increase revenue, has refactored several of their facilities to perform experiments
|
||||
on live humans, including virology research, genetic manipulation, and \"feeding them
|
||||
to the slimes to see what happens\". Allegedly, these test subjects were neither
|
||||
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
|
||||
the experiments, and reported to have died in a \"work accident\" by NanoTrasen."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/bluespace_research/announcement
|
||||
round_time = 60*20
|
||||
message = {"The new field of research trying to explain several interesting spacetime oddities,
|
||||
also known as \"Bluespace Research\", has reached new heights. Of the several
|
||||
hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped
|
||||
to experiment with and research Bluespace effects. Rumours have it some of these
|
||||
stations even sport functional \"travel gates\" that can instantly move a whole research
|
||||
team to an alternate reality."}
|
||||
/datum/news_announcement/random_junk/cheesy_honkers
|
||||
author = "Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Do cheesy honkers increase risk of having a miscarriage? Several health administrations
|
||||
say so!"}
|
||||
round_time = 60 * 15
|
||||
|
||||
human_experiments
|
||||
round_time = 60*90
|
||||
message = {"Unbelievable reports about human experimentation have reached our ears. According
|
||||
to a refugee from one of the Tau Ceti Research Stations, their station, in order
|
||||
to increase revenue, has refactored several of their facilities to perform experiments
|
||||
on live humans, including virology research, genetic manipulation, and \"feeding them
|
||||
to the slimes to see what happens\". Allegedly, these test subjects were neither
|
||||
humanified monkeys nor volunteers, but rather unqualified staff that were forced into
|
||||
the experiments, and reported to have died in a \"work accident\" by NanoTrasen."}
|
||||
author = "Unauthorized"
|
||||
/datum/news_announcement/random_junk/net_block
|
||||
author = "Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Several corporations banding together to block access to 'wetskrell.nt', site administrators
|
||||
claiming violation of net laws."}
|
||||
round_time = 60 * 50
|
||||
|
||||
bluespace_research
|
||||
/datum/news_announcement/random_junk/found_ssd
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Doctor Eric Hanfield"
|
||||
|
||||
announcement
|
||||
round_time = 60*20
|
||||
message = {"The new field of research trying to explain several interesting spacetime oddities,
|
||||
also known as \"Bluespace Research\", has reached new heights. Of the several
|
||||
hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped
|
||||
to experiment with and research Bluespace effects. Rumours have it some of these
|
||||
stations even sport functional \"travel gates\" that can instantly move a whole research
|
||||
team to an alternate reality."}
|
||||
message = {"Several people have been found unconscious at their terminals. It is thought that it was due
|
||||
to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage
|
||||
reveals that many of them were playing games instead of working and their pay has been docked
|
||||
accordingly."}
|
||||
round_time = 60 * 90
|
||||
|
||||
random_junk
|
||||
/datum/news_announcement/lotus_tree/explosions
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Leland H. Howards"
|
||||
|
||||
cheesy_honkers
|
||||
author = "Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Do cheesy honkers increase risk of having a miscarriage? Several health administrations
|
||||
say so!"}
|
||||
round_time = 60 * 15
|
||||
message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
|
||||
bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of
|
||||
the explosions remain unknown, but there is speculation that it might have something to do with
|
||||
the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L
|
||||
announced that they were officially acknowledging inter-species marriage and providing couples
|
||||
with marriage tax-benefits."}
|
||||
round_time = 60 * 30
|
||||
|
||||
net_block
|
||||
author = "Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazette"
|
||||
message = {"Several corporations banding together to block access to 'wetskrell.nt', site administrators
|
||||
claiming violation of net laws."}
|
||||
round_time = 60 * 50
|
||||
/datum/news_announcement/food_riots/breaking_news
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
found_ssd
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Doctor Eric Hanfield"
|
||||
message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
|
||||
Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the
|
||||
colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to
|
||||
continue. NanoTrasen officials have not given any details about said factions. More on that at the top of
|
||||
the hour."}
|
||||
round_time = 60 * 10
|
||||
|
||||
message = {"Several people have been found unconscious at their terminals. It is thought that it was due
|
||||
to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage
|
||||
reveals that many of them were playing games instead of working and their pay has been docked
|
||||
accordingly."}
|
||||
round_time = 60 * 90
|
||||
/datum/news_announcement/food_riots/more
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
lotus_tree
|
||||
|
||||
explosions
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Leland H. Howards"
|
||||
|
||||
message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
|
||||
bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of
|
||||
the explosions remain unknown, but there is speculation that it might have something to do with
|
||||
the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L
|
||||
announced that they were officially acknowledging inter-species marriage and providing couples
|
||||
with marriage tax-benefits."}
|
||||
round_time = 60 * 30
|
||||
|
||||
food_riots
|
||||
|
||||
breaking_news
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
|
||||
Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the
|
||||
colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to
|
||||
continue. NanoTrasen officials have not given any details about said factions. More on that at the top of
|
||||
the hour."}
|
||||
round_time = 60 * 10
|
||||
|
||||
more
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = {"More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from
|
||||
the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason
|
||||
NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Phoron deposits have been completely mined out.
|
||||
We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them
|
||||
\"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell
|
||||
the riots. More on this at 6."}
|
||||
round_time = 60 * 60
|
||||
message = {"More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from
|
||||
the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason
|
||||
NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Phoron deposits have been completely mined out.
|
||||
We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them
|
||||
\"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell
|
||||
the riots. More on this at 6."}
|
||||
round_time = 60 * 60
|
||||
|
||||
|
||||
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots)
|
||||
|
||||
proc/process_newscaster()
|
||||
/proc/process_newscaster()
|
||||
check_for_newscaster_updates(SSticker.mode.newscaster_announcements)
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
proc/check_for_newscaster_updates(type)
|
||||
/proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in typesof(type)-type)
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
announce_newscaster_news(news)
|
||||
|
||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
/proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
var/datum/feed_channel/sendto = SSnews.GetFeedChannel(news.channel_name)
|
||||
if(!sendto)
|
||||
SSnews.CreateFeedChannel(news.channel_name, news.author, 1, 1)
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
anchored = 1
|
||||
atmos_canpass = CANPASS_NEVER
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(!height || air_group) return 0
|
||||
else return ..()
|
||||
/obj/structure/shuttle/window/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(!height || air_group) return 0
|
||||
else return ..()
|
||||
|
||||
/obj/structure/shuttle/engine
|
||||
name = "engine"
|
||||
|
||||
@@ -34,7 +34,7 @@ callback_args - arguments for callback function
|
||||
|
||||
Be sure to include required js functions in your page, or it'll raise an exception.
|
||||
*/
|
||||
proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
|
||||
/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
|
||||
if(receiver && target_element && control_id) // && winexists(receiver, control_id))
|
||||
var/list/argums = list(target_element, new_content)
|
||||
if(callback)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define STICKYBAN_MAX_ADMIN_MATCHES 1
|
||||
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
world/IsBanned(key, address, computer_id, type, real_bans_only = FALSE)
|
||||
/world/IsBanned(key, address, computer_id, type, real_bans_only = FALSE)
|
||||
if (type == "world")
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ var/global/enabled_spooking = 0
|
||||
var/msg = rendered
|
||||
to_chat(C, msg)
|
||||
|
||||
proc/admin_notice(var/message, var/rights)
|
||||
/proc/admin_notice(var/message, var/rights)
|
||||
for(var/mob/M in mob_list)
|
||||
if(check_rights(rights, 0, M))
|
||||
to_chat(M, message)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/mob/var/mob/lastattacked = null
|
||||
/mob/var/attack_log = list()
|
||||
|
||||
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
|
||||
/proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
|
||||
var/turf/T = location ? location : (user ? get_turf(user) : null)
|
||||
if(T)
|
||||
message = message + " (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)"
|
||||
@@ -10,7 +10,7 @@ proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/lo
|
||||
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
|
||||
message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
|
||||
|
||||
proc/log_and_message_admins_many(var/list/mob/users, var/message)
|
||||
/proc/log_and_message_admins_many(var/list/mob/users, var/message)
|
||||
if(!users || !users.len)
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@ proc/log_and_message_admins_many(var/list/mob/users, var/message)
|
||||
log_admin("[english_list(user_keys)] [message]")
|
||||
message_admins("[english_list(user_keys)] [message]")
|
||||
|
||||
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
|
||||
/proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
|
||||
var/jmp_link = ""
|
||||
if(victim)
|
||||
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>")
|
||||
@@ -32,14 +32,14 @@ proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, va
|
||||
|
||||
msg_admin_attack("[attacker ? key_name_admin(attacker) : ""] [admin_message] [victim ? key_name_admin(victim) : ""] (INTENT: [attacker? uppertext(attacker.a_intent) : "N/A"])[jmp_link]",ckey=key_name(attacker),ckey_target=key_name(victim))
|
||||
|
||||
proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
|
||||
/proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
|
||||
if(!victims || !victims.len)
|
||||
return
|
||||
|
||||
for(var/mob/victim in victims)
|
||||
admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message)
|
||||
|
||||
proc/admin_inject_log(mob/attacker, mob/victim, obj/item/I, reagents, temperature, amount_transferred, violent=0)
|
||||
/proc/admin_inject_log(mob/attacker, mob/victim, obj/item/I, reagents, temperature, amount_transferred, violent=0)
|
||||
if(violent)
|
||||
violent = "violently "
|
||||
else
|
||||
|
||||
@@ -73,7 +73,7 @@ if rights_required == 0, then it simply checks if they are an admin.
|
||||
if it doesn't return 1 and show_msg=1 it will prints a message explaining why the check has failed
|
||||
generally it would be used like so:
|
||||
|
||||
proc/admin_proc()
|
||||
/proc/admin_proc()
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
to_world("you have enough rights!")
|
||||
|
||||
|
||||
@@ -1468,13 +1468,13 @@
|
||||
access_control_topic(href_list["access_control"])
|
||||
return
|
||||
|
||||
mob/living/proc/can_centcom_reply()
|
||||
/mob/living/proc/can_centcom_reply()
|
||||
return 0
|
||||
|
||||
mob/living/carbon/human/can_centcom_reply()
|
||||
/mob/living/carbon/human/can_centcom_reply()
|
||||
return istype(l_ear, /obj/item/device/radio/headset) || istype(r_ear, /obj/item/device/radio/headset)
|
||||
|
||||
mob/living/silicon/ai/can_centcom_reply()
|
||||
/mob/living/silicon/ai/can_centcom_reply()
|
||||
return common_radio != null && !check_unable(2)
|
||||
|
||||
/client/proc/extra_admin_link()
|
||||
|
||||
@@ -98,332 +98,362 @@
|
||||
|
||||
|
||||
|
||||
/datum/SDQL_parser/proc
|
||||
|
||||
//query: select_query | delete_query | update_query
|
||||
query(i, list/node)
|
||||
query_type = tokenl(i)
|
||||
/datum/SDQL_parser/proc/query(i, list/node)
|
||||
query_type = tokenl(i)
|
||||
|
||||
switch(query_type)
|
||||
if("select")
|
||||
select_query(i, node)
|
||||
switch(query_type)
|
||||
if("select")
|
||||
select_query(i, node)
|
||||
|
||||
if("delete")
|
||||
delete_query(i, node)
|
||||
if("delete")
|
||||
delete_query(i, node)
|
||||
|
||||
if("update")
|
||||
update_query(i, node)
|
||||
if("update")
|
||||
update_query(i, node)
|
||||
|
||||
if("call")
|
||||
call_query(i, node)
|
||||
if("call")
|
||||
call_query(i, node)
|
||||
|
||||
if("explain")
|
||||
node += "explain"
|
||||
node["explain"] = list()
|
||||
query(i + 1, node["explain"])
|
||||
if("explain")
|
||||
node += "explain"
|
||||
node["explain"] = list()
|
||||
query(i + 1, node["explain"])
|
||||
|
||||
|
||||
// select_query: 'SELECT' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]
|
||||
select_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
/datum/SDQL_parser/proc/select_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
|
||||
node += "select"
|
||||
node["select"] = select
|
||||
node += "select"
|
||||
node["select"] = select
|
||||
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//delete_query: 'DELETE' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]
|
||||
delete_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
/datum/SDQL_parser/proc/delete_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
|
||||
node += "delete"
|
||||
node["delete"] = select
|
||||
node += "delete"
|
||||
node["delete"] = select
|
||||
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//update_query: 'UPDATE' select_list [('FROM' | 'IN') from_list] 'SET' assignments ['WHERE' bool_expression]
|
||||
update_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
/datum/SDQL_parser/proc/update_query(i, list/node)
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
|
||||
node += "update"
|
||||
node["update"] = select
|
||||
node += "update"
|
||||
node["update"] = select
|
||||
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
|
||||
if(tokenl(i) != "set")
|
||||
i = parse_error("UPDATE has misplaced SET")
|
||||
if(tokenl(i) != "set")
|
||||
i = parse_error("UPDATE has misplaced SET")
|
||||
|
||||
var/list/set_assignments = list()
|
||||
i = assignments(i + 1, set_assignments)
|
||||
var/list/set_assignments = list()
|
||||
i = assignments(i + 1, set_assignments)
|
||||
|
||||
node += "set"
|
||||
node["set"] = set_assignments
|
||||
node += "set"
|
||||
node["set"] = set_assignments
|
||||
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//call_query: 'CALL' call_function ['ON' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]]
|
||||
call_query(i, list/node)
|
||||
var/list/func = list()
|
||||
i = call_function(i + 1, func)
|
||||
/datum/SDQL_parser/proc/call_query(i, list/node)
|
||||
var/list/func = list()
|
||||
i = call_function(i + 1, func)
|
||||
|
||||
node += "call"
|
||||
node["call"] = func
|
||||
|
||||
if(tokenl(i) != "on")
|
||||
return i
|
||||
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
|
||||
node += "on"
|
||||
node["on"] = select
|
||||
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
node += "call"
|
||||
node["call"] = func
|
||||
|
||||
if(tokenl(i) != "on")
|
||||
return i
|
||||
|
||||
var/list/select = list()
|
||||
i = select_list(i + 1, select)
|
||||
|
||||
node += "on"
|
||||
node["on"] = select
|
||||
|
||||
var/list/from = list()
|
||||
if(tokenl(i) in list("from", "in"))
|
||||
i = from_list(i + 1, from)
|
||||
else
|
||||
from += "world"
|
||||
|
||||
node += "from"
|
||||
node["from"] = from
|
||||
|
||||
if(tokenl(i) == "where")
|
||||
var/list/where = list()
|
||||
i = bool_expression(i + 1, where)
|
||||
|
||||
node += "where"
|
||||
node["where"] = where
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//select_list: select_item [',' select_list]
|
||||
select_list(i, list/node)
|
||||
i = select_item(i, node)
|
||||
/datum/SDQL_parser/proc/select_list(i, list/node)
|
||||
i = select_item(i, node)
|
||||
|
||||
if(token(i) == ",")
|
||||
i = select_list(i + 1, node)
|
||||
if(token(i) == ",")
|
||||
i = select_list(i + 1, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//from_list: from_item [',' from_list]
|
||||
from_list(i, list/node)
|
||||
i = from_item(i, node)
|
||||
/datum/SDQL_parser/proc/from_list(i, list/node)
|
||||
i = from_item(i, node)
|
||||
|
||||
if(token(i) == ",")
|
||||
i = from_list(i + 1, node)
|
||||
if(token(i) == ",")
|
||||
i = from_list(i + 1, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//assignments: assignment, [',' assignments]
|
||||
assignments(i, list/node)
|
||||
i = assignment(i, node)
|
||||
/datum/SDQL_parser/proc/assignments(i, list/node)
|
||||
i = assignment(i, node)
|
||||
|
||||
if(token(i) == ",")
|
||||
i = assignments(i + 1, node)
|
||||
if(token(i) == ",")
|
||||
i = assignments(i + 1, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//select_item: '*' | select_function | object_type
|
||||
select_item(i, list/node)
|
||||
/datum/SDQL_parser/proc/select_item(i, list/node)
|
||||
if(token(i) == "*")
|
||||
node += "*"
|
||||
i++
|
||||
|
||||
if(token(i) == "*")
|
||||
node += "*"
|
||||
i++
|
||||
else if(tokenl(i) in select_functions)
|
||||
i = select_function(i, node)
|
||||
|
||||
else if(tokenl(i) in select_functions)
|
||||
i = select_function(i, node)
|
||||
else
|
||||
i = object_type(i, node)
|
||||
|
||||
else
|
||||
i = object_type(i, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//from_item: 'world' | object_type
|
||||
from_item(i, list/node)
|
||||
/datum/SDQL_parser/proc/from_item(i, list/node)
|
||||
if(token(i) == "world")
|
||||
node += "world"
|
||||
i++
|
||||
|
||||
if(token(i) == "world")
|
||||
node += "world"
|
||||
i++
|
||||
else
|
||||
i = object_type(i, node)
|
||||
|
||||
else
|
||||
i = object_type(i, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//bool_expression: expression [bool_operator bool_expression]
|
||||
bool_expression(i, list/node)
|
||||
/datum/SDQL_parser/proc/bool_expression(i, list/node)
|
||||
var/list/bool = list()
|
||||
i = expression(i, bool)
|
||||
|
||||
var/list/bool = list()
|
||||
i = expression(i, bool)
|
||||
node[++node.len] = bool
|
||||
|
||||
node[++node.len] = bool
|
||||
if(tokenl(i) in boolean_operators)
|
||||
i = bool_operator(i, node)
|
||||
i = bool_expression(i, node)
|
||||
|
||||
if(tokenl(i) in boolean_operators)
|
||||
i = bool_operator(i, node)
|
||||
i = bool_expression(i, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//assignment: <variable name> '=' expression
|
||||
assignment(i, list/node)
|
||||
/datum/SDQL_parser/proc/assignment(i, list/node)
|
||||
node += token(i)
|
||||
|
||||
node += token(i)
|
||||
if(token(i + 1) == "=")
|
||||
var/varname = token(i)
|
||||
node[varname] = list()
|
||||
|
||||
if(token(i + 1) == "=")
|
||||
var/varname = token(i)
|
||||
node[varname] = list()
|
||||
i = expression(i + 2, node[varname])
|
||||
|
||||
i = expression(i + 2, node[varname])
|
||||
else
|
||||
parse_error("Assignment expected, but no = found")
|
||||
|
||||
else
|
||||
parse_error("Assignment expected, but no = found")
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//variable: <variable name> | <variable name> '.' variable
|
||||
variable(i, list/node)
|
||||
var/list/L = list(token(i))
|
||||
node[++node.len] = L
|
||||
/datum/SDQL_parser/proc/variable(i, list/node)
|
||||
var/list/L = list(token(i))
|
||||
node[++node.len] = L
|
||||
|
||||
if(token(i + 1) == ".")
|
||||
L += "."
|
||||
i = variable(i + 2, L)
|
||||
if(token(i + 1) == ".")
|
||||
L += "."
|
||||
i = variable(i + 2, L)
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//object_type: <type path> | string
|
||||
/datum/SDQL_parser/proc/object_type(i, list/node)
|
||||
if(copytext(token(i), 1, 2) == "/")
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
i = string(i, node)
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//comparitor: '=' | '==' | '!=' | '<>' | '<' | '<=' | '>' | '>='
|
||||
/datum/SDQL_parser/proc/comparitor(i, list/node)
|
||||
if(token(i) in list("=", "==", "!=", "<>", "<", "<=", ">", ">="))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Unknown comparitor [token(i)]")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//bool_operator: 'AND' | '&&' | 'OR' | '||'
|
||||
/datum/SDQL_parser/proc/bool_operator(i, list/node)
|
||||
if(tokenl(i) in list("and", "or", "&&", "||"))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Unknown comparitor [token(i)]")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//string: ''' <some text> ''' | '"' <some text > '"'
|
||||
/datum/SDQL_parser/proc/string(i, list/node)
|
||||
if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Expected string but found '[token(i)]'")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//call_function: <function name> ['(' [arguments] ')']
|
||||
/datum/SDQL_parser/proc/call_function(i, list/node)
|
||||
parse_error("Sorry, function calls aren't available yet")
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//select_function: count_function
|
||||
/datum/SDQL_parser/proc/select_function(i, list/node)
|
||||
parse_error("Sorry, function calls aren't available yet")
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//expression: ( unary_expression | '(' expression ')' | value ) [binary_operator expression]
|
||||
/datum/SDQL_parser/proc/expression(i, list/node)
|
||||
if(token(i) in unary_operators)
|
||||
i = unary_expression(i, node)
|
||||
|
||||
else if(token(i) == "(")
|
||||
var/list/expr = list()
|
||||
|
||||
i = expression(i + 1, expr)
|
||||
|
||||
if(token(i) != ")")
|
||||
parse_error("Missing ) at end of expression.")
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
return i
|
||||
node[++node.len] = expr
|
||||
|
||||
else
|
||||
i = value(i, node)
|
||||
|
||||
if(token(i) in binary_operators)
|
||||
i = binary_operator(i, node)
|
||||
i = expression(i, node)
|
||||
|
||||
else if(token(i) in comparitors)
|
||||
i = binary_operator(i, node)
|
||||
|
||||
var/list/rhs = list()
|
||||
i = expression(i, rhs)
|
||||
|
||||
node[++node.len] = rhs
|
||||
|
||||
|
||||
//object_type: <type path> | string
|
||||
object_type(i, list/node)
|
||||
|
||||
if(copytext(token(i), 1, 2) == "/")
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
i = string(i, node)
|
||||
|
||||
return i + 1
|
||||
return i
|
||||
|
||||
|
||||
//comparitor: '=' | '==' | '!=' | '<>' | '<' | '<=' | '>' | '>='
|
||||
comparitor(i, list/node)
|
||||
//unary_expression: unary_operator ( unary_expression | value | '(' expression ')' )
|
||||
/datum/SDQL_parser/proc/unary_expression(i, list/node)
|
||||
if(token(i) in unary_operators)
|
||||
var/list/unary_exp = list()
|
||||
|
||||
if(token(i) in list("=", "==", "!=", "<>", "<", "<=", ">", ">="))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Unknown comparitor [token(i)]")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//bool_operator: 'AND' | '&&' | 'OR' | '||'
|
||||
bool_operator(i, list/node)
|
||||
|
||||
if(tokenl(i) in list("and", "or", "&&", "||"))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Unknown comparitor [token(i)]")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//string: ''' <some text> ''' | '"' <some text > '"'
|
||||
string(i, list/node)
|
||||
|
||||
if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
node += token(i)
|
||||
|
||||
else
|
||||
parse_error("Expected string but found '[token(i)]'")
|
||||
|
||||
return i + 1
|
||||
|
||||
|
||||
//call_function: <function name> ['(' [arguments] ')']
|
||||
call_function(i, list/node)
|
||||
|
||||
parse_error("Sorry, function calls aren't available yet")
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//select_function: count_function
|
||||
select_function(i, list/node)
|
||||
|
||||
parse_error("Sorry, function calls aren't available yet")
|
||||
|
||||
return i
|
||||
|
||||
|
||||
//expression: ( unary_expression | '(' expression ')' | value ) [binary_operator expression]
|
||||
expression(i, list/node)
|
||||
unary_exp += token(i)
|
||||
i++
|
||||
|
||||
if(token(i) in unary_operators)
|
||||
i = unary_expression(i, node)
|
||||
i = unary_expression(i, unary_exp)
|
||||
|
||||
else if(token(i) == "(")
|
||||
var/list/expr = list()
|
||||
@@ -436,96 +466,50 @@
|
||||
else
|
||||
i++
|
||||
|
||||
node[++node.len] = expr
|
||||
unary_exp[++unary_exp.len] = expr
|
||||
|
||||
else
|
||||
i = value(i, node)
|
||||
i = value(i, unary_exp)
|
||||
|
||||
if(token(i) in binary_operators)
|
||||
i = binary_operator(i, node)
|
||||
i = expression(i, node)
|
||||
|
||||
else if(token(i) in comparitors)
|
||||
i = binary_operator(i, node)
|
||||
|
||||
var/list/rhs = list()
|
||||
i = expression(i, rhs)
|
||||
|
||||
node[++node.len] = rhs
|
||||
node[++node.len] = unary_exp
|
||||
|
||||
|
||||
return i
|
||||
else
|
||||
parse_error("Expected unary operator but found '[token(i)]'")
|
||||
|
||||
|
||||
//unary_expression: unary_operator ( unary_expression | value | '(' expression ')' )
|
||||
unary_expression(i, list/node)
|
||||
|
||||
if(token(i) in unary_operators)
|
||||
var/list/unary_exp = list()
|
||||
|
||||
unary_exp += token(i)
|
||||
i++
|
||||
|
||||
if(token(i) in unary_operators)
|
||||
i = unary_expression(i, unary_exp)
|
||||
|
||||
else if(token(i) == "(")
|
||||
var/list/expr = list()
|
||||
|
||||
i = expression(i + 1, expr)
|
||||
|
||||
if(token(i) != ")")
|
||||
parse_error("Missing ) at end of expression.")
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
unary_exp[++unary_exp.len] = expr
|
||||
|
||||
else
|
||||
i = value(i, unary_exp)
|
||||
|
||||
node[++node.len] = unary_exp
|
||||
|
||||
|
||||
else
|
||||
parse_error("Expected unary operator but found '[token(i)]'")
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
//binary_operator: comparitor | '+' | '-' | '/' | '*' | '&' | '|' | '^'
|
||||
binary_operator(i, list/node)
|
||||
/datum/SDQL_parser/proc/binary_operator(i, list/node)
|
||||
if(token(i) in (binary_operators + comparitors))
|
||||
node += token(i)
|
||||
|
||||
if(token(i) in (binary_operators + comparitors))
|
||||
node += token(i)
|
||||
else
|
||||
parse_error("Unknown binary operator [token(i)]")
|
||||
|
||||
else
|
||||
parse_error("Unknown binary operator [token(i)]")
|
||||
|
||||
return i + 1
|
||||
return i + 1
|
||||
|
||||
|
||||
//value: variable | string | number | 'null'
|
||||
value(i, list/node)
|
||||
/datum/SDQL_parser/proc/value(i, list/node)
|
||||
if(token(i) == "null")
|
||||
node += "null"
|
||||
i++
|
||||
|
||||
if(token(i) == "null")
|
||||
node += "null"
|
||||
i++
|
||||
else if(isnum(text2num(token(i))))
|
||||
node += text2num(token(i))
|
||||
i++
|
||||
|
||||
else if(isnum(text2num(token(i))))
|
||||
node += text2num(token(i))
|
||||
i++
|
||||
else if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
i = string(i, node)
|
||||
|
||||
else if(copytext(token(i), 1, 2) in list("'", "\""))
|
||||
i = string(i, node)
|
||||
else
|
||||
i = variable(i, node)
|
||||
|
||||
else
|
||||
i = variable(i, node)
|
||||
|
||||
return i
|
||||
return i
|
||||
|
||||
|
||||
|
||||
|
||||
/*EXPLAIN SELECT * WHERE 42 = 6 * 9 OR val = - 5 == 7*/
|
||||
/*EXPLAIN SELECT * WHERE 42 = 6 * 9 OR val = - 5 == 7*/
|
||||
|
||||
@@ -26,9 +26,9 @@ var/intercom_range_display_status = 0
|
||||
icon = 'icons/480x480.dmi'
|
||||
icon_state = "25percent"
|
||||
|
||||
New()
|
||||
src.pixel_x = -224
|
||||
src.pixel_y = -224
|
||||
/obj/effect/debugging/camera_range/New()
|
||||
src.pixel_x = -224
|
||||
src.pixel_y = -224
|
||||
|
||||
/obj/effect/debugging/marker
|
||||
icon = 'icons/turf/areas.dmi'
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on) return
|
||||
else
|
||||
@@ -231,7 +231,7 @@ Allow admins to set players to be able to respawn/bypass 30 min wait, without th
|
||||
Ccomp's first proc.
|
||||
*/
|
||||
|
||||
proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
/proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
// what = 1, return ghosts ass list.
|
||||
// what = 2, return mob list
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
else
|
||||
return 0
|
||||
|
||||
obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/atmos1, obj/machinery/atmospherics/atmos2)
|
||||
/obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/atmos1, obj/machinery/atmospherics/atmos2)
|
||||
return (atmos1.connect_types & atmos2.connect_types)
|
||||
|
||||
/obj/machinery/atmospherics/proc/check_connect_types_construction(obj/machinery/atmospherics/atmos1, obj/item/pipe/pipe2)
|
||||
|
||||
@@ -85,4 +85,4 @@
|
||||
"You hear a ratchet."
|
||||
)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -9,87 +9,87 @@
|
||||
|
||||
var/datum/pipe_network/network
|
||||
|
||||
Initialize()
|
||||
initialize_directions = dir
|
||||
air_contents = new
|
||||
air_contents.volume = 200
|
||||
. = ..()
|
||||
/obj/machinery/atmospherics/unary/Initialize()
|
||||
initialize_directions = dir
|
||||
air_contents = new
|
||||
air_contents.volume = 200
|
||||
. = ..()
|
||||
|
||||
// Housekeeping and pipe network stuff below
|
||||
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
if(reference == node)
|
||||
network = new_network
|
||||
/obj/machinery/atmospherics/unary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
if(reference == node)
|
||||
network = new_network
|
||||
|
||||
if(new_network.normal_members.Find(src))
|
||||
return 0
|
||||
if(new_network.normal_members.Find(src))
|
||||
return 0
|
||||
|
||||
new_network.normal_members += src
|
||||
new_network.normal_members += src
|
||||
|
||||
return null
|
||||
return null
|
||||
|
||||
Destroy()
|
||||
QDEL_NULL(air_contents)
|
||||
/obj/machinery/atmospherics/unary/Destroy()
|
||||
QDEL_NULL(air_contents)
|
||||
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
QDEL_NULL(network)
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
QDEL_NULL(network)
|
||||
|
||||
node = null
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/atmos_init()
|
||||
if(node) return
|
||||
|
||||
var/node_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/unary/build_network()
|
||||
if(!network && node)
|
||||
network = new /datum/pipe_network()
|
||||
network.normal_members += src
|
||||
network.build_network(node, src)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/return_network(obj/machinery/atmospherics/reference)
|
||||
build_network()
|
||||
|
||||
if(reference==node)
|
||||
return network
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/unary/reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
|
||||
if(network == old_network)
|
||||
network = new_network
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/return_network_air(datum/pipe_network/reference)
|
||||
var/list/results = list()
|
||||
|
||||
if(network == reference)
|
||||
results += air_contents
|
||||
|
||||
return results
|
||||
|
||||
/obj/machinery/atmospherics/unary/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node)
|
||||
qdel(network)
|
||||
node = null
|
||||
|
||||
return ..()
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
atmos_init()
|
||||
if(node) return
|
||||
|
||||
var/node_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
build_network()
|
||||
if(!network && node)
|
||||
network = new /datum/pipe_network()
|
||||
network.normal_members += src
|
||||
network.build_network(node, src)
|
||||
|
||||
|
||||
return_network(obj/machinery/atmospherics/reference)
|
||||
build_network()
|
||||
|
||||
if(reference==node)
|
||||
return network
|
||||
|
||||
return null
|
||||
|
||||
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
|
||||
if(network == old_network)
|
||||
network = new_network
|
||||
|
||||
return 1
|
||||
|
||||
return_network_air(datum/pipe_network/reference)
|
||||
var/list/results = list()
|
||||
|
||||
if(network == reference)
|
||||
results += air_contents
|
||||
|
||||
return results
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node)
|
||||
qdel(network)
|
||||
node = null
|
||||
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
return null
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/proc/is_welded() // TODO: refactor welding into unary
|
||||
if (welded > 0)
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
name = "exile"
|
||||
desc = "Prevents you from returning from away missions"
|
||||
|
||||
get_data()
|
||||
var/dat = {"
|
||||
/obj/item/implant/exile/get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> [current_map.company_name] Employee Exile Implant<BR>
|
||||
<b>Implant Details:</b> The onboard gateway system has been modified to reject entry by individuals containing this implant<BR>"}
|
||||
return dat
|
||||
return dat
|
||||
|
||||
/obj/item/implantcase/exile
|
||||
name = "Glass Case- 'Exile'"
|
||||
@@ -29,23 +29,23 @@
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/implant/exile( src )
|
||||
..()
|
||||
return
|
||||
/obj/item/implantcase/exile/New()
|
||||
src.imp = new /obj/item/implant/exile( src )
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/exile
|
||||
name = "Exile Implants"
|
||||
req_access = list(access_hos)
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/implanter/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
return
|
||||
/obj/structure/closet/secure_closet/exile/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/implanter/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
|
||||
|
||||
obj/machinery/gateway/centerstation/process()
|
||||
/obj/machinery/gateway/centerstation/process()
|
||||
if(stat & (NOPOWER))
|
||||
if(active) toggleoff()
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
proc/createRandomZlevel()
|
||||
/proc/createRandomZlevel()
|
||||
if(awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
datum/battle_monsters/
|
||||
/datum/battle_monsters
|
||||
var/name = "ERROR"
|
||||
var/icon_state
|
||||
var/id
|
||||
@@ -18,4 +18,4 @@ datum/battle_monsters/
|
||||
var/attack_mul = 1
|
||||
|
||||
var/defense_add = 0
|
||||
var/defense_mul = 1
|
||||
var/defense_mul = 1
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
rarity = BATTLE_MONSTERS_RARITY_RARE
|
||||
rarity_score = 1
|
||||
|
||||
datum/battle_monsters/monster/human/warrior
|
||||
/datum/battle_monsters/monster/human/warrior
|
||||
name = "Barbarian"
|
||||
id = "warrior"
|
||||
icon_state = "human"
|
||||
@@ -288,4 +288,4 @@ datum/battle_monsters/monster/human/warrior
|
||||
description = "a quadruped chitin female %SPECIES citizen of the hills of Kalakest. Despite being a peaceful race, %NAME can be seen wielding %WEAPON_AND to defend their nests from foolish raiders looking to steal from their valuable eggs. The females make excellent defenders because of this."
|
||||
attack_type = BATTLE_MONSTERS_ATTACKTYPE_CLAWS | BATTLE_MONSTERS_ATTACKTYPE_SWORDSMAN | BATTLE_MONSTERS_ATTACKTYPE_SHIELD
|
||||
rarity = BATTLE_MONSTERS_RARITY_UNCOMMON
|
||||
rarity_score = 1
|
||||
rarity_score = 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
sort_category = "Suits and Overwear"
|
||||
cost = 1
|
||||
|
||||
datum/gear/suit/colorvest
|
||||
/datum/gear/suit/colorvest
|
||||
display_name = "colorable vest"
|
||||
path = /obj/item/clothing/suit/storage/toggle/brown_jacket/sleeveless/colorable
|
||||
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
|
||||
|
||||
@@ -240,19 +240,19 @@
|
||||
*/
|
||||
var/datum/gear_tweak/social_credit/social_credit_tweak = new()
|
||||
|
||||
datum/gear_tweak/social_credit/get_contents(var/metadata)
|
||||
/datum/gear_tweak/social_credit/get_contents(var/metadata)
|
||||
return "Social Credit Score: [metadata]"
|
||||
|
||||
datum/gear_tweak/social_credit/get_default()
|
||||
/datum/gear_tweak/social_credit/get_default()
|
||||
return 5
|
||||
|
||||
datum/gear_tweak/social_credit/get_metadata(var/user, var/metadata)
|
||||
/datum/gear_tweak/social_credit/get_metadata(var/user, var/metadata)
|
||||
var/credit_score = input(user, "Set the credit score your passport will display, refer to the wiki to gauge it. (It will be slightly randomized to simulate Nralakk calculations.)", "Social Credit Score") as null|num
|
||||
if(credit_score)
|
||||
return round(credit_score, 0.01)
|
||||
return metadata
|
||||
|
||||
datum/gear_tweak/social_credit/tweak_item(var/obj/item/clothing/accessory/badge/passport/nralakk/PP, var/metadata)
|
||||
/datum/gear_tweak/social_credit/tweak_item(var/obj/item/clothing/accessory/badge/passport/nralakk/PP, var/metadata)
|
||||
if(!istype(PP))
|
||||
return
|
||||
PP.credit_score = metadata + pick(-0.01, 0, 0.01)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
datum/preferences
|
||||
/datum/preferences
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
|
||||
@@ -894,7 +894,7 @@ BLIND // can't see anything
|
||||
icon_state = "aviator_sec_idris"
|
||||
off_state = "aviator_sec_idris_off"
|
||||
|
||||
obj/item/clothing/glasses/sunglasses/sechud/aviator/visor
|
||||
/obj/item/clothing/glasses/sunglasses/sechud/aviator/visor
|
||||
name = "security HUD visor"
|
||||
desc = "NanoTrasen security visor glasses that can be switched between HUD and flash protection modes. They come with a built-in prescription overlay."
|
||||
icon_state = "visor_sec"
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
item_state = "thongsandal"
|
||||
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/shoes.dmi')
|
||||
|
||||
obj/item/clothing/shoes/sandal/clogs
|
||||
/obj/item/clothing/shoes/sandal/clogs
|
||||
name = "plastic clogs"
|
||||
desc = "A pair of plastic clog shoes."
|
||||
icon_state = "clogs"
|
||||
@@ -300,4 +300,4 @@ obj/item/clothing/shoes/sandal/clogs
|
||||
icon = 'icons/clothing/kit/skrell_armor.dmi'
|
||||
icon_state = "kala_boots"
|
||||
item_state = "kala_boots"
|
||||
contained_sprite = TRUE
|
||||
contained_sprite = TRUE
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
/obj/item/clothing/suit/storage/toggle/warden/zavod
|
||||
icon_state = "zav_warden_coat"
|
||||
item_state = "zav_warden_coat"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/warden/zavod/alt
|
||||
icon_state = "zav_warden_coat_alt"
|
||||
item_state = "zav_warden_coat_alt"
|
||||
|
||||
@@ -80,23 +80,24 @@
|
||||
/obj/item/clothing/suit/storage/vest
|
||||
var/icon_badge
|
||||
var/icon_nobadge
|
||||
verb/toggle()
|
||||
set name ="Adjust Badge"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(icon_state == icon_badge)
|
||||
icon_state = icon_nobadge
|
||||
to_chat(usr, "You conceal \the [src]'s badge.")
|
||||
else if(icon_state == icon_nobadge)
|
||||
icon_state = icon_badge
|
||||
to_chat(usr, "You reveal \the [src]'s badge.")
|
||||
else
|
||||
to_chat(usr, "\The [src] does not have a vest badge.")
|
||||
return
|
||||
update_clothing_icon()
|
||||
/obj/item/clothing/suit/storage/vest/verb/toggle()
|
||||
set name ="Adjust Badge"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(icon_state == icon_badge)
|
||||
icon_state = icon_nobadge
|
||||
to_chat(usr, "You conceal \the [src]'s badge.")
|
||||
else if(icon_state == icon_nobadge)
|
||||
icon_state = icon_badge
|
||||
to_chat(usr, "You reveal \the [src]'s badge.")
|
||||
else
|
||||
to_chat(usr, "\The [src] does not have a vest badge.")
|
||||
return
|
||||
update_clothing_icon()
|
||||
|
||||
// Corporate Jackets
|
||||
|
||||
|
||||
@@ -210,11 +210,11 @@
|
||||
fruit = list("potato" = 1, "ambrosia" = 3)
|
||||
items = list(/obj/item/reagent_containers/food/snacks/meatball)
|
||||
result = /obj/item/reagent_containers/food/snacks/salad/validsalad
|
||||
make_food(var/obj/container as obj)
|
||||
|
||||
. = ..(container)
|
||||
for (var/obj/item/reagent_containers/food/snacks/salad/validsalad/being_cooked in .)
|
||||
being_cooked.reagents.del_reagent(/singleton/reagent/toxin)
|
||||
/singleton/recipe/validsalad/make_food(var/obj/container as obj)
|
||||
. = ..(container)
|
||||
for (var/obj/item/reagent_containers/food/snacks/salad/validsalad/being_cooked in .)
|
||||
being_cooked.reagents.del_reagent(/singleton/reagent/toxin)
|
||||
|
||||
/*
|
||||
/singleton/recipe/neuralbroke
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
appliance = SAUCEPAN
|
||||
reagents = list(/singleton/reagent/water = 5, /singleton/reagent/alcohol/vodka = 5, /singleton/reagent/toxin/amatoxin = 5)
|
||||
result = /obj/item/reagent_containers/food/snacks/amanitajelly
|
||||
make_food(var/obj/container as obj)
|
||||
|
||||
. = ..(container)
|
||||
for (var/obj/item/reagent_containers/food/snacks/amanitajelly/being_cooked in .)
|
||||
being_cooked.reagents.del_reagent(/singleton/reagent/toxin/amatoxin)
|
||||
/singleton/recipe/amanitajelly/make_food(var/obj/container as obj)
|
||||
. = ..(container)
|
||||
for (var/obj/item/reagent_containers/food/snacks/amanitajelly/being_cooked in .)
|
||||
being_cooked.reagents.del_reagent(/singleton/reagent/toxin/amatoxin)
|
||||
|
||||
// Ports from the microwave... yeah
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
//This is the output of the stringpercent(print) proc, and means about 80% of
|
||||
//the print must be there for it to be complete. (Prints are 32 digits)
|
||||
var/const/FINGERPRINT_COMPLETE = 6
|
||||
proc/is_complete_print(var/print)
|
||||
/proc/is_complete_print(var/print)
|
||||
return stringpercent(print) <= FINGERPRINT_COMPLETE
|
||||
|
||||
atom/var/list/suit_fibers
|
||||
/atom/var/list/suit_fibers
|
||||
|
||||
atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
/atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.transfer_blood && G.bloody_hands_mob?.resolve()) //bloodied gloves transfer blood to touched objects
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
desc = "It's worth 1000 credits."
|
||||
worth = 1000
|
||||
|
||||
proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
/proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
if(sum in list(1000,500,200,100,50,20,10,1))
|
||||
var/cash_type = text2path("/obj/item/spacecash/c[sum]")
|
||||
var/obj/cash = new cash_type (spawnloc)
|
||||
|
||||
@@ -14,7 +14,7 @@ var/list/dreams = list(
|
||||
"a unathi","a tajaran","the ai core","the mining station","the research station","a beaker of strange liquid"
|
||||
)
|
||||
|
||||
mob/living/carbon/proc/dream()
|
||||
/mob/living/carbon/proc/dream()
|
||||
dreaming = 1
|
||||
|
||||
spawn(0)
|
||||
@@ -25,8 +25,8 @@ mob/living/carbon/proc/dream()
|
||||
break
|
||||
dreaming = 0
|
||||
|
||||
mob/living/carbon/proc/handle_dreams()
|
||||
/mob/living/carbon/proc/handle_dreams()
|
||||
if(client && !dreaming && prob(5))
|
||||
dream()
|
||||
|
||||
mob/living/carbon/var/dreaming = 0
|
||||
/mob/living/carbon/var/dreaming = 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
proc/Intoxicated(phrase)
|
||||
/proc/Intoxicated(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
@@ -23,7 +23,7 @@ proc/Intoxicated(phrase)
|
||||
newphrase+="[newletter]";counter-=1
|
||||
return newphrase
|
||||
|
||||
proc/stutter(phrase, str = 1)
|
||||
/proc/stutter(phrase, str = 1)
|
||||
if(str < 1)
|
||||
return phrase
|
||||
else
|
||||
@@ -78,10 +78,10 @@ proc/stutter(phrase, str = 1)
|
||||
|
||||
return jointext(split_phrase, " ")
|
||||
|
||||
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
/proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||
|
||||
proc/Ellipsis(original_msg, chance = 50)
|
||||
/proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance <= 0) return "..."
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var/global/list/mecha_image_cache = list()
|
||||
var/global/list/mecha_icon_cache = list()
|
||||
|
||||
proc/get_mech_image(var/cache_key, var/cache_icon, var/image_colour, var/overlay_layer = FLOAT_LAYER)
|
||||
/proc/get_mech_image(var/cache_key, var/cache_icon, var/image_colour, var/overlay_layer = FLOAT_LAYER)
|
||||
var/use_key = "[cache_key]-[cache_icon]-[image_colour ? image_colour : "none"]"
|
||||
if(image_colour) use_key += "-[image_colour]"
|
||||
if(!mecha_image_cache[use_key])
|
||||
@@ -13,7 +13,7 @@ proc/get_mech_image(var/cache_key, var/cache_icon, var/image_colour, var/overlay
|
||||
global.mecha_image_cache[use_key] = I
|
||||
return global.mecha_image_cache[use_key]
|
||||
|
||||
proc/get_mech_icon(var/list/components = list(), var/overlay_layer = FLOAT_LAYER)
|
||||
/proc/get_mech_icon(var/list/components = list(), var/overlay_layer = FLOAT_LAYER)
|
||||
var/list/all_images = list()
|
||||
for(var/obj/item/mech_component/comp in components)
|
||||
all_images += get_mech_image(comp.icon_state, comp.on_mech_icon, comp.color, overlay_layer)
|
||||
@@ -60,4 +60,4 @@ proc/get_mech_icon(var/list/components = list(), var/overlay_layer = FLOAT_LAYER
|
||||
overlays = new_overlays
|
||||
|
||||
/mob/living/heavy_vehicle/regenerate_icons()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
obj/item/integrated_circuit/list/len
|
||||
/obj/item/integrated_circuit/list/len
|
||||
name = "len circuit"
|
||||
desc = "This circuit will give length of the list."
|
||||
inputs = list(
|
||||
|
||||
@@ -148,36 +148,36 @@
|
||||
/obj/structure/bookcase/manuals/medical
|
||||
name = "Medical Manuals bookcase"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
update_icon()
|
||||
/obj/structure/bookcase/manuals/medical/New()
|
||||
..()
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/bookcase/manuals/engineering
|
||||
name = "Engineering Manuals bookcase"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/book/manual/wiki/engineering_construction(src)
|
||||
new /obj/item/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/book/manual/wiki/engineering_hacking(src)
|
||||
new /obj/item/book/manual/wiki/engineering_guide(src)
|
||||
new /obj/item/book/manual/atmospipes(src)
|
||||
new /obj/item/book/manual/engineering_singularity_safety(src)
|
||||
new /obj/item/book/manual/evaguide(src)
|
||||
update_icon()
|
||||
/obj/structure/bookcase/manuals/engineering/New()
|
||||
..()
|
||||
new /obj/item/book/manual/wiki/engineering_construction(src)
|
||||
new /obj/item/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/book/manual/wiki/engineering_hacking(src)
|
||||
new /obj/item/book/manual/wiki/engineering_guide(src)
|
||||
new /obj/item/book/manual/atmospipes(src)
|
||||
new /obj/item/book/manual/engineering_singularity_safety(src)
|
||||
new /obj/item/book/manual/evaguide(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bookcase/manuals/research_and_development
|
||||
name = "R&D Manuals bookcase"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/book/manual/research_and_development(src)
|
||||
update_icon()
|
||||
/obj/structure/bookcase/manuals/research_and_development/New()
|
||||
..()
|
||||
new /obj/item/book/manual/research_and_development(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/*
|
||||
@@ -354,4 +354,4 @@
|
||||
to_chat(user, SPAN_NOTICE("Computer has been associated with this unit."))
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("No associated computer found. Only local scans will function properly."))
|
||||
to_chat(user, "\n")
|
||||
to_chat(user, "\n")
|
||||
|
||||
@@ -4,10 +4,10 @@ var/liquid_delay = 4
|
||||
|
||||
var/list/datum/puddle/puddles = list()
|
||||
|
||||
datum/puddle
|
||||
/datum/puddle
|
||||
var/list/obj/effect/liquid/liquid_objects = list()
|
||||
|
||||
datum/puddle/process()
|
||||
/datum/puddle/process()
|
||||
for(var/obj/effect/liquid/L in liquid_objects)
|
||||
L.spread()
|
||||
|
||||
@@ -17,17 +17,17 @@ datum/puddle/process()
|
||||
if(liquid_objects.len == 0)
|
||||
qdel(src)
|
||||
|
||||
datum/puddle/New()
|
||||
/datum/puddle/New()
|
||||
..()
|
||||
puddles += src
|
||||
|
||||
datum/puddle/Destroy()
|
||||
/datum/puddle/Destroy()
|
||||
puddles -= src
|
||||
for(var/obj/O in liquid_objects)
|
||||
qdel(O)
|
||||
return ..()
|
||||
|
||||
client/proc/splash()
|
||||
/client/proc/splash()
|
||||
var/volume = input("Volume?","Volume?", 0 ) as num
|
||||
if(!isnum(volume)) return
|
||||
if(volume <= LIQUID_TRANSFER_THRESHOLD) return
|
||||
@@ -35,7 +35,7 @@ client/proc/splash()
|
||||
if(!isturf(T)) return
|
||||
trigger_splash(T, volume)
|
||||
|
||||
proc/trigger_splash(turf/epicenter as turf, volume as num)
|
||||
/proc/trigger_splash(turf/epicenter as turf, volume as num)
|
||||
if(!epicenter)
|
||||
return
|
||||
if(volume <= 0)
|
||||
@@ -51,7 +51,7 @@ proc/trigger_splash(turf/epicenter as turf, volume as num)
|
||||
|
||||
|
||||
|
||||
obj/effect/liquid
|
||||
/obj/effect/liquid
|
||||
icon = 'icons/effects/liquid.dmi'
|
||||
icon_state = "0"
|
||||
name = "liquid"
|
||||
@@ -59,7 +59,7 @@ obj/effect/liquid
|
||||
var/new_volume = 0
|
||||
var/datum/puddle/controller
|
||||
|
||||
obj/effect/liquid/New()
|
||||
/obj/effect/liquid/New()
|
||||
..()
|
||||
if( !isturf(loc) )
|
||||
qdel(src)
|
||||
@@ -68,7 +68,7 @@ obj/effect/liquid/New()
|
||||
if(L != src)
|
||||
qdel(L)
|
||||
|
||||
obj/effect/liquid/proc/spread()
|
||||
/obj/effect/liquid/proc/spread()
|
||||
|
||||
var/surrounding_volume = 0
|
||||
var/list/spread_directions = list(1,2,4,8)
|
||||
@@ -114,7 +114,7 @@ obj/effect/liquid/proc/spread()
|
||||
src.volume -= volume_per_tile //Remove the volume from this tile
|
||||
L.new_volume = L.new_volume + volume_per_tile //Add it to the volume to the other tile
|
||||
|
||||
obj/effect/liquid/proc/apply_calculated_effect()
|
||||
/obj/effect/liquid/proc/apply_calculated_effect()
|
||||
volume += new_volume
|
||||
|
||||
if(volume < LIQUID_TRANSFER_THRESHOLD)
|
||||
@@ -122,14 +122,14 @@ obj/effect/liquid/proc/apply_calculated_effect()
|
||||
new_volume = 0
|
||||
update_icon2()
|
||||
|
||||
obj/effect/liquid/Move()
|
||||
/obj/effect/liquid/Move()
|
||||
return 0
|
||||
|
||||
obj/effect/liquid/Destroy()
|
||||
/obj/effect/liquid/Destroy()
|
||||
src.controller.liquid_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
obj/effect/liquid/proc/update_icon2()
|
||||
/obj/effect/liquid/proc/update_icon2()
|
||||
//icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) )
|
||||
|
||||
switch(volume)
|
||||
@@ -150,17 +150,19 @@ obj/effect/liquid/proc/update_icon2()
|
||||
if(50 to INFINITY)
|
||||
icon_state = "7"
|
||||
|
||||
turf/proc/can_accept_liquid(from_direction)
|
||||
return 0
|
||||
turf/proc/can_leave_liquid(from_direction)
|
||||
/turf/proc/can_accept_liquid(from_direction)
|
||||
return 0
|
||||
|
||||
turf/space/can_accept_liquid(from_direction)
|
||||
return 1
|
||||
turf/space/can_leave_liquid(from_direction)
|
||||
/turf/proc/can_leave_liquid(from_direction)
|
||||
return 0
|
||||
|
||||
/turf/space/can_accept_liquid(from_direction)
|
||||
return 1
|
||||
|
||||
turf/simulated/floor/can_accept_liquid(from_direction)
|
||||
/turf/space/can_leave_liquid(from_direction)
|
||||
return 1
|
||||
|
||||
/turf/simulated/floor/can_accept_liquid(from_direction)
|
||||
for(var/obj/structure/window/W in src)
|
||||
if(W.dir in list(5,6,9,10))
|
||||
return 0
|
||||
@@ -171,7 +173,7 @@ turf/simulated/floor/can_accept_liquid(from_direction)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
turf/simulated/floor/can_leave_liquid(to_direction)
|
||||
/turf/simulated/floor/can_leave_liquid(to_direction)
|
||||
for(var/obj/structure/window/W in src)
|
||||
if(W.dir in list(5,6,9,10))
|
||||
return 0
|
||||
@@ -182,15 +184,15 @@ turf/simulated/floor/can_leave_liquid(to_direction)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
turf/simulated/wall/can_accept_liquid(from_direction)
|
||||
/turf/simulated/wall/can_accept_liquid(from_direction)
|
||||
return 0
|
||||
turf/simulated/wall/can_leave_liquid(from_direction)
|
||||
/turf/simulated/wall/can_leave_liquid(from_direction)
|
||||
return 0
|
||||
|
||||
obj/proc/liquid_pass()
|
||||
/obj/proc/liquid_pass()
|
||||
return 1
|
||||
|
||||
obj/machinery/door/liquid_pass()
|
||||
/obj/machinery/door/liquid_pass()
|
||||
return !density
|
||||
|
||||
#undef LIQUID_TRANSFER_THRESHOLD
|
||||
|
||||
@@ -1,63 +1,62 @@
|
||||
dmm_suite{
|
||||
/*
|
||||
/*
|
||||
dmm_suite version 1.0
|
||||
Released January 30th, 2011.
|
||||
|
||||
dmm_suite version 1.0
|
||||
Released January 30th, 2011.
|
||||
NOTE: Map saving functionality removed
|
||||
|
||||
NOTE: Map saving functionality removed
|
||||
defines the object /dmm_suite
|
||||
- Provides the proc load_map()
|
||||
- Loads the specified map file onto the specified z-level.
|
||||
- provides the proc write_map()
|
||||
- Returns a text string of the map in dmm format
|
||||
ready for output to a file.
|
||||
- provides the proc save_map()
|
||||
- Returns a .dmm file if map is saved
|
||||
- Returns FALSE if map fails to save
|
||||
|
||||
defines the object /dmm_suite
|
||||
- Provides the proc load_map()
|
||||
- Loads the specified map file onto the specified z-level.
|
||||
- provides the proc write_map()
|
||||
- Returns a text string of the map in dmm format
|
||||
ready for output to a file.
|
||||
- provides the proc save_map()
|
||||
- Returns a .dmm file if map is saved
|
||||
- Returns FALSE if map fails to save
|
||||
The dmm_suite provides saving and loading of map files in BYOND's native DMM map
|
||||
format. It approximates the map saving and loading processes of the Dream Maker
|
||||
and Dream Seeker programs so as to allow editing, saving, and loading of maps at
|
||||
runtime.
|
||||
|
||||
The dmm_suite provides saving and loading of map files in BYOND's native DMM map
|
||||
format. It approximates the map saving and loading processes of the Dream Maker
|
||||
and Dream Seeker programs so as to allow editing, saving, and loading of maps at
|
||||
runtime.
|
||||
------------------------
|
||||
|
||||
------------------------
|
||||
To save a map at runtime, create an instance of /dmm_suite, and then call
|
||||
write_map(), which accepts three arguments:
|
||||
- A turf representing one corner of a three dimensional grid (Required).
|
||||
- Another turf representing the other corner of the same grid (Required).
|
||||
- Any, or a combination, of several bit flags (Optional, see documentation).
|
||||
|
||||
To save a map at runtime, create an instance of /dmm_suite, and then call
|
||||
write_map(), which accepts three arguments:
|
||||
- A turf representing one corner of a three dimensional grid (Required).
|
||||
- Another turf representing the other corner of the same grid (Required).
|
||||
- Any, or a combination, of several bit flags (Optional, see documentation).
|
||||
The order in which the turfs are supplied does not matter, the /dmm_writer will
|
||||
determine the grid containing both, in much the same way as DM's block() function.
|
||||
write_map() will then return a string representing the saved map in dmm format;
|
||||
this string can then be saved to a file, or used for any other purose.
|
||||
|
||||
The order in which the turfs are supplied does not matter, the /dmm_writer will
|
||||
determine the grid containing both, in much the same way as DM's block() function.
|
||||
write_map() will then return a string representing the saved map in dmm format;
|
||||
this string can then be saved to a file, or used for any other purose.
|
||||
------------------------
|
||||
|
||||
------------------------
|
||||
To load a map at runtime, create an instance of /dmm_suite, and then call load_map(),
|
||||
which accepts two arguments:
|
||||
- A .dmm file to load (Required).
|
||||
- A number representing the z-level on which to start loading the map (Optional).
|
||||
|
||||
To load a map at runtime, create an instance of /dmm_suite, and then call load_map(),
|
||||
which accepts two arguments:
|
||||
- A .dmm file to load (Required).
|
||||
- A number representing the z-level on which to start loading the map (Optional).
|
||||
The /dmm_suite will load the map file starting on the specified z-level. If no
|
||||
z-level was specified, world.maxz will be increased so as to fit the map. Note
|
||||
that if you wish to load a map onto a z-level that already has objects on it,
|
||||
you will have to handle the removal of those objects. Otherwise the new map will
|
||||
simply load the new objects on top of the old ones.
|
||||
|
||||
The /dmm_suite will load the map file starting on the specified z-level. If no
|
||||
z-level was specified, world.maxz will be increased so as to fit the map. Note
|
||||
that if you wish to load a map onto a z-level that already has objects on it,
|
||||
you will have to handle the removal of those objects. Otherwise the new map will
|
||||
simply load the new objects on top of the old ones.
|
||||
Also note that all type paths specified in the .dmm file must exist in the world's
|
||||
code, and that the /dmm_reader trusts that files to be loaded are in fact valid
|
||||
.dmm files. Errors in the .dmm format will cause runtime errors.
|
||||
*/
|
||||
/dmm_suite
|
||||
|
||||
Also note that all type paths specified in the .dmm file must exist in the world's
|
||||
code, and that the /dmm_reader trusts that files to be loaded are in fact valid
|
||||
.dmm files. Errors in the .dmm format will cause runtime errors.
|
||||
/**
|
||||
* dmm_file: A .dmm file to load (Required).
|
||||
* z_offset: A number representing the z-level on which to start loading the map (Optional).
|
||||
* cropMap: When true, the map will be cropped to fit the existing world dimensions (Optional).
|
||||
* measureOnly: When true, no changes will be made to the world (Optional).
|
||||
* no_changeturf: When true, turf/AfterChange won't be called on loaded turfs
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
verb/load_map(var/dmm_file as file, var/x_offset as num, var/y_offset as num, var/z_offset as num, var/cropMap as num, var/measureOnly as num, no_changeturf as num){
|
||||
// dmm_file: A .dmm file to load (Required).
|
||||
// z_offset: A number representing the z-level on which to start loading the map (Optional).
|
||||
// cropMap: When true, the map will be cropped to fit the existing world dimensions (Optional).
|
||||
// measureOnly: When true, no changes will be made to the world (Optional).
|
||||
// no_changeturf: When true, turf/AfterChange won't be called on loaded turfs
|
||||
}
|
||||
}
|
||||
/dmm_suite/verb/load_map(var/dmm_file as file, var/x_offset as num, var/y_offset as num, var/z_offset as num, var/cropMap as num, var/measureOnly as num, no_changeturf as num)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
mob/verb/Convert(filename as file)
|
||||
dmp2swapmap(filename)
|
||||
|
||||
proc/d2sm_prepmap(filename)
|
||||
/proc/d2sm_prepmap(filename)
|
||||
var/txt = file2text(filename)
|
||||
if(!txt) return
|
||||
var/i,j
|
||||
@@ -23,7 +23,7 @@ proc/d2sm_prepmap(filename)
|
||||
i=findText(txt,"\\\n",i)
|
||||
return txt
|
||||
|
||||
proc/dmp2swapmap(filename)
|
||||
/proc/dmp2swapmap(filename)
|
||||
//var/txt = file2text(filename)
|
||||
//if(!txt) return
|
||||
var/txt = d2sm_prepmap(filename)
|
||||
@@ -185,7 +185,7 @@ proc/dmp2swapmap(filename)
|
||||
to_chat(F, "\t\t\t[x]")
|
||||
to_chat(F, codes[pick(codes)] */
|
||||
|
||||
proc/d2sm_ParseCommaList(txt)
|
||||
/proc/d2sm_ParseCommaList(txt)
|
||||
var/list/L=new
|
||||
var/i,ch
|
||||
for(i=1,i<=length(txt),++i)
|
||||
@@ -203,7 +203,7 @@ proc/d2sm_ParseCommaList(txt)
|
||||
if(i>1) L+=copytext(txt,1,i)
|
||||
return L
|
||||
|
||||
proc/d2sm_MatchBrace(txt, i, which)
|
||||
/proc/d2sm_MatchBrace(txt, i, which)
|
||||
if(which==40) ++which
|
||||
else which+=2
|
||||
var/j,ch
|
||||
@@ -214,7 +214,7 @@ proc/d2sm_MatchBrace(txt, i, which)
|
||||
j=d2sm_MatchBrace(txt,j,ch)
|
||||
if(!j) return 0
|
||||
|
||||
proc/d2sm_ConvertType(tt,tabs="")
|
||||
/proc/d2sm_ConvertType(tt,tabs="")
|
||||
var/i=findText(tt,"{")
|
||||
if(!i) return "[tabs]type = [tt]\n"
|
||||
.="[tabs]type = [copytext(tt,1,i)]\n"
|
||||
@@ -223,7 +223,7 @@ proc/d2sm_ConvertType(tt,tabs="")
|
||||
for(var/pair in L)
|
||||
.="[.][tabs][pair]\n"
|
||||
|
||||
proc/d2sm_Contents(list/conts,n,tabs="")
|
||||
/proc/d2sm_Contents(list/conts,n,tabs="")
|
||||
.="[tabs]contents = list("
|
||||
var/i
|
||||
for(i=0,i<n,++i)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
contain only turfs, or even only atoms.
|
||||
*/
|
||||
|
||||
swapmap
|
||||
/swapmap
|
||||
var/id // a string identifying this map uniquely
|
||||
var/x1 // minimum x,y,z coords
|
||||
var/y1
|
||||
@@ -138,54 +138,54 @@ swapmap
|
||||
var/tmp/mode // save as text-mode
|
||||
var/ischunk // tells the load routine to load to the specified location
|
||||
|
||||
New(_id,x,y,z)
|
||||
if(isnull(_id)) return
|
||||
id=_id
|
||||
mode=swapmaps_mode
|
||||
if(isturf(x) && isturf(y))
|
||||
/*
|
||||
Special format: Defines a map as an existing set of turfs;
|
||||
this is useful for saving a compiled map in swapmap format.
|
||||
Because this is a compiled-in map, its turfs are not deleted
|
||||
when the datum is deleted.
|
||||
*/
|
||||
x1=min(x:x,y:x);x2=max(x:x,y:x)
|
||||
y1=min(x:y,y:y);y2=max(x:y,y:y)
|
||||
z1=min(x:z,y:z);z2=max(x:z,y:z)
|
||||
InitializeSwapMaps()
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
qdel(src)
|
||||
return
|
||||
x2=x?(x):world.maxx
|
||||
y2=y?(y):world.maxy
|
||||
z2=z?(z):1
|
||||
AllocateSwapMap()
|
||||
/swapmap/New(_id,x,y,z)
|
||||
if(isnull(_id)) return
|
||||
id=_id
|
||||
mode=swapmaps_mode
|
||||
if(isturf(x) && isturf(y))
|
||||
/*
|
||||
Special format: Defines a map as an existing set of turfs;
|
||||
this is useful for saving a compiled map in swapmap format.
|
||||
Because this is a compiled-in map, its turfs are not deleted
|
||||
when the datum is deleted.
|
||||
*/
|
||||
x1=min(x:x,y:x);x2=max(x:x,y:x)
|
||||
y1=min(x:y,y:y);y2=max(x:y,y:y)
|
||||
z1=min(x:z,y:z);z2=max(x:z,y:z)
|
||||
InitializeSwapMaps()
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
qdel(src)
|
||||
return
|
||||
x2=x?(x):world.maxx
|
||||
y2=y?(y):world.maxy
|
||||
z2=z?(z):1
|
||||
AllocateSwapMap()
|
||||
|
||||
Del()
|
||||
// a temporary datum for a chunk can be deleted outright
|
||||
// for others, some cleanup is necessary
|
||||
if(!ischunk)
|
||||
swapmaps_loaded-=src
|
||||
swapmaps_byname-=id
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
var/list/areas=new
|
||||
for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
for(var/obj/O in A) qdel(O)
|
||||
for(var/mob/M in A)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
areas[A.loc]=null
|
||||
qdel(A)
|
||||
// delete areas that belong only to this map
|
||||
for(var/area/a in areas)
|
||||
if(a && !a.contents.len) qdel(a)
|
||||
if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ()
|
||||
qdel(areas)
|
||||
..()
|
||||
/swapmap/Del()
|
||||
// a temporary datum for a chunk can be deleted outright
|
||||
// for others, some cleanup is necessary
|
||||
if(!ischunk)
|
||||
swapmaps_loaded-=src
|
||||
swapmaps_byname-=id
|
||||
if(z2>swapmaps_compiled_maxz ||\
|
||||
y2>swapmaps_compiled_maxy ||\
|
||||
x2>swapmaps_compiled_maxx)
|
||||
var/list/areas=new
|
||||
for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
for(var/obj/O in A) qdel(O)
|
||||
for(var/mob/M in A)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
areas[A.loc]=null
|
||||
qdel(A)
|
||||
// delete areas that belong only to this map
|
||||
for(var/area/a in areas)
|
||||
if(a && !a.contents.len) qdel(a)
|
||||
if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ()
|
||||
qdel(areas)
|
||||
..()
|
||||
|
||||
/*
|
||||
Savefile format:
|
||||
@@ -202,102 +202,102 @@ swapmap
|
||||
AREA // if non-default; saved as a number (index into areas list)
|
||||
vars // all other changed vars
|
||||
*/
|
||||
Write(savefile/S)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
if(!defarea) defarea=new world.area
|
||||
areas=list()
|
||||
for(var/turf/T in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
areas[T.loc]=null
|
||||
for(n in areas) // quickly eliminate associations for smaller storage
|
||||
areas-=n
|
||||
areas+=n
|
||||
areas-=defarea
|
||||
InitializeSwapMaps()
|
||||
locked=1
|
||||
S["id"] << id
|
||||
S["z"] << z2-z1+1
|
||||
S["y"] << y2-y1+1
|
||||
S["x"] << x2-x1+1
|
||||
S["areas"] << areas
|
||||
for(n in 1 to areas.len) areas[areas[n]]=n
|
||||
var/oldcd=S.cd
|
||||
for(z=z1,z<=z2,++z)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y=y1,y<=y2,++y)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x=x1,x<=x2,++x)
|
||||
S.cd="[x-x1+1]"
|
||||
var/turf/T=locate(x,y,z)
|
||||
S["type"] << T.type
|
||||
if(T.loc!=defarea) S["AREA"] << areas[T.loc]
|
||||
T.Write(S)
|
||||
S.cd=".."
|
||||
/swapmap/Write(savefile/S)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
if(!defarea) defarea=new world.area
|
||||
areas=list()
|
||||
for(var/turf/T in block(locate(x1,y1,z1),locate(x2,y2,z2)))
|
||||
areas[T.loc]=null
|
||||
for(n in areas) // quickly eliminate associations for smaller storage
|
||||
areas-=n
|
||||
areas+=n
|
||||
areas-=defarea
|
||||
InitializeSwapMaps()
|
||||
locked=1
|
||||
S["id"] << id
|
||||
S["z"] << z2-z1+1
|
||||
S["y"] << y2-y1+1
|
||||
S["x"] << x2-x1+1
|
||||
S["areas"] << areas
|
||||
for(n in 1 to areas.len) areas[areas[n]]=n
|
||||
var/oldcd=S.cd
|
||||
for(z=z1,z<=z2,++z)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y=y1,y<=y2,++y)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x=x1,x<=x2,++x)
|
||||
S.cd="[x-x1+1]"
|
||||
var/turf/T=locate(x,y,z)
|
||||
S["type"] << T.type
|
||||
if(T.loc!=defarea) S["AREA"] << areas[T.loc]
|
||||
T.Write(S)
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
|
||||
Read(savefile/S,_id,turf/locorner)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
id=_id
|
||||
if(locorner)
|
||||
ischunk=1
|
||||
x1=locorner.x
|
||||
y1=locorner.y
|
||||
z1=locorner.z
|
||||
if(!defarea) defarea=new world.area
|
||||
if(!_id)
|
||||
S["id"] >> id
|
||||
else
|
||||
var/dummy
|
||||
S["id"] >> dummy
|
||||
S["z"] >> z2 // these are depth,
|
||||
S["y"] >> y2 // height,
|
||||
S["x"] >> x2 // width
|
||||
S["areas"] >> areas
|
||||
locked=1
|
||||
AllocateSwapMap() // adjust x1,y1,z1 - x2,y2,z2 coords
|
||||
var/oldcd=S.cd
|
||||
for(z=z1,z<=z2,++z)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y=y1,y<=y2,++y)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x=x1,x<=x2,++x)
|
||||
S.cd="[x-x1+1]"
|
||||
var/tp
|
||||
S["type"]>>tp
|
||||
var/turf/T=locate(x,y,z)
|
||||
T.loc.contents-=T
|
||||
T=new tp(locate(x,y,z))
|
||||
if("AREA" in S.dir)
|
||||
S["AREA"]>>n
|
||||
var/area/A=areas[n]
|
||||
A.contents+=T
|
||||
else defarea.contents+=T
|
||||
// clear the turf
|
||||
for(var/obj/O in T) qdel(O)
|
||||
for(var/mob/M in T)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
// finish the read
|
||||
T.Read(S)
|
||||
S.cd=".."
|
||||
/swapmap/Read(savefile/S,_id,turf/locorner)
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
var/n
|
||||
var/list/areas
|
||||
var/area/defarea=locate(world.area)
|
||||
id=_id
|
||||
if(locorner)
|
||||
ischunk=1
|
||||
x1=locorner.x
|
||||
y1=locorner.y
|
||||
z1=locorner.z
|
||||
if(!defarea) defarea=new world.area
|
||||
if(!_id)
|
||||
S["id"] >> id
|
||||
else
|
||||
var/dummy
|
||||
S["id"] >> dummy
|
||||
S["z"] >> z2 // these are depth,
|
||||
S["y"] >> y2 // height,
|
||||
S["x"] >> x2 // width
|
||||
S["areas"] >> areas
|
||||
locked=1
|
||||
AllocateSwapMap() // adjust x1,y1,z1 - x2,y2,z2 coords
|
||||
var/oldcd=S.cd
|
||||
for(z=z1,z<=z2,++z)
|
||||
S.cd="[z-z1+1]"
|
||||
for(y=y1,y<=y2,++y)
|
||||
S.cd="[y-y1+1]"
|
||||
for(x=x1,x<=x2,++x)
|
||||
S.cd="[x-x1+1]"
|
||||
var/tp
|
||||
S["type"]>>tp
|
||||
var/turf/T=locate(x,y,z)
|
||||
T.loc.contents-=T
|
||||
T=new tp(locate(x,y,z))
|
||||
if("AREA" in S.dir)
|
||||
S["AREA"]>>n
|
||||
var/area/A=areas[n]
|
||||
A.contents+=T
|
||||
else defarea.contents+=T
|
||||
// clear the turf
|
||||
for(var/obj/O in T) qdel(O)
|
||||
for(var/mob/M in T)
|
||||
if(!M.key) qdel(M)
|
||||
else M.loc=null
|
||||
// finish the read
|
||||
T.Read(S)
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
S.cd=".."
|
||||
sleep()
|
||||
S.cd=oldcd
|
||||
locked=0
|
||||
qdel(areas)
|
||||
|
||||
/*
|
||||
Find an empty block on the world map in which to load this map.
|
||||
@@ -308,186 +308,186 @@ swapmap
|
||||
Ignore certain operations if loading a map as a chunk. Use the
|
||||
x1,y1,z1 position for it, and *don't* count it as a loaded map.
|
||||
*/
|
||||
proc/AllocateSwapMap()
|
||||
InitializeSwapMaps()
|
||||
world.maxx=max(x2,world.maxx) // stretch x/y if necessary
|
||||
world.maxy=max(y2,world.maxy)
|
||||
if(!ischunk)
|
||||
if(world.maxz<=swapmaps_compiled_maxz)
|
||||
z1=swapmaps_compiled_maxz+1
|
||||
x1=1;y1=1
|
||||
else
|
||||
var/list/l=ConsiderRegion(1,1,world.maxx,world.maxy,swapmaps_compiled_maxz+1)
|
||||
x1=l[1]
|
||||
y1=l[2]
|
||||
z1=l[3]
|
||||
qdel(l)
|
||||
x2+=x1-1
|
||||
y2+=y1-1
|
||||
z2+=z1-1
|
||||
if(z2 > world.maxz)
|
||||
world.maxz = z2 // stretch z if necessary
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
if(!ischunk)
|
||||
swapmaps_loaded[src]=null
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2)
|
||||
while(1)
|
||||
var/nextz=0
|
||||
var/swapmap/M
|
||||
for(M in swapmaps_loaded)
|
||||
if(M.z2<Z1 || (Z2 && M.z1>Z2) || M.z1>=Z1+z2 ||\
|
||||
M.x1>X2 || M.x2<X1 || M.x1>=X1+x2 ||\
|
||||
M.y1>Y2 || M.y2<Y1 || M.y1>=Y1+y2) continue
|
||||
// look for sub-regions with a defined ceiling
|
||||
var/nz2=Z2?(Z2):Z1+z2-1+M.z2-M.z1
|
||||
if(M.x1>=X1+x2)
|
||||
.=ConsiderRegion(X1,Y1,M.x1-1,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.x2<=X2-x2)
|
||||
.=ConsiderRegion(M.x2+1,Y1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
if(M.y1>=Y1+y2)
|
||||
.=ConsiderRegion(X1,Y1,X2,M.y1-1,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.y2<=Y2-y2)
|
||||
.=ConsiderRegion(X1,M.y2+1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
nextz=nextz?min(nextz,M.z2+1):(M.z2+1)
|
||||
if(!M)
|
||||
/* If nextz is not 0, then at some point there was an overlap that
|
||||
could not be resolved by using an area to the side */
|
||||
if(nextz) Z1=nextz
|
||||
if(!nextz || (Z2 && Z2-Z1+1<z2))
|
||||
return (!Z2 || Z2-Z1+1>=z2)?list(X1,Y1,Z1):null
|
||||
X1=1;X2=world.maxx
|
||||
Y1=1;Y2=world.maxy
|
||||
|
||||
proc/CutXYZ()
|
||||
var/mx=swapmaps_compiled_maxx
|
||||
var/my=swapmaps_compiled_maxy
|
||||
var/mz=swapmaps_compiled_maxz
|
||||
for(var/swapmap/M in swapmaps_loaded) // may not include src
|
||||
mx=max(mx,M.x2)
|
||||
my=max(my,M.y2)
|
||||
mz=max(mz,M.z2)
|
||||
world.maxx=mx
|
||||
world.maxy=my
|
||||
world.maxz=mz
|
||||
|
||||
// save and delete
|
||||
proc/Unload()
|
||||
Save()
|
||||
qdel(src)
|
||||
|
||||
proc/Save()
|
||||
if(id==src) return 0
|
||||
var/savefile/S=mode?(new):new("map_[id].sav")
|
||||
to_chat(S, src)
|
||||
while(locked) sleep(1)
|
||||
if(mode)
|
||||
fdel("map_[id].txt")
|
||||
S.ExportText("/","map_[id].txt")
|
||||
return 1
|
||||
|
||||
// this will not delete existing savefiles for this map
|
||||
proc/SetID(newid)
|
||||
swapmaps_byname-=id
|
||||
id=newid
|
||||
/swapmap/proc/AllocateSwapMap()
|
||||
InitializeSwapMaps()
|
||||
world.maxx=max(x2,world.maxx) // stretch x/y if necessary
|
||||
world.maxy=max(y2,world.maxy)
|
||||
if(!ischunk)
|
||||
if(world.maxz<=swapmaps_compiled_maxz)
|
||||
z1=swapmaps_compiled_maxz+1
|
||||
x1=1;y1=1
|
||||
else
|
||||
var/list/l=ConsiderRegion(1,1,world.maxx,world.maxy,swapmaps_compiled_maxz+1)
|
||||
x1=l[1]
|
||||
y1=l[2]
|
||||
z1=l[3]
|
||||
qdel(l)
|
||||
x2+=x1-1
|
||||
y2+=y1-1
|
||||
z2+=z1-1
|
||||
if(z2 > world.maxz)
|
||||
world.maxz = z2 // stretch z if necessary
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
if(!ischunk)
|
||||
swapmaps_loaded[src]=null
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
proc/AllTurfs(z)
|
||||
if(isnum(z) && (z<z1 || z>z2)) return null
|
||||
return block(LoCorner(z),HiCorner(z))
|
||||
/swapmap/proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2)
|
||||
while(1)
|
||||
var/nextz=0
|
||||
var/swapmap/M
|
||||
for(M in swapmaps_loaded)
|
||||
if(M.z2<Z1 || (Z2 && M.z1>Z2) || M.z1>=Z1+z2 ||\
|
||||
M.x1>X2 || M.x2<X1 || M.x1>=X1+x2 ||\
|
||||
M.y1>Y2 || M.y2<Y1 || M.y1>=Y1+y2) continue
|
||||
// look for sub-regions with a defined ceiling
|
||||
var/nz2=Z2?(Z2):Z1+z2-1+M.z2-M.z1
|
||||
if(M.x1>=X1+x2)
|
||||
.=ConsiderRegion(X1,Y1,M.x1-1,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.x2<=X2-x2)
|
||||
.=ConsiderRegion(M.x2+1,Y1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
if(M.y1>=Y1+y2)
|
||||
.=ConsiderRegion(X1,Y1,X2,M.y1-1,Z1,nz2)
|
||||
if(.) return
|
||||
else if(M.y2<=Y2-y2)
|
||||
.=ConsiderRegion(X1,M.y2+1,X2,Y2,Z1,nz2)
|
||||
if(.) return
|
||||
nextz=nextz?min(nextz,M.z2+1):(M.z2+1)
|
||||
if(!M)
|
||||
/* If nextz is not 0, then at some point there was an overlap that
|
||||
could not be resolved by using an area to the side */
|
||||
if(nextz) Z1=nextz
|
||||
if(!nextz || (Z2 && Z2-Z1+1<z2))
|
||||
return (!Z2 || Z2-Z1+1>=z2)?list(X1,Y1,Z1):null
|
||||
X1=1;X2=world.maxx
|
||||
Y1=1;Y2=world.maxy
|
||||
|
||||
// this could be safely called for an obj or mob as well, but
|
||||
// probably not an area
|
||||
proc/Contains(turf/T)
|
||||
return (T && T.x>=x1 && T.x<=x2\
|
||||
&& T.y>=y1 && T.y<=y2\
|
||||
&& T.z>=z1 && T.z<=z2)
|
||||
/swapmap/proc/CutXYZ()
|
||||
var/mx=swapmaps_compiled_maxx
|
||||
var/my=swapmaps_compiled_maxy
|
||||
var/mz=swapmaps_compiled_maxz
|
||||
for(var/swapmap/M in swapmaps_loaded) // may not include src
|
||||
mx=max(mx,M.x2)
|
||||
my=max(my,M.y2)
|
||||
mz=max(mz,M.z2)
|
||||
world.maxx=mx
|
||||
world.maxy=my
|
||||
world.maxz=mz
|
||||
|
||||
proc/InUse()
|
||||
for(var/turf/T in AllTurfs())
|
||||
for(var/mob/M in T) if(M.key) return 1
|
||||
// save and delete
|
||||
/swapmap/proc/Unload()
|
||||
Save()
|
||||
qdel(src)
|
||||
|
||||
proc/LoCorner(z=z1)
|
||||
return locate(x1,y1,z)
|
||||
proc/HiCorner(z=z2)
|
||||
return locate(x2,y2,z)
|
||||
/swapmap/proc/Save()
|
||||
if(id==src) return 0
|
||||
var/savefile/S=mode?(new):new("map_[id].sav")
|
||||
to_chat(S, src)
|
||||
while(locked) sleep(1)
|
||||
if(mode)
|
||||
fdel("map_[id].txt")
|
||||
S.ExportText("/","map_[id].txt")
|
||||
return 1
|
||||
|
||||
// this will not delete existing savefiles for this map
|
||||
/swapmap/proc/SetID(newid)
|
||||
swapmaps_byname-=id
|
||||
id=newid
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
/swapmap/proc/AllTurfs(z)
|
||||
if(isnum(z) && (z<z1 || z>z2)) return null
|
||||
return block(LoCorner(z),HiCorner(z))
|
||||
|
||||
// this could be safely called for an obj or mob as well, but
|
||||
// probably not an area
|
||||
/swapmap/proc/Contains(turf/T)
|
||||
return (T && T.x>=x1 && T.x<=x2\
|
||||
&& T.y>=y1 && T.y<=y2\
|
||||
&& T.z>=z1 && T.z<=z2)
|
||||
|
||||
/swapmap/proc/InUse()
|
||||
for(var/turf/T in AllTurfs())
|
||||
for(var/mob/M in T) if(M.key) return 1
|
||||
|
||||
/swapmap/proc/LoCorner(z=z1)
|
||||
return locate(x1,y1,z)
|
||||
|
||||
/swapmap/proc/HiCorner(z=z2)
|
||||
return locate(x2,y2,z)
|
||||
|
||||
|
||||
// Build procs: Take 2 turfs as corners, plus an item type.
|
||||
// An item may be like:
|
||||
//
|
||||
// /turf/wall
|
||||
// /obj/fence{icon_state="iron"}
|
||||
// Build procs: Take 2 turfs as corners, plus an item type.
|
||||
// An item may be like:
|
||||
//
|
||||
// /turf/wall
|
||||
// /obj/fence{icon_state="iron"}
|
||||
/swapmap/proc/BuildFilledRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
for(T in block(T1,T2)) new item(T)
|
||||
|
||||
proc/BuildFilledRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
for(T in block(T1,T2)) new item(T)
|
||||
/swapmap/proc/BuildRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
if(T2.x-T1.x<2 || T2.y-T1.y<2) BuildFilledRectangle(T1,T2,item)
|
||||
else
|
||||
//for(T in block(T1,T2)-block(locate(T1.x+1,T1.y+1,T1.z),locate(T2.x-1,T2.y-1,T2.z)))
|
||||
for(T in block(T1,locate(T2.x,T1.y,T2.z))) new item(T)
|
||||
for(T in block(locate(T1.x,T2.y,T1.z),T2)) new item(T)
|
||||
for(T in block(locate(T1.x,T1.y+1,T1.z),locate(T1.x,T2.y-1,T2.z))) new item(T)
|
||||
for(T in block(locate(T2.x,T1.y+1,T1.z),locate(T2.x,T2.y-1,T2.z))) new item(T)
|
||||
|
||||
proc/BuildRectangle(turf/T1,turf/T2,item)
|
||||
if(!Contains(T1) || !Contains(T2)) return
|
||||
var/turf/T=T1
|
||||
// pick new corners in a block()-friendly form
|
||||
T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
|
||||
T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
|
||||
if(T2.x-T1.x<2 || T2.y-T1.y<2) BuildFilledRectangle(T1,T2,item)
|
||||
else
|
||||
//for(T in block(T1,T2)-block(locate(T1.x+1,T1.y+1,T1.z),locate(T2.x-1,T2.y-1,T2.z)))
|
||||
for(T in block(T1,locate(T2.x,T1.y,T2.z))) new item(T)
|
||||
for(T in block(locate(T1.x,T2.y,T1.z),T2)) new item(T)
|
||||
for(T in block(locate(T1.x,T1.y+1,T1.z),locate(T1.x,T2.y-1,T2.z))) new item(T)
|
||||
for(T in block(locate(T2.x,T1.y+1,T1.z),locate(T2.x,T2.y-1,T2.z))) new item(T)
|
||||
|
||||
/*
|
||||
Supplementary build proc: Takes a list of turfs, plus an item
|
||||
type. Actually the list doesn't have to be just turfs.
|
||||
*/
|
||||
proc/BuildInTurfs(list/turfs,item)
|
||||
/*
|
||||
Supplementary build proc: Takes a list of turfs, plus an item
|
||||
type. Actually the list doesn't have to be just turfs.
|
||||
*/
|
||||
/swapmap/proc/BuildInTurfs(list/turfs,item)
|
||||
for(var/T in turfs) new item(T)
|
||||
|
||||
atom
|
||||
Write(savefile/S)
|
||||
for(var/V in vars-"x"-"y"-"z"-"contents"-"icon"-"overlays"-"underlays")
|
||||
if(issaved(vars[V]))
|
||||
if(vars[V]!=initial(vars[V])) S[V]<<vars[V]
|
||||
else S.dir.Remove(V)
|
||||
if(icon!=initial(icon))
|
||||
if(swapmaps_iconcache && swapmaps_iconcache[icon])
|
||||
S["icon"]<<swapmaps_iconcache[icon]
|
||||
else S["icon"]<<icon
|
||||
// do not save mobs with keys; do save other mobs
|
||||
var/mob/M
|
||||
for(M in src) if(M.key) break
|
||||
if(overlays.len) S["overlays"]<<overlays
|
||||
if(underlays.len) S["underlays"]<<underlays
|
||||
if(contents.len && !isarea(src))
|
||||
var/list/l=contents
|
||||
if(M)
|
||||
l=l.Copy()
|
||||
for(M in src) if(M.key) l-=M
|
||||
if(l.len) S["contents"]<<l
|
||||
if(l!=contents) qdel(l)
|
||||
Read(savefile/S)
|
||||
var/list/l
|
||||
if(contents.len) l=contents
|
||||
..()
|
||||
// if the icon was a text string, it would not have loaded properly
|
||||
// replace it from the cache list
|
||||
if(!icon && ("icon" in S.dir))
|
||||
var/ic
|
||||
S["icon"]>>ic
|
||||
if(istext(ic)) icon=swapmaps_iconcache[ic]
|
||||
if(l && contents!=l)
|
||||
contents+=l
|
||||
qdel(l)
|
||||
/atom/Write(savefile/S)
|
||||
for(var/V in vars-"x"-"y"-"z"-"contents"-"icon"-"overlays"-"underlays")
|
||||
if(issaved(vars[V]))
|
||||
if(vars[V]!=initial(vars[V])) S[V]<<vars[V]
|
||||
else S.dir.Remove(V)
|
||||
if(icon!=initial(icon))
|
||||
if(swapmaps_iconcache && swapmaps_iconcache[icon])
|
||||
S["icon"]<<swapmaps_iconcache[icon]
|
||||
else S["icon"]<<icon
|
||||
// do not save mobs with keys; do save other mobs
|
||||
var/mob/M
|
||||
for(M in src) if(M.key) break
|
||||
if(overlays.len) S["overlays"]<<overlays
|
||||
if(underlays.len) S["underlays"]<<underlays
|
||||
if(contents.len && !isarea(src))
|
||||
var/list/l=contents
|
||||
if(M)
|
||||
l=l.Copy()
|
||||
for(M in src) if(M.key) l-=M
|
||||
if(l.len) S["contents"]<<l
|
||||
if(l!=contents) qdel(l)
|
||||
|
||||
/atom/Read(savefile/S)
|
||||
var/list/l
|
||||
if(contents.len) l=contents
|
||||
..()
|
||||
// if the icon was a text string, it would not have loaded properly
|
||||
// replace it from the cache list
|
||||
if(!icon && ("icon" in S.dir))
|
||||
var/ic
|
||||
S["icon"]>>ic
|
||||
if(istext(ic)) icon=swapmaps_iconcache[ic]
|
||||
if(l && contents!=l)
|
||||
contents+=l
|
||||
qdel(l)
|
||||
|
||||
|
||||
// set this up (at runtime) as follows:
|
||||
@@ -510,7 +510,7 @@ var/swapmaps_initialized
|
||||
var/swapmaps_loaded
|
||||
var/swapmaps_byname
|
||||
|
||||
proc/InitializeSwapMaps()
|
||||
/proc/InitializeSwapMaps()
|
||||
if(swapmaps_initialized) return
|
||||
swapmaps_initialized=1
|
||||
swapmaps_compiled_maxx=world.maxx
|
||||
@@ -524,16 +524,16 @@ proc/InitializeSwapMaps()
|
||||
// so you can look up an icon file by name or vice-versa
|
||||
swapmaps_iconcache[swapmaps_iconcache[V]]=V
|
||||
|
||||
proc/SwapMaps_AddIconToCache(name,icon)
|
||||
/proc/SwapMaps_AddIconToCache(name,icon)
|
||||
if(!swapmaps_iconcache) swapmaps_iconcache=list()
|
||||
swapmaps_iconcache[name]=icon
|
||||
swapmaps_iconcache[icon]=name
|
||||
|
||||
proc/SwapMaps_Find(id)
|
||||
/proc/SwapMaps_Find(id)
|
||||
InitializeSwapMaps()
|
||||
return swapmaps_byname[id]
|
||||
|
||||
proc/SwapMaps_Load(id)
|
||||
/proc/SwapMaps_Load(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(!M)
|
||||
@@ -554,29 +554,29 @@ proc/SwapMaps_Load(id)
|
||||
M.mode=text
|
||||
return M
|
||||
|
||||
proc/SwapMaps_Save(id)
|
||||
/proc/SwapMaps_Save(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(M) M.Save()
|
||||
return M
|
||||
|
||||
proc/SwapMaps_Save_All()
|
||||
/proc/SwapMaps_Save_All()
|
||||
InitializeSwapMaps()
|
||||
for(var/swapmap/M in swapmaps_loaded)
|
||||
if(M) M.Save()
|
||||
|
||||
proc/SwapMaps_Unload(id)
|
||||
/proc/SwapMaps_Unload(id)
|
||||
InitializeSwapMaps()
|
||||
var/swapmap/M=swapmaps_byname[id]
|
||||
if(!M) return // return silently from an error
|
||||
M.Unload()
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_DeleteFile(id)
|
||||
/proc/SwapMaps_DeleteFile(id)
|
||||
fdel("map_[id].sav")
|
||||
fdel("map_[id].txt")
|
||||
|
||||
proc/SwapMaps_CreateFromTemplate(template_id)
|
||||
/proc/SwapMaps_CreateFromTemplate(template_id)
|
||||
var/swapmap/M=new
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
@@ -603,7 +603,7 @@ proc/SwapMaps_CreateFromTemplate(template_id)
|
||||
while(M.locked) sleep(1)
|
||||
return M
|
||||
|
||||
proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
/proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
var/swapmap/M=new
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
@@ -630,7 +630,7 @@ proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
|
||||
qdel(M)
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
|
||||
/proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
|
||||
if(!corner1 || !corner2)
|
||||
world.log << "SwapMaps error in SwapMaps_SaveChunk():"
|
||||
if(!corner1) world.log << " corner1 turf is null"
|
||||
@@ -651,7 +651,7 @@ proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
|
||||
qdel(M)
|
||||
return 1
|
||||
|
||||
proc/SwapMaps_GetSize(id)
|
||||
/proc/SwapMaps_GetSize(id)
|
||||
var/savefile/S
|
||||
var/text=0
|
||||
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
A.visible_message("<span class='warning'>[A] strikes [D] with their closed fist!</span>")
|
||||
return 1
|
||||
|
||||
datum/martial_art/karak_virul/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/karak_virul/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
D.silent += 10
|
||||
return 1
|
||||
|
||||
datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
/datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
..()
|
||||
@@ -111,4 +111,4 @@ datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/liv
|
||||
|
||||
#undef NECK_CHOP
|
||||
#undef LEG_SWEEP
|
||||
#undef QUICK_CHOKE
|
||||
#undef QUICK_CHOKE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user