mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-05-14 02:40:23 +01:00
f4b37b4177
* Get pants that match or else you gonna look silly yo
* Posters
* Fix other hud elements
* Rereviewed
* Update shotglass.dm
* Fix for new merged PRs
* Typo
* Coming across other stuff
* Update theblob.dm
* No takebacksies
* smh i forget to leave a comment
* Updated for the detgun and cards
* Should have rerun langserver again
* No longer plastic, more in scope
* Damn you bluespace
* Reverting turret logic, out of scope at this point
* Tweak that part
* Went over energy guns again, and fixed UI White's sprite sheet
* Welding masks, glasses, and JUSTICE
* Update portable_atmospherics.dm
* Cleaning up, clearing things up
* Review and suggestions
* Update valve.dm
* More tweaks
* Missing character
* Not distinct lightmasks, so they can be overlays
* Update generator.dm
* Add parameter so holodeck doesn't try to make a perfect copy
* Update unsorted.dm
* Spiders
* Better fix for spiders, fix vamps too
* Ghosts
* Update telekinesis.dm
* Cleaning up old procs
* It's set up to not copy datums... Unless they're in a list
* Donuts, duct tape, and detgun. D3VR coming to Early Access
* Update procs that interact with doors so they call update_state instead
* Forgot one spot, and actually might as well just force lock
* Cleaning up other things... Sigh, and kitty ears
* oops
* Getting used to how it works
* blinds
* Going back to the suit obscuring thing, so it doesn't update all the time
* Missed that from merging master
* I made this PR and forgot about it
* Fix runtimes in cards
* Make things a bit more unified
* Update update_icons.dm
* yarn, really?
* Update library_equipment.dm
* Update shieldgen.dm
* Every time Charlie merges something, I go back and see if I can improve things further
* what's this? more?
* Update misc_special.dm
* wow, paper
* Review
* More reviews
* To be sure, seems like being broken messed something sometimes
* Brought airlocks closer to how TG works to iron out some stuff
* Pizza and morgue
* Doesn't seem to hurt, tried with holodeck
* Revert "Doesn't seem to hurt, tried with holodeck"
This reverts commit 158529302b.
* Icon conflict
* Fix organ damage
* Don't ask how. Why. It's like that on prod too.
* Cutting down on things and updating from TG.
* More flexible. Just in case the thing you stuck it on didn't destroy.
* Hydro was one the things I touched earlier on, better rework it
* Reviews
* Cleaning up further, also bri'ish
* Undo a change I did, and switch over to a more recent implementation
* Update biogenerator.dm
* Rolling back to old airlocks, but with new duct taped note
* Functionally the same. I'd just rather not have the smoothing happen there
* Went over APCs again
* Fix welding helmet names in species files
* Update airlock.dm
* Update persistent_overlay.dm
* Oh, topic
101 lines
2.6 KiB
Plaintext
101 lines
2.6 KiB
Plaintext
/obj/item/ashtray
|
|
icon = 'icons/ashtray.dmi'
|
|
var/max_butts = 0
|
|
var/icon_half = ""
|
|
var/icon_full = ""
|
|
|
|
/obj/item/ashtray/Initialize(mapload)
|
|
. = ..()
|
|
pixel_y = rand(-5, 5)
|
|
pixel_x = rand(-6, 6)
|
|
|
|
/obj/item/ashtray/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, /obj/item/cigbutt) || istype(I, /obj/item/clothing/mask/cigarette) || istype(I, /obj/item/match))
|
|
if(contents.len >= max_butts)
|
|
to_chat(user, "This ashtray is full.")
|
|
return
|
|
if(!user.unEquip(I))
|
|
return
|
|
I.forceMove(src)
|
|
|
|
if(istype(I, /obj/item/clothing/mask/cigarette))
|
|
var/obj/item/clothing/mask/cigarette/cig = I
|
|
if(cig.lit)
|
|
visible_message("[user] crushes [cig] in [src], putting it out.")
|
|
var/obj/item/butt = new cig.type_butt(src)
|
|
cig.transfer_fingerprints_to(butt)
|
|
qdel(cig)
|
|
else
|
|
to_chat(user, "You place [cig] in [src] without even smoking it. Why would you do that?")
|
|
|
|
visible_message("[user] places [I] in [src].")
|
|
add_fingerprint(user)
|
|
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/ashtray/update_icon_state()
|
|
if(contents.len == max_butts)
|
|
icon_state = icon_full
|
|
else if(contents.len > max_butts * 0.5)
|
|
icon_state = icon_half
|
|
else
|
|
icon_state = initial(icon_state)
|
|
|
|
/obj/item/ashtray/update_desc()
|
|
. = ..()
|
|
if(contents.len == max_butts)
|
|
desc = initial(desc) + " It's stuffed full."
|
|
else if(contents.len > max_butts * 0.5)
|
|
desc = initial(desc) + " It's half-filled."
|
|
else
|
|
desc = initial(desc)
|
|
|
|
/obj/item/ashtray/deconstruct()
|
|
empty_tray()
|
|
qdel(src)
|
|
|
|
/obj/item/ashtray/proc/empty_tray()
|
|
for(var/obj/item/I in contents)
|
|
I.forceMove(loc)
|
|
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
|
|
|
|
/obj/item/ashtray/throw_impact(atom/hit_atom)
|
|
if(contents.len)
|
|
visible_message("<span class='warning'>[src] slams into [hit_atom] spilling its contents!</span>")
|
|
empty_tray()
|
|
return ..()
|
|
|
|
/obj/item/ashtray/plastic
|
|
name = "plastic ashtray"
|
|
desc = "Cheap plastic ashtray."
|
|
icon_state = "ashtray_bl"
|
|
icon_half = "ashtray_half_bl"
|
|
icon_full = "ashtray_full_bl"
|
|
max_butts = 8
|
|
max_integrity = 8
|
|
materials = list(MAT_METAL=30, MAT_GLASS=30)
|
|
throwforce = 3
|
|
|
|
/obj/item/ashtray/bronze
|
|
name = "bronze ashtray"
|
|
desc = "Massive bronze ashtray."
|
|
icon_state = "ashtray_br"
|
|
icon_half = "ashtray_half_br"
|
|
icon_full = "ashtray_full_br"
|
|
max_butts = 16
|
|
max_integrity = 16
|
|
materials = list(MAT_METAL=80)
|
|
throwforce = 10
|
|
|
|
/obj/item/ashtray/glass
|
|
name = "glass ashtray"
|
|
desc = "Glass ashtray. Looks fragile."
|
|
icon_state = "ashtray_gl"
|
|
icon_half = "ashtray_half_gl"
|
|
icon_full = "ashtray_full_gl"
|
|
max_butts = 12
|
|
max_integrity = 12
|
|
materials = list(MAT_GLASS=60)
|
|
throwforce = 6
|