Skip to content

Commit

Permalink
Fixed lifts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieD1 committed Aug 8, 2015
1 parent 0dd27fa commit 5b0ed03
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
20 changes: 9 additions & 11 deletions code/game/machinery/computer/lift.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
active_state = "power"
var/currentfloor = null
var/floor = null
/var/global/liftposition = 1
/var/global/ismoving = 1

/datum/file/program/lift/interact()
currentfloor = computer.z
Expand All @@ -30,17 +28,17 @@
if(!interactable())
return
var/dat// = topic_link(src,"close","Close")
if (ismoving == 1)
if (liftismoving == 1)
dat = "<center><h4>Lift currently moving..</b<</h4></center>"
else
dat = "<center><h4>You are currently on:<b>[floor]</b<</h4></center>"

dat += "<br><center><h3>Control Panel</h3></center>"
if (istype(computer.loc.loc, /area/lift))
if(ismoving == 0)
if(liftismoving == 0)
dat += "<center><b>[topic_link(src,"upwards","Go Upwards")] | [topic_link(src,"downwards","Go Downwards")] | [topic_link(src,"doors","Force Open Door")]"
else
if(ismoving == 0)
if(liftismoving == 0)
dat += "<center><b>[topic_link(src,"call","Call Lift")]"
dat += "</b></center>"

Expand All @@ -50,9 +48,9 @@
/datum/file/program/lift/Topic(href, list/href_list)
if(!interactable() || ..(href,href_list))
return
if (ismoving == 0)
if (liftismoving == 0)
if ("upwards" in href_list)
ismoving = 1
liftismoving = 1
var/area/start_location = null
var/area/end_location = null
if (computer.z == 7)
Expand Down Expand Up @@ -105,10 +103,10 @@
shake_camera(M, 4, 1) // buckled, not a lot of shaking
computer.updateUsrDialog()
interact()
ismoving = 0
liftismoving = 0

else if ("downwards" in href_list)
ismoving = 1
liftismoving = 1
var/area/start_location = null
var/area/end_location = null
if (computer.z == 7)
Expand Down Expand Up @@ -161,7 +159,7 @@
computer.updateUsrDialog()
spawn(20)
interact()
ismoving = 0
liftismoving = 0

else if ("call" in href_list)
var/area/start_location = null
Expand Down Expand Up @@ -231,7 +229,7 @@
computer.updateUsrDialog()
spawn(20)
interact()
ismoving = 0
liftismoving = 0


if ("doors" in href_list) //Doors!
Expand Down
3 changes: 3 additions & 0 deletions code/global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,6 @@ var/max_explosion_range = 14

// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
var/global/obj/item/device/radio/intercom/global_announcer = new(null)

/var/global/liftposition = 1
/var/global/liftismoving = 0
10 changes: 2 additions & 8 deletions code/modules/admin/verbs/adminsay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,18 @@
if(check_rights(R_AUDITOR|R_PERMISSIONS,0))
color = "headminsay"

if(check_rights((R_ADMIN & R_AUDITOR),0))
msg = "<span class='[color]'><span class='prefix'>ADMIN/AUDITOR:</span> <EM>[key_name(usr, 1)]</EM> (<b><a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</b></span></span>"
for(var/client/C in admins)
if((R_AUDITOR|R_ADMIN) & C.holder.rights)
C << msg

else if(check_rights(R_ADMIN,0))
msg = "<span class='[color]'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<b><a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</b></span></span>"
for(var/client/C in admins)
if((R_AUDITOR|R_ADMIN) & C.holder.rights)
C << msg

else if(check_rights(R_AUDITOR,0))
/* else if(check_rights(R_AUDITOR,0))
msg = "<span class='[color]'><span class='prefix'>AUDITOR:</span> <EM>[key_name(usr, 1)]</EM> (<b><a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</b></span></span>"
for(var/client/C in admins)
if((R_AUDITOR|R_ADMIN) & C.holder.rights)
C << msg

*/
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/cmd_mod_say(msg as text)
Expand Down
9 changes: 9 additions & 0 deletions html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@

<!-- DO NOT REMOVE, MOVE, OR COPY THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->

<div class='commit sansserif'>
<h2 class='date'>8 August 2015</h2>
<h3 class='author'>Jamie Digweed updated:</h3>
<ul class='changes bgimages16'>
<li class='rscadd'>Fixes lifts - 6 Months Late :/</li>
</ul>
</div>


<div class='commit sansserif'>
<h2 class='date'>6 August 2015</h2>
<h3 class='author'>Cirra updated:</h3>
Expand Down

0 comments on commit 5b0ed03

Please sign in to comment.