Merge branch 'master' into development

This commit is contained in:
skull132
2018-04-29 17:32:06 +03:00
26 changed files with 552 additions and 169 deletions
+3 -3
View File
@@ -99,8 +99,7 @@ var/list/admin_verbs_admin = list(
/client/proc/clear_toxins,
/client/proc/wipe_ai, // allow admins to force-wipe AIs
/client/proc/fix_player_list,
/client/proc/reset_openturf,
/client/proc/create_poll //Allows to create polls
/client/proc/reset_openturf
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
@@ -371,7 +370,8 @@ var/list/admin_verbs_dev = list( //will need to be altered - Ryan784
/client/proc/cmd_dev_bst,
/client/proc/lighting_show_verbs,
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_init_log
/client/proc/cmd_display_init_log,
/client/proc/create_poll //Allows to create polls
)
var/list/admin_verbs_cciaa = list(
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
+9 -2
View File
@@ -2,7 +2,7 @@
set category = "Special Verbs"
set name = "Create Poll"
if(!check_rights(R_ADMIN|R_DEV))
if(!check_rights(R_DEV))
return
if(!establish_db_connection(dbcon))
to_chat(src,"<span class='danger'>Failed to establish database connection.</span>")
@@ -60,13 +60,20 @@
viewtoken = "'[sanitizeSQL(viewtoken)]'"
else
viewtoken = "NULL"
var/link = null
link = input("Do you want to provide a link to get more information?","Link") as text
if(link)
link = "'[sanitizeSQL(link)]'"
else
link = "NULL"
var/sql_ckey = sanitizeSQL(ckey)
var/question = input("Write your question","Question") as message
if(!question)
return
question = sanitizeSQL(question)
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO ss13_poll_question (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, publicresult, viewtoken) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', '[address]', '[publicresult]', [viewtoken])")
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO ss13_poll_question (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, publicresult, viewtoken, link) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', '[address]', '[publicresult]', [viewtoken], [link])")
if(!query_polladd_question.Execute())
var/err = query_polladd_question.ErrorMsg()
to_chat(src,"SQL ERROR adding new poll question to table. Error : \[[err]\]\n")
+19 -3
View File
@@ -135,14 +135,30 @@ var/global/list/ticket_panels = list()
if (!establish_db_connection(dbcon))
return
var/DBQuery/Q = dbcon.NewQuery("INSERT INTO ss13_tickets (game_id, message_count, admin_count, admin_list, opened_by, taken_by, closed_by, response_delay, opened_at, closed_at) VALUES (:g_id:, :m_count:, :a_count:, :a_list:, :opened_by:, :taken_by, :closed_by:, :delay:, :opened_at:, :closed_at:)")
Q.Execute(list("g_id" = game_id, "m_count" = length(msgs), "a_count" = length(assigned_admins), "a_list" = json_encode(assigned_admins), "opened_by" = owner, "taken_by" = assigned_admins[0], "closed_by" = closed_by, "delay" = response_time, "opened_at" = SQLtime(opened_rt), "closed_at" = SQLtime(closed_rt)))
var/DBQuery/Q = dbcon.NewQuery({"INSERT INTO ss13_tickets
(game_id, message_count, admin_count, admin_list, opened_by, taken_by,
closed_by, response_delay, opened_at, closed_at)
VALUES
(:g_id:, :m_count:, :a_count:, :a_list:, :opened_by:, :taken_by:,
:closed_by:, :delay:, :opened_at:, :closed_at:)"})
Q.Execute(list(
"g_id" = game_id,
"m_count" = length(msgs),
"a_count" = length(assigned_admins),
"a_list" = json_encode(assigned_admins),
"opened_by" = owner,
"taken_by" = length(assigned_admins) ? assigned_admins[1] : null,
"closed_by" = closed_by,
"delay" = response_time || -1,
"opened_at" = SQLtime(opened_rt),
"closed_at" = SQLtime(closed_rt)
))
/datum/ticket/proc/append_message(m_from, m_to, msg)
msgs += new /datum/ticket_msg(m_from, m_to, msg)
if (!response_time && m_from != owner)
response_time = round((world.time - opened_time) SECONDS)
response_time = round((world.time - opened_time) / 10)
update_ticket_panels()
+104 -1
View File
@@ -1936,4 +1936,107 @@ obj/item/clothing/suit/storage/hooded/fluff/make_poncho //Raincoat Poncho - M.A.
icon = 'icons/obj/custom_items/fakhr_items.dmi'
icon_state = "fakhr_hat"
item_state = "fakhr_hat"
contained_sprite = TRUE
contained_sprite = TRUE
/obj/item/fluff/daliyah_visa //NanoTrasen Exchange Visa - Daliyah Veridan - xanderdox
name = "NanoTrasen exchange visa"
desc = "A work visa authorizing the holder, Daliyah Veridan, to work within the Republic of Biesel. An Eridani and NanoTrasen logo are embossed on the back."
icon = 'icons/obj/custom_items/daliyah_visa.dmi'
icon_state = "daliyah_visa"
w_class = 2
/obj/item/weapon/retractor/fluff/tristen_retractor //Laser Retractor - Tristen Wolff - elianabeth
name = "laser retractor"
desc = "The fabled laser retractor. It's a horrible amalgamation of a laser pointer, a retractor, and lots of tape."
icon = 'icons/obj/custom_items/tristen_retractor.dmi'
icon_state = "tristen_retractor"
/obj/item/fluff/amy_player //Music player - Amy Heris - golle
name = "music player"
desc = "An olive green HF24 in pristine condition, there is a small engraving on the back, reading \"To Amy, I will always be here for you, Varan.\""
icon = 'icons/obj/custom_items/amy_player.dmi'
icon_state = "amy_player_off"
item_state = "electornic"
w_class = 2
slot_flags = SLOT_BELT
var/broken = FALSE
var/open = FALSE
var/on = FALSE
var/obj/item/clothing/ears/earmuffs/earbuds
/obj/item/fluff/amy_player/Initialize()
. = ..()
earbuds = new(src)
/obj/item/fluff/amy_player/Destroy()
QDEL_NULL(earbuds)
return ..()
/obj/item/fluff/amy_player/update_icon()
if(broken)
icon_state = "amy_player_broken"
return
if(on)
icon_state = "amy_player_on"
else
icon_state = "amy_player_off"
/obj/item/fluff/amy_player/attack_self(mob/user as mob)
if(broken)
to_chat(user, "<span class='warning'>The screen flickers and blinks with errors.</span>")
return
if(!on)
to_chat(user, "<span class='notice'>You turn on \the [src].</span>")
on = TRUE
else
to_chat(user, "<span class='notice'>You turn off \the [src].</span>")
on = FALSE
update_icon()
/obj/item/fluff/amy_player/attack_hand(var/mob/user)
if(earbuds && src.loc == user)
earbuds.forceMove(user.loc)
user.put_in_hands(earbuds)
earbuds = null
update_icon()
return
return ..()
/obj/item/fluff/amy_player/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/clothing/ears/earmuffs) && !earbuds)
user.unEquip(I)
I.forceMove(src)
earbuds = I
to_chat(user, "<span class='notice'>You place \the [I] in \the [src].</span>")
return
if(broken)
if(isscrewdriver(I))
if(!open)
open = TRUE
to_chat(user, "<span class='notice'>You unfasten the back panel.</span>")
else
open = FALSE
to_chat(user, "<span class='notice'>You secure the back panel.</span>")
playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(ismultitool(I) && open)
to_chat(user, "<span class='notice'>You quickly pulse a few fires, and reset the screen and device.</span>")
broken = FALSE
update_icon()
/obj/item/fluff/amy_player/emp_act(severity)
broken = TRUE
on = FALSE
update_icon()
playsound(src, "spark", 50, 1, -1)
..()
@@ -216,6 +216,10 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
handle_player_polling()
return
if(href_list["showpolllink"])
show_poll_link(href_list["showpolllink"])
return
if(href_list["pollid"])
var/pollid = href_list["pollid"]
+35 -6
View File
@@ -34,20 +34,35 @@
src << browse(output,"window=playerpolllist;size=500x300")
/mob/abstract/new_player/proc/show_poll_link(var/pollid = -1)
if(pollid == -1) return
establish_db_connection(dbcon)
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT link FROM ss13_poll_question WHERE id = :pollid:")
select_query.Execute(list("pollid"=pollid))
var/link = null
while(select_query.NextRow())
link = select_query.item[1]
if(link && link != "")
usr << link(link)
else
log_debug("Polling: [usr.ckey] tried to open poll [pollid] with a invalid link: [link]")
/mob/abstract/new_player/proc/poll_player(var/pollid = -1)
if(pollid == -1) return
establish_db_connection(dbcon)
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM ss13_poll_question WHERE id = [pollid]")
select_query.Execute()
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions, link FROM ss13_poll_question WHERE id = :pollid:")
select_query.Execute(list("pollid"=pollid))
var/pollstarttime = ""
var/pollendtime = ""
var/pollquestion = ""
var/polltype = ""
var/haslink = 0
var/found = 0
var/multiplechoiceoptions = 0
@@ -56,6 +71,8 @@
pollendtime = select_query.item[2]
pollquestion = select_query.item[3]
polltype = select_query.item[4]
if(select_query.item[6] && select_query.item[6] != "")
haslink = 1
found = 1
break
@@ -89,7 +106,10 @@
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font>"
if(haslink)
output += "<br><font size='2'>Additional information <a href='?src=\ref[src];showpolllink=[pollid]'>is available here</a></font>"
output += "<p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=\ref[src]' method='get'>"
@@ -133,7 +153,10 @@
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Feedback gathering runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
output += "<font size='2'>Feedback gathering runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font>"
if(haslink)
output += "<br><font size='2'>Additional information <a href='?src=\ref[src];showpolllink=[pollid]'>is available here</a></font>"
output += "<p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=\ref[src]' method='get'>"
@@ -167,7 +190,10 @@
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font>"
if(haslink)
output += "<br><font size='2'>Additional information <a href='?src=\ref[src];showpolllink=[pollid]'>is available here</a></font>"
output += "<p>"
var/voted = 0
while(voted_query.NextRow())
@@ -262,7 +288,10 @@
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>You can select up to [multiplechoiceoptions] options. If you select more, the first [multiplechoiceoptions] will be saved.<br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font>"
if(haslink)
output += "<br><font size='2'>Additional information <a href='?src=\ref[src];showpolllink=[pollid]'>is available here</a></font>"
output += "<p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=\ref[src]' method='get'>"
@@ -274,7 +274,7 @@
examine_color = "#bc4b00"
blurb = "The Xion Manufacturing Group, being a subsidiary of Hephaestus Industries, saw the original Industrial models and wanted to develop their own chassis based off of the original design. The result is the Xion Industrial model. Sturdy and strong, this chassis is quite powerful and equally durable, with an ample power cell and improved actuators for carrying the increased weight of the body. The Xion model also retains sturdiness without covering the chassis in plating, allowing for the cooling systems to vent heat much easier than the Hephaestus-brand model. The Group did not wish to leave exposed cooling conduits, however, so this chassis will require a suit to perform EVA."
blurb = "The Xion Manufacturing Group, being a subsidiary of Hephaestus Industries, saw the original Industrial models and wanted to develop their own chassis based off of the original design. The result is the Xion Industrial model. Sturdy and strong, this chassis is quite powerful and equally durable, with an ample power cell and improved actuators for carrying the increased weight of the body. The Xion model also retains sturdiness without covering the chassis in plating, allowing for the cooling systems to vent heat much easier than the Hephaestus-brand model. This unit cannot perform EVA"
has_limbs = list(
"chest" = list("path" = /obj/item/organ/external/chest/industrial/xion),
+2
View File
@@ -357,6 +357,8 @@
if(H)
if(H.species.siemens_coefficient == 0)
return
if(isvaurca(H)) //natural vaurca insulation
return
if(H.gloves && contact_zone == "hand")
var/obj/item/clothing/gloves/G = H.gloves
if(G.siemens_coefficient == 0) return 0 //to avoid spamming with insulated glvoes on
@@ -11,88 +11,88 @@
volume = 50
var/shaken = 0
on_reagent_change()
/obj/item/weapon/reagent_containers/food/drinks/on_reagent_change()
return
/obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob)
if(!is_open_container())
if(user.a_intent == I_HURT && !shaken)
shaken = 1
user.visible_message("[user] shakes the [src]!", "You shake the [src]!")
playsound(loc,'sound/items/Shaking_Soda_Can.ogg', rand(10,50), 1)
return
if(shaken)
boom(user)
else
open(user)
/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user as mob)
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
user.visible_message("[user] opens the [src].", "You open the [src] with an audible pop!", "You can hear a pop,")
flags |= OPENCONTAINER
/obj/item/weapon/reagent_containers/food/drinks/proc/boom(mob/user as mob)
user.visible_message("<span class='danger'>The [src] explodes all over [user] as they open it!</span>","<span class='danger'>The [src] explodes all over you as you open it!</span>","You can hear a soda can explode.")
playsound(loc,'sound/items/Soda_Burst.ogg', rand(20,50), 1)
QDEL_NULL(reagents)
flags |= OPENCONTAINER
shaken = 0
/obj/item/weapon/reagent_containers/food/drinks/attack(mob/M as mob, mob/user as mob, def_zone)
if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT)
return ..()
if(standard_feed_mob(user, M))
return
attack_self(mob/user as mob)
if(!is_open_container())
if(user.a_intent == I_HURT && !shaken)
shaken = 1
user << "<span class='notice'>You shake the [src]!</span>"
playsound(loc,'sound/items/Shaking_Soda_Can.ogg', rand(10,50), 1)
return
if(shaken)
boom(user)
else
open(user)
return 0
proc/open(mob/user)
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
user << "<span class='notice'>You open [src] with an audible pop!</span>"
flags |= OPENCONTAINER
/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity)
if(!proximity)
return
if(standard_dispenser_refill(user, target))
return
if(standard_pour_into(user, target))
return
return ..()
proc/boom(user)
user << "<span class='danger'>The [src] explodes all over you as you open it!</span>"
playsound(loc,'sound/items/Soda_Burst.ogg', rand(20,50), 1)
QDEL_NULL(reagents)
flags |= OPENCONTAINER
shaken = 0
/obj/item/weapon/reagent_containers/food/drinks/standard_feed_mob(var/mob/user, var/mob/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
attack(mob/M as mob, mob/user as mob, def_zone)
if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT)
return ..()
/obj/item/weapon/reagent_containers/food/drinks/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
if(standard_feed_mob(user, M))
return
/obj/item/weapon/reagent_containers/food/drinks/standard_pour_into(var/mob/user, var/atom/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
return 0
/obj/item/weapon/reagent_containers/food/drinks/self_feed_message(var/mob/user)
user << "<span class='notice'>You swallow a gulp from \the [src].</span>"
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user)
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
if(standard_dispenser_refill(user, target))
return
if(standard_pour_into(user, target))
return
return ..()
standard_feed_mob(var/mob/user, var/mob/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
standard_pour_into(var/mob/user, var/atom/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
self_feed_message(var/mob/user)
user << "<span class='notice'>You swallow a gulp from \the [src].</span>"
feed_sound(var/mob/user)
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
examine(mob/user)
if(!..(user, 1))
return
if(!reagents || reagents.total_volume == 0)
user << "<span class='notice'>\The [src] is empty!</span>"
else if (reagents.total_volume <= volume * 0.25)
user << "<span class='notice'>\The [src] is almost empty!</span>"
else if (reagents.total_volume <= volume * 0.66)
user << "<span class='notice'>\The [src] is half full!</span>"
else if (reagents.total_volume <= volume * 0.90)
user << "<span class='notice'>\The [src] is almost full!</span>"
else
user << "<span class='notice'>\The [src] is full!</span>"
/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user)
if(!..(user, 1))
return
if(!reagents || reagents.total_volume == 0)
user << "<span class='notice'>\The [src] is empty!</span>"
else if (reagents.total_volume <= volume * 0.25)
user << "<span class='notice'>\The [src] is almost empty!</span>"
else if (reagents.total_volume <= volume * 0.66)
user << "<span class='notice'>\The [src] is half full!</span>"
else if (reagents.total_volume <= volume * 0.90)
user << "<span class='notice'>\The [src] is almost full!</span>"
else
user << "<span class='notice'>\The [src] is full!</span>"
////////////////////////////////////////////////////////////////////////////////
+1 -5
View File
@@ -94,11 +94,7 @@
if (!moving_upwards || next_floor == floors[floors.len]) // If moving down or moving to the top floor, squish.
for(var/turf/T in destination)
for(var/atom/movable/AM in T)
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.gib()
else if(AM.simulated && !istype(AM, /mob/abstract/eye))
qdel(AM)
AM.crush_act()
origin.move_contents_to(destination)