Skip to content

Commit

Permalink
Reee mirror bot. Hard syncs some missed PR stuff + maps (#5951)
Browse files Browse the repository at this point in the history
* maps and tgui

* missed defines and helpsers

* controller things

* datums

* game folder stuff

* module things

* icons

* stragglers

* map sync and updating

wew lad
  • Loading branch information
Poojawa authored Mar 14, 2018
1 parent be23070 commit 6c7da49
Show file tree
Hide file tree
Showing 122 changed files with 12,583 additions and 12,298 deletions.
93 changes: 93 additions & 0 deletions SQL/admin_import_2018-02-03.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#Python 3+ Script for importing admins.txt and admin_ranks.txt made by Jordie0608
#
#Before starting ensure you have installed the mysqlclient package https://github.com/PyMySQL/mysqlclient-python
#It can be downloaded from command line with pip:
#pip install mysqlclient
#And that you have run the most recent commands listed in database_changelog.txt
#
#To view the parameters for this script, execute it with the argument --help
#All the positional arguments are required, remember to include prefixes in your table names if you use them
#An example of the command used to execute this script from powershell:
#python admin_import_2018-02-03.py "localhost" "root" "password" "feedback" "SS13_admin" "SS13_admin_ranks"
#
#This script performs no error-correction, improper configurations of admins.txt or admin_ranks.txt will cause either breaking exceptions or invalid table rows
#It's safe to run this script with your game server(s) active.


import MySQLdb
import argparse
import re
import sys

def parse_text_flags(text, previous):
flag_values = {"BUILDMODE":1, "BUILD":1, "ADMIN":2, "REJUVINATE":2, "REJUV":2, "BAN":4, "FUN":8, "SERVER":16, "DEBUG":32, "POSSESS":64, "PERMISSIONS":128, "RIGHTS":128, "STEALTH":256, "POLL":512, "VAREDIT":1024, "SOUNDS":2048, "SOUND":2048, "SPAWN":4096, "CREATE":4096, "AUTOLOGIN":8192, "AUTOADMIN":8192, "DBRANKS":16384}
flags_int = 8192
exclude_flags_int = 0
can_edit_flags_int = 0
flags = text.split(" ")
if flags:
for flag in flags:
sign = flag[:1]
if flag[1:] in ("@", "prev"):
if sign is "+":
flags_int = previous[0]
elif sign is "-":
exclude_flags_int = previous[1]
elif sign is "*":
can_edit_flags_int = previous[2]
continue
if flag[1:] in ("EVERYTHING", "HOST", "ALL"):
if sign is "+":
flags_int = 65535
elif sign is "-":
exclude_flags_int = 65535
elif sign is "*":
can_edit_flags_int = 65535
continue
if flag[1:] in flag_values:
if sign is "+":
flags_int += flag_values[flag[1:]]
elif sign is "-":
exclude_flags_int += flag_values[flag[1:]]
elif sign is "*":
can_edit_flags_int += flag_values[flag[1:]]
flags_int = max(min(65535, flags_int), 0)
exclude_flags_int = max(min(65535, exclude_flags_int), 0)
can_edit_flags_int = max(min(65535, can_edit_flags_int), 0)
return flags_int, exclude_flags_int, can_edit_flags_int

if sys.version_info[0] < 3:
raise Exception("Python must be at least version 3 for this script.")
parser = argparse.ArgumentParser()
parser.add_argument("address", help="MySQL server address (use localhost for the current computer)")
parser.add_argument("username", help="MySQL login username")
parser.add_argument("password", help="MySQL login username")
parser.add_argument("database", help="Database name")
parser.add_argument("admintable", help="Name of the current admin table (remember prefixes if you use them)")
parser.add_argument("rankstable", help="Name of the current admin ranks (remember prefixes)")
args = parser.parse_args()
db=MySQLdb.connect(host=args.address, user=args.username, passwd=args.password, db=args.database)
cursor=db.cursor()
ranks_table = args.rankstable
admin_table = args.admintable
with open("..\\config\\admin_ranks.txt") as rank_file:
previous = 0
for line in rank_file:
if line.strip():
if line.startswith("#"):
continue
matches = re.match("(.+)\\b\\s+=\\s*(.*)", line)
flags = parse_text_flags(matches.group(2), previous)
previous = flags
cursor.execute("INSERT INTO {0} (rank, flags, exclude_flags, can_edit_flags) VALUES ('{1}', {2}, {3}, {4})".format(ranks_table, matches.group(1), flags[0], flags[1], flags[2]))
with open("..\\config\\admins.txt") as admins_file:
previous = 0
for line in admins_file:
if line.strip():
if line.startswith("#"):
continue
matches = re.match("(.+)\\b\\s+=\\s+(.+)", line)
cursor.execute("INSERT INTO {0} (ckey, rank) VALUES ('{1}', '{2}')".format(admin_table, matches.group(1).lower(), matches.group(2)))
db.commit()
cursor.close()
print("Import complete.")
77 changes: 36 additions & 41 deletions _maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@
dir = 8
},
/area/ruin/unpowered/syndicate_lava_base/main)
"ah" = (
/obj/structure/table/wood,
/obj/machinery/chem_dispenser/drinks/beer{
dir = 1
},
/obj/structure/sign/barsign{
pixel_y = -32;
req_access = null;
req_access_txt = "0"
},
/turf/open/floor/wood,
/area/ruin/unpowered/syndicate_lava_base/bar)
"ai" = (
/obj/structure/table/wood,
/obj/machinery/chem_dispenser/drinks{
dir = 1
},
/turf/open/floor/wood,
/area/ruin/unpowered/syndicate_lava_base/bar)
"ap" = (
/obj/machinery/light/small{
dir = 1
Expand Down Expand Up @@ -547,7 +566,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/vault{
dir = 8
Expand Down Expand Up @@ -891,7 +910,7 @@
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/vault{
dir = 8
Expand Down Expand Up @@ -1268,8 +1287,7 @@
base_state = "left";
dir = 2;
icon_state = "left";
name = "Chemistry";
req_access_txt = "0"
name = "Chemistry"
},
/obj/machinery/door/window/southleft{
base_state = "left";
Expand Down Expand Up @@ -2176,8 +2194,7 @@
"hk" = (
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/mining/glass{
name = "Cargo Bay";
req_access_txt = "0"
name = "Cargo Bay"
},
/turf/open/floor/plasteel/floorgrime,
/area/ruin/unpowered/syndicate_lava_base/cargo)
Expand Down Expand Up @@ -2214,7 +2231,7 @@
"hp" = (
/obj/effect/decal/cleanable/dirt,
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/white/side{
dir = 9
Expand All @@ -2235,7 +2252,7 @@
/area/ruin/unpowered/syndicate_lava_base/virology)
"hr" = (
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/white/side{
dir = 5
Expand Down Expand Up @@ -2346,8 +2363,7 @@
"hC" = (
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/mining/glass{
name = "Cargo Bay";
req_access_txt = "0"
name = "Cargo Bay"
},
/turf/open/floor/plasteel,
/area/ruin/unpowered/syndicate_lava_base/cargo)
Expand All @@ -2362,7 +2378,7 @@
/area/ruin/unpowered/syndicate_lava_base/cargo)
"hE" = (
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/white/side{
dir = 10
Expand All @@ -2382,7 +2398,7 @@
"hG" = (
/obj/effect/decal/cleanable/dirt,
/mob/living/carbon/monkey{
faction = list("neutral","syndicate")
faction = list("neutral","Syndicate")
},
/turf/open/floor/plasteel/white/side{
dir = 6
Expand Down Expand Up @@ -2672,8 +2688,7 @@
/area/ruin/unpowered/syndicate_lava_base/main)
"il" = (
/obj/machinery/door/airlock{
name = "Cabin 2";
req_access_txt = "0"
name = "Cabin 2"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
Expand All @@ -2685,8 +2700,7 @@
/area/ruin/unpowered/syndicate_lava_base/dormitories)
"im" = (
/obj/machinery/door/airlock{
name = "Unisex Restrooms";
req_access_txt = "0"
name = "Unisex Restrooms"
},
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel/vault{
Expand All @@ -2695,8 +2709,7 @@
/area/ruin/unpowered/syndicate_lava_base/dormitories)
"in" = (
/obj/machinery/door/airlock{
name = "Cabin 4";
req_access_txt = "0"
name = "Cabin 4"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
Expand Down Expand Up @@ -3141,8 +3154,7 @@
/area/lavaland/surface/outdoors)
"jf" = (
/obj/machinery/door/airlock{
name = "Cabin 1";
req_access_txt = "0"
name = "Cabin 1"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
Expand All @@ -3169,8 +3181,7 @@
/area/ruin/unpowered/syndicate_lava_base/dormitories)
"jh" = (
/obj/machinery/door/airlock{
name = "Cabin 3";
req_access_txt = "0"
name = "Cabin 3"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
Expand Down Expand Up @@ -4236,8 +4247,7 @@
base_state = "right";
dir = 1;
icon_state = "right";
name = "Bar";
req_access_txt = "0"
name = "Bar"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
Expand Down Expand Up @@ -5041,21 +5051,6 @@
/obj/machinery/door/firedoor,
/turf/open/floor/plating,
/area/ruin/unpowered/syndicate_lava_base/bar)
"mV" = (
/obj/structure/table/wood,
/obj/machinery/chem_dispenser/drinks/beer,
/obj/structure/sign/barsign{
pixel_y = -32;
req_access = null;
req_access_txt = "0"
},
/turf/open/floor/wood,
/area/ruin/unpowered/syndicate_lava_base/bar)
"mW" = (
/obj/structure/table/wood,
/obj/machinery/chem_dispenser/drinks,
/turf/open/floor/wood,
/area/ruin/unpowered/syndicate_lava_base/bar)
"mX" = (
/obj/structure/rack{
dir = 8
Expand Down Expand Up @@ -7054,7 +7049,7 @@ li
lA
lX
mw
mV
ah
jy
nu
oo
Expand Down Expand Up @@ -7101,7 +7096,7 @@ lj
lB
lY
lA
mW
ai
jP
nT
op
Expand Down
8 changes: 2 additions & 6 deletions _maps/RandomRuins/SpaceRuins/DJstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,7 @@
/area/ruin/space/djstation)
"bi" = (
/obj/machinery/door/airlock/external{
name = "Ruskie DJ Station";
req_access = null;
req_access_txt = "0"
name = "Ruskie DJ Station"
},
/obj/effect/mapping_helpers/airlock/cyclelink_helper,
/turf/open/floor/plating,
Expand All @@ -353,9 +351,7 @@
/area/space/nearstation)
"Co" = (
/obj/machinery/door/airlock/external{
name = "Ruskie DJ Station";
req_access = null;
req_access_txt = "0"
name = "Ruskie DJ Station"
},
/obj/effect/mapping_helpers/airlock/cyclelink_helper{
dir = 1
Expand Down
8 changes: 2 additions & 6 deletions _maps/RandomRuins/SpaceRuins/TheDerelict.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,11 @@
/turf/closed/wall/r_wall,
/area/ruin/space/derelict/solar_control)
"aT" = (
/obj/machinery/power/apc{
/obj/machinery/power/apc/unlocked{
dir = 8;
environ = 0;
equipment = 0;
lighting = 0;
locked = 0;
name = "Starboard Solar APC";
pixel_x = -24
},
Expand Down Expand Up @@ -887,7 +886,6 @@
"cV" = (
/obj/machinery/door/airlock/command{
name = "E.V.A.";
req_access = null;
req_access_txt = "18"
},
/obj/structure/cable{
Expand Down Expand Up @@ -3270,7 +3268,6 @@
"kR" = (
/obj/machinery/door/airlock/security{
name = "Security";
req_access = null;
req_access_txt = "1"
},
/obj/structure/cable{
Expand Down Expand Up @@ -4209,12 +4206,11 @@
/area/ruin/space/derelict/se_solar)
"nZ" = (
/obj/structure/cable,
/obj/machinery/power/apc{
/obj/machinery/power/apc/unlocked{
dir = 8;
environ = 0;
equipment = 0;
lighting = 0;
locked = 0;
name = "Worn-out APC";
pixel_x = -24
},
Expand Down
3 changes: 1 addition & 2 deletions _maps/RandomRuins/SpaceRuins/abandonedzoo.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,11 @@
},
/area/ruin/space/has_grav/abandonedzoo)
"aS" = (
/obj/machinery/power/apc{
/obj/machinery/power/apc/unlocked{
dir = 8;
environ = 0;
equipment = 0;
lighting = 0;
locked = 0;
name = "Worn-out APC";
pixel_x = -24
},
Expand Down
Loading

0 comments on commit 6c7da49

Please sign in to comment.