mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Merge pull request #133 from Miniature/master
Custom items for special people
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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. :("
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user