mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 03:21:30 +00:00
update_clothing() has been broken up into it's key parts. A full explanation can be found in code/modules/mob/living/carbon/human/update_icons.dm the tl;dr of it is that overlay updates are no longer called by the gameticker. Instead they are called by procs such as u_equip db_cick etc. This means faster updates (although admittedly, more of them can be called per tick). This however is offset by the fact that specific overlays can be updated now, vastly improving its efficiency. This will especially help when there are large numbers of dead mobs. Fixed the throw code for TKgrab so it can be toggled. Cloaking for aliens/humans/ninjas was changed. It's very crude at the moment and for that I apologise. But it works and is very efficient.It also stops cloaked individuals becomming invincible due to people being unable to hit them (even when they know exactly where they are) Fixed a bunch of bugs with damage-overlays. They were updating FAR FAR to frequently. They were also horribly inefficient. They should now be virtually seamless when updating and only use cached icons, so they aren't affected by lag as badly. This may help with explosions lag a little. There's still a tonne of stuff I need to refine with this. I'll be refining it down into some helper procs to reduce on code duplication and such git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3811 316c924e-a436-60f5-8080-3fe189b3f50e
87 lines
2.7 KiB
Plaintext
87 lines
2.7 KiB
Plaintext
/obj/item/weapon/storage/backpack/MouseDrop(obj/over_object as obj)
|
|
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
|
|
var/mob/M = usr
|
|
if (!( istype(over_object, /obj/screen) ))
|
|
return ..()
|
|
playsound(src.loc, "rustle", 50, 1, -5)
|
|
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
|
|
if (over_object.name == "r_hand")
|
|
if (!( M.r_hand ))
|
|
M.u_equip(src)
|
|
M.r_hand = src
|
|
M.update_inv_r_hand()
|
|
else
|
|
if (over_object.name == "l_hand")
|
|
if (!( M.l_hand ))
|
|
M.u_equip(src)
|
|
M.l_hand = src
|
|
M.update_inv_l_hand()
|
|
src.add_fingerprint(usr)
|
|
return
|
|
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
|
if (usr.s_active)
|
|
usr.s_active.close(usr)
|
|
src.show_to(usr)
|
|
return
|
|
return
|
|
|
|
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
playsound(src.loc, "rustle", 50, 1, -5)
|
|
..()
|
|
|
|
|
|
/obj/item/weapon/storage/backpack/holding
|
|
name = "Bag of Holding"
|
|
desc = "A backpack that opens into a localized pocket of Blue Space."
|
|
origin_tech = "bluespace=4"
|
|
icon_state = "holdingpack"
|
|
max_w_class = 4
|
|
max_combined_w_class = 28
|
|
|
|
New()
|
|
..()
|
|
return
|
|
|
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(crit_fail)
|
|
user << "\red The Bluespace generator isn't working."
|
|
return
|
|
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
|
|
investigate_log("has become a singularity. Caused by [user.key]","singulo")
|
|
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
|
|
del(W)
|
|
var/obj/machinery/singularity/singulo = new /obj/machinery/singularity (get_turf(src))
|
|
singulo.energy = 300 //should make it a bit bigger~
|
|
message_admins("[key_name_admin(user)] detonated a bag of holding")
|
|
log_game("[key_name(user)] detonated a bag of holding")
|
|
del(src)
|
|
return
|
|
..()
|
|
|
|
proc/failcheck(mob/user as mob)
|
|
if (prob(src.reliability)) return 1 //No failure
|
|
if (prob(src.reliability))
|
|
user << "\red The Bluespace portal resists your attempt to add another item." //light failure
|
|
else
|
|
user << "\red The Bluespace generator malfunctions!"
|
|
for (var/obj/O in src.contents) //it broke, delete what was in it
|
|
del(O)
|
|
crit_fail = 1
|
|
icon_state = "brokenpack"
|
|
|
|
|
|
/obj/item/weapon/storage/backpack/santabag
|
|
name = "Santa's Gift Bag"
|
|
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
|
|
icon_state = "giftbag0"
|
|
item_state = "giftbag"
|
|
w_class = 4.0
|
|
storage_slots = 20
|
|
max_w_class = 3
|
|
max_combined_w_class = 400 // can store a ton of shit!
|
|
|
|
New()
|
|
..()
|
|
return
|
|
|