mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Fixes to lighting
-Fixed #2005 (for sure!) -Fixed the stacking of brightness. Now the most bright item turned ON will be the one where the user gets its luminosity of. -Cleaned the code a bit. Now only one var controls the on/off switch of light, and another holds the value of brightness when on.
This commit is contained in:
@@ -421,19 +421,19 @@
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
item.layer = initial(item.layer)
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
//if(src.client)
|
||||
//src.client.screen -= item
|
||||
|
||||
item.loc = src.loc
|
||||
//item.loc = src.loc
|
||||
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
//if(istype(item, /obj/item))
|
||||
//item:dropped(src) // let it know it's been dropped
|
||||
|
||||
//actually throw it!
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
src.visible_message("\red [src] has thrown [item].")
|
||||
|
||||
if(!src.lastarea)
|
||||
|
||||
@@ -159,9 +159,8 @@
|
||||
client.screen -= W
|
||||
W.loc = loc
|
||||
W.dropped(src)
|
||||
if(W)
|
||||
W.layer = initial(W.layer)
|
||||
|
||||
//if(W)
|
||||
//W.layer = initial(W.layer)
|
||||
update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -592,7 +591,15 @@ It can still be worn/put on as normal.
|
||||
target.internals.icon_state = "internal1"
|
||||
if(slot_to_process)
|
||||
if(strip_item) //Stripping an item from the mob
|
||||
target.u_equip(strip_item)
|
||||
var/obj/item/W = strip_item
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
|
||||
if(target.r_store)
|
||||
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
|
||||
@@ -601,6 +608,7 @@ It can still be worn/put on as normal.
|
||||
if(item.mob_can_equip(target, slot_to_process, 0))
|
||||
source.u_equip(item)
|
||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||
item.dropped(source)
|
||||
source.update_icons()
|
||||
target.update_icons()
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -112,6 +112,8 @@
|
||||
item.layer = 20
|
||||
target.l_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.l_hand)
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
@@ -120,8 +122,8 @@
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -130,6 +132,8 @@
|
||||
item.layer = 20
|
||||
target.r_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.r_hand)
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
|
||||
var/obj/item/weapon/lighter/zippo/L = new /obj/item/weapon/lighter/zippo(src)
|
||||
L.lit = 1
|
||||
L.light_on = 1
|
||||
src.modules += L
|
||||
|
||||
src.modules += new /obj/item/weapon/tray(src)
|
||||
|
||||
Reference in New Issue
Block a user