Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into sync_to_bay_10/10/2015

Conflicts:
	.travis.yml
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/turfs/simulated.dm
	code/global.dm
	icons/misc/fullscreen.dmi
	polaris.dme
This commit is contained in:
Neerti
2015-10-10 23:17:26 -04:00
415 changed files with 10938 additions and 11366 deletions
-13
View File
@@ -101,19 +101,6 @@
return 0
/obj/machinery/power/am_control_unit/blob_act()
stability -= 20
if(prob(100-stability))//Might infect the rest of the machine
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.blob_act()
spawn(0)
//Likely explode
qdel(src)
return
check_stability()
return
/obj/machinery/power/am_control_unit/ex_act(severity)
switch(severity)
if(1.0)
@@ -90,20 +90,6 @@ proc/cardinalrange(var/center)
return 0
/obj/machinery/am_shielding/blob_act()
stability -= 20
if(prob(100-stability))
if(prob(10))//Might create a node
new /obj/effect/blob/node(src.loc,150)
else
new /obj/effect/blob(src.loc,60)
spawn(0)
qdel(src)
return
check_stability()
return
/obj/machinery/am_shielding/ex_act(severity)
switch(severity)
if(1.0)
+50 -43
View File
@@ -1,12 +1,12 @@
//update_state
#define UPSTATE_CELL_IN 1
#define UPSTATE_OPENED1 2
#define UPSTATE_OPENED2 4
#define UPSTATE_MAINT 8
#define UPSTATE_BROKE 16
#define UPSTATE_BLUESCREEN 32
#define UPSTATE_WIREEXP 64
#define UPSTATE_ALLGOOD 128
#define UPDATE_CELL_IN 1
#define UPDATE_OPENED1 2
#define UPDATE_OPENED2 4
#define UPDATE_MAINT 8
#define UPDATE_BROKE 16
#define UPDATE_BLUESCREEN 32
#define UPDATE_WIREEXP 64
#define UPDATE_ALLGOOD 128
//update_overlay
#define APC_UPOVERLAY_CHARGEING0 1
@@ -170,21 +170,19 @@
area.power_equip = 0
area.power_environ = 0
area.power_change()
if(wires)
qdel(wires)
wires = null
qdel(wires)
wires = null
qdel(terminal)
terminal = null
if(cell)
cell.loc = loc
cell.forceMove(loc)
cell = null
if(terminal)
qdel(terminal)
terminal = null
// Malf AI, removes the APC from AI's hacked APCs list.
if((hacker) && (hacker.hacked_apcs) && (src in hacker.hacked_apcs))
hacker.hacked_apcs -= src
..()
return ..()
/obj/machinery/power/apc/proc/make_terminal()
// create a terminal object at the same position as original turf loc
@@ -288,25 +286,25 @@
return
if(update & 1) // Updating the icon state
if(update_state & UPSTATE_ALLGOOD)
if(update_state & UPDATE_ALLGOOD)
icon_state = "apc0"
else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
else if(update_state & (UPDATE_OPENED1|UPDATE_OPENED2))
var/basestate = "apc[ cell ? "2" : "1" ]"
if(update_state & UPSTATE_OPENED1)
if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE))
if(update_state & UPDATE_OPENED1)
if(update_state & (UPDATE_MAINT|UPDATE_BROKE))
icon_state = "apcmaint" //disabled APC cannot hold cell
else
icon_state = basestate
else if(update_state & UPSTATE_OPENED2)
else if(update_state & UPDATE_OPENED2)
icon_state = "[basestate]-nocover"
else if(update_state & UPSTATE_BROKE)
else if(update_state & UPDATE_BROKE)
icon_state = "apc-b"
else if(update_state & UPSTATE_BLUESCREEN)
else if(update_state & UPDATE_BLUESCREEN)
icon_state = "apcemag"
else if(update_state & UPSTATE_WIREEXP)
else if(update_state & UPDATE_WIREEXP)
icon_state = "apcewires"
if(!(update_state & UPSTATE_ALLGOOD))
if(!(update_state & UPDATE_ALLGOOD))
if(overlays.len)
overlays = 0
return
@@ -314,7 +312,7 @@
if(update & 2)
if(overlays.len)
overlays.len = 0
if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
if(!(stat & (BROKEN|MAINT)) && update_state & UPDATE_ALLGOOD)
overlays += status_overlays_lock[locked+1]
overlays += status_overlays_charging[charging+1]
if(operating)
@@ -322,6 +320,21 @@
overlays += status_overlays_lighting[lighting+1]
overlays += status_overlays_environ[environ+1]
if(update & 3)
if(update_state & UPDATE_BLUESCREEN)
set_light(l_range = 2, l_power = 0.5, l_color = "#0000FF")
else if(!(stat & (BROKEN|MAINT)) && update_state & UPDATE_ALLGOOD)
var/color
switch(charging)
if(0)
color = "#F86060"
if(1)
color = "#A8B0F8"
if(2)
color = "#82FF4C"
set_light(l_range = 2, l_power = 0.5, l_color = color)
else
set_light(0)
/obj/machinery/power/apc/proc/check_updates()
@@ -331,27 +344,27 @@
update_overlay = 0
if(cell)
update_state |= UPSTATE_CELL_IN
update_state |= UPDATE_CELL_IN
if(stat & BROKEN)
update_state |= UPSTATE_BROKE
update_state |= UPDATE_BROKE
if(stat & MAINT)
update_state |= UPSTATE_MAINT
update_state |= UPDATE_MAINT
if(opened)
if(opened==1)
update_state |= UPSTATE_OPENED1
update_state |= UPDATE_OPENED1
if(opened==2)
update_state |= UPSTATE_OPENED2
update_state |= UPDATE_OPENED2
else if(emagged || hacker)
update_state |= UPSTATE_BLUESCREEN
update_state |= UPDATE_BLUESCREEN
else if(wiresexposed)
update_state |= UPSTATE_WIREEXP
update_state |= UPDATE_WIREEXP
if(update_state <= 1)
update_state |= UPSTATE_ALLGOOD
update_state |= UPDATE_ALLGOOD
if(operating)
update_overlay |= APC_UPOVERLAY_OPERATING
if(update_state & UPSTATE_ALLGOOD)
if(update_state & UPDATE_ALLGOOD)
if(locked)
update_overlay |= APC_UPOVERLAY_LOCKED
@@ -453,7 +466,7 @@
return
user.drop_item()
W.loc = src
W.forceMove(src)
cell = W
user.visible_message(\
"<span class='warning'>[user.name] has inserted the power cell to [src.name]!</span>",\
@@ -1148,7 +1161,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
switch(severity)
if(1.0)
//set_broken() //now Del() do what we need
//set_broken() //now qdel() do what we need
if (cell)
cell.ex_act(1.0) // more lags woohoo
qdel(src)
@@ -1165,12 +1178,6 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
cell.ex_act(3.0)
return
/obj/machinery/power/apc/blob_act()
if (prob(75))
set_broken()
if (cell && prob(5))
cell.blob_act()
/obj/machinery/power/apc/disconnect_terminal()
if(terminal)
terminal.master = null
-4
View File
@@ -161,10 +161,6 @@
corrupt()
return
/obj/item/weapon/cell/blob_act()
if(prob(75))
explode()
/obj/item/weapon/cell/proc/get_electrocute_damage()
switch (charge)
/* if (9000 to INFINITY)
+2 -6
View File
@@ -394,8 +394,8 @@
// returns whether this light has power
// true if area has power and lightswitch is on
/obj/machinery/light/proc/has_power()
var/area/A = src.loc.loc
return A.lightswitch && (!A.requires_power || A.power_light)
var/area/A = get_area(src)
return A && A.lightswitch && (!A.requires_power || A.power_light)
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
if(flickering) return
@@ -548,10 +548,6 @@
//blob effect
/obj/machinery/light/blob_act()
if(prob(75))
broken()
// timed process
// use power
+3 -3
View File
@@ -127,7 +127,7 @@
/obj/machinery/power/port_gen/pacman/Destroy()
DropFuel()
..()
return ..()
/obj/machinery/power/port_gen/pacman/RefreshParts()
var/temp_rating = 0
@@ -245,11 +245,11 @@
sheets = 0
sheet_left = 0
..()
/obj/machinery/power/port_gen/pacman/emag_act(var/remaining_charges, var/mob/user)
if (active && prob(25))
explode() //if they're foolish enough to emag while it's running
if (!emagged)
emagged = 1
return 1
+7 -1
View File
@@ -19,8 +19,14 @@
..()
/datum/powernet/Destroy()
for(var/obj/structure/cable/C in cables)
cables -= C
C.powernet = null
for(var/obj/machinery/power/M in nodes)
nodes -= M
M.powernet = null
powernets -= src
..()
return ..()
//Returns the amount of excess power (before refunding to SMESs) from last tick.
//This is for machines that might adjust their power consumption using this data.
@@ -30,10 +30,6 @@
return 1
/obj/machinery/containment_field/blob_act()
return 0
/obj/machinery/containment_field/ex_act(severity)
return 0
@@ -159,13 +159,6 @@ field_generator power level display
/obj/machinery/field_generator/emp_act()
return 0
/obj/machinery/field_generator/blob_act()
if(active)
return 0
else
..()
/obj/machinery/field_generator/bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj, /obj/item/projectile/beam))
power += Proj.damage * EMITTER_DAMAGE_POWER_TRANSFER
@@ -157,12 +157,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
else
return
/obj/structure/particle_accelerator/blob_act()
if(prob(50))
qdel(src)
return
/obj/structure/particle_accelerator/update_icon()
switch(construction_state)
if(0,1)
@@ -339,12 +333,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return
/obj/machinery/particle_accelerator/blob_act()
if(prob(50))
qdel(src)
return
/obj/machinery/particle_accelerator/proc/update_state()
return 0
@@ -30,7 +30,9 @@
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
toggle_power()
..()
qdel(wires)
wires = null
return ..()
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
if(construction_state >= 3)
@@ -53,9 +53,6 @@
consume(user)
return 1
/obj/singularity/blob_act(severity)
return
/obj/singularity/ex_act(severity)
if(current_size == STAGE_SUPER)//IT'S UNSTOPPABLE
return
+1 -1
View File
@@ -366,7 +366,7 @@
output_level = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output_level) as num
output_level = max(0, min(output_level_max, output_level)) // clamp to range
investigate_log("input/output; [input_level>output_level?"<font color='green'>":"<font color='red'>"][input_level]/[output_level]</font> | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
investigate_log("input/output; <font color='[input_level>output_level?"green":"red"][input_level]/[output_level]</font> | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
return 1
+2 -2
View File
@@ -76,11 +76,11 @@
should_be_mapped = 1
/obj/machinery/power/smes/buildable/Destroy()
..()
qdel(wires)
wires = null
for(var/datum/nano_module/rcon/R in world)
R.FindDevices()
return ..()
// Proc: process()
// Parameters: None
-18
View File
@@ -80,12 +80,6 @@ var/list/solars_list = list()
..()
/obj/machinery/power/solar/blob_act()
src.health--
src.healthcheck()
return
/obj/machinery/power/solar/proc/healthcheck()
if (src.health <= 0)
if(!(stat & BROKEN))
@@ -172,12 +166,6 @@ var/list/solars_list = list()
return
/obj/machinery/power/solar/blob_act()
if(prob(75))
broken()
src.density = 0
/obj/machinery/power/solar/fake/New(var/turf/loc, var/obj/item/solar_assembly/S)
..(loc, S, 0)
@@ -539,12 +527,6 @@ var/list/solars_list = list()
broken()
return
/obj/machinery/power/solar_control/blob_act()
if (prob(75))
broken()
src.density = 0
// Used for mapping in solar array which automatically starts itself (telecomms, for example)
/obj/machinery/power/solar_control/autostart
track = 2 // Auto tracking mode
+1 -1
View File
@@ -278,7 +278,7 @@
\n<BR>
\n"}
else
dat += "\red<B>No compatible attached compressor found."
dat += "<span class='danger'>No compatible attached compressor found.</span>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")