Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into 11/6/2015_neerti_breaks_everything_bay_merge

Conflicts:
	.travis.yml
	code/_helpers/lists.dm
	code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
	code/global.dm
	code/modules/client/preferences.dm
	code/modules/client/preferences_savefile.dm
	code/modules/reagents/dispenser/dispenser2.dm
	polaris.dme
This commit is contained in:
Neerti
2015-11-06 17:41:18 -05:00
235 changed files with 9004 additions and 8450 deletions

75
code/datums/category.dm Normal file
View File

@@ -0,0 +1,75 @@
/**********************
* Category Collection *
**********************/
/datum/category_collection
var/category_group_type // The type of categories to initialize
var/list/datum/category_group/categories // The list of initialized categories
/datum/category_collection/New()
..()
categories = new()
for(var/category_type in typesof(category_group_type))
var/datum/category_group/category = category_type
if(initial(category.name))
category = new category(src)
categories += category
categories = dd_sortedObjectList(categories)
/datum/category_collection/Destroy()
for(var/category in categories)
qdel(category)
categories.Cut()
return ..()
/******************
* Category Groups *
******************/
/datum/category_group
var/name = ""
var/category_item_type // The type of items to initialize
var/list/datum/category_item/items // The list of initialized items
var/datum/category_collection/collection // The collection this group belongs to
/datum/category_group/New(var/datum/category_collection/cc)
..()
collection = cc
items = new()
for(var/item_type in typesof(category_item_type))
var/datum/category_item/item = item_type
if(initial(item.name))
item = new item(src)
items += item
// For whatever reason dd_insertObjectList(items, item) doesn't insert in the correct order
// If you change this, confirm that character setup doesn't become completely unordered.
items = dd_sortedObjectList(items)
/datum/category_group/Destroy()
for(var/item in items)
qdel(item)
items.Cut()
collection = null
return ..()
datum/category_group/dd_SortValue()
return name
/*****************
* Category Items *
*****************/
/datum/category_item
var/name = ""
var/list/datum/category_group/category // The group this item belongs to
/datum/category_item/New(var/datum/category_group/cg)
..()
category = cg
/datum/category_item/Destroy()
category = null
return ..()
datum/category_item/dd_SortValue()
return name

View File

@@ -53,9 +53,12 @@
affected_mob.updatehealth()
if(prob(40))
if(gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
gibbed = 1
affected_mob:Alienize()
var/mob/living/carbon/human/H = affected_mob
if(istype(H))
var/turf/origin = find_loc(affected_mob)
gibs(origin)
H.set_species("Xenomorph [pick(list("Hunter","Sentinel","Drone"))]")
return
affected_mob.gib()

View File

@@ -41,7 +41,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
(A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"),
((haspower) ? "The test light is on." : "The test light is off!"),
((A.backupPowerCablesCut()) ? "The backup power light is off!" : "The backup power light is on."),
((A.backup_power_lost_until) ? "The backup power light is off!" : "The backup power light is on."),
((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),