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

Conflicts:
	code/game/gamemodes/objective.dm
This commit is contained in:
Tigercat2000
2016-08-08 06:19:59 -07:00
156 changed files with 1322 additions and 3399 deletions
-2
View File
@@ -152,8 +152,6 @@ var/list/admin_verbs_debug = list(
/client/proc/toggledebuglogs,
/client/proc/qdel_toggle,
/client/proc/gc_dump_hdl,
/client/proc/gc_toggle_profiling,
/client/proc/gc_show_del_report,
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/client/proc/test_movable_UI,
+44 -4
View File
@@ -8,7 +8,8 @@
#define FILL_BUILDMODE 8
#define LINK_BUILDMODE 9
#define BOOM_BUILDMODE 10
#define NUM_BUILDMODES 10
#define SAVE_BUILDMODE 11
#define NUM_BUILDMODES 11
/obj/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
@@ -81,8 +82,11 @@
/obj/effect/buildmode_reticule/New(var/turf/t, var/client/c)
loc = t
I = image('icons/mob/blob.dmi', t, "marker",19.0,2) // Sprite reuse wooo
cl = c
cl.images += I
if(c)
cl = c
cl.images += I
else
log_debug("Buildmode reticule created without a client!")
/obj/effect/buildmode_reticule/proc/deselect()
qdel(src)
@@ -174,6 +178,8 @@
var/light = -1
var/flash = -1
var/flames = -1
// Saving mode
var/use_json = TRUE
/datum/click_intercept/buildmode/New(client/c)
..()
@@ -261,6 +267,13 @@
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(SAVE_BUILDMODE)
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
switch(mode)
@@ -345,6 +358,9 @@
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) flames = -1
if(SAVE_BUILDMODE)
use_json = (alert("Would you like to use json (Default is \"Yes\")?",,"Yes","No") == "Yes")
/datum/click_intercept/buildmode/proc/change_dir()
switch(build_dir)
if(NORTH)
@@ -613,7 +629,7 @@
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
L2.color = L.color
link_lines += L2
for(var/obj/machinery/door/poddoor/P in world)
for(var/obj/machinery/door/poddoor/P in airlocks)
if(P.id_tag == M.id)
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
@@ -625,3 +641,27 @@
link_lines += L2
if(BOOM_BUILDMODE)
explosion(object, devastation, heavy, light, flash, null, null,flames)
if(SAVE_BUILDMODE)
if(!cornerA)
cornerA = select_tile(get_turf(object))
return
if(!cornerB)
cornerB = select_tile(get_turf(object))
if(left_click)
if(cornerA && cornerB)
var/turf/A = get_turf(cornerA)
var/turf/B = get_turf(cornerB)
deselect_region() // So we don't read our own reticules
var/map_name = input(holder, "Please select a name for your map", "Buildmode", "")
if(map_name == "")
return
var/map_flags = 0
if(use_json)
map_flags = 32 // Magic number defined in `writer.dm` that I can't use directly
// because #defines are for some reason our coding standard
var/our_map = maploader.save_map(A,B,map_name,map_flags)
holder << ftp(our_map) // send the map they've made! Or are stealing, whatever
to_chat(holder, "Map saving complete! [our_map]")
return
deselect_region()
+5 -1
View File
@@ -24,6 +24,10 @@ var/list/admin_datums = list()
rights = initial_rights
admin_datums[ckey] = src
/datum/admins/Destroy()
..()
return QDEL_HINT_HARDDEL_NOW
/datum/admins/proc/associate(client/C)
if(istype(C))
owner = C
@@ -85,7 +89,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
admin_datums -= ckey
if(holder)
holder.disassociate()
del(holder)
qdel(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
+2 -8
View File
@@ -38,13 +38,7 @@
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<BR>
<B>Shuttle options</b><br>
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=forcelaunchshuttle'>Force launch a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=jumpshuttle'>Jump a shuttle</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
<BR></center>
</center>
"}
else if(check_rights(R_SERVER,0)) //only add this if admin secrets are unavailiable; otherwise, it's added inline
@@ -73,7 +67,7 @@
<center>
<h2><B>IC Events</B></h2>
<b>Teams</b><br>
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=striketeam'>Send in the Deathsquad</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=striketeam_syndicate'>Send in a syndicate strike team</A>&nbsp;&nbsp;
<A href='?src=\ref[src];secretsfun=honksquad'>Send in a HONKsquad</A><BR>
<b>Change Security Level</b><BR>
+4 -3
View File
@@ -1252,6 +1252,7 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
var/mob/new_player/NP = new()
non_respawnable_keys -= M.ckey
NP.ckey = M.ckey
qdel(M)
@@ -2564,7 +2565,7 @@
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in world)
for(var/obj/machinery/door/airlock/W in airlocks)
// TODO: Tie into space manager
if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
@@ -2758,12 +2759,12 @@
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
if("maint_access_brig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
+15 -9
View File
@@ -1371,19 +1371,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return
for(var/obj/machinery/power/emitter/E in world)
for(var/obj/machinery/power/emitter/E in machines)
if(E.anchored)
E.active = 1
for(var/obj/machinery/field/generator/F in world)
if(F.anchored)
F.Varedit_start = 1
for(var/obj/machinery/field/generator/F in machines)
if(F.active == 0)
F.active = 1
F.state = 2
F.power = 250
F.anchored = 1
F.warming_up = 3
F.start_fields()
F.update_icon()
spawn(30)
for(var/obj/machinery/the_singularitygen/G in world)
for(var/obj/machinery/the_singularitygen/G in machines)
if(G.anchored)
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
spawn(0)
qdel(G)
// qdel(G)
S.energy = 1750
S.current_size = 7
S.icon = 'icons/effects/224x224.dmi'
@@ -1397,7 +1403,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
//S.dissipate_track = 0
//S.dissipate_strength = 10
for(var/obj/machinery/power/rad_collector/Rad in world)
for(var/obj/machinery/power/rad_collector/Rad in machines)
if(Rad.anchored)
if(!Rad.P)
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
@@ -1409,7 +1415,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!Rad.active)
Rad.toggle_power()
for(var/obj/machinery/power/smes/SMES in world)
for(var/obj/machinery/power/smes/SMES in machines)
if(SMES.anchored)
SMES.input_attempt = 1
+6 -5
View File
@@ -21,7 +21,7 @@ var/global/list/frozen_mob_list = list()
///mob freeze procs
/mob/living/var/frozen = 0 //used for preventing attacks on admin-frozen mobs
/mob/living/var/frozen = null //used for preventing attacks on admin-frozen mobs
/mob/living/var/admin_prev_sleeping = 0 //used for keeping track of previous sleeping value with admin freeze
/mob/living/proc/admin_Freeze(var/client/admin)
@@ -34,7 +34,7 @@ var/global/list/frozen_mob_list = list()
src.overlays += AO
anchored = 1
frozen = 1
frozen = AO
admin_prev_sleeping = sleeping
sleeping += 20000
if(!(src in frozen_mob_list))
@@ -46,15 +46,16 @@ var/global/list/frozen_mob_list = list()
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
log_admin("[key_name(admin)] unfroze [key_name(src)]")
update_icons()
anchored = 0
frozen = 0
overlays -= frozen
frozen = null
sleeping = admin_prev_sleeping
admin_prev_sleeping = null
if(src in frozen_mob_list)
frozen_mob_list -= src
update_icons()
/mob/living/carbon/slime/admin_Freeze(admin)
..(admin)
+4 -28
View File
@@ -146,40 +146,16 @@ client/proc/one_click_antag()
return 0
/datum/admins/proc/makeWizard()
var/list/mob/candidates = list()
var/mob/theghost = null
var/time_passed = world.time
for(var/mob/G in respawnable_list)
if(istype(G) && G.client && (ROLE_WIZARD in G.client.prefs.be_special))
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
if(player_old_enough_antag(G.client,ROLE_WIZARD))
spawn(0)
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
if("Yes")
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
return
candidates += G
if("No")
return
else
return
sleep(300)
var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard")
if(candidates.len)
candidates = shuffle(candidates)
for(var/mob/dead/observer/i in candidates)
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
var/mob/dead/observer/selected = pick(candidates)
candidates -= selected
theghost = i
break
if(theghost)
var/mob/living/carbon/human/new_character=makeBody(theghost)
var/mob/living/carbon/human/new_character = makeBody(selected)
new_character.mind.make_Wizard()
return 1
return 0