Merge conflict resolution.

This commit is contained in:
Zuhayr
2014-11-10 13:00:06 +10:30
42 changed files with 2122 additions and 2046 deletions

View File

@@ -67,7 +67,7 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
return omni_icons[state]
if("underlay")
return underlays[state + dir + color]
//if("underlay_intact")
// if("underlay_intact")
// return underlays_intact[state + dir + color]
// if("underlay_exposed")
// return underlays_exposed[state + dir + color]
@@ -194,6 +194,11 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
I.color = pipe_colors[pipe_color]
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
/*
Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly
separate the newpipe icon caching (speshul supply and scrubber lines) from the rest of the pipe code.
*/
/*
/datum/pipe_icon_manager/proc/gen_underlay_icons()
if(!underlays_intact)

View File

@@ -190,9 +190,11 @@
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else
pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)

View File

@@ -6,7 +6,7 @@
var/volume = 0
force = 20
//layer = 2.4 //under wires with their 2.44
layer = 2.4 //under wires with their 2.44
use_power = 0
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -256,9 +256,9 @@
del(meter)
del(src)
else if(node1 && node2)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "intact" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
else
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "exposed[node1?1:0][node2?1:0]" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")
/obj/machinery/atmospherics/pipe/simple/update_underlays()
return
@@ -911,29 +911,21 @@
/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
volume = 35
dir = SOUTH
initialize_directions = NORTH
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node
/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))
@@ -964,12 +956,21 @@
..()
/obj/machinery/atmospherics/pipe/cap/update_icon()
overlays = new()
/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
..()
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
if(node)
node.update_underlays()
icon_state = "cap[invisibility ? "-f" : ""]"
/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))
if(target.initialize_directions & get_dir(target,src))
@@ -1008,7 +1009,8 @@
/obj/machinery/atmospherics/pipe/cap/hidden
level = 1
icon_state = "cap-f"
icon_state = "cap"
alpha = 128
/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
name = "scrubbers pipe endcap"

View File

@@ -228,9 +228,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
var/i, ch, len = length(key)
var/i = 7, ch, len = length(key)
for (i = 7, i <= len, ++i)
if(copytext(key, 7, 8) == "W") //webclient
i++
for (, i <= len, ++i)
ch = text2ascii(key, i)
if (ch < 48 || ch > 57)
return 0

View File

@@ -49,7 +49,7 @@
if(isNotStationLevel(S.z))
continue
S.charge = S.capacity
S.output = 200000
S.output = S.output_level_max // Most new SMESs on map are of buildable type, and may actually have higher output limit than 200kW. Use max output of that SMES instead.
S.online = 1
S.updateicon()
S.power_change()

View File

@@ -274,7 +274,7 @@ var/global/datum/controller/gameticker/ticker
proc/create_characters()
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind)
if(player && player.ready && player.mind)
if(player.mind.assigned_role=="AI")
player.close_spawn_windows()
player.AIize()

View File

@@ -601,7 +601,7 @@ About the new airlock wires panel:
if (src.isElectrified())
if (istype(mover, /obj/item))
var/obj/item/i = mover
if (i.matter["metal"])
if (i.matter && ("metal" in i.matter) && i.matter["metal"] > 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()

View File

@@ -165,8 +165,6 @@
if(alarmed)
// Accountability!
users_to_open |= user.name
log_admin("[user]([user.ckey]) has opened an alarming emergency shutter.")
message_admins("[user]([user.ckey]) has opened an alarming emergency shutter.")
needs_to_close = 1
spawn()
open()

View File

@@ -376,7 +376,7 @@ Buildable meters
if(PIPE_GAS_MIXER_T)
return dir|cw|acw
if(PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP)
return flip
return dir
///// Z-Level stuff
if(PIPE_UP,PIPE_DOWN,PIPE_SUPPLY_UP,PIPE_SUPPLY_DOWN,PIPE_SCRUBBERS_UP,PIPE_SCRUBBERS_DOWN)
return dir

View File

@@ -220,6 +220,8 @@
step_towards(W,my_target)
if(!W)
return
if(!W.reagents)
break
var/turf/W_turf = get_turf(W)
W.reagents.reaction(W_turf)
for(var/atom/atm in W_turf)

View File

@@ -122,7 +122,7 @@ move an amendment</a> to the drawing.</p>
return
var/area/A = new
A.name = str
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
A.tagbase = "[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
//var/ma
//ma = A.master ? "[A.master]" : "(null)"
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"

View File

@@ -272,9 +272,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
for(var/index in tnote)
if(index["sent"])
HTML += addtext("<i><b>&rarr; To <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
HTML += addtext("<i><b>&rarr; To <a href='byond://?src=\ref[src];choice=Message;notap=1;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
else
HTML += addtext("<i><b>&larr; From <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
HTML += addtext("<i><b>&larr; From <a href='byond://?src=\ref[src];choice=Message;notap=1;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
HTML +="</body></html>"
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
@@ -724,7 +724,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Message")
var/obj/item/device/pda/P = locate(href_list["target"])
src.create_message(U, P, !("notap" in href_list))
src.create_message(U, P, !href_list["notap"])
if(mode == 2)
if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp.
active_conversation = href_list["target"]
@@ -1026,9 +1026,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
L << reception_message
nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
if(L)
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;notap=[istype(L, /mob/living/silicon)];skiprefresh=1;target=\ref[src]'>Reply</a>)"
nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
/obj/item/device/pda/proc/new_news(var/message)
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
new_news = 1
update_icon()

View File

@@ -204,6 +204,7 @@ datum/nano_item_lists
// open the new ui window
ui.open()
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/hidden/interact(mob/user)
ui_interact(user)
@@ -247,8 +248,22 @@ datum/nano_item_lists
for(var/datum/data/record/L in data_core.locked)
if(L.fields["id"] == id)
nanoui_data["exploit"] = L.fields
nanoui_data["exploit"]["nanoui_exploit_record"] = replacetext(nanoui_data["exploit"]["exploit_record"], "\n", "<br>")
nanoui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
// We trade off being able to automatically add shit for more control over what gets passed to json
// and if it's sanitized for html.
nanoui_data["exploit"]["nanoui_exploit_record"] = html_encode(L.fields["exploit_record"]) // Change stuff into html
nanoui_data["exploit"]["nanoui_exploit_record"] = replacetext(nanoui_data["exploit"]["nanoui_exploit_record"], "\n", "<br>") // change line breaks into <br>
nanoui_data["exploit"]["name"] = html_encode(L.fields["name"])
nanoui_data["exploit"]["sex"] = html_encode(L.fields["sex"])
nanoui_data["exploit"]["age"] = html_encode(L.fields["age"])
nanoui_data["exploit"]["species"] = html_encode(L.fields["species"])
nanoui_data["exploit"]["rank"] = html_encode(L.fields["rank"])
nanoui_data["exploit"]["home_system"] = html_encode(L.fields["home_system"])
nanoui_data["exploit"]["citizenship"] = html_encode(L.fields["citizenship"])
nanoui_data["exploit"]["faction"] = html_encode(L.fields["faction"])
nanoui_data["exploit"]["religion"] = html_encode(L.fields["religion"])
nanoui_data["exploit"]["fingerprint"] = html_encode(L.fields["fingerprint"])
nanoui_data["exploit_exists"] = 1
break

View File

@@ -130,7 +130,10 @@
if(!W) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W) return
if(!W)
return
if(!W.reagents)
break
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)

View File

@@ -41,6 +41,11 @@
if (ishuman(target))
var/mob/living/carbon/human/H = target
if (!H.has_organ_for_slot(slot_handcuffed))
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
return
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
@@ -150,6 +155,13 @@ var/last_chew = 0
var/turf/p_loc_m = C.loc
playsound(src.loc, cuff_sound, 30, 1, -2)
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
if (ishuman(C))
var/mob/living/carbon/human/H = C
if (!H.has_organ_for_slot(slot_handcuffed))
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
return
spawn(30)
if(!C) return
if(p_loc == user.loc && p_loc_m == C.loc)

View File

@@ -78,13 +78,16 @@
do_climb(target)
/obj/structure/proc/do_climb(var/mob/living/user)
/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable)
return
return 0
var/turf/T = src.loc
if(!T || !istype(T)) return
if(!T || !istype(T)) return 0
if (!user.Adjacent(src))
user << "\red You can't climb there, the way is blocked."
return 0
for(var/obj/O in T.contents)
if(istype(O,/obj/structure))
@@ -92,8 +95,13 @@
if(S.climbable)
continue
if(O && O.density)
usr << "\red There's \a [O] in the way."
if(O && O.density && !(O.flags & ON_BORDER)) //ON_BORDER structures are handled by the Adjacent() check.
user << "\red There's \a [O] in the way."
return 0
return 1
/obj/structure/proc/do_climb(var/mob/living/user)
if (!can_climb(user))
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
@@ -101,20 +109,10 @@
if(!do_after(user,50))
return
if (!can_touch(user) || !climbable)
if (!can_climb(user))
return
for(var/obj/O in T.contents)
if(istype(O,/obj/structure))
var/obj/structure/S = O
if(S.climbable)
continue
if(O && O.density)
usr << "\red There's \a [O] in the way."
return
usr.loc = get_turf(src)
usr.forceMove(get_turf(src))
if (get_turf(user) == get_turf(src))
usr.visible_message("<span class='warning'>[user] climbs onto \the [src]!</span>")

View File

@@ -448,6 +448,7 @@
dir = direction
if(dir != NORTH)
layer = 5
climbable = 0 //flipping tables allows them to be used as makeshift barriers
flipped = 1
flags |= ON_BORDER
for(var/D in list(turn(direction, 90), turn(direction, -90)))
@@ -465,6 +466,7 @@
layer = initial(layer)
flipped = 0
climbable = initial(climbable)
flags &= ~ON_BORDER
for(var/D in list(turn(dir, 90), turn(dir, -90)))
var/obj/structure/table/T = locate() in get_step(src.loc,D)

View File

@@ -105,7 +105,7 @@
/client/New(TopicData)
TopicData = null //Prevent calls to client.Topic from connect
if(connection != "seeker") //Invalid connection type.
if(!(connection in list("seeker", "web"))) //Invalid connection type.
return null
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
return null
@@ -298,5 +298,6 @@
'icons/spideros_icons/sos_11.png',
'icons/spideros_icons/sos_12.png',
'icons/spideros_icons/sos_13.png',
'icons/spideros_icons/sos_14.png'
'icons/spideros_icons/sos_14.png',
'html/images/ntlogo.png'
)

View File

@@ -1574,26 +1574,24 @@ datum/preferences
// Destroy/cyborgize organs
for(var/name in organ_data)
var/datum/organ/external/O = character.organs_by_name[name]
var/datum/organ/internal/I = character.internal_organs_by_name[name]
var/status = organ_data[name]
if(!I || !O)
continue
var/datum/organ/external/O = character.organs_by_name[name]
if(O)
if(status == "amputated")
O.amputated = 1
O.status |= ORGAN_DESTROYED
O.destspawn = 1
if(status == "cyborg")
else if(status == "cyborg")
O.status |= ORGAN_ROBOT
else
var/datum/organ/internal/I = character.internal_organs_by_name[name]
if(I)
if(status == "assisted")
I.mechassist()
else if(status == "mechanical")
I.mechanize()
else continue
if(underwear > underwear_m.len || underwear < 1)
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
character.underwear = underwear

View File

@@ -8,6 +8,7 @@
siemens_coefficient = 0.2
species_restricted = null
body_parts_covered = HEAD|FACE
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
/obj/item/clothing/suit/space/space_ninja
name = "ninja suit"
@@ -20,6 +21,7 @@
siemens_coefficient = 0.2
species_restricted = null //Workaround for spawning alien ninja without internals.
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT|HIDETAIL
supporting_limbs = list()
// Hardsuit breaching data

View File

@@ -379,7 +379,7 @@
item_state = "blueponcho"
/obj/item/clothing/suit/storage/bomber
name = "bomber jacker"
name = "bomber jacket"
desc = "A thick, well-worn WW2 leather bomber jacket."
icon_state = "bomber"
item_state = "bomber"

View File

@@ -25,7 +25,7 @@
/datum/seed/proc/request_player(var/mob/living/host)
if(!host) return
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(O, "Diona") && config.usealienwhitelist))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))

View File

@@ -26,7 +26,7 @@
cold_level_2 = -1
cold_level_3 = -1
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON
flags = NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON
reagent_tag = IS_XENOS

View File

@@ -229,7 +229,7 @@
return alert("Communications circuits remain uninitialized.")
var/target = locate(href_list["target"])
pda.create_message(src, target)
pda.create_message(src, target, 1)
// Accessing medical records
if("medicalrecord")

View File

@@ -22,7 +22,8 @@
/obj/item/weapon/rack_parts,
/obj/item/weapon/camera_assembly,
/obj/item/weapon/tank,
/obj/item/weapon/circuitboard
/obj/item/weapon/circuitboard,
/obj/item/weapon/smes_coil
)
//Item currently being held.

View File

@@ -11,7 +11,7 @@
var/matches
if( (M.lastKnownIP == client.address) )
matches += "IP ([client.address])"
if( (M.computer_id == client.computer_id) )
if( (client.connection != "web") && (M.computer_id == client.computer_id) )
if(matches) matches += " and "
matches += "ID ([client.computer_id])"
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")

View File

@@ -247,8 +247,8 @@ This function completely restores a damaged organ to perfect condition.
W.open_wound(damage)
if(prob(25))
//maybe have a separate message for BRUISE type damage?
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\
"\red The wound on your [display_name] widens with a nasty ripping voice.",\
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping noise.",\
"\red The wound on your [display_name] widens with a nasty ripping noise.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.")
return

View File

@@ -225,7 +225,7 @@
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
t = replacetext(t, "\[row\]", "</td><tr>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[logo\]", "<img src = http://baystation12.net/wiki/logo.png>")
t = replacetext(t, "\[logo\]", "<img src = html/images/ntlogo.png>")
t = "<font face=\"[deffont]\" color=[P ? P.colour : "black"]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!

View File

@@ -8,6 +8,7 @@
name = "Breaker Box"
icon = 'icons/obj/power.dmi'
icon_state = "bbox_off"
directwired = 0
var/icon_state_on = "bbox_on"
var/icon_state_off = "bbox_off"
flags = FPRINT

View File

@@ -486,7 +486,8 @@ obj/structure/cable/proc/avail()
icon_state = "coil"
amount = MAXCOIL
max_amount = MAXCOIL
item_color = COLOR_RED
color = COLOR_RED
//item_color = COLOR_RED Use regular "color" var instead. No need to have it duplicate in two vars. Causes confusion.
desc = "A coil of power cable."
throwforce = 10
w_class = 2.0
@@ -508,10 +509,8 @@ obj/structure/cable/proc/avail()
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/param_color = null)
..()
src.amount = length
if (param_color)
if (param_color) // It should be red by default, so only recolor it if parameter was specified.
color = param_color
else
color = item_color
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_icon()
@@ -548,7 +547,6 @@ obj/structure/cable/proc/avail()
/obj/item/stack/cable_coil/update_icon()
if (!color)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
item_color = color
if(amount == 1)
icon_state = "coil1"
name = "cable piece"
@@ -588,8 +586,8 @@ obj/structure/cable/proc/avail()
usr << "\red You need at least 15 lengths to make restraints!"
return
var/obj/item/weapon/handcuffs/cable/B = new /obj/item/weapon/handcuffs/cable(usr.loc)
B.icon_state = "cuff_[item_color]"
usr << "\blue You wind some cable together to make some restraints."
B.color = color
usr << "<span class='notice'>You wind some cable together to make some restraints.</span>"
src.use(15)
else
usr << "\blue You cannot do that."
@@ -602,7 +600,7 @@ obj/structure/cable/proc/avail()
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
src.amount--
new/obj/item/stack/cable_coil(user.loc, 1,item_color)
new/obj/item/stack/cable_coil(user.loc, 1,color)
user << "You cut a piece off the cable coil."
src.update_icon()
return
@@ -699,7 +697,7 @@ obj/structure/cable/proc/avail()
var/obj/structure/cable/C = new(F)
var/obj/structure/cable/D = new(temp.floorbelow)
C.cableColor(item_color)
C.cableColor(color)
C.d1 = 11
C.d2 = dirn
@@ -712,7 +710,7 @@ obj/structure/cable/proc/avail()
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
D.cableColor(item_color)
D.cableColor(color)
D.d1 = 12
D.d2 = 0
@@ -732,7 +730,7 @@ obj/structure/cable/proc/avail()
var/obj/structure/cable/C = new(F)
C.cableColor(item_color)
C.cableColor(color)
//set up the new cable
C.d1 = 0 //it's a O-X node cable
@@ -797,7 +795,7 @@ obj/structure/cable/proc/avail()
return
var/obj/structure/cable/NC = new(U)
NC.cableColor(item_color)
NC.cableColor(color)
NC.d1 = 0
NC.d2 = fdirn
@@ -843,7 +841,7 @@ obj/structure/cable/proc/avail()
return
C.cableColor(item_color)
C.cableColor(color)
C.d1 = nd1
C.d2 = nd2
@@ -889,26 +887,26 @@ obj/structure/cable/proc/avail()
update_wclass()
/obj/item/stack/cable_coil/yellow
item_color = COLOR_YELLOW
color = COLOR_YELLOW
/obj/item/stack/cable_coil/blue
item_color = COLOR_BLUE
color = COLOR_BLUE
/obj/item/stack/cable_coil/green
item_color = COLOR_GREEN
color = COLOR_GREEN
/obj/item/stack/cable_coil/pink
item_color = COLOR_PINK
color = COLOR_PINK
/obj/item/stack/cable_coil/orange
item_color = COLOR_ORANGE
color = COLOR_ORANGE
/obj/item/stack/cable_coil/cyan
item_color = COLOR_CYAN
color = COLOR_CYAN
/obj/item/stack/cable_coil/white
item_color = COLOR_WHITE
color = COLOR_WHITE
/obj/item/stack/cable_coil/random/New()
item_color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()

View File

@@ -11,6 +11,7 @@
density = 1
anchored = 1
use_power = 0
directwired = 0
var/output = 50000 //Amount of power it tries to output
var/lastout = 0 //Amount of power it actually outputs to the powernet
var/loaddemand = 0 //For use in restore()
@@ -60,7 +61,9 @@
overlays += image('icons/obj/power.dmi', "smes-op[online]")
if(charging)
if(charging == 2)
overlays += image('icons/obj/power.dmi', "smes-oc2")
else if (charging == 1)
overlays += image('icons/obj/power.dmi', "smes-oc1")
else
if(chargemode)
@@ -95,9 +98,11 @@
var/actual_load = draw_power(target_load) // add the load to the terminal side network
charge += actual_load * SMESRATE // increase the charge
if (actual_load >= target_load) // did the powernet have enough power available for us?
if (actual_load >= target_load) // Did we charge at full rate?
charging = 2
else if (actual_load) // If not, did we charge at least partially?
charging = 1
else
else // Or not at all?
charging = 0
if(online) // if outputting
@@ -222,6 +227,7 @@
"<span class='notice'>You added cables to the [src].</span>")
terminal.connect_to_network()
stat = 0
return 0
else if(istype(W, /obj/item/weapon/wirecutters) && terminal && !building_terminal)
building_terminal = 1
@@ -245,6 +251,7 @@
"<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
del(terminal)
building_terminal = 0
return 0
return 1
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)

View File

@@ -113,6 +113,7 @@
h_user << "Medium electrical sparks as you touch the [src], severely burning your hand!"
h_user.adjustFireLoss(rand(10,25))
h_user.Paralyse(5)
spawn(0)
empulse(src.loc, 2, 4)
charge = 0
@@ -129,6 +130,7 @@
h_user << "Strong electrical arc sparks between you and [src], knocking you out for a while!"
h_user.adjustFireLoss(rand(35,75))
h_user.Paralyse(12)
spawn(0)
empulse(src.loc, 8, 16)
charge = 0
apcs_overload(1, 10)
@@ -143,6 +145,7 @@
// Remember, we have few gigajoules of electricity here.. Turn them into crispy toast.
h_user.adjustFireLoss(rand(150,195))
h_user.Paralyse(25)
spawn(0)
empulse(src.loc, 32, 64)
charge = 0
apcs_overload(5, 25)

View File

@@ -33,3 +33,7 @@
invisibility = 0
icon_state = "term"
// Needed so terminals are not removed from machines list.
// Powernet rebuilds need this to work properly.
/obj/machinery/power/terminal/process()
return 1

View File

@@ -160,8 +160,7 @@
idle_power_usage = 0
/obj/machinery/shieldgen/Del()
for(var/obj/machinery/shield/shield_tile in deployed_shields)
del(shield_tile)
collapse_shields()
..()
@@ -184,8 +183,7 @@
src.active = 0
update_icon()
for(var/obj/machinery/shield/shield_tile in deployed_shields)
del(shield_tile)
collapse_shields()
update_use_power(0)
@@ -197,8 +195,21 @@
deployed_shields += S
use_power(S.shield_generate_power)
/obj/machinery/shieldgen/proc/collapse_shields()
for(var/obj/machinery/shield/shield_tile in deployed_shields)
del(shield_tile)
/obj/machinery/shieldgen/power_change()
..()
if(!active) return
if (stat & NOPOWER)
collapse_shields()
else
create_shields()
update_icon()
/obj/machinery/shieldgen/process()
if (!active)
if (!active || (stat & NOPOWER))
return
if(malfunction)
@@ -224,6 +235,8 @@
if(health <= 30)
src.malfunction = 1
if(health <= 0)
spawn(0)
explosion(get_turf(src.loc), 0, 0, 1, 0, 0, 0)
del(src)
update_icon()
return
@@ -340,7 +353,7 @@
/obj/machinery/shieldgen/update_icon()
if(active)
if(active && !(stat & NOPOWER))
src.icon_state = malfunction ? "shieldonbr":"shieldon"
else
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"

BIN
html/images/ntlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -18,10 +18,12 @@
<div class="itemContent">
{{:helper.link('Auto', 'refresh', {'cmode' : 1}, data.chargeMode ? 'selected' : null)}}{{:helper.link('Off', 'close', {'cmode' : 1}, data.chargeMode ? null : 'selected')}}
&nbsp;
{{if data.charging}}
{{if data.charging == 2}}
[<span class='good'>Charging</span>]
{{else data.charging == 1}}
[<span class='average'>Partially Charging</span>]
{{else}}
[<span class='average'>Not Charging</span>]
[<span class='bad'>Not Charging</span>]
{{/if}}
</div>
</div>
@@ -36,7 +38,7 @@
{{:helper.link('MIN', null, {'input' : 'min'}, (data.chargeLevel > 0) ? null : 'disabled')}}
{{:helper.link('SET', null, {'input' : 'set'}, null)}}
{{:helper.link('MAX', null, {'input' : 'max'}, (data.chargeLevel < data.chargeMax) ? null : 'disabled')}}
<div style="float: left; width: 80px; text-align: center;">&nbsp;{{:data.chargeLevel}} W&nbsp;</div>
<div style="float: left; width: 100px; text-align: center;">&nbsp;{{:data.chargeLevel}} W&nbsp;</div>
</div>
</div>
</div>
@@ -61,7 +63,7 @@
{{:helper.link('MIN', null, {'output' : 'min'}, (data.outputLevel > 0) ? null : 'disabled')}}
{{:helper.link('SET', null, {'output' : 'set'}, null)}}
{{:helper.link('MAX', null, {'output' : 'max'}, (data.outputLevel < data.outputMax) ? null : 'disabled')}}
<div style="float: left; width: 80px; text-align: center;">&nbsp;{{:data.outputLevel}} W&nbsp;</div>
<div style="float: left; width: 100px; text-align: center;">&nbsp;{{:data.outputLevel}} W&nbsp;</div>
</div>
</div>
</div>