Overhauls and 2/28 sync (#244)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures

* lazy fix for bleeding edgy (#252)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures
This commit is contained in:
Poojawa
2017-02-28 09:30:49 -06:00
committed by GitHub
parent 93782cf716
commit 0bca862419
544 changed files with 309981 additions and 81206 deletions
+4 -8
View File
@@ -43,8 +43,7 @@
dat += "<A href='?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>"
dat += "<A href='?src=\ref[src];search=1'>\[Start Search\]</A><BR>"
if(1)
establish_db_connection()
if(!dbcon.IsConnected())
if (!dbcon.Connect())
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font><BR>"
else if(!SQLquery)
dat += "<font color=red><b>ERROR</b>: Malformed search request. Please contact your system administrator for assistance.</font><BR>"
@@ -135,8 +134,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
/proc/load_library_db_to_cache()
if(cachedbooks)
return
establish_db_connection()
if(!dbcon.IsConnected())
if(!dbcon.Connect())
return
cachedbooks = list()
var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM [format_table_name("library")] WHERE isnull(deleted)")
@@ -408,8 +406,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(scanner.cache)
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
if(choice == "Confirm")
establish_db_connection()
if(!dbcon.IsConnected())
if (!dbcon.Connect())
alert("Connection to Archive has been severed. Aborting.")
else
@@ -446,8 +443,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(href_list["targetid"])
var/sqlid = sanitizeSQL(href_list["targetid"])
establish_db_connection()
if(!dbcon.IsConnected())
if (!dbcon.Connect())
alert("Connection to Archive has been severed. Aborting.")
if(cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
+1 -1
View File
@@ -34,7 +34,7 @@
. = list()
if(!isnum(amount) || amount<1)
return
if(!establish_db_connection())
if (!dbcon.Connect())
if(fail_loud || prob(5))
var/obj/item/weapon/paper/P = new(location)
P.info = "There once was a book from Nantucket<br>But the database failed us, so f*$! it.<br>I tried to be good to you<br>Now this is an I.O.U<br>If you're feeling entitled, well, stuff it!<br><br><font color='gray'>~</font>"
+71 -1
View File
@@ -170,6 +170,8 @@
var/realdate
var/map
var/persists = TRUE
var/list/like_keys = list()
var/list/dislike_keys = list()
/obj/structure/chisel_message/New(newloc)
..()
@@ -206,13 +208,20 @@
var/turf/T = get_turf(src)
data["x"] = T.x
data["y"] = T.y
return data
data["like_keys"] = like_keys
data["dislike_keys"] = dislike_keys
/obj/structure/chisel_message/proc/unpack(list/data)
hidden_message = data["hidden_message"]
creator_name = data["creator_name"]
creator_key = data["creator_key"]
realdate = data["realdate"]
like_keys = data["like_keys"]
if(!like_keys)
like_keys = list()
dislike_keys = data["dislike_keys"]
if(!dislike_keys)
dislike_keys = list()
var/x = data["x"]
var/y = data["y"]
@@ -229,3 +238,64 @@
SSpersistence.SaveChiselMessage(src)
SSpersistence.chisel_messages -= src
. = ..()
/obj/structure/chisel_message/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = always_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "engraved_message", name, 600, 300, master_ui, state)
ui.open()
/obj/structure/chisel_message/ui_data(mob/user)
var/list/data = list()
data["hidden_message"] = hidden_message
data["realdate"] = SQLtime(realdate)
data["num_likes"] = like_keys.len
data["num_dislikes"] = dislike_keys.len
data["is_creator"] = user.ckey == creator_key
data["has_liked"] = (user.ckey in like_keys)
data["has_disliked"] = (user.ckey in dislike_keys)
if(check_rights_for(user.client, R_ADMIN))
data["admin_mode"] = TRUE
data["creator_key"] = creator_key
data["creator_name"] = creator_name
return data
/obj/structure/chisel_message/ui_act(action, params, datum/tgui/ui)
var/mob/user = usr
var/is_admin = check_rights_for(user.client, R_ADMIN)
var/is_creator = user.ckey == creator_key
var/has_liked = (user.ckey in like_keys)
var/has_disliked = (user.ckey in dislike_keys)
switch(action)
if("like")
if(is_creator)
return
if(has_disliked)
dislike_keys -= user.ckey
like_keys |= user.ckey
. = TRUE
if("dislike")
if(is_creator)
return
if(has_liked)
like_keys -= user.ckey
dislike_keys |= user.ckey
. = TRUE
if("neutral")
if(is_creator)
return
dislike_keys -= user.ckey
like_keys -= user.ckey
. = TRUE
if("delete")
if(!is_admin)
return
var/confirm = alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", "Yes", "No")
if(confirm == "Yes")
persists = FALSE
qdel(src)