mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Moved the spacecraft folder into the unused section, moved syndiebeacon into machinery. Research moved into Modules. Virus2 moved into WIP - is anyone even working on this, it looks almost done? Computer2,optics,pda2,experimental moved unto unused. WIP Chemistry things moved into Chemical Module Cameras.dm moved into weapons GameKit.dm moved into unused BrokenInHands.dm moved into unused Removed Grillify.dm Moved all of the files listed as unused in the mining module to unused Removed several empty folders in modules Moved cloning.dm into machinery Moved NewBan.dm into admin Changed humanoid aliens new_life.dm into life.dm Moved beast mob into unused Moved hivebot into unused Moved carpedexplosion.dm into unused Moved ai_lockdown.dm verb into unused and removed it from the AIs verb list as it didn't actually do anything. Removed mastercontroler2.dm Moved savefile.dm from human to new_player Bugfix People spawning on the starting screen on rev/cult should be fixed. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1964 316c924e-a436-60f5-8080-3fe189b3f50e
83 lines
1.7 KiB
Plaintext
83 lines
1.7 KiB
Plaintext
// Mirror object
|
|
// Part of the optics system
|
|
//
|
|
// reflects laser beams
|
|
// 16 directional states 0/22.5/45/67.5deg to allow for 0/45deg beam angles
|
|
|
|
|
|
// ideas:
|
|
// frame/stand icon w/ mirror directional overlay
|
|
// two sets of overlay icons for 0/45 and 22.5/67.5 deg angles
|
|
|
|
// can rotate cw/acw - need screwdriver to loosen/tighten mirror
|
|
// use wrench to anchor/unanchor frame
|
|
// if touched, gets dirty - fingerprints, which reduce reflectivity
|
|
// if dirty and hit with high-power beam, mirror may shatter
|
|
// some kind of dust accumulation with HasProximity? Could check for mob w/o labcoat etc.
|
|
// can clean with acetone+wipes
|
|
|
|
/obj/optical/mirror
|
|
icon = 'optical.dmi'
|
|
icon_state = "mirrorA"
|
|
dir = 1
|
|
desc = "A large, optical-grade mirror firmly mounted on a stand."
|
|
flags = FPRINT
|
|
anchored = 0
|
|
var/rotatable = 0 // true if mirror can be rotated
|
|
var/angle = 0 // normal of mirror, 0-15. 0=N, 1=NNE, 2=NE, 3=ENE, 4=E etc
|
|
|
|
|
|
New()
|
|
..()
|
|
set_angle()
|
|
|
|
|
|
|
|
//set the angle from icon_state and dir
|
|
proc/set_angle()
|
|
switch(dir)
|
|
if(1)
|
|
angle = 0
|
|
if(5)
|
|
angle = 2
|
|
if(4)
|
|
angle = 4
|
|
if(6)
|
|
angle = 6
|
|
if(2)
|
|
angle = 8
|
|
if(10)
|
|
angle = 10
|
|
if(8)
|
|
angle = 12
|
|
if(9)
|
|
angle = 14
|
|
|
|
if(icon_state == "mirrorB") // 22.5deg turned states
|
|
angle++
|
|
return
|
|
|
|
// set the dir and icon_state from the angle
|
|
proc/set_dir()
|
|
if(angle%2 == 1)
|
|
icon_state = "mirrorB"
|
|
else
|
|
icon_state = "mirrorA"
|
|
switch(round(angle/2)*2)
|
|
if(0)
|
|
dir = 1
|
|
if(2)
|
|
dir = 5
|
|
if(4)
|
|
dir = 4
|
|
if(6)
|
|
dir = 6
|
|
if(8)
|
|
dir = 2
|
|
if(10)
|
|
dir = 10
|
|
if(12)
|
|
dir = 8
|
|
if(14)
|
|
dir = 9
|
|
return |