From 61839da57028435b4091c8bb8005708c173174cf Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Mon, 13 Oct 2014 20:01:54 +0100 Subject: [PATCH 1/6] testing fix for nui resources Signed-off-by: Mloc-Argent --- code/modules/nano/nanomanager.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index f3396ecd3f6..da546ac66da 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -27,8 +27,9 @@ filenames = flist(path) for(var/filename in filenames) if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore - asset_files.Add(file(path + filename)) // add this file to asset_files for sending to clients when they connect - + if(fexists(path + filename)) + asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect + return /** From c6c691bfd9d0f5f4d497e897fd1df9ec518a33c7 Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 13 Oct 2014 20:35:56 +0100 Subject: [PATCH 2/6] fixes #6299 Signed-off-by: Mloc --- code/ATMOSPHERICS/pipes.dm | 74 ++++++++++++++++++++++++++++--------- icons/atmos/pipes.dmi | Bin 1433 -> 1517 bytes 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 898f1965517..d4b30e60a0c 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -786,8 +786,8 @@ /obj/machinery/atmospherics/pipe/cap name = "pipe endcap" desc = "An endcap for pipes" - icon = 'icons/obj/pipes.dmi' - icon_state = "cap" + icon = 'icons/atmos/pipes.dmi' + icon_state = "" level = 2 layer = 2.4 //under wires with their 2.44 @@ -800,15 +800,7 @@ /obj/machinery/atmospherics/pipe/cap/New() ..() - switch(dir) - if(SOUTH) - initialize_directions = NORTH - if(NORTH) - initialize_directions = SOUTH - if(WEST) - initialize_directions = EAST - if(EAST) - initialize_directions = WEST + initialize_directions = dir /obj/machinery/atmospherics/pipe/cap/hide(var/i) if(level == 1 && istype(loc, /turf/simulated)) @@ -839,11 +831,19 @@ ..() -/obj/machinery/atmospherics/pipe/cap/update_icon() - overlays = new() +/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color) + ..() + if(node) + node.update_underlays() - icon_state = "cap[invisibility ? "-f" : ""]" - return +/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0) + if(!check_icon_cache()) + return + + alpha = 255 + + overlays.Cut() + overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap") /obj/machinery/atmospherics/pipe/cap/initialize() for(var/obj/machinery/atmospherics/target in get_step(src, dir)) @@ -856,13 +856,53 @@ update_icon() /obj/machinery/atmospherics/pipe/cap/visible - level = 2 icon_state = "cap" + level = 2 + +/obj/machinery/atmospherics/pipe/cap/visible/scrubbers + name = "Scrubbers pipe" + color = PIPE_COLOR_RED + +/obj/machinery/atmospherics/pipe/cap/visible/supply + name = "Air supply pipe" + color = PIPE_COLOR_BLUE + +/obj/machinery/atmospherics/pipe/cap/visible/yellow + color = PIPE_COLOR_YELLOW + +/obj/machinery/atmospherics/pipe/cap/visible/cyan + color = PIPE_COLOR_CYAN + +/obj/machinery/atmospherics/pipe/cap/visible/green + color = PIPE_COLOR_GREEN + +/obj/machinery/atmospherics/pipe/cap/visible/purple + color = PIPE_COLOR_PURPLE /obj/machinery/atmospherics/pipe/cap/hidden + icon_state = "cap" level = 1 - icon_state = "cap-f" + alpha = 128 +/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers + name = "Scrubbers pipe" + color = PIPE_COLOR_RED + +/obj/machinery/atmospherics/pipe/cap/hidden/supply + name = "Air supply pipe" + color = PIPE_COLOR_BLUE + +/obj/machinery/atmospherics/pipe/cap/hidden/yellow + color = PIPE_COLOR_YELLOW + +/obj/machinery/atmospherics/pipe/cap/hidden/cyan + color = PIPE_COLOR_CYAN + +/obj/machinery/atmospherics/pipe/cap/hidden/green + color = PIPE_COLOR_GREEN + +/obj/machinery/atmospherics/pipe/cap/hidden/purple + color = PIPE_COLOR_PURPLE /obj/machinery/atmospherics/pipe/tank icon = 'icons/atmos/tank.dmi' diff --git a/icons/atmos/pipes.dmi b/icons/atmos/pipes.dmi index 019be28ffd8a7a70de8e4cffc0ecfd4c89a1c55b..7cde38db46d8a1c39931e4c8b0ea4b0fc989fae7 100644 GIT binary patch delta 1311 zcmah}Yfw@N6uuBj$|@V~L`kNW)okv{+FBZ!vPOtAij^%`iTK#ma@F#YrpX1=F?S{` ztL>$RY1)?BbJ|i7G)<*8HPcn>!HVgcnJI*L;oiH~cJ}xFIOjXxcOElm&dj+$nj)bSFt29G<}F9u&%^QhzTHD}8P zS8V~;pKQL5(s~fKAF=FmggSGi{KLNFM(3`PkXfT~)NLlHFc5-}={93#D%#+5{9Kn^ zw&2gVwdv1ZHfE3QZSX%+o!f_aRkO2G(6kD8g&}1$*?lukez#{PKJqm%@lCo#6F(A8 z#DZhvq(kw&_b5B6FLSeMK$S<>d3^)U$vNy25ul4@)5L zd44QTe1+~@q$nW}>rpyQ=h2E5D&vceRW3{s<{Y^wyIBT=%?)RLzSf}6)Z9G zw*FdvkvL736RfAnTEb7DYGWn)U~#(R8NfiEef&McE*JpkiASv{Co>$+0~5|GUJAv0 z*XRB|50pS?%x4sLOVZQ}f|wEo=jEA60(@F@stCzIfr;U~hh>IHe5S6QWf{)5=uCQx z#blpxC)bqea0{k+B;UBqVhNyO6p0)-(`^157Qf|=x{LGUN;E18v3^q&8xEur0a z2`JfwvuT5@1TQA3;UH5XsC}*K*>JkO)b54 zPW&%sh$BApOmU0|(lQ|c$L|a-yZ+1XdNinc=)6cM!@t@Ty<@S^GYmXoj`0f@WWuQ}ZA1%=(w`=SZ zoIGiS31b1~IwU}+Fv0#DAzRbb3|@unk=Dn?VYtBh7)pMQW<<3M6E=MSGr{Pvh1%2A zBXg)r?vR8G{?!K|#l}W6NnyOA)T$QbHIl1JEo4S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R=a;9)_gdZ$DP&t%;KBy~nA86N)@_M8 From 28e053935934f9cafd5c159687ec57883ca6d3bf Mon Sep 17 00:00:00 2001 From: Mloc Date: Tue, 14 Oct 2014 11:57:31 +0100 Subject: [PATCH 3/6] fix an issue with ZAS geometry not re-forming Signed-off-by: Mloc --- code/ZAS/Atom.dm | 2 +- code/ZAS/Connection.dm | 15 +++++++++------ code/ZAS/ConnectionGroup.dm | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index b4d1de20af4..1a2ad9cb02c 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -47,7 +47,7 @@ turf/c_airblock(turf/other) #ifdef ZASDBG ASSERT(isturf(other)) #endif - if(blocks_air) + if(blocks_air || other.blocks_air) return BLOCKED //Z-level handling code. Always block if there isn't an open space. diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index b9cf2278a18..37600dadead 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -76,11 +76,15 @@ Class Procs: edge.add_connection(src) /connection/proc/mark_direct() - state |= CONNECTION_DIRECT + if(!direct()) + state |= CONNECTION_DIRECT + edge.direct++ //world << "Marked direct." /connection/proc/mark_indirect() - state &= ~CONNECTION_DIRECT + if(direct()) + state &= ~CONNECTION_DIRECT + edge.direct-- //world << "Marked indirect." /connection/proc/mark_space() @@ -110,10 +114,9 @@ Class Procs: erase() return else if(block_status & ZONE_BLOCKED) - if(direct()) - mark_indirect() - else - mark_direct() + mark_indirect() + else + mark_direct() var/b_is_space = !istype(B,/turf/simulated) diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 7fab5e94adc..94731228a6d 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -61,6 +61,7 @@ Class Procs: /connection_edge/var/zone/A /connection_edge/var/list/connecting_turfs = list() +/connection_edge/var/direct = 0 /connection_edge/var/coefficient = 0 @@ -69,6 +70,7 @@ Class Procs: /connection_edge/proc/add_connection(connection/c) coefficient++ + if(c.direct()) direct++ //world << "Connection added: [type] Coefficient: [coefficient]" /connection_edge/proc/remove_connection(connection/c) @@ -76,6 +78,7 @@ Class Procs: coefficient-- if(coefficient <= 0) erase() + if(c.direct()) direct-- /connection_edge/proc/contains_zone(zone/Z) @@ -114,7 +117,6 @@ Class Procs: /connection_edge/zone/var/zone/B -/connection_edge/zone/var/direct = 0 /connection_edge/zone/New(zone/A, zone/B) @@ -128,11 +130,9 @@ Class Procs: /connection_edge/zone/add_connection(connection/c) . = ..() connecting_turfs.Add(c.A) - if(c.direct()) direct++ /connection_edge/zone/remove_connection(connection/c) connecting_turfs.Remove(c.A) - if(c.direct()) direct-- . = ..() /connection_edge/zone/contains_zone(zone/Z) From eb707ea9b659548e164a51cc060d95b387ec8420 Mon Sep 17 00:00:00 2001 From: Menshin Date: Tue, 14 Oct 2014 18:34:53 +0200 Subject: [PATCH 4/6] Prevent stacks multiplier href exploit --- code/game/objects/items/stacks/stack.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 32d704cdc5e..e008a8cf298 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -117,7 +117,8 @@ recipes_list = srl.recipes var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) - if (!multiplier) multiplier = 1 + if (multiplier <= 0) //href exploit protection + return if (src.amount < R.req_amount*multiplier) if (R.req_amount*multiplier>1) usr << "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!" From 6387c96bb514a12fdc44f3d4678f9c8961bcdf80 Mon Sep 17 00:00:00 2001 From: Menshin Date: Tue, 14 Oct 2014 22:31:19 +0200 Subject: [PATCH 5/6] Ambiguous expression readded. --- code/game/objects/items/stacks/stack.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index e008a8cf298..c7c74c392b1 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -117,6 +117,8 @@ recipes_list = srl.recipes var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) + if(!multiplier) //if multiplier is null + multiplier = 1 if (multiplier <= 0) //href exploit protection return if (src.amount < R.req_amount*multiplier) From 70b2c9a1faca694f943888cdaa32bce4e2d3305e Mon Sep 17 00:00:00 2001 From: Menshin Date: Tue, 14 Oct 2014 22:48:48 +0200 Subject: [PATCH 6/6] Who thought it was a good idea to omit multiplier for 1x ?!? --- code/game/objects/items/stacks/stack.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index c7c74c392b1..cb66053692c 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -81,7 +81,7 @@ title+= "[R.title]" title+= " ([R.req_amount] [src.singular_name]\s)" if (can_build) - t1 += text("[title] ") + t1 += text("[title] ") else t1 += text("[]", title) continue @@ -117,9 +117,7 @@ recipes_list = srl.recipes var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])] var/multiplier = text2num(href_list["multiplier"]) - if(!multiplier) //if multiplier is null - multiplier = 1 - if (multiplier <= 0) //href exploit protection + if (!multiplier || (multiplier <= 0)) //href exploit protection return if (src.amount < R.req_amount*multiplier) if (R.req_amount*multiplier>1)