Merge branch 'master' into upstream-merge-32188

This commit is contained in:
deathride58
2017-11-21 19:53:58 +00:00
committed by GitHub
285 changed files with 56239 additions and 56588 deletions
+125 -13
View File
@@ -42,6 +42,12 @@
/obj/effect/turf_decal/stripes/corner
icon_state = "warninglinecorner"
/obj/effect/turf_decal/stripes/box
icon_state = "warn_box"
/obj/effect/turf_decal/stripes/full
icon_state = "warn_full"
/obj/effect/turf_decal/stripes/asteroid/line
icon_state = "ast_warn"
@@ -51,32 +57,138 @@
/obj/effect/turf_decal/stripes/asteroid/corner
icon_state = "ast_warn_corner"
/obj/effect/turf_decal/stripes/asteroid/box
icon_state = "ast_warn_box"
/obj/effect/turf_decal/stripes/asteroid/full
icon_state = "ast_warn_full"
/obj/effect/turf_decal/stripes/white/line
icon_state = "warningline_white"
/obj/effect/turf_decal/stripes/white/end
icon_state = "warn_end_white"
/obj/effect/turf_decal/stripes/white/corner
icon_state = "warninglinecorner_white"
/obj/effect/turf_decal/stripes/white/box
icon_state = "warn_box_white"
/obj/effect/turf_decal/stripes/white/full
icon_state = "warn_full_white"
/obj/effect/turf_decal/stripes/red/line
icon_state = "warningline_red"
/obj/effect/turf_decal/stripes/red/end
icon_state = "warn_end_red"
/obj/effect/turf_decal/stripes/red/corner
icon_state = "warninglinecorner_red"
/obj/effect/turf_decal/stripes/red/box
icon_state = "warn_box_red"
/obj/effect/turf_decal/stripes/red/full
icon_state = "warn_full_red"
/obj/effect/turf_decal/delivery
icon_state = "delivery"
/obj/effect/turf_decal/delivery/white
icon_state = "delivery_white"
/obj/effect/turf_decal/delivery/red
icon_state = "delivery_red"
/obj/effect/turf_decal/bot
icon_state = "bot"
/obj/effect/turf_decal/bot/right
icon_state = "bot_right"
/obj/effect/turf_decal/bot/left
icon_state = "bot_left"
/obj/effect/turf_decal/bot_white
icon_state = "bot_white"
/obj/effect/turf_decal/bot_white/right
icon_state = "bot_right_white"
/obj/effect/turf_decal/bot_white/left
icon_state = "bot_left_white"
/obj/effect/turf_decal/bot_red
icon_state = "bot_red"
/obj/effect/turf_decal/bot_red/right
icon_state = "bot_right_red"
/obj/effect/turf_decal/bot_red/left
icon_state = "bot_left_red"
/obj/effect/turf_decal/loading_area
icon_state = "loading_area"
icon_state = "loadingarea"
/obj/effect/turf_decal/loading_area/white
icon_state = "loadingarea_white"
/obj/effect/turf_decal/loading_area/red
icon_state = "loadingarea_red"
/obj/effect/turf_decal/sand
icon_state = "sandyfloor"
/obj/effect/turf_decal/sand/warning
icon_state = "sandy_warn"
/obj/effect/turf_decal/sand/warning/corner
icon_state = "sandy_warn_corner"
/obj/effect/turf_decal/sand/plating
icon_state = "sandyplating"
/obj/effect/turf_decal/sand/plating/warning
icon_state = "sandy_plating_warn"
/obj/effect/turf_decal/sand/plating/warning/corner
icon_state = "sandy_plating_warn_corner"
/obj/effect/turf_decal/plaque
icon_state = "plaque"
/obj/effect/turf_decal/caution
icon_state = "caution"
/obj/effect/turf_decal/caution/white
icon_state = "caution_white"
/obj/effect/turf_decal/caution/red
icon_state = "caution_red"
/obj/effect/turf_decal/caution/stand_clear
icon_state = "stand_clear"
/obj/effect/turf_decal/caution/stand_clear/white
icon_state = "stand_clear_white"
/obj/effect/turf_decal/caution/stand_clear/red
icon_state = "stand_clear_red"
/obj/effect/turf_decal/arrows
icon_state = "arrows"
/obj/effect/turf_decal/arrows/white
icon_state = "arrows_white"
/obj/effect/turf_decal/arrows/red
icon_state = "arrows_red"
/obj/effect/turf_decal/box
icon_state = "box"
/obj/effect/turf_decal/box/corners
icon_state = "box_corners"
/obj/effect/turf_decal/box/white
icon_state = "box_white"
/obj/effect/turf_decal/box/white/corners
icon_state = "box_corners_white"
/obj/effect/turf_decal/box/red
icon_state = "box_red"
/obj/effect/turf_decal/box/red/corners
icon_state = "box_corners_red"
+5 -2
View File
@@ -59,8 +59,11 @@
obj_integrity = myseed.endurance
max_integrity = myseed.endurance
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
if(G)
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
if(ispath(G)) // Seeds were ported to initialize so their genes are still typepaths here, luckily their initializer is smart enough to handle us doing this
myseed.genes -= G
G = new G
myseed.genes += G
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
setDir(CalcDir())
var/base_icon_state = initial(icon_state)
if(!floor)
+32 -1
View File
@@ -162,4 +162,35 @@
name = "25% cyborg mask spawner"
loot = list(
/obj/item/clothing/mask/gas/cyborg = 25,
"" = 75)
"" = 75)
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
name = "harmless AI module spawner"
loot = list(
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/asimovpp,
/obj/item/aiModule/core/full/hippocratic,
/obj/item/aiModule/core/full/paladin_devotion,
/obj/item/aiModule/core/full/paladin
)
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
name = "neutral AI module spawner"
loot = list(
/obj/item/aiModule/core/full/corp,
/obj/item/aiModule/core/full/maintain,
/obj/item/aiModule/core/full/drone,
/obj/item/aiModule/core/full/peacekeeper,
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/robocop,
/obj/item/aiModule/core/full/liveandletlive
)
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
name = "harmful AI module spawner"
loot = list(
/obj/item/aiModule/core/full/antimov,
/obj/item/aiModule/core/full/balance,
/obj/item/aiModule/core/full/tyrant,
/obj/item/aiModule/core/full/thermurderdynamic
)
-1
View File
@@ -51,7 +51,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/item_color = null //this needs deprecating, soonish
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
var/permeability_coefficient = 1 // for chemicals/diseases
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
+8
View File
@@ -564,3 +564,11 @@ AI MODULES
/obj/item/aiModule/core/full/balance
name = "'Guardian of Balance' Core AI Module"
law_id = "balance"
/obj/item/aiModule/core/full/maintain
name = "'Station Efficiency' Core AI Module"
law_id = "maintain"
/obj/item/aiModule/core/full/peacekeeper
name = "'Peacekeeper' Core AI Module"
law_id = "peacekeeper"
+125 -399
View File
@@ -13,7 +13,6 @@ RPD
#define CATEGORY_DISPOSALS 1
//find the defines in code\_DEFINES\pipe_construction.dm
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
"Pipes" = list(
new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple),
@@ -60,10 +59,8 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info
var/name
var/icon
var/icon_state
var/id = -1
var/categoryId
var/dirtype = PIPE_BENDABLE
/datum/pipe_info/proc/Render(dispenser)
@@ -80,26 +77,51 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/proc/Params()
return ""
/datum/pipe_info/proc/get_preview(selected_dir)
var/list/dirs
switch(dirtype)
if(PIPE_STRAIGHT, PIPE_BENDABLE)
dirs = list("[NORTH]" = "Vertical", "[EAST]" = "Horizontal")
if(dirtype == PIPE_BENDABLE)
dirs += list("[NORTHWEST]" = "West to North", "[NORTHEAST]" = "North to East",
"[SOUTHWEST]" = "South to West", "[SOUTHEAST]" = "East to South")
if(PIPE_TRINARY, PIPE_TRIN_M)
dirs = list("[NORTH]" = "West South East", "[EAST]" = "North West South",
"[SOUTH]" = "East North West", "[WEST]" = "South East North")
if(dirtype == PIPE_TRIN_M)
dirs += list("[SOUTHEAST]" = "West South East", "[NORTHEAST]" = "North West South",
"[NORTHWEST]" = "East North West", "[SOUTHWEST]" = "South East North")
if(PIPE_UNARY)
dirs = list("[NORTH]" = "North", "[EAST]" = "East", "[SOUTH]" = "South", "[WEST]" = "West")
if(PIPE_ONEDIR)
dirs = list("[SOUTH]" = name)
/datum/pipe_info/pipe
categoryId = CATEGORY_ATMOS
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/list/rows = list()
var/list/row = list("previews" = list())
var/i = 0
for(var/dir in dirs)
var/flipped = (dirtype == PIPE_TRIN_M) && (text2num(dir) in GLOB.diagonals)
row["previews"] += list(list("selected" = (text2num(dir) == selected_dir), "dir" = dir2text(text2num(dir)), "dir_name" = dirs[dir], "icon_state" = icon_state, "flipped" = flipped))
if(i++ || dirtype == PIPE_ONEDIR)
rows += list(row)
row = list("previews" = list())
i = 0
return rows
/datum/pipe_info/pipe/New(label, obj/machinery/atmospherics/path)
name = label
id = path
icon_state = initial(path.pipe_state)
dirtype = initial(path.construction_type)
var/obj/item/pipe/c = initial(path.construction_type)
dirtype = initial(c.RPD_type)
/datum/pipe_info/pipe/Params()
return "makepipe=[id]&type=[dirtype]"
/datum/pipe_info/meter
categoryId = CATEGORY_ATMOS
dirtype = PIPE_ONEDIR
icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
dirtype = PIPE_ONEDIR
/datum/pipe_info/meter/New(label)
name = label
@@ -107,11 +129,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
/datum/pipe_info/meter/Params()
return "makemeter=[id]&type=[dirtype]"
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
/datum/pipe_info/disposal/New(label, obj/path, dt=PIPE_UNARY)
name = label
id = path
@@ -126,7 +143,6 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return "dmake=[id]&type=[dirtype]"
/obj/item/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
@@ -144,29 +160,35 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/p_type = /obj/machinery/atmospherics/pipe/simple
var/p_conntype = PIPE_BENDABLE
var/p_dir = 1
var/mode = ATMOS_MODE
var/p_dir = NORTH
var/p_flipped = FALSE
var/p_class = ATMOS_MODE
var/list/paint_colors = list(
"grey" = rgb(255,255,255),
"red" = rgb(255,0,0),
"blue" = rgb(0,0,255),
"cyan" = rgb(0,256,249),
"green" = rgb(30,255,0),
"yellow" = rgb(255,198,0),
"purple" = rgb(130,43,255)
"Grey" = rgb(255,255,255),
"Red" = rgb(255,0,0),
"Blue" = rgb(0,0,255),
"Cyan" = rgb(0,256,249),
"Green" = rgb(30,255,0),
"Yellow" = rgb(255,198,0),
"Purple" = rgb(130,43,255)
)
var/paint_color="grey"
var/paint_color="Grey"
var/screen = CATEGORY_ATMOS //Starts on the atmos tab.
var/piping_layer = PIPING_LAYER_DEFAULT
var/datum/pipe_info/recipe
var/static/datum/pipe_info/first_atmos
var/static/datum/pipe_info/first_disposal
/obj/item/pipe_dispenser/New()
. = ..()
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
if(!first_atmos)
first_atmos = GLOB.atmos_pipe_recipes[GLOB.atmos_pipe_recipes[1]][1]
if(!first_disposal)
first_disposal = GLOB.disposal_pipe_recipes[GLOB.disposal_pipe_recipes[1]][1]
recipe = first_atmos
/obj/item/pipe_dispenser/Destroy()
qdel(spark_system)
@@ -174,7 +196,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
return ..()
/obj/item/pipe_dispenser/attack_self(mob/user)
show_menu(user)
ui_interact(user)
/obj/item/pipe_dispenser/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
@@ -182,386 +204,85 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
return(BRUTELOSS)
/obj/item/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
var/selected=" class=\"imglink\""
if(_dir == p_dir)
selected=" class=\"imglink selected\""
return "<a href=\"?src=[REF(src)];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
/obj/item/pipe_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/icon_states/multiple_icons/pipes)
assets.send(user)
ui = new(user, src, ui_key, "rpd", name, 300, 550, master_ui, state)
ui.open()
/obj/item/pipe_dispenser/proc/show_menu(mob/user)
if(!user || !src)
return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>"}
if(p_class != EATING_MODE)
dat += "<li><a href='?src=[REF(src)];eatpipes=1;type=-1'>Eat Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Eat Pipes</span></li>"
if(p_class != PAINT_MODE)
dat += "<li><a href='?src=[REF(src)];paintpipes=1;type=-1'>Paint Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Paint Pipes</span></li>"
dat += "</ul>"
/obj/item/pipe_dispenser/ui_data(mob/user)
var/list/data = list(
"mode" = mode,
"screen" = screen,
"piping_layer" = piping_layer,
"preview_rows" = recipe.get_preview(p_dir),
"categories" = list(),
"paint_colors" = list()
)
dat += "<b>Category:</b><ul>"
if(screen == CATEGORY_ATMOS)
var/list/recipes = GLOB.disposal_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<span class='linkOn'>Atmospherics</span> "
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_DISPOSALS]&[first_recipe.Params()]'>Disposals</A><BR>"
dat += "Atmospherics Piping Layer: "
var/list/recipes
if(screen == ATMOS_MODE)
recipes = GLOB.atmos_pipe_recipes
else if(screen == DISPOSALS_MODE)
recipes = GLOB.disposal_pipe_recipes
for(var/c in recipes)
var/list/cat = recipes[c]
var/list/r = list()
for(var/i in 1 to cat.len)
var/datum/pipe_info/info = cat[i]
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe)))
data["categories"] += list(list("cat_name" = c, "recipes" = r))
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
if(iter == piping_layer)
dat += "<span class='linkOn'>[iter]</span>"
else
dat += "<A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A>"
dat += "<BR>"
data["paint_colors"] = list()
for(var/c in paint_colors)
data["paint_colors"] += list(list("color_name" = c, "color_hex" = paint_colors[c], "selected" = (c == paint_color)))
else if(screen == CATEGORY_DISPOSALS)
var/list/recipes = GLOB.atmos_pipe_recipes
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_ATMOS]&[first_recipe.Params()]'>Atmospherics</A> "
dat += "<span class='linkOn'>Disposals</span><BR>"
return data
dat += "</ul>"
var/icon/preview=null
var/datbuild = ""
var/recipes = GLOB.atmos_pipe_recipes + GLOB.disposal_pipe_recipes
for(var/category in recipes)
var/list/cat_recipes = recipes[category]
for(var/i in cat_recipes)
var/datum/pipe_info/I = i
var/found=0
if(I.id == p_type)
if((p_class == ATMOS_MODE || p_class == METER_MODE) && I.categoryId == CATEGORY_ATMOS)
found = 1
else if(p_class == DISPOSALS_MODE && I.categoryId == CATEGORY_DISPOSALS)
found = 1
if(found)
preview = new /icon(I.icon, I.icon_state)
if(screen == I.categoryId)
if(I.id == p_type && p_class >= 0)
datbuild += "<li><span class='linkOn'>[I.name]</span></li>"
else
datbuild += I.Render(src)
if(length(datbuild) > 0)
dat += "<b>[category]:</b><ul>"
dat += datbuild
datbuild = ""
dat += "</ul>"
var/color_css=""
var/color_picker=""
for(var/color_name in paint_colors)
var/color=paint_colors[color_name]
color_css += {"
a.color.[color_name] {
color: [color];
}
a.color.[color_name]:hover {
border:1px solid [color];
}
a.color.[color_name].selected {
background-color: [color];
}
"}
var/selected=""
if(color_name==paint_color)
selected = " selected"
color_picker += {"<a class="color [color_name][selected]" href="?src=[REF(src)];set_color=[color_name]">&bull;</a>"}
var/dirsel="<h2>Direction</h2>"
switch(p_conntype)
if(-1)
if(p_class==PAINT_MODE)
dirsel = "<h2>Color</h2>[color_picker]"
else
dirsel = ""
if(PIPE_STRAIGHT) // Straight, N-S, W-E
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
</p>
"}
if(PIPE_BENDABLE) // Bent, N-W, N-E etc
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nw.png")
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "ne.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "sw.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nw.png","West to North")
dirsel += render_dir_img(NORTHEAST,"ne.png","North to East")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHWEST,"sw.png","South to West")
dirsel += render_dir_img(SOUTHEAST,"se.png","East to South")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">&#8597;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">&harr;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST]" title="West to North">&#9565;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST]" title="North to East">&#9562;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHWEST]" title="South to West">&#9559;</a>
<a href="?src=[REF(src)];setdir=[SOUTHEAST]" title="East to South">&#9556;</a>
</p>
"}
if(PIPE_TRINARY) // Manifold
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_TRIN_M) // Mirrored ones
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "sm.png") //each mirror icon is 45 anticlockwise from it's real direction
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "wm.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nm.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"s.png","West South East")
dirsel += render_dir_img(EAST,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(SOUTH,"n.png","East North West")
dirsel += render_dir_img(WEST,"e.png","South East North")
dirsel += "<br />"
dirsel += render_dir_img(SOUTHEAST,"sm.png","West South East", 1)
dirsel += render_dir_img(NORTHEAST,"wm.png","North West South", 1)
dirsel += "<br />"
dirsel += render_dir_img(NORTHWEST,"nm.png","East North West", 1)
dirsel += render_dir_img(SOUTHWEST,"em.png","South East North", 1)
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">&#9568;</a>
<br />
<a href="?src=[REF(src)];setdir=[SOUTHEAST];flipped=1" title="West, South, East">&#9574;</a>
<a href="?src=[REF(src)];setdir=[NORTHEAST];flipped=1" title="North, West, South">&#9571;</a>
<br />
<a href="?src=[REF(src)];setdir=[NORTHWEST];flipped=1" title="East, North, West">&#9577;</a>
<a href="?src=[REF(src)];setdir=[SOUTHWEST];flipped=1" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_UNARY) // Stuff with four directions - includes pumps etc.
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "n.png")
user << browse_rsc(new /icon(preview, dir=EAST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "s.png")
user << browse_rsc(new /icon(preview, dir=WEST), "w.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"n.png","North")
dirsel += render_dir_img(EAST, "e.png","East")
dirsel += render_dir_img(SOUTH,"s.png","South")
dirsel += render_dir_img(WEST, "w.png","West")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="North">&uarr;</a>
<a href="?src=[REF(src)];setdir=[EAST]" title="East">&rarr;</a>
<a href="?src=[REF(src)];setdir=[SOUTH]" title="South">&darr;</a>
<a href="?src=[REF(src)];setdir=[WEST]" title="West">&larr;</a>
</p>
"}
if(PIPE_ONEDIR) // Single icon_state (eg 4-way manifolds)
if(preview)
user << browse_rsc(new /icon(preview), "pipe.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"pipe.png","Pipe")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=[REF(src)];setdir=[NORTH]" title="Pipe">&#8597;</a>
</p>
"}
var/datsytle = {"
<style type="text/css">
a.imglink {
padding: none;
text-decoration:none;
border-style:none;
background:none;
margin: 1px;
}
a.imglink:hover {
background:none;
color:none;
}
a.imglink.selected img {
border: 1px solid #24722e;
background: #2f943c;
}
a img {
border: 1px solid #161616;
background: #40628a;
}
a.color {
padding: 5px 10px;
font-size: large;
font-weight: bold;
border: 1px solid #161616;
}
a.selected img,
a:hover {
background: #0066cc;
color: #ffffff;
}
[color_css]
</style>"}
dat = datsytle + dirsel + dat
var/datum/browser/popup = new(user, "pipedispenser", name, 300, 550)
popup.set_content(dat)
popup.open()
return
/obj/item/pipe_dispenser/Topic(href, href_list)
if(!usr.canUseTopic(src))
usr << browse(null, "window=pipedispenser")
/obj/item/pipe_dispenser/ui_act(action, params)
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["screen"])
screen = text2num(href_list["screen"])
show_menu(usr)
if(href_list["setdir"])
p_dir = text2num(href_list["setdir"])
if(href_list["flipped"])
p_flipped = text2num(href_list["flipped"])
else
p_flipped = FALSE
show_menu(usr)
if(href_list["setlayer"])
if(!isnum(href_list["setlayer"]))
piping_layer = text2num(href_list["setlayer"])
else
piping_layer = href_list["setlayer"]
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype = -1
p_dir = 1
if(!usr.canUseTopic(src))
return
var/playeffect = TRUE
switch(action)
if("color")
paint_color = params["paint_color"]
if("mode")
mode = text2num(params["mode"])
if("screen")
if(mode == screen)
mode = text2num(params["screen"])
screen = text2num(params["screen"])
recipe = screen == DISPOSALS_MODE ? first_disposal : first_atmos
p_dir = NORTH
playeffect = FALSE
if("piping_layer")
piping_layer = text2num(params["piping_layer"])
playeffect = FALSE
if("pipe_type")
var/static/list/recipes
if(!recipes)
recipes = GLOB.disposal_pipe_recipes + GLOB.atmos_pipe_recipes
recipe = recipes[params["category"]][text2num(params["pipe_type"])]
p_dir = NORTH
if("setdir")
p_dir = text2dir(params["dir"])
p_flipped = text2num(params["flipped"])
playeffect = FALSE
if(playeffect)
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["paintpipes"])
p_class = PAINT_MODE
p_conntype = -1
p_dir = 1
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color = href_list["set_color"]
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2path(href_list["makepipe"])
var/obj/item/pipe/path = text2path(href_list["type"])
p_conntype = initial(path.RPD_type)
p_dir = NORTH
p_class = ATMOS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makemeter"])
p_class = METER_MODE
p_type = text2num(href_list["makemeter"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["dmake"])
p_type = text2path(href_list["dmake"])
p_conntype = text2num(href_list["type"])
p_dir = NORTH
p_class = DISPOSALS_MODE
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
/obj/item/pipe_dispenser/pre_attackby(atom/A, mob/user)
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
return ..()
var/atmos_piping_mode = p_class == ATMOS_MODE || p_class == METER_MODE
var/atmos_piping_mode = mode == ATMOS_MODE || mode == METER_MODE
var/temp_piping_layer
if(atmos_piping_mode)
if(istype(A, /obj/machinery/atmospherics))
@@ -569,16 +290,20 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
temp_piping_layer = AM.piping_layer
A = get_turf(user)
var/static/list/make_pipe_whitelist
if(!make_pipe_whitelist)
make_pipe_whitelist = list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe)
//make sure what we're clicking is valid for the current mode
var/can_make_pipe = ((atmos_piping_mode || p_class == DISPOSALS_MODE) && (isturf(A)) || istype(A, /obj/structure/lattice) || istype(A, /obj/structure/girder))
var/can_make_pipe = (atmos_piping_mode || mode == DISPOSALS_MODE) && (isturf(A) || is_type_in_list(A, make_pipe_whitelist))
//So that changing the menu settings doesn't affect the pipes already being built.
var/queued_p_type = p_type
var/queued_p_type = recipe.id
var/queued_p_dir = p_dir
var/queued_p_flipped = p_flipped
. = FALSE
switch(p_class) //if we've gotten this var, the target is valid
switch(mode) //if we've gotten this var, the target is valid
if(PAINT_MODE) //Paint pipes
if(!istype(A, /obj/machinery/atmospherics/pipe))
return ..()
@@ -620,6 +345,7 @@ GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
P.setPipingLayer(temp_piping_layer)
else
P.setPipingLayer(piping_layer)
P.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
if(METER_MODE) //Making pipe meters
if(!can_make_pipe)
@@ -29,7 +29,6 @@
var/access = 0 //Bit flags_1 for cartridge access
// var/access_flora = 0
var/remote_door_id = ""
var/bot_access_flags = 0 //Bit flags_1. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
@@ -110,13 +109,6 @@
icon_state = "cart-s"
access = CART_NEWSCASTER
/*
/obj/item/cartridge/botanist
name = "\improper Green Thumb v4.20 cartridge"
icon_state = "cart-b"
access_flora = 1
*/
/obj/item/cartridge/roboticist
name = "\improper B.O.O.P. Remote Control cartridge"
desc = "Packed with heavy duty triple-bot interlink!"
@@ -669,9 +661,6 @@ Code:
var/mob/living/simple_animal/bot/Bot
// if(!SC)
// menu = "Interlink Error - Please reinsert cartridge."
// return
if(active_bot)
menu += "<B>[active_bot]</B><BR> Status: (<A href='byond://?src=[REF(src)];op=control;bot=[REF(active_bot)]'><img src=pda_refresh.png><i>refresh</i></A>)<BR>"
menu += "Model: [active_bot.model]<BR>"
@@ -28,8 +28,8 @@
..()
disrupt()
/obj/item/device/chameleon/attack_self()
toggle()
/obj/item/device/chameleon/attack_self(mob/user)
toggle(user)
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity)
@@ -51,7 +51,7 @@
return TRUE
return FALSE
/obj/item/device/chameleon/proc/toggle()
/obj/item/device/chameleon/proc/toggle(mob/user)
if(!can_use || !saved_appearance)
return
if(active_dummy)
@@ -59,15 +59,15 @@
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
to_chat(user, "<span class='notice'>You deactivate \the [src].</span>")
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
else
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
C.activate(usr, saved_appearance, src)
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(get_turf(user))
C.activate(user, saved_appearance, src)
to_chat(user, "<span class='notice'>You activate \the [src].</span>")
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
usr.cancel_camera()
user.cancel_camera()
/obj/item/device/chameleon/proc/disrupt(delete_dummy = 1)
if(active_dummy)
@@ -100,6 +100,9 @@
/obj/effect/dummy/chameleon/proc/activate(mob/M, saved_appearance, obj/item/device/chameleon/C)
appearance = saved_appearance
if(istype(M.buckled, /obj/vehicle))
var/obj/vehicle/V = M.buckled
V.riding_datum.force_dismount(M)
M.loc = src
master = C
master.active_dummy = src
@@ -4,7 +4,6 @@
/**
* Multitool -- A multitool is used for hacking electronic devices.
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
*
*/
@@ -35,9 +35,3 @@
src.code = "beacon"
src.add_fingerprint(usr)
return
/*
//Probably a better way of doing this, I'm lazy.
/obj/item/device/radio/beacon/bacon/proc/digest_delay()
spawn(600)
qdel(src)*/ //Bacon beacons are no more rip in peace
@@ -454,18 +454,6 @@
if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT)
raw_message = stars(raw_message)
talk_into(speaker, raw_message, , spans, language=message_language)
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
if ((R.frequency == frequency && message))
return 1
else if
else
return null
return
*/
/obj/item/device/radio/proc/receive_range(freq, level)
// check if this radio can receive on the given frequency, and if so,
@@ -375,16 +375,12 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
sheettype = "abductor"
GLOBAL_LIST_INIT(abductor_recipes, list ( \
/* new/datum/stack_recipe("alien chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 2, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
/* null, \
new/datum/stack_recipe("Abductor Agent Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Abductor Sciencist Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1)*/
))
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
@@ -254,7 +254,6 @@
adjusted_contents++
numbered_contents.Add( new/datum/numbered_display(I) )
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if(adjusted_contents > 7)
+1 -1
View File
@@ -349,7 +349,7 @@
var/injection_amount = 1
amount_per_transfer_from_this = 5
container_type = OPENCONTAINER_1
spillable = 0
spillable = FALSE
possible_transfer_amounts = list(5,10,15)
/obj/item/reagent_containers/chemtank/ui_action_click()
@@ -95,7 +95,7 @@
handle_layer()
/obj/structure/chair/proc/spin()
setDir(turn(dir, 90))
setDir(turn(dir, -90))
/obj/structure/chair/setDir(newdir)
..()
@@ -53,11 +53,6 @@
if ("delete")
qdel(src)
//If you want to re-add fire, just add "fire" = 15 to the pick list.
/*if ("fire")
new /obj/structure/closet/firecloset(src.loc)
qdel(src)*/
/*
* Fire Closet
*/
+100 -60
View File
@@ -1,48 +1,55 @@
// Basic ladder. By default links to the z-level above/below.
/obj/structure/ladder
name = "ladder"
desc = "A sturdy metal ladder."
icon = 'icons/obj/structures.dmi'
icon_state = "ladder11"
var/id = null
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
var/auto_connect = FALSE
anchored = TRUE
var/obj/structure/ladder/down //the ladder below this one
var/obj/structure/ladder/up //the ladder above this one
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
/obj/structure/ladder/Initialize(mapload)
GLOB.ladders += src
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
..()
if (up)
src.up = up
up.down = src
up.update_icon()
if (down)
src.down = down
down.up = src
down.update_icon()
return INITIALIZE_HINT_LATELOAD
/obj/structure/ladder/Destroy()
/obj/structure/ladder/Destroy(force)
if ((resistance_flags & INDESTRUCTIBLE) && !force)
return QDEL_HINT_LETMELIVE
if(up && up.down == src)
up.down = null
up.update_icon()
if(down && down.up == src)
down.up = null
down.update_icon()
GLOB.ladders -= src
. = ..()
return ..()
/obj/structure/ladder/LateInitialize()
for(var/obj/structure/ladder/L in GLOB.ladders)
if(L.id == id || (auto_connect && L.auto_connect && L.x == x && L.y == y))
if(L.height == (height - 1))
down = L
continue
if(L.height == (height + 1))
up = L
continue
// By default, discover ladders above and below us vertically
var/turf/T = get_turf(src)
if(up && down) //if both our connections are filled
if (!down)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
down = L
L.up = src // Don't waste effort looping the other way
L.update_icon()
break
if (!up)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
up = L
L.down = src // Don't waste effort looping the other way
L.update_icon()
break
update_icon()
update_icon()
/obj/structure/ladder/update_icon()
if(up && down)
@@ -57,23 +64,34 @@
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/singularity_pull()
if (!(resistance_flags & INDESTRUCTIBLE))
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
qdel(src)
/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder)
if(!is_ghost)
show_fluff_message(going_up,user)
show_fluff_message(going_up, user)
ladder.add_fingerprint(user)
var/turf/T = get_turf(ladder)
var/atom/movable/AM
if(user.pulling)
AM = user.pulling
user.pulling.forceMove(get_turf(ladder))
user.forceMove(get_turf(ladder))
AM.forceMove(T)
user.forceMove(T)
if(AM)
user.start_pulling(AM)
/obj/structure/ladder/proc/use(mob/user, is_ghost=FALSE)
if (!is_ghost && !in_range(src, user))
return
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if (up && down)
var/result = alert("Go up or down [src]?", "Ladder", "Up", "Down", "Cancel")
if (!is_ghost && !in_range(src, user))
return // nice try
switch(result)
if("Up")
travel(TRUE, user, is_ghost, up)
if("Down")
@@ -83,7 +101,7 @@
else if(up)
travel(TRUE, user, is_ghost, up)
else if(down)
travel(FALSE, user,is_ghost, down)
travel(FALSE, user, is_ghost, down)
else
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
@@ -91,44 +109,66 @@
add_fingerprint(user)
/obj/structure/ladder/attack_hand(mob/user)
if(can_use(user))
use(user)
use(user)
/obj/structure/ladder/attack_paw(mob/user)
return attack_hand(user)
return use(user)
/obj/structure/ladder/attackby(obj/item/W, mob/user, params)
return attack_hand(user)
return use(user)
/obj/structure/ladder/attack_robot(mob/living/silicon/robot/R)
if(R.Adjacent(src))
return attack_hand(R)
return use(R)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
use(user, TRUE)
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
if(up)
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
/obj/structure/ladder/proc/show_fluff_message(going_up, mob/user)
if(going_up)
user.visible_message("[user] climbs up [src].","<span class='notice'>You climb up [src].</span>")
else
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
/obj/structure/ladder/proc/can_use(mob/user)
return 1
/obj/structure/ladder/unbreakable/Destroy(force)
if(force)
. = ..()
else
return QDEL_HINT_LETMELIVE
/obj/structure/ladder/unbreakable/singularity_pull()
return
/obj/structure/ladder/auto_connect //They will connect to ladders with the same X and Y without needing to share an ID
auto_connect = TRUE
user.visible_message("[user] climbs down [src].","<span class='notice'>You climb down [src].</span>")
/obj/structure/ladder/singularity_pull()
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
qdel(src)
// Indestructible away mission ladders which link based on a mapped ID and height value rather than X/Y/Z.
/obj/structure/ladder/unbreakable
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
resistance_flags = INDESTRUCTIBLE
var/id
var/height = 0 // higher numbers are considered physically higher
/obj/structure/ladder/unbreakable/Initialize()
GLOB.ladders += src
return ..()
/obj/structure/ladder/unbreakable/Destroy()
. = ..()
if (. != QDEL_HINT_LETMELIVE)
GLOB.ladders -= src
/obj/structure/ladder/unbreakable/LateInitialize()
// Override the parent to find ladders based on being height-linked
if (!id || (up && down))
update_icon()
return
for (var/O in GLOB.ladders)
var/obj/structure/ladder/unbreakable/L = O
if (L.id != id)
continue // not one of our pals
if (!down && L.height == height - 1)
down = L
L.up = src
L.update_icon()
if (up)
break // break if both our connections are filled
else if (!up && L.height == height + 1)
up = L
L.down = src
L.update_icon()
if (down)
break // break if both our connections are filled
update_icon()
+2 -2
View File
@@ -378,8 +378,8 @@
/obj/structure/table/optable/New()
..()
for(var/dir in GLOB.cardinals)
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
for(var/direction in GLOB.cardinals)
computer = locate(/obj/machinery/computer/operating, get_step(src, direction))
if(computer)
computer.table = src
break