mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Fix startup runtime, remove debug from karma
This commit is contained in:
@@ -82,7 +82,6 @@
|
||||
hex = text("0[]", hex)
|
||||
return hex
|
||||
|
||||
|
||||
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
|
||||
/proc/list2text(list/ls, sep)
|
||||
if(ls.len <= 1) // Early-out code for empty or singleton lists.
|
||||
@@ -170,14 +169,38 @@
|
||||
#undef S1
|
||||
|
||||
//slower then list2text, but correctly processes associative lists.
|
||||
proc/tg_list2text(list/list, glue=",")
|
||||
proc/tg_list2text(list/list, glue=",", assocglue=";")
|
||||
if(!istype(list) || !list.len)
|
||||
return
|
||||
var/output
|
||||
for(var/i=1 to list.len)
|
||||
output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
|
||||
if(!isnull(list["[list[i]]"]))
|
||||
output += (i!=1? glue : null)+ "[list[i]]"+(i!=1? assocglue : null)+"[list["[list[i]]"]]"
|
||||
else
|
||||
output += (i!=1? glue : null)+ "[list[i]]"
|
||||
return output
|
||||
|
||||
proc/tg_text2list(text, glue=",", assocglue=";")
|
||||
var/length = length(glue)
|
||||
if(length < 1) return list(text)
|
||||
. = list()
|
||||
var/lastglue_found = 1
|
||||
var/foundglue
|
||||
var/foundassocglue
|
||||
var/searchtext
|
||||
do
|
||||
foundglue = findtext(text, glue, lastglue_found, 0)
|
||||
searchtext = copytext(text, lastglue_found, foundglue)
|
||||
foundassocglue = findtext(searchtext, assocglue, 1, 0)
|
||||
if(foundassocglue)
|
||||
var/sublist = copytext(searchtext, 1, foundassocglue)
|
||||
sublist[1] = copytext(searchtext, foundassocglue, 0)
|
||||
. += sublist
|
||||
else
|
||||
. += copytext(text, lastglue_found, foundglue)
|
||||
lastglue_found = foundglue + length
|
||||
while(foundglue)
|
||||
|
||||
|
||||
//Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
|
||||
/proc/text2list(text, delimiter="\n")
|
||||
@@ -335,4 +358,4 @@ proc/tg_list2text(list/list, glue=",")
|
||||
for(var/pos = end - 3, pos > 1, pos -= 3)
|
||||
finalNum = copytext(finalNum, 1, pos) + sep + copytext(finalNum, pos)
|
||||
|
||||
return finalNum
|
||||
return finalNum
|
||||
|
||||
@@ -101,9 +101,9 @@ var/list/karma_spenders = list()
|
||||
if(a == src.key)
|
||||
usr << "\red You've already spent your karma for the round."
|
||||
return
|
||||
//if(M.key == src.key)
|
||||
//usr << "\red You can't spend karma on yourself!"
|
||||
//return
|
||||
if(M.key == src.key)
|
||||
usr << "\red You can't spend karma on yourself!"
|
||||
return
|
||||
if(M.client.address == src.client.address)
|
||||
message_admins("\red Illegal karma spending detected from [src.key] to [M.key]. Using the same IP!")
|
||||
log_game("\red Illegal karma spending detected from [src.key] to [M.key]. Using the same IP!")
|
||||
@@ -318,6 +318,12 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
|
||||
return
|
||||
|
||||
/client/proc/karmarefund(var/type,var/name,var/cost)
|
||||
/*if(name == "Barber")
|
||||
cost = 5
|
||||
else*/
|
||||
usr << "\red That job is not refundable."
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM whitelist WHERE ckey='[usr.key]'")
|
||||
query.Execute()
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
result = "methylphenidate"
|
||||
required_reagents = list("mindbreaker" = 1, "hydrogen" = 1)
|
||||
result_amount = 3
|
||||
|
||||
/datum/chemical_reaction/methylphenidate/proc/see_in_dark()
|
||||
return
|
||||
|
||||
/datum/reagent/antidepressant/citalopram
|
||||
name = "Citalopram"
|
||||
|
||||
@@ -4,8 +4,8 @@ datum
|
||||
var/name = null
|
||||
var/id = null
|
||||
var/result = null
|
||||
var/list/required_reagents = new/list()
|
||||
var/list/required_catalysts = new/list()
|
||||
var/list/required_reagents = list()
|
||||
var/list/required_catalysts = list()
|
||||
|
||||
// Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things
|
||||
var/atom/required_container = null // the container required for the reaction to happen
|
||||
|
||||
Reference in New Issue
Block a user