Moves bodybag closet into the closet folder where they should be.

Fixes large crate, critter crate, cardboard and metal boxes showing a nonfitting sprite when wrapped. I added two new sprite for those wrapped box-like closet, one for wrapped and one for giftwrapped.

You can now use tabs when writing on paper, by using "[tab]".

Fixes clone damage not being transfered when humanizing/monkeyizing with a dna injector.

Fixes chaplain's camera obscura showing invisible things other than ghosts.

Fixes typo in carbon/examine.dm().
This commit is contained in:
phil235
2016-11-05 00:00:28 +01:00
parent 44594790a9
commit b8e5bb22bc
16 changed files with 100 additions and 89 deletions

View File

@@ -1,4 +1,3 @@
//Also contains /obj/structure/closet/body_bag because I doubt anyone would think to look for bodybags in /object/structures
/obj/item/bodybag
name = "body bag"
@@ -33,67 +32,6 @@
new /obj/item/bodybag(src)
/obj/structure/closet/body_bag
name = "body bag"
desc = "A plastic bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bodybag"
var/foldedbag_path = /obj/item/bodybag
var/tagged = 0 // so closet code knows to put the tag overlay back
density = 0
mob_storage_capacity = 2
open_sound = 'sound/items/zip.ogg'
close_sound = 'sound/items/zip.ogg'
integrity_failure = 0
material_drop = /obj/item/stack/sheet/cloth
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
if(user.get_active_held_item() != I)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "body bag - [t]"
tagged = 1
update_icon()
else
name = "body bag"
return
else if(istype(I, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You cut the tag off [src].</span>"
name = "body bag"
tagged = 0
update_icon()
/obj/structure/closet/body_bag/update_icon()
..()
if (tagged)
add_overlay("bodybag_label")
/obj/structure/closet/body_bag/close()
if(..())
density = 0
return 1
return 0
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
if(opened)
return 0
if(contents.len)
return 0
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
qdel(src)
// Bluespace bodybag
/obj/item/bodybag/bluespace
@@ -105,12 +43,3 @@
w_class = 2
origin_tech = "bluespace=4;materials=4;plasmatech=4"
/obj/structure/closet/body_bag/bluespace
name = "bluespace body bag"
desc = "A bluespace body bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bluebodybag"
foldedbag_path = /obj/item/bodybag/bluespace
density = 0
mob_storage_capacity = 15
max_mob_size = MOB_SIZE_LARGE

View File

@@ -79,13 +79,12 @@
var/obj/structure/closet/O = target
if(O.opened)
return
if(!O.density) //can't wrap non dense closets (e.g. body bags)
if(!O.delivery_icon) //no delivery icon means unwrappable closet (e.g. body bags)
user << "<span class='warning'>You can't wrap this!</span>"
return
if(use(3))
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
if(O.horizontal)
P.icon_state = "deliverycrate"
P.icon_state = O.delivery_icon
O.loc = P
P.add_fingerprint(user)
O.add_fingerprint(user)

View File

@@ -32,6 +32,7 @@
var/cutting_sound = 'sound/items/Welder.ogg'
var/material_drop = /obj/item/stack/sheet/metal
var/material_drop_amount = 3
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
/obj/structure/closet/New()
..()

View File

@@ -0,0 +1,70 @@
/obj/structure/closet/body_bag
name = "body bag"
desc = "A plastic bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bodybag"
density = 0
mob_storage_capacity = 2
open_sound = 'sound/items/zip.ogg'
close_sound = 'sound/items/zip.ogg'
integrity_failure = 0
material_drop = /obj/item/stack/sheet/cloth
delivery_icon = null //unwrappable
var/foldedbag_path = /obj/item/bodybag
var/tagged = 0 // so closet code knows to put the tag overlay back
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
if(user.get_active_held_item() != I)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "body bag - [t]"
tagged = 1
update_icon()
else
name = "body bag"
return
else if(istype(I, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You cut the tag off [src].</span>"
name = "body bag"
tagged = 0
update_icon()
/obj/structure/closet/body_bag/update_icon()
..()
if (tagged)
add_overlay("bodybag_label")
/obj/structure/closet/body_bag/close()
if(..())
density = 0
return 1
return 0
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
if(opened)
return 0
if(contents.len)
return 0
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
qdel(src)
/obj/structure/closet/body_bag/bluespace
name = "bluespace body bag"
desc = "A bluespace body bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bluebodybag"
foldedbag_path = /obj/item/bodybag/bluespace
mob_storage_capacity = 15
max_mob_size = MOB_SIZE_LARGE

View File

@@ -12,6 +12,7 @@
open_sound = 'sound/effects/rustle2.ogg'
cutting_sound = 'sound/items/poster_ripped.ogg'
material_drop = /obj/item/stack/sheet/cardboard
delivery_icon = "deliverybox"
var/move_speed_multiplier = 1
var/move_delay = 0
var/egged = 0

View File

@@ -124,6 +124,8 @@
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
horizontal = TRUE
delivery_icon = "deliverycrate"
/obj/structure/closet/wardrobe/red
name = "security wardrobe"

View File

@@ -12,6 +12,7 @@
climbable = TRUE
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
climb_stun = 0 //climbing onto crates isn't hard, guys
delivery_icon = "deliverycrate"
var/obj/item/weapon/paper/manifest/manifest
/obj/structure/closet/crate/New()

View File

@@ -6,6 +6,7 @@
close_sound = 'sound/effects/bin_close.ogg'
anchored = TRUE
horizontal = FALSE
delivery_icon = null
/obj/structure/closet/crate/bin/New()
..()

View File

@@ -7,6 +7,7 @@
breakout_time = 1
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 4
delivery_icon = "deliverybox"
var/obj/item/weapon/tank/internals/emergency_oxygen/tank
/obj/structure/closet/crate/critter/New()

View File

@@ -4,6 +4,7 @@
icon_state = "largecrate"
density = 1
material_drop = /obj/item/stack/sheet/mineral/wood
delivery_icon = "deliverybox"
/obj/structure/closet/crate/large/attack_hand(mob/user)
add_fingerprint(user)

View File

@@ -59,9 +59,9 @@
temp = getCloneLoss()
if(temp)
if(getCloneLoss() < 30)
msg += "[t_He] [t_has] slightly deformed.\n"
msg += "[t_He] [t_is] slightly deformed.\n"
else
msg += "<b>[t_He] [t_has] severely deformed.</b>\n"
msg += "<b>[t_He] [t_is] severely deformed.</b>\n"
if(getBrainLoss() > 60)
msg += "[t_He] seems to be clumsy and unable to think.\n"

View File

@@ -77,10 +77,12 @@
//keep damage?
if (tr_flags & TR_KEEPDAMAGE)
O.setToxLoss(getToxLoss())
O.adjustBruteLoss(getBruteLoss())
O.setOxyLoss(getOxyLoss())
O.adjustFireLoss(getFireLoss())
O.setToxLoss(getToxLoss(), 0)
O.adjustBruteLoss(getBruteLoss(), 0)
O.setOxyLoss(getOxyLoss(), 0)
O.setCloneLoss(getCloneLoss(), 0)
O.adjustFireLoss(getFireLoss(), 0)
O.updatehealth()
O.radiation = radiation
//re-add implants to new mob
@@ -229,10 +231,12 @@
//keep damage?
if (tr_flags & TR_KEEPDAMAGE)
O.setToxLoss(getToxLoss())
O.adjustBruteLoss(getBruteLoss())
O.setOxyLoss(getOxyLoss())
O.adjustFireLoss(getFireLoss())
O.setToxLoss(getToxLoss(), 0)
O.adjustBruteLoss(getBruteLoss(), 0)
O.setOxyLoss(getOxyLoss(), 0)
O.setCloneLoss(getCloneLoss(), 0)
O.adjustFireLoss(getFireLoss(), 0)
O.updatehealth()
O.radiation = radiation
//re-add implants to new mob

View File

@@ -191,6 +191,7 @@
t = replacetext(t, "\[/large\]", "</font>")
t = replacetext(t, "\[sign\]", "<font face=\"[SIGNFONT]\"><i>[user.real_name]</i></font>")
t = replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
t = replacetext(t, "\[tab\]", "&nbsp;")
if(!iscrayon)
t = replacetext(t, "\[*\]", "<li>")

View File

@@ -188,11 +188,10 @@
atoms.Add(T)
for(var/atom/movable/A in T)
if(A.invisibility)
if(see_ghosts)
if(isobserver(A))
var/mob/dead/observer/O = A
if(O.orbiting) //so you dont see ghosts following people like antags, etc.
continue
if(see_ghosts && isobserver(A))
var/mob/dead/observer/O = A
if(O.orbiting) //so you dont see ghosts following people like antags, etc.
continue
else
continue
atoms.Add(A)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -841,6 +841,7 @@
#include "code\game\objects\structures\beds_chairs\chair.dm"
#include "code\game\objects\structures\crates_lockers\closets.dm"
#include "code\game\objects\structures\crates_lockers\crates.dm"
#include "code\game\objects\structures\crates_lockers\closets\bodybag.dm"
#include "code\game\objects\structures\crates_lockers\closets\cardboardbox.dm"
#include "code\game\objects\structures\crates_lockers\closets\fitness.dm"
#include "code\game\objects\structures\crates_lockers\closets\gimmick.dm"