Tg 1 28 sync testing/confirmation (#5178)
* maps, tgui, tools * defines and helpers * onclick and controllers * datums fucking caught that hulk reversal too. * game and shuttle modular * module/admin * oh god they fucking moved antag shit again * haaaaate. Haaaaaaaaaate. * enables moff wings * more modules things * tgstation.dme before I forget something important * some mob stuff * s'more mob/living stuff * some carbon stuff * ayy lmaos and kitchen meat * Human stuff * species things moff wings have a 'none' version too * the rest of the module stuff. * some strings * misc * mob icons * some other icons. * It compiles FUCK BORERS FUCK BORERS
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
#define testing(msg)
|
||||
#endif
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
/proc/log_test(text)
|
||||
WRITE_FILE(GLOB.test_log, "\[[time_stamp()]]: [text]")
|
||||
SEND_TEXT(world.log, text)
|
||||
#endif
|
||||
|
||||
/proc/log_admin(text)
|
||||
GLOB.admin_log.Add(text)
|
||||
if (CONFIG_GET(flag/log_admin))
|
||||
|
||||
@@ -241,9 +241,6 @@
|
||||
processing_list += A.contents
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(list/obj/item/device/radio/radios)
|
||||
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
. = list()
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
|
||||
|
||||
//moffs
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
|
||||
|
||||
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
|
||||
//////////////////////
|
||||
//datum/Heap object
|
||||
//////////////////////
|
||||
|
||||
/datum/Heap
|
||||
var/list/L
|
||||
var/cmp
|
||||
|
||||
/datum/Heap/New(compare)
|
||||
L = new()
|
||||
cmp = compare
|
||||
|
||||
/datum/Heap/proc/IsEmpty()
|
||||
return !L.len
|
||||
|
||||
//Insert and place at its position a new node in the heap
|
||||
/datum/Heap/proc/Insert(atom/A)
|
||||
|
||||
L.Add(A)
|
||||
Swim(L.len)
|
||||
|
||||
//removes and returns the first element of the heap
|
||||
//(i.e the max or the min dependant on the comparison function)
|
||||
/datum/Heap/proc/Pop()
|
||||
if(!L.len)
|
||||
return 0
|
||||
. = L[1]
|
||||
|
||||
L[1] = L[L.len]
|
||||
L.Cut(L.len)
|
||||
|
||||
Sink(1)
|
||||
|
||||
//Get a node up to its right position in the heap
|
||||
/datum/Heap/proc/Swim(var/index)
|
||||
var/parent = round(index * 0.5)
|
||||
|
||||
while(parent > 0 && (call(cmp)(L[index],L[parent]) > 0))
|
||||
L.Swap(index,parent)
|
||||
index = parent
|
||||
parent = round(index * 0.5)
|
||||
|
||||
//Get a node down to its right position in the heap
|
||||
/datum/Heap/proc/Sink(var/index)
|
||||
var/g_child = GetGreaterChild(index)
|
||||
|
||||
while(g_child > 0 && (call(cmp)(L[index],L[g_child]) < 0))
|
||||
L.Swap(index,g_child)
|
||||
index = g_child
|
||||
g_child = GetGreaterChild(index)
|
||||
|
||||
//Returns the greater (relative to the comparison proc) of a node children
|
||||
//or 0 if there's no child
|
||||
/datum/Heap/proc/GetGreaterChild(var/index)
|
||||
if(index * 2 > L.len)
|
||||
return 0
|
||||
|
||||
if(index * 2 + 1 > L.len)
|
||||
return index * 2
|
||||
|
||||
if(call(cmp)(L[index * 2],L[index * 2 + 1]) < 0)
|
||||
return index * 2 + 1
|
||||
else
|
||||
return index * 2
|
||||
|
||||
//Replaces a given node so it verify the heap condition
|
||||
/datum/Heap/proc/ReSort(atom/A)
|
||||
var/index = L.Find(A)
|
||||
|
||||
Swim(index)
|
||||
Sink(index)
|
||||
|
||||
/datum/Heap/proc/List()
|
||||
. = L.Copy()
|
||||
+39
-9
@@ -32,7 +32,7 @@
|
||||
else
|
||||
return pick(GLOB.underwear_list)*/
|
||||
|
||||
/proc/random_undershirt(gender)//Cit change - makes random underwear always return nude
|
||||
/proc/random_undershirt(gender)//Cit change - makes random undershirts always return nude
|
||||
if(!GLOB.undershirt_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
return "Nude"
|
||||
@@ -44,7 +44,7 @@
|
||||
else
|
||||
return pick(GLOB.undershirt_list)*/
|
||||
|
||||
/proc/random_socks()//Cit change - makes random underwear always return nude
|
||||
/proc/random_socks()//Cit change - makes random socks always return nude
|
||||
if(!GLOB.socks_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
|
||||
return "Nude"
|
||||
@@ -71,6 +71,8 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
if(!GLOB.wings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
if(!GLOB.moth_wings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
|
||||
|
||||
//CIT CHANGES - genitals and such
|
||||
if(!GLOB.cock_shapes_list.len)
|
||||
@@ -109,6 +111,7 @@
|
||||
"spines" = pick(GLOB.spines_list),
|
||||
"body_markings" = pick(GLOB.body_markings_list),
|
||||
"legs" = "Normal Legs",
|
||||
"moth_wings" = pick(GLOB.moth_wings_list),
|
||||
"taur" = "None",
|
||||
"mam_body_markings" = "None",
|
||||
"mam_ears" = "None",
|
||||
@@ -163,7 +166,6 @@
|
||||
"womb_efficiency" = CUM_EFFICIENCY,
|
||||
"womb_fluid" = "femcum",
|
||||
"flavor_text" = ""))
|
||||
|
||||
/proc/random_hair_style(gender)
|
||||
switch(gender)
|
||||
if(MALE)
|
||||
@@ -183,27 +185,34 @@
|
||||
return pick(GLOB.facial_hair_styles_list)
|
||||
|
||||
/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
if(gender==FEMALE)
|
||||
. = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
|
||||
else
|
||||
. = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_lizard_name(gender, attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(lizard_name(gender))
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_plasmaman_name(attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(plasmaman_name())
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_moth_name(attempts_to_find_unique_name=10)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(moth_name())
|
||||
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_skin_tone()
|
||||
@@ -580,3 +589,24 @@ Proc for attack log creation, because really why not
|
||||
warning("Invalid speech logging type detected. [logtype]. Defaulting to say")
|
||||
log_say(logmessage)
|
||||
|
||||
//Used in chemical_mob_spawn. Generates a random mob based on a given gold_core_spawnable value.
|
||||
/proc/create_random_mob(spawn_location, mob_class = HOSTILE_SPAWN)
|
||||
var/static/list/mob_spawn_meancritters = list() // list of possible hostile mobs
|
||||
var/static/list/mob_spawn_nicecritters = list() // and possible friendly mobs
|
||||
|
||||
if(mob_spawn_meancritters.len <= 0 || mob_spawn_nicecritters.len <= 0)
|
||||
for(var/T in typesof(/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = T
|
||||
switch(initial(SA.gold_core_spawnable))
|
||||
if(HOSTILE_SPAWN)
|
||||
mob_spawn_meancritters += T
|
||||
if(FRIENDLY_SPAWN)
|
||||
mob_spawn_nicecritters += T
|
||||
|
||||
var/chosen
|
||||
if(mob_class == FRIENDLY_SPAWN)
|
||||
chosen = pick(mob_spawn_nicecritters)
|
||||
else
|
||||
chosen = pick(mob_spawn_meancritters)
|
||||
var/mob/living/simple_animal/C = new chosen(spawn_location)
|
||||
return C
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
/proc/moth_name()
|
||||
return "[pick(GLOB.moth_names)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
|
||||
@@ -391,6 +391,7 @@
|
||||
if(X.get_team() == T)
|
||||
all_antagonists -= X
|
||||
result += " "//newline between teams
|
||||
CHECK_TICK
|
||||
|
||||
var/currrent_category
|
||||
var/datum/antagonist/previous_category
|
||||
@@ -410,6 +411,7 @@
|
||||
previous_category = A
|
||||
result += A.roundend_report()
|
||||
result += "<br><br>"
|
||||
CHECK_TICK
|
||||
|
||||
if(all_antagonists.len)
|
||||
var/datum/antagonist/last = all_antagonists[all_antagonists.len]
|
||||
|
||||
@@ -8,9 +8,12 @@
|
||||
if(toIndex <= 0)
|
||||
toIndex += L.len + 1
|
||||
|
||||
GLOB.sortInstance.L = L
|
||||
GLOB.sortInstance.cmp = cmp
|
||||
GLOB.sortInstance.associative = associative
|
||||
var/datum/sortInstance/SI = GLOB.sortInstance
|
||||
if(!SI)
|
||||
SI = new
|
||||
SI.L = L
|
||||
SI.cmp = cmp
|
||||
SI.associative = associative
|
||||
|
||||
GLOB.sortInstance.binarySort(fromIndex, toIndex, fromIndex)
|
||||
SI.binarySort(fromIndex, toIndex, fromIndex)
|
||||
return L
|
||||
@@ -8,9 +8,12 @@
|
||||
if(toIndex <= 0)
|
||||
toIndex += L.len + 1
|
||||
|
||||
GLOB.sortInstance.L = L
|
||||
GLOB.sortInstance.cmp = cmp
|
||||
GLOB.sortInstance.associative = associative
|
||||
GLOB.sortInstance.mergeSort(fromIndex, toIndex)
|
||||
var/datum/sortInstance/SI = GLOB.sortInstance
|
||||
if(!SI)
|
||||
SI = new
|
||||
SI.L = L
|
||||
SI.cmp = cmp
|
||||
SI.associative = associative
|
||||
|
||||
SI.mergeSort(fromIndex, toIndex)
|
||||
return L
|
||||
@@ -8,10 +8,13 @@
|
||||
if(toIndex <= 0)
|
||||
toIndex += L.len + 1
|
||||
|
||||
GLOB.sortInstance.L = L
|
||||
GLOB.sortInstance.cmp = cmp
|
||||
GLOB.sortInstance.associative = associative
|
||||
var/datum/sortInstance/SI = GLOB.sortInstance
|
||||
if(!SI)
|
||||
SI = new
|
||||
|
||||
GLOB.sortInstance.timSort(fromIndex, toIndex)
|
||||
SI.L = L
|
||||
SI.cmp = cmp
|
||||
SI.associative = associative
|
||||
|
||||
SI.timSort(fromIndex, toIndex)
|
||||
return L
|
||||
@@ -65,6 +65,7 @@
|
||||
return .
|
||||
|
||||
//Splits the text of a file at seperator and returns them in a list.
|
||||
//returns an empty list if the file doesn't exist
|
||||
/world/proc/file2list(filename, seperator="\n", trim = TRUE)
|
||||
if (trim)
|
||||
return splittext(trim(file2text(filename)),seperator)
|
||||
@@ -589,4 +590,4 @@
|
||||
for(var/i = 1 to length(str)/2)
|
||||
c= hex2num(copytext(str,i*2-1,i*2+1))
|
||||
r+= ascii2text(c)
|
||||
return r
|
||||
return r
|
||||
|
||||
@@ -1511,7 +1511,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
usr = M
|
||||
. = CB.Invoke()
|
||||
usr = temp
|
||||
|
||||
|
||||
//Returns a list of all servants of Ratvar and observers.
|
||||
/proc/servants_and_ghosts()
|
||||
. = list()
|
||||
|
||||
Reference in New Issue
Block a user