mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 06:26:29 +01:00
Merge remote-tracking branch 'upstream/dev' into boolit
This commit is contained in:
@@ -108,6 +108,9 @@ datum/nano_item_lists
|
||||
return pick(random_items)
|
||||
|
||||
/obj/item/device/uplink/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["buy_item"] == "random")
|
||||
var/datum/uplink_item/UI = chooseRandomItem()
|
||||
href_list["buy_item"] = UI.reference
|
||||
@@ -208,10 +211,10 @@ datum/nano_item_lists
|
||||
// The purchasing code.
|
||||
/obj/item/device/uplink/hidden/Topic(href, href_list)
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
return 1
|
||||
|
||||
if (!( istype(usr, /mob/living/carbon/human)))
|
||||
return 0
|
||||
return 1
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
|
||||
|
||||
@@ -16,11 +16,14 @@
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
|
||||
/obj/Topic(href, href_list, var/nowindow = 0)
|
||||
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
|
||||
// Calling Topic without a corresponding window open causes runtime errors
|
||||
if(nowindow)
|
||||
return 0
|
||||
return ..()
|
||||
if(!nowindow && ..())
|
||||
return 1
|
||||
if(usr.can_interact_with_interface(src, checkrange) != STATUS_INTERACTIVE)
|
||||
return 1
|
||||
add_fingerprint(usr)
|
||||
return 0
|
||||
|
||||
/obj/item/proc/is_used_on(obj/O, mob/user)
|
||||
|
||||
|
||||
@@ -379,12 +379,21 @@
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
|
||||
/obj/machinery/button/crematorium
|
||||
name = "crematorium igniter"
|
||||
desc = "Burn baby burn!"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "crema_switch"
|
||||
req_access = list(access_crematorium)
|
||||
id = 1
|
||||
|
||||
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.allowed(usr))
|
||||
for (var/obj/structure/crematorium/C in world)
|
||||
if (C.id == id)
|
||||
if (!C.cremating)
|
||||
C.cremate(user)
|
||||
else
|
||||
usr << "\red Access denied."
|
||||
return
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
|
||||
@@ -470,3 +470,38 @@
|
||||
|
||||
update_icon() //icon_state has to be set manually
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/polarized
|
||||
name = "electrochromic window"
|
||||
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
|
||||
var/id
|
||||
|
||||
/obj/structure/window/reinforced/polarized/proc/toggle()
|
||||
if(opacity)
|
||||
animate(src, color="#FFFFFF", time=5)
|
||||
SetOpacity(0)
|
||||
else
|
||||
animate(src, color="#222222", time=5)
|
||||
SetOpacity(1)
|
||||
|
||||
/obj/machinery/button/windowtint
|
||||
name = "window tint control"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "light1"
|
||||
desc = "A remote control switch for polarized windows."
|
||||
var/range = 7
|
||||
|
||||
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
use_power(5)
|
||||
|
||||
active = !active
|
||||
icon_state = "light[active]"
|
||||
|
||||
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
|
||||
if (W.id == src.id || !W.id)
|
||||
spawn( 0 )
|
||||
W.toggle()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user