mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
MTTS: Control Panel Anchored, More whitelisting
This commit fixes the bug of being able to steal a tram's controller, because it was not anchored. It also adds two new things and a minor refactor to the "allowed-to-move-this-even-if-anchored" system, chairs, windows, and grilles.
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
var/automode = 0
|
||||
var/list/blacklist = list(/obj/tram/rail,/atom/movable/lighting_overlay)
|
||||
var/list/ancwhitelist = list(/obj/tram, /obj/vehicle, /obj/structure/stool/bed/chair, /obj/structure/grille, /obj/structure/window)
|
||||
|
||||
/obj/tram/tram_controller/New()
|
||||
spawn(1)
|
||||
@@ -144,7 +145,7 @@
|
||||
if(is_type_in_list(AM, blacklist)) return 0
|
||||
if(!AM.simulated) return 0
|
||||
if(AM.anchored)
|
||||
if(istype(AM,/obj/tram) || istype(AM,/obj/vehicle))
|
||||
if(is_type_in_list(AM, ancwhitelist))
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
desc = "Controls a tram."
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "airlock_control_standby"
|
||||
anchored = 1
|
||||
var/obj/tram/tram_controller/tram_linked
|
||||
var/list/cdir2readable = list("North","South",null,"East",null,null,null,"West")
|
||||
|
||||
/obj/tram/controlpad/attack_hand(var/mob/user)
|
||||
usr.set_machine(src)
|
||||
|
||||
Reference in New Issue
Block a user