Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONDENSER IMPLANT (bounty) #736

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

Comicao1
Copy link

@Comicao1 Comicao1 commented Feb 7, 2023

About The Pull Request

Bounty for the condenser implant. #453

Why It's Good For The Game

More features to the current game.

A Port?

No. Made from scratch.

Pre-Merge Checklist

  • [Yes] You tested this on a local server.
  • [Yes ] This code did not runtime during testing.
  • [Yes ] You documented all of your changes.

Changelog

🆑
add: Adds a condenser implant to the loadout menu.
add: Condenser changes the size of your genitals.
/:cl:

Comment on lines 49 to 101
/datum/condenser_implant/condenser/ui_data(mob/user)
if(!ishuman(user))
return
var/list/data = list()
var/mob/living/carbon/human/H = user
var/obj/item/organ/genital/penis/P = null
var/obj/item/organ/genital/testicles/T = null
var/obj/item/organ/genital/breasts/B = null

for(var/obj/item/organ/genital/penis/PP in H.internal_organs)
P = PP
for(var/obj/item/organ/genital/testicles/TT in H.internal_organs)
T = TT
for(var/obj/item/organ/genital/breasts/BB in H.internal_organs)
B = BB


data["on"] = FATHER.on
data["wanted_size"] = FATHER.wanted_size
if(FATHER.on)
if(P)
P.length = max(FATHER.wanted_size, 1)
if(T)
T.size = clamp(FATHER.wanted_size, BALLS_SIZE_MIN, BALLS_SIZE_MAX)
if(B)
B.cached_size = max(FATHER.wanted_size, 1)
else
if(P)
P.length = initial(P.prev_length)
if(B)
B.cached_size = max(FATHER.wanted_size, 1)

if(P)
if(P.length != P.prev_length)
P.update()
P.update_size()
P.get_features(user)
P.prev_length = P.length

if(T)
T.get_features(user)
T.update_appearance()
T.update_size()

if(B)
if(B.cached_size != B.prev_size)
B.update()
B.update_size()
B.get_features(user)
else
B.prev_size = B.cached_size

return data

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is all of this in ui_data() though...? It would be better if it was in the ui_act() and that said proc and the js menu had better handling of setting genitals sizes through that.
I also don't see where the original sizes for the genitals are being saved so they can be returned to that size once the condenser stops targeting those genitals... or a panel to select which genitals the condenser should target at all...
For all of this, I'd recommend you code it in a similar way to how the size normalizers are coded, but instead aimed towards genitals. also it's better that you use modify_size() rather than manually setting the size of each genital and updating them. There's no need to get_features() if you do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants