Merge remote-tracking branch 'origin/master' into rustsql

This commit is contained in:
Letter N
2021-02-19 12:38:32 +08:00
737 changed files with 8763 additions and 3732 deletions
+50 -2
View File
@@ -146,10 +146,58 @@
if(dbflags & DB_FLAG_AGE_CONFIRMATION_INCOMPLETE) //they have not completed age gate
var/age_verification = age_gate()
if(age_verification != 1)
client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process")
client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process.")
//ban them and kick them
AddBan(client.ckey, client.computer_id, "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification.", "SYSTEM", FALSE, null, client.address)
//parameters used by sql line, easier to read:
var/bantype_str = "ADMIN_PERMABAN"
var/reason = "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification."
var/duration = -1
var/sql_ckey = sanitizeSQL(client.ckey)
var/computerid = client.computer_id
if(!computerid)
computerid = "0"
var/sql_computerid = sanitizeSQL(computerid)
var/ip = client.address
if(!ip)
ip = "0.0.0.0"
var/sql_ip = sanitizeSQL(ip)
//parameter not used as there's no job but i want to fill out all parameters for the insert line
var/sql_job
// these are typically the banning admin's, but it's the system so we leave them null, but they're still here for the sake of a full set of values
var/sql_a_ckey
var/sql_a_computerid
var/sql_a_ip
// record all admins and non-admins online at the time
var/who
for(var/client/C in GLOB.clients)
if(!who)
who = "[C]"
else
who += ", [C]"
var/adminwho
for(var/client/C in GLOB.admins)
if(!adminwho)
adminwho = "[C]"
else
adminwho += ", [C]"
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`round_id`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]', '[bantype_str]', '[reason]', '[sql_job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[sql_ckey]', '[sql_computerid]', INET_ATON('[sql_ip]'), '[sql_a_ckey]', '[sql_a_computerid]', INET_ATON('[sql_a_ip]'), '[who]', '[adminwho]')"
var/datum/DBQuery/query_add_ban = SSdbcore.NewQuery(sql)
qdel(query_add_ban)
// announce this
message_admins("[html_encode(client.ckey)] has been banned for failing the automatic age gate.")
send2irc("[html_encode(client.ckey)] has been banned for failing the automatic age gate.")
// removing the client disconnects them
qdel(client)
return FALSE
else
//they claim to be of age, so allow them to continue and update their flags
@@ -1,4 +1,4 @@
datum/sprite_accessory/caps
/datum/sprite_accessory/caps
icon = 'icons/mob/mutant_bodyparts.dmi'
color_src = HAIR
relevant_layers = list(BODY_ADJ_LAYER)
@@ -13,6 +13,10 @@
name = "Bald"
icon_state = "bald"
/datum/sprite_accessory/hair/adhara
name = "Adhara"
icon_state = "hair_adhara"
/datum/sprite_accessory/hair/afro
name = "Afro"
icon_state = "hair_afro"
@@ -29,6 +33,14 @@
name = "Ahoge"
icon_state = "hair_antenna"
/datum/sprite_accessory/hair/amazon
name = "Amazon"
icon_state = "hair_amazon"
/datum/sprite_accessory/hair/anita
name = "Anita"
icon_state = "hair_anita"
/datum/sprite_accessory/hair/balding
name = "Balding Hair"
icon_state = "hair_e"
@@ -61,6 +73,18 @@
name = "Beehive 2"
icon_state = "hair_beehive2"
/datum/sprite_accessory/hair/belenko
name = "Beleneko"
icon_state = "hair_belenko"
/datum/sprite_accessory/hair/belenkotied
name = "Belenko (Tied)"
icon_state = "hair_belenkotied"
/datum/sprite_accessory/hair/belle
name = "Belle"
icon_state = "hair_belle"
/datum/sprite_accessory/hair/bob
name = "Bob Hair"
icon_state = "hair_bob"
@@ -309,6 +333,10 @@
name = "Flow Hair"
icon_state = "hair_f"
/datum/sprite_accessory/hair/fluffy
name = "Fluffy"
icon_state = "hair_fluffy"
/datum/sprite_accessory/hair/fringetail
name = "Fringe Tail"
icon_state = "hair_fringetail"
@@ -365,6 +393,10 @@
name = "Hitop"
icon_state = "hair_hitop"
/datum/sprite_accessory/hair/inkling
name = "Inkling"
icon_state = "hair_inkling"
/datum/sprite_accessory/hair/jade
name = "Jade"
icon_state = "hair_jade"
@@ -373,6 +405,10 @@
name = "Jensen"
icon_state = "hair_jensen"
/datum/sprite_accessory/hair/jessica
name = "Jessica"
icon_state = "hair_jessica"
/datum/sprite_accessory/hair/joestar
name = "Joestar"
icon_state = "hair_joestar"
@@ -389,6 +425,10 @@
name = "Kusanagi"
icon_state = "hair_kusanagi"
/datum/sprite_accessory/hair/kleeia
name = "Kleeia"
icon_state = "hair_kleeia"
/datum/sprite_accessory/hair/long
name = "Long Hair 1"
icon_state = "hair_long"
@@ -445,6 +485,10 @@
name = "Mohawk"
icon_state = "hair_d"
/datum/sprite_accessory/hair/newyou
name = "New You"
icon_state = "hair_newyou"
/datum/sprite_accessory/hair/reversemohawk
name = "Mohawk (Reverse)"
icon_state = "hair_reversemohawk"
@@ -575,6 +619,10 @@
name = "Ponytail (Side) 4"
icon_state = "hair_sidetail4"
/datum/sprite_accessory/hair/sharptail
name = "Ponytail (Sharp)"
icon_state = "hair_sharptail"
/datum/sprite_accessory/hair/spikytail
name = "Ponytail (Spiky)"
icon_state = "hair_spikyponytail"
@@ -679,6 +727,26 @@
name = "Skinhead"
icon_state = "hair_skinhead"
/datum/sprite_accessory/hair/simple
name = "Simple"
icon_state = "hair_simple"
/datum/sprite_accessory/hair/skrellvshort
name = "Skrell Replicant (Very Short)"
icon_state = "hair_skrellvshort"
/datum/sprite_accessory/hair/skrellshort
name = "Skrell Replicant (Short)"
icon_state = "hair_skrellshort"
/datum/sprite_accessory/hair/skrell
name = "Skrell Replicant (Average)"
icon_state = "hair_skrell"
/datum/sprite_accessory/hair/skrelllong
name = "Skrell Replicant (Long)"
icon_state = "hair_skrelllong"
/datum/sprite_accessory/hair/sleaze
name = "Sleaze"
icon_state = "hair_sleaze"
@@ -699,6 +767,10 @@
name = "Spiky 3"
icon_state = "hair_spiky2"
/datum/sprite_accessory/hair/supernova
name = "Supernova"
icon_state = "hair_supernova"
/datum/sprite_accessory/hair/swept
name = "Swept Back Hair"
icon_state = "hair_swept"
@@ -743,6 +815,10 @@
name = "Trimmed (Flat)"
icon_state = "hair_trimflat"
/datum/sprite_accessory/hair/twincurls
name = "Twincurls"
icon_state = "hair_twincurls"
/datum/sprite_accessory/hair/twintails
name = "Twintails"
icon_state = "hair_twintail"
@@ -787,6 +863,10 @@
name = "Very Short Over Eye (Alt)"
icon_state = "hair_veryshortovereyealternate"
/datum/sprite_accessory/hair/vivi
name = "Vivi"
icon_state = "hair_vivi"
/datum/sprite_accessory/hair/volaju
name = "Volaju"
icon_state = "hair_volaju"
@@ -11,6 +11,11 @@
// please make sure they're sorted alphabetically and categorized
/datum/sprite_accessory/underwear/socks/garter
name = "Garter"
icon_state = "garter"
has_color = TRUE
/datum/sprite_accessory/underwear/socks/socks_knee
name = "Knee-high"
icon_state = "socks_knee"
@@ -83,6 +88,10 @@
name = "Pantyhose"
icon_state = "pantyhose"
/datum/sprite_accessory/underwear/socks/pantyhose_ripped
name = "Pantyhose - Ripped"
icon_state = "pantyhose_ripped"
/datum/sprite_accessory/underwear/socks/socks_short
name = "Short"
icon_state = "socks_short"
@@ -757,7 +757,7 @@
icon_state = "husky"
matrixed_sections = MATRIX_RED_GREEN
datum/sprite_accessory/tails/mam_tails/insect
/datum/sprite_accessory/tails/mam_tails/insect
name = "Insect"
icon_state = "insect"
matrixed_sections = MATRIX_RED
@@ -343,6 +343,20 @@
icon_state = "fishnet_body"
gender = FEMALE
/datum/sprite_accessory/underwear/top/shibari
name = "Shibari Ropes"
icon_state = "shibari"
gender = FEMALE
has_color = TRUE
covers_chest = FALSE
/datum/sprite_accessory/underwear/top/shibari_sleeved
name = "Shibari Ropes - sleeves"
icon_state = "shibari_sleeves"
gender = FEMALE
has_color = TRUE
covers_chest = FALSE
/datum/sprite_accessory/underwear/top/swimsuit
name = "Swimsuit Top"
icon_state = "bra_swimming"
+4 -2
View File
@@ -556,7 +556,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/dest = list() //List of possible destinations (mobs)
var/target = null //Chosen target.
dest += getpois(mobs_only=1) //Fill list, prompt user with list
dest += getpois(mobs_only = TRUE) //Fill list, prompt user with list
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
if (!target)//Make sure we actually have a target
@@ -893,7 +893,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if (!eye_name)
return
var/mob/mob_eye = creatures[eye_name]
do_observe(creatures[eye_name])
/mob/dead/observer/proc/do_observe(mob/mob_eye)
//Istype so we filter out points of interest that are not mobs
if(client && mob_eye && istype(mob_eye))
client.eye = mob_eye
+28 -6
View File
@@ -1,5 +1,6 @@
/datum/orbit_menu
var/mob/dead/observer/owner
var/auto_observe = FALSE
/datum/orbit_menu/New(mob/dead/observer/new_owner)
if(!istype(new_owner))
@@ -10,6 +11,7 @@
return GLOB.observer_state
/datum/orbit_menu/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "Orbit")
ui.open()
@@ -18,15 +20,35 @@
if (..())
return
if (action == "orbit")
var/ref = params["ref"]
var/atom/movable/poi = (locate(ref) in GLOB.mob_list) || (locate(ref) in GLOB.poi_list)
if (poi != null)
switch(action)
if ("orbit")
var/ref = params["ref"]
var/atom/movable/poi = (locate(ref) in GLOB.mob_list) || (locate(ref) in GLOB.poi_list)
if (poi == null)
. = TRUE
return
owner.ManualFollow(poi)
owner.reset_perspective(null)
if (auto_observe)
owner.do_observe(poi)
. = TRUE
if ("refresh")
update_static_data(owner, ui)
. = TRUE
if ("toggle_observe")
auto_observe = !auto_observe
if (auto_observe && owner.orbit_target)
owner.do_observe(owner.orbit_target)
else
owner.reset_perspective(null)
/datum/orbit_menu/ui_data(mob/user)
var/list/data = list()
data["auto_observe"] = auto_observe
return data
/datum/orbit_menu/ui_static_data(mob/user)
var/list/data = list()
var/list/alive = list()
var/list/antagonists = list()
var/list/dead = list()
@@ -34,7 +56,7 @@
var/list/misc = list()
var/list/npcs = list()
var/list/pois = getpois(skip_mindless = 1)
var/list/pois = getpois(skip_mindless = TRUE, specify_dead_role = FALSE)
for (var/name in pois)
var/list/serialized = list()
serialized["name"] = name
@@ -80,7 +102,7 @@
data["npcs"] = npcs
return data
/datum/orbit_menu/ui_assets()
. = ..() || list()
. += get_asset_datum(/datum/asset/simple/orbit)