Merge pull request #133 from Miniature/master

Custom items for special people
This commit is contained in:
CIB
2011-12-23 13:15:42 -08:00
4 changed files with 27 additions and 0 deletions
+2
View File
@@ -139,6 +139,7 @@
#define FILE_DIR "code/unused/spacecraft"
#define FILE_DIR "code/WorkInProgress"
#define FILE_DIR "code/WorkInProgress/mapload"
#define FILE_DIR "code/WorkInProgress/Mini"
#define FILE_DIR "code/WorkInProgress/organs"
#define FILE_DIR "code/WorkInProgress/virus2"
#define FILE_DIR "code/WorkInProgress/virus2/Disease2"
@@ -978,6 +979,7 @@
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\mapload\dmm_suite.dm"
#include "code\WorkInProgress\mapload\reader.dm"
#include "code\WorkInProgress\Mini\customitems.dm"
#include "code\WorkInProgress\virus2\Prob.dm"
#include "code\WorkInProgress\virus2\Disease2\analyser.dm"
#include "code\WorkInProgress\virus2\Disease2\base.dm"
+23
View File
@@ -0,0 +1,23 @@
//switch this out to use a database at some point
//list of ckey/ real_name and item paths
//gives item to specific people when they join if it can
//for multiple items just add mutliple entries, unless i change it to be a listlistlist
//yes, it has to be an item, you can't pick up nonitems
var/list/CustomItemList = list(
// ckey real_name item path
// list("miniature","Dave Booze",/obj/item/toy/crayonbox) //screw this i dont want crayons, it's an example okay
)
/proc/EquipCustomItems(mob/living/carbon/human/M)
for(var/list/test in CustomItemList)
if(test[1] == M.ckey && test[2] == M.real_name)
var/path = test[3]
var/obj/item/item = new path()
if(istype(M.back,/obj/item/weapon/storage))
item.loc = M.back
else
for(var/obj/item/weapon/storage/S in M.contents)
item.loc = S
return
message_admins("Attempted to give [M.real_name]([M.key]) a [item] but there was nowhere to put it!")
M << "You were meant to recieve a [item] but there was nowhere to put it. Sorry. :("
+1
View File
@@ -150,6 +150,7 @@ var/global/datum/controller/gameticker/ticker
captainless=0
if(player.mind.assigned_role != "MODE")
job_master.EquipRank(player, player.mind.assigned_role, 0)
EquipCustomItems(player)
if(captainless)
world << "Captainship not forced on anyone."
@@ -231,6 +231,7 @@
var/icon/char_icon = getFlatIcon(character,0)//We're creating out own cache so it's not needed.
job_master.AssignRole(character, rank, 1)
job_master.EquipRank(character, rank, 1)
EquipCustomItems(character)
character.loc = pick(latejoin)
AnnounceArrival(character, rank)