Removed mob/var/UI, it now uses client.prefs.UI_style

Removed var/constant/Pi It's already defined in setup.dm
Moved a bunch of global_lists to global_lists.dm
Fixed hair randomisation. (still bits to do)
Moved a lot of preferences_setup.dm stuff into __HELPERS/mobs.dm They'll be FAR more helpful as generic procs, rather than something tied to preferences.
Merged mob/var/nopush into status_flags with the CANPUSH flag
Merged mob/var/nodamage into status_flags with the GODMODE flag
Removed mob/var/be_syndicate and mob/var/be_random_name as they are not used.
Added /proc/ui_style2icon(ui_style) proc. It converts a string like "Midnight" into its corresponding dmi file. The code fore creating a new hud uses it.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5164 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-22 15:22:08 +00:00
parent bae59832d6
commit 73b54b017b
52 changed files with 344 additions and 509 deletions
+1 -1
View File
@@ -382,7 +382,7 @@ var/list/sacrificed = list()
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
break
D.universal_speak = 1
D.nodamage = 0
D.status_flags &= ~GODMODE
D.key = ghost.key
+3 -3
View File
@@ -71,7 +71,7 @@
if ("Summon")
for(var/mob/living/simple_animal/shade/A in src)
A.nodamage = 0
A.status_flags &= ~GODMODE
A.canmove = 1
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
A.loc = U.loc
@@ -124,7 +124,7 @@
del(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone
S.nodamage = 1 //So they won't die inside the stone somehow
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
@@ -151,7 +151,7 @@
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
T.loc = C //put shade in stone
T.nodamage = 1
T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
C.icon_state = "soulstone2"
+6 -4
View File
@@ -241,9 +241,11 @@ datum/hud/New(mob/owner)
/datum/hud/proc/instantiate()
if(!ismob(mymob)) return 0
if(!mymob.client) return 0
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
if(ishuman(mymob))
human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
human_hud(ui_style) // Pass the player the UI style chosen in preferences
if(RADAR in mymob.augmentations)
spawn()
@@ -253,10 +255,10 @@ datum/hud/New(mob/owner)
mymob:place_radar_closed()
else if(ismonkey(mymob))
monkey_hud(mymob.UI)
monkey_hud(ui_style)
else if(isbrain(mymob))
brain_hud(mymob.UI)
brain_hud(ui_style)
else if(islarva(mymob))
larva_hud()
@@ -279,4 +281,4 @@ datum/hud/New(mob/owner)
else if(isobserver(mymob))
ghost_hud()
return
return
+1 -2
View File
@@ -113,7 +113,7 @@
//Clonepod
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI)
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(mindref)
@@ -144,7 +144,6 @@
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
occupant = H
H.UI = UI // set interface preference
if(!clonename) //to prevent null names
clonename = "clone ([rand(0,999)])"
+1 -6
View File
@@ -378,7 +378,7 @@
temp = "Error: Clonepod malfunction."
else if(!config.revival_cloning)
temp = "Error: Unable to initiate cloning cycle."
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"]))
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
temp = "Initiating cloning cycle..."
records.Remove(C)
del(C)
@@ -429,11 +429,6 @@
R.fields["UI"] = subject.dna.uni_identity
R.fields["SE"] = subject.dna.struc_enzymes
// Preferences stuff
R.fields["interface"] = subject.UI
//Add an implant if needed
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
if (isnull(imp))
@@ -34,7 +34,7 @@
R.module = null
R.modtype = "robot"
R.updatename("Default")
R.nopush = 0
R.status_flags |= CANPUSH
R.updateicon()
return 1