mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Committing work on mirrors, and a capitalisation fix for pizza boxes.
Mirrors aren't on the map yet, but should work fine. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3937 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
58
code/game/objects/mirror.dm
Normal file
58
code/game/objects/mirror.dm
Normal file
@@ -0,0 +1,58 @@
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
icon = 'watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair //this would probably be better as a global list
|
||||
var/list/fhairs = list()
|
||||
for(var/x in all_fhairs)
|
||||
var/datum/sprite_accessory/facial_hair/F = new x //this goes for the original in preferences too, but it'd
|
||||
fhairs.Add(F.name) //be nice to avoid all this instantiation and deletion...
|
||||
del(F)
|
||||
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in fhairs
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
for(var/x in all_fhairs)
|
||||
var/datum/sprite_accessory/facial_hair/F = new x
|
||||
if(F.name == new_style)
|
||||
H.facial_hair_style.icon_state = F.icon_state //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
break
|
||||
else
|
||||
del(F)
|
||||
|
||||
//handle normal hair
|
||||
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair //this would probably be better as a global list
|
||||
var/list/hairs = list()
|
||||
for(var/x in all_hairs)
|
||||
var/datum/sprite_accessory/facial_hair/F = new x
|
||||
hairs.Add(F.name)
|
||||
del(F)
|
||||
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hairs
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
for(var/x in all_hairs)
|
||||
var/datum/sprite_accessory/hair/F = new x
|
||||
if(F.name == new_style)
|
||||
H.hair_style.icon_state = F.icon_state //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
|
||||
break
|
||||
else
|
||||
del(F)
|
||||
|
||||
H.update_hair()
|
||||
@@ -1881,8 +1881,8 @@
|
||||
bitesize = 2
|
||||
|
||||
/obj/item/pizzabox
|
||||
name = "Pizza Box"
|
||||
desc = "A box suited for pizzas"
|
||||
name = "pizza box"
|
||||
desc = "A box suited for pizzas."
|
||||
icon = 'food.dmi'
|
||||
icon_state = "pizzabox1"
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -188,6 +188,7 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
@@ -602,6 +603,7 @@
|
||||
#include "code\game\objects\lamarr.dm"
|
||||
#include "code\game\objects\largecrate.dm"
|
||||
#include "code\game\objects\mineral_doors.dm"
|
||||
#include "code\game\objects\mirror.dm"
|
||||
#include "code\game\objects\new_year.dm"
|
||||
#include "code\game\objects\noticeboard.dm"
|
||||
#include "code\game\objects\object_procs.dm"
|
||||
|
||||
Reference in New Issue
Block a user