mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Merge remote-tracking branch 'upstream/dev' into new_tables
This commit is contained in:
@@ -269,7 +269,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(!M) return 0
|
||||
|
||||
if(!ishuman(M)) return 0
|
||||
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/mob_equip = list()
|
||||
if(H.species.hud && H.species.hud.equip_slots)
|
||||
@@ -277,22 +277,22 @@ var/list/global/slot_flags_enumeration = list(
|
||||
|
||||
if(H.species && !(slot in mob_equip))
|
||||
return 0
|
||||
|
||||
|
||||
//First check if the item can be equipped to the desired slot.
|
||||
if("[slot]" in slot_flags_enumeration)
|
||||
var/req_flags = slot_flags_enumeration["[slot]"]
|
||||
if(!(req_flags & slot_flags))
|
||||
return 0
|
||||
|
||||
|
||||
//Next check that the slot is free
|
||||
if(H.get_equipped_item(slot))
|
||||
return 0
|
||||
|
||||
|
||||
//Next check if the slot is accessible.
|
||||
var/mob/_user = disable_warning? null : H
|
||||
if(!H.slot_is_accessible(slot, src, _user))
|
||||
return 0
|
||||
|
||||
|
||||
//Lastly, check special rules for the desired slot.
|
||||
switch(slot)
|
||||
if(slot_l_ear, slot_r_ear)
|
||||
@@ -355,7 +355,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0)
|
||||
if(!slot) return 0
|
||||
if(!M) return 0
|
||||
|
||||
|
||||
if(!canremove)
|
||||
return 0
|
||||
if(!M.slot_is_accessible(slot, src, disable_warning? null : M))
|
||||
@@ -601,3 +601,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/item/proc/pwr_drain()
|
||||
return 0 // Process Kill
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
/obj/item/device/powersink/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
processing_power_items.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
@@ -49,6 +50,7 @@
|
||||
else
|
||||
if (mode == 2)
|
||||
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
|
||||
processing_power_items.Remove(src)
|
||||
anchored = 0
|
||||
mode = 0
|
||||
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
|
||||
@@ -71,25 +73,27 @@
|
||||
mode = 2
|
||||
icon_state = "powersink1"
|
||||
processing_objects.Add(src)
|
||||
processing_power_items.Add(src)
|
||||
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
|
||||
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
|
||||
mode = 1
|
||||
set_light(0)
|
||||
icon_state = "powersink0"
|
||||
processing_objects.Remove(src)
|
||||
processing_power_items.Remove(src)
|
||||
|
||||
/obj/item/device/powersink/proc/drain()
|
||||
/obj/item/device/powersink/pwr_drain()
|
||||
if(!attached)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(drained_this_tick)
|
||||
return
|
||||
return 1
|
||||
drained_this_tick = 1
|
||||
|
||||
var/drained = 0
|
||||
|
||||
if(!PN)
|
||||
return
|
||||
return 1
|
||||
|
||||
set_light(12)
|
||||
PN.trigger_warning()
|
||||
@@ -110,6 +114,7 @@
|
||||
A.cell.use(drain_val * CELLRATE)
|
||||
drained += drain_val
|
||||
power_drained += drained
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/powersink/process()
|
||||
|
||||
Reference in New Issue
Block a user