More resprites (Aug 2023) (#17076)

* New chem cartridges

* IV changes

* more resprites

* Auto stash before merge of "resprites2" and "origin/master"

* Auto stash before merge of "resprites2" and "origin/master"

* new tanks and cash

* removes tripping

* credit chip sound change

* wristbound resprite

* changelog

* changelog2

* deconfliction

* agh
This commit is contained in:
naut
2023-08-21 12:50:13 +00:00
committed by GitHub
parent 9e5fcd509b
commit 74a347b53d
11 changed files with 98 additions and 57 deletions
+22 -46
View File
@@ -37,6 +37,9 @@
var/epp = TRUE // Emergency Positive Pressure system. Can be toggled if you want to turn it off
var/epp_active = FALSE
//Matrix stuff
var/matrix/iv_matrix
//What we accept as a container for IV transfers. Prevents attaching food and organs to IVs.
var/list/accepted_containers = list(
/obj/item/reagent_containers/blood,
@@ -79,36 +82,6 @@
return
if(M.incapacitated())
return
if(tipped)
if(M.m_intent == M_RUN && M.a_intent == I_HURT)
if(breath_mask)
if(prob(60))
if(breather)
src.visible_message(
SPAN_WARNING("[M] trips on \the [src]'s [breath_mask] cable, pulling it off from \the [breather]!"),
SPAN_WARNING("You trip on \the [src]'s [breath_mask] cable, pulling it off from \the [breather]!"))
shake_animation(4)
M.Weaken(3)
breath_mask_rip()
return
src.visible_message(SPAN_WARNING("[M] trips on \the [src]'s [breath_mask] cable!"), SPAN_WARNING("You trip on \the [src]'s [breath_mask] cable!"))
breath_mask.forceMove(src.loc)
breath_mask = null
shake_animation(4)
M.Weaken(4)
update_icon()
return
src.visible_message(SPAN_WARNING("[M] barely avoids tripping on \the [src]'s [breath_mask] cable."), SPAN_WARNING("You barely avoid tripping on \the [src]'s [breath_mask] cable."))
shake_animation(2)
return
if(prob(25))
src.visible_message(SPAN_WARNING("[M] trips on \the [src]!"), SPAN_WARNING("You trip on \the [src]!"))
shake_animation(4)
M.Weaken(3)
return
src.visible_message(SPAN_WARNING("[M] almost trips on \the [src]!"), SPAN_WARNING("You almost trip on \the [src]!"))
shake_animation(2)
return
if(M.m_intent == M_RUN && M.a_intent == I_HURT)
src.visible_message(SPAN_WARNING("[M] bumps into \the [src], knocking it over!"), SPAN_WARNING("You bump into \the [src], knocking it over!"))
do_crash()
@@ -117,10 +90,10 @@
/obj/machinery/iv_drip/update_icon()
cut_overlays()
if(beaker)
add_overlay("beaker[tipped ? "_tipped" : ""]")
add_overlay("beaker")
var/datum/reagents/reagents = beaker.reagents
if(reagents?.total_volume)
var/image/filling = image('icons/obj/iv_drip.dmi', src, "[tipped ? "tipped_" : ""]reagent")
var/image/filling = image('icons/obj/iv_drip.dmi', src, "reagent")
var/percent = round((reagents.total_volume / beaker.volume) * 100)
var/fill_level = 0
switch(percent)
@@ -131,20 +104,20 @@
if(75 to 79) fill_level = 75
if(80 to 90) fill_level = 80
if(91 to INFINITY) fill_level = 100
filling.icon_state = "[tipped ? "tipped_" : ""]reagent[fill_level]"
filling.icon_state = "reagent[fill_level]"
var/reagent_color = reagents.get_color()
filling.icon += reagent_color
add_overlay(filling)
if(attached)
add_overlay("iv_in[tipped ? "_tipped" : ""]")
add_overlay("iv_in")
if(mode)
add_overlay("light_green[tipped ? "_tipped" : ""]")
add_overlay("light_green")
else
add_overlay("light_red[tipped ? "_tipped" : ""]")
add_overlay("light_red")
if(blood_message_sent)
add_overlay("light_yellow[tipped ? "_tipped" : ""]")
add_overlay("light_yellow")
else
add_overlay("iv_out[tipped ? "_tipped" : ""]")
add_overlay("iv_out")
if(tank)
if(istype(tank, /obj/item/tank/oxygen))
tank_type = "oxy"
@@ -154,7 +127,7 @@
tank_type = "phoron"
else
tank_type = "other"
add_overlay("tank_[tank_type][tipped ? "_tipped" : ""]")
add_overlay("tank_[tank_type]")
var/tank_level = 2
switch(tank.percent())
@@ -165,16 +138,16 @@
if(60 to 79) tank_level = 4
if(80 to 90) tank_level = 5
if(91 to INFINITY) tank_level = 6
add_overlay("[tank.gauge_icon][tank_level][tipped ? "_tipped" : ""]")
add_overlay("[tank.gauge_icon][tank_level]")
if(breath_mask)
if(breather)
add_overlay("mask_on[tipped ? "_tipped" : ""]")
add_overlay("mask_on")
else
add_overlay("mask_off[tipped ? "_tipped" : ""]")
add_overlay("mask_off")
if(epp_active)
add_overlay("light_blue[tipped ? "_tipped" : ""]")
add_overlay("light_blue")
if(panel_open)
add_overlay("panel_open[tipped ? "_tipped" : ""]")
add_overlay("panel_open")
/obj/machinery/iv_drip/process()
breather_process()
@@ -363,6 +336,7 @@
breather.equip_to_slot(breath_mask, slot_wear_mask)
breather.update_inv_wear_mask()
update_icon()
tank_on()
return
/obj/machinery/iv_drip/AltClick(mob/user)
@@ -493,6 +467,7 @@
user.visible_message("<b>[user]</b> pulls \the [src] upright.", "You pull \the [src] upright.")
icon_state = "iv_stand"
tipped = FALSE
animate(src, time = 3, transform = transform.Turn(-90), easing = SINE_EASING)
update_icon()
return
if(user.a_intent == I_HURT)
@@ -524,10 +499,10 @@
cut_overlays()
visible_message(SPAN_WARNING("\The [src] falls over with a buzz, spilling out it's contents!"))
flick("iv_crash[is_loose ? "" : "_tank_[tank_type]"]", src)
playsound(src, 'sound/items/drop/prosthetic.ogg', 50)
playsound(src, 'sound/effects/table_slam.ogg', 50)
spill()
tipped = TRUE
icon_state = "iv_stand_tipped"
animate(src, time = 5, transform = transform.Turn(90), easing = BOUNCE_EASING)
update_icon()
/obj/machinery/iv_drip/proc/spill()
@@ -606,6 +581,7 @@
return
/obj/machinery/iv_drip/proc/tank_off()
playsound(src, 'sound/effects/internals.ogg', 100)
tank.forceMove(src)
if(breather.internals)
breather.internals.icon_state = "internal0"
+11 -11
View File
@@ -15,8 +15,8 @@
var/access = list()
access = access_crate_cash
var/worth = 0
drop_sound = 'sound/items/drop/paper.ogg'
pickup_sound = 'sound/items/pickup/paper.ogg'
drop_sound = 'sound/items/drop/card.ogg'
pickup_sound = 'sound/items/pickup/card.ogg'
/obj/item/spacecash/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/spacecash))
@@ -73,7 +73,7 @@
add_overlay(ovr)
compile_overlays() // The delay looks weird, so we force an update immediately.
src.desc = "They are worth [worth] credits."
src.desc = "A bundle of Biesel Standard Credit chips. Combined, this is worth [worth] credits."
/obj/item/spacecash/bundle/attack_self(mob/user as mob)
var/amount = input(user, "How many credits do you want to take? (0 to [src.worth])", "Take Money", 20) as num
@@ -108,49 +108,49 @@
/obj/item/spacecash/c1
name = "1 credit chip"
icon_state = "spacecash1"
desc = "It's worth 1 credit."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 1 credit."
worth = 1
/obj/item/spacecash/c10
name = "10 credit chip"
icon_state = "spacecash10"
desc = "It's worth 10 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 10 credits."
worth = 10
/obj/item/spacecash/c20
name = "20 credit chip"
icon_state = "spacecash20"
desc = "It's worth 20 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 20 credits."
worth = 20
/obj/item/spacecash/c50
name = "50 credit chip"
icon_state = "spacecash50"
desc = "It's worth 50 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 50 credits."
worth = 50
/obj/item/spacecash/c100
name = "100 credit chip"
icon_state = "spacecash100"
desc = "It's worth 100 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 100 credits."
worth = 100
/obj/item/spacecash/c200
name = "200 credit chip"
icon_state = "spacecash200"
desc = "It's worth 200 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 200 credits."
worth = 200
/obj/item/spacecash/c500
name = "500 credit chip"
icon_state = "spacecash500"
desc = "It's worth 500 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 500 credits."
worth = 500
/obj/item/spacecash/c1000
name = "1000 credit chip"
icon_state = "spacecash1000"
desc = "It's worth 1000 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 1000 credits."
worth = 1000
/proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
@@ -3,6 +3,7 @@
desc = "This goes in a chemical dispenser."
icon_state = "cartridge"
filling_states = "20;40;60;80;100"
w_class = ITEMSIZE_NORMAL
volume = CARTRIDGE_VOLUME_LARGE
@@ -29,6 +30,19 @@
else
setLabel(R.name)
/obj/item/reagent_containers/chem_disp_cartridge/update_icon()
cut_overlays()
if(reagents?.total_volume)
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-[get_filling_state()]")
filling.color = reagents.get_color()
add_overlay(filling)
if(!is_open_container())
var/lid_icon = "lid_[icon_state]"
var/mutable_appearance/lid = mutable_appearance(icon, lid_icon)
add_overlay(lid)
/obj/item/reagent_containers/chem_disp_cartridge/examine(mob/user)
..()
to_chat(user, "It has a capacity of [volume] units.")
@@ -65,6 +79,7 @@
to_chat(user, "<span class='notice'>You clear the label on \the [src].</span>")
label = ""
name = initial(name)
update_icon()
/obj/item/reagent_containers/chem_disp_cartridge/attack_self()
..()
@@ -74,6 +89,11 @@
else
to_chat(usr, "<span class = 'notice'>You take the cap off \the [src].</span>")
flags |= OPENCONTAINER
update_icon()
/obj/item/reagent_containers/chem_disp_cartridge/attackby(obj/item/W as obj, mob/user as mob)
..()
update_icon()
/obj/item/reagent_containers/chem_disp_cartridge/afterattack(obj/target, mob/user , flag)
if (!is_open_container() || !flag)
@@ -108,3 +128,4 @@
else
return ..()
update_icon()
+44
View File
@@ -0,0 +1,44 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: nauticall
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Resprited the following things: IV drips, gas tanks (the handheld ones), the O2/CO2 jetpacks, laptops, medical wristbounds, chemical dispenser cartridges, and cash (now actual credit chips)."
- refactor: "Reworked the way IV drips fall over when tipped to be less sprite-tedious, and removed being able to trip on them. They still fall over."
- backend: "Various backend code changes to make the modernized objects more up-to-speed with their contemporaries (i.e. chemical dispensers now have physical lids)."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB