Conflicts:
	.travis.yml
	code/controllers/configuration.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/jobs/job/medical.dm
	code/game/jobs/job/security.dm
	code/game/machinery/Sleeper.dm
	code/game/machinery/computer/communications.dm
	code/game/machinery/cryopod.dm
	code/game/objects/items/weapons/RCD.dm
	code/game/objects/items/weapons/storage/boxes.dm
	code/game/turfs/simulated/floor.dm
	code/game/turfs/simulated/floor_types.dm
	code/global.dm
	code/modules/materials/materials.dm
	code/modules/mob/living/silicon/ai/ai.dm
	code/modules/projectiles/guns/projectile/automatic.dm
	polaris.dme
This commit is contained in:
Neerti
2015-08-23 01:30:46 -04:00
792 changed files with 19715 additions and 17049 deletions

View File

@@ -63,6 +63,7 @@
var/area/area
var/areastring = null
var/obj/item/weapon/cell/cell
var/chargelevel = 0.0005 // Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
var/start_charge = 90 // initial cell charge %
var/cell_type = /obj/item/weapon/cell/apc
var/opened = 0 //0=closed, 1=opened, 2=cover removed
@@ -505,7 +506,8 @@
else
user << "<span class='warning'>Access denied.</span>"
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
if (src.loc:intact)
var/turf/T = loc
if(istype(T) && !T.is_plating())
user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
return
var/obj/item/stack/cable_coil/C = W
@@ -517,7 +519,6 @@
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
var/turf/T = get_turf(src)
var/obj/structure/cable/N = T.get_cable_node()
if (prob(50) && electrocute_mob(usr, N, N))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -532,7 +533,8 @@
make_terminal()
terminal.connect_to_network()
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
if (src.loc:intact)
var/turf/T = loc
if(istype(T) && !T.is_plating())
user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
return
user.visible_message("<span class='warning'>[user.name] dismantles the power terminal from [src].</span>", \
@@ -714,7 +716,7 @@
if(!user)
return
if(wiresexposed /*&& (!istype(user, /mob/living/silicon))*/) //Commented out the typecheck to allow engiborgs to repair damaged apcs.
if(wiresexposed && !istype(user, /mob/living/silicon/ai))
wires.Interact(user)
return ui_interact(user)
@@ -850,7 +852,7 @@
return 0
return 1
/obj/machinery/power/apc/Topic(href, href_list, var/nowindow = 0)
/obj/machinery/power/apc/Topic(href, href_list)
if(..())
return 1
@@ -1021,7 +1023,7 @@
if(src.attempt_charging())
if(excess > 0) // check to make sure we have enough to charge
// Max charge is capped to % per second constant
var/ch = min(excess*CELLRATE, cell.maxcharge*CHARGELEVEL)
var/ch = min(excess*CELLRATE, cell.maxcharge*chargelevel)
ch = draw_power(ch/CELLRATE) // Removes the power we're taking from the grid
cell.give(ch*CELLRATE) // actually recharge the cell
@@ -1038,7 +1040,7 @@
if(chargemode)
if(!charging)
if(excess > cell.maxcharge*CHARGELEVEL)
if(excess > cell.maxcharge*chargelevel)
chargecount++
else
chargecount = 0

View File

@@ -50,7 +50,7 @@ By design, d1 is the smallest direction and d2 is the highest
color = COLOR_YELLOW
/obj/structure/cable/green
color = COLOR_GREEN
color = COLOR_LIME
/obj/structure/cable/blue
color = COLOR_BLUE
@@ -70,7 +70,6 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/structure/cable/New()
..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-")
@@ -80,8 +79,7 @@ By design, d1 is the smallest direction and d2 is the highest
d2 = text2num( copytext( icon_state, dash+1 ) )
var/turf/T = src.loc // hide if turf is not intact
if(level==1) hide(T.intact)
if(level==1) hide(!T.is_plating())
cable_list += src //add it to the global cable list
@@ -97,11 +95,13 @@ By design, d1 is the smallest direction and d2 is the highest
//If underfloor, hide the cable
/obj/structure/cable/hide(var/i)
if(level == 1 && istype(loc, /turf))
if(istype(loc, /turf))
invisibility = i ? 101 : 0
updateicon()
/obj/structure/cable/hides_under_flooring()
return 1
/obj/structure/cable/proc/updateicon()
icon_state = "[d1]-[d2]"
alpha = invisibility ? 127 : 255
@@ -122,7 +122,7 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/structure/cable/attackby(obj/item/W, mob/user)
var/turf/T = src.loc
if(T.intact)
if(!T.is_plating())
return
if(istype(W, /obj/item/weapon/wirecutters))
@@ -538,7 +538,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
/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)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
if(amount == 1)
icon_state = "coil1"
name = "cable piece"
@@ -597,7 +597,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
if("Yellow")
color = COLOR_YELLOW
if("Green")
color = COLOR_GREEN
color = COLOR_LIME
if("Pink")
color = COLOR_PINK
if("Blue")
@@ -619,66 +619,23 @@ obj/structure/cable/proc/cableColor(var/colorC)
/obj/item/stack/cable_coil/cyborg/can_merge()
return 1
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.get_amount() > 1)
src.use(1)
new/obj/item/stack/cable_coil(user.loc, 1,color)
user << "You cut a piece off the cable coil."
src.update_icon()
/obj/item/stack/cable_coil/transfer_to(obj/item/stack/cable_coil/S)
if(!istype(S))
return
if(!can_merge(S))
return
else if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(!can_merge(C))
user << "These coils do not go together."
return
..()
if(C.get_amount() >= get_max_amount())
user << "The coil is too long, you cannot add any more cable to it."
return
if( (C.get_amount() + src.get_amount() <= get_max_amount()) )
user << "You join the cable coils together."
C.give(src.get_amount()) // give it cable
src.use(src.get_amount()) // make sure this one cleans up right
return
else
var/amt = get_max_amount() - C.get_amount()
user << "You transfer [amt] length\s of cable from one coil to the other."
C.give(amt)
src.use(amt)
return
//remove cables from the stack
/* This is probably reduntant
/obj/item/stack/cable_coil/use(var/used)
if(src.amount < used)
return 0
else if (src.amount == used)
if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.unEquip(src)
qdel(src)
return 1
else
amount -= used
update_icon()
return 1
*/
/obj/item/stack/cable_coil/use(var/used)
/obj/item/stack/cable_coil/use()
. = ..()
update_icon()
return
//add cables to the stack
/obj/item/stack/cable_coil/proc/give(var/extra)
if(amount + extra > MAXCOIL)
amount = MAXCOIL
else
amount += extra
/obj/item/stack/cable_coil/add()
. = ..()
update_icon()
return
///////////////////////////////////////////////
// Cable laying procedures
@@ -697,7 +654,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
user << "You can't lay cable at a place that far away."
return
if(F.intact) // Ff floor is intact, complain
if(!F.is_plating()) // Ff floor is intact, complain
user << "You can't lay cable there unless the floor tiles are removed."
return
@@ -792,7 +749,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
var/turf/T = C.loc
if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable
if(!isturf(T) || !T.is_plating()) // sanity checks, also stop use interacting with T-scanner revealed cable
return
if(get_dist(C, user) > 1) // make sure it's close enough
@@ -808,7 +765,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
// one end of the clicked cable is pointing towards us
if(C.d1 == dirn || C.d2 == dirn)
if(U.intact) // can't place a cable if the floor is complete
if(!U.is_plating()) // can't place a cable if the floor is complete
user << "You can't lay cable there unless the floor tiles are removed."
return
else
@@ -921,7 +878,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
color = COLOR_BLUE
/obj/item/stack/cable_coil/green
color = COLOR_GREEN
color = COLOR_LIME
/obj/item/stack/cable_coil/pink
color = COLOR_PINK
@@ -936,5 +893,5 @@ obj/structure/cable/proc/cableColor(var/colorC)
color = COLOR_WHITE
/obj/item/stack/cable_coil/random/New()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()

View File

@@ -12,7 +12,7 @@
/obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user)
var/turf/T = src.loc
if(T.intact)
if(!T.is_plating())
return
if(istype(W, /obj/item/weapon/wirecutters))

View File

@@ -1,37 +0,0 @@
/turf/simulated/floor/engine/attack_hand(var/mob/user as mob)
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
var/atom/movable/t = M.pulling
M.stop_pulling()
step(user.pulling, get_dir(user.pulling.loc, src))
M.start_pulling(t)
else
step(user.pulling, get_dir(user.pulling.loc, src))
return
/turf/simulated/floor/engine/ex_act(severity)
switch(severity)
if(1.0)
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
if(2.0)
if (prob(50))
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
else
return
/turf/simulated/floor/engine/blob_act()
if (prob(25))
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
return

View File

@@ -126,7 +126,7 @@
var/turf/T = user.loc
if(T.intact || !istype(T, /turf/simulated/floor))
if(!T.is_plating() || !istype(T, /turf/simulated/floor))
return
if(get_dist(src, user) > 1)

View File

@@ -7,7 +7,8 @@
name = "Power Monitoring Console"
desc = "Computer designed to remotely monitor power levels around the station"
icon = 'icons/obj/computer.dmi'
icon_state = "power"
icon_keyboard = "power_key"
icon_screen = "power"
light_color = "#ffcc33"
//computer stuff

