Merge remote-tracking branch 'upstream/master' into GAMEMODE_CODE_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Conflicts:
	code/game/gamemodes/newobjective.dm
	code/game/gamemodes/objective.dm
This commit is contained in:
Tigercat2000
2016-08-10 14:16:42 -07:00
175 changed files with 970 additions and 777 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
switch(name) //some of these are probably obsolete
if("shuttle")
shuttle_z = z
log_debug("Obsolete landmark '[name]' at ([x],[y],[z])")
qdel(src)
if("airtunnel_stop")
+7 -6
View File
@@ -8,21 +8,21 @@
var/failchance = 5
var/obj/item/target = null
var/creator = null
anchored = 1.0
anchored = 1
var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
var/can_multitool_to_remove = 0
/obj/effect/portal/Bumped(mob/M as mob|obj)
src.teleport(M)
teleport(M)
/obj/effect/portal/New(loc, turf/target, creator)
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
portals += src
src.loc = loc
src.target = target
src.creator = creator
spawn(300)
qdel(src)
return
if(lifespan > 0)
spawn(lifespan)
qdel(src)
/obj/effect/portal/Destroy()
portals -= src
@@ -33,6 +33,7 @@
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
P.portal_destroyed(src)
creator = null
target = null
return ..()
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
@@ -61,7 +61,6 @@
return null
var/turf/T = get_turf(user.loc)
// TODO: Tie into space manager
if(T.z != current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
@@ -226,7 +225,6 @@
to_chat(usr, "<span class='danger'>Something's wrong with that camera. You can't get a feed.</span>")
return
var/turf/T = get_turf(loc)
// TODO: Tie into space manager
if(!T || C.z != T.z)
to_chat(usr, "<span class='danger'>You can't get a signal.</span>")
return
@@ -124,7 +124,7 @@
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
// TODO: Tie into space manager
// TODO: Integrate radio with the space manager
if(isnull(position) || !(position.z in level))
return -1
if(!src.listening)
+25 -13
View File
@@ -91,13 +91,13 @@ RCD
data["max_matter"] = max_matter
data["one_access"] = one_access
data["locked"] = locked
if(menu == 2)
var/list/door_types_list = list()
for(var/type in allowed_door_types)
door_types_list[++door_types_list.len] = list("name" = allowed_door_types[type], "type" = type)
data["allowed_door_types"] = door_types_list
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -110,14 +110,14 @@ RCD
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
if(..())
return 1
if(prob(20))
spark_system.start()
if(href_list["mode"])
mode = text2num(href_list["mode"])
. = 1
if(href_list["door_type"])
var/new_door_type = text2path(href_list["door_type"])
if(!(new_door_type in allowed_door_types))
@@ -125,11 +125,11 @@ RCD
return
door_type = new_door_type
. = 1
if(href_list["menu"])
menu = text2num(href_list["menu"])
. = 1
if(href_list["login"])
if(istype(usr,/mob/living/silicon))
locked = 0
@@ -142,15 +142,15 @@ RCD
if(istype(ID) && ID && check_access(ID))
locked = 0
. = 1
if(href_list["logout"])
locked = 1
. = 1
if(href_list["toggle_one_access"] && !locked)
one_access = !one_access
. = 1
if(href_list["toggle_access"] && !locked)
var/href_access = text2num(href_list["toggle_access"])
if(href_access in door_accesses)
@@ -251,10 +251,10 @@ RCD
qdel(A)
return 1
return 0
if(istype(A, /obj/structure/window)) // You mean the grille of course, do you?
A = locate(/obj/structure/grille) in A.loc
if(istype(A, /obj/structure/grille))
if(!checkResource(2, user))
return 0
@@ -326,7 +326,7 @@ RCD
else
to_chat(user, "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin.")
return 0
nanomanager.update_uis(src)
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
@@ -354,6 +354,18 @@ RCD
desc = "A device used to rapidly build and deconstruct walls and floors."
canRwall = 1
/obj/item/weapon/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(src, "detonate_pulse_explode", 50)
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/weapon/rcd/combat
name = "combat RCD"
max_matter = 500
@@ -64,8 +64,7 @@
//Play sound through the station intercomms, so everyone knows the doom you have wrought.
for(var/O in global_intercoms)
var/obj/item/device/radio/intercom/I = O
// TODO: Tie into space manager
if(I.z != ZLEVEL_STATION) //Only broadcast to the station intercoms
if(!is_station_level(I.z)) //Only broadcast to the station intercoms
continue
if(!I.on) //Only broadcast to active intercoms (powered, switched on)
continue
@@ -48,8 +48,7 @@ Frequency:
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
// TODO: Tie into space manager
if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're in the admin zone
to_chat(usr, "<span class='warning'>\The [src] is malfunctioning.</span>")
return 1
@@ -62,7 +61,6 @@ Frequency:
for(var/obj/item/device/radio/beacon/W in beacons)
if(W.frequency == frequency && !W.syndicate)
// TODO: Tie into space manager
if(W && W.z == z)
var/turf/TB = get_turf(W)
temp += "[W.code]: [TB.x], [TB.y], [TB.z]<BR>"
@@ -109,8 +107,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
// TODO: Tie into space manager
if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=ZLEVEL_EMPTY)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
@@ -365,6 +365,7 @@
if(!L.stat && prob(50))
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
M.faction = user.faction.Copy()
M.attack_sound = hitsound
M.Copy_Parent(user, 100, user.health/2.5, 12, 30)
M.GiveTarget(L)
@@ -192,8 +192,7 @@
return
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
// TODO: Tie into space manager
if(!(src.z in config.contact_levels))
if(!is_level_reachable(src.z))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
@@ -84,8 +84,7 @@
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
// TODO: Tie into space manager
if(!(src.z in config.player_levels))
if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)