Rewriting Life()

How, what and why to code in BYOND.

Moderators: MisterPerson, Code Maintainers

User avatar
Miauw
 
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Rewriting Life()

Postby Miauw » Mon Apr 21, 2014 3:18 pm #977

Life(). Life() never changes...

Mainly because it's so huge and bloated that it's basically impossible to rewrite.
By yourself.

Life() has to be rewritten, and one coder alone cannot do this, be it attention span or motivation. So what if we did it togheter?
I suggest that we organize something so every willing coder updates and refactors one or two of the procs in Life(), so it becomes manageable again, and other things *coughdatummutantracescough* could be implemented with relative ease.
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.

<Tobba> I stared into BYOND and it farted



User avatar
Stephie
 
Joined: Fri Apr 18, 2014 5:40 pm

Re: Rewriting Life()

Postby Stephie » Mon Apr 21, 2014 3:27 pm #983

I gave up on mobcode when I found that pieces of food code (Nuka Cola) somehow ended up there. It's a mess, no other word for it.

User avatar
Psyentific
 
Joined: Mon Apr 21, 2014 7:44 am
Location: Vancouver, Canada
Byond Username: Psyentific

Re: Rewriting Life()

Postby Psyentific » Mon Apr 21, 2014 3:28 pm #984

Stephie wrote:I gave up on mobcode when I found that pieces of food code (Nuka Cola) somehow ended up there. It's a mess, no other word for it.

how do you even
i wat
u wot
i cannot even
wat

I mean, there's spaghetti code, then there's whatever that is.
I haven't logged into SS13 in at least a year.

User avatar
Jeb
 
Joined: Thu Apr 17, 2014 4:01 pm
Byond Username: Stapler2025

Re: Rewriting Life()

Postby Jeb » Mon Apr 21, 2014 3:29 pm #985

everyone knows that cola is life()
Image
Unbiased Global Moderator
Guy that made a thing that got put on the homepage of /tg/station13
Defeated in the Great Purge of 2014
[Security] Fiz Bump says, "Beats me, I'm not a scientist. But this is a problem that can be solved with harmbatons."
Johnson Fitzwell asks, "HOW THE FUCK ARE YOU STILL ALIVE?"
Image

User avatar
Stephie
 
Joined: Fri Apr 18, 2014 5:40 pm

Re: Rewriting Life()

Postby Stephie » Mon Apr 21, 2014 3:55 pm #988

Psyentific wrote:
Stephie wrote:I gave up on mobcode when I found that pieces of food code (Nuka Cola) somehow ended up there. It's a mess, no other word for it.

how do you even
i wat
u wot
i cannot even
wat

I mean, there's spaghetti code, then there's whatever that is.

To explain, Nuka Cola and Hyperzine had a mention in human and mokey code, as they eliminated any slowdown and enabled sanic speeds. I just checked the mob code again, and it looks like they are gone from human code now (replaced by GOTTAGOFAST flag), but monkey.dm still has them:

Image

With that said, it looks like they never were a part of Life() code, so sorry for off topic.

User avatar
Remie Richards
 
Joined: Thu Apr 17, 2014 7:11 pm
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Byond Username: CrimsonVision

Re: Rewriting Life()

Postby Remie Richards » Mon Apr 21, 2014 9:51 pm #1047

Don't Miauw, please... I like you... Rewriting Life() will destroy your Real life()!

You won't come back alive/sane if you do this...
私は完璧

Jalleo
 
Joined: Tue Apr 15, 2014 1:27 pm
Byond Username: Jalleo

Re: Rewriting Life()

Postby Jalleo » Mon Apr 21, 2014 11:02 pm #1053

Ill help next year. Sometime someday.

Anyhow

Miauw consider this a long haul slow rework where you touch it only when required.
I know you want to get changeling better but if its that big only superman can do it....

User avatar
Aranclanos
 
Joined: Tue Apr 15, 2014 4:55 pm
Byond Username: Aranclanos

Re: Rewriting Life()

Postby Aranclanos » Mon Apr 21, 2014 11:51 pm #1062

Did you know that all humans check if they are wearing a ninja mask each second?
I accept donations, click here

User avatar
iamgoofball
Github User
 
Joined: Fri Apr 18, 2014 5:50 pm
Byond Username: Iamgoofball
Github Username: Iamgoofball