View File

@@ -34,7 +34,7 @@
src << "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>"
apply_effect(current_size * 3, IRRADIATE)
if(shoes)
if(shoes.flags & NOSLIP) return 0
if(shoes.item_flags & NOSLIP) return 0
..()
/obj/singularity_act()
@@ -101,7 +101,7 @@
return 1000
/turf/singularity_act(S, current_size)
if(intact)
if(!is_plating())
for(var/obj/O in contents)
if(O.level != 1)
continue

View File

@@ -10,6 +10,7 @@
unacidable = 1
use_power = 0
light_range = 4
flags = PROXMOVE
var/obj/machinery/field_generator/FG1 = null
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
@@ -62,7 +63,7 @@
user.throw_at(target, 200, 4)
sleep(20)
hasShocked = 0
return

View File

@@ -204,7 +204,7 @@
user << "<span class='warning'>You can't build a terminal on space.</span>"
return 1
else if (istype(tempLoc))
if(tempLoc.intact)
if(!tempLoc.is_plating())
user << "<span class='warning'>You must remove the floor plating first.</span>"
return 1
user << "<span class='notice'>You start adding cable to the [src].</span>"
@@ -272,7 +272,7 @@
building_terminal = 1
var/turf/tempTDir = terminal.loc
if (istype(tempTDir))
if(tempTDir.intact)
if(!tempTDir.is_plating())
user << "<span class='warning'>You must remove the floor plating first.</span>"
else
user << "<span class='notice'>You begin to cut the cables...</span>"

View File

@@ -251,7 +251,7 @@ var/list/solars_list = list()
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
return 1
if(istype(W, /obj/item/stack/material/glass))
if(istype(W, /obj/item/stack/material) && (W.get_material_name() == "glass" || W.get_material_name() == "rglass"))
var/obj/item/stack/material/S = W
if(S.use(2))
glass_type = W.type

View File

@@ -17,7 +17,7 @@
/obj/machinery/power/terminal/New()
..()
var/turf/T = src.loc
if(level==1) hide(T.intact)
if(level==1) hide(!T.is_plating())
return
/obj/machinery/power/terminal/Destroy()
@@ -27,12 +27,11 @@
return ..()
/obj/machinery/power/terminal/hide(var/i)
if(i)
invisibility = 101
icon_state = "term-f"
else
invisibility = 0
icon_state = "term"
invisibility = i ? 101 : 0
icon_state = i ? "term-f" : "term"
/obj/structure/power/terminal/hides_under_flooring()
return 1
// Needed so terminals are not removed from machines list.
// Powernet rebuilds need this to work properly.

View File

@@ -29,7 +29,8 @@
name = "Gas turbine control computer"
desc = "A computer to remotely control a gas turbine"
icon = 'icons/obj/computer.dmi'
icon_state = "turbinecomp"
icon_keyboard = "tech_key"
icon_screen = "turbinecomp"
circuit = /obj/item/weapon/circuitboard/turbine_control
anchored = 1
density = 1