Color Coded Autoinjectors
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Color Coded Autoinjectors
Summary (a quick, 2-3 sentence summary): Please add a colored line denoting what kind of auto-injector an auto-injector is.
Benefits (How this will benefit the server and game as a whole): This would help combat medics, that way they can visually see a colored line, instead of having to mouse over every injector, or remember in which location injectors
Details (Description of how you think this would work, the benefits, etc): Just some sprite and code editing, I'll see if I can get a working example on some Baycode.
Implementation (Optional, if you have an idea how to implement it): Spriting and Code
Edit: Attaching a .zip that has the .png's of autoinjectors I colored. Seemed pretty simple to change the icon for autoinjectors in the code.
Benefits (How this will benefit the server and game as a whole): This would help combat medics, that way they can visually see a colored line, instead of having to mouse over every injector, or remember in which location injectors
Details (Description of how you think this would work, the benefits, etc): Just some sprite and code editing, I'll see if I can get a working example on some Baycode.
Implementation (Optional, if you have an idea how to implement it): Spriting and Code
Edit: Attaching a .zip that has the .png's of autoinjectors I colored. Seemed pretty simple to change the icon for autoinjectors in the code.
You do not have the required permissions to view the files attached to this post.
Last edited by HalfdeadKiller on 07 Dec 2015, 11:52, edited 1 time in total.
- coolsurf6
- Registered user
- Posts: 321
- Joined: 25 Oct 2015, 04:06
- Location: Trapped in a black hole that is Garry's Mod
- Byond: coolsurf6
Re: Color Coded Autoinjectors
I really like the idea since its hard to distinguish whats what and if your patient is injured and you spend half your time finding what injecter you should use when you could be helping them so that they could get back in the fight easier. Its very simple to do and it might just take 15 minutes to do both spriting and coding since its just finding the injecter sprite in the first place.
+1
+1
Last edited by coolsurf6 on 06 Dec 2015, 00:05, edited 1 time in total.
The FitnessGram™ Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly, but gets faster each minute after you hear this signal. [beep] A single lap should be completed each time you hear this sound. [ding] Remember to run in a straight line, and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark, get ready, start.
- Arachnidnexus
- Donor
- Posts: 449
- Joined: 04 Sep 2015, 20:50
Re: Color Coded Autoinjectors
+1 For color-coded autoinjectors. Would be nice to have as a medic or doctor for when you really want to shave seconds off of your treatment time.
- WyattH
- Registered user
- Posts: 305
- Joined: 10 Sep 2015, 22:36
Re: Color Coded Autoinjectors
uh...did you mean +1 ?coolsurf6 wrote:I really like the idea since its hard to distinguish whats what and if your patient is injured and you spend half your time finding what injecter you should use when you could be helping them so that they could get back in the fight easier. Its very simple to do and it might just take 15 minutes to do both spriting and coding since its just finding the injecter sprite in the first place.
-1
Also I think this is a good idea if it can be implemented, +1 from me
- zskninoh
- Registered user
- Posts: 161
- Joined: 22 Oct 2015, 20:26
- Location: Florida
Re: Color Coded Autoinjectors
+1 for sure, would really be convenient.
Tᴏ ᴘʀᴏᴛᴇᴄᴛ ᴛʜᴇ ᴄʜᴀᴛ ғʀᴏᴍ ᴅᴇᴠᴀsᴛᴀᴛɪᴏɴ. ᴛᴏ ᴜɴɪᴛᴇ ᴀʟʟ sᴘᴀᴍᴍᴇʀs ᴡɪᴛʜɪɴ ᴏᴜʀ ɴᴀᴛɪᴏɴ. ᴛᴏ ᴅᴇɴᴏᴜɴᴄᴇ ᴛʜᴇ ᴇᴠɪʟ ᴏғ Tʀᴜᴍᴘ Hillary Clinton ᴀɴᴅ ᴍᴏᴅs. ᴛᴏ ᴇxᴛᴇɴᴅ ᴏᴜʀ sᴘᴀᴍ ᴛᴏ ᴛʜᴇ sᴛᴀʀs ᴀʙᴏᴠᴇ. ᴄᴏᴘʏ! ᴘᴀsᴛᴇ! ᴄʜᴀᴛ sᴘᴀᴍ ʙʟᴀsᴛ ᴏғғ ᴀᴛ ᴛʜᴇ sᴘᴇᴇᴅ ᴏғ ʟɪɢʜᴛ! sᴜʀʀᴇɴᴅᴇʀ ᴍᴏᴅs ᴏʀ ᴘʀᴇᴘᴀʀᴇ ᴛᴏ ғɪɢʜᴛ.
- Edgelord
- Donor
- Posts: 830
- Joined: 21 Jul 2015, 12:52
- Byond: Edgelord
Re: Color Coded Autoinjectors
+1 would make for faster and more efficient medical work
Dayton 'Day' Mann
"That wiggling sensation you feel in your ass is Weyland-Yutani's fingers working you like a puppet."
"That wiggling sensation you feel in your ass is Weyland-Yutani's fingers working you like a puppet."
- Releasing
- Registered user
- Posts: 124
- Joined: 16 Aug 2015, 04:44
- Byond: Releasing
Re: Color Coded Autoinjectors
+1, for reasons above. I've memorized where most of the autoinjectors already are in the Combat Lifesaver Bag, but it'd be definitely be easier to have them color-coded.
Melissa Wright. Mel, for short.
Jessie 'Jester' Streeter says, "Throw our hands in the air go, EYYY-YOOO, I THINK I'M GOING LES-BOOOO"
OOC: Freemysoul: DEAD: Terry 'Oddball' Shrapnel says, "Melissa wright hasn't even discovered fire yet and the brass gives her a rifle"
pls no
Jessie 'Jester' Streeter says, "Throw our hands in the air go, EYYY-YOOO, I THINK I'M GOING LES-BOOOO"
OOC: Freemysoul: DEAD: Terry 'Oddball' Shrapnel says, "Melissa wright hasn't even discovered fire yet and the brass gives her a rifle"
pls no
-
- Registered user
- Posts: 603
- Joined: 10 Aug 2015, 22:14
Re: Color Coded Autoinjectors
Dexalin Plus = Blue
Kelotane/Deramline = Orange
Bicaridine = Red
Tricordrazine = Purple
Oxy = Black
Also I'd appreciate giving different colors to the substances when they're made in liquid form, instead of everything being the same light pink.
Kelotane/Deramline = Orange
Bicaridine = Red
Tricordrazine = Purple
Oxy = Black
Also I'd appreciate giving different colors to the substances when they're made in liquid form, instead of everything being the same light pink.
- Azmodan412
- Registered user
- Posts: 1318
- Joined: 01 Oct 2015, 23:17
- Location: The Void
Re: Color Coded Autoinjectors
Forgetting Quick-ClotWickedtemp wrote:Dexalin Plus = Blue
Kelotane/Deramline = Orange
Bicaridine = Red
Tricordrazine = Purple
Oxy = Black
Also I'd appreciate giving different colors to the substances when they're made in liquid form, instead of everything being the same light pink.
Tyler 'Thrift' Borealis: Slaughterer of stupid xenos, insane motherfucker, and who played tower defense with Predators with an axe.
Predator Duels Won: 1
Predator Duels Lost: 2
BRING IT ON CASANY! I DO NOT CAST DOWN A CHALLENGE!
43 Xenos and counting.
Hunter Games: I am Moon Moon! Destroyer of worlds! Ahuhuhuhuhuhuhuhu!
Moon Moon Victories: x1
-
- Registered user
- Posts: 603
- Joined: 10 Aug 2015, 22:14
Re: Color Coded Autoinjectors
Azmodan412 wrote: Forgetting Quick-Clot = White and Dylovene = Green
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
Update: Attatched a .zip to the original post containing some sprites for colored auto-injectors. Should be simply to edit the existing code to use those, instead of the default ones.
Tricord is the default autoinjector, since that is what autoinjectors have by default.
Oxycodone is a black-ish grey
QuickClot is pink
Bicardine is Red
Kelotane is Orange/yellow
Dylovene is Green
Dexaline is Blue
Tricord is the default autoinjector, since that is what autoinjectors have by default.
Oxycodone is a black-ish grey
QuickClot is pink
Bicardine is Red
Kelotane is Orange/yellow
Dylovene is Green
Dexaline is Blue
- apophis775
- Host
- Posts: 6985
- Joined: 22 Aug 2014, 18:05
- Location: Ice Colony
- Byond: Apophis775
- Contact:
Re: Color Coded Autoinjectors
Won't work.
Reason being, they have 2 icon states, and all the code over-laps. I'd have to change how to altered the icon states, and the names of every single icon state for autoinjectors.
Reason being, they have 2 icon states, and all the code over-laps. I'd have to change how to altered the icon states, and the names of every single icon state for autoinjectors.
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
I made the adjustments on my local server. I have working colored auto-injectors. Could you elaborate more on why it won't work? Because editing the code in hypospray.dm seemed like the most you'd have to do. I could be wrong, my coding skills are pretty horrid.
The commented bits inside the /obj/ code, are what they originally had. I don't quite understand why they made it append 1 or 0 to the end of autoinjector. Simply telling it to point to the specific icon state (autoinjector5). I basically got rid of the code that added a 1 or a 0 for the new autoinjectors, since that seemed to be the most reliable way of adding colored autoinjectors.
Edit: Searched for autoinjector over all files in my Baystation source, didn't seem like you'd have to edit any of those. That was just for medkits and such. The only codenames you might have to edit would be the medical vending machines and such that hold it.
The commented bits inside the /obj/ code, are what they originally had. I don't quite understand why they made it append 1 or 0 to the end of autoinjector. Simply telling it to point to the specific icon state (autoinjector5). I basically got rid of the code that added a 1 or a 0 for the new autoinjectors, since that seemed to be the most reliable way of adding colored autoinjectors.
Code: Select all
///////////////////////
//Color Autoinjectors//
///////////////////////
//Dylovene
/obj/item/weapon/reagent_containers/hypospray/autoinjectordylovene
name = "Dylovene Autoinjector"
desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel."
//icon_state = "autoinjector"
icon_state = "autoinjector5"
//item_state = "autoinjector"
item_state = "autoinjector5"
amount_per_transfer_from_this = 5
volume = 5
/obj/item/weapon/reagent_containers/hypospray/autoinjectordylovene/New()
..()
reagents.add_reagent("dylovene", 5)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjectordylovene/attack(mob/M as mob, mob/user as mob)
..()
if(reagents.total_volume <= 0) //Prevents autoinjectors to be refilled.
flags &= ~OPENCONTAINER
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjectordylovene/update_icon()
if(reagents.total_volume > 0)
//icon_state = "[initial(icon_state)]1"
icon_state = "autoinjector5"
else
//icon_state = "[initial(icon_state)]0"
icon_state = "autoinjector0"
/obj/item/weapon/reagent_containers/hypospray/autoinjectordylovene/examine(mob/user)
..(user)
if(reagents && reagents.reagent_list.len)
user << "<span class='notice'>It is currently loaded.</span>"
else
user << "<span class='notice'>It is spent.</span>"
- apophis775
- Host
- Posts: 6985
- Joined: 22 Aug 2014, 18:05
- Location: Ice Colony
- Byond: Apophis775
- Contact:
Re: Color Coded Autoinjectors
First, part of the problem your having, is that your making the injectors wrong.
It should be:
obj/item/weapon/reagent_containers/hypospray/autoinjector/dylovene because the auto injectors should inherit everything from /autoinjector/.
What you have here, is it using the "custom" colored auto injector at first, then after it's used, reverting the color back to the original (the 0 state, is the base state of the auto injector with the needle sticking out).
IF you use the auto injector, it probably won't revert properly.
Again though, this code would be fairly inefficient, since you can just inherit the update_icon, Attackby, Examine, etc proc from auto injector.
It should be:
obj/item/weapon/reagent_containers/hypospray/autoinjector/dylovene because the auto injectors should inherit everything from /autoinjector/.
What you have here, is it using the "custom" colored auto injector at first, then after it's used, reverting the color back to the original (the 0 state, is the base state of the auto injector with the needle sticking out).
IF you use the auto injector, it probably won't revert properly.
Again though, this code would be fairly inefficient, since you can just inherit the update_icon, Attackby, Examine, etc proc from auto injector.
- UnknownMurder
- Registered user
- Posts: 2243
- Joined: 15 Dec 2014, 08:03
- Location: Ascension
Re: Color Coded Autoinjectors
Or, are you able to 'overwrite'?apophis775 wrote: Again though, this code would be fairly inefficient, since you can just inherit the update_icon, Attackby, Examine, etc proc from auto injector.
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
This code has functional sprites, but... seems to have some issues with getting the dylovene in. Still playing with it.
Edit: Yeah, I got no idea why the dylovene isn't inside the autoinjector.
Edit2: I have absolutely no idea what I'm doing.
Edit: Yeah, I got no idea why the dylovene isn't inside the autoinjector.
Edit2: I have absolutely no idea what I'm doing.
Code: Select all
//Dylovene
/obj/item/weapon/reagent_containers/hypospray/autoinjector/dylovene
name = "Dylovene Autoinjector"
/obj/item/weapon/reagent_containers/hypospray/autoinjector/dylovene/New()
..()
reagents.add_reagent("anti_toxin", 5)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/autoinjector/dylovene/update_icon()
if(reagents.total_volume > 0)
icon_state = "[initial(icon_state)]5"
else
icon_state = "[initial(icon_state)]0"
-
- Registered user
- Posts: 24
- Joined: 03 Dec 2015, 23:01
Re: Color Coded Autoinjectors
If this can be done, it would earn all of my +1, just played Field Medic and spent more time figuring out which injector was which drug than I did actually treating people. Could be an instance of "git gud", but I sorta doubt it.
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
Its possible, its just a matter of do you want the code to be efficient, or do you want it to work? My post with the code earlier works flawlessly, however it isn't efficient. The code in the post above, is efficient, but I can't make it hold any other chemical besides inaprovaline for some reason.
- Arachnidnexus
- Donor
- Posts: 449
- Joined: 04 Sep 2015, 20:50
Re: Color Coded Autoinjectors
Is it possibly because in the base autoinjector it adds inaprovaline when a new injector is created?
- apophis775
- Host
- Posts: 6985
- Joined: 22 Aug 2014, 18:05
- Location: Ice Colony
- Byond: Apophis775
- Contact:
Re: Color Coded Autoinjectors
Arachnidnexus wrote:Is it possibly because in the base autoinjector it adds inaprovaline when a new injector is created?
This. Remember, your trying to use bay code, and "hope" it works with ours. I rewrote most of the auto-injector system when I added more.
Here's a quick sample of how they work right now:
Code: Select all
/obj/item/weapon/reagent_containers/hypospray/autoinjector/quickclot
name = "Quick Clot"
desc = "An Auto-injector loaded with Quick-clot, a chemical designed to stop internal bleeding instantly."
amount_per_transfer_from_this = 5
volume = 5
New()
..()
spawn(1)
reagents.add_reagent("quickclot", 5)
update_icon()
return
At the same time, whereas you have update_icon() as a unique updated proc each time, we use a single update_icon() proc that is inherited from /obj/item/weapon/reagent_containers/hypospray/autoinjector/
I "could" color-code the autoinjectors, but I'd need color-coded state0 and state1 for each, then I'd have to add code to the update_icon() proc. It's not impossible, but like I said, I'd have to come up with new icon states for each autoinjector. Things like Dyloinjector1 dyloinjector0 , QuickClot1 QuickClock0 etc. The method you proposed would be WAY TOO inefficient. There's no reason for new update_icon() procs for each individual everything.
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
Why not make them default to the default state0 when spent, and tell the autoinjectors to use the color coded state1's when not spent? And I have a zip up there with some color coded autoinjector samples if you need those. You'd just have to import and rename to fit with your code.
- apophis775
- Host
- Posts: 6985
- Joined: 22 Aug 2014, 18:05
- Location: Ice Colony
- Byond: Apophis775
- Contact:
Re: Color Coded Autoinjectors
So it loses the color-coding after it's used?
- HalfdeadKiller
- Registered user
- Posts: 468
- Joined: 15 Oct 2014, 13:17
Re: Color Coded Autoinjectors
Yes. No point in keeping the color coding once it's spent. You can't refill autoinjectors after using them.
- apophis775
- Host
- Posts: 6985
- Joined: 22 Aug 2014, 18:05
- Location: Ice Colony
- Byond: Apophis775
- Contact:
Re: Color Coded Autoinjectors
i'll look into it then. Accepted.
- dylanstrategie
- Registered user
- Posts: 201
- Joined: 20 Jul 2016, 16:20
Re: Color Coded Autoinjectors
Internal tracking shows this as completed, autoinjecters have new sprites now