Merge branch 'master' into development

# Conflicts:
#	code/modules/mob/living/simple_animal/simple_animal.dm
#	html/changelogs/.all_changelog.yml
This commit is contained in:
skull132
2017-01-07 13:55:12 +02:00
16 changed files with 231 additions and 21 deletions
+68 -8
View File
@@ -46,10 +46,7 @@
bad_data &= ~BAD_CID
if (bad_data)
var/DBQuery/new_mirror = dbcon.NewQuery("INSERT INTO ss13_ban_mirrors (ban_id, player_ckey, ban_mirror_ip, ban_mirror_computerid, ban_mirror_datetime) VALUES (:ban_id, :ckey, :address, :computerid, NOW())")
new_mirror.Execute(list(":ban_id" = ban_id, ":ckey" = ckey, ":address" = address, ":computerid" = computer_id))
log_misc("Mirrored ban #[ban_id] for player [ckey] from [address]-[computer_id].")
apply_ban_mirror(ckey, address, computer_id, ban_id)
return
@@ -58,10 +55,6 @@
log_misc("No ban retreived while attempting to handle ban mirroring. Passed ban_id: [ban_id], ckey: [ckey].")
return
#undef BAD_CID
#undef BAD_IP
#undef BAD_CKEY
/proc/get_active_mirror(var/ckey, var/address, var/computer_id)
if (!ckey || !address || !computer_id)
return null
@@ -124,3 +117,70 @@
mirrors[query.item[1]] = items
return mirrors
/proc/apply_ban_mirror(var/ckey, var/address, var/computer_id, var/ban_id)
if (!ckey || !address || !computer_id || !ban_id)
return
var/DBQuery/new_mirror = dbcon.NewQuery("INSERT INTO ss13_ban_mirrors (ban_id, player_ckey, ban_mirror_ip, ban_mirror_computerid, ban_mirror_datetime) VALUES (:ban_id, :ckey, :address, :computerid, NOW())")
new_mirror.Execute(list(":ban_id" = ban_id, ":ckey" = ckey, ":address" = address, ":computerid" = computer_id))
log_misc("Mirrored ban #[ban_id] for player [ckey] from [address]-[computer_id].")
/proc/handle_connection_info(var/client/C, var/data)
if (!C)
return
if (!data)
update_connection_data(C)
return
var/list/conn_info = json_decode(data)
if (!conn_info || !conn_info.len)
return
var/ding_bannu = 0
var/new_info = BAD_CKEY|BAD_IP|BAD_CID
for (var/A in conn_info)
var/list/dset = A
if (dset.len != 3)
continue
if (new_info)
if (dset[1] == C.ckey)
new_info &= ~BAD_CKEY
if (dset[2] == C.address)
new_info &= ~BAD_IP
if (dset[3] == C.computer_id)
new_info &= ~BAD_CID
var/list/bdata = world.IsBanned(dset[1], dset[2], dset[3], 1)
if (bdata && bdata.len && !isnull(bdata["id"]))
ding_bannu = bdata["id"]
break
if (new_info)
update_connection_data(C, conn_info)
if (ding_bannu)
log_and_message_admins("[C.ckey] from [C.address]-[C.computer_id] was caught bandodging. Mirror applied for ban #[ding_bannu], kicking shortly.")
apply_ban_mirror(C.ckey, C.address, C.computer_id, ding_bannu)
spawn(20)
del(C)
return
/proc/update_connection_data(var/client/C, var/list/data = list())
if (!C)
return
data += list(list(C.ckey, C.address, C.computer_id))
var/data_str = json_encode(data)
C << output(list2params(list("E-DAT", data_str, 900)), "greeting.browser:setCookie")
#undef BAD_CID
#undef BAD_IP
#undef BAD_CKEY
+1 -1
View File
@@ -86,7 +86,7 @@ world/IsBanned(key,address,computer_id)
var/desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\n[reason]\nThis ban was applied by [ackey] on [bantime], [expires]"
return list("reason"="[bantype]", "desc"="[desc]")
return list("reason"="[bantype]", "desc"="[desc]", "id" = ban_id)
return ..() //default pager ban stuff
#endif
+4
View File
@@ -24,6 +24,10 @@
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
return
if (href_list["EMERG"] && href_list["EMERG"] == "action")
handle_connection_info(src, href_list["data"])
return
//Reduces spamming of links by dropping calls that happen during the delay period
if(next_allowed_topic_time > world.time)
return
+113
View File
@@ -773,3 +773,116 @@ All custom items with worn sprites must follow the contained sprite system: http
icon_state = "sayyidah_tiara"
item_state = "sayyidah_tiara"
contained_sprite = 1
/obj/item/clothing/accessory/fluff/jeyne_pendant //Jeyne's Pendant - Jeyne Kahale - themuncorn
name = "black choker with pendant"
desc = "A simple black choker, with a small pendant on the front. The pendant is carefully inscribed with some simple Sinta'Unathi script in white."
icon = 'icons/obj/custom_items/jeyne_pendant.dmi'
icon_state = "jeyne_pendant"
item_state = "jeyne_pendant"
slot_flags = SLOT_MASK | SLOT_TIE
contained_sprite = 1
/obj/item/clothing/suit/storage/fluff/basil_coat //Consortium Magister's Robes - Basil Drabardi - aimlessanalyst - TODO: turns this into a proper hoodie, because suits won't work with the hair overlay
name = "consortium magister's robes"
desc = "Deep red robes belonging to a Consortium Magister. A curious symbol is displayed on the black tabard down it's front."
icon = 'icons/obj/custom_items/basil_coat.dmi'
icon_state = "basil_coat"
item_state = "basil_coat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
contained_sprite = 1
/obj/item/clothing/under/fluff/iskra_uniform //Worn People's Republic Service Uniform - Iskra Ayrat - alberyk
name = "worn people's republic service uniform"
desc = "A well-worn shirt with blue strips, coupled with brown uniform pants. It seems to be part of the people's republic of Adhomai service uniform."
icon = 'icons/obj/custom_items/iskra_clothing.dmi'
icon_state = "iskra_clothing"
item_state = "iskra_clothing"
contained_sprite = 1
/obj/item/clothing/suit/storage/fluff/tsali_coat //Mariziite Shroud - Cruz Tsali - serveris6
name = "mariziite shroud"
desc = "A worn duster coat frayed near the bottom, with a dark-hide shoulder cape thrown over the torso bearing the mark of a Mariziite warrior priest. Commonly known as the garb worn by members of the Mariziite Order in the performance of their duties."
icon = 'icons/obj/custom_items/tsali_coat.dmi'
icon_state = "tsali_coat"
item_state = "tsali_coat"
contained_sprite = 1
/obj/item/clothing/under/fluff/ana_uniform //Retired Uniform - Ana Roh'hi'tin - suethecake
name = "retired uniform"
desc = "A silken blouse paired with dark-colored slacks. It has the words 'Chief Investigator' embroidered into the shoulder bar."
icon = 'icons/obj/custom_items/ana_clothing.dmi'
icon_state = "ana_uniform"
item_state = "ana_uniform"
contained_sprite = 1
/obj/item/clothing/suit/storage/forensics/fluff/ana_jacket //CSI Jacket - Ana Roh'hi'tin - suethecake
name = "CSI jacket"
desc = "A black jacket with the words 'CSI' printed in the back in bright, white letters."
icon = 'icons/obj/custom_items/ana_clothing.dmi'
icon_state = "ana_jacket"
item_state = "ana_jacket"
contained_sprite = 1
/obj/item/clothing/accessory/badge/old/fluff/ana_badge //Faded Badge - Ana Roh'hi'tin - suethecake
name = "faded badge"
desc = "A faded badge, backed with leather, that reads 'NT Security Force' across the front. It bears the emblem of the Forensic division."
stored_name = "Ana Issek"
badge_string = "NanoTrasen Security Department"
/obj/item/clothing/head/hairflower/fluff/aquila_pin //Magnetic Flower Pin - Aquila - nandabun
name = "magnetic flower pin"
desc = "That's a magnet in the shape of a hair flower pin. Smells nice."
/obj/item/clothing/head/beret/eng/fluff/ikrad_beret //LR-31MTA Beret - Ikrad Yam'hir - houseofsynth
name = "LR-31MTA Beret"
desc = "A silver beret with an insignia on the front, it looks like an old Tajaran cannon with a ring around it. \
Along the top half of the ring \"LR-31MTA\" is engraved. The word \"Yam'hir\" is engraved along the bottom half of the ring. \
The beret looks old and is worn in some places around the edges. It appears to have a flap inside, \
secured by a piece of elastic that loops around a button."
icon = 'icons/obj/custom_items/ikrad_beret.dmi'
icon_state = "ikrad_beret"
item_state = "ikrad_beret"
contained_sprite = 1
var/letter
/obj/item/clothing/head/beret/eng/fluff/ikrad_beret/New()
..()
var/obj/item/fluff/ikrad_letter/hat_letter = new(src)
letter = hat_letter
hat_letter.attack_self()
/obj/item/clothing/head/beret/eng/fluff/ikrad_beret/attack_self(var/mob/user)
if(letter)
user << "<span class='notice'>You remove \the [letter] from inside the [src]'s flap.</span>"
user.drop_from_inventory(src)
user.put_in_hands(letter)
user.put_in_hands(src)
letter = null
else
..()
/obj/item/clothing/head/beret/eng/fluff/ikrad_beret/attackby(var/obj/item/fluff/ikrad_letter/W, var/mob/user)
if(!src.letter && istype(W))
user << "<span class='notice'>You place \the [W] back inside the [src]'s flap.</span>"
user.drop_from_inventory(W)
W.forceMove(src)
src.letter = W
else
..()
/obj/item/fluff/ikrad_letter //Tattered Letter - Ikrad Yam'hir - houseofsynth
name = "tattered letter"
desc = "A tattered looking piece of paper that looks to have been folded multiple times. \
Although written in Siik'Maas it seems to be laid out like a letter, addressed to an \"Ikta Yam'hir\" and written in quite \
an untidy scrawl. The letter is torn in some places and the is writing faded."
icon = 'icons/obj/custom_items/ikrad_beret.dmi'
icon_state = "ikrad_letter"
w_class = 2
@@ -151,12 +151,11 @@
/mob/living/simple_animal/Life()
..()
life_tick++
if (stat == DEAD)
return 0
//Health
updatehealth()
if(stat == DEAD)
return 0
if(health > maxHealth)
health = maxHealth
@@ -1101,6 +1101,7 @@
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(C, pick(NORTH,SOUTH,EAST,WEST))
..()
//Silver
/datum/chemical_reaction/slime/bork