Merge pull request #2721 from DarkTechnomancer/master

Dem Glasses
This commit is contained in:
Christian Bielert
2013-04-28 19:58:07 -07:00
8 changed files with 26 additions and 3 deletions
+7
View File
@@ -389,6 +389,13 @@ var/global/datum/controller/occupations/job_master
spawnId(H, rank, alt_title)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
//Gives glasses to the vision impaired
if(H.disabilities & NEARSIGHTED)
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
if(equipped != 1)
var/obj/item/clothing/glasses/G = H.glasses
G.prescription = 1
// H.update_icons()
return 1
+6
View File
@@ -252,6 +252,7 @@ datum/preferences
dat += "Blood Type: <a href='byond://?src=\ref[user];preference=b_type;task=input'>[b_type]</a><br>"
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
//dat += "Skin pattern: <a href='byond://?src=\ref[user];preference=skin_style;task=input'>Adjust</a><br>"
dat += "Needs Glasses: <a href='?_src_=prefs;preference=disabilities'><b>[disabilities == 0 ? "No" : "Yes"]</b></a><br>"
dat += "Limbs: <a href='byond://?src=\ref[user];preference=limbs;task=input'>Adjust</a><br>"
//display limbs below
@@ -1007,6 +1008,11 @@ datum/preferences
gender = FEMALE
else
gender = MALE
if("disabilities")
if(disabilities == 0)
disabilities = 1
else
disabilities = 0
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP
@@ -237,6 +237,7 @@
S["sec_record"] << sec_record
S["player_alt_titles"] << player_alt_titles
S["be_special"] << be_special
S["disabilities"] << disabilities
S["used_skillpoints"] << used_skillpoints
S["skills"] << skills
S["skill_specialization"] << skill_specialization
+4
View File
@@ -1,6 +1,10 @@
/obj/item
var/prescription = 0
/obj/item/clothing
name = "clothing"
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"
+2 -1
View File
@@ -8,7 +8,7 @@
//var/vision_flags = 0
//var/darkness_view = 0//Base human is 2
//var/invisa_view = 0
var/prescription = 0
//var/prescription = 0
/obj/item/clothing/glasses/meson
name = "Optical Meson Scanner"
@@ -61,6 +61,7 @@
desc = "Made by Nerd. Co."
icon_state = "glasses"
item_state = "glasses"
prescription = 1
/obj/item/clothing/glasses/regular/hipster
name = "Prescription Glasses"
+1 -1
View File
@@ -1223,7 +1223,7 @@
if(blinded) blind.layer = 18
else blind.layer = 0
if( disabilities & NEARSIGHTED && !istype(glasses, /obj/item/clothing/glasses/regular) )
if( disabilities & NEARSIGHTED && ((glasses && !glasses.prescription) || !glasses))
client.screen += global_hud.vimpaired
if(eye_blurry) client.screen += global_hud.blurry
if(druggy) client.screen += global_hud.druggy
+1 -1
View File
@@ -170,7 +170,7 @@
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
equip_to_slot_if_possible(W, slot, 1, 1, 0)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \
@@ -365,6 +365,10 @@
new_character.dna.ready_dna(new_character)
new_character.dna.b_type = client.prefs.b_type
if(client.prefs.disabilities)
new_character.dna.struc_enzymes = setblock(new_character.dna.struc_enzymes,GLASSESBLOCK,toggledblock(getblock(new_character.dna.struc_enzymes,GLASSESBLOCK,3)),3)
new_character.disabilities |= NEARSIGHTED
new_character.key = key //Manually transfer the key to log them in
return new_character