resolved icon conflicts

This commit is contained in:
Purpose
2018-10-21 11:46:39 +01:00
144 changed files with 4695 additions and 5021 deletions
@@ -381,6 +381,8 @@
if(!welded)
if(open)
for(var/obj/item/W in src)
if(istype(W, /obj/item/pipe))
continue
W.forceMove(get_turf(src))
+2 -1
View File
@@ -17,7 +17,8 @@
// /datum signals
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component)
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //after a datum's Destroy() is called: (force, qdel_hint), at this point none of the other components chose to interrupt qdel and Destroy has been called
// /atom signals
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
-2
View File
@@ -17,8 +17,6 @@
#define HEADBANGPROTECT 4096
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT)
+4 -6
View File
@@ -11,14 +11,12 @@
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails.
//defines for the gc_destroyed var
#define GC_QUEUE_PREQUEUE 1
#define GC_QUEUE_CHECK 2
#define GC_QUEUE_HARDDELETE 3
#define GC_QUEUE_COUNT 3 //increase this when adding more steps.
#define GC_QUEUE_CHECK 1
#define GC_QUEUE_HARDDELETE 2
#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
#define GC_QUEUED_FOR_QUEUING -1
#define GC_QUEUED_FOR_HARD_DEL -2
#define GC_CURRENTLY_BEING_QDELETED -3
#define GC_CURRENTLY_BEING_QDELETED -2
#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || QDELING(X))
+12
View File
@@ -4,3 +4,15 @@
#define REAGENT_OVERDOSE_EFFECT 1
#define REAGENT_OVERDOSE_FLAGS 2
// container_type defines
#define INJECTABLE 1 // Makes it possible to add reagents through droppers and syringes.
#define DRAWABLE 2 // Makes it possible to remove reagents through syringes.
#define REFILLABLE 4 // Makes it possible to add reagents through any reagent container.
#define DRAINABLE 8 // Makes it possible to remove reagents through any reagent container.
#define TRANSPARENT 16 // Used on containers which you want to be able to see the reagents off.
#define AMOUNT_VISIBLE 32 // For non-transparent containers that still have the general amount of reagents in them visible.
// Is an open container for all intents and purposes.
#define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT)
+58 -39
View File
@@ -108,11 +108,19 @@
return adjacencies
//do not use, use queue_smooth(atom)
/proc/smooth_icon(atom/A)
if(!A || !A.smooth || !A.z)
return
if(QDELETED(A))
return
if(A && (A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
cardinal_smooth(A, adjacencies)
if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
@@ -149,12 +157,12 @@
/turf/simulated/wall/diagonal_smooth(adjacencies)
adjacencies = reverse_ndir(..())
if(adjacencies)
underlays.Cut()
var/list/U = list()
if(fixed_underlay)
if(fixed_underlay["space"])
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else
underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
else
var/turf/T = get_step(src, turn(adjacencies, 180))
if(T && (T.density || T.smooth))
@@ -163,13 +171,14 @@
T = get_step(src, turn(adjacencies, 225))
if(istype(T, /turf/space) && !istype(T, /turf/space/transit))
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else if(T && !T.density && !T.smooth)
underlays += T
U += T
else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth))
underlays += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
else
underlays += DEFAULT_UNDERLAY_IMAGE
U += DEFAULT_UNDERLAY_IMAGE
underlays = U
/proc/cardinal_smooth(atom/A, adjacencies)
//NW CORNER
@@ -224,43 +233,36 @@
else if(adjacencies & N_EAST)
se = "4-e"
var/list/New = list()
if(A.top_left_corner != nw)
A.overlays -= A.top_left_corner
A.top_left_corner = nw
A.overlays += nw
New += nw
if(A.top_right_corner != ne)
A.overlays -= A.top_right_corner
A.top_right_corner = ne
A.overlays += ne
New += ne
if(A.bottom_right_corner != sw)
A.overlays -= A.bottom_right_corner
A.bottom_right_corner = sw
A.overlays += sw
New += sw
if(A.bottom_left_corner != se)
A.overlays -= A.bottom_left_corner
A.bottom_left_corner = se
A.overlays += se
New += se
/proc/find_type_in_direction(atom/source, direction, range=1)
var/x_offset = 0
var/y_offset = 0
if(New.len)
A.overlays.Add(New)
if(direction & NORTH)
y_offset = range
else if(direction & SOUTH)
y_offset -= range
if(direction & EAST)
x_offset = range
else if(direction & WEST)
x_offset -= range
var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z)
/proc/find_type_in_direction(atom/source, direction)
var/turf/target_turf = get_step(source, direction)
if(!target_turf)
return NULLTURF_BORDER
if(source.canSmoothWith)
var/atom/A
if(source.smooth & SMOOTH_MORE)
@@ -287,22 +289,22 @@
//Icon smoothing helpers
/proc/smooth_icon_neighbors(atom/A)
for(var/V in orange(1,A))
var/atom/T = V
if(T.smooth)
smooth_icon(T)
/proc/smooth_zlevel(var/zlevel)
/proc/smooth_zlevel(var/zlevel, now = FALSE)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
if(T.smooth)
smooth_icon(T)
if(now)
smooth_icon(T)
else
queue_smooth(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
smooth_icon(A)
if(now)
smooth_icon(A)
else
queue_smooth(A)
/atom/proc/clear_smooth_overlays()
overlays -= top_left_corner
@@ -316,14 +318,16 @@
/atom/proc/replace_smooth_overlays(nw, ne, sw, se)
clear_smooth_overlays()
var/list/O = list()
top_left_corner = nw
overlays += nw
O += nw
top_right_corner = ne
overlays += ne
O += ne
bottom_left_corner = sw
overlays += sw
O += sw
bottom_right_corner = se
overlays += se
O += se
overlays.Add(O)
/proc/reverse_ndir(ndir)
switch(ndir)
@@ -362,6 +366,21 @@
else
return 0
//SSicon_smooth
/proc/queue_smooth_neighbors(atom/A)
for(var/V in orange(1,A))
var/atom/T = V
if(T.smooth)
queue_smooth(T)
//SSicon_smooth
/proc/queue_smooth(atom/A)
if(SSicon_smooth)
SSicon_smooth.smooth_queue[A] = A
SSicon_smooth.can_fire = 1
else
smooth_icon(A)
//Example smooth wall
/turf/simulated/wall/smooth
name = "smooth wall"
+71 -72
View File
@@ -215,81 +215,80 @@ 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)
/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)
/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)
/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)
/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)
/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)
/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)
/icon/proc/AddAlphaMask(mask)
var/icon/M = new(mask)
M.Blend("#ffffff", ICON_SUBTRACT)
// apply mask
@@ -317,7 +316,7 @@ icon
Higher value means brighter color
*/
proc/ReadRGB(rgb)
/proc/ReadRGB(rgb)
if(!rgb) return
// interpret the HSV or HSVA value
@@ -367,7 +366,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 +405,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 +433,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 +464,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 +497,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 +551,7 @@ proc/BlendHSV(hsv1, hsv2, amount)
amount<0 or amount>1 are allowed
*/
proc/BlendRGB(rgb1, rgb2, amount)
/proc/BlendRGB(rgb1, rgb2, amount)
var/list/RGB1 = ReadRGB(rgb1)
var/list/RGB2 = ReadRGB(rgb2)
@@ -568,10 +567,10 @@ proc/BlendRGB(rgb1, rgb2, amount)
return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha)
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
@@ -579,7 +578,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)
@@ -589,7 +588,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
@@ -611,13 +610,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)
@@ -833,7 +832,7 @@ The _flatIcons list is a cache for generated icon files.
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
@@ -843,7 +842,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
@@ -891,7 +890,7 @@ proc/sort_atoms_by_layer(var/list/atoms)
/image/proc/setDir(newdir)
dir = newdir
proc/rand_hex_color()
/proc/rand_hex_color()
var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
var/color=""
for(var/i=0;i<6;i++)
@@ -899,7 +898,7 @@ proc/rand_hex_color()
return "#[color]"
//Imagine removing pixels from the main icon that are covered by pixels from the mask icon.
proc/get_icon_difference(var/icon/main, var/icon/mask)
/proc/get_icon_difference(var/icon/main, var/icon/mask)
if(istype(main) && istype(mask))
mask.Blend(rgb(255,255,255), ICON_SUBTRACT) //Make all pixels on the mask as black as possible.
mask.Opaque(rgb(255,255,255)) //Make the transparent pixels (background) white.
+17 -14
View File
@@ -1,9 +1,9 @@
// Base chemicals
var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
"chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium",
"iron","aluminum","silicon","sugar","ethanol")
"iron","aluminum","silicon","sugar","ethanol"))
// Standard chemicals
var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
"morphine","epinephrine","space_drugs","serotrotium","oxygen","copper",
"nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine",
"fluorine","sodium","phosphorus","lithium","sugar","sacid","facid",
@@ -15,21 +15,21 @@ var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal
"cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant",
"fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium",
"lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin",
"enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
"enzyme","nothing","salglu_solution","antifreeze","neurotoxin"))
// Rare chemicals
var/list/rare_chemicals = list("minttoxin","syndicate_nanites", "xenomicrobes")
GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes"))
// Standard medicines
var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
"serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine",
"salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol",
"potass_iodide","pen_acid","mannitol","oculine","styptic_powder",
"methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia",
"diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin",
"frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
"frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin"))
// Rare medicines
var/list/rare_medicines = list("syndicate_nanites","minttoxin","blood", "xenomicrobes")
GLOBAL_LIST_INIT(rare_medicines, list("syndicate_nanites","minttoxin","blood", "xenomicrobes"))
// Drinks
var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
GLOBAL_LIST_INIT(drinks, list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
"berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana",
"nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee",
"icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb",
@@ -44,10 +44,13 @@ var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice
"vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead",
"mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte",
"cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk",
"silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe")
"silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe"))
//Liver Toxins list
GLOBAL_LIST_INIT(liver_toxins, list("toxin", "plasma", "sacid", "facid", "cyanide","amanitin", "carpotoxin"))
//Random chem blacklist
var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_initro",
GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_initro",
"sodium_thiopental", "ketamine", "coniine",
"adminordrazine", "nanites", "hellwater",
"mutationtoxin", "amutationtoxin", "venom",
@@ -55,9 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i
"syndicate_nanites", "ripping_tendrils", "boiling_oil",
"envenomed_filaments", "lexorin_jelly", "kinetic",
"cryogenic_liquid", "dark_matter", "b_sorium",
"reagent", "life","dragonsbreath", "nanocalcium")
"reagent", "life","dragonsbreath", "nanocalcium"))
var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
"omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder",
"spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone",
"mitocholide", "rezadone")
"mitocholide", "rezadone"))
+70 -25
View File
@@ -175,66 +175,111 @@
icon_state = "zone_sel"
screen_loc = ui_zonesel
var/selecting = "chest"
var/static/list/hover_overlays_cache = list()
var/hovering
/obj/screen/zone_sel/Click(location, control,params)
if(isobserver(usr))
return
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
var/old_selecting = selecting //We're only going to update_icon() if there's been a change
var/choice = get_zone_at(icon_x, icon_y)
if(!choice)
return 1
return set_selected_zone(choice, usr)
/obj/screen/zone_sel/MouseEntered(location, control, params)
MouseMove(location, control, params)
/obj/screen/zone_sel/MouseMove(location, control, params)
if(isobserver(usr))
return
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
var/choice = get_zone_at(icon_x, icon_y)
if(hovering == choice)
return
cut_overlay(hover_overlays_cache[hovering])
hovering = choice
var/obj/effect/overlay/zone_sel/overlay_object = hover_overlays_cache[choice]
if(!overlay_object)
overlay_object = new
overlay_object.icon_state = "[choice]"
hover_overlays_cache[choice] = overlay_object
add_overlay(overlay_object)
/obj/effect/overlay/zone_sel
icon = 'icons/mob/zone_sel.dmi'
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 128
anchored = TRUE
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
/obj/screen/zone_sel/MouseExited(location, control, params)
if(!isobserver(usr) && hovering)
cut_overlay(hover_overlays_cache[hovering])
hovering = null
/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y)
if(1 to 3) //Feet
switch(icon_x)
if(10 to 15)
selecting = "r_foot"
return "r_foot"
if(17 to 22)
selecting = "l_foot"
else
return 1
return "l_foot"
if(4 to 9) //Legs
switch(icon_x)
if(10 to 15)
selecting = "r_leg"
return "r_leg"
if(17 to 22)
selecting = "l_leg"
else
return 1
return "l_leg"
if(10 to 13) //Hands and groin
switch(icon_x)
if(8 to 11)
selecting = "r_hand"
return "r_hand"
if(12 to 20)
selecting = "groin"
return "groin"
if(21 to 24)
selecting = "l_hand"
else
return 1
return "l_hand"
if(14 to 22) //Chest and arms to shoulders
switch(icon_x)
if(8 to 11)
selecting = "r_arm"
return "r_arm"
if(12 to 20)
selecting = "chest"
return "chest"
if(21 to 24)
selecting = "l_arm"
else
return 1
return "l_arm"
if(23 to 30) //Head, but we need to check for eye or mouth
if(icon_x in 12 to 20)
selecting = "head"
switch(icon_y)
if(23 to 24)
if(icon_x in 15 to 17)
selecting = "mouth"
return "mouth"
if(26) //Eyeline, eyes are on 15 and 17
if(icon_x in 14 to 18)
selecting = "eyes"
return "eyes"
if(25 to 27)
if(icon_x in 15 to 17)
selecting = "eyes"
return "eyes"
return "head"
if(old_selecting != selecting)
update_icon()
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
if(isobserver(user))
return
if(choice != selecting)
selecting = choice
update_icon(usr)
return 1
/obj/screen/zone_sel/update_icon()
-24
View File
@@ -191,27 +191,3 @@ var/const/tk_maxrange = 15
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/
+1 -8
View File
@@ -11,7 +11,6 @@ SUBSYSTEM_DEF(atoms)
var/old_initialized
var/list/late_loaders
var/list/created_atoms
var/list/BadInitializeCalls = list()
@@ -39,13 +38,11 @@ SUBSYSTEM_DEF(atoms)
var/count
var/list/mapload_arg = list(TRUE)
if(atoms)
created_atoms = list()
count = atoms.len
for(var/I in atoms)
var/atom/A = I
if(A && !A.initialized)
if(InitAtom(I, mapload_arg))
atoms -= I
InitAtom(I, mapload_arg)
CHECK_TICK
else
count = 0
@@ -78,10 +75,6 @@ SUBSYSTEM_DEF(atoms)
log_debug(" Late initialized [late_loaders.len] atoms in [stop_watch(watch)]s")
late_loaders.Cut()
if(atoms)
. = created_atoms + atoms
created_atoms = null
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
var/the_type = A.type
if(QDELING(A))
+18 -49
View File
@@ -59,7 +59,6 @@ SUBSYSTEM_DEF(garbage)
msg += " | Fail:[fail_counts.Join(",")]"
..(msg)
/datum/controller/subsystem/garbage/Shutdown()
//Adds the del() log to the qdel log file
var/list/dellog = list()
@@ -86,41 +85,21 @@ SUBSYSTEM_DEF(garbage)
/datum/controller/subsystem/garbage/fire()
//the fact that this resets its processing each fire (rather then resume where it left off) is intentional.
var/queue = GC_QUEUE_PREQUEUE
var/queue = GC_QUEUE_CHECK
while(state == SS_RUNNING)
switch(queue)
if(GC_QUEUE_PREQUEUE)
HandlePreQueue()
queue = GC_QUEUE_PREQUEUE + 1
if(GC_QUEUE_CHECK)
HandleQueue(GC_QUEUE_CHECK)
queue = GC_QUEUE_CHECK + 1
if(GC_QUEUE_HARDDELETE)
HandleQueue(GC_QUEUE_HARDDELETE)
if(state == SS_PAUSED) //make us wait again before the next run.
state = SS_RUNNING
break
if(state == SS_PAUSED) //make us wait again before the next run.
state = SS_RUNNING
//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond.
//Don't attempt to optimize, not worth the effort.
/datum/controller/subsystem/garbage/proc/HandlePreQueue()
var/list/tobequeued = queues[GC_QUEUE_PREQUEUE]
var/static/count = 0
if(count)
var/c = count
count = 0 //so if we runtime on the Cut, we don't try again.
tobequeued.Cut(1, c + 1)
for(var/ref in tobequeued)
count++
Queue(ref, GC_QUEUE_PREQUEUE + 1)
if(MC_TICK_CHECK)
break
if(count)
tobequeued.Cut(1, count + 1)
count = 0
/datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK)
if(level == GC_QUEUE_CHECK)
@@ -142,7 +121,7 @@ SUBSYSTEM_DEF(garbage)
if(!refID)
count++
if(MC_TICK_CHECK)
break
return
continue
var/GCd_at_time = queue[refID]
@@ -161,7 +140,7 @@ SUBSYSTEM_DEF(garbage)
reference_find_on_fail -= refID //It's deleted we don't care anymore.
#endif
if(MC_TICK_CHECK)
break
return
continue
// Something's still referring to the qdel'd object.
@@ -184,27 +163,20 @@ SUBSYSTEM_DEF(garbage)
if(GC_QUEUE_HARDDELETE)
HardDelete(D)
if(MC_TICK_CHECK)
break
return
continue
Queue(D, level + 1)
if(MC_TICK_CHECK)
break
return
if(count)
queue.Cut(1, count + 1)
count = 0
/datum/controller/subsystem/garbage/proc/PreQueue(datum/D)
if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
queues[GC_QUEUE_PREQUEUE] += D
D.gc_destroyed = GC_QUEUED_FOR_QUEUING
/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK)
if(isnull(D))
return
if(D.gc_destroyed == GC_QUEUED_FOR_HARD_DEL)
level = GC_QUEUE_HARDDELETE
if(level > GC_QUEUE_COUNT)
HardDelete(D)
return
@@ -250,11 +222,6 @@ SUBSYSTEM_DEF(garbage)
message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time / 10] seconds to delete).")
postpone(time)
/datum/controller/subsystem/garbage/proc/HardQueue(datum/D)
if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
queues[GC_QUEUE_PREQUEUE] += D
D.gc_destroyed = GC_QUEUED_FOR_HARD_DEL
/datum/controller/subsystem/garbage/Recover()
if(istype(SSgarbage.queues))
for(var/i in 1 to SSgarbage.queues.len)
@@ -294,11 +261,13 @@ SUBSYSTEM_DEF(garbage)
if(isnull(D.gc_destroyed))
D.SendSignal(COMSIG_PARENT_QDELETED)
if(D.SendSignal(COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted
return
D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
D.SendSignal(COMSIG_PARENT_QDELETED, force, hint) // Let the (remaining) components know about the result of Destroy
if(world.time != start_time)
I.slept_destroy++
else
@@ -307,7 +276,7 @@ SUBSYSTEM_DEF(garbage)
return
switch(hint)
if(QDEL_HINT_QUEUE) //qdel should queue the object for deletion.
SSgarbage.PreQueue(D)
SSgarbage.Queue(D)
if(QDEL_HINT_IWILLGC)
D.gc_destroyed = world.time
return
@@ -327,18 +296,18 @@ SUBSYSTEM_DEF(garbage)
#endif
I.no_respect_force++
SSgarbage.PreQueue(D)
if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete using a hard reference to save time from the locate()
SSgarbage.HardQueue(D)
SSgarbage.Queue(D)
if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete
SSgarbage.Queue(D, GC_QUEUE_HARDDELETE)
if(QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste.
SSgarbage.HardDelete(D)
if(QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion.
SSgarbage.PreQueue(D)
SSgarbage.Queue(D)
#ifdef TESTING
D.find_references()
#endif
if(QDEL_HINT_IFFAIL_FINDREFERENCE)
SSgarbage.PreQueue(D)
SSgarbage.Queue(D)
#ifdef TESTING
SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
#endif
@@ -348,7 +317,7 @@ SUBSYSTEM_DEF(garbage)
testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.")
#endif
I.no_hint++
SSgarbage.PreQueue(D)
SSgarbage.Queue(D)
else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic")
@@ -463,4 +432,4 @@ SUBSYSTEM_DEF(garbage)
CHECK_TICK
#endif
#endif
#endif
+32
View File
@@ -0,0 +1,32 @@
SUBSYSTEM_DEF(icon_smooth)
name = "Icon Smoothing"
init_order = INIT_ORDER_ICON_SMOOTHING
wait = 1
priority = FIRE_PRIOTITY_SMOOTHING
flags = SS_TICKER
var/list/smooth_queue = list()
/datum/controller/subsystem/icon_smooth/fire()
while(smooth_queue.len)
var/atom/A = smooth_queue[smooth_queue.len]
smooth_queue.len--
smooth_icon(A)
if(MC_TICK_CHECK)
return
if(!smooth_queue.len)
can_fire = 0
/datum/controller/subsystem/icon_smooth/Initialize()
smooth_zlevel(1,TRUE)
smooth_zlevel(2,TRUE)
var/queue = smooth_queue
smooth_queue = list()
for(var/V in queue)
var/atom/A = V
if(!A || A.z <= 2)
continue
smooth_icon(A)
CHECK_TICK
..()
+207 -206
View File
@@ -8,168 +8,168 @@
var/list/steps_desc
var/taskpath = null // Path of job objective completed.
New(atom)
..()
holder = atom
if(!holder) //don't want this without a holder
spawn
qdel(src)
/datum/construction/New(atom)
..()
holder = atom
if(!holder) //don't want this without a holder
spawn
qdel(src)
set_desc(steps.len)
return
/datum/construction/proc/next_step(mob/user as mob)
steps.len--
if(!steps.len)
spawn_result(user)
else
set_desc(steps.len)
return
return
proc/next_step(mob/user as mob)
steps.len--
if(!steps.len)
spawn_result(user)
/datum/construction/proc/action(atom/used_atom,mob/user as mob)
return
/datum/construction/proc/check_step(atom/used_atom,mob/user as mob) //check last step only
var/valid_step = is_right_key(used_atom)
if(valid_step)
if(custom_action(valid_step, used_atom, user))
next_step(user)
return 1
return 0
/datum/construction/proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
if(istype(used_atom, L["key"]))
return steps.len
return 0
/datum/construction/proc/custom_action(step, used_atom, user)
if(istype(used_atom, /obj/item/weldingtool))
var/obj/item/weldingtool/W = used_atom
if(W.remove_fuel(0, user))
playsound(holder, W.usesound, 50, 1)
else
set_desc(steps.len)
return
return 0
else if(istype(used_atom, /obj/item/wrench))
var/obj/item/wrench/W = used_atom
playsound(holder, W.usesound, 50, 1)
proc/action(atom/used_atom,mob/user as mob)
return
else if(istype(used_atom, /obj/item/screwdriver))
var/obj/item/screwdriver/S = used_atom
playsound(holder, S.usesound, 50, 1)
proc/check_step(atom/used_atom,mob/user as mob) //check last step only
var/valid_step = is_right_key(used_atom)
if(valid_step)
if(custom_action(valid_step, used_atom, user))
next_step(user)
return 1
return 0
else if(istype(used_atom, /obj/item/wirecutters))
var/obj/item/wirecutters/W = used_atom
playsound(holder, W.usesound, 50, 1)
proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.amount<4)
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task.</span>"))
return 0
else
C.use(4)
playsound(holder, C.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
to_chat(user, ("<span class='warning'>There's not enough material in this stack.</span>"))
return 0
else
S.use(5)
return 1
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
if(istype(used_atom, L["key"]))
return steps.len
return 0
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
listclearnulls(steps);
if(!steps.len)
spawn_result(user)
return 1
return 0
proc/custom_action(step, used_atom, user)
if(istype(used_atom, /obj/item/weldingtool))
var/obj/item/weldingtool/W = used_atom
if(W.remove_fuel(0, user))
playsound(holder, W.usesound, 50, 1)
else
/datum/construction/proc/spawn_result(mob/user as mob)
if(result)
if(taskpath)
var/datum/job_objective/task = user.mind.findJobTask(taskpath)
if(istype(task))
task.unit_completed()
new result(get_turf(holder))
spawn()
qdel(holder)
return
/datum/construction/proc/set_desc(index as num)
var/list/step = steps[index]
holder.desc = step["desc"]
return
/datum/construction/proc/try_consume(mob/user as mob, atom/used_atom, amount)
if(amount > 0)
// CABLES
if(istype(used_atom,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil=used_atom
if(!coil.use(amount))
to_chat(user, "<span class='warning'>You don't have enough cable! You need at least [amount] coils.</span>")
return 0
else if(istype(used_atom, /obj/item/wrench))
var/obj/item/wrench/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/screwdriver))
var/obj/item/screwdriver/S = used_atom
playsound(holder, S.usesound, 50, 1)
else if(istype(used_atom, /obj/item/wirecutters))
var/obj/item/wirecutters/W = used_atom
playsound(holder, W.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used_atom
if(C.amount<4)
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task.</span>"))
// WELDER
if(istype(used_atom,/obj/item/weldingtool))
var/obj/item/weldingtool/welder=used_atom
if(!welder.isOn())
to_chat(user, "<span class='notice'>You tap the [src] with your unlit welder. [pick("Ding","Dong")].</span>")
return 0
else
C.use(4)
playsound(holder, C.usesound, 50, 1)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
to_chat(user, ("<span class='warning'>There's not enough material in this stack.</span>"))
if(!welder.remove_fuel(amount,user))
to_chat(user, "<span class='warning'>You don't have enough fuel!</span>")
return 0
else
S.use(5)
return 1
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
if(istype(used_atom, L["key"]))
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
listclearnulls(steps);
if(!steps.len)
spawn_result(user)
return 1
return 0
proc/spawn_result(mob/user as mob)
if(result)
if(taskpath)
var/datum/job_objective/task = user.mind.findJobTask(taskpath)
if(istype(task))
task.unit_completed()
new result(get_turf(holder))
spawn()
qdel(holder)
return
proc/set_desc(index as num)
var/list/step = steps[index]
holder.desc = step["desc"]
return
proc/try_consume(mob/user as mob, atom/used_atom, amount)
if(amount > 0)
// CABLES
if(istype(used_atom,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil=used_atom
if(!coil.use(amount))
to_chat(user, "<span class='warning'>You don't have enough cable! You need at least [amount] coils.</span>")
return 0
// WELDER
if(istype(used_atom,/obj/item/weldingtool))
var/obj/item/weldingtool/welder=used_atom
if(!welder.isOn())
to_chat(user, "<span class='notice'>You tap the [src] with your unlit welder. [pick("Ding","Dong")].</span>")
return 0
if(!welder.remove_fuel(amount,user))
to_chat(user, "<span class='warning'>You don't have enough fuel!</span>")
return 0
// STACKS
if(istype(used_atom,/obj/item/stack))
var/obj/item/stack/stack=used_atom
if(stack.amount < amount)
to_chat(user, "<span class='warning'>You don't have enough [stack]! You need at least [amount].</span>")
return 0
stack.use(amount)
return 1
// STACKS
if(istype(used_atom,/obj/item/stack))
var/obj/item/stack/stack=used_atom
if(stack.amount < amount)
to_chat(user, "<span class='warning'>You don't have enough [stack]! You need at least [amount].</span>")
return 0
stack.use(amount)
return 1
/datum/construction/reversible
var/index
New(atom)
..()
index = steps.len
return
/datum/construction/reversible/New(atom)
..()
index = steps.len
return
proc/update_index(diff as num, mob/user as mob)
index+=diff
if(index==0)
spawn_result(user)
else
set_desc(index)
return
/datum/construction/reversible/proc/update_index(diff as num, mob/user as mob)
index+=diff
if(index==0)
spawn_result(user)
else
set_desc(index)
return
is_right_key(atom/used_atom) // returns index step
var/list/L = steps[index]
if(istype(used_atom, L["key"]))
return FORWARD //to the first step -> forward
else if(L["backkey"] && istype(used_atom, L["backkey"]))
return BACKWARD //to the last step -> backwards
/datum/construction/reversible/is_right_key(atom/used_atom) // returns index step
var/list/L = steps[index]
if(istype(used_atom, L["key"]))
return FORWARD //to the first step -> forward
else if(L["backkey"] && istype(used_atom, L["backkey"]))
return BACKWARD //to the last step -> backwards
return 0
/datum/construction/reversible/check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff, user)
return 1
return 0
/datum/construction/reversible/custom_action(index, diff, used_atom, user)
if(!..(index,used_atom,user))
return 0
check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff, user)
return 1
return 0
custom_action(index, diff, used_atom, user)
if(!..(index,used_atom,user))
return 0
return 1
return 1
#define state_next "next"
#define state_prev "prev"
@@ -178,73 +178,74 @@
var/index
var/base_icon = "durand"
New(atom)
..()
index = 1
return
/datum/construction/reversible2/New(atom)
..()
index = 1
return
proc/update_index(diff as num, mob/user as mob)
index-=diff
if(index==steps.len+1)
spawn_result(user)
else
set_desc(index)
return
/datum/construction/reversible2/proc/update_index(diff as num, mob/user as mob)
index-=diff
if(index==steps.len+1)
spawn_result(user)
else
set_desc(index)
return
proc/update_icon()
holder.icon_state="[base_icon]_[index]"
/datum/construction/reversible2/proc/update_icon()
holder.icon_state="[base_icon]_[index]"
is_right_key(mob/user as mob,atom/used_atom) // returns index step
var/list/state = steps[index]
if(state_next in state)
var/list/step = state[state_next]
if(istype(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return FORWARD //to the first step -> forward
else if(state_prev in state)
var/list/step = state[state_prev]
if(istype(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return BACKWARD //to the first step -> forward
/datum/construction/reversible2/is_right_key(mob/user as mob,atom/used_atom) // returns index step
var/list/state = steps[index]
if(state_next in state)
var/list/step = state[state_next]
if(istype(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return FORWARD //to the first step -> forward
else if(state_prev in state)
var/list/step = state[state_prev]
if(istype(used_atom, step["key"]))
//if(L["consume"] && !try_consume(used_atom,L["consume"]))
// return 0
return BACKWARD //to the first step -> forward
return 0
/datum/construction/reversible2/check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(user,used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff,user)
update_icon()
return 1
return 0
/datum/construction/reversible2/proc/fixText(text,user)
text = replacetext(text,"{USER}","[user]")
text = replacetext(text,"{HOLDER}","[holder]")
return text
/datum/construction/reversible2/custom_action(index, diff, used_atom, var/mob/user)
if(!..(index,used_atom,user))
return 0
check_step(atom/used_atom,mob/user as mob)
var/diff = is_right_key(user,used_atom)
if(diff)
if(custom_action(index, diff, used_atom, user))
update_index(diff,user)
update_icon()
return 1
return 0
var/list/step = steps[index]
var/list/state = step[diff==FORWARD ? state_next : state_prev]
user.visible_message(fixText(state["vis_msg"],user),fixText(state["self_msg"],user))
proc/fixText(text,user)
text = replacetext(text,"{USER}","[user]")
text = replacetext(text,"{HOLDER}","[holder]")
return text
if("delete" in state)
qdel(used_atom)
else if("spawn" in state)
var/spawntype=state["spawn"]
var/atom/A = new spawntype(holder.loc)
if("amount" in state)
if(istype(A,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C=A
C.amount=state["amount"]
if(istype(A,/obj/item/stack))
var/obj/item/stack/S=A
S.amount=state["amount"]
custom_action(index, diff, used_atom, var/mob/user)
if(!..(index,used_atom,user))
return 0
return 1
var/list/step = steps[index]
var/list/state = step[diff==FORWARD ? state_next : state_prev]
user.visible_message(fixText(state["vis_msg"],user),fixText(state["self_msg"],user))
if("delete" in state)
qdel(used_atom)
else if("spawn" in state)
var/spawntype=state["spawn"]
var/atom/A = new spawntype(holder.loc)
if("amount" in state)
if(istype(A,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C=A
C.amount=state["amount"]
if(istype(A,/obj/item/stack))
var/obj/item/stack/S=A
S.amount=state["amount"]
return 1
action(used_atom,user)
return check_step(used_atom,user)
/datum/construction/reversible2/action(used_atom,user)
return check_step(used_atom,user)
+79 -81
View File
@@ -57,98 +57,96 @@ Data storage vars:
var/result
var/state = 0
New(list/arguments=null,autostart=1)
delay = delay>0?(delay):1
if(forbid_garbage) //prevents garbage collection with tag != null
tag = "\ref[src]"
set_process_args(arguments)
if(autostart)
start()
return
/datum/global_iterator/New(list/arguments=null,autostart=1)
delay = delay>0?(delay):1
if(forbid_garbage) //prevents garbage collection with tag != null
tag = "\ref[src]"
set_process_args(arguments)
if(autostart)
start()
return
proc/main()
state = 1
while(src && control_switch)
last_exec = world.timeofday
if(check_for_null && has_null_args())
stop()
/datum/global_iterator/proc/main()
state = 1
while(src && control_switch)
last_exec = world.timeofday
if(check_for_null && has_null_args())
stop()
return 0
result = process(arglist(arg_list))
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
if(!control_switch)
return 0
result = process(arglist(arg_list))
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
if(!control_switch)
return 0
sleep(1)
return 0
proc/start(list/arguments=null)
if(active())
return
if(arguments)
if(!set_process_args(arguments))
return 0
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
return
control_switch = 1
spawn()
state = main()
return 1
proc/stop()
if(!active())
return
control_switch = 0
spawn(-1) //report termination error but don't wait for state_check().
state_check()
return 1
proc/state_check()
var/lag = 0
while(state)
sleep(1)
if(++lag>10)
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1
return 0
proc/process()
/datum/global_iterator/proc/start(list/arguments=null)
if(active())
return
if(arguments)
if(!set_process_args(arguments))
return 0
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
return
control_switch = 1
spawn()
state = main()
return 1
proc/active()
return control_switch
/datum/global_iterator/proc/stop()
if(!active())
return
control_switch = 0
spawn(-1) //report termination error but don't wait for state_check().
state_check()
return 1
proc/has_null_args()
if(null in arg_list)
return 1
/datum/global_iterator/proc/state_check()
var/lag = 0
while(state)
sleep(1)
if(++lag>10)
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1
/datum/global_iterator/proc/process()
return
/datum/global_iterator/proc/active()
return control_switch
/datum/global_iterator/proc/has_null_args()
if(null in arg_list)
return 1
return 0
/datum/global_iterator/proc/set_delay(new_delay)
if(isnum(new_delay))
delay = max(1, round(new_delay))
return 1
else
return 0
/datum/global_iterator/proc/get_last_exec_time()
return (last_exec||0)
proc/set_delay(new_delay)
if(isnum(new_delay))
delay = max(1, round(new_delay))
return 1
else
return 0
/datum/global_iterator/proc/get_last_exec_time_as_text()
return (time2text(last_exec)||"Wasn't executed yet")
proc/get_last_exec_time()
return (last_exec||0)
proc/get_last_exec_time_as_text()
return (time2text(last_exec)||"Wasn't executed yet")
proc/set_process_args(list/arguments)
if(arguments && istype(arguments, /list) && arguments.len)
arg_list = arguments
return 1
else
/datum/global_iterator/proc/set_process_args(list/arguments)
if(arguments && istype(arguments, /list) && arguments.len)
arg_list = arguments
return 1
else
// to_chat(world, "<span class='warning'>Invalid arguments supplied for [src.type], ref = \ref[src]</span>")
return 0
proc/toggle_null_checks()
check_for_null = !check_for_null
return check_for_null
proc/toggle()
if(!stop())
start()
return active()
return 0
/datum/global_iterator/proc/toggle_null_checks()
check_for_null = !check_for_null
return check_for_null
/datum/global_iterator/proc/toggle()
if(!stop())
start()
return active()
+44 -44
View File
@@ -2,59 +2,59 @@
var/href
var/list/href_list
New(thref,list/thref_list)
href = thref
href_list = thref_list.Copy()
return
/datum/topic_input/New(thref,list/thref_list)
href = thref
href_list = thref_list.Copy()
return
proc/get(i)
return listgetindex(href_list,i)
/datum/topic_input/proc/get(i)
return listgetindex(href_list,i)
proc/getAndLocate(i)
var/t = get(i)
if(t)
t = locate(t)
return t || null
/datum/topic_input/proc/getAndLocate(i)
var/t = get(i)
if(t)
t = locate(t)
return t || null
proc/getNum(i)
var/t = get(i)
if(t)
t = text2num(t)
return isnum(t) ? t : null
/datum/topic_input/proc/getNum(i)
var/t = get(i)
if(t)
t = text2num(t)
return isnum(t) ? t : null
proc/getObj(i)
var/t = getAndLocate(i)
return isobj(t) ? t : null
/datum/topic_input/proc/getObj(i)
var/t = getAndLocate(i)
return isobj(t) ? t : null
proc/getMob(i)
var/t = getAndLocate(i)
return ismob(t) ? t : null
/datum/topic_input/proc/getMob(i)
var/t = getAndLocate(i)
return ismob(t) ? t : null
proc/getTurf(i)
var/t = getAndLocate(i)
return isturf(t) ? t : null
/datum/topic_input/proc/getTurf(i)
var/t = getAndLocate(i)
return isturf(t) ? t : null
proc/getAtom(i)
return getType(i,/atom)
/datum/topic_input/proc/getAtom(i)
return getType(i,/atom)
proc/getArea(i)
var/t = getAndLocate(i)
return isarea(t) ? t : null
/datum/topic_input/proc/getArea(i)
var/t = getAndLocate(i)
return isarea(t) ? t : null
proc/getStr(i)//params should always be text, but...
var/t = get(i)
return istext(t) ? t : null
/datum/topic_input/proc/getStr(i)//params should always be text, but...
var/t = get(i)
return istext(t) ? t : null
proc/getType(i,type)
var/t = getAndLocate(i)
return istype(t,type) ? t : null
/datum/topic_input/proc/getType(i,type)
var/t = getAndLocate(i)
return istype(t,type) ? t : null
proc/getPath(i)
var/t = get(i)
if(t)
t = text2path(t)
return ispath(t) ? t : null
/datum/topic_input/proc/getPath(i)
var/t = get(i)
if(t)
t = text2path(t)
return ispath(t) ? t : null
proc/getList(i)
var/t = getAndLocate(i)
return islist(t) ? t : null
/datum/topic_input/proc/getList(i)
var/t = getAndLocate(i)
return islist(t) ? t : null
-17
View File
@@ -1760,23 +1760,6 @@ area/security/podbay
name = "\improper Firing Range"
icon_state = "firingrange"
/*
New()
..()
spawn(10) //let objects set up first
for(var/turf/turfToGrayscale in src)
if(turfToGrayscale.icon)
var/icon/newIcon = icon(turfToGrayscale.icon)
newIcon.GrayScale()
turfToGrayscale.icon = newIcon
for(var/obj/objectToGrayscale in turfToGrayscale) //1 level deep, means tables, apcs, locker, etc, but not locker contents
if(objectToGrayscale.icon)
var/icon/newIcon = icon(objectToGrayscale.icon)
newIcon.GrayScale()
objectToGrayscale.icon = newIcon
*/
/area/security/nuke_storage
name = "\improper Vault"
icon_state = "nuke_storage"
+30 -26
View File
@@ -16,6 +16,7 @@
var/dont_save = 0 // For atoms that are temporary by necessity - like lighting overlays
///Chemistry.
var/container_type = NONE
var/datum/reagents/reagents = null
//This atom's HUD (med/sec, etc) images. Associative list.
@@ -23,9 +24,6 @@
//HUD images that this atom can provide.
var/list/hud_possible
//var/chem_is_open_container = 0
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
///Chemistry.
@@ -198,22 +196,21 @@
/atom/proc/Bumped(AM as mob|obj)
return
// Convenience proc to see if a container is open for chemistry handling
// returns true if open
// false if closed
// Convenience procs to see if a container is open for chemistry handling
/atom/proc/is_open_container()
return flags & OPENCONTAINER
return is_refillable() && is_drainable()
/*//Convenience proc to see whether a container can be accessed in a certain way.
/atom/proc/is_injectable(allowmobs = TRUE)
return reagents && (container_type & (INJECTABLE | REFILLABLE))
proc/can_subract_container()
return flags & EXTRACT_CONTAINER
proc/can_add_container()
return flags & INSERT_CONTAINER
*/
/atom/proc/is_drawable(allowmobs = TRUE)
return reagents && (container_type & (DRAWABLE | DRAINABLE))
/atom/proc/is_refillable()
return reagents && (container_type & REFILLABLE)
/atom/proc/is_drainable()
return reagents && (container_type & DRAINABLE)
/atom/proc/CheckExit()
return 1
@@ -279,17 +276,24 @@
if(desc)
to_chat(user, desc)
if(reagents && is_open_container()) //is_open_container() isn't really the right proc for this, but w/e
to_chat(user, "It contains:")
if(reagents.reagent_list.len)
if(user.can_see_reagents()) //Show each individual reagent
for(var/datum/reagent/R in reagents.reagent_list)
to_chat(user, "[R.volume] units of [R.name]")
else //Otherwise, just show the total volume
if(reagents && reagents.reagent_list.len)
to_chat(user, "[reagents.total_volume] units of various reagents.")
else
to_chat(user, "Nothing.")
if(reagents)
if(container_type & TRANSPARENT)
to_chat(user, "<span class='notice'>It contains:</span>")
if(reagents.reagent_list.len)
if(user.can_see_reagents()) //Show each individual reagent
for(var/I in reagents.reagent_list)
var/datum/reagent/R = I
to_chat(user, "<span class='notice'>[R.volume] units of [R.name]</span>")
else //Otherwise, just show the total volume
if(reagents && reagents.reagent_list.len)
to_chat(user, "<span class='notice'>[reagents.total_volume] units of various reagents.</span>")
else
to_chat(user, "<span class='notice'>Nothing.</span> ")
else if(container_type & AMOUNT_VISIBLE)
if(reagents.total_volume)
to_chat(user, "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>")
else
to_chat(user, "<span class='danger'>It's empty.</span>")
SendSignal(COMSIG_PARENT_EXAMINE, user)
@@ -729,4 +733,4 @@ var/list/blood_splatter_icons = list()
var/atom/L = loc
if(!L)
return null
return L.AllowDrop() ? L : get_turf(L)
return L.AllowDrop() ? L : get_turf(L)
+3 -3
View File
@@ -23,8 +23,8 @@
var/uplink_contents // the contents of the uplink
proc/assign_objectives(var/datum/mind/traitor)
..()
/datum/faction/syndicate/proc/assign_objectives(var/datum/mind/traitor)
..()
/* ----- Begin defining syndicate factions ------ */
@@ -94,4 +94,4 @@
desc = "The <b>Exolitics</b> are an ancient alien race with an energy-based anatomy. Their culture, communication, morales and knowledge is unknown. They are so radically different to humans that their \
attempts of communication with other life forms is completely incomprehensible. Members of this alien race are capable of broadcasting subspace transmissions from their bodies. \
The religious leaders of the Tiger Cooperative claim to have the technology to decypher and interpret their messages, which have been confirmed as religious propaganda. Their motives are unknown \
but they are otherwise not considered much of a threat to anyone. They are virtually indestructable because of their nonphysical composition, and have the frighetning ability to make anything stop existing in a second."
but they are otherwise not considered much of a threat to anyone. They are virtually indestructable because of their nonphysical composition, and have the frighetning ability to make anything stop existing in a second."
@@ -251,6 +251,12 @@
var/ling_failure = "The deck refuses to respond to a souless creature such as you."
var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Assassin", "Lightning", "Charger", "Protector")
var/random = TRUE
var/color_list = list("Pink" = "#FFC0CB",
"Red" = "#FF0000",
"Orange" = "#FFA500",
"Green" = "#008000",
"Blue" = "#0000FF")
var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
/obj/item/guardiancreator/attack_self(mob/living/user)
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list)
@@ -275,15 +281,19 @@
to_chat(user, "[failure_message]")
used = FALSE
/obj/item/guardiancreator/examine(mob/user, distance)
. = ..()
if(used)
to_chat(user, "<span class='notice'>[used_message]</span>")
/obj/item/guardiancreator/proc/spawn_guardian(var/mob/living/user, var/key)
var/gaurdiantype = "Standard"
/obj/item/guardiancreator/proc/spawn_guardian(mob/living/user, key)
var/guardian_type = "Standard"
if(random)
gaurdiantype = pick(possible_guardians)
guardian_type = pick(possible_guardians)
else
gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch
switch(gaurdiantype)
switch(guardian_type)
if("Chaos")
pickedtype = /mob/living/simple_animal/hostile/guardian/fire
@@ -325,84 +335,19 @@
user.verbs += /mob/living/proc/guardian_recall
user.verbs += /mob/living/proc/guardian_reset
var/color
//names and their RGB
var/magic_list = list("Pink" = "#FFC0CB", \
"Red" = "#FF0000", \
"Orange" = "#FFA500", \
"Green" = "#008000", \
"Blue" = "#0000FF")
var/tech_list = list("Rose" = "#F62C6B", \
"Peony" = "#E54750", \
"Lily" = "#F6562C", \
"Daisy" = "#ECCD39", \
"Zinnia" = "#89F62C", \
"Ivy" = "#5DF62C", \
"Iris" = "#2CF6B8", \
"Petunia" = "#51A9D4", \
"Violet" = "#8A347C", \
"Lilac" = "#C7A0F6", \
"Orchid" = "#F62CF5")
var/bio_list = list("Rose" = "#F62C6B", \
"Peony" = "#E54750", \
"Lily" = "#F6562C", \
"Daisy" = "#ECCD39", \
"Zinnia" = "#89F62C", \
"Ivy" = "#5DF62C", \
"Iris" = "#2CF6B8", \
"Petunia" = "#51A9D4", \
"Violet" = "#8A347C", \
"Lilac" = "#C7A0F6", \
"Orchid" = "#F62CF5")
var/picked_name
// var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082")
switch(theme)
if("magic")
color = pick(magic_list)
G.name_color = magic_list[color]
picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.magic_fluff_string].")
if("tech")
color = pick(tech_list) //technically not colors, just flowers that can be specific colors
G.name_color = tech_list[color]
picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium")
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.tech_fluff_string].")
G.speak_emote = list("states")
if("bio")
color = pick(bio_list) //technically not colors, just using the same flowers as tech currerntly
G.name_color = tech_list[color]
picked_name = pick("brood", "hive", "nest")
to_chat(user, "[G.bio_fluff_string].")
G.name = "[color] [picked_name]"
G.real_name = "[color] [picked_name]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.bio_fluff_string].")
G.attacktext = "swarms"
G.speak_emote = list("chitters")
var/color = pick(color_list)
G.name_color = color_list[color]
var/picked_name = pick(name_list)
create_theme(G, user, picked_name, color)
/obj/item/guardiancreator/proc/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.magic_fluff_string].")
/obj/item/guardiancreator/choose
random = FALSE
@@ -417,6 +362,27 @@
used_message = "The injector has already been used."
failure_message = "<B>...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER.</B>"
ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you."
color_list = list("Rose" = "#F62C6B",
"Peony" = "#E54750",
"Lily" = "#F6562C",
"Daisy" = "#ECCD39",
"Zinnia" = "#89F62C",
"Ivy" = "#5DF62C",
"Iris" = "#2CF6B8",
"Petunia" = "#51A9D4",
"Violet" = "#8A347C",
"Lilac" = "#C7A0F6",
"Orchid" = "#F62CF5")
name_list = list("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium")
/obj/item/guardiancreator/tech/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.tech_fluff_string].")
G.speak_emote = list("states")
/obj/item/guardiancreator/tech/check_uplink_validity()
return !used
@@ -434,6 +400,28 @@
use_message = "The eggs begin to twitch..."
used_message = "The cluster already hatched."
failure_message = "<B>...but soon settles again. Guess they weren't ready to hatch after all.</B>"
color_list = list("Rose" = "#F62C6B",
"Peony" = "#E54750",
"Lily" = "#F6562C",
"Daisy" = "#ECCD39",
"Zinnia" = "#89F62C",
"Ivy" = "#5DF62C",
"Iris" = "#2CF6B8",
"Petunia" = "#51A9D4",
"Violet" = "#8A347C",
"Lilac" = "#C7A0F6",
"Orchid" = "#F62CF5")
name_list = list("brood", "hive", "nest")
/obj/item/guardiancreator/biological/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
G.name = "[color] [picked_name]"
G.real_name = "[color] [picked_name]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
to_chat(user, "[G.bio_fluff_string].")
G.attacktext = "swarms"
G.speak_emote = list("chitters")
/obj/item/guardiancreator/biological/choose
random = FALSE
@@ -37,38 +37,41 @@
/obj/item/guardian_bomb/proc/disguise(var/obj/A)
A.forceMove(src)
stored_obj = A
opacity = A.opacity
anchored = A.anchored
density = A.density
appearance = A.appearance
spawn(600)
if(src)
stored_obj.loc = get_turf(loc)
if(spawner)
to_chat(spawner, "<span class='danger'>Failure! Your trap on [stored_obj] didn't catch anyone this time.</span>")
qdel(src)
dir = A.dir
addtimer(CALLBACK(src, .proc/disable), 600)
/obj/item/guardian_bomb/proc/disable()
stored_obj.forceMove(get_turf(src))
if(spawner)
to_chat(spawner, "<span class='danger'>Failure! Your trap on [stored_obj] didn't catch anyone this time.</span>")
qdel(src)
/obj/item/guardian_bomb/proc/detonate(var/mob/living/user)
if(!istype(user))
return
to_chat(user, "<span class='danger'>The [src] was boobytrapped!</span>")
if(istype(spawner, /mob/living/simple_animal/hostile/guardian))
var/mob/living/simple_animal/hostile/guardian/G = spawner
if(user == G.summoner)
to_chat(user, "<span class='danger'>You knew this because of your link with your guardian, so you smartly defuse the bomb.</span>")
stored_obj.loc = get_turf(loc)
stored_obj.forceMove(get_turf(loc))
qdel(src)
return
to_chat(spawner, "<span class='danger'>Success! Your trap on [src] caught [user]!</span>")
stored_obj.loc = get_turf(loc)
stored_obj.forceMove(get_turf(loc))
playsound(get_turf(src),'sound/effects/Explosion2.ogg', 200, 1)
user.ex_act(2)
qdel(src)
/obj/item/guardian_bomb/attackby(mob/living/user)
/obj/item/guardian_bomb/attackby(obj/item/W, mob/living/user)
detonate(user)
return
/obj/item/guardian_bomb/pickup(mob/living/user)
detonate(user)
return
/obj/item/guardian_bomb/examine(mob/user)
stored_obj.examine(user)
@@ -120,10 +120,37 @@
updateallghostimages()
remove_from_all_data_huds()
spawn(5)
if(src.mind)
src.mind.wipe_memory()
src << 'sound/effects/ghost.ogg'
addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives)
/mob/living/simple_animal/revenant/proc/firstSetupAttempt()
if(mind)
giveObjectivesandGoals()
giveSpells()
else
message_admins("Revenant was created but has no mind. Put a ghost inside, or a poll will be made in one minute.")
addtimer(CALLBACK(src, .proc/setupOrDelete), 1 MINUTES)
/mob/living/simple_animal/revenant/proc/setupOrDelete()
if(mind)
giveObjectivesandGoals()
giveSpells()
else
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a revenant?", poll_time = 15 SECONDS)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
message_admins("[key_name_admin(theghost)] has taken control of a revenant created without a mind")
key = theghost.key
giveObjectivesandGoals()
giveSpells()
else
message_admins("No ghost was willing to take control of a mindless revenant. Deleting...")
qdel(src)
/mob/living/simple_animal/revenant/proc/giveObjectivesandGoals()
mind.wipe_memory()
SEND_SOUND(src, 'sound/effects/ghost.ogg')
to_chat(src, "<br>")
to_chat(src, "<span class='deadsay'><font size=3><b>You are a revenant.</b></font></span>")
to_chat(src, "<b>Your formerly mundane spirit has been infused with alien energies and empowered into a revenant.</b>")
@@ -132,32 +159,23 @@
to_chat(src, "<b>To function, you are to drain the life essence from humans. This essence is a resource, as well as your health, and will power all of your abilities.</b>")
to_chat(src, "<b><i>You do not remember anything of your past lives, nor will you remember anything about this one after your death.</i></b>")
to_chat(src, "<b>Be sure to read the wiki page at http://nanotrasen.se/wiki/index.php/Revenant to learn more.</b>")
var/datum/objective/revenant/objective = new
objective.owner = src.mind
src.mind.objectives += objective
objective.owner = mind
mind.objectives += objective
to_chat(src, "<b>Objective #1</b>: [objective.explanation_text]")
var/datum/objective/revenantFluff/objective2 = new
objective2.owner = src.mind
src.mind.objectives += objective2
objective2.owner = mind
mind.objectives += objective2
to_chat(src, "<b>Objective #2</b>: [objective2.explanation_text]")
ticker.mode.traitors |= src.mind //Necessary for announcing
if(!src.giveSpells())
message_admins("Revenant was created but has no mind. Trying again in five seconds.")
spawn(50)
if(!src.giveSpells())
message_admins("Revenant still has no mind. Deleting...")
qdel(src)
ticker.mode.traitors |= mind //Necessary for announcing
/mob/living/simple_animal/revenant/proc/giveSpells()
if(src.mind)
src.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
src.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
src.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
return 1
return 0
mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision/revenant(null))
mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/revenant_transmit(null))
mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null))
mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null))
mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null))
return TRUE
/mob/living/simple_animal/revenant/dust()
+1 -1
View File
@@ -215,7 +215,7 @@
if(isturf(placed_in))
to_chat(H, "<span class='notice'>Placing [G.display_name] on [placed_in]!</span>")
else
to_chat(H, "<span class='noticed'>Placing [G.display_name] in [placed_in.name]")
to_chat(H, "<span class='notice'>Placing [G.display_name] in [placed_in.name].</span>")
continue
if(H.equip_to_appropriate_slot(G))
to_chat(H, "<span class='notice'>Placing [G.display_name] in your inventory!</span>")
File diff suppressed because it is too large Load Diff
@@ -15,165 +15,165 @@
//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."
New()
..()
//So the scrubbers have time to spawn
spawn(10)
scanscrubbers()
/obj/machinery/computer/area_atmos/New()
..()
//So the scrubbers have time to spawn
spawn(10)
scanscrubbers()
attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
return src.attack_hand(user)
/obj/machinery/computer/area_atmos/attack_ai(mob/user as mob)
src.add_hiddenprint(user)
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=[UID()];scan=1">Scan</a>
<table border="1" width="90%">"}
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in connectedscrubbers)
dat += {"
<tr>
<td>[scrubber.name]</td>
<td width="150"><a class="green" href="?src=[UID()];scrub=\ref[scrubber];toggle=1">Turn On</a> <a class="red" href="?src=[UID()];scrub=\ref[scrubber];toggle=0">Turn Off</a></td>
</tr>"}
/obj/machinery/computer/area_atmos/attack_hand(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=[UID()];scan=1">Scan</a>
<table border="1" width="90%">"}
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in connectedscrubbers)
dat += {"
</table><br>
<i>[zone]</i>
</body>
</html>"}
var/datum/browser/popup = new(user, "area_atmos", name, 400, 400)
popup.set_content(dat)
popup.open(0)
status = ""
<tr>
<td>[scrubber.name]</td>
<td width="150"><a class="green" href="?src=[UID()];scrub=\ref[scrubber];toggle=1">Turn On</a> <a class="red" href="?src=[UID()];scrub=\ref[scrubber];toggle=0">Turn Off</a></td>
</tr>"}
Topic(href, href_list)
if(..())
dat += {"
</table><br>
<i>[zone]</i>
</body>
</html>"}
var/datum/browser/popup = new(user, "area_atmos", name, 400, 400)
popup.set_content(dat)
popup.open(0)
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/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/scrubber/huge/scrubber = locate(href_list["scrub"])
/obj/machinery/computer/area_atmos/proc/validscrubber( var/obj/machinery/portable_atmospherics/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/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/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/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/scrubber/huge/scrubber as obj )
if(!isobj(scrubber))
return 0
/obj/machinery/computer/area_atmos/area/validscrubber(obj/machinery/portable_atmospherics/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 = get_area(T)
for(var/obj/machinery/portable_atmospherics/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 = get_area(T)
for(var/obj/machinery/portable_atmospherics/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()
+12 -12
View File
@@ -80,18 +80,18 @@ var/datum/canister_icons/canister_icon_container = new()
var/busy = 0
var/update_flag = 0
New()
..()
canister_color = list(
"prim" = "yellow",
"sec" = "none",
"ter" = "none",
"quart" = "none")
oldcolor = new /list()
decals = list("cold" = 0, "hot" = 0, "plasma" = 0)
colorcontainer = list()
possibledecals = list()
update_icon()
/obj/machinery/portable_atmospherics/canister/New()
..()
canister_color = list(
"prim" = "yellow",
"sec" = "none",
"ter" = "none",
"quart" = "none")
oldcolor = new /list()
decals = list("cold" = 0, "hot" = 0, "plasma" = 0)
colorcontainer = list()
possibledecals = list()
update_icon()
/obj/machinery/portable_atmospherics/canister/proc/init_data_vars()
//passed to the ui to render the color lists
@@ -138,7 +138,6 @@ var/syndicate_elite_shuttle_timeleft = 0
explosion(L.loc,4,6,8,10,0)
sleep(40)
// proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
var/area/start_location = locate(/area/shuttle/syndicate_elite/mothership)
+1 -1
View File
@@ -281,7 +281,7 @@
return
B.forceMove(src)
beaker = B
add_attack_logs(user, null, "Added [B] containing [B.reagentlist()] to a cryo cell at [COORD(src)]")
add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]")
user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!")
+91 -91
View File
@@ -169,108 +169,108 @@ for reference:
var/locked = 0.0
// req_access = list(access_maint_tunnels)
New()
..()
/obj/machinery/deployable/barrier/New()
..()
src.icon_state = "barrier[src.locked]"
src.icon_state = "barrier[src.locked]"
attackby(obj/item/W as obj, mob/user as mob, params)
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 = "barrier[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
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
/obj/machinery/deployable/barrier/attackby(obj/item/W as obj, mob/user as mob, params)
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 = "barrier[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
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
return
return
else if(istype(W, /obj/item/wrench))
if(src.health < src.maxhealth)
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(istype(W, /obj/item/wrench))
if(src.health < src.maxhealth)
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)
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)
src.emagged = 0
src.req_access = list(access_security)
visible_message("<span class='warning'>[user] repairs the [src]!</span>")
return
else
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()
..()
emag_act(user as mob)
if(!emagged)
emagged = 1
req_access = null
to_chat(user, "You break the ID authentication lock on the [src].")
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
else if(src.emagged == 1)
src.emagged = 2
to_chat(user, "You short out the anchoring mechanism on the [src].")
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
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 = "barrier[src.locked]"
blob_act()
src.health -= 25
return
else
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()
..()
/obj/machinery/deployable/barrier/emag_act(user as mob)
if(!emagged)
emagged = 1
req_access = null
to_chat(user, "You break the ID authentication lock on the [src].")
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
else if(src.emagged == 1)
src.emagged = 2
to_chat(user, "You short out the anchoring mechanism on the [src].")
do_sparks(2, 1, src)
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
/obj/machinery/deployable/barrier/ex_act(severity)
switch(severity)
if(1.0)
src.explode()
return
if(2.0)
src.health -= 25
if(src.health <= 0)
src.explode()
return
/obj/machinery/deployable/barrier/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
return
if(prob(50/severity))
locked = !locked
anchored = !anchored
icon_state = "barrier[src.locked]"
CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff.
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
/obj/machinery/deployable/barrier/blob_act()
src.health -= 25
if(src.health <= 0)
src.explode()
return
proc/explode()
/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff.
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
visible_message("<span class='danger'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
/obj/machinery/deployable/barrier/proc/explode()
visible_message("<span class='danger'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
/* var/obj/item/stack/rods/ =*/
new /obj/item/stack/rods(Tsec)
/* var/obj/item/stack/rods/ =*/
new /obj/item/stack/rods(Tsec)
do_sparks(3, 1, src)
do_sparks(3, 1, src)
explosion(src.loc,-1,-1,0)
if(src)
qdel(src)
explosion(src.loc,-1,-1,0)
if(src)
qdel(src)
+14 -14
View File
@@ -10,22 +10,22 @@
var/id = null
var/on_icon = "sign_on"
proc/toggle()
if(stat & (BROKEN|NOPOWER))
return
lit = !lit
update_icon()
/obj/machinery/holosign/proc/toggle()
if(stat & (BROKEN|NOPOWER))
return
lit = !lit
update_icon()
if(!lit)
icon_state = "sign_off"
else
icon_state = on_icon
power_change()
if(stat & NOPOWER)
lit = 0
update_icon()
/obj/machinery/holosign/update_icon()
if(!lit)
icon_state = "sign_off"
else
icon_state = on_icon
/obj/machinery/holosign/power_change()
if(stat & NOPOWER)
lit = 0
update_icon()
/obj/machinery/holosign/surgery
name = "surgery holosign"
+3
View File
@@ -391,6 +391,9 @@ Class Procs:
return ..()
/obj/machinery/proc/is_operational()
return !(stat & (NOPOWER|BROKEN|MAINT))
/obj/machinery/CheckParts(list/parts_list)
..()
RefreshParts()
+279 -299
View File
@@ -29,169 +29,149 @@
var/center_y = 0
var/max_dist = 20 // absolute value of center_x,y cannot exceed this integer
New()
..()
var/turf/T = loc
hide(T.intact)
center = T
/obj/machinery/magnetic_module/New()
..()
var/turf/T = loc
hide(T.intact)
center = T
spawn(10) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, freq, RADIO_MAGNETS)
spawn(10) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, freq, RADIO_MAGNETS)
spawn()
magnetic_process()
spawn()
magnetic_process()
// update the invisibility and icon
hide(var/intact)
invisibility = intact ? 101 : 0
updateicon()
/obj/machinery/magnetic_module/hide(intact)
invisibility = intact ? 101 : 0
updateicon()
// update the icon_state
proc/updateicon()
var/state="floor_magnet"
var/onstate=""
if(!on)
onstate="0"
/obj/machinery/magnetic_module/proc/updateicon()
var/state="floor_magnet"
var/onstate=""
if(!on)
onstate="0"
if(invisibility)
icon_state = "[state][onstate]-f" // if invisible, set icon to faded version
// in case of being revealed by T-scanner
else
icon_state = "[state][onstate]"
if(invisibility)
icon_state = "[state][onstate]-f" // if invisible, set icon to faded version
// in case of being revealed by T-scanner
else
icon_state = "[state][onstate]"
receive_signal(datum/signal/signal)
var/command = signal.data["command"]
var/modifier = signal.data["modifier"]
var/signal_code = signal.data["code"]
if(command && (signal_code == code))
Cmd(command, modifier)
/obj/machinery/magnetic_module/receive_signal(datum/signal/signal)
var/command = signal.data["command"]
var/modifier = signal.data["modifier"]
var/signal_code = signal.data["code"]
if(command && (signal_code == code))
Cmd(command, modifier)
proc/Cmd(var/command, var/modifier)
/obj/machinery/magnetic_module/proc/Cmd(var/command, var/modifier)
if(command)
switch(command)
if("set-electriclevel")
if(modifier) electricity_level = modifier
if("set-magneticfield")
if(modifier) magnetic_field = modifier
if(command)
switch(command)
if("set-electriclevel")
if(modifier) electricity_level = modifier
if("set-magneticfield")
if(modifier) magnetic_field = modifier
if("add-elec")
electricity_level++
if(electricity_level > 12)
electricity_level = 12
if("sub-elec")
electricity_level--
if(electricity_level <= 0)
electricity_level = 1
if("add-mag")
magnetic_field++
if(magnetic_field > 4)
magnetic_field = 4
if("sub-mag")
magnetic_field--
if(magnetic_field <= 0)
magnetic_field = 1
if("add-elec")
electricity_level++
if(electricity_level > 12)
electricity_level = 12
if("sub-elec")
electricity_level--
if(electricity_level <= 0)
electricity_level = 1
if("add-mag")
magnetic_field++
if(magnetic_field > 4)
magnetic_field = 4
if("sub-mag")
magnetic_field--
if(magnetic_field <= 0)
magnetic_field = 1
if("set-x")
if(modifier) center_x = modifier
if("set-y")
if(modifier) center_y = modifier
if("set-x")
if(modifier) center_x = modifier
if("set-y")
if(modifier) center_y = modifier
if("N") // NORTH
center_y++
if("S") // SOUTH
center_y--
if("E") // EAST
center_x++
if("W") // WEST
center_x--
if("C") // CENTER
center_x = 0
center_y = 0
if("R") // RANDOM
center_x = rand(-max_dist, max_dist)
center_y = rand(-max_dist, max_dist)
if("N") // NORTH
center_y++
if("S") // SOUTH
center_y--
if("E") // EAST
center_x++
if("W") // WEST
center_x--
if("C") // CENTER
center_x = 0
center_y = 0
if("R") // RANDOM
center_x = rand(-max_dist, max_dist)
center_y = rand(-max_dist, max_dist)
if("set-code")
if(modifier) code = modifier
if("toggle-power")
on = !on
if("set-code")
if(modifier) code = modifier
if("toggle-power")
on = !on
if(on)
spawn()
magnetic_process()
if(on)
spawn()
magnetic_process()
/obj/machinery/magnetic_module/process()
if(stat & NOPOWER)
on = 0
// Sanity checks:
if(electricity_level <= 0)
electricity_level = 1
if(magnetic_field <= 0)
magnetic_field = 1
// Limitations:
if(abs(center_x) > max_dist)
center_x = max_dist
if(abs(center_y) > max_dist)
center_y = max_dist
if(magnetic_field > 4)
magnetic_field = 4
if(electricity_level > 12)
electricity_level = 12
process()
if(stat & NOPOWER)
on = 0
// Sanity checks:
if(electricity_level <= 0)
electricity_level = 1
if(magnetic_field <= 0)
magnetic_field = 1
// Limitations:
if(abs(center_x) > max_dist)
center_x = max_dist
if(abs(center_y) > max_dist)
center_y = max_dist
if(magnetic_field > 4)
magnetic_field = 4
if(electricity_level > 12)
electricity_level = 12
// Update power usage:
if(on)
use_power = ACTIVE_POWER_USE
active_power_usage = electricity_level*15
else
use_power = NO_POWER_USE
// Overload conditions:
/* // Eeeehhh kinda stupid
if(on)
if(electricity_level > 11)
if(prob(electricity_level))
explosion(loc, 0, 1, 2, 3) // ooo dat shit EXPLODES son
spawn(2)
qdel(src)
*/
// Update power usage:
if(on)
use_power = 2
active_power_usage = electricity_level*15
else
use_power = 0
updateicon()
proc/magnetic_process() // proc that actually does the pulling
if(pulling) return
while(on)
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
if(pulling) return
while(on)
pulling = 1
center = locate(x+center_x, y+center_y, z)
if(center)
for(var/obj/M in orange(magnetic_field, center))
if(!M.anchored && (M.flags & CONDUCT))
step_towards(M, center)
for(var/mob/living/silicon/S in orange(magnetic_field, center))
if(istype(S, /mob/living/silicon/ai)) continue
step_towards(S, center)
use_power(electricity_level * 5)
sleep(13 - electricity_level)
pulling = 0
pulling = 1
center = locate(x+center_x, y+center_y, z)
if(center)
for(var/obj/M in orange(magnetic_field, center))
if(!M.anchored && (M.flags & CONDUCT))
step_towards(M, center)
for(var/mob/living/silicon/S in orange(magnetic_field, center))
if(istype(S, /mob/living/silicon/ai)) continue
step_towards(S, center)
use_power(electricity_level * 5)
sleep(13 - electricity_level)
pulling = 0
/obj/machinery/magnetic_controller
name = "Magnetic Control Console"
@@ -218,189 +198,189 @@
var/datum/radio_frequency/radio_connection
New()
..()
/obj/machinery/magnetic_controller/New()
..()
if(autolink)
for(var/obj/machinery/magnetic_module/M in world)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
if(autolink)
for(var/obj/machinery/magnetic_module/M in world)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
spawn(45) // must wait for map loading to finish
if(radio_controller)
radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
if(path) // check for default path
filter_path() // renders rpath
Destroy()
spawn(45) // must wait for map loading to finish
if(radio_controller)
radio_controller.remove_object(src, frequency)
radio_connection = null
return ..()
process()
if(magnets.len == 0 && autolink)
for(var/obj/machinery/magnetic_module/M in world)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
radio_connection = radio_controller.add_object(src, frequency, RADIO_MAGNETS)
attack_ai(mob/user as mob)
return src.attack_hand(user)
if(path) // check for default path
filter_path() // renders rpath
/obj/machinery/magnetic_controller/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
radio_connection = null
return ..()
/obj/machinery/magnetic_controller/process()
if(magnets.len == 0 && autolink)
for(var/obj/machinery/magnetic_module/M in world)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
/obj/machinery/magnetic_controller/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/magnetic_controller/attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
var/dat = "<B>Magnetic Control Console</B><BR><BR>"
if(!autolink)
dat += {"
Frequency: <a href='?src=[UID()];operation=setfreq'>[frequency]</a><br>
Code: <a href='?src=[UID()];operation=setfreq'>[code]</a><br>
<a href='?src=[UID()];operation=probe'>Probe Generators</a><br>
"}
if(magnets.len >= 1)
dat += "Magnets confirmed: <br>"
var/i = 0
for(var/obj/machinery/magnetic_module/M in magnets)
i++
dat += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;< \[[i]\] (<a href='?src=[UID()];radio-op=togglepower'>[M.on ? "On":"Off"]</a>) | Electricity level: <a href='?src=[UID()];radio-op=minuselec'>-</a> [M.electricity_level] <a href='?src=[UID()];radio-op=pluselec'>+</a>; Magnetic field: <a href='?src=[UID()];radio-op=minusmag'>-</a> [M.magnetic_field] <a href='?src=[UID()];radio-op=plusmag'>+</a><br>"
dat += "<br>Speed: <a href='?src=[UID()];operation=minusspeed'>-</a> [speed] <a href='?src=[UID()];operation=plusspeed'>+</a><br>"
dat += "Path: {<a href='?src=[UID()];operation=setpath'>[path]</a>}<br>"
dat += "Moving: <a href='?src=[UID()];operation=togglemoving'>[moving ? "Enabled":"Disabled"]</a>"
user << browse(dat, "window=magnet;size=400x500")
onclose(user, "magnet")
/obj/machinery/magnetic_controller/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["radio-op"])
// Prepare signal beforehand, because this is a radio operation
var/datum/signal/signal = new
signal.transmission_method = 1 // radio transmission
signal.source = src
signal.frequency = frequency
signal.data["code"] = code
// Apply any necessary commands
switch(href_list["radio-op"])
if("togglepower")
signal.data["command"] = "toggle-power"
if("minuselec")
signal.data["command"] = "sub-elec"
if("pluselec")
signal.data["command"] = "add-elec"
if("minusmag")
signal.data["command"] = "sub-mag"
if("plusmag")
signal.data["command"] = "add-mag"
// Broadcast the signal
radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
spawn(1)
updateUsrDialog() // pretty sure this increases responsiveness
if(href_list["operation"])
switch(href_list["operation"])
if("plusspeed")
speed++
if(speed > 10)
speed = 10
if("minusspeed")
speed --
if(speed <= 0)
speed = 1
if("setpath")
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
pathpos = 1 // reset position
filter_path() // renders rpath
if("togglemoving")
moving = !moving
if(moving)
spawn() MagnetMove()
updateUsrDialog()
/obj/machinery/magnetic_controller/proc/MagnetMove()
if(looping) return
while(moving && rpath.len >= 1)
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
var/dat = "<B>Magnetic Control Console</B><BR><BR>"
if(!autolink)
dat += {"
Frequency: <a href='?src=[UID()];operation=setfreq'>[frequency]</a><br>
Code: <a href='?src=[UID()];operation=setfreq'>[code]</a><br>
<a href='?src=[UID()];operation=probe'>Probe Generators</a><br>
"}
break
if(magnets.len >= 1)
looping = 1
dat += "Magnets confirmed: <br>"
var/i = 0
for(var/obj/machinery/magnetic_module/M in magnets)
i++
dat += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;< \[[i]\] (<a href='?src=[UID()];radio-op=togglepower'>[M.on ? "On":"Off"]</a>) | Electricity level: <a href='?src=[UID()];radio-op=minuselec'>-</a> [M.electricity_level] <a href='?src=[UID()];radio-op=pluselec'>+</a>; Magnetic field: <a href='?src=[UID()];radio-op=minusmag'>-</a> [M.magnetic_field] <a href='?src=[UID()];radio-op=plusmag'>+</a><br>"
// Prepare the radio signal
var/datum/signal/signal = new
signal.transmission_method = 1 // radio transmission
signal.source = src
signal.frequency = frequency
signal.data["code"] = code
dat += "<br>Speed: <a href='?src=[UID()];operation=minusspeed'>-</a> [speed] <a href='?src=[UID()];operation=plusspeed'>+</a><br>"
dat += "Path: {<a href='?src=[UID()];operation=setpath'>[path]</a>}<br>"
dat += "Moving: <a href='?src=[UID()];operation=togglemoving'>[moving ? "Enabled":"Disabled"]</a>"
if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
pathpos = 1
var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
if(!(nextmove in list("N","S","E","W","C","R")))
// N, S, E, W are directional
// C is center
// R is random (in magnetic field's bounds)
qdel(signal)
break // break the loop if the character located is invalid
signal.data["command"] = nextmove
user << browse(dat, "window=magnet;size=400x500")
onclose(user, "magnet")
Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["radio-op"])
// Prepare signal beforehand, because this is a radio operation
var/datum/signal/signal = new
signal.transmission_method = 1 // radio transmission
signal.source = src
signal.frequency = frequency
signal.data["code"] = code
// Apply any necessary commands
switch(href_list["radio-op"])
if("togglepower")
signal.data["command"] = "toggle-power"
if("minuselec")
signal.data["command"] = "sub-elec"
if("pluselec")
signal.data["command"] = "add-elec"
if("minusmag")
signal.data["command"] = "sub-mag"
if("plusmag")
signal.data["command"] = "add-mag"
// Broadcast the signal
pathpos++ // increase iterator
// Broadcast the signal
spawn()
radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
spawn(1)
updateUsrDialog() // pretty sure this increases responsiveness
if(speed == 10)
sleep(1)
else
sleep(12-speed)
if(href_list["operation"])
switch(href_list["operation"])
if("plusspeed")
speed++
if(speed > 10)
speed = 10
if("minusspeed")
speed --
if(speed <= 0)
speed = 1
if("setpath")
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
pathpos = 1 // reset position
filter_path() // renders rpath
if("togglemoving")
moving = !moving
if(moving)
spawn() MagnetMove()
looping = 0
updateUsrDialog()
/obj/machinery/magnetic_controller/proc/filter_path()
// Generates the rpath variable using the path string, think of this as "string2list"
// Doesn't use params2list() because of the akward way it stacks entities
rpath = list() // clear rpath
var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
proc/MagnetMove()
if(looping) return
for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
while(moving && rpath.len >= 1)
var/nextchar = copytext(path, i, i+1) // find next character
if(stat & (BROKEN|NOPOWER))
break
if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
rpath += copytext(path, i, i+1) // else, add to list
looping = 1
// Prepare the radio signal
var/datum/signal/signal = new
signal.transmission_method = 1 // radio transmission
signal.source = src
signal.frequency = frequency
signal.data["code"] = code
if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
pathpos = 1
var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
if(!(nextmove in list("N","S","E","W","C","R")))
// N, S, E, W are directional
// C is center
// R is random (in magnetic field's bounds)
qdel(signal)
break // break the loop if the character located is invalid
signal.data["command"] = nextmove
pathpos++ // increase iterator
// Broadcast the signal
spawn()
radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
if(speed == 10)
sleep(1)
else
sleep(12-speed)
looping = 0
proc/filter_path()
// Generates the rpath variable using the path string, think of this as "string2list"
// Doesn't use params2list() because of the akward way it stacks entities
rpath = list() // clear rpath
var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
var/nextchar = copytext(path, i, i+1) // find next character
if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
rpath += copytext(path, i, i+1) // else, add to list
// there doesn't HAVE to be separators but it makes paths syntatically visible
// there doesn't HAVE to be separators but it makes paths syntatically visible
+8
View File
@@ -220,6 +220,14 @@
var/i = 1
for(1, i <= coeff, i++)
LR.Charge(occupant)
//Fire extinguisher
if(istype(O, /obj/item/extinguisher))
var/obj/item/extinguisher/ext = O
ext.reagents.check_and_add("water", ext.max_water, 5 * coeff)
//Welding tools
if(istype(O, /obj/item/weldingtool))
var/obj/item/weldingtool/weld = O
weld.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff)
if(R)
if(R.module)
R.module.respawn_consumable(R)
File diff suppressed because it is too large Load Diff
+73 -73
View File
@@ -17,89 +17,89 @@
var/selfdestructing = 0
var/charges = 1
attack_hand(var/mob/user as mob)
usr.set_machine(src)
var/dat = "<font color=#005500><i>Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...<br>Identity confirmed,<br></i></font>"
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(is_special_character(user))
dat += "<font color=#07700><i>Operative record found. Greetings, Agent [user.name].</i></font><br>"
else if(charges < 1)
dat += "<TT>Connection severed.</TT><BR>"
else
var/honorific = "Mr."
if(user.gender == FEMALE)
honorific = "Ms."
dat += "<font color=red><i>Identity not found in operative database. What can the Syndicate do for you today, [honorific] [user.name]?</i></font><br>"
if(!selfdestructing)
dat += "<br><br><A href='?src=[UID()];betraitor=1;traitormob=\ref[user]'>\"[pick("I want to switch teams.", "I want to work for you.", "Let me join you.", "I can be of use to you.", "You want me working for you, and here's why...", "Give me an objective.", "How's the 401k over at the Syndicate?")]\"</A><BR>"
dat += temptext
user << browse(dat, "window=syndbeacon")
onclose(user, "syndbeacon")
/obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob)
usr.set_machine(src)
var/dat = "<font color=#005500><i>Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...<br>Identity confirmed,<br></i></font>"
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(is_special_character(user))
dat += "<font color=#07700><i>Operative record found. Greetings, Agent [user.name].</i></font><br>"
else if(charges < 1)
dat += "<TT>Connection severed.</TT><BR>"
else
var/honorific = "Mr."
if(user.gender == FEMALE)
honorific = "Ms."
dat += "<font color=red><i>Identity not found in operative database. What can the Syndicate do for you today, [honorific] [user.name]?</i></font><br>"
if(!selfdestructing)
dat += "<br><br><A href='?src=[UID()];betraitor=1;traitormob=\ref[user]'>\"[pick("I want to switch teams.", "I want to work for you.", "Let me join you.", "I can be of use to you.", "You want me working for you, and here's why...", "Give me an objective.", "How's the 401k over at the Syndicate?")]\"</A><BR>"
dat += temptext
user << browse(dat, "window=syndbeacon")
onclose(user, "syndbeacon")
Topic(href, href_list)
if(..())
return 1
if(href_list["betraitor"])
if(charges < 1)
/obj/machinery/syndicate_beacon/Topic(href, href_list)
if(..())
return 1
if(href_list["betraitor"])
if(charges < 1)
src.updateUsrDialog()
return
var/mob/M = locate(href_list["traitormob"])
if(M.mind.special_role)
temptext = "<i>We have no need for you at this time. Have a pleasant day.</i><br>"
src.updateUsrDialog()
return
charges -= 1
switch(rand(1,2))
if(1)
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
var/mob/M = locate(href_list["traitormob"])
if(M.mind.special_role)
temptext = "<i>We have no need for you at this time. Have a pleasant day.</i><br>"
src.updateUsrDialog()
return
charges -= 1
switch(rand(1,2))
if(1)
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += N.mind
N.mind.special_role = SPECIAL_ROLE_TRAITOR
var/objective = "Free Objective"
switch(rand(1,100))
if(1 to 50)
objective = "Steal [pick("a hand teleporter", "the Captain's antique laser gun", "a jetpack", "the Captain's ID", "the Captain's jumpsuit")]."
if(51 to 60)
objective = "Destroy 70% or more of the station's plasma tanks."
if(61 to 70)
objective = "Cut power to 80% or more of the station's tiles."
if(71 to 80)
objective = "Destroy the AI."
if(81 to 90)
objective = "Kill all monkeys aboard the station."
else
objective = "Make certain at least 80% of the station evacuates on the shuttle."
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = N.mind
N.mind.objectives += custom_objective
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += N.mind
N.mind.special_role = SPECIAL_ROLE_TRAITOR
var/objective = "Free Objective"
switch(rand(1,100))
if(1 to 50)
objective = "Steal [pick("a hand teleporter", "the Captain's antique laser gun", "a jetpack", "the Captain's ID", "the Captain's jumpsuit")]."
if(51 to 60)
objective = "Destroy 70% or more of the station's plasma tanks."
if(61 to 70)
objective = "Cut power to 80% or more of the station's tiles."
if(71 to 80)
objective = "Destroy the AI."
if(81 to 90)
objective = "Kill all monkeys aboard the station."
else
objective = "Make certain at least 80% of the station evacuates on the shuttle."
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = N.mind
N.mind.objectives += custom_objective
var/datum/objective/escape/escape_objective = new
escape_objective.owner = N.mind
N.mind.objectives += escape_objective
var/datum/objective/escape/escape_objective = new
escape_objective.owner = N.mind
N.mind.objectives += escape_objective
to_chat(M, "<B>You have joined the ranks of the Syndicate and become a traitor to the station!</B>")
to_chat(M, "<B>You have joined the ranks of the Syndicate and become a traitor to the station!</B>")
message_admins("[key_name_admin(N)] has accepted a traitor objective from a syndicate beacon.")
message_admins("[key_name_admin(N)] has accepted a traitor objective from a syndicate beacon.")
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
to_chat(M, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
to_chat(M, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
src.add_fingerprint(usr)
src.updateUsrDialog()
return
src.add_fingerprint(usr)
src.updateUsrDialog()
return
proc/selfdestruct()
selfdestructing = 1
spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10)
/obj/machinery/syndicate_beacon/proc/selfdestruct()
selfdestructing = 1
spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10)
@@ -196,4 +196,4 @@
/obj/machinery/power/singularity_beacon/syndicate
icontype = "beaconsynd"
icon_state = "beaconsynd0"
icon_state = "beaconsynd0"
+4 -4
View File
@@ -75,10 +75,10 @@
freq_listening = list(AI_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ)
//Common and other radio frequencies for people to freely use
New()
for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
freq_listening |= i
..()
/obj/machinery/telecomms/receiver/preset_right/New()
for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
freq_listening |= i
..()
/obj/machinery/telecomms/receiver/preset_cent
id = "CentComm Receiver"
+21 -42
View File
@@ -33,9 +33,9 @@
/obj/item/mecha_parts/chassis/ripley
name = "Ripley Chassis"
New()
..()
construct = new /datum/construction/mecha/ripley_chassis(src)
/obj/item/mecha_parts/chassis/ripley/New()
..()
construct = new /datum/construction/mecha/ripley_chassis(src)
/obj/item/mecha_parts/part/ripley_torso
name="Ripley Torso"
@@ -68,9 +68,9 @@
/obj/item/mecha_parts/chassis/gygax
name = "Gygax Chassis"
New()
..()
construct = new /datum/construction/mecha/gygax_chassis(src)
/obj/item/mecha_parts/chassis/gygax/New()
..()
construct = new /datum/construction/mecha/gygax_chassis(src)
/obj/item/mecha_parts/part/gygax_torso
name="Gygax Torso"
@@ -117,9 +117,9 @@
/obj/item/mecha_parts/chassis/durand
name = "Durand Chassis"
New()
..()
construct = new /datum/construction/mecha/durand_chassis(src)
/obj/item/mecha_parts/chassis/durand/New()
..()
construct = new /datum/construction/mecha/durand_chassis(src)
/obj/item/mecha_parts/part/durand_torso
name="Durand Torso"
@@ -163,39 +163,18 @@
/obj/item/mecha_parts/chassis/firefighter
name = "Firefighter Chassis"
New()
..()
construct = new /datum/construction/mecha/firefighter_chassis(src)
/*
/obj/item/mecha_parts/part/firefighter_torso
name="Ripley-on-Fire Torso"
icon_state = "ripley_harness"
/obj/item/mecha_parts/part/firefighter_left_arm
name="Ripley-on-Fire Left Arm"
icon_state = "ripley_l_arm"
/obj/item/mecha_parts/part/firefighter_right_arm
name="Ripley-on-Fire Right Arm"
icon_state = "ripley_r_arm"
/obj/item/mecha_parts/part/firefighter_left_leg
name="Ripley-on-Fire Left Leg"
icon_state = "ripley_l_leg"
/obj/item/mecha_parts/part/firefighter_right_leg
name="Ripley-on-Fire Right Leg"
icon_state = "ripley_r_leg"
*/
/obj/item/mecha_parts/chassis/firefighter/New()
..()
construct = new /datum/construction/mecha/firefighter_chassis(src)
////////// HONK
/obj/item/mecha_parts/chassis/honker
name = "H.O.N.K Chassis"
New()
..()
construct = new /datum/construction/mecha/honker_chassis(src)
/obj/item/mecha_parts/chassis/honker/New()
..()
construct = new /datum/construction/mecha/honker_chassis(src)
/obj/item/mecha_parts/part/honker_torso
name="H.O.N.K Torso"
@@ -275,9 +254,9 @@
/obj/item/mecha_parts/chassis/phazon
name = "Phazon Chassis"
New()
..()
construct = new /datum/construction/mecha/phazon_chassis(src)
/obj/item/mecha_parts/chassis/phazon/New()
..()
construct = new /datum/construction/mecha/phazon_chassis(src)
/obj/item/mecha_parts/part/phazon_torso
name="Phazon Torso"
@@ -319,9 +298,9 @@
/obj/item/mecha_parts/chassis/odysseus
name = "Odysseus Chassis"
New()
..()
construct = new /datum/construction/mecha/odysseus_chassis(src)
/obj/item/mecha_parts/chassis/odysseus/New()
..()
construct = new /datum/construction/mecha/odysseus_chassis(src)
/obj/item/mecha_parts/part/odysseus_head
name="Odysseus Head"
+91 -91
View File
@@ -15,10 +15,10 @@
var/list/crowbar_salvage
var/salvage_num = 5
New()
..()
crowbar_salvage = new
return
/obj/effect/decal/mecha_wreckage/New()
..()
crowbar_salvage = new
return
/obj/effect/decal/mecha_wreckage/ex_act(severity)
if(severity < 2)
@@ -86,20 +86,20 @@
name = "Gygax wreckage"
icon_state = "gygax-broken"
New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_head,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/gygax/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_head,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/gygax/dark
name = "Dark Gygax wreckage"
@@ -126,38 +126,38 @@
name = "Ripley wreckage"
icon_state = "ripley-broken"
New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/ripley/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/ripley/firefighter
name = "Firefighter wreckage"
icon_state = "firefighter-broken"
New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg,
/obj/item/clothing/suit/fire)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
/obj/item/mecha_parts/part/ripley_right_arm,
/obj/item/mecha_parts/part/ripley_left_leg,
/obj/item/mecha_parts/part/ripley_right_leg,
/obj/item/clothing/suit/fire)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/ripley/deathripley
name = "Death-Ripley wreckage"
@@ -167,42 +167,42 @@
name = "Honker wreckage"
icon_state = "honker-broken"
New()
..()
var/list/parts = list(
/obj/item/mecha_parts/chassis/honker,
/obj/item/mecha_parts/part/honker_torso,
/obj/item/mecha_parts/part/honker_head,
/obj/item/mecha_parts/part/honker_left_arm,
/obj/item/mecha_parts/part/honker_right_arm,
/obj/item/mecha_parts/part/honker_left_leg,
/obj/item/mecha_parts/part/honker_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/honker/New()
..()
var/list/parts = list(
/obj/item/mecha_parts/chassis/honker,
/obj/item/mecha_parts/part/honker_torso,
/obj/item/mecha_parts/part/honker_head,
/obj/item/mecha_parts/part/honker_left_arm,
/obj/item/mecha_parts/part/honker_right_arm,
/obj/item/mecha_parts/part/honker_left_leg,
/obj/item/mecha_parts/part/honker_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/durand
name = "Durand wreckage"
icon_state = "durand-broken"
New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/durand_torso,
/obj/item/mecha_parts/part/durand_head,
/obj/item/mecha_parts/part/durand_left_arm,
/obj/item/mecha_parts/part/durand_right_arm,
/obj/item/mecha_parts/part/durand_left_leg,
/obj/item/mecha_parts/part/durand_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/durand/New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/durand_torso,
/obj/item/mecha_parts/part/durand_head,
/obj/item/mecha_parts/part/durand_left_arm,
/obj/item/mecha_parts/part/durand_right_arm,
/obj/item/mecha_parts/part/durand_left_leg,
/obj/item/mecha_parts/part/durand_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/durand/old
@@ -218,18 +218,18 @@
name = "Odysseus wreckage"
icon_state = "odysseus-broken"
New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/odysseus_torso,
/obj/item/mecha_parts/part/odysseus_head,
/obj/item/mecha_parts/part/odysseus_left_arm,
/obj/item/mecha_parts/part/odysseus_right_arm,
/obj/item/mecha_parts/part/odysseus_left_leg,
/obj/item/mecha_parts/part/odysseus_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
/obj/effect/decal/mecha_wreckage/odysseus/New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/odysseus_torso,
/obj/item/mecha_parts/part/odysseus_head,
/obj/item/mecha_parts/part/odysseus_left_arm,
/obj/item/mecha_parts/part/odysseus_right_arm,
/obj/item/mecha_parts/part/odysseus_left_leg,
/obj/item/mecha_parts/part/odysseus_right_leg)
for(var/i=0;i<2;i++)
if(!isemptylist(parts) && prob(40))
var/part = pick(parts)
welder_salvage += part
parts -= part
return
@@ -12,13 +12,13 @@
src.icon_state = pick(src.random_icon_states)
create_reagents(100)
if(smooth)
smooth_icon(src)
smooth_icon_neighbors(src)
queue_smooth(src)
queue_smooth_neighbors(src)
..()
/obj/effect/decal/cleanable/Destroy()
if(smooth)
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
return ..()
/obj/effect/decal/cleanable/attackby(obj/item/W as obj, mob/user as mob,)
+27 -27
View File
@@ -16,38 +16,38 @@
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
New(location, datum/dna/MobDNA)
..()
/obj/effect/gibspawner/New(location, datum/dna/MobDNA)
..()
if(istype(loc,/turf)) //basically if a badmin spawns it
Gib(loc, MobDNA)
if(istype(loc,/turf)) //basically if a badmin spawns it
Gib(loc, MobDNA)
proc/Gib(atom/location, datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_chat(world, "<span class='warning'>Gib list length mismatch!</span>")
return
/obj/effect/gibspawner/proc/Gib(atom/location, datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_chat(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)
do_sparks(2, 1, location)
if(sparks)
do_sparks(2, 1, 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)
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)
gib.blood_DNA = list()
if(MobDNA)
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
else if(istype(src, /obj/effect/gibspawner/xeno))
gib.blood_DNA["UNKNOWN DNA"] = "X*"
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
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/xeno))
gib.blood_DNA["UNKNOWN DNA"] = "X*"
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
qdel(src)
qdel(src)
@@ -1,36 +1,35 @@
/obj/effect/gibspawner
generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
/obj/effect/gibspawner/generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
/obj/effect/gibspawner/generic/New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
/obj/effect/gibspawner/human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
/obj/effect/gibspawner/human/New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
xeno
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
gibamounts = list(1,1,1,1,1,1,1)
/obj/effect/gibspawner/xeno
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
/obj/effect/gibspawner/xeno/New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
gibamounts = list(1,1,1,1,1,1)
/obj/effect/gibspawner/robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
gibamounts = list(1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()
/obj/effect/gibspawner/robot/New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()
+46 -45
View File
@@ -17,15 +17,16 @@
name = "body bags"
desc = "This box contains body bags."
icon_state = "bodybags"
New()
..()
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
/obj/item/storage/box/bodybags/New()
..()
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
/obj/structure/closet/body_bag
@@ -40,47 +41,47 @@
density = 0
attackby(W as obj, mob/user as mob, params)
if(istype(W, /obj/item/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if(t)
src.name = "body bag - "
src.name += t
src.overlays += image(src.icon, "bodybag_label")
else
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob, params)
if(istype(W, /obj/item/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if(user.get_active_hand() != W)
return
else if(istype(W, /obj/item/wirecutters))
to_chat(user, "You cut the tag off the bodybag")
if(!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if(t)
src.name = "body bag - "
src.name += t
src.overlays += image(src.icon, "bodybag_label")
else
src.name = "body bag"
src.overlays.Cut()
return
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(istype(W, /obj/item/wirecutters))
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
src.overlays.Cut()
return
close()
if(..())
density = 0
return 1
return 0
/obj/structure/closet/body_bag/close()
if(..())
density = 0
return 1
return 0
MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
if(opened) return 0
if(contents.len) return 0
visible_message("[usr] folds up the [src.name]")
new item_path(get_turf(src))
spawn(0)
qdel(src)
return
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
if(opened) return 0
if(contents.len) return 0
visible_message("[usr] folds up the [src.name]")
new item_path(get_turf(src))
spawn(0)
qdel(src)
return
/obj/structure/closet/body_bag/relaymove(mob/user as mob)
if(user.stat)
@@ -89,4 +90,4 @@
// Make it possible to escape from bodybags in morgues and crematoriums
if(loc && (isturf(loc) || istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
if(!open())
to_chat(user, "<span class='notice'>It won't budge!</span>")
to_chat(user, "<span class='notice'>It won't budge!</span>")
@@ -46,9 +46,10 @@
return
/obj/item/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
proc/digest_delay()
/obj/item/radio/beacon/bacon/proc/digest_delay()
spawn(600)
qdel(src)
qdel(src)
// SINGULO BEACON SPAWNER
/obj/item/radio/beacon/syndicate
@@ -82,4 +83,4 @@
new /obj/machinery/syndicatebomb( user.loc )
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
qdel(src)
return
return
+2 -1
View File
@@ -439,7 +439,8 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
flags = CONDUCT | OPENCONTAINER
flags = CONDUCT
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
+10 -10
View File
@@ -51,9 +51,9 @@
/obj/item/reagent_containers/glass/bottle/random_reagent/New()
..()
var/list/possible_chems = GLOB.chemical_reagents_list.Copy()
possible_chems -= blocked_chems.Copy()
possible_chems -= GLOB.blocked_chems.Copy()
var/datum/reagent/R = pick(possible_chems)
if(rare_chemicals.Find(R))
if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(2, 3)*10)
@@ -68,7 +68,7 @@
/obj/item/reagent_containers/glass/bottle/random_chem/New()
..()
var/R = get_random_reagent_id()
if(rare_chemicals.Find(R))
if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(2, 3)*10)
@@ -82,7 +82,7 @@
/obj/item/reagent_containers/glass/bottle/random_base_chem/New()
..()
var/datum/reagent/R = pick(base_chemicals)
var/datum/reagent/R = pick(GLOB.base_chemicals)
reagents.add_reagent(R, rand(2, 6)*5)
name = "unlabelled bottle"
pixel_x = rand(-10, 10)
@@ -94,7 +94,7 @@
/obj/item/reagent_containers/food/drinks/bottle/random_drink/New()
..()
var/list/possible_drinks = drinks.Copy()
var/list/possible_drinks = GLOB.drinks.Copy()
if(prob(50))
possible_drinks += list("pancuronium","lsd","omnizine","blood")
@@ -113,7 +113,7 @@
..()
var/R = get_random_reagent_id()
if(rare_chemicals.Find(R))
if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(3, 10)*10)
@@ -131,13 +131,13 @@
/obj/item/storage/pill_bottle/random_meds/New()
..()
for(var/i in 1 to storage_slots)
var/list/possible_medicines = standard_medicines.Copy()
var/list/possible_medicines = GLOB.standard_medicines.Copy()
if(prob(50))
possible_medicines += rare_medicines.Copy()
possible_medicines += GLOB.rare_medicines.Copy()
var/datum/reagent/R = pick(possible_medicines)
var/obj/item/reagent_containers/food/pill/P = new(src)
if(rare_medicines.Find(R))
if(GLOB.rare_medicines.Find(R))
P.reagents.add_reagent(R, 10)
else
P.reagents.add_reagent(R, rand(2, 5)*10)
@@ -182,7 +182,7 @@
/obj/structure/closet/crate/secure/chemicals/New()
..()
for(var/chem in standard_chemicals)
for(var/chem in GLOB.standard_chemicals)
var/obj/item/reagent_containers/glass/bottle/B = new(src)
B.reagents.add_reagent(chem, B.volume)
if(prob(85))
+15 -15
View File
@@ -159,21 +159,21 @@
var/b2y1 = 0
var/b2y2 = 0
New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
if(!Target) return
/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
if(!Target) return
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
Target.bulletholes.Add(src)
+7 -2
View File
@@ -152,8 +152,13 @@ RCD
var/obj/item/pda/pda = I
I = pda.id
var/obj/item/card/id/ID = I
if(istype(ID) && ID && check_access(ID))
locked = 0
if(istype(ID) && ID)
if(check_access(ID))
locked = 0
else
to_chat(usr, "<span class='warning'>This ID lacks access.</span>")
else
to_chat(usr, "<span class='warning'>You can't swipe without your ID in hand.</span>")
. = 1
if(href_list["logout"])
+45 -46
View File
@@ -10,53 +10,52 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("warned", "cautioned", "smashed")
proximity_sign
var/timing = 0
var/armed = 0
var/timepassed = 0
/obj/item/caution/proximity_sign
var/timing = 0
var/armed = 0
var/timepassed = 0
attack_self(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.mind.assigned_role != "Janitor")
return
if(armed)
armed = 0
to_chat(user, "<span class='notice'>You disarm \the [src].</span>")
return
timing = !timing
if(timing)
processing_objects.Add(src)
else
armed = 0
timepassed = 0
to_chat(H, "<span class='notice'>You [timing ? "activate \the [src]'s timer, you have 15 seconds." : "de-activate \the [src]'s timer."]</span>")
/obj/item/caution/proximity_sign/attack_self(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.mind.assigned_role != "Janitor")
return
if(armed)
armed = 0
to_chat(user, "<span class='notice'>You disarm \the [src].</span>")
return
timing = !timing
if(timing)
processing_objects.Add(src)
else
armed = 0
timepassed = 0
to_chat(H, "<span class='notice'>You [timing ? "activate \the [src]'s timer, you have 15 seconds." : "de-activate \the [src]'s timer."]</span>")
process()
if(!timing)
processing_objects.Remove(src)
timepassed++
if(timepassed >= 15 && !armed)
armed = 1
timing = 0
/obj/item/caution/proximity_sign/process()
if(!timing)
processing_objects.Remove(src)
timepassed++
if(timepassed >= 15 && !armed)
armed = 1
timing = 0
HasProximity(atom/movable/AM as mob|obj)
if(armed)
if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
var/mob/living/carbon/C = AM
if(C.m_intent != MOVE_INTENT_WALK)
src.visible_message("The [src.name] beeps, \"Running on wet floors is hazardous to your health.\"")
explosion(src.loc,-1,0,2)
if(ishuman(C))
dead_legs(C)
if(src)
qdel(src)
proc/dead_legs(mob/living/carbon/human/H as mob)
var/obj/item/organ/external/l = H.get_organ("l_leg")
var/obj/item/organ/external/r = H.get_organ("r_leg")
if(l)
l.droplimb(0, DROPLIMB_SHARP)
if(r)
r.droplimb(0, DROPLIMB_SHARP)
/obj/item/caution/proximity_sign/HasProximity(atom/movable/AM as mob|obj)
if(armed)
if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
var/mob/living/carbon/C = AM
if(C.m_intent != MOVE_INTENT_WALK)
src.visible_message("The [src.name] beeps, \"Running on wet floors is hazardous to your health.\"")
explosion(src.loc,-1,0,2)
if(ishuman(C))
dead_legs(C)
if(src)
qdel(src)
/obj/item/caution/proximity_sign/proc/dead_legs(mob/living/carbon/human/H as mob)
var/obj/item/organ/external/l = H.get_organ("l_leg")
var/obj/item/organ/external/r = H.get_organ("r_leg")
if(l)
l.droplimb(0, DROPLIMB_SHARP)
if(r)
r.droplimb(0, DROPLIMB_SHARP)
+183 -138
View File
@@ -159,9 +159,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/dnainjector/hulkmut/New()
block = HULKBLOCK
..()
/obj/item/dnainjector/antihulk
name = "DNA-Injector (Anti-Hulk)"
@@ -169,9 +170,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/dnainjector/antihulk/New()
block = HULKBLOCK
..()
/obj/item/dnainjector/xraymut
name = "DNA-Injector (Xray)"
@@ -179,9 +181,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/dnainjector/xraymut/New()
block = XRAYBLOCK
..()
/obj/item/dnainjector/antixray
name = "DNA-Injector (Anti-Xray)"
@@ -189,10 +192,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/dnainjector/antixray/New()
block = XRAYBLOCK
..()
/obj/item/dnainjector/firemut
name = "DNA-Injector (Fire)"
@@ -200,9 +203,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/dnainjector/firemut/New()
block = FIREBLOCK
..()
/obj/item/dnainjector/antifire
name = "DNA-Injector (Anti-Fire)"
@@ -210,9 +214,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/dnainjector/antifire/New()
block = FIREBLOCK
..()
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
@@ -220,9 +225,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/dnainjector/telemut/New()
block = TELEBLOCK
..()
/obj/item/dnainjector/telemut/darkbundle
name = "DNA injector"
@@ -235,9 +241,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/dnainjector/antitele/New()
block = TELEBLOCK
..()
/obj/item/dnainjector/nobreath
name = "DNA-Injector (Breathless)"
@@ -245,9 +252,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = BREATHLESSBLOCK
..()
/obj/item/dnainjector/nobreath/New()
block = BREATHLESSBLOCK
..()
/obj/item/dnainjector/antinobreath
name = "DNA-Injector (Anti-Breathless)"
@@ -255,9 +263,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = BREATHLESSBLOCK
..()
/obj/item/dnainjector/antinobreath/New()
block = BREATHLESSBLOCK
..()
/obj/item/dnainjector/remoteview
name = "DNA-Injector (Remote View)"
@@ -265,9 +274,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/dnainjector/remoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/dnainjector/antiremoteview
name = "DNA-Injector (Anti-Remote View)"
@@ -275,9 +285,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/dnainjector/antiremoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/dnainjector/regenerate
name = "DNA-Injector (Regeneration)"
@@ -285,9 +296,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/dnainjector/regenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/dnainjector/antiregenerate
name = "DNA-Injector (Anti-Regeneration)"
@@ -295,9 +307,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/dnainjector/antiregenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/dnainjector/runfast
name = "DNA-Injector (Increase Run)"
@@ -305,9 +318,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/dnainjector/runfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/dnainjector/antirunfast
name = "DNA-Injector (Anti-Increase Run)"
@@ -315,9 +329,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/dnainjector/antirunfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/dnainjector/morph
name = "DNA-Injector (Morph)"
@@ -325,9 +340,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = MORPHBLOCK
..()
/obj/item/dnainjector/morph/New()
block = MORPHBLOCK
..()
/obj/item/dnainjector/antimorph
name = "DNA-Injector (Anti-Morph)"
@@ -335,9 +351,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = MORPHBLOCK
..()
/obj/item/dnainjector/antimorph/New()
block = MORPHBLOCK
..()
/obj/item/dnainjector/noprints
name = "DNA-Injector (No Prints)"
@@ -345,9 +362,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/dnainjector/noprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/dnainjector/antinoprints
name = "DNA-Injector (Anti-No Prints)"
@@ -355,9 +373,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/dnainjector/antinoprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/dnainjector/insulation
name = "DNA-Injector (Shock Immunity)"
@@ -365,9 +384,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/dnainjector/insulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/dnainjector/antiinsulation
name = "DNA-Injector (Anti-Shock Immunity)"
@@ -375,9 +395,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/dnainjector/antiinsulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/dnainjector/midgit
name = "DNA-Injector (Small Size)"
@@ -385,9 +406,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/dnainjector/midgit/New()
block = SMALLSIZEBLOCK
..()
/obj/item/dnainjector/antimidgit
name = "DNA-Injector (Anti-Small Size)"
@@ -395,9 +417,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/dnainjector/antimidgit/New()
block = SMALLSIZEBLOCK
..()
/////////////////////////////////////
/obj/item/dnainjector/antiglasses
@@ -406,9 +429,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/dnainjector/antiglasses/New()
block = GLASSESBLOCK
..()
/obj/item/dnainjector/glassesmut
name = "DNA-Injector (Glasses)"
@@ -416,9 +440,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/dnainjector/glassesmut/New()
block = GLASSESBLOCK
..()
/obj/item/dnainjector/epimut
name = "DNA-Injector (Epi.)"
@@ -426,9 +451,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 3
New()
block = EPILEPSYBLOCK
..()
/obj/item/dnainjector/epimut/New()
block = EPILEPSYBLOCK
..()
/obj/item/dnainjector/antiepi
name = "DNA-Injector (Anti-Epi.)"
@@ -436,9 +462,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 3
New()
block = EPILEPSYBLOCK
..()
/obj/item/dnainjector/antiepi/New()
block = EPILEPSYBLOCK
..()
/obj/item/dnainjector/anticough
name = "DNA-Injector (Anti-Cough)"
@@ -446,9 +473,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/dnainjector/anticough/New()
block = COUGHBLOCK
..()
/obj/item/dnainjector/coughmut
name = "DNA-Injector (Cough)"
@@ -456,9 +484,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/dnainjector/coughmut/New()
block = COUGHBLOCK
..()
/obj/item/dnainjector/clumsymut
name = "DNA-Injector (Clumsy)"
@@ -466,9 +495,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/dnainjector/clumsymut/New()
block = CLUMSYBLOCK
..()
/obj/item/dnainjector/anticlumsy
name = "DNA-Injector (Anti-Clumy)"
@@ -476,9 +506,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/dnainjector/anticlumsy/New()
block = CLUMSYBLOCK
..()
/obj/item/dnainjector/antitour
name = "DNA-Injector (Anti-Tour.)"
@@ -486,9 +517,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/dnainjector/antitour/New()
block = TWITCHBLOCK
..()
/obj/item/dnainjector/tourmut
name = "DNA-Injector (Tour.)"
@@ -496,9 +528,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/dnainjector/tourmut/New()
block = TWITCHBLOCK
..()
/obj/item/dnainjector/stuttmut
name = "DNA-Injector (Stutt.)"
@@ -506,9 +539,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/dnainjector/stuttmut/New()
block = NERVOUSBLOCK
..()
/obj/item/dnainjector/antistutt
@@ -517,9 +551,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/dnainjector/antistutt/New()
block = NERVOUSBLOCK
..()
/obj/item/dnainjector/blindmut
name = "DNA-Injector (Blind)"
@@ -527,9 +562,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/dnainjector/blindmut/New()
block = BLINDBLOCK
..()
/obj/item/dnainjector/antiblind
name = "DNA-Injector (Anti-Blind)"
@@ -537,9 +573,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/dnainjector/antiblind/New()
block = BLINDBLOCK
..()
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
@@ -547,9 +584,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/dnainjector/telemut/New()
block = TELEBLOCK
..()
/obj/item/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)"
@@ -557,9 +595,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/dnainjector/antitele/New()
block = TELEBLOCK
..()
/obj/item/dnainjector/deafmut
name = "DNA-Injector (Deaf)"
@@ -567,9 +606,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/dnainjector/deafmut/New()
block = DEAFBLOCK
..()
/obj/item/dnainjector/antideaf
name = "DNA-Injector (Anti-Deaf)"
@@ -577,9 +617,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/dnainjector/antideaf/New()
block = DEAFBLOCK
..()
/obj/item/dnainjector/hallucination
name = "DNA-Injector (Halluctination)"
@@ -587,9 +628,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/dnainjector/hallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/dnainjector/antihallucination
name = "DNA-Injector (Anti-Hallucination)"
@@ -597,9 +639,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/dnainjector/antihallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/dnainjector/h2m
name = "DNA-Injector (Human > Monkey)"
@@ -607,9 +650,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/dnainjector/h2m/New()
block = MONKEYBLOCK
..()
/obj/item/dnainjector/m2h
name = "DNA-Injector (Monkey > Human)"
@@ -617,6 +661,7 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/dnainjector/m2h/New()
block = MONKEYBLOCK
..()
+48 -48
View File
@@ -6,52 +6,52 @@
icon_state = "lepopen"
var/used = null
/obj/item/dnascrambler/update_icon()
if(used)
icon_state = "lepopen0"
else
icon_state = "lepopen"
/obj/item/dnascrambler/attack(mob/M as mob, mob/user as mob)
if(!M || !user)
return
if(!ishuman(M) || !ishuman(user))
return
if(used)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(NO_DNA in H.dna.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user] injects [user.p_them()]self with [src]!</span>")
injected(user, user)
else
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
if(do_mob(user,M,30))
user.visible_message("<span class='danger'>[user] injects [M] with [src].</span>")
injected(M, user)
else
to_chat(user, "<span class='warning'>You failed to inject [M].</span>")
/obj/item/dnascrambler/proc/injected(var/mob/living/carbon/human/target, var/mob/living/carbon/user)
if(istype(target))
var/mob/living/carbon/human/H = target
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
target.update_icons()
add_attack_logs(user, target, "injected with [src]")
used = 1
update_icon()
if(used)
icon_state = "lepopen0"
else
icon_state = "lepopen"
attack(mob/M as mob, mob/user as mob)
if(!M || !user)
return
if(!ishuman(M) || !ishuman(user))
return
if(used)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(NO_DNA in H.dna.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user] injects [user.p_them()]self with [src]!</span>")
injected(user, user)
else
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
if(do_mob(user,M,30))
user.visible_message("<span class='danger'>[user] injects [M] with [src].</span>")
injected(M, user)
else
to_chat(user, "<span class='warning'>You failed to inject [M].</span>")
proc/injected(var/mob/living/carbon/human/target, var/mob/living/carbon/user)
if(istype(target))
var/mob/living/carbon/human/H = target
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
target.update_icons()
add_attack_logs(user, target, "injected with [src]")
used = 1
update_icon()
name = "used " + name
name = "used " + name
@@ -11,6 +11,7 @@
throw_speed = 2
throw_range = 7
force = 10
container_type = AMOUNT_VISIBLE
materials = list(MAT_METAL=90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
@@ -36,11 +37,8 @@
sprite_name = "miniFE"
/obj/item/extinguisher/examine(mob/user)
if(..(user, 0))
to_chat(usr, "[bicon(src)] [src.name] contains:")
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
to_chat(user, "<span class='notice'>[R.volume] units of [R.name]</span>")
. = ..()
to_chat(user, "<span class='notice'>The safety is [safety ? "on" : "off"].</span>")
/obj/item/extinguisher/New()
@@ -432,18 +432,18 @@
desc = "Used for emergency sealing of air breaches."
stage = READY
New()
..()
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/metalfoam/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("fluorosurfactant", 10)
B2.reagents.add_reagent("sacid", 10)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("fluorosurfactant", 10)
B2.reagents.add_reagent("sacid", 10)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/incendiary
@@ -451,19 +451,19 @@
desc = "Used for clearing rooms of living things."
stage = READY
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
/obj/item/grenade/chem_grenade/incendiary/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("plasma", 25)
B2.reagents.add_reagent("sacid", 25)
B1.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("plasma", 25)
B2.reagents.add_reagent("sacid", 25)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/antiweed
@@ -471,20 +471,20 @@
desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
stage = READY
New()
..()
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/antiweed/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("atrazine", 30)
B1.reagents.add_reagent("potassium", 20)
B2.reagents.add_reagent("phosphorus", 20)
B2.reagents.add_reagent("sugar", 20)
B2.reagents.add_reagent("atrazine", 10)
B1.reagents.add_reagent("atrazine", 30)
B1.reagents.add_reagent("potassium", 20)
B2.reagents.add_reagent("phosphorus", 20)
B2.reagents.add_reagent("sugar", 20)
B2.reagents.add_reagent("atrazine", 10)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/cleaner
@@ -492,18 +492,18 @@
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = READY
New()
..()
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/cleaner/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("cleaner", 10)
B2.reagents.add_reagent("water", 40) //when you make pre-designed foam reactions that carry the reagents, always add water last
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("cleaner", 10)
B2.reagents.add_reagent("water", 40) //when you make pre-designed foam reactions that carry the reagents, always add water last
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/teargas
@@ -511,19 +511,19 @@
desc = "Used for nonlethal riot control. Contents under pressure. Do not directly inhale contents."
stage = READY
New()
..()
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/teargas/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("condensedcapsaicin", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent("condensedcapsaicin", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/facid
name = "acid grenade"
@@ -550,19 +550,19 @@
desc = "Contains sarin gas; extremely deadly and fast acting; use with extreme caution."
stage = READY
New()
..()
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/saringas/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("sarin", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent("sarin", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
#undef EMPTY
#undef WIRED
@@ -10,44 +10,34 @@
var/path = 0
var/affected_area = 2
prime()
..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
/*
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
if(prob(75))
banana(T)
*/
var/i = 0
var/number = 0
for(var/direction in alldirs)
for(i = 0; i < 2; i++)
number++
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
/* var/direction = pick(alldirs)
var/spaces = pick(1;150, 2)
var/a = 0
for(a = 0; a < spaces; a++)
step(peel,direction)*/
var/a = 1
if(number & 2)
for(a = 1; a <= 2; a++)
step(peel,direction)
else
/obj/item/grenade/clown_grenade/prime()
..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
/*
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
if(prob(75))
banana(T)
*/
var/i = 0
var/number = 0
for(var/direction in alldirs)
for(i = 0; i < 2; i++)
number++
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
/* var/direction = pick(alldirs)
var/spaces = pick(1;150, 2)
var/a = 0
for(a = 0; a < spaces; a++)
step(peel,direction)*/
var/a = 1
if(number & 2)
for(a = 1; a <= 2; a++)
step(peel,direction)
new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
qdel(src)
return
/*
proc/banana(turf/T as turf)
if(!T || !istype(T))
return
if(locate(/obj/structure/grille) in T)
return
if(locate(/obj/structure/window) in T)
return
new /obj/item/grown/bananapeel/traitorpeel(T)
*/
else
step(peel,direction)
new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
qdel(src)
return
/obj/item/grown/bananapeel/traitorpeel
trip_stun = 0
@@ -3,17 +3,17 @@
desc = "From the makers of BLAM! brand foaming space cleaner, this bomb guarantees steady work for any janitor."
stage = 2
New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/list/muck = list("blood","carbon","flour","radium")
var/filth = pick(muck - "radium") // not usually radioactive
/obj/item/grenade/chem_grenade/dirt/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/list/muck = list("blood","carbon","flour","radium")
var/filth = pick(muck - "radium") // not usually radioactive
B1.reagents.add_reagent(filth,25)
if(prob(25))
B1.reagents.add_reagent(pick(muck - filth,25)) // but sometimes...
B1.reagents.add_reagent(filth,25)
if(prob(25))
B1.reagents.add_reagent(pick(muck - filth,25)) // but sometimes...
beakers += B1
beakers += B1
/obj/item/grenade/chem_grenade/meat
@@ -22,18 +22,18 @@
stage = 2
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
/obj/item/grenade/chem_grenade/meat/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("blood",60)
if(prob(5))
B1.reagents.add_reagent("blood",1) // Quality control problems, causes a mess
B2.reagents.add_reagent("cryoxadone",30)
B1.reagents.add_reagent("blood",60)
if(prob(5))
B1.reagents.add_reagent("blood",1) // Quality control problems, causes a mess
B2.reagents.add_reagent("cryoxadone",30)
beakers += B1
beakers += B2
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/holywater
payload_name = "holy water"
@@ -41,11 +41,11 @@
stage = 2
det_time = 30
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B = new(src)
B.reagents.add_reagent("holywater",100)
beakers += B
/obj/item/grenade/chem_grenade/holywater/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B = new(src)
B.reagents.add_reagent("holywater",100)
beakers += B
/obj/item/grenade/chem_grenade/hellwater
payload_name = "hell water"
@@ -53,15 +53,15 @@
stage = 2
det_time = 30
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("hell_water",80)
B1.reagents.add_reagent("sugar",20)
B2.reagents.add_reagent("hell_water", 60)
B2.reagents.add_reagent("potassium", 20)
B2.reagents.add_reagent("phosphorus", 20)
/obj/item/grenade/chem_grenade/hellwater/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("hell_water",80)
B1.reagents.add_reagent("sugar",20)
B2.reagents.add_reagent("hell_water", 60)
B2.reagents.add_reagent("potassium", 20)
B2.reagents.add_reagent("phosphorus", 20)
/obj/item/grenade/chem_grenade/drugs
@@ -69,40 +69,40 @@
desc = "How does it work?"
stage = 2
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
/obj/item/grenade/chem_grenade/drugs/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("space_drugs", 25)
B1.reagents.add_reagent("lsd", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent("space_drugs", 25)
B1.reagents.add_reagent("lsd", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
/obj/item/grenade/chem_grenade/ethanol
payload_name = "ethanol"
desc = "Ach, that hits the spot."
stage = 2
New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
/obj/item/grenade/chem_grenade/ethanol/New()
..()
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("ethanol", 75)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B2.reagents.add_reagent("ethanol", 25)
B1.reagents.add_reagent("ethanol", 75)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B2.reagents.add_reagent("ethanol", 25)
beakers += B1
beakers += B2
update_icon()
beakers += B1
beakers += B2
update_icon()
// -------------------------------------
// Grenades using new grenade assemblies
@@ -208,107 +208,67 @@
payload_name = "EMP"
stage = 2
New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("uranium",50)
B2.reagents.add_reagent("iron",50)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/emp/New()
..()
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("uranium",50)
B2.reagents.add_reagent("iron",50)
beakers += B1
beakers += B2
// Assembly Variants
/obj/item/grenade/chem_grenade/emp/remote
New()
..()
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/grenade/chem_grenade/emp/remote/New()
..()
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/grenade/chem_grenade/emp/prox
New()
..()
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/grenade/chem_grenade/emp/prox/New()
..()
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/grenade/chem_grenade/emp/mine
New()
..()
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
// --------------------------------------
// Dangerous slime core grenades
// --------------------------------------
/*
/obj/item/grenade/chem_grenade/large/bluespace
payload_name = "bluespace slime"
desc = "A standard grenade casing containing weaponized slime extract."
stage = 2
New()
..()
var/obj/item/slime_extract/bluespace/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/large/bluespace/prox
New()
..()
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/grenade/chem_grenade/large/bluespace/mine
New()
..()
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/grenade/chem_grenade/large/bluespace/remote
New()
..()
CreateDefaultTrigger(/obj/item/assembly/signaler)
*/
/obj/item/grenade/chem_grenade/emp/mine/New()
..()
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/grenade/chem_grenade/large/monster
payload_name = "gold slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
New()
..()
var/obj/item/slime_extract/gold/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/large/monster/New()
..()
var/obj/item/slime_extract/gold/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/large/monster/prox
New()
..()
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/grenade/chem_grenade/large/monster/prox/New()
..()
CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
/obj/item/grenade/chem_grenade/large/monster/mine
New()
..()
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/grenade/chem_grenade/large/monster/mine/New()
..()
CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/grenade/chem_grenade/large/monster/remote
New()
..()
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/grenade/chem_grenade/large/monster/remote/New()
..()
CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/grenade/chem_grenade/large/feast
payload_name = "silver slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
New()
..()
var/obj/item/slime_extract/silver/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
/obj/item/grenade/chem_grenade/large/feast/New()
..()
var/obj/item/slime_extract/silver/B1 = new(src)
B1.Uses = rand(1,3)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B2.reagents.add_reagent("plasma",5 * B1.Uses)
beakers += B1
beakers += B2
// --------------------------------------
// Syndie Kits
@@ -316,25 +276,30 @@
/obj/item/storage/box/syndie_kit/remotegrenade
name = "Remote Grenade Kit"
New()
..()
new /obj/item/grenade/chem_grenade/explosion/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/storage/box/syndie_kit/remotegrenade/New()
..()
new /obj/item/grenade/chem_grenade/explosion/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/storage/box/syndie_kit/remoteemp
name = "Remote EMP Kit"
New()
..()
new /obj/item/grenade/chem_grenade/emp/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/storage/box/syndie_kit/remoteemp/New()
..()
new /obj/item/grenade/chem_grenade/emp/remote(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/storage/box/syndie_kit/remotelube
name = "Remote Lube Kit"
New()
..()
new /obj/item/grenade/chem_grenade/lube(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
/obj/item/storage/box/syndie_kit/remotelube/New()
..()
new /obj/item/grenade/chem_grenade/lube(src)
new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
new /obj/item/assembly/signaler(src)
return
@@ -8,31 +8,31 @@
slot_flags = SLOT_BELT
var/datum/effect_system/smoke_spread/bad/smoke
New()
..()
src.smoke = new /datum/effect_system/smoke_spread/bad
src.smoke.attach(src)
/obj/item/grenade/smokebomb/New()
..()
src.smoke = new /datum/effect_system/smoke_spread/bad
src.smoke.attach(src)
Destroy()
QDEL_NULL(smoke)
return ..()
/obj/item/grenade/smokebomb/Destroy()
QDEL_NULL(smoke)
return ..()
prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
/obj/item/grenade/smokebomb/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
qdel(src)
return
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
qdel(src)
return
@@ -3,7 +3,7 @@
desc = "Injects things."
icon_state = "reagents"
origin_tech = "materials=3;biotech=4"
flags = OPENCONTAINER
container_type = OPENCONTAINER
/obj/item/implant/chem/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
+1 -2
View File
@@ -24,8 +24,7 @@
icon_on = "zippoon"
icon_off = "zippo"
/obj/item/lighter/random
New()
/obj/item/lighter/random/New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
+15 -15
View File
@@ -89,25 +89,25 @@
icon_state = "lightning"
desc = "test lightning"
New()
/obj/item/lightning/New()
icon = midicon
icon_state = "1"
afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
var/angle = get_angle(A, user)
// to_chat(world, angle)
angle = round(angle) + 45
if(angle > 180)
angle -= 180
else
angle += 180
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
var/angle = get_angle(A, user)
//to_chat(world, angle)
angle = round(angle) + 45
if(angle > 180)
angle -= 180
else
angle += 180
if(!angle)
angle = 1
// to_chat(world, "adjusted [angle]")
icon_state = "[angle]"
// to_chat(world, "[angle] [(get_dist(user, A) - 1)]")
user.Beam(A, "lightning", 'icons/obj/zap.dmi', 50, 15)
if(!angle)
angle = 1
//to_chat(world, "adjusted [angle]")
icon_state = "[angle]"
//to_chat(world, "[angle] [(get_dist(user, A) - 1)]")
user.Beam(A, "lightning", 'icons/obj/zap.dmi', 50, 15)
/obj/item/newton
name = "newton cradle"
+1 -1
View File
@@ -13,7 +13,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
flags = OPENCONTAINER
container_type = OPENCONTAINER
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
@@ -185,10 +185,9 @@
desc = "An NT Deluxe satchel, with the finest quality leather and the company logo in a thin gold stitch"
icon_state = "nt_deluxe"
/obj/item/storage/backpack/satchel/withwallet
New()
..()
new /obj/item/storage/wallet/random( src )
/obj/item/storage/backpack/satchel/withwallet/New()
..()
new /obj/item/storage/wallet/random(src)
/obj/item/storage/backpack/satchel_norm
name = "satchel"
+95 -95
View File
@@ -207,122 +207,122 @@
w_class = WEIGHT_CLASS_NORMAL
allow_quick_empty = 1 // this function is superceded
New()
..()
//verbs -= /obj/item/storage/verb/quick_empty
//verbs += /obj/item/storage/bag/sheetsnatcher/quick_empty
/obj/item/storage/bag/sheetsnatcher/New()
..()
//verbs -= /obj/item/storage/verb/quick_empty
//verbs += /obj/item/storage/bag/sheetsnatcher/quick_empty
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
if(!stop_messages)
to_chat(usr, "The snatcher does not accept [W].")
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
to_chat(usr, "<span class='warning'>The snatcher is full.</span>")
return 0
return 1
/obj/item/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
if(!stop_messages)
to_chat(usr, "The snatcher does not accept [W].")
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
to_chat(usr, "<span class='warning'>The snatcher is full.</span>")
return 0
return 1
// Modified handle_item_insertion. Would prefer not to, but...
handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
else
amount = S.amount
for(var/obj/item/stack/sheet/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
inserted = 1
break
if(!inserted || !S.amount)
usr.unEquip(S)
usr.update_icons() //update our overlays
if(usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(!S.amount)
qdel(S)
else
amount = S.amount
S.loc = src
for(var/obj/item/stack/sheet/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
inserted = 1
break
if(!inserted || !S.amount)
usr.unEquip(S)
usr.update_icons() //update our overlays
if(usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(!S.amount)
qdel(S)
else
S.loc = src
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
return 1
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
return 1
// Sets up numbered display to show the stack size of each stored mineral
// NOTE: numbered display is turned off currently because it's broken
orient2hud(mob/user as mob)
var/adjusted_contents = contents.len
/obj/item/storage/bag/sheetsnatcher/orient2hud(mob/user as mob)
var/adjusted_contents = contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
numbered_contents.Add( D )
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
numbered_contents.Add( D )
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if(adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if(adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
// Modified quick_empty verb drops appropriate sized stacks
quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
if(!S.amount)
qdel(S) // todo: there's probably something missing here
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
/obj/item/storage/bag/sheetsnatcher/quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
if(!S.amount)
qdel(S) // todo: there's probably something missing here
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
// Instead of removing
remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
//I would prefer to drop a new stack, but the item/attack_hand code
// that calls this can't recieve a different object than you clicked on.
//Therefore, make a new stack internally that has the remainder.
// -Sayu
//I would prefer to drop a new stack, but the item/attack_hand code
// that calls this can't recieve a different object than you clicked on.
//Therefore, make a new stack internally that has the remainder.
// -Sayu
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount
return ..(S,new_location)
return ..(S,new_location)
// -----------------------------
// Sheet Snatcher (Cyborg)
+25 -25
View File
@@ -631,21 +631,21 @@
max_combined_w_class = 280
can_hold = list()
New()
..()
new /obj/item/crowbar(src)
new /obj/item/screwdriver(src)
new /obj/item/weldingtool/hugetank(src)
new /obj/item/wirecutters(src)
new /obj/item/wrench(src)
new /obj/item/multitool(src)
new /obj/item/stack/cable_coil(src)
/obj/item/storage/belt/bluespace/admin/New()
..()
new /obj/item/crowbar(src)
new /obj/item/screwdriver(src)
new /obj/item/weldingtool/hugetank(src)
new /obj/item/wirecutters(src)
new /obj/item/wrench(src)
new /obj/item/multitool(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/restraints/handcuffs(src)
new /obj/item/dnainjector/xraymut(src)
new /obj/item/dnainjector/firemut(src)
new /obj/item/dnainjector/telemut(src)
new /obj/item/dnainjector/hulkmut(src)
new /obj/item/restraints/handcuffs(src)
new /obj/item/dnainjector/xraymut(src)
new /obj/item/dnainjector/firemut(src)
new /obj/item/dnainjector/telemut(src)
new /obj/item/dnainjector/hulkmut(src)
// new /obj/item/spellbook(src) // for smoke effects, door openings, etc
// new /obj/item/magic/spellbook(src)
@@ -660,15 +660,15 @@
max_combined_w_class = 280
can_hold = list()
New()
..()
new /obj/item/crowbar(src)
new /obj/item/screwdriver(src)
new /obj/item/weldingtool/hugetank(src)
new /obj/item/wirecutters(src)
new /obj/item/wrench(src)
new /obj/item/multitool(src)
new /obj/item/stack/cable_coil(src)
/obj/item/storage/belt/bluespace/sandbox/New()
..()
new /obj/item/crowbar(src)
new /obj/item/screwdriver(src)
new /obj/item/weldingtool/hugetank(src)
new /obj/item/wirecutters(src)
new /obj/item/wrench(src)
new /obj/item/multitool(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/analyzer(src)
new /obj/item/healthanalyzer(src)
new /obj/item/analyzer(src)
new /obj/item/healthanalyzer(src)
@@ -116,7 +116,8 @@
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
volume = 500
flags = NODROP | OPENCONTAINER | NOBLUDGEON
flags = NODROP | NOBLUDGEON
container_type = OPENCONTAINER
var/obj/item/watertank/tank
+3 -3
View File
@@ -32,8 +32,8 @@
..()
if(smooth)
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
smooth_icon(src)
smooth_icon_neighbors(src)
queue_smooth(src)
queue_smooth_neighbors(src)
icon_state = ""
if(climbable)
verbs += /obj/structure/proc/climb_on
@@ -46,7 +46,7 @@
if(smooth)
var/turf/T = get_turf(src)
spawn(0)
smooth_icon_neighbors(T)
queue_smooth_neighbors(T)
return ..()
/obj/structure/proc/climb_on()
+2 -2
View File
@@ -82,7 +82,7 @@
if(density)
icon_state = initial(icon_state)
smooth = SMOOTH_TRUE
smooth_icon(src)
queue_smooth(src)
else
icon_state = "fwall_open"
@@ -322,4 +322,4 @@
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/simulated/wall/mineral/plastitanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
+1 -1
View File
@@ -7,7 +7,7 @@
icon_state = "cart"
anchored = 0
density = 1
flags = OPENCONTAINER
container_type = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/storage/bag/trash/mybag = null
+1 -1
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
flags = OPENCONTAINER
container_type = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
/obj/structure/mopbucket/New()
+2 -2
View File
@@ -50,8 +50,8 @@
/obj/structure/table/update_icon()
if(smooth && !flipped)
icon_state = ""
smooth_icon(src)
smooth_icon_neighbors(src)
queue_smooth(src)
queue_smooth_neighbors(src)
if(flipped)
clear_smooth_overlays()
+2 -2
View File
@@ -115,8 +115,8 @@
if(!open)
return
var/obj/item/reagent_containers/RG = I
if(RG.is_open_container())
if(RG.reagents.total_volume >= RG.volume)
if(RG.is_refillable())
if(RG.reagents.holder_full())
to_chat(user, "<span class='warning'>[RG] is full.</span>")
else
RG.reagents.add_reagent("toiletwater", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
+26 -7
View File
@@ -65,7 +65,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
else
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>")
if(!anchored && !fulltile)
to_chat(user, "<span class='notice'>Alt-click to rotate it clockwise.</span>")
to_chat(user, "<span class='notice'>Alt-click to rotate it.</span>")
/obj/structure/window/New(Loc, direct)
..()
@@ -355,7 +355,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.incapacitated())
return
if(anchored)
@@ -378,7 +378,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.incapacitated())
return
if(anchored)
@@ -397,12 +397,31 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return TRUE
/obj/structure/window/AltClick(mob/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
to_chat(user, "<span class='warning'>Move closer to the window!</span>")
return
revrotate()
if(anchored)
to_chat(user, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
return FALSE
var/target_dir = turn(dir, 270)
if(!valid_window_location(loc, target_dir))
target_dir = turn(dir, 90)
if(!valid_window_location(loc, target_dir))
to_chat(user, "<span class='warning'>There is no room to rotate the [src]</span>")
return FALSE
setDir(target_dir)
ini_dir = dir
add_fingerprint(user)
return TRUE
/obj/structure/window/Destroy()
density = FALSE
@@ -425,7 +444,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/proc/update_nearby_icons()
update_icon()
if(smooth)
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
/obj/structure/window/update_icon()
if(!QDELETED(src))
@@ -434,7 +453,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
var/ratio = obj_integrity / max_integrity
ratio = CEILING(ratio*4, 1) * 25
if(smooth)
smooth_icon(src)
queue_smooth(src)
overlays -= crack_overlay
if(ratio > 75)
return
@@ -714,4 +733,4 @@ obj/structure/window/full/reinforced/ice
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
level = 3
glass_amount = 2
glass_amount = 2
+1 -1
View File
@@ -85,6 +85,6 @@
/turf/simulated/ChangeTurf(var/path)
. = ..()
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
/turf/simulated/proc/is_shielded()
-1
View File
@@ -180,7 +180,6 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
var/turf/simulated/floor/plating/P = pry_tile(CB, user, TRUE)
if(!istype(P))
return
update_icon()
P.attackby(T, user, params)
/turf/simulated/floor/proc/pry_tile(obj/item/C, mob/user, silent = FALSE)
@@ -128,11 +128,11 @@
return 0
if(!broken && !burnt)
if(smooth)
smooth_icon(src)
queue_smooth(src)
else
make_plating()
if(smooth)
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
/turf/simulated/floor/carpet/break_tile()
broken = 1
@@ -15,9 +15,6 @@
/turf/simulated/floor/plating/New()
..()
icon_plating = icon_state
if(icon == 'icons/turf/floors/plating.dmi')
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/floor/plating, /turf/space)
update_icon()
/turf/simulated/floor/plating/update_icon()
@@ -25,7 +22,6 @@
return
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
underlays += image(icon, icon_state)
/turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params)
if(..())
+1 -1
View File
@@ -72,7 +72,7 @@
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
smooth_icon(src)
queue_smooth(src)
if(!damage)
if(damage_overlay)
overlays -= damage_overlays[damage_overlay]
@@ -65,7 +65,7 @@
d_state = RWALL_INTACT
update_icon()
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
to_chat(user, "<span class='notice'>You repair the last of the damage.</span>")
return TRUE
@@ -84,7 +84,7 @@
to_chat(user, "<span class='notice'>You add an additional layer of coating to the wall.</span>")
ChangeTurf(/turf/simulated/wall/r_wall/coated)
update_icon()
smooth_icon_neighbors(src)
queue_smooth_neighbors(src)
can_be_reinforced = FALSE
return TRUE
return FALSE
+3 -5
View File
@@ -39,18 +39,18 @@
for(var/atom/movable/AM in src)
Entered(AM)
if(smooth && ticker && ticker.current_state == GAME_STATE_PLAYING)
smooth_icon(src)
queue_smooth(src)
/hook/startup/proc/smooth_world()
var/watch = start_watch()
log_startup_progress("Smoothing atoms...")
for(var/turf/T in world)
if(T.smooth)
smooth_icon(T)
queue_smooth(T)
for(var/A in T)
var/atom/AA = A
if(AA.smooth)
smooth_icon(AA)
queue_smooth(AA)
log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.")
return 1
@@ -226,8 +226,6 @@
for(var/obj/structure/cable/C in contents)
qdel(C)
smooth_icon(src)
/turf/simulated/AfterChange(ignore_air, keep_cabling = FALSE)
..()
RemoveLattice()
+10 -1
View File
@@ -663,8 +663,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(job_master)
var/currentpositiontally
var/totalpositiontally
to_chat(src, "<span class='notice'>Job Name: Filled job slot / Total job slots <b>(Free job slots)</b></span>")
for(var/datum/job/job in job_master.occupations)
to_chat(src, "[job.title]: [job.total_positions]")
to_chat(src, "<span class='notice'>[job.title]: [job.current_positions] / \
[job.total_positions == -1 ? "<b>UNLIMITED</b>" : job.total_positions] \
<b>([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])</b></span>")
if(job.total_positions != -1) // Only count position that isn't unlimited
currentpositiontally += job.current_positions
totalpositiontally += job.total_positions
to_chat(src, "<b>Currently filled job slots (Excluding unlimited): [currentpositiontally] / [totalpositiontally] ([totalpositiontally - currentpositiontally])</b>")
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view())
+368 -366
View File
@@ -13,216 +13,216 @@
var/list/datum/automation/automations = list()
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
/obj/machinery/computer/general_air_control/atmos_automation/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/id_tag = signal.data["tag"]
if(!id_tag)
return
var/id_tag = signal.data["tag"]
if(!id_tag)
return
sensor_information[id_tag] = signal.data
sensor_information[id_tag] = signal.data
process()
if(on)
for(var/datum/automation/A in automations)
A.process()
/obj/machinery/computer/general_air_control/atmos_automation/process()
if(on)
for(var/datum/automation/A in automations)
A.process()
update_icon()
/obj/machinery/computer/general_air_control/atmos_automation/update_icon()
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
icon_state += "0"
else if(on)
icon_state += "_active"
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
icon_state += "0"
else if(on)
icon_state += "_active"
/obj/machinery/computer/general_air_control/atmos_automation/proc/request_device_refresh(device)
send_signal(list("tag"=device, "status"))
proc/request_device_refresh(var/device)
send_signal(list("tag"=device, "status"))
/obj/machinery/computer/general_air_control/atmos_automation/proc/send_signal(list/data, filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data=data
signal.data["sigtype"]="command"
signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
radio_connection.post_signal(src, signal, range = 8, filter = filter)
proc/send_signal(var/list/data, var/filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data=data
signal.data["sigtype"]="command"
signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
radio_connection.post_signal(src, signal, range = 8, filter = filter)
/obj/machinery/computer/general_air_control/atmos_automation/proc/selectValidChildFor(datum/automation/parent, mob/user, list/valid_returntypes)
var/list/choices=list()
for(var/childtype in automation_types)
var/datum/automation/A = new childtype(src)
if(A.returntype == null)
continue
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if(choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
if(!label)
return 0
return choices[label]
proc/selectValidChildFor(var/datum/automation/parent, var/mob/user, var/list/valid_returntypes)
var/list/choices=list()
for(var/childtype in automation_types)
var/datum/automation/A = new childtype(src)
if(A.returntype == null)
continue
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if(choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
if(!label)
return 0
return choices[label]
/obj/machinery/computer/general_air_control/atmos_automation/return_text()
var/out=..()
return_text()
var/out=..()
if(on)
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:red;\">RUNNING</a>"
else
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:green;\">STOPPED</a>"
if(on)
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:red;\">RUNNING</a>"
else
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:green;\">STOPPED</a>"
out += {"
<h2>Automations</h2>
<p>\[
<a href="?src=[UID()];add=1">
Add
</a>
|
<a href="?src=[UID()];reset=*">
Reset All
</a>
|
<a href="?src=[UID()];remove=*">
Clear
</a>
\]</p>
<p>\[
<a href="?src=[UID()];dump=1">
Export
</a>
|
<a href="?src=[UID()];read=1">
Import
</a>
\]</p>"}
if(automations.len==0)
out += "<i>No automations present.</i>"
else
for(var/datum/automation/A in automations)
out += {"
<fieldset>
<legend>
<a href="?src=[UID()];label=\ref[A]">[A.label]</a>
(<a href="?src=[UID()];reset=\ref[A]">Reset</a> |
<a href="?src=[UID()];remove=\ref[A]">&times;</a>)
</legend>
[A.GetText()]
</fieldset>
"}
return out
out += {"
<h2>Automations</h2>
<p>\[
<a href="?src=[UID()];add=1">
Add
</a>
|
<a href="?src=[UID()];reset=*">
Reset All
</a>
|
<a href="?src=[UID()];remove=*">
Clear
</a>
\]</p>
<p>\[
<a href="?src=[UID()];dump=1">
Export
</a>
|
<a href="?src=[UID()];read=1">
Import
</a>
\]</p>"}
if(automations.len==0)
out += "<i>No automations present.</i>"
else
/obj/machinery/computer/general_air_control/atmos_automation/Topic(href,href_list)
if(..())
return 1
if(href_list["on"])
on = !on
updateUsrDialog()
update_icon()
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(null,usr,list(0))
if(!new_child)
return 1
automations += new_child
updateUsrDialog()
return 1
if(href_list["label"])
var/datum/automation/A=locate(href_list["label"])
if(!A) return 1
var/nl=input(usr, "Please enter a label for this automation task.") as text|null
if(!nl) return 1
nl = copytext(sanitize(nl), 1, 50)
A.label=nl
updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in automations)
out += {"
<fieldset>
<legend>
<a href="?src=[UID()];label=\ref[A]">[A.label]</a>
(<a href="?src=[UID()];reset=\ref[A]">Reset</a> |
<a href="?src=[UID()];remove=\ref[A]">&times;</a>)
</legend>
[A.GetText()]
</fieldset>
"}
return out
Topic(href,href_list)
if(..())
return 1
if(href_list["on"])
on = !on
updateUsrDialog()
update_icon()
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(null,usr,list(0))
if(!new_child)
return 1
automations += new_child
updateUsrDialog()
return 1
if(href_list["label"])
var/datum/automation/A=locate(href_list["label"])
if(!A) return 1
var/nl=input(usr, "Please enter a label for this automation task.") as text|null
if(!nl) return 1
nl = copytext(sanitize(nl), 1, 50)
A.label=nl
updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in automations)
if(!A) continue
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
if(!A) continue
A.OnReset()
updateUsrDialog()
return 1
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in automations)
if(!A) continue
A.OnRemove()
automations.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in automations)
if(!A) continue
A.OnRemove()
automations.Remove(A)
updateUsrDialog()
return 1
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
A.OnRemove()
automations.Remove(A)
updateUsrDialog()
return 1
if(href_list["read"])
var/code = input("Input exported AAC code.","Automations","") as message|null
if(!code) return 0
ReadCode(code)
updateUsrDialog()
return 1
if(href_list["read"])
var/code = input("Input exported AAC code.","Automations","") as message|null
if(!code) return 0
ReadCode(code)
updateUsrDialog()
return 1
if(href_list["dump"])
input("Exported AAC code:","Automations",DumpCode()) as message|null
return 0
if(href_list["dump"])
input("Exported AAC code:","Automations",DumpCode()) as message|null
return 0
proc/MakeCompare(var/datum/automation/a, var/datum/automation/b, var/comparetype)
var/datum/automation/compare/compare=new(src)
compare.comparator = comparetype
compare.children[1] = a
compare.children[2] = b
return compare
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeCompare(datum/automation/a, datum/automation/b, comparetype)
var/datum/automation/compare/compare=new(src)
compare.comparator = comparetype
compare.children[1] = a
compare.children[2] = b
return compare
proc/MakeNumber(var/value)
var/datum/automation/static_value/val = new(src)
val.value=value
return val
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeNumber(value)
var/datum/automation/static_value/val = new(src)
val.value=value
return val
proc/MakeGetSensorData(var/sns_tag,var/field)
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sns_tag
sensor.field=field
return sensor
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeGetSensorData(sns_tag,field)
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sns_tag
sensor.field=field
return sensor
proc/DumpCode()
var/list/json[0]
for(var/datum/automation/A in automations)
json += list(A.Export())
return json_encode(json)
/obj/machinery/computer/general_air_control/atmos_automation/proc/DumpCode()
var/list/json[0]
for(var/datum/automation/A in automations)
json += list(A.Export())
return json_encode(json)
proc/ReadCode(var/jsonStr)
automations.Cut()
var/list/json = json_decode(jsonStr)
if(json.len>0)
for(var/list/cData in json)
if(isnull(cData) || !("type" in cData))
testing("AAC: Null cData in root JS array.")
continue
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
testing("AAC: Unrecognized Atype [Atype].")
continue
var/datum/automation/A = new Atype(src)
A.Import(cData)
automations += A
/obj/machinery/computer/general_air_control/atmos_automation/proc/ReadCode(jsonStr)
automations.Cut()
var/list/json = json_decode(jsonStr)
if(json.len>0)
for(var/list/cData in json)
if(isnull(cData) || !("type" in cData))
testing("AAC: Null cData in root JS array.")
continue
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
testing("AAC: Unrecognized Atype [Atype].")
continue
var/datum/automation/A = new Atype(src)
A.Import(cData)
automations += A
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber
var/injector_tag="inc_in"
@@ -230,79 +230,80 @@
var/sensor_tag="inc_sensor"
frequency=1449
var/temperature=1000
New()
..()
// On State
// Pretty much this:
/*
if(get_sensor("inc_sensor","temperature") < 200)
set_injector_state("inc_in",1)
set_vent_pump_power("inc_out",0)
else
set_vent_pump_power("inc_out",1
*/
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber/New()
..()
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
// On State
// Pretty much this:
/*
if(get_sensor("inc_sensor","temperature") < 200)
set_injector_state("inc_in",1)
set_vent_pump_power("inc_out",0)
else
set_vent_pump_power("inc_out",1
*/
var/datum/automation/static_value/val = new(src)
val.value=temperature - 800
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
var/datum/automation/compare/compare=new(src)
compare.comparator = "Less Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/static_value/val = new(src)
val.value=temperature - 800
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=injector_tag
inj_on.state=1
var/datum/automation/compare/compare=new(src)
compare.comparator = "Less Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=injector_tag
inj_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/if_statement/i = new (src)
i.label = "Fuel Injector On"
i.condition = compare
i.children_then.Add(inj_on)
i.children_then.Add(vp_off)
i.children_else.Add(vp_on)
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
automations += i
var/datum/automation/if_statement/i = new (src)
i.label = "Fuel Injector On"
i.condition = compare
i.children_then.Add(inj_on)
i.children_then.Add(vp_off)
i.children_else.Add(vp_on)
// Off state
/*
if(get_sensor("inc_sensor","temperature") > 1000)
set_injector_state("inc_in",0)
*/
sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
automations += i
val = new(src)
val.value=temperature
// Off state
/*
if(get_sensor("inc_sensor","temperature") > 1000)
set_injector_state("inc_in",0)
*/
sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
compare=new(src)
compare.comparator = "Greater Than"
compare.children[1] = sensor
compare.children[2] = val
val = new(src)
val.value=temperature
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=injector_tag
inj_off.state=0
compare=new(src)
compare.comparator = "Greater Than"
compare.children[1] = sensor
compare.children[2] = val
i = new (src)
i.label = "Fuel Injector Off"
i.condition = compare
i.children_then.Add(inj_off)
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=injector_tag
inj_off.state=0
automations += i
i = new (src)
i.label = "Fuel Injector Off"
i.condition = compare
i.children_then.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing
var/n2_injector_tag="air_n2_in"
@@ -311,142 +312,143 @@
var/sensor_tag="air_sensor"
frequency=1443
var/temperature=1000
New()
..()
buildO2()
buildN2()
buildOutletVent()
proc/buildO2()
///////////////////////////////////////////////////////////////
// Oxygen Injection
///////////////////////////////////////////////////////////////
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/New()
..()
buildO2()
buildN2()
buildOutletVent()
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=o2_injector_tag
inj_on.state=1
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildO2()
///////////////////////////////////////////////////////////////
// Oxygen Injection
///////////////////////////////////////////////////////////////
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=o2_injector_tag
inj_off.state=0
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=o2_injector_tag
inj_on.state=1
var/datum/automation/if_statement/i = new (src)
i.label = "Oxygen Injection"
i.condition = MakeCompare(
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=o2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Oxygen Injection"
i.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than or Equal to"
)
i.children_then.Add(inj_on)
i.children_else.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildN2()
///////////////////////////////////////////////////////////////
// Nitrogen Injection
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") < 100)
injector_on()
else
if(get_sensor_data("pressure") > 5000)
injector_off()
*/
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=n2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=n2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/if_on = new (src)
if_on.label = "Nitrogen Injection"
if_on.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
if_on.children_then.Add(inj_on)
var/datum/automation/if_statement/if_off=new(src)
if_off.condition=MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than"
)
if_off.children_then.Add(inj_off)
if_on.children_else.Add(if_off)
automations += if_on
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildOutletVent()
///////////////////////////////////////////////////////////////
// Outlet Management
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
vent_on()
else
if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
vent_off()
*/
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/if_on=new(src)
if_on.label="Air Output"
var/datum/automation/and/and_on=new(src)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than or Equal to"
)
)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than or Equal to"
"Greater Than or Equal to"
)
i.children_then.Add(inj_on)
i.children_else.Add(inj_off)
)
if_on.condition=and_on
if_on.children_then.Add(vp_on)
automations += i
//////////////////////////////
proc/buildN2()
///////////////////////////////////////////////////////////////
// Nitrogen Injection
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") < 100)
injector_on()
else
if(get_sensor_data("pressure") > 5000)
injector_off()
*/
var/datum/automation/if_statement/if_off=new(src)
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=n2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=n2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/if_on = new (src)
if_on.label = "Nitrogen Injection"
if_on.condition = MakeCompare(
var/datum/automation/or/or_off=new(src)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
if_on.children_then.Add(inj_on)
var/datum/automation/if_statement/if_off=new(src)
if_off.condition=MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than"
)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than"
)
if_off.children_then.Add(inj_off)
)
if_off.condition=or_off
if_off.children_then.Add(vp_off)
if_on.children_else.Add(if_off)
if_on.children_else.Add(if_off)
automations += if_on
proc/buildOutletVent()
///////////////////////////////////////////////////////////////
// Outlet Management
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
vent_on()
else
if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
vent_off()
*/
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/if_on=new(src)
if_on.label="Air Output"
var/datum/automation/and/and_on=new(src)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than or Equal to"
)
)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Greater Than or Equal to"
)
)
if_on.condition=and_on
if_on.children_then.Add(vp_on)
//////////////////////////////
var/datum/automation/if_statement/if_off=new(src)
var/datum/automation/or/or_off=new(src)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than"
)
)
if_off.condition=or_off
if_off.children_then.Add(vp_off)
if_on.children_else.Add(if_off)
automations += if_on
automations += if_on
+2 -2
View File
@@ -17,11 +17,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
log_debug("Smoothing tiles")
for(var/turf/T in smoothTurfs)
if(T.smooth)
smooth_icon(T)
queue_smooth(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
smooth_icon(A)
queue_smooth(A)
if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps
var/turf/simulated/mineral/MT = T
MT.add_edges()
@@ -13,14 +13,14 @@ var/list/spawntypes = list()
var/list/restrict_job = null
var/list/disallow_job = null
proc/check_job_spawning(job)
if(restrict_job && !(job in restrict_job))
return 0
/datum/spawnpoint/proc/check_job_spawning(job)
if(restrict_job && !(job in restrict_job))
return 0
if(disallow_job && (job in disallow_job))
return 0
if(disallow_job && (job in disallow_job))
return 0
return 1
return 1
/datum/spawnpoint/arrivals
display_name = "Arrivals Shuttle"
@@ -54,4 +54,4 @@ var/list/spawntypes = list()
/datum/spawnpoint/cyborg/New()
..()
turfs = latejoin_cyborg
turfs = latejoin_cyborg
+1 -1
View File
@@ -69,7 +69,7 @@
else
if(istype(I, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = I
if(RC.flags & OPENCONTAINER)
if(RC.container_type & OPENCONTAINER)
for(var/datum/reagent/A in RC.reagents.reagent_list)
.[A.type] += A.volume
.[I.type] += 1
@@ -19,7 +19,8 @@
possible_transfer_amounts = list(5)
volume = 5
can_be_placed_into = null
flags = OPENCONTAINER | NOBLUDGEON
flags = NOBLUDGEON
container_type = OPENCONTAINER
var/wipespeed = 30
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
+65 -70
View File
@@ -474,7 +474,7 @@
//Finally, report the full examine_message constructed from the above reports
to_chat(user, "[examine_message]")
to_chat(user, "<span class='notice'>[examine_message]</span>")
return examine_message
//////////////////////////////
@@ -485,37 +485,37 @@
if(istype(M, /mob/living/simple_animal/pet/cat))
if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.")
M.visible_message("<span class='notice'>[M.name] stares at into [src] while sitting perfectly still.</span>", "<span class='notice'>The lid is closed, so you stare into [src] intently.</span>")
else
if(fish_count) //Tank must actually have fish to try catching one
M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!")
M.visible_message("<span class='warning'>[M.name] leaps up onto [src] and attempts to fish through the opening!</span>", "<span class='notice'>You jump up onto [src] and begin fishing through the opening!</span>")
if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens
M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
M.visible_message("<span class='notice'>[M.name] slipped and got soaked!</span>", "<span class='notice'>You slipped and got soaked!</span>")
if(istype(M, /mob/living/simple_animal/pet/cat/Syndi))
do_sparks(3, 1, src)
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
M.visible_message("<span class='warning'>[M.name] catches and devours a live fish!</span>", "<span class='notice'>You catch and devour a live fish, yum!</span>")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
to_chat(M, "There are no fish in [src]!")
to_chat(M, "<span class='warning'>There are no fish in [src]!</span>")
else
return ..()
else if(istype(M, /mob/living/simple_animal/hostile/bear))
if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.")
M.visible_message("<span class='notice'>[M.name] scrapes it's claws along [src]'s lid.</span>", "<span class='notice'>The lid is closed, so you scrape your claws against [src]'s lid.</span>")
else
if(fish_count) //Tank must actually have fish to try catching one
M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!")
M.visible_message("<span class='warning'>[M.name] reaches into [src] and attempts to fish through the opening!</span>", "<span class='warning'>You reach into [src] and begin fishing through the opening!</span>")
if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail
M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
M.visible_message("<span class='warning'>[M.name] swipes at the water!</span>", "<span class='notice'>You just barely missed that fish!</span>")
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
M.visible_message("<span class='warning'>[M.name] catches and devours a live fish!</span>", "<span class='notice'>You catch and devour a live fish, yum!</span>")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
to_chat(M, "There are no fish in [src]!")
to_chat(M, "<span class='warning'>There are no fish in [src]!</span>")
else
return ..()
else
@@ -530,8 +530,8 @@
"You hear a banging sound.")
else
playsound(loc, 'sound/effects/glassknock.ogg', 80, 1)
user.visible_message("[user.name] taps on the [name].", \
"You tap on the [name].", \
user.visible_message("<span class='notice'>[user.name] taps on the [name].</span>", \
"<span class='notice'>You tap on the [name].</span>", \
"You hear a knocking sound.")
/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
@@ -571,62 +571,57 @@
if(W.isOn())
if(obj_integrity < max_integrity)
playsound(loc, W.usesound, 50, 1)
to_chat(user, "You repair some of the cracks on [src].")
to_chat(user, "<span class='notice'>You repair some of the cracks on [src].</span>")
obj_integrity = min(obj_integrity + 20, max_integrity)
check_health()
else
to_chat(user, "There is no damage to fix!")
to_chat(user, "<span class='notice'>There is no damage to fix!</span>")
else
if(obj_integrity < max_integrity)
to_chat(user, "[W] must be on to repair this damage.")
to_chat(user, "<span class='notice'>[W] must be on to repair this damage.</span>")
else
return ..()
//Open reagent containers add and remove water
else if(O.is_open_container())
if(istype(O, /obj/item/reagent_containers/glass))
if(lid_switch)
to_chat(user, "Open the lid on [src] first!")
return
var/obj/item/reagent_containers/glass/C = O
//Containers with any reagents will get dumped in
if(C.reagents.total_volume)
var/water_value = 0
water_value += C.reagents.get_reagent_amount("water") //Water is full value
water_value += C.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
water_value += C.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
water_value += C.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
water_value += C.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
water_value += C.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
var/message = ""
if(!water_value) //The container has no water value, clear everything in it
message = "The filtration process removes everything, leaving the water level unchanged."
C.reagents.clear_reagents()
else
if(water_level == water_capacity)
to_chat(user, "[src] is already full!")
else
message = "The filtration process purifies the water, raising the water level."
if((water_level + water_value) == water_capacity)
message += " You filled [src] to the brim!"
if((water_level + water_value) > water_capacity)
message += " You overfilled [src] and some water runs down the side, wasted."
C.reagents.clear_reagents()
adjust_water_level(water_value)
user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]")
//Empty containers will scoop out water, filling the container as much as possible from the water_level
else if(O.is_drainable())
//Containers with any reagents will get dumped in
if(O.reagents.total_volume)
var/water_value = 0
water_value += O.reagents.get_reagent_amount("water") //Water is full value
water_value += O.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
water_value += O.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
water_value += O.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
water_value += O.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
water_value += O.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
var/message = ""
if(!water_value) //The container has no water value, clear everything in it
message = "The filtration process removes everything, leaving the water level unchanged."
O.reagents.clear_reagents()
else
if(!water_level)
to_chat(user, "[src] is empty!")
if(water_level == water_capacity)
to_chat(user, "<span class='notice'>[src] is already full!</span>")
else
if(water_level >= C.volume) //Enough to fill the container completely
C.reagents.add_reagent("fishwater", C.volume)
adjust_water_level(-C.volume)
user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].")
else //Fill the container as much as possible with the water_level
C.reagents.add_reagent("fishwater", water_level)
adjust_water_level(-water_level)
user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].")
message = "The filtration process purifies the water, raising the water level."
if((water_level + water_value) == water_capacity)
message += " You filled [src] to the brim!"
if((water_level + water_value) > water_capacity)
message += " You overfilled [src] and some water runs down the side, wasted."
O.reagents.clear_reagents()
adjust_water_level(water_value)
user.visible_message("<span class='notice'>[user.name] pours the contents of [O.name] into [src].</span>", "<span class='notice'>[message]</span>")
//Empty containers will scoop out water, filling the container as much as possible from the water_level
else if(O.is_refillable())
if(!water_level)
to_chat(user, "<span class='notice'>[src] is empty!</span>")
else
if(water_level >= O.reagents.maximum_volume) //Enough to fill the container completely
O.reagents.add_reagent("fishwater", O.reagents.maximum_volume)
adjust_water_level(-O.reagents.maximum_volume)
user.visible_message("<span class='notice'>[user.name] scoops out some water from [src].</span>", "<span class='notice'>You completely fill [O.name] from [src].</span>")
else //Fill the container as much as possible with the water_level
O.reagents.add_reagent("fishwater", water_level)
adjust_water_level(-water_level)
user.visible_message("<span class='notice'>[user.name] scoops out some water from [src].</span>", "<span class='notice'>You fill [O.name] with the last of the water in [src].</span>")
//Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process
else if(iswrench(O))
if(!water_level)
@@ -635,17 +630,17 @@
if(do_after(user, 50 * O.toolspeed, target = src))
deconstruct(TRUE)
else
to_chat(user, "[src] must be empty before you disassemble it!")
to_chat(user, "<span class='warning'>[src] must be empty before you disassemble it!</span>")
//Fish eggs
else if(istype(O, /obj/item/fish_eggs))
var/obj/item/fish_eggs/egg = O
//Don't add eggs if there is no water (they kinda need that to live)
if(!water_level)
to_chat(user, "[src] has no water; [egg.name] won't hatch without water!")
to_chat(user, "<span class='warning'>[src] has no water; [egg.name] won't hatch without water!</span>")
else
//Don't add eggs if the tank already has the max number of fish
if(fish_count >= max_fish)
to_chat(user, "[src] can't hold any more fish.")
to_chat(user, "<span class='notice'>[src] can't hold any more fish.</span>")
else
add_fish(egg.fish_type)
qdel(egg)
@@ -655,30 +650,30 @@
if(water_level)
if(food_level < 10)
if(fish_count == 0)
user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.")
user.visible_message("<span class='notice'>[user.name] shakes some fish food into the empty [src]... How sad.</span>", "<span class='notice'>You shake some fish food into the empty [src]... If only it had fish.</span>")
else
user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!")
user.visible_message("<span class='notice'>[user.name] feeds the fish in [src]. The fish look excited!</span>", "<span class='notice'>You feed the fish in [src]. They look excited!</span>")
adjust_food_level(10)
else
to_chat(user, "[src] already has plenty of food in it. You decide to not add more.")
to_chat(user, "<span class='notice'>[src] already has plenty of food in it. You decide to not add more.</span>")
else
to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.")
to_chat(user, "<span class='notice'>[src] doesn't have any water in it. You should fill it with water first.</span>")
//Fish egg scoop
else if(istype(O, /obj/item/egg_scoop))
if(egg_count)
user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].")
user.visible_message("<span class='notice'>[user.name] harvests some fish eggs from [src].</span>", "<span class='notice'>You scoop the fish eggs out of [src].</span>")
harvest_eggs(user)
else
user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.")
user.visible_message("<span class='notice'>[user.name] fails to harvest any fish eggs from [src].</span>", "<span class='notice'>There are no fish eggs in [src] to scoop out.</span>")
//Fish net
else if(istype(O, /obj/item/fish_net))
harvest_fish(user)
//Tank brush
else if(istype(O, /obj/item/tank_brush))
if(filth_level == 0)
to_chat(user, "[src] is already spotless!")
to_chat(user, "<span class='warning'>[src] is already spotless!</span>")
else
adjust_filth_level(-filth_level)
user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.")
user.visible_message("<span class='notice'>[user.name] scrubs the inside of [src], cleaning the filth.</span>", "<span class='notice'>You scrub the inside of [src], cleaning the filth.</span>")
else
return ..()
@@ -235,7 +235,7 @@
//empties aren't sealed, so let's open it quietly
drink_container = new drink_container()
drink_container.canopened = 1
drink_container.flags |= OPENCONTAINER
drink_container.container_type |= OPENCONTAINER
drink_container.forceMove(loc)
containers[con_type]--
+39 -44
View File
@@ -6,7 +6,7 @@
desc = "yummy"
icon = 'icons/obj/drinks.dmi'
icon_state = null
flags = OPENCONTAINER
container_type = OPENCONTAINER
consume_sound = 'sound/items/drink.ogg'
possible_transfer_amounts = list(5,10,15,20,25,30,50)
volume = 50
@@ -26,7 +26,11 @@
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
if(!reagents || !reagents.total_volume)
to_chat(user, "<span class='warning'> None of [src] left, oh no!</span>")
return 0
return FALSE
if(!is_drainable())
to_chat(user, "<span class='warning'> You need to open [src] first!</span>")
return FALSE
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
@@ -35,15 +39,14 @@
var/mob/living/silicon/robot/borg = user
borg.cell.use(30)
var/refill = reagents.get_master_reagent_id()
if(refill in drinks) // Only synthesize drinks
spawn(600)
reagents.add_reagent(refill, bitesize)
return 1
return 0
if(refill in GLOB.drinks) // Only synthesize drinks
addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, bitesize), 600)
return TRUE
return FALSE
/obj/item/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG!
var/mob/living/carbon/chugger = over_object
if (!(flags & OPENCONTAINER))
if (!(container_type & DRAINABLE))
to_chat(chugger, "<span class='notice'>You need to open [src] first!</span>")
return
if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume)
@@ -56,39 +59,18 @@
break
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
// Moved from the can code; not necessary since closed cans aren't open containers now, but, eh.
if(istype(target, /obj/item/reagent_containers/food/drinks/cans))
var/obj/item/reagent_containers/food/drinks/cans/cantarget = target
if(cantarget.canopened == 0)
to_chat(user, "<span class='notice'>You need to open the drink you want to pour into!</span>")
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if(!target.reagents.total_volume)
to_chat(user, "<span class='warning'> [target] is empty.</span>")
return
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, "<span class='warning'> [src] is full.</span>")
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'> You fill [src] with [trans] units of the contents of [target].</span>")
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, "<span class='warning'> [src] is empty.</span>")
return
return FALSE
if(target.reagents.total_volume >= target.reagents.maximum_volume)
if(target.reagents.holder_full())
to_chat(user, "<span class='warning'> [target] is full.</span>")
return
return FALSE
var/datum/reagent/refill
var/datum/reagent/refillName
if(isrobot(user))
@@ -99,22 +81,34 @@
to_chat(user, "<span class='notice'> You transfer [trans] units of the solution to [target].</span>")
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
if(refill in drinks) // Only synthesize drinks
if(refill in GLOB.drinks) // Only synthesize drinks
var/mob/living/silicon/robot/bro = user
var/chargeAmount = max(30,4*trans)
bro.cell.use(chargeAmount)
to_chat(user, "Now synthesizing [trans] units of [refillName]...")
to_chat(user, "<span class='notice'>Now synthesizing [trans] units of [refillName]...</span>")
addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300)
addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "<span class='notice'>Cyborg [src] refilled.</span>"), 300)
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
if(!is_refillable())
to_chat(user, "<span class='warning'>[src]'s tab isn't open!</span>")
return FALSE
if(!target.reagents.total_volume)
to_chat(user, "<span class='warning'>[target] is empty.</span>")
return FALSE
spawn(300)
reagents.add_reagent(refill, trans)
to_chat(user, "Cyborg [src] refilled.")
if(reagents.holder_full())
to_chat(user, "<span class='warning'>[src] is full.</span>")
return FALSE
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
return FALSE
/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
return
return FALSE
if(is_hot(I))
if(reagents)
reagents.chem_temp += 15
@@ -151,7 +145,8 @@
materials = list(MAT_METAL=100)
possible_transfer_amounts = list()
volume = 5
flags = CONDUCT | OPENCONTAINER
flags = CONDUCT
container_type = OPENCONTAINER
/obj/item/reagent_containers/food/drinks/trophy/gold_cup
name = "gold cup"
@@ -10,7 +10,7 @@
desc = "Just your average condiment container."
icon = 'icons/obj/food/containers.dmi'
icon_state = "emptycondiment"
flags = OPENCONTAINER
container_type = OPENCONTAINER
possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50)
volume = 50
//Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites.
@@ -47,7 +47,7 @@
if(!reagents || !reagents.total_volume)
return // The condiment might be empty after the delay.
user.visible_message("<span class='warning'>[user] feeds [M] from [src].</span>")
add_attack_logs(user, M, "Fed [src] containing [reagentlist()]")
add_attack_logs(user, M, "Fed [src] containing [reagents.log_list()]")
var/fraction = min(10/reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction)
@@ -75,7 +75,7 @@
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
//Something like a glass or a food item. Player probably wants to transfer TO it.
else if(target.is_open_container() || istype(target, /obj/item/reagent_containers/food/snacks))
else if(target.is_drainable() || istype(target, /obj/item/reagent_containers/food/snacks))
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
@@ -8,7 +8,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 5
active_power_usage = 100
flags = OPENCONTAINER
container_type = OPENCONTAINER
var/operating = 0 // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
@@ -93,7 +93,7 @@
icon_state = off_icon
broken = 0 // Fix it!
dirty = 0 // just to be sure
flags = OPENCONTAINER
container_type = OPENCONTAINER
else
to_chat(user, "<span class='alert'>It's broken!</span>")
return 1
@@ -105,7 +105,7 @@
dirty = 0 // It's clean!
broken = 0 // just to be sure
icon_state = off_icon
flags = OPENCONTAINER
container_type = OPENCONTAINER
else //Otherwise bad luck!!
to_chat(user, "<span class='alert'>It's dirty!</span>")
return 1
+2 -2
View File
@@ -59,7 +59,7 @@
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("welding_fuel", 5))
if(S.has_reagent("fuel", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == POSITIVE)
temp_mut_list += SM
@@ -94,4 +94,4 @@
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#6B8E23"
bitesize_mod = 2
bitesize_mod = 2
+1 -1
View File
@@ -81,7 +81,7 @@
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
seed = /obj/item/seeds/angel
name = "destroying angel"
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amanitin."
icon_state = "angel"
filling_color = "#C0C0C0"
+2 -2
View File
@@ -21,7 +21,7 @@
icon_state = "weedspray"
item_state = "plantbgone"
volume = 100
flags = OPENCONTAINER
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
@@ -43,7 +43,7 @@
icon_state = "pestspray"
item_state = "plantbgone"
volume = 100
flags = OPENCONTAINER
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
+2 -2
View File
@@ -763,8 +763,8 @@
else if(transfer_amount) // Droppers, cans, beakers, what have you.
visi_msg="[user] uses [reagent_source] on [target]"
irrigate = 1
// Beakers, bottles, buckets, etc. Can't use is_open_container though.
if(istype(reagent_source, /obj/item/reagent_containers/glass/))
// Beakers, bottles, buckets, etc.
if(reagent_source.is_drainable())
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
if(irrigate && transfer_amount > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation)
+3 -3
View File
@@ -11,8 +11,8 @@ var/list/chem_t2_reagents = list(
var/list/chem_t3_reagents = list(
"ethanol", "chlorine", "potassium",
"aluminium", "radium", "fluorine",
"iron", "welding_fuel", "silver",
"aluminum", "radium", "fluorine",
"iron", "fuel", "silver",
"stable_plasma"
)
@@ -41,4 +41,4 @@ var/list/chem_t4_reagents = list(
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
sample_color = null
sample_color = null
+1 -1
View File
@@ -462,10 +462,10 @@ var/global/list/rockTurfEdgeCache = list(
/turf/simulated/floor/plating/airless/asteroid/New()
var/proper_name = name
..()
name = proper_name
if(prob(20))
icon_state = "asteroid[rand(0,12)]"
..()
/turf/simulated/floor/plating/airless/asteroid/ex_act(severity, target)
switch(severity)
+1 -1
View File
@@ -1019,7 +1019,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_MOST)
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_MOST)
if(!iscarbon(user))
LAssailant = null
else
+7 -1
View File
@@ -329,7 +329,13 @@
/mob/living/proc/can_inject()
return 1
return TRUE
/mob/living/is_injectable(allowmobs = TRUE)
return (allowmobs && reagents && can_inject())
/mob/living/is_drawable(allowmobs = TRUE)
return (allowmobs && reagents && can_inject())
/mob/living/proc/get_organ_target()
var/mob/shooter = src
+318 -316
View File
@@ -22,102 +22,235 @@ var/datum/paiController/paiController // Global handler for pAI candidates
var/askDelay = 10 * 60 * 1 // One minute [ms * sec * min]
Topic(href, href_list[])
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O) return
if(!(O in GLOB.respawnable_list))
to_chat(O, "You've given up your ability to respawn!")
return
if(!check_recruit(O)) return
recruitWindow(O)
/datum/paiController/Topic(href, href_list[])
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O) return
if(!(O in GLOB.respawnable_list))
to_chat(O, "You've given up your ability to respawn!")
return
if(!check_recruit(O)) return
recruitWindow(O)
return
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/paicard/card = locate(href_list["device"])
if(card.pai)
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/paicard/card = locate(href_list["device"])
if(card.pai)
return
if(usr.incapacitated() || isobserver(usr) || !card.Adjacent(usr))
return
if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(GLOB.ninja_names)
else
pai.name = candidate.name
pai.real_name = pai.name
pai.key = candidate.key
card.setPersonality(pai)
card.looking_for_personality = 0
ticker.mode.update_cult_icons_removed(card.pai.mind)
ticker.mode.update_rev_icons_removed(card.pai.mind)
pai_candidates -= candidate
usr << browse(null, "window=findPai")
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
var/t = ""
switch(option)
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
if(candidate.description)
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
if(candidate.role)
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
if(candidate.comments)
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
if("submit")
if(candidate)
candidate.ready = 1
for(var/obj/item/paicard/p in world)
if(p.looking_for_personality == 1)
p.alertUpdate()
usr << browse(null, "window=paiRecruit")
return
if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(GLOB.ninja_names)
else
pai.name = candidate.name
pai.real_name = pai.name
pai.key = candidate.key
recruitWindow(usr)
card.setPersonality(pai)
card.looking_for_personality = 0
ticker.mode.update_cult_icons_removed(card.pai.mind)
ticker.mode.update_rev_icons_removed(card.pai.mind)
pai_candidates -= candidate
usr << browse(null, "window=findPai")
if(href_list["new"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/option = href_list["option"]
var/t = ""
switch(option)
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = reject_bad_name(sanitize(copytext(t,1,MAX_NAME_LEN)))
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = reject_bad_name(sanitize(copytext(candidate.name,1,MAX_NAME_LEN)))
if(candidate.description)
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
if(candidate.role)
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
if(candidate.comments)
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
if("submit")
if(candidate)
candidate.ready = 1
for(var/obj/item/paicard/p in world)
if(p.looking_for_personality == 1)
p.alertUpdate()
usr << browse(null, "window=paiRecruit")
return
recruitWindow(usr)
proc/recruitWindow(var/mob/M as mob)
var/datum/paiCandidate/candidate
for(var/datum/paiCandidate/c in pai_candidates)
if(!istype(c) || !istype(M))
break
if(c.key == M.key)
candidate = c
if(!candidate)
candidate = new /datum/paiCandidate()
candidate.key = M.key
pai_candidates.Add(candidate)
/datum/paiController/proc/recruitWindow(var/mob/M as mob)
var/datum/paiCandidate/candidate
for(var/datum/paiCandidate/c in pai_candidates)
if(!istype(c) || !istype(M))
break
if(c.key == M.key)
candidate = c
if(!candidate)
candidate = new /datum/paiCandidate()
candidate.key = M.key
pai_candidates.Add(candidate)
var/dat = ""
dat += {"
<style type="text/css">
var/dat = ""
dat += {"
<style type="text/css">
body {
margin-top:5px;
font-family:Verdana;
color:white;
font-size:13px;
background-image:url('uiBackground.png');
background-repeat:repeat-x;
background-color:#272727;
background-position:center top;
}
table {
border-collapse:collapse;
font-size:13px;
}
th, td {
border: 1px solid #333333;
}
p.top {
background-color: none;
color: white;
}
tr.d0 td {
background-color: #c0c0c0;
color: black;
border:0px;
border: 1px solid #333333;
}
tr.d0 th {
background-color: none;
color: #4477E0;
text-align:right;
vertical-align:top;
width:120px;
border:0px;
}
tr.d1 td {
background-color: #555555;
color: white;
}
td.button {
border: 1px solid #161616;
background-color: #40628a;
}
td.desc {
font-weight:bold;
}
a {
color:#4477E0;
}
a.button {
color:white;
text-decoration: none;
}
</style>
"}
dat += {"
<body>
<b><font size="3px">pAI Personality Configuration</font></b>
<p class="top">Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!</p>
<table>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=name;new=1;candidate=\ref[candidate]'>Name</a>:</th>
<td class="desc">[candidate.name]&nbsp;</td>
</tr>
<tr class="d1">
<td>What you plan to call yourself. Suggestions: Any character name you would choose for a station character OR an AI.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=desc;new=1;candidate=\ref[candidate]'>Description</a>:</th>
<td class="desc">[candidate.description]&nbsp;</td>
</tr>
<tr class="d1">
<td>What sort of pAI you typically play; your mannerisms, your quirks, etc. This can be as sparse or as detailed as you like.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=role;new=1;candidate=\ref[candidate]'>Preferred Role</a>:</th>
<td class="desc">[candidate.role]&nbsp;</td>
</tr>
<tr class="d1">
<td>Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=ooc;new=1;candidate=\ref[candidate]'>OOC Comments</a>:</th>
<td class="desc">[candidate.comments]&nbsp;</td>
</tr>
<tr class="d1">
<td>Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.</td>
</tr>
</table>
<br>
<table>
<tr>
<td class="button">
<a href='byond://?src=[UID()];option=save;new=1;candidate=\ref[candidate]' class="button">Save Personality</a>
</td>
</tr>
<tr>
<td class="button">
<a href='byond://?src=[UID()];option=load;new=1;candidate=\ref[candidate]' class="button">Load Personality</a>
</td>
</tr>
</table><br>
<table>
<td class="button"><a href='byond://?src=[UID()];option=submit;new=1;candidate=\ref[candidate]' class="button"><b><font size="4px">Submit Personality</font></b></a></td>
</table><br>
</body>
"}
M << browse(dat, "window=paiRecruit;size=580x580;")
/datum/paiController/proc/findPAI(var/obj/item/paicard/p, var/mob/user)
requestRecruits(p, user)
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.ready)
var/found = 0
for(var/mob/o in GLOB.respawnable_list)
if(o.key == c.key)
found = 1
if(found)
available.Add(c)
var/dat = ""
dat += {"
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<style>
body {
margin-top:5px;
font-family:Verdana;
@@ -129,257 +262,126 @@ var/datum/paiController/paiController // Global handler for pAI candidates
background-position:center top;
}
table {
border-collapse:collapse;
font-size:13px;
}
th, td {
border: 1px solid #333333;
table.desc {
border-collapse:collapse;
font-size:13px;
border: 1px solid #161616;
width:100%;
}
p.top {
background-color: none;
table.download {
border-collapse:collapse;
font-size:13px;
border: 1px solid #161616;
width:100%;
}
tr.d0 td, tr.d0 th {
background-color: #506070;
color: white;
}
tr.d0 td {
background-color: #c0c0c0;
color: black;
border:0px;
border: 1px solid #333333;
}
tr.d0 th {
background-color: none;
color: #4477E0;
text-align:right;
vertical-align:top;
width:120px;
border:0px;
}
tr.d1 td {
background-color: #555555;
tr.d1 td, tr.d1 th {
background-color: #708090;
color: white;
}
tr.d2 td {
background-color: #00FF00;
color: white;
text-align:center;
}
td.button {
border: 1px solid #161616;
background-color: #40628a;
text-align: center;
}
td.desc {
font-weight:bold;
td.download {
border: 1px solid #161616;
background-color: #40628a;
text-align: center;
}
a {
color:#4477E0;
th {
text-align:left;
width:125px;
vertical-align:top;
}
a.button {
color:white;
text-decoration: none;
}
</style>
"}
</head>
<body>
<b><font size='3px'>pAI Availability List</font></b><br><br>
"}
dat += "<p>Displaying available AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.</p>"
for(var/datum/paiCandidate/c in available)
dat += {"
<body>
<b><font size="3px">pAI Personality Configuration</font></b>
<p class="top">Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!</p>
<table>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=name;new=1;candidate=\ref[candidate]'>Name</a>:</th>
<td class="desc">[candidate.name]&nbsp;</td>
</tr>
<tr class="d1">
<td>What you plan to call yourself. Suggestions: Any character name you would choose for a station character OR an AI.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=desc;new=1;candidate=\ref[candidate]'>Description</a>:</th>
<td class="desc">[candidate.description]&nbsp;</td>
</tr>
<tr class="d1">
<td>What sort of pAI you typically play; your mannerisms, your quirks, etc. This can be as sparse or as detailed as you like.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=role;new=1;candidate=\ref[candidate]'>Preferred Role</a>:</th>
<td class="desc">[candidate.role]&nbsp;</td>
</tr>
<tr class="d1">
<td>Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.</td>
</tr>
<tr class="d0">
<th rowspan="2"><a href='byond://?src=[UID()];option=ooc;new=1;candidate=\ref[candidate]'>OOC Comments</a>:</th>
<td class="desc">[candidate.comments]&nbsp;</td>
</tr>
<tr class="d1">
<td>Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.</td>
</tr>
</table>
<br>
<table>
<tr>
<td class="button">
<a href='byond://?src=[UID()];option=save;new=1;candidate=\ref[candidate]' class="button">Save Personality</a>
<table class="desc">
<tr class="d0">
<th>Name:</th>
<td>[c.name]</td>
</tr>
<tr class="d1">
<th>Description:</th>
<td>[c.description]</td>
</tr>
<tr class="d0">
<th>Preferred Role:</th>
<td>[c.role]</td>
</tr>
<tr class="d1">
<th>OOC Comments:</th>
<td>[c.comments]</td>
</tr>
</table>
<table class="download">
<td class="download"><a href='byond://?src=[UID()];download=1;candidate=\ref[c];device=\ref[p]' class="button"><b>Download [c.name]</b></a>
</td>
</tr>
<tr>
<td class="button">
<a href='byond://?src=[UID()];option=load;new=1;candidate=\ref[candidate]' class="button">Load Personality</a>
</td>
</tr>
</table><br>
<table>
<td class="button"><a href='byond://?src=[UID()];option=submit;new=1;candidate=\ref[candidate]' class="button"><b><font size="4px">Submit Personality</font></b></a></td>
</table><br>
</body>
</table>
<br>
"}
M << browse(dat, "window=paiRecruit;size=580x580;")
dat += {"
</body>
</html>
"}
proc/findPAI(var/obj/item/paicard/p, var/mob/user)
requestRecruits(p, user)
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.ready)
var/found = 0
for(var/mob/o in GLOB.respawnable_list)
if(o.key == c.key)
found = 1
if(found)
available.Add(c)
var/dat = ""
user << browse(dat, "window=findPai")
dat += {"
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<style>
body {
margin-top:5px;
font-family:Verdana;
color:white;
font-size:13px;
background-image:url('uiBackground.png');
background-repeat:repeat-x;
background-color:#272727;
background-position:center top;
}
table {
font-size:13px;
}
table.desc {
border-collapse:collapse;
font-size:13px;
border: 1px solid #161616;
width:100%;
}
table.download {
border-collapse:collapse;
font-size:13px;
border: 1px solid #161616;
width:100%;
}
tr.d0 td, tr.d0 th {
background-color: #506070;
color: white;
}
tr.d1 td, tr.d1 th {
background-color: #708090;
color: white;
}
tr.d2 td {
background-color: #00FF00;
color: white;
text-align:center;
}
td.button {
border: 1px solid #161616;
background-color: #40628a;
text-align: center;
}
td.download {
border: 1px solid #161616;
background-color: #40628a;
text-align: center;
}
th {
text-align:left;
width:125px;
vertical-align:top;
}
a.button {
color:white;
text-decoration: none;
}
</style>
</head>
<body>
<b><font size='3px'>pAI Availability List</font></b><br><br>
"}
dat += "<p>Displaying available AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.</p>"
/datum/paiController/proc/requestRecruits(var/obj/item/paicard/P, mob/user)
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.client && (ROLE_PAI in O.client.prefs.be_special))
if(player_old_enough_antag(O.client,ROLE_PAI))
if(check_recruit(O))
to_chat(O, "<span class='boldnotice'>A pAI card activated by [user.real_name] is looking for personalities. (<a href='?src=[O.UID()];jump=\ref[P]'>Teleport</a> | <a href='?src=[UID()];signup=\ref[O]'>Sign Up</a>)</span>")
//question(O.client)
for(var/datum/paiCandidate/c in available)
dat += {"
<table class="desc">
<tr class="d0">
<th>Name:</th>
<td>[c.name]</td>
</tr>
<tr class="d1">
<th>Description:</th>
<td>[c.description]</td>
</tr>
<tr class="d0">
<th>Preferred Role:</th>
<td>[c.role]</td>
</tr>
<tr class="d1">
<th>OOC Comments:</th>
<td>[c.comments]</td>
</tr>
</table>
<table class="download">
<td class="download"><a href='byond://?src=[UID()];download=1;candidate=\ref[c];device=\ref[p]' class="button"><b>Download [c.name]</b></a>
</td>
</table>
<br>
"}
dat += {"
</body>
</html>
"}
user << browse(dat, "window=findPai")
proc/requestRecruits(var/obj/item/paicard/P, mob/user)
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.client && (ROLE_PAI in O.client.prefs.be_special))
if(player_old_enough_antag(O.client,ROLE_PAI))
if(check_recruit(O))
to_chat(O, "<span class='boldnotice'>A pAI card activated by [user.real_name] is looking for personalities. (<a href='?src=[O.UID()];jump=\ref[P]'>Teleport</a> | <a href='?src=[UID()];signup=\ref[O]'>Sign Up</a>)</span>")
//question(O.client)
proc/check_recruit(var/mob/dead/observer/O)
if(jobban_isbanned(O, ROLE_PAI) || jobban_isbanned(O,"nonhumandept"))
return 0
if(!player_old_enough_antag(O.client,ROLE_PAI))
return 0
if(cannotPossess(O))
return 0
if(!(O in GLOB.respawnable_list))
return 0
if(O.client)
return 1
/datum/paiController/proc/check_recruit(var/mob/dead/observer/O)
if(jobban_isbanned(O, ROLE_PAI) || jobban_isbanned(O,"nonhumandept"))
return 0
if(!player_old_enough_antag(O.client,ROLE_PAI))
return 0
if(cannotPossess(O))
return 0
if(!(O in GLOB.respawnable_list))
return 0
if(O.client)
return 1
return 0
proc/question(var/client/C)
spawn(0)
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if(response == "Never for this round")
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
if(warning == "Yes")
asked[C.key] = INFINITY
else
question(C)
/datum/paiController/proc/question(var/client/C)
spawn(0)
if(!C) return
asked.Add(C.key)
asked[C.key] = world.time
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if(response == "Never for this round")
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
if(warning == "Yes")
asked[C.key] = INFINITY
else
question(C)
@@ -6,7 +6,7 @@
act = copytext(act, 1, t1)
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
//proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
act = lowertext(act)
switch(act)
@@ -174,4 +174,4 @@
"You announce you are operating in low power mode.")
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
else
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
@@ -9,7 +9,7 @@
act = copytext(act,1,length(act))
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
//proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
act = lowertext(act)
switch(act)
@@ -69,4 +69,4 @@
playsound(src.loc, 'sound/goonstation/voice/robot_scream.ogg', 80, 0)
m_type = 2
..(act, m_type, message)
..(act, m_type, message)
@@ -4,10 +4,11 @@ var/global/file_uid = 0
var/filename = "NewFile" // Placeholder. No spacebars
var/filetype = "XXX" // File full names are [filename].[filetype] so like NewFile.XXX in this case
var/size = 1 // File size in GQ. Integers only!
var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file.
var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file.
var/unsendable = 0 // Whether the file may be sent to someone via NTNet transfer or other means.
var/undeletable = 0 // Whether the file may be deleted. Setting to 1 prevents deletion/renaming/etc.
var/uid // UID of this file
var/password = "" // Placeholder for password.
/datum/computer_file/New()
..()
@@ -36,4 +37,14 @@ var/global/file_uid = 0
else
temp.filename = filename
temp.filetype = filetype
return temp
temp.password = password
return temp
/datum/computer_file/proc/can_access_file(mob/user, input_password = "")
if(!password)
return TRUE
if(!input_password)
input_password = sanitize(input(user, "Please enter a password to access file '[filename]':"))
if(input_password == password)
return TRUE
return FALSE

Some files were not shown because too many files have changed in this diff Show More