Re: Rewriting Life()

Postby iamgoofball » Mon Apr 21, 2014 11:56 pm #1063

Aranclanos wrote:Did you know that all humans check if they are wearing a ninja mask each second?

why

why do we even have this

can we just like

remove ninja forever

User avatar
Numbers
 
Joined: Wed Apr 16, 2014 10:40 am

Re: Rewriting Life()

Postby Numbers » Tue Apr 22, 2014 12:21 am #1067

remove ninja forever


Yeah good luck.
"I've told you about Erro, I've warned you dwag." - Unknown
ImageImageImage

User avatar
Rockdtben
Site Admin
 
Joined: Mon Apr 14, 2014 11:54 pm
Byond Username: Rockdtben
Github Username: Rockdtben

Re: Rewriting Life()

Postby Rockdtben » Fri Jun 27, 2014 1:56 pm #16126

Aranclanos wrote:Did you know that all humans check if they are wearing a ninja mask each second?


Code: Select all
         if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
            var/obj/item/clothing/mask/gas/voice/space_ninja/O = wear_mask
            switch(O.mode)
               if(0)
                  var/target_list[] = list()
                  for(var/mob/living/target in oview(src))
                     if( target.mind&&(target.mind.special_role||issilicon(target)) )//They need to have a mind.
                        target_list += target
                  if(target_list.len)//Everything else is handled by the ninja mask proc.
                     O.assess_targets(target_list, src)
                  see_invisible = SEE_INVISIBLE_LIVING
               if(1)
                  see_in_dark = 5
                  see_invisible = SEE_INVISIBLE_LIVING
               if(2)
                  sight |= SEE_MOBS
                  see_invisible = SEE_INVISIBLE_LEVEL_TWO
               if(3)
                  sight |= SEE_TURFS
                  see_invisible = SEE_INVISIBLE_LIVING


>Ninja code writer sees opportunity to put shit in proc for masks.
>Decides to snowflake instead
>Scumbag Ninja
FastDMM Lead: 01/28/2018 - Now || Code Project Lead: 02/01/2014 - 10/07/2014 || G-Admin: 12/29/2013 - 04/04/2015 || T-Admin: 3/29/2013 - 12/29/2013 || Codermin: ? - 3/29/2013 || Started Playing: 6/13/2006

User avatar
paprika
Rarely plays
 
Joined: Fri Apr 18, 2014 10:20 pm
Location: in down bad
Byond Username: Paprka

Re: Rewriting Life()

Postby paprika » Sat Jun 28, 2014 5:26 am #16253

I can't stop laughing it's like ninja is worse than I expected
Oldman Robustin wrote:It's an established meme that coders don't play this game.

User avatar
Munchlax
 
Joined: Fri Apr 18, 2014 11:25 am
Byond Username: Lobstercake

Re: Rewriting Life()

Postby Munchlax » Sat Jun 28, 2014 12:01 pm #16296

Dat necro.

User avatar
Malkevin
Confined to the shed
 
Joined: Thu May 01, 2014 4:33 pm
Byond Username: Malkevin

Re: Rewriting Life()

Postby Malkevin » Wed Jul 02, 2014 10:28 am #17027

Stephie wrote:
Psyentific wrote:
Stephie wrote:I gave up on mobcode when I found that pieces of food code (Nuka Cola) somehow ended up there. It's a mess, no other word for it.

how do you even
i wat
u wot
i cannot even
wat

I mean, there's spaghetti code, then there's whatever that is.

To explain, Nuka Cola and Hyperzine had a mention in human and mokey code, as they eliminated any slowdown and enabled sanic speeds. I just checked the mob code again, and it looks like they are gone from human code now (replaced by GOTTAGOFAST flag), but monkey.dm still has them:

Image

With that said, it looks like they never were a part of Life() code, so sorry for off topic.

Yeah I was required to change that when I made unholy water make cultists go fast.

Now it sets the mob's sanic flag, which means movement only does one check per movement instead going through a mob's reagent list to check if one of those reagents is the specified chemical... for each chemical
This space intentionally left blank.

PostThis post was deleted by lzimann on Mon Jun 05, 2017 10:33 pm.


Return to Coding

Who is online

Users browsing this forum: No registered users