Best code comments

How, what and why to code in BYOND.

Moderators: MisterPerson, Code Maintainers

User avatar
Qbopper
 
Joined: Fri Jul 10, 2015 6:34 pm
Location: Canada
Byond Username: Qbopper
Github Username: Qbopper

Re: Best code comments

Postby Qbopper » Tue Sep 12, 2017 7:57 pm #336113

pfft
Limey wrote:its too late.



User avatar
ShizCalev
Code Maintainer
 
Joined: Wed Apr 23, 2014 3:12 am
Byond Username: ShizCalev
Github Username: ShizCalev

Re: Best code comments

Postby ShizCalev » Fri Nov 17, 2017 9:38 pm #358898

Code: Select all
   var/fuck_you_dir = get_dir(src, user) // Because fuck you...
   if(!fuck_you_dir)
      fuck_you_dir = pick(GLOB.cardinals)



Code: Select all
//Shit fucking piece of crap that doesn't work god fuckin damn it
function linkify(text) {
   var rex = /((?:<a|<iframe|<img)(?:.*?(?:src="|href=").*?))?(?:(?:https?:\/\/)|(?:www\.))+(?:[^ ]*?\.[^ ]*?)+[-A-Za-z0-9+&@#\/%?=~_|$!:,.;]+/ig;
   return text.replace(rex, function ($0, $1) {
      if(/^https?:\/\/.+/i.test($0)) {
         return $1 ? $0: '<a href="'+$0+'">'+$0+'</a>';


Code: Select all
//SPACE BEARS! SQUEEEEEEEE~     OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson



Code: Select all
////////////// I don't know who made this header before I refactored alcohols but I'm going to fucking strangle them because it was so ugly, holy Christ
// ALCOHOLS //
//////////////
ImageImage


>Be ling
>Spread misinformation about how SM works to sabotage it
OOC: ChemicalRascal: Lying about game mechanics in relation to an engine that is poorly understood by most isn't cool, though

User avatar
duncathan
 
Joined: Mon May 25, 2015 4:12 pm
Byond Username: Dunc
Github Username: duncathan

Re: Best code comments

Postby duncathan » Sat Nov 18, 2017 9:40 am #359054

fuck_you_dir is an age old classic. remie's naming conventions are certainly easy to distinguish
Image
Players can and will create their own fun.

User avatar
RandolfTheMeh
 
Joined: Thu Aug 14, 2014 2:56 am
Byond Username: RandolfTheMeh

Re: Best code comments

Postby RandolfTheMeh » Sat Nov 18, 2017 9:51 am #359056

Code: Select all
var/list/all_circuits = SScircuit.all_circuits // It's free. Performance. We're giving you cpu time. It's free. We're giving you time. It's performance, free. It's free cpu time for you jim!

Pity it's only for Jim
Rarely posts

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: Best code comments

Postby Remie Richards » Sat Nov 18, 2017 10:33 am #359060

duncathan wrote:fuck_you_dir is an age old classic. remie's naming conventions are certainly easy to distinguish


What can I say, I'm perfect.
私は完璧

User avatar
DemonFiren
 
Joined: Sat Dec 13, 2014 9:15 pm
Byond Username: DemonFiren

Re: Best code comments

Postby DemonFiren » Sat Nov 18, 2017 11:43 am #359073

i'd almost agree with you but your name is remie
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

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: Best code comments

Postby Remie Richards » Sat Nov 18, 2017 12:15 pm #359079

Not a fan of a french name? (on a brit, lmao)
私は完璧

User avatar
DemonFiren
 
Joined: Sat Dec 13, 2014 9:15 pm
Byond Username: DemonFiren

Re: Best code comments

Postby DemonFiren » Sat Nov 18, 2017 12:35 pm #359081

it's culturally weird i suppose

i mean i was originally going to post a dragon meme here but i don't feel like it
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
Anonmare
 
Joined: Sun Mar 15, 2015 8:59 pm
Location: Blighty
Byond Username: Anonmare

Re: Best code comments

Postby Anonmare » Wed Mar 21, 2018 10:13 pm #393145

Code: Select all
/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/M)
   M.adjustFireLoss(current_cycle/10, 0) // I rode a tank, held a general's rank
   . = 1 // When the blitzkrieg raged and the bodies stank
..() // Pleased to meet you, hope you guess my name
Image
Image
Image

User avatar
DemonFiren
 
Joined: Sat Dec 13, 2014 9:15 pm
Byond Username: DemonFiren

Re: Best code comments

Postby DemonFiren » Wed Mar 21, 2018 11:33 pm #393170

i don't get it
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
Dax Dupont
In-Game Admin
 
Joined: Sun Apr 20, 2014 9:07 pm
Location: Belgium
Byond Username: DaxYeen
Github Username: DaxDupont

Re: Best code comments

Postby Dax Dupont » Thu Mar 22, 2018 2:12 am #393216

It's Sympathy for the Devil lyrics as a comment for no reason.

User avatar
DemonFiren
 
Joined: Sat Dec 13, 2014 9:15 pm
Byond Username: DemonFiren

Re: Best code comments

Postby DemonFiren » Thu Mar 22, 2018 9:20 am #393279

ah, so there is no reason
good
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
kevinz000
In-Game Admin
 
Joined: Fri Nov 14, 2014 8:41 am
Location: Dorm Room 3
Byond Username: Kevinz000
Github Username: kevinz000

Re: Best code comments

Postby kevinz000 » Mon May 07, 2018 3:23 am #407757

Image

User avatar
Denton
Code Maintainer
 
Joined: Wed Aug 23, 2017 3:53 pm
Byond Username: Denton-30
Github Username: 81Denton

Re: Best code comments

Postby Denton » Mon May 07, 2018 5:41 am #407803

Code: Select all
new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code
Image

User avatar
CreationPro
 
Joined: Sat Apr 19, 2014 11:11 am
Location: Commiefornia
Byond Username: Solar Marine

Re: Best code comments

Postby CreationPro » Wed Jul 18, 2018 9:54 pm #427445

signal_redirect.dm wrote:
Code: Select all
// This should only be used by non components trying to listen to a signal
// If you use this inside a component I will replace your eyes with lemons ~ninjanomnom
Image
Terry the Moth, Melody Jean the roboticist and S.O.L. the cyborg.
I will not change my avatar but if I did I'd have this good KVADRATNIY boy.
Spoiler:
Image

IkeTG wrote:love is okay
CreationPro wrote:i love you
IkeTG wrote:love is no longer okay


Old quotes and stuff
Spoiler:
obscolene wrote:I super glued my PC case shut please don't ask why.

<Pretendo> well Ia ksed in banbus
<AurxSS13> IA KSED! IA KSED! THE BLACK TYPO WITH A THOUSAND ERRORS!

<scaredofshadows> I randomly take buttons away from people
<scaredofshadows> because I am now rogue
<hornygranny> host is rouge
<Ikarrus> blow the admins

trytryagain66 wrote: I accidently axed a guy said I was sorry to him, then he punched me so I axed his head off.

Hibbles wrote:Man, I love CP. I wish we had more CP on the server.

Antonkr wrote:<antonkr> tfw you will never lick hg|works delicious sexy mustache
<antonkr> ;_;

User avatar
DemonFiren
 
Joined: Sat Dec 13, 2014 9:15 pm
Byond Username: DemonFiren

Re: Best code comments

Postby DemonFiren » Wed Jul 18, 2018 11:10 pm #427466

CreationPro wrote:
signal_redirect.dm wrote:
Code: Select all
// This should only be used by non components trying to listen to a signal
// If you use this inside a component I will replace your eyes with lemons ~ninjanomnom

I'd rather have my ears replaced tbh but that aside I'm all for it
Spoiler:
Image


also
lib_machines.dm, line 159 wrote:
Code: Select all
/*
 * Library Computer
 * After 860 days, it's finally a buildable computer.
 */
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
// It's December 25th, 2014, and this is STILL here, and it's STILL relevant. Kill me
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
bandit
In-Game Admin
 
Joined: Thu Apr 17, 2014 7:35 pm
Byond Username: Bgobandit

Re: Best code comments

Postby bandit » Sun Jan 13, 2019 8:14 pm #468758

Code: Select all
description = "<span class='warning'>I feel a lot better, but wow that was disgusting.</span>\n" //when you read the latest felinid removal PR and realize you're really not that much of a degenerate
"I don't see any difference between ERP and rape." -- erro

admin feedback pls

User avatar
PKPenguin321
In-Game Game Master
 
Joined: Tue Jul 01, 2014 7:02 pm
Location: U S A, U S A, U S A
Byond Username: PKPenguin321
Github Username: PKPenguin321

Re: Best code comments

Postby PKPenguin321 » Sat Sep 14, 2019 10:25 pm #514796

If a light corner abstract object is deleted, which should never happen:

Code: Select all
   stack_trace("Ok, Look, /tg/, I need you to find whatever fucker decided to call qdel on a fucking lighting corner, then tell him very nicely and politely that he is 100% retarded and needs his head checked. Thanks. Send them my regards by the way.")
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well
tell the best admin how good he is
Spoiler:
Image

User avatar
Whoneedspacee
 
Joined: Mon May 21, 2018 2:07 am
Byond Username: Whoneedspacee

Re: Best code comments

Postby Whoneedspacee » Sun Sep 15, 2019 12:23 am #514816

Code: Select all
//I will need to recode parts of this but I am way too tired atm //I don't know who left this comment but they never did come back


my tgcode life
L E G E N D

User avatar
Reyn
 
Joined: Tue Aug 02, 2016 2:13 am
Location: Canada
Byond Username: ReynTime13

Re: Best code comments

Postby Reyn » Tue Sep 17, 2019 8:48 pm #515221

No specific examples but in class I had a habit of sneaking shitposts into code via comments.
I play Trevor Fea on Bagil, And Giorno Giovanna on terry. Yes, I'm THAT raging asshole. Sorry for being such a cunt.
Have I told you how much I hate engineering, by the way?

User avatar
bandit
In-Game Admin
 
Joined: Thu Apr 17, 2014 7:35 pm
Byond Username: Bgobandit

Re: Best code comments

Postby bandit » Sun Sep 29, 2019 1:53 am #517353

found by shaps

Code: Select all
//Aiming for 1.5 hours to max R&D
   //[88nodes * 5000points/node] / [1.5hr * 90min/hr * 60s/min]
"I don't see any difference between ERP and rape." -- erro

admin feedback pls

User avatar
XDTM
Github User
 
Joined: Fri Mar 04, 2016 8:38 pm
Location: XDTM
Byond Username: XDTM
Github Username: XDTM

Re: Best code comments

Postby XDTM » Mon Sep 30, 2019 5:17 pm #517474

It's clearly accounting for time dilation
Patron of golems, virology, hallucinations and traumas. And now, nanites.

Ex-Keeper of the wiki.

User avatar
bandit
In-Game Admin
 
Joined: Thu Apr 17, 2014 7:35 pm
Byond Username: Bgobandit

Re: Best code comments

Postby bandit » Fri Oct 25, 2019 4:33 pm #520794

from modules/food_and_drinks/food/snacks_salad.dm

Code: Select all
eatverb = pick("devour","nibble","gnaw","gobble","chomp") //who the fuck gnaws and devours on a salad
"I don't see any difference between ERP and rape." -- erro

admin feedback pls

User avatar
Sandshark808
 
Joined: Wed Sep 04, 2019 6:56 pm
Byond Username: Sandshark808

Re: Best code comments

Postby Sandshark808 » Fri Nov 08, 2019 2:39 am #522930

Not a comment, but...
/obj/item/reagent_containers/food/snacks/urinalcake
Image

cacogen
 
Joined: Sat Jun 02, 2018 10:27 am
Byond Username: Cacogen

Re: Best code comments

Postby cacogen » Fri Nov 08, 2019 7:17 am #522955

>see paprika thread in unread posts
>briefly panic until I see the creation date
Spoiler:
Image

Previous

Return to Coding

Who is online

Users browsing this forum: No registered users