Best code comments

How, what and why to code in BYOND.

Moderators: MisterPerson, Code Maintainers

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

Best code comments

Postby paprika » Fri Jan 16, 2015 8:51 am #59603

Doesn't need to be /tg/

Code: Select all
   if(istype(C, /obj/item/weapon/crowbar) || (istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
      if(blocked || operating)   return
      if(density)
         open()
         return
      else   //close it up again   //fucking 10/10 commenting here einstein
         close()
         return
   return


Code: Select all
      if(M != user)
         M << "<span class='notice'>[user] inserts [src] into your head!</span>"
         user << "<span class='notice'>You insert [src] into [M]'s head!</span>"
      else
         user << "<span class='notice'>You insert [src] into your head!</span>"   //LOL
Oldman Robustin wrote:It's an established meme that coders don't play this game.



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 » Fri Jan 16, 2015 9:20 pm #59761

This entire file:
https://github.com/d3athrow/vgstation13 ... othwall.dm

tl;dr /vg/'s wonderful N3X15 goes on a rant for the ENTIRE FILE about why the old smoothwall (which we still have!) sucks.

The file's header:

Code: Select all
// OKAY I DON'T KNOW WHO THE FUCK ORIGINALLY CODED THIS BUT THEY ARE OFFICIALLY FIRED FOR BEING DRUNK AND STUPID
// FUCK YOU MYSTERY CODERS
// FOR THIS SHIT I'M GOING TO MAKE ALL MY COMMENTS IN CAPS
私は完璧

User avatar
Xhuis
Github User
 
Joined: Mon May 26, 2014 1:04 pm
Location: North Carolina
Byond Username: Xhuis
Github Username: Xhuis

Re: Best code comments

Postby Xhuis » Sat Jan 17, 2015 9:24 pm #60037

Code: Select all
/mob/living/carbon/alien/humanoid/queen
   name = "alien queen"
   caste = "q"
   maxHealth = 250
   health = 250
   icon_state = "alienq_s"
   status_flags = CANPARALYSE
   heal_rate = 5
   plasma_rate = 20
   ventcrawler = 0 //pull over that ass too fat

I'm an ex-coder for /tg/. I made the original versions of clockcult, shadowlings, revenants, His Grace, and other stuff.
I don't play, code, or participate in the community, but I occasionally post dumb stuff in the hut.
Kraso wrote:hi gay

wubli wrote:xhuis you said you were feeling better but every thread you make makes me worry more about your sanity

ExcessiveUseOfCobblestone wrote:Sorry I was making fun of xhuis' """""compromise""""" who insisted that was the correct term to use.

CitrusGender wrote:We've ended up disabling clockcult on sybil and bagil now (terry is having some problems.) We will give Xhuis some time until he wishes to work upon it again. As of now, please use this thread for ideas and not for bickering.

wubli wrote:you are a cultist of the gay

IkeTG wrote:It's a reflection of humanity, like all of man's creation. You cannot divorce this act from yourself, in a way there's a big titty moth inside all of us.

wesoda25 wrote:yeah no one was curious what it was from. Imagine choosing being a degenerate as your forum gimmick, LOL

User avatar
tedward1337
 
Joined: Thu May 15, 2014 12:54 am
Location: Ontario, Canada
Byond Username: Tedward1337

Re: Best code comments

Postby tedward1337 » Mon Jan 19, 2015 9:56 am #60425

Xhuis wrote:
Code: Select all
/mob/living/carbon/alien/humanoid/queen
   name = "alien queen"
   caste = "q"
   maxHealth = 250
   health = 250
   icon_state = "alienq_s"
   status_flags = CANPARALYSE
   heal_rate = 5
   plasma_rate = 20
   ventcrawler = 0 //pull over that ass too fat



Woop woop
Major T on Steam/IRC/Twitch/everything else.

Game Admin

PM anytime with questions about the server, policies or for fun!



Spoiler:
<hg|work> why do we unban people
OOC: Shaps: pizza status: fucking delivered

User avatar
JJRcop
 
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

Re: Best code comments

Postby JJRcop » Wed Jan 21, 2015 1:02 am #61011

Code: Select all
/*
 * WARRANTY VOID IF CODE USED
 */


/code/datums/helper_datums/events.dm Lines 1-3
I lurk quite often...

User avatar
allura
 
Joined: Thu May 15, 2014 4:30 am
Byond Username: Allura

Re: Best code comments

Postby allura » Sat Feb 14, 2015 6:55 pm #69005

Code: Select all
/turf/simulated/floor/fancy/grass/holo/attackby(obj/item/weapon/W as obj, mob/user as mob)
   return
   // HOLOGRASS DOES NOT GIVE A FUCK

User avatar
Xhuis
Github User
 
Joined: Mon May 26, 2014 1:04 pm
Location: North Carolina
Byond Username: Xhuis
Github Username: Xhuis

Re: Best code comments

Postby Xhuis » Sun Feb 15, 2015 8:48 am #69126

Code: Select all
// Ultimate randomizing code right here
for(var/mob/new_player/player in player_list)
   if(player.client && player.ready)
      players += player
I'm an ex-coder for /tg/. I made the original versions of clockcult, shadowlings, revenants, His Grace, and other stuff.
I don't play, code, or participate in the community, but I occasionally post dumb stuff in the hut.
Kraso wrote:hi gay

wubli wrote:xhuis you said you were feeling better but every thread you make makes me worry more about your sanity

ExcessiveUseOfCobblestone wrote:Sorry I was making fun of xhuis' """""compromise""""" who insisted that was the correct term to use.

CitrusGender wrote:We've ended up disabling clockcult on sybil and bagil now (terry is having some problems.) We will give Xhuis some time until he wishes to work upon it again. As of now, please use this thread for ideas and not for bickering.

wubli wrote:you are a cultist of the gay

IkeTG wrote:It's a reflection of humanity, like all of man's creation. You cannot divorce this act from yourself, in a way there's a big titty moth inside all of us.

wesoda25 wrote:yeah no one was curious what it was from. Imagine choosing being a degenerate as your forum gimmick, LOL

User avatar
Saegrimr
 
Joined: Thu Jul 24, 2014 4:39 pm
Byond Username: Saegrimr

Re: Best code comments

Postby Saegrimr » Mon Mar 09, 2015 1:08 am #74534

Code: Select all
/obj/structure/closet/syndicate/resources/New()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK


What

Code: Select all
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
tedward1337 wrote:Sae is like the racist grandad who everyone laughs at for being racist, but deep down we all know he's right.

User avatar
Not-Dorsidarf
In-Game Admin
 
Joined: Fri Apr 18, 2014 4:14 pm
Location: Space outside the Brig
Byond Username: Dorsidwarf

Re: Best code comments

Postby Not-Dorsidarf » Wed Mar 11, 2015 10:43 pm #75000

Code: Select all
   if(name == "Reset Machine") //I don't know what this is, CTRL+F has the only entry right here in this file, so I'm going to leave it in case it is something important
Image
Still, my support will always go towards the rightful Lord of Yurop, God-Emperor Donald Trump the Trumpst. Trumpingrad for life. He'll make an indiscriminate number of countries great again.


Deadcomic

ACCount
 
Joined: Fri Jul 04, 2014 2:41 pm
Location: Russia

Re: Best code comments

Postby ACCount » Fri Apr 10, 2015 1:44 am #81400

Code: Select all
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage

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

Re: Best code comments

Postby DemonFiren » Sat Apr 11, 2015 12:40 pm #81648

Where was this?
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
MisterPerson
Board Moderator
 
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Best code comments

Postby MisterPerson » Sat Apr 11, 2015 3:14 pm #81655

Mining somewhere. Control h in DM opens a find in file dialogue.
I code for the code project and moderate the code sections of the forums.

Why realism is stupid:
Spoiler:
Wiz, the project lead of Europa Universalis IV:

Immersion/flavor is playing a WW2 shooter and using a mosin-nagant instead of a laser gun - this is important.

Realism is playing a WW2 shooter and having to spend 2 months in hospital everytime you get shot - stupid and detrimental to gameplay. Nobody actually wants a realistic game, which is why realism arguments are so selectively used.
Source: http://forum.paradoxplaza.com/forum/ind ... t-19679470

User avatar
Babin
 
Joined: Tue Feb 03, 2015 1:47 am
Byond Username: Babin

Re: Best code comments

Postby Babin » Thu Apr 23, 2015 3:18 am #83505

Code: Select all
//cause I don't want to feel like im juggling 15 tamagotchis and I can get to my real work of ripping flooring apart in hopes of validating my life choices of becoming a space-gardener

User avatar
Not-Dorsidarf
In-Game Admin
 
Joined: Fri Apr 18, 2014 4:14 pm
Location: Space outside the Brig
Byond Username: Dorsidwarf

Re: Best code comments

Postby Not-Dorsidarf » Wed Apr 29, 2015 3:48 pm #84717

Code: Select all
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
Image
Still, my support will always go towards the rightful Lord of Yurop, God-Emperor Donald Trump the Trumpst. Trumpingrad for life. He'll make an indiscriminate number of countries great again.


Deadcomic

User avatar
RocKeD
 
Joined: Sat May 02, 2015 2:55 am
Byond Username: Rocked

Re: Best code comments

Postby RocKeD » Thu May 07, 2015 7:01 am #86408

Not-Dorsidarf wrote:
Code: Select all
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!

This one made me laugh pretty hard.

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

Re: Best code comments

Postby DemonFiren » Sun May 17, 2015 8:58 am #88672

Found in meter.dm:
Code: Select all
// TURF METER - REPORTS A TILE'S AIR CONTENTS
//   why are you yelling?


Found in zvent.dm
Code: Select all
               var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
Not-Dorsidarf
In-Game Admin
 
Joined: Fri Apr 18, 2014 4:14 pm
Location: Space outside the Brig
Byond Username: Dorsidwarf

Re: Best code comments

Postby Not-Dorsidarf » Fri Jun 05, 2015 11:40 am #93275

Code: Select all
   var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
   var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
   var/rare_min = 5  //Minimum HONK of HONK in the stack HONK HONK rare minerals
   var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
Image
Still, my support will always go towards the rightful Lord of Yurop, God-Emperor Donald Trump the Trumpst. Trumpingrad for life. He'll make an indiscriminate number of countries great again.


Deadcomic

User avatar
MrStonedOne
Host
 
Joined: Mon Apr 14, 2014 10:56 pm
Byond Username: MrStonedOne
Github Username: MrStonedOne

Re: Best code comments

Postby MrStonedOne » Sat Jun 06, 2015 6:37 pm #93643

DemonFiren wrote:Found in meter.dm:
Code: Select all
// TURF METER - REPORTS A TILE'S AIR CONTENTS
//   why are you yelling?



That one was me.

https://github.com/tgstation/-tg-statio ... 52a25aR118
Forum/Wiki Administrator, Server host, Database King, Master Coder


MrStonedOne on Reddit(banned), Steam, IRC, Skype Discord.

[10:55 AM] spookydonut: stonedmc is the work of a criminally insane mad genius

User avatar
Ricotez
 
Joined: Thu Apr 17, 2014 9:21 pm
Location: The Netherlands
Byond Username: Ricotez

Re: Best code comments

Postby Ricotez » Sat Jun 20, 2015 6:22 pm #97453

Code: Select all
/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..() AND THAT COST ME AN ENTIRE DAY OF DEBUGGING.
MimicFaux wrote:I remember my first time, full of wonderment and excitement playing this game I had heard so many stories about.
on the arrival shuttle, I saw the iconic toolbox on the ground. I clubbed myself in the head with it trying to figure out the controls.
Setting the tool box, now bloodied, back on the table; I went to heal myself with a medkit. I clubbed myself in the head with that too.
I've come a long ways from asking how to switch hands.

Spoiler:
#coderbus wrote:<MrPerson> How many coders does it take to make a lightbulb? Three, one to make it, one to pull the pull request, and one to fix the bugs

Kor wrote:The lifeweb playerbase is primarily old server 2 players so technically its our cancer that invaded them

peoplearestrange wrote:Scared of shadows whispers in their final breath, "/tg/station... goes on the tabl..."

DemonFiren wrote:Please, an Engineer's first response to a problem is "throw it into the singulo".

tedward1337 wrote:Donald Trump is literally what /pol/ would look like as a person

CrunchyCHEEZIT wrote:why does everything on this server have to be a federal fucking issue.

Saegrimr wrote:One guy was running around popping hand tele portals down in the halls before OPs even showed up and got several stranded out on lavaland.
The HoP just toolboxes someone to death out of nowhere, then gets speared by a chemist who saw him murder a guy, then the chemist gets beaten to death because someone else saw him kill the HoP.
Tele-man somehow dies and gets its looted by an atmos tech who managed to use it to send two nuke ops to lavaland, who were then surrounded by several very angry people from earlier and some extra golems on top of it.
Captain dies, gets cloned/revived, lasers the guy holding the disk into crit to take it back.
Some idiot tries to welderbomb the AI hiding out at mining for no discernible reason.
Two permabans and a dayban, i'm expecting a snarky appeal from one of them soon. What the fuck.

ShadowDimentio wrote:I am the problem

User avatar
Xhuis
Github User
 
Joined: Mon May 26, 2014 1:04 pm
Location: North Carolina
Byond Username: Xhuis
Github Username: Xhuis

Re: Best code comments

Postby Xhuis » Sun Jun 28, 2015 7:58 pm #99816

Code: Select all
/obj/item/clothing/tie/petcollar //don't really wear this though please c'mon seriously guys
I'm an ex-coder for /tg/. I made the original versions of clockcult, shadowlings, revenants, His Grace, and other stuff.
I don't play, code, or participate in the community, but I occasionally post dumb stuff in the hut.
Kraso wrote:hi gay

wubli wrote:xhuis you said you were feeling better but every thread you make makes me worry more about your sanity

ExcessiveUseOfCobblestone wrote:Sorry I was making fun of xhuis' """""compromise""""" who insisted that was the correct term to use.

CitrusGender wrote:We've ended up disabling clockcult on sybil and bagil now (terry is having some problems.) We will give Xhuis some time until he wishes to work upon it again. As of now, please use this thread for ideas and not for bickering.

wubli wrote:you are a cultist of the gay

IkeTG wrote:It's a reflection of humanity, like all of man's creation. You cannot divorce this act from yourself, in a way there's a big titty moth inside all of us.

wesoda25 wrote:yeah no one was curious what it was from. Imagine choosing being a degenerate as your forum gimmick, LOL

Fr05tByt3
 
Joined: Mon May 11, 2015 3:35 am
Byond Username: Fr05tByt3

Re: Best code comments

Postby Fr05tByt3 » Mon Jul 06, 2015 4:30 pm #102049

Code: Select all
if ("warn") //HUMAN HARM DETECTED. PLEASE DIE IN AN ORDERLY FASHION.
         message = "<B>[src]</B> blares an alarm!"
         playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
         m_type = 2


Made me lol

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

Re: Best code comments

Postby bandit » Wed Jul 22, 2015 11:02 am #106477

/datum/barsign/thenet
name = "The Net"
icon = "thenet"
desc = "The sea of drinkformation." //you couldn't come up with something better?
"I don't see any difference between ERP and rape." -- erro

admin feedback pls

PostThis post was deleted by bandit on Wed Jul 22, 2015 11:03 am.
Reason: lol dupe

User avatar
Shaps-cloud
In-Game Game Master
 
Joined: Thu Aug 14, 2014 4:25 am
Byond Username: Shaps

Re: Best code comments

Postby Shaps-cloud » Thu Aug 20, 2015 10:29 am #113497

Code: Select all
//Bartender //it's chef what the fuck is your problem?
/obj/item/clothing/head/chefhat
P.S. Shoot Dr. Allen on sight and dissolve his body in acid. Don't burn it.

Image

Lo6a4evskiy
 
Joined: Fri Apr 18, 2014 6:40 pm
Byond Username: Lo6a4evskiy

Re: Best code comments

Postby Lo6a4evskiy » Tue Aug 25, 2015 2:47 pm #114798

Image

From where I work now. ControlLoop.cpp is the very basic and integral part of the project, too.

To be fair, "Magic" refers to unnamed constants in the code, so that's easily explainable. No idea what "Madness" is though.

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

Re: Best code comments

Postby iamgoofball » Tue Aug 25, 2015 8:47 pm #114872

beautiful

User avatar
Ricotez
 
Joined: Thu Apr 17, 2014 9:21 pm
Location: The Netherlands
Byond Username: Ricotez

Re: Best code comments

Postby Ricotez » Wed Aug 26, 2015 1:54 pm #114967

that is what you get for using magic to run your control loop
MimicFaux wrote:I remember my first time, full of wonderment and excitement playing this game I had heard so many stories about.
on the arrival shuttle, I saw the iconic toolbox on the ground. I clubbed myself in the head with it trying to figure out the controls.
Setting the tool box, now bloodied, back on the table; I went to heal myself with a medkit. I clubbed myself in the head with that too.
I've come a long ways from asking how to switch hands.

Spoiler:
#coderbus wrote:<MrPerson> How many coders does it take to make a lightbulb? Three, one to make it, one to pull the pull request, and one to fix the bugs

Kor wrote:The lifeweb playerbase is primarily old server 2 players so technically its our cancer that invaded them

peoplearestrange wrote:Scared of shadows whispers in their final breath, "/tg/station... goes on the tabl..."

DemonFiren wrote:Please, an Engineer's first response to a problem is "throw it into the singulo".

tedward1337 wrote:Donald Trump is literally what /pol/ would look like as a person

CrunchyCHEEZIT wrote:why does everything on this server have to be a federal fucking issue.

Saegrimr wrote:One guy was running around popping hand tele portals down in the halls before OPs even showed up and got several stranded out on lavaland.
The HoP just toolboxes someone to death out of nowhere, then gets speared by a chemist who saw him murder a guy, then the chemist gets beaten to death because someone else saw him kill the HoP.
Tele-man somehow dies and gets its looted by an atmos tech who managed to use it to send two nuke ops to lavaland, who were then surrounded by several very angry people from earlier and some extra golems on top of it.
Captain dies, gets cloned/revived, lasers the guy holding the disk into crit to take it back.
Some idiot tries to welderbomb the AI hiding out at mining for no discernible reason.
Two permabans and a dayban, i'm expecting a snarky appeal from one of them soon. What the fuck.

ShadowDimentio wrote:I am the problem

User avatar
Xhuis
Github User
 
Joined: Mon May 26, 2014 1:04 pm
Location: North Carolina
Byond Username: Xhuis
Github Username: Xhuis

Re: Best code comments

Postby Xhuis » Sat Aug 29, 2015 4:07 am #115562

Code: Select all
var/max_n_of_items = 10 // whatever fat fuck made this a global var needs to look at themselves in the mirror sometime
I'm an ex-coder for /tg/. I made the original versions of clockcult, shadowlings, revenants, His Grace, and other stuff.
I don't play, code, or participate in the community, but I occasionally post dumb stuff in the hut.
Kraso wrote:hi gay

wubli wrote:xhuis you said you were feeling better but every thread you make makes me worry more about your sanity

ExcessiveUseOfCobblestone wrote:Sorry I was making fun of xhuis' """""compromise""""" who insisted that was the correct term to use.

CitrusGender wrote:We've ended up disabling clockcult on sybil and bagil now (terry is having some problems.) We will give Xhuis some time until he wishes to work upon it again. As of now, please use this thread for ideas and not for bickering.

wubli wrote:you are a cultist of the gay

IkeTG wrote:It's a reflection of humanity, like all of man's creation. You cannot divorce this act from yourself, in a way there's a big titty moth inside all of us.

wesoda25 wrote:yeah no one was curious what it was from. Imagine choosing being a degenerate as your forum gimmick, LOL

User avatar
MrStonedOne
Host
 
Joined: Mon Apr 14, 2014 10:56 pm
Byond Username: MrStonedOne
Github Username: MrStonedOne

Re: Best code comments

Postby MrStonedOne » Fri Dec 04, 2015 12:14 pm #138163

//Somebody cut an important wire and now we're following a new definition of "pitch."
/obj/machinery/vending/proc/throw_item()
Forum/Wiki Administrator, Server host, Database King, Master Coder


MrStonedOne on Reddit(banned), Steam, IRC, Skype Discord.

[10:55 AM] spookydonut: stonedmc is the work of a criminally insane mad genius

User avatar
phil235
 
Joined: Thu Apr 17, 2014 11:39 am
Byond Username: Phil235

Re: Best code comments

Postby phil235 » Wed Jan 20, 2016 5:12 pm #147640

Code: Select all
   if("close" in href_list)
      usr.reset_view(null)
      usr.unset_machine()
      current = null
      return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later


We're still waiting, Sayu...
I'm a tgstation coding maintainer janitor

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

Re: Best code comments

Postby DemonFiren » Sat Apr 30, 2016 8:14 pm #172639

In phylactery code:

Code: Select all
M << "<span class='notice'>You aren't dead enough to revive!</span>" //Usually a good problem to have
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
One Seven One
 
Joined: Wed Jun 10, 2015 9:43 am
Byond Username: OneSevenOne

Re: Best code comments

Postby One Seven One » Sat Sep 03, 2016 5:23 am #208386

Code: Select all
/obj/item/clothing/tie/talisman
   name = "bone talisman"
   desc = "A hunter's talisman, some say the old gods smile on those who wear it."
   icon = 'icons/obj/clothing/ties.dmi'
   icon_state = "talisman"
   item_state = ""
   item_color = "talisman"
   body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS|HEAD
   armor = list(melee = 5, bullet = 5, laser = 5, energy = 5, bomb = 50, bio = 65, rad = 5) //Faith is the best armor. //This won't actually work because of accessories kill me with a fucking knife jesus christ I hate code
I like music.
Ghost Data
Maximalasim [X] [X]
Mystery Skulls
Send me yours!

User avatar
TechnoAlchemist
 
Joined: Fri Nov 21, 2014 2:39 am
Byond Username: TechnoAlchemist

Re: Best code comments

Postby TechnoAlchemist » Sat Sep 03, 2016 7:50 am #208412

thas me

Incoming
Github User
 
Joined: Tue Apr 15, 2014 11:41 pm
Byond Username: Incoming
Github Username: Incoming5643

Re: Best code comments

Postby Incoming » Sat Sep 03, 2016 8:01 am #208416

if it ever changes to work it'll be really valuable, considering no other accessory gives any sort of armoring
Developer - Datum Antags: Feburary 2016

Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.

Patreon - Make A Poor Life Choice

Good ideas backed by cruddy code since 2012!

User avatar
TechnoAlchemist
 
Joined: Fri Nov 21, 2014 2:39 am
Byond Username: TechnoAlchemist

Re: Best code comments

Postby TechnoAlchemist » Sun Sep 04, 2016 2:24 am #208575

C0reoverload had a PR up that would have fixed it but it god closed because bundles

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 » Sun Sep 04, 2016 2:32 am #208576

TechnoAlchemist wrote:C0reoverload had a PR up that would have fixed it but it god closed because bundles

no it was merged https://github.com/tgstation/tgstation/pull/19748
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
TechnoAlchemist
 
Joined: Fri Nov 21, 2014 2:39 am
Byond Username: TechnoAlchemist

Re: Best code comments

Postby TechnoAlchemist » Sun Sep 04, 2016 4:12 am #208583

Fucjing epic bro good find good find good shot good shit

User avatar
The Ultimate Chimera
 
Joined: Wed Feb 03, 2016 6:31 am
Location: The Lifeweb
Byond Username: The Ultimate Chimera

Re: Best code comments

Postby The Ultimate Chimera » Thu Sep 08, 2016 2:32 am #209635

DemonFiren wrote:Found in meter.dm:
Code: Select all
// TURF METER - REPORTS A TILE'S AIR CONTENTS
//   why are you yelling?


Kek.
Your sins are not to be forgiven. Pain and regrets are waiting for you.

User avatar
JJRcop
 
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

Re: Best code comments

Postby JJRcop » Sun Jan 01, 2017 8:45 am #240005

code/__HELPERS/time.dm line 1

Capture.PNG
Capture.PNG (6.61 KiB) Viewed 7719 times


Yep, hh:mm time notation is definitely an English thing, and is not used by any other language at all.
I lurk quite often...

User avatar
Saegrimr
 
Joined: Thu Jul 24, 2014 4:39 pm
Byond Username: Saegrimr

Re: Best code comments

Postby Saegrimr » Sun Jan 01, 2017 9:09 am #240008

JJRcop wrote:Yep, hh:mm time notation is definitely an English thing, and is not used by any other language at all.

Can't have that stupid british time where they go mm:hh:ss
tedward1337 wrote:Sae is like the racist grandad who everyone laughs at for being racist, but deep down we all know he's right.

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 » Sun Jan 01, 2017 1:23 pm #240018

"english" in this case, means text.
We also have englishlist(), which takes a list and formats it into a nice string.
Pretty much any code not dealing with translation that uses the word "english" means text, because english is the defacto language of the internet and programming.

Saeg I don't even know what you're talking about stop talking out of your ass.
私は完璧

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

Re: Best code comments

Postby DemonFiren » Sun Jan 01, 2017 1:53 pm #240023

Saeg cannot be wrong, therefore you must educate yourself:^)
Image
Image
Image
ImageImageImageImageImage

non-lizard things:
Spoiler:
Image

User avatar
Saegrimr
 
Joined: Thu Jul 24, 2014 4:39 pm
Byond Username: Saegrimr

Re: Best code comments

Postby Saegrimr » Sun Jan 01, 2017 2:24 pm #240026

And here I thought the month/day/year joke was obvious.
tedward1337 wrote:Sae is like the racist grandad who everyone laughs at for being racist, but deep down we all know he's right.

User avatar
Iatots
 
Joined: Thu Oct 13, 2016 3:17 pm
Byond Username: Iatots
Github Username: Iatots

Re: Best code comments

Postby Iatots » Sun Jan 01, 2017 5:43 pm #240048

tbh I thought it was a reference to that (pretending) guy in a chain reply

it went a bit like this

>how long is X?
>Y minutes
>how long in american hours?
cue 20 myeuroface.jpg

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

Re: Best code comments

Postby bandit » Fri Mar 31, 2017 4:37 pm #274851

var/fucking_stock_spikes = current_value + 500
var/piece_of_shit_fuck = current_value - 500
var/i_hate_this_code = (speculation / rand(25000, 50000) + performance / rand(100, 800)) * current_value
if(i_hate_this_code < fucking_stock_spikes || i_hate_this_code > piece_of_shit_fuck)
current_value += i_hate_this_code
"I don't see any difference between ERP and rape." -- erro

admin feedback pls

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 » Fri Mar 31, 2017 4:40 pm #274855

technically not a comment 4/10 I laughed anyways
Limey wrote:its too late.

User avatar
oranges
Code Maintainer
 
Joined: Tue Apr 15, 2014 9:16 pm
Location: #CHATSHITGETBANGED
Byond Username: Optimumtact
Github Username: optimumtact

Re: Best code comments

Postby oranges » Sat Apr 01, 2017 4:08 am #275116

Saegrimr wrote:And here I thought the month/day/year joke was obvious.

it's year/month/day numbnuts
Image

lzimann
 
Joined: Sun Oct 26, 2014 5:13 am
Byond Username: Lzimann
Github Username: lzimann

Re: Best code comments

Postby lzimann » Sun Apr 02, 2017 3:08 am #275353

This one is from goon(their chat's JS), made me laugh quite a bit when I first saw it:
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>';
      }
      else {
         return $1 ? $0: '<a href="http://'+$0+'">'+$0+'</a>';
      }
   });
}

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 » Fri Apr 07, 2017 12:08 pm #277879

https://github.com/tgstation/tgstation/ ... rs.dm#L328
Code: Select all
/proc/is_special_character(mob/M) // returns 1 for special characters and 2 for heroes of gamemode //moved out of admins.dm because things other than admin procs were calling this.
...
   if(M.mind && M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
      switch(SSticker.mode.config_tag)
         if("revolution")
            if((M.mind in SSticker.mode.head_revolutionaries) || (M.mind in SSticker.mode.revolutionaries))
               return 2
         if("cult")
            if(M.mind in SSticker.mode.cult)
               return 2
         if("nuclear")
            if(M.mind in SSticker.mode.syndicates)
               return 2
         if("changeling")
            if(M.mind in SSticker.mode.changelings)
               return 2
         if("wizard")
            if(M.mind in SSticker.mode.wizards)
               return 2
         if("apprentice")
            if(M.mind in SSticker.mode.apprentices)
               return 2
         if("monkey")
            if(M.viruses && (locate(/datum/disease/transformation/jungle_fever) in M.viruses))
               return 2
         if("abductor")
            if(M.mind in SSticker.mode.abductors)
               return 2
      return 1
return 0


>heroes
CONFIRMED: NT ARE THE BAD GUYS.
私は完璧

User avatar
Cyberboss
Code Maintainer
 
Joined: Mon Sep 26, 2016 7:58 pm
Location: Ontario, CA
Byond Username: Cyberboss
Github Username: Cyberboss

Re: Best code comments

Postby Cyberboss » Tue Sep 12, 2017 6:26 pm #336071


Next

Return to Coding

Who is online

Users browsing this forum: No registered users