mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-07 13:21:50 +01:00
4b4e9dff1d
## What's going on here Kept you waitin huh! This pr resprites most all walls, windows and other "wall adjacent" things to a 3/4th perspective, technical term is "tall" walls (we are very smart). If you're trying to understand the technical details here, much of the "rendering tech" is built off the idea of split-vis. Basically, split a sprite up and render it on adjacent turfs, to prevent seeing "through" walls/doors, and to support seeing "edges" without actually seeing the atom itself. Most of the rest of it is pipelining done to accommodate how icons are cut. ## Path To Merge Almost* all sprites and code is done at this point. There are some things missing both on and off the bounty list, but that will be the case forever unless we force upstream (you guys) to stop adding new shit that doesn't fit the style. I plan on accepting and integrating prs to the current working repo <https://github.com/wall-nerds/wallening> up until a merge, to make contribution simpler and allow things like bounties to close out more easily This pr is quite bulky, even stripping away map changes it's maybe 7000 LOC (We have a few maps that were modified with UpdatePaths, I am also tentatively pring our test map, for future use.) This may inhibit proper review, although that is part of why I am willing to make it despite my perfectionism. Apologies in advance. Due to the perspective shift, a lot of mapping work is going to need to be done at some point. This comes in varying levels of priority. Many wallmounts are offset by hand, some are stuck in the wall/basically cannot be placed on the east/west/north edges of walls (posters), some just don't look great good in their current position. Tests are currently a minor bit yorked, I thought it was more important to get this up then to clean them fully. ## What does it look like?       ## Credits <details> <summary>Historical Mumbojumbo</summary> I am gonna do my best to document how this project came to be. I am operating off third party info and half remembered details, so if I'm wrong please yell at me. This project started sometime in late 2020, as a product of Rohesie trying to integrate and make easier work from Mojave Sun (A recently defunct fallout server) with /tg/. Mojave Sun (Apparently this was LITERALLY JUST infrared baron, that man is insane) was working with tall walls, IE walls that are 48px tall instead of the normal 32. This was I THINK done based off a technical prototype from aao7 proving A it was possible and B it didn't look like dogwater. This alongside oranges begging the art team for 3/4th walls (he meant TGMC style) lead to Rohesie bringing on contributors from general /tg/, including actionninja who would eventually take over as technical lead and Kryson, who would define /tg/'s version of the artstyle. Much of the formative aspects of this project are their work. The project was coming along pretty well for a few months, but ran into serious technical issues with `SIDE_MAP`, a byond map_format that allows for simpler 3/4th rendering. Due to BULLSHIT I will not detail here, the map format caused issues both at random with flickering and heavily with multiz. Concurrent with this, action stepped down after hacking out the rendering tech and starting work on an icon cutter that would allow for simpler icon generation, leaving ninjanomnom to manage the project. Some time passed, and the project stalled out due to the technical issues. Eventually I built a test case for the issues we had with `SIDE_MAP` and convinced lummox jr (byond's developer) to explain how the fuckin thing actually worked. This understanding made the project theoretically possible, but did not resolve the problems with multi-z. Resolving those required a full rework of how rendering like, worked. I (alongside tattle) took over project development from ninjanomnom at this time, and started work on Plane Cube (#69115), which when finished would finally make the project technically feasible. The time between then and now has been slow, progressive work. Many many artists and technical folks have dumped their time into this (as you can see from the credits). I will get into this more below but I would like to explicitly thank (in no particular order) tattle, draco, arcanemusic, actionninja, imaginos, viro and kylerace for keeping the project alive in this time period. I would have curled up into a ball and died if I had to do this all myself, your help has been indispensable. </details> <details> <summary>Detailed Credits</summary> Deep apologies if I have forgotten someone (I am sure I have, if someone is you please contact me). I've done my best to collate from the git log/my memory. Thanks to (In no particular order): Raccoff: Being funny to bully, creating threshold decals for airlocks aa07: (I think) inspiring the project ActionNinja: Laying the technical rock we build off, supporting me despite byond trying to kill him, building the icon cutter that makes this possible ArcaneMusic: Artistic and technical work spanning from the project's start to literally today, being a constant of motivation and positivity. I can't list all the stuff he's done Armhulen: Key rendering work (he's the reason thindows render right), an upbeat personality and a kick in the ass. Love you arm Azlan: Damn cool sprites, consistently Ben10Omintrix: You know ben showed up just to make basic mobs work, he's just fuckin like that man BigBimmer: A large amount of bounty work, alongside just like, throwing shit around. An absolute joy to work with Capsandi: Plaques, blastdoors, artistic work early on CapybaraExtravagante: Rendering work on wall frames Draco: SO MUCH STUFF. Much of the spritework done over the past two years is his, constantly engaged and will take on anything. I would have given up if not for you Floyd: Early rendering work, so early I don't even know the details. Enjoy freedom brother Imaginos16: A guiding hand through the middle years, handled much of the sprite review and contribution for a good bit there Iamgoofball: A dedication to detail and aesthetic goals, spends a lot of effort dissecting feedback with a focus on making things as good as they can be at the jump Infrared: Part of the impetus for the project, made all the xenomorph stuff in the MS style Jacquerel: A bunch of little upkeep/technical things, has done so much sprite gruntwork (WHY ARE THERE SO MANY PAINTING TYPES) Justice12354: Solved a bunch of error sprites (and worked out how to actually make prs to the project) Thanks bro! Kryson: Built the artstyle of the project, carrying on for years even when it was technically dying, only stopping to casually beat cancer. So much of our style and art is Kryson KylerAce: Handled annoying technical stuff for me, built window frame logic and fully got rid of grilles. LemonInTheDark: Rendering dirtywork, project management and just so much fucking time in dreammaker editing sprites Meyhazah: Table buttons, brass windows and alll the old style doors Mothblocks: Has provided constant support, gave me a deadline and motivation, erased worries about "it not being done", gave just SO much money to fill in the critical holes in sprites. Thanks moth MTandi: Contributed art despite his own blackjack and hookers club opening right down the road, I'm sorry I rolled over some of your sprites man I wish we had finished earlier Ninjanomnomnom: Consulted on gags issues, kept things alive through some truly shit times oranges: This is his fault Rohesie: Organized the effort, did much of the initial like, proof of concept stuff. I hope you're doin well whatever you're up to. san7890: Consulting on mapper UX/design problems, being my pet mapper Senefi: Offsetting items with a focus on detail/the more unused canidates SimplyLogan: Detailed map work and mapper feedback, personally very kind even if we end up talking past each other sometimes. Thank you! SpaceSmithers: Just like, random mapping support out of nowhere, and bein a straight up cool dude Tattle: A bunch of misc project management stuff, organizing the discord, managing the test server, dealing with all the mapping bullshit for me, being my backup in case of bus. I know you think you didn't do much but your presence and work have been a great help Thunder12345: Came out of nowhere and just so much of the random bounties, I'm kind of upset about how much we paid him Time-Green: I hooked him in by fucking with stuff he made and now he's just doin shit, thanks for helping out man! Twaticus: Provided artistic feedback and authority for my poor feeble coder brain, believed in the project for YEARS, was a constant source of ❤️ and affirmation unit0016: I have no god damn idea who she is, popped out of nowhere on the github one day and dealt with a bunch of annoying rendering/refactoring. Godspeed random furry thank you for all your effort and issue reports Viro: A bunch of detailed spriting moving towards 3/4ths, both on and off the wallening fork. If anyone believed this project would be done, it was viro Wallem: Artistic review and consultation, was my go-to guy for a long time when the other two spritetainers were inactive Waltermeldon: Cracked out a bunch of rendering work, he's the reason windows look like not dogwater. Alongside floyd and action spent a TON of time speaking to lummox/unearthing how byond rendering worked trying to make this thing happen ZephyrTFA: Added directional airlock helpers, dealt with a big fuckin bugaboo that was living in my brain like it was nothing. Love you brother And finally: The Mojave Sun development team. They provided a testbed for the idea, committed hundreds and hundreds of hours to the artstyle, and were a large reason we caught issues early enough to meaningfully deal with them. Your work is a testament to what longterm effort and deep detailed care produce. I hope you're doing well whatever you're up to. Go out with a bang! </details> ## Changelog 🆑 Raccoff, aa07, ActionNinja, ArcaneMusic, Armhulen, Azlan, Ben10Omintrix, BigBimmer, Capsandi, CapybaraExtravagante, Draco, Floyd, Iamgoofball, Imaginos16, Infrared, Jacquerel, Justice12354, Kryson, KylerAce, LemonInTheDark, Meyhazah, Mothblocks, MTandi, Ninjanomnom, oranges, Rohesie, Runi-c, san7890, Senefi, SimplyLogan, SomeAngryMiner, SpaceSmithers, Tattle, Thunder12345, Time-Green, Twaticus, unit0016, Viro, Waltermeldon, ZephyrTFA with thanks to the Mojave Sun team! add: Resprites or offsets almost all "tall" objects in the game to match a 3/4ths perspective add: Bunch of rendering mumbo jumbo to make said 3/4ths perspective work /🆑 --------- Co-authored-by: Jacquerel <hnevard@gmail.com> Co-authored-by: san7890 <the@san7890.com> Co-authored-by: = <stewartareid@outlook.com> Co-authored-by: Capsandi <dansullycc@gmail.com> Co-authored-by: ArcaneMusic <hero12290@aol.com> Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com> Co-authored-by: SomeAngryMiner <53237389+SomeAngryMiner@users.noreply.github.com> Co-authored-by: KylerAce <kylerlumpkin1@gmail.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: Runi-c <5150427+Runi-c@users.noreply.github.com> Co-authored-by: Roryl-c <5150427+Roryl-c@users.noreply.github.com> Co-authored-by: tattle <article.disaster@gmail.com> Co-authored-by: Senefi <20830349+Peliex@users.noreply.github.com> Co-authored-by: Justice <42555530+Justice12354@users.noreply.github.com> Co-authored-by: BluBerry016 <50649185+unit0016@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com> Co-authored-by: Rob Bailey <github@criticalaction.net> Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
771 lines
24 KiB
Plaintext
771 lines
24 KiB
Plaintext
/*
|
|
CONTAINS:
|
|
BEDSHEETS
|
|
LINEN BINS
|
|
*/
|
|
|
|
/obj/item/bedsheet
|
|
name = "bedsheet"
|
|
desc = "A surprisingly soft linen bedsheet."
|
|
icon = 'icons/obj/bedsheets.dmi'
|
|
lefthand_file = 'icons/mob/inhands/items/bedsheet_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/items/bedsheet_righthand.dmi'
|
|
icon_state = "sheetwhite"
|
|
inhand_icon_state = "sheetwhite"
|
|
drop_sound = 'sound/items/handling/cloth_drop.ogg'
|
|
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
|
|
slot_flags = ITEM_SLOT_NECK
|
|
layer = BELOW_MOB_LAYER
|
|
throwforce = 0
|
|
throw_speed = 1
|
|
throw_range = 2
|
|
w_class = WEIGHT_CLASS_TINY
|
|
resistance_flags = FLAMMABLE
|
|
dying_key = DYE_REGISTRY_BEDSHEET
|
|
interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING
|
|
|
|
dog_fashion = /datum/dog_fashion/head/ghost
|
|
/// Custom nouns to act as the subject of dreams
|
|
var/list/dream_messages = list("white")
|
|
/// Cutting it up will yield this.
|
|
var/stack_type = /obj/item/stack/sheet/cloth
|
|
/// The number of sheets dropped by this bedsheet when cut
|
|
var/stack_amount = 3
|
|
/// Denotes if the bedsheet is a single, double, or other kind of bedsheet
|
|
var/bedsheet_type = BEDSHEET_SINGLE
|
|
var/datum/weakref/signal_sleeper //this is our goldylocks
|
|
|
|
/obj/item/bedsheet/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/surgery_initiator)
|
|
AddElement(/datum/element/bed_tuckable, mapload, 0, 0, 0)
|
|
if(bedsheet_type == BEDSHEET_DOUBLE)
|
|
stack_amount *= 2
|
|
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
|
register_context()
|
|
register_item_context()
|
|
for(var/stuff as anything in loc)
|
|
if(istype(stuff, /obj/structure/bed))
|
|
pixel_y = DEPTH_OFFSET
|
|
return
|
|
|
|
/obj/item/bedsheet/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
|
if(istype(held_item) && (held_item.tool_behaviour == TOOL_WIRECUTTER || held_item.get_sharpness()))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Shred into cloth"
|
|
|
|
context[SCREENTIP_CONTEXT_ALT_LMB] = "Rotate"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
/obj/item/bedsheet/add_item_context(datum/source, list/context, mob/living/target)
|
|
if(isliving(target) && target.body_position == LYING_DOWN)
|
|
context[SCREENTIP_CONTEXT_RMB] = "Cover"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
return NONE
|
|
|
|
/obj/item/bedsheet/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers)
|
|
if(!isliving(interacting_with))
|
|
return NONE
|
|
var/mob/living/to_cover = interacting_with
|
|
if(to_cover.body_position != LYING_DOWN)
|
|
return ITEM_INTERACT_BLOCKING
|
|
if(!user.dropItemToGround(src))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
forceMove(get_turf(to_cover))
|
|
pixel_z = to_cover.pixel_z
|
|
balloon_alert(user, "covered")
|
|
coverup(to_cover)
|
|
add_fingerprint(user)
|
|
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/item/bedsheet/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
// Handle wirecutters here so we still tear it up in combat mode
|
|
if(tool.tool_behaviour != TOOL_WIRECUTTER && !tool.get_sharpness())
|
|
return NONE
|
|
|
|
// We cannot get free cloth from holograms
|
|
if(flags_1 & HOLOGRAM_1)
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
var/obj/item/stack/shreds = new stack_type(get_turf(src), stack_amount)
|
|
if(!QDELETED(shreds)) // Stacks merged
|
|
transfer_fingerprints_to(shreds)
|
|
shreds.add_fingerprint(user)
|
|
to_chat(user, span_notice("You tear [src] up."))
|
|
qdel(src)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/item/bedsheet/attack_self(mob/living/user)
|
|
if(!user.CanReach(src)) //No telekinetic grabbing.
|
|
return
|
|
if(user.body_position != LYING_DOWN)
|
|
return
|
|
if(!user.dropItemToGround(src))
|
|
return
|
|
|
|
coverup(user)
|
|
add_fingerprint(user)
|
|
|
|
/obj/item/bedsheet/click_alt(mob/living/user)
|
|
setDir(REVERSE_DIR(dir))
|
|
return CLICK_ACTION_SUCCESS
|
|
|
|
/obj/item/bedsheet/proc/coverup(mob/living/sleeper)
|
|
layer = ABOVE_MOB_LAYER
|
|
pixel_x = 0
|
|
pixel_y = 0
|
|
pixel_z = sleeper.pixel_z // Account for possible mob elevation
|
|
balloon_alert(sleeper, "covered")
|
|
var/angle = sleeper.lying_prev
|
|
dir = angle2dir(angle + 180) // 180 flips it to be the same direction as the mob
|
|
|
|
signal_sleeper = WEAKREF(sleeper)
|
|
RegisterSignal(src, COMSIG_ITEM_PICKUP, PROC_REF(on_pickup))
|
|
RegisterSignal(sleeper, COMSIG_MOVABLE_MOVED, PROC_REF(smooth_sheets))
|
|
RegisterSignal(sleeper, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(smooth_sheets))
|
|
RegisterSignal(sleeper, COMSIG_QDELETING, PROC_REF(smooth_sheets))
|
|
|
|
/obj/item/bedsheet/proc/smooth_sheets(mob/living/sleeper)
|
|
SIGNAL_HANDLER
|
|
|
|
UnregisterSignal(src, COMSIG_ITEM_PICKUP)
|
|
UnregisterSignal(sleeper, COMSIG_MOVABLE_MOVED)
|
|
UnregisterSignal(sleeper, COMSIG_LIVING_SET_BODY_POSITION)
|
|
UnregisterSignal(sleeper, COMSIG_QDELETING)
|
|
balloon_alert(sleeper, "smoothed sheets")
|
|
layer = initial(layer)
|
|
pixel_z = 0
|
|
signal_sleeper = null
|
|
|
|
// We need to do this in case someone picks up a bedsheet while a mob is covered up
|
|
// otherwise the bedsheet will disappear while in our hands if the sleeper signals get activated by moving
|
|
/obj/item/bedsheet/proc/on_pickup(datum/source, mob/grabber)
|
|
SIGNAL_HANDLER
|
|
|
|
var/mob/living/sleeper = signal_sleeper?.resolve()
|
|
|
|
UnregisterSignal(src, COMSIG_ITEM_PICKUP)
|
|
UnregisterSignal(sleeper, COMSIG_MOVABLE_MOVED)
|
|
UnregisterSignal(sleeper, COMSIG_LIVING_SET_BODY_POSITION)
|
|
UnregisterSignal(sleeper, COMSIG_QDELETING)
|
|
pixel_z = 0
|
|
signal_sleeper = null
|
|
|
|
/obj/item/bedsheet/blue
|
|
icon_state = "sheetblue"
|
|
inhand_icon_state = "sheetblue"
|
|
dream_messages = list("blue")
|
|
|
|
/obj/item/bedsheet/green
|
|
icon_state = "sheetgreen"
|
|
inhand_icon_state = "sheetgreen"
|
|
dream_messages = list("green")
|
|
|
|
/obj/item/bedsheet/grey
|
|
icon_state = "sheetgrey"
|
|
inhand_icon_state = "sheetgrey"
|
|
dream_messages = list("grey")
|
|
|
|
/obj/item/bedsheet/orange
|
|
icon_state = "sheetorange"
|
|
inhand_icon_state = "sheetorange"
|
|
dream_messages = list("orange")
|
|
|
|
/obj/item/bedsheet/purple
|
|
icon_state = "sheetpurple"
|
|
inhand_icon_state = "sheetpurple"
|
|
dream_messages = list("purple")
|
|
|
|
/obj/item/bedsheet/patriot
|
|
name = "patriotic bedsheet"
|
|
desc = "You've never felt more free than when sleeping on this."
|
|
icon_state = "sheetUSA"
|
|
inhand_icon_state = "sheetUSA"
|
|
dream_messages = list("America", "freedom", "fireworks", "bald eagles")
|
|
|
|
/obj/item/bedsheet/rainbow
|
|
name = "rainbow bedsheet"
|
|
desc = "A multicolored blanket. It's actually several different sheets cut up and sewn together."
|
|
icon_state = "sheetrainbow"
|
|
inhand_icon_state = "sheetrainbow"
|
|
dream_messages = list("red", "orange", "yellow", "green", "blue", "purple", "a rainbow")
|
|
|
|
/obj/item/bedsheet/red
|
|
icon_state = "sheetred"
|
|
inhand_icon_state = "sheetred"
|
|
dream_messages = list("red")
|
|
|
|
/obj/item/bedsheet/yellow
|
|
icon_state = "sheetyellow"
|
|
inhand_icon_state = "sheetyellow"
|
|
dream_messages = list("yellow")
|
|
|
|
/obj/item/bedsheet/mime
|
|
name = "mime's blanket"
|
|
desc = "A very soothing striped blanket. All the noise just seems to fade out when you're under the covers in this."
|
|
icon_state = "sheetmime"
|
|
inhand_icon_state = "sheetmime"
|
|
dream_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime")
|
|
|
|
/obj/item/bedsheet/clown
|
|
name = "clown's blanket"
|
|
desc = "A rainbow blanket with a clown mask woven in. It smells faintly of bananas."
|
|
icon_state = "sheetclown"
|
|
inhand_icon_state = "sheetrainbow"
|
|
dream_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown")
|
|
|
|
/obj/item/bedsheet/captain
|
|
name = "captain's bedsheet"
|
|
desc = "It has a Nanotrasen symbol on it, and was woven with a revolutionary new kind of thread guaranteed to have 0.01% permeability for most non-chemical substances, popular among most modern captains."
|
|
icon_state = "sheetcaptain"
|
|
inhand_icon_state = "sheetcaptain"
|
|
dream_messages = list("authority", "a golden ID", "sunglasses", "a green disc", "an antique gun", "the captain")
|
|
|
|
/obj/item/bedsheet/rd
|
|
name = "research director's bedsheet"
|
|
desc = "It appears to have a beaker emblem, and is made out of fire-resistant material, although it probably won't protect you in the event of fires you're familiar with every day."
|
|
icon_state = "sheetrd"
|
|
inhand_icon_state = "sheetrd"
|
|
dream_messages = list("authority", "a silvery ID", "a bomb", "a mech", "a facehugger", "maniacal laughter", "the research director")
|
|
|
|
// for Free Golems.
|
|
/obj/item/bedsheet/rd/royal_cape
|
|
name = "Royal Cape of the Liberator"
|
|
desc = "Majestic."
|
|
dream_messages = list("mining", "stone", "a golem", "freedom", "doing whatever")
|
|
|
|
/obj/item/bedsheet/medical
|
|
name = "medical blanket"
|
|
desc = "It's a 'sterilized' blanket commonly used in the Medbay."
|
|
icon_state = "sheetmedical"
|
|
inhand_icon_state = "sheetmedical"
|
|
dream_messages = list("healing", "life", "surgery", "a doctor")
|
|
|
|
/obj/item/bedsheet/cmo
|
|
name = "chief medical officer's bedsheet"
|
|
desc = "It's a sterilized blanket that has a cross emblem. There's some cat fur on it, likely from Runtime."
|
|
icon_state = "sheetcmo"
|
|
inhand_icon_state = "sheetcmo"
|
|
dream_messages = list("authority", "a silvery ID", "healing", "life", "surgery", "a cat", "the chief medical officer")
|
|
|
|
/obj/item/bedsheet/hos
|
|
name = "head of security's bedsheet"
|
|
desc = "It is decorated with a shield emblem. While crime doesn't sleep, you do, but you are still THE LAW!"
|
|
icon_state = "sheethos"
|
|
inhand_icon_state = "sheethos"
|
|
dream_messages = list("authority", "a silvery ID", "handcuffs", "a baton", "a flashbang", "sunglasses", "the head of security")
|
|
|
|
/obj/item/bedsheet/hop
|
|
name = "head of personnel's bedsheet"
|
|
desc = "It is decorated with a key emblem. For those rare moments when you can rest and cuddle with Ian without someone screaming for you over the radio."
|
|
icon_state = "sheethop"
|
|
inhand_icon_state = "sheethop"
|
|
dream_messages = list("authority", "a silvery ID", "obligation", "a computer", "an ID", "a corgi", "the head of personnel")
|
|
|
|
/obj/item/bedsheet/ce
|
|
name = "chief engineer's bedsheet"
|
|
desc = "It is decorated with a wrench emblem. It's highly reflective and stain resistant, so you don't need to worry about ruining it with oil."
|
|
icon_state = "sheetce"
|
|
inhand_icon_state = "sheetce"
|
|
dream_messages = list("authority", "a silvery ID", "the engine", "power tools", "an APC", "a parrot", "the chief engineer")
|
|
|
|
/obj/item/bedsheet/qm
|
|
name = "quartermaster's bedsheet"
|
|
desc = "It is decorated with a crate emblem in silver lining. It's rather tough, and just the thing to lie on after a hard day of pushing paper."
|
|
icon_state = "sheetqm"
|
|
inhand_icon_state = "sheetqm"
|
|
dream_messages = list("authority", "a silvery ID", "a shuttle", "a crate", "a sloth", "the quartermaster")
|
|
|
|
/obj/item/bedsheet/chaplain
|
|
name = "chaplain's blanket"
|
|
desc = "A blanket woven with the hearts of gods themselves... Wait, that's just linen."
|
|
icon_state = "sheetchap"
|
|
inhand_icon_state = "sheetchap"
|
|
dream_messages = list("a grey ID", "the gods", "a fulfilled prayer", "a cult", "the chaplain")
|
|
|
|
/obj/item/bedsheet/brown
|
|
icon_state = "sheetbrown"
|
|
inhand_icon_state = "sheetbrown"
|
|
dream_messages = list("brown")
|
|
|
|
/obj/item/bedsheet/black
|
|
icon_state = "sheetblack"
|
|
inhand_icon_state = "sheetblack"
|
|
dream_messages = list("black")
|
|
|
|
/obj/item/bedsheet/centcom
|
|
name = "\improper CentCom bedsheet"
|
|
desc = "Woven with advanced nanothread for warmth as well as being very decorated, essential for all officials."
|
|
icon_state = "sheetcentcom"
|
|
inhand_icon_state = "sheetcentcom"
|
|
dream_messages = list("a unique ID", "authority", "artillery", "an ending")
|
|
|
|
/obj/item/bedsheet/syndie
|
|
name = "syndicate bedsheet"
|
|
desc = "It has a syndicate emblem and it has an aura of evil."
|
|
icon_state = "sheetsyndie"
|
|
inhand_icon_state = "sheetsyndie"
|
|
dream_messages = list("a green disc", "a red crystal", "a glowing blade", "a wire-covered ID")
|
|
|
|
/obj/item/bedsheet/cult
|
|
name = "cultist's bedsheet"
|
|
desc = "You might dream of Nar'Sie if you sleep with this. It seems rather tattered and glows of an eldritch presence."
|
|
icon_state = "sheetcult"
|
|
inhand_icon_state = "sheetcult"
|
|
dream_messages = list("a tome", "a floating red crystal", "a glowing sword", "a bloody symbol", "a massive humanoid figure")
|
|
|
|
/obj/item/bedsheet/wiz
|
|
name = "wizard's bedsheet"
|
|
desc = "A special fabric enchanted with magic so you can have an enchanted night. It even glows!"
|
|
icon_state = "sheetwiz"
|
|
inhand_icon_state = "sheetwiz"
|
|
dream_messages = list("a book", "an explosion", "lightning", "a staff", "a skeleton", "a robe", "magic")
|
|
|
|
/obj/item/bedsheet/rev
|
|
name = "revolutionary's bedsheet"
|
|
desc = "A bedsheet stolen from a Central Command official's bedroom, used a symbol of triumph against Nanotrasen's tyranny. The golden emblem on the front has been scribbled out."
|
|
icon_state = "sheetrev"
|
|
inhand_icon_state = "sheetrev"
|
|
dream_messages = list(
|
|
"the people",
|
|
"liberation",
|
|
"collaboration",
|
|
"heads rolling",
|
|
"so, so many baseball bats",
|
|
"blinding light",
|
|
"your brothers in arms"
|
|
)
|
|
|
|
/obj/item/bedsheet/nanotrasen
|
|
name = "\improper Nanotrasen bedsheet"
|
|
desc = "It has the Nanotrasen logo on it and has an aura of duty."
|
|
icon_state = "sheetNT"
|
|
inhand_icon_state = "sheetNT"
|
|
dream_messages = list("authority", "an ending")
|
|
|
|
/obj/item/bedsheet/ian
|
|
icon_state = "sheetian"
|
|
inhand_icon_state = "sheetian"
|
|
dream_messages = list("a dog", "a corgi", "woof", "bark", "arf")
|
|
|
|
/obj/item/bedsheet/runtime
|
|
icon_state = "sheetruntime"
|
|
inhand_icon_state = "sheetruntime"
|
|
dream_messages = list("a kitty", "a cat", "meow", "purr", "nya~")
|
|
|
|
/obj/item/bedsheet/pirate
|
|
name = "pirate's bedsheet"
|
|
desc = "It has a Jolly Roger emblem on it and has a faint scent of grog."
|
|
icon_state = "sheetpirate"
|
|
inhand_icon_state = "sheetpirate"
|
|
dream_messages = list(
|
|
"a buried treasure",
|
|
"an island",
|
|
"a monkey",
|
|
"a parrot",
|
|
"a swashbuckler",
|
|
"a talking skull",
|
|
"avast",
|
|
"being a pirate",
|
|
"'cause a pirate is free",
|
|
"doing whatever you want",
|
|
"gold",
|
|
"landlubbers",
|
|
"stealing",
|
|
"sailing the Seven Seas",
|
|
"yarr",
|
|
)
|
|
|
|
/obj/item/bedsheet/gondola
|
|
name = "gondola bedsheet"
|
|
desc = "A precious bedsheet made from the hide of a endangered and peculiar critter."
|
|
icon_state = "sheetgondola"
|
|
inhand_icon_state = "sheetgondola"
|
|
dream_messages = list("peace", "comfiness", "a rare critter", "a harmless creature")
|
|
stack_type = /obj/item/stack/sheet/animalhide/gondola
|
|
stack_amount = 1
|
|
///one of four icon states that represent its mouth
|
|
var/gondola_mouth
|
|
///one of four icon states that represent its eyes
|
|
var/gondola_eyes
|
|
|
|
/obj/item/bedsheet/gondola/Initialize(mapload)
|
|
. = ..()
|
|
gondola_mouth = "sheetgondola_mouth[rand(1, 4)]"
|
|
gondola_eyes = "sheetgondola_eyes[rand(1, 4)]"
|
|
add_overlay(gondola_mouth)
|
|
add_overlay(gondola_eyes)
|
|
|
|
/obj/item/bedsheet/gondola/worn_overlays(mutable_appearance/standing, isinhands, icon_file)
|
|
. = ..()
|
|
if(!isinhands)
|
|
. += mutable_appearance(icon_file, gondola_mouth)
|
|
. += mutable_appearance(icon_file, gondola_eyes)
|
|
|
|
/obj/item/bedsheet/cosmos
|
|
name = "cosmic space bedsheet"
|
|
desc = "Made from the dreams of those who wonder at the stars."
|
|
icon_state = "sheetcosmos"
|
|
inhand_icon_state = "sheetcosmos"
|
|
dream_messages = list("the infinite cosmos", "Hans Zimmer music", "a flight through space", "the galaxy", "being fabulous", "shooting stars")
|
|
light_power = 2
|
|
light_range = 1.4
|
|
|
|
/obj/item/bedsheet/double
|
|
icon_state = "double_sheetwhite"
|
|
worn_icon_state = "sheetwhite"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/blue/double
|
|
icon_state = "double_sheetblue"
|
|
worn_icon_state = "sheetblue"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/green/double
|
|
icon_state = "double_sheetgreen"
|
|
worn_icon_state = "sheetgreen"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/grey/double
|
|
icon_state = "double_sheetgrey"
|
|
worn_icon_state = "sheetgrey"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/orange/double
|
|
icon_state = "double_sheetorange"
|
|
worn_icon_state = "sheetorange"
|
|
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/purple/double
|
|
icon_state = "double_sheetpurple"
|
|
worn_icon_state = "sheetpurple"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/patriot/double
|
|
icon_state = "double_sheetUSA"
|
|
worn_icon_state = "sheetUSA"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/rainbow/double
|
|
icon_state = "double_sheetrainbow"
|
|
worn_icon_state = "sheetrainbow"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/red/double
|
|
icon_state = "double_sheetred"
|
|
worn_icon_state = "sheetred"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/yellow/double
|
|
icon_state = "double_sheetyellow"
|
|
worn_icon_state = "sheetyellow"
|
|
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/mime/double
|
|
icon_state = "double_sheetmime"
|
|
worn_icon_state = "sheetmime"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/clown/double
|
|
icon_state = "double_sheetclown"
|
|
worn_icon_state = "sheetclown"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/captain/double
|
|
icon_state = "double_sheetcaptain"
|
|
worn_icon_state = "sheetcaptain"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/rd/double
|
|
icon_state = "double_sheetrd"
|
|
worn_icon_state = "sheetrd"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/medical/double
|
|
icon_state = "double_sheetmedical"
|
|
worn_icon_state = "sheetmedical"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/cmo/double
|
|
icon_state = "double_sheetcmo"
|
|
worn_icon_state = "sheetcmo"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/hos/double
|
|
icon_state = "double_sheethos"
|
|
worn_icon_state = "sheethos"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/hop/double
|
|
icon_state = "double_sheethop"
|
|
worn_icon_state = "sheethop"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/ce/double
|
|
icon_state = "double_sheetce"
|
|
worn_icon_state = "sheetce"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/qm/double
|
|
icon_state = "double_sheetqm"
|
|
worn_icon_state = "sheetqm"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/chaplain/double
|
|
icon_state = "double_sheetchap"
|
|
worn_icon_state = "sheetchap"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/brown/double
|
|
icon_state = "double_sheetbrown"
|
|
worn_icon_state = "sheetbrown"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/black/double
|
|
icon_state = "double_sheetblack"
|
|
worn_icon_state = "sheetblack"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/centcom/double
|
|
icon_state = "double_sheetcentcom"
|
|
worn_icon_state = "sheetcentcom"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/syndie/double
|
|
icon_state = "double_sheetsyndie"
|
|
worn_icon_state = "sheetsyndie"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/cult/double
|
|
icon_state = "double_sheetcult"
|
|
worn_icon_state = "sheetcult"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/wiz/double
|
|
icon_state = "double_sheetwiz"
|
|
worn_icon_state = "sheetwiz"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/rev/double
|
|
icon_state = "double_sheetrev"
|
|
worn_icon_state = "sheetrev"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/nanotrasen/double
|
|
icon_state = "double_sheetNT"
|
|
worn_icon_state = "sheetNT"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/ian/double
|
|
icon_state = "double_sheetian"
|
|
worn_icon_state = "sheetian"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/runtime/double
|
|
icon_state = "double_sheetruntime"
|
|
worn_icon_state = "sheetruntime"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/item/bedsheet/cosmos/double
|
|
icon_state = "double_sheetcosmos"
|
|
worn_icon_state = "sheetcosmos"
|
|
bedsheet_type = BEDSHEET_DOUBLE
|
|
|
|
/obj/structure/bedsheetbin
|
|
name = "linen bin"
|
|
desc = "It looks rather cosy."
|
|
icon = 'icons/obj/structures.dmi'
|
|
icon_state = "linenbin-full"
|
|
base_icon_state = "linenbin"
|
|
anchored = TRUE
|
|
pass_flags = PASSTABLE
|
|
resistance_flags = FLAMMABLE
|
|
max_integrity = 70
|
|
anchored_tabletop_offset = 6
|
|
/// The number of bedsheets in the bin
|
|
var/amount = 10
|
|
/// A list of actual sheets within the bin
|
|
var/list/sheets = list()
|
|
/// The object hiddin within the bedsheet bin
|
|
var/obj/item/hidden = null
|
|
|
|
/obj/structure/bedsheetbin/empty
|
|
amount = 0
|
|
icon_state = "linenbin-empty"
|
|
anchored = FALSE
|
|
|
|
|
|
/obj/structure/bedsheetbin/Initialize(mapload)
|
|
. = ..()
|
|
register_context()
|
|
|
|
/obj/structure/bedsheetbin/examine(mob/user)
|
|
. = ..()
|
|
if(amount < 1)
|
|
. += "There are no bed sheets in the bin."
|
|
else if(amount == 1)
|
|
. += "There is one bed sheet in the bin."
|
|
else
|
|
. += "There are [amount] bed sheets in the bin."
|
|
|
|
/obj/structure/bedsheetbin/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
|
if(isnull(held_item))
|
|
if(amount)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Take bedsheet"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
return
|
|
|
|
if(istype(held_item, /obj/item/bedsheet))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Put in"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
|
|
context[SCREENTIP_CONTEXT_RMB] = "Disassemble"
|
|
. = CONTEXTUAL_SCREENTIP_SET
|
|
else if(held_item.tool_behaviour == TOOL_WRENCH)
|
|
context[SCREENTIP_CONTEXT_RMB] = "[anchored ? "Una" : "A"]nchor"
|
|
. = CONTEXTUAL_SCREENTIP_SET
|
|
|
|
if(amount && held_item.w_class < WEIGHT_CLASS_BULKY)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Hide item in"
|
|
. = CONTEXTUAL_SCREENTIP_SET
|
|
return .
|
|
|
|
/obj/structure/bedsheetbin/update_icon_state()
|
|
switch(amount)
|
|
if(0)
|
|
icon_state = "[base_icon_state]-empty"
|
|
if(1 to 5)
|
|
icon_state = "[base_icon_state]-half"
|
|
else
|
|
icon_state = "[base_icon_state]-full"
|
|
return ..()
|
|
|
|
/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume)
|
|
if(amount)
|
|
amount = 0
|
|
update_appearance()
|
|
..()
|
|
|
|
/obj/structure/bedsheetbin/screwdriver_act_secondary(mob/living/user, obj/item/tool)
|
|
if(amount)
|
|
to_chat(user, span_warning("The [src] must be empty first!"))
|
|
return ITEM_INTERACT_SUCCESS
|
|
if(tool.use_tool(src, user, 0.5 SECONDS, volume=50))
|
|
to_chat(user, span_notice("You disassemble the [src]."))
|
|
new /obj/item/stack/rods(loc, 2)
|
|
qdel(src)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/bedsheetbin/wrench_act_secondary(mob/living/user, obj/item/tool)
|
|
. = ..()
|
|
default_unfasten_wrench(user, tool, time = 0.5 SECONDS)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/bedsheetbin/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
if(istype(tool, /obj/item/bedsheet))
|
|
return bedsheet_act(user, tool)
|
|
|
|
// Everything else we try to hide
|
|
return hide_item_act(user, tool)
|
|
|
|
/obj/structure/bedsheetbin/proc/bedsheet_act(mob/living/user, obj/item/tool)
|
|
if(!user.transferItemToLoc(tool, src, silent = FALSE))
|
|
return ITEM_INTERACT_BLOCKING
|
|
sheets.Add(tool)
|
|
amount++
|
|
to_chat(user, span_notice("You put [tool] in [src]."))
|
|
update_appearance()
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/bedsheetbin/proc/hide_item_act(mob/living/user, obj/item/tool)
|
|
if(user.combat_mode)
|
|
return NONE
|
|
if(tool.w_class >= WEIGHT_CLASS_BULKY)
|
|
balloon_alert(user, "too big!")
|
|
return ITEM_INTERACT_BLOCKING
|
|
if(!amount)
|
|
balloon_alert(user, "nothing to hide under!")
|
|
return ITEM_INTERACT_BLOCKING
|
|
if(hidden)
|
|
balloon_alert(user, "already something there!")
|
|
return ITEM_INTERACT_BLOCKING
|
|
if(!user.transferItemToLoc(tool, src, silent = FALSE))
|
|
to_chat(user, span_warning("\The [tool] is stuck to your hand, you cannot hide it among the sheets!"))
|
|
return ITEM_INTERACT_BLOCKING
|
|
hidden = tool
|
|
to_chat(user, span_notice("You hide [tool] among the sheets."))
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/bedsheetbin/attack_paw(mob/user, list/modifiers)
|
|
return attack_hand(user, modifiers)
|
|
|
|
/obj/structure/bedsheetbin/attack_hand(mob/user, list/modifiers)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(isliving(user))
|
|
var/mob/living/L = user
|
|
if(!(L.mobility_flags & MOBILITY_PICKUP))
|
|
return
|
|
if(amount >= 1)
|
|
amount--
|
|
|
|
var/obj/item/bedsheet/B
|
|
if(sheets.len > 0)
|
|
B = sheets[sheets.len]
|
|
sheets.Remove(B)
|
|
|
|
else
|
|
B = new /obj/item/bedsheet(loc)
|
|
|
|
B.forceMove(drop_location())
|
|
user.put_in_hands(B)
|
|
to_chat(user, span_notice("You take [B] out of [src]."))
|
|
update_appearance()
|
|
|
|
if(hidden)
|
|
hidden.forceMove(drop_location())
|
|
to_chat(user, span_notice("[hidden] falls out of [B]!"))
|
|
hidden = null
|
|
|
|
add_fingerprint(user)
|
|
|
|
|
|
/obj/structure/bedsheetbin/attack_tk(mob/user)
|
|
if(amount >= 1)
|
|
amount--
|
|
|
|
var/obj/item/bedsheet/B
|
|
if(sheets.len > 0)
|
|
B = sheets[sheets.len]
|
|
sheets.Remove(B)
|
|
|
|
else
|
|
B = new /obj/item/bedsheet(loc)
|
|
|
|
B.forceMove(drop_location())
|
|
to_chat(user, span_notice("You telekinetically remove [B] from [src]."))
|
|
update_appearance()
|
|
|
|
if(hidden)
|
|
hidden.forceMove(drop_location())
|
|
hidden = null
|
|
|
|
add_fingerprint(user)
|
|
return COMPONENT_CANCEL_ATTACK_CHAIN
|
|
|
|
/obj/structure/bedsheetbin/basket
|
|
name = "linen basket"
|
|
icon_state = "linenbasket-full"
|
|
base_icon_state = "linenbasket"
|
|
|
|
/obj/structure/bedsheetbin/empty/basket
|
|
name = "linen basket"
|
|
icon_state = "linenbasket-empty"
|
|
base_icon_state = "linenbasket"
